text
stringlengths
1
1.05M
#include <bits/stdc++.h> using namespace std; //Filename: Leetcode0805.cpp // //Author: dezhonger - csdisassembly@gmail.com //Create: 2021-05-06 01:52:10 //Last modified: 2021-05-06 02:02:09 #define rep(i, a, b) for(int i = (a); i < (b); i++) #define reps(i, a, b) for(int i = (a); i < (b); i++) #define pb push_back #define ps push #define mp make_pair #define CLR(x,t) memset(x,t,sizeof x) #define LEN(X) strlen(X) #define F first #define S second #define each(x,y) for(auto y = x.begin(); y != x.end(); y++) cout << *y << " "; cout << endl; #define Debug(x) cout<<#x<<"="<<x<<endl; typedef pair<int, int> PII; class Solution { public: bool splitArraySameAverage(vector<int>& nums) { int n = nums.size(); int n1 = n / 2; int n2 = n - n1; int sum = 0; for (int x: nums) sum += x; set<PII> st; //枚举前一半数组 for (int i = 0; i < (1 << n1); i++) { int c = 0, s = 0; for (int j = 0; j < n1; j++) { if (i & (1 << j)) s += nums[j], c++; } st.insert({s, c}); } //枚举后一半数组 for (int i = 0; i < (1 << n2); i++) { int c = 0, s = 0; for (int j = 0; j < n2; j++) { if (i & (1 << j)) s += nums[j + n1], c++; } for (int cc = max(1, c); cc < n; cc++) { if (cc * sum % n == 0) { //sum / n == xxx / cc 满足这个条件 //后一半已经有c个数的和为s int ss = cc * sum / n; //就是说需要在前一半数组内找到 cc - c 个数的和为s - ss PII p(ss - s, cc - c); if (st.count(p)) return true; } } } return false; } }; int main() { #ifdef LOCAL freopen("in.txt", "r", stdin); #endif ios::sync_with_stdio (false); cin.tie (0); return 0; }
; A187173: Number of 3-step left-handed knight's tours (moves only out two, left one) on an n X n board summed over all starting positions. ; 0,0,0,16,60,128,220,336,476,640,828,1040,1276,1536,1820,2128,2460,2816,3196,3600,4028,4480,4956,5456,5980,6528,7100,7696,8316,8960,9628,10320,11036,11776,12540,13328,14140,14976,15836,16720,17628,18560,19516,20496,21500,22528,23580,24656,25756,26880 trn $0,2 mov $1,1 add $1,$0 mul $1,3 sub $1,2 pow $1,2 sub $1,3 div $1,3 mul $1,4
;MATHEUS FIGUEIREDO ORG 0h MOV P1,#00000010B ABERTA: JNB P2.7,FECHADA ;0 JB P2.7,ABERTA ;1 FECHADA: MOV R7,P2 MOV A,R7 CPL A MOV R7,A ANL 07H,#00001111B ;passei para r7 o valor das chaves de p2, fiz um AND para limpar o byte MSD e deixar apenas o LSD em R7 de p2 JNB P2.6,DIREITA JB P2.6,ESQUERDA DIREITA: MOV A,P1 RR A MOV P1,A DEC R7 CJNE R7,#0,DIREITA JMP FIM ESQUERDA: MOV A,P1 RL A MOV P1,A DEC R7 CJNE R7,#0,ESQUERDA JMP FIM FIM: END
/** * \file * Create Millepede-II C-binary record. * * \author : Gero Flucke * date : October 2006 * $Revision: 1.3 $ * $Date: 2007/04/16 17:47:38 $ * (last update by $Author: flucke $) */ /* RS: original Mille.cc from http://svnsrv.desy.de/public/MillepedeII/tags/V04-02-03 jeudi 30 avril 2015: renamed to cxx jeudi 30 avril 2015: added automatic buffer expansion */ #include "Mille.h" #include <fstream> #include <iostream> //___________________________________________________________________________ /// Opens outFileName (by default as binary file). /** * \param[in] outFileName file name * \param[in] asBinary flag for binary * \param[in] writeZero flag for keeping of zeros */ Mille::Mille(const char *outFileName, bool asBinary, bool writeZero) : myOutFile(outFileName, (asBinary ? (std::ios::binary | std::ios::out | std::ios::trunc) : (std::ios::out | std::ios::trunc ))), myAsBinary(asBinary), myWriteZero(writeZero),myBufferSize(0), myBufferInt(5000),myBufferFloat(5000), myBufferPos(-1), myHasSpecial(false) { // Instead myBufferPos(-1), myHasSpecial(false) and the following two lines // we could call newSet() and kill()... if (!myOutFile.is_open()) { std::cerr << "Mille::Mille: Could not open " << outFileName << " as output file." << std::endl; } } //___________________________________________________________________________ /// Closes file. Mille::~Mille() { myOutFile.close(); } //___________________________________________________________________________ /// Add measurement to buffer. /** * \param[in] NLC number of local derivatives * \param[in] derLc local derivatives * \param[in] NGL number of global derivatives * \param[in] derGl global derivatives * \param[in] label global labels * \param[in] rMeas measurement (residuum) * \param[in] sigma error */ void Mille::mille(int NLC, const float *derLc, int NGL, const float *derGl, const int *label, float rMeas, float sigma) { if (sigma <= 0.) return; if (myBufferPos == -1) this->newSet(); // start, e.g. new track if (!this->checkBufferSize(NLC, NGL)) return; // first store measurement ++myBufferPos; float* bufferFloat = myBufferFloat.GetArray(); int* bufferInt = myBufferInt.GetArray(); bufferFloat[myBufferPos] = rMeas; bufferInt [myBufferPos] = 0; // store local derivatives and local 'lables' 1,...,NLC for (int i = 0; i < NLC; ++i) { if (derLc[i] || myWriteZero) { // by default store only non-zero derivatives ++myBufferPos; bufferFloat[myBufferPos] = derLc[i]; // local derivatives bufferInt [myBufferPos] = i+1; // index of local parameter } } // store uncertainty of measurement in between locals and globals ++myBufferPos; bufferFloat[myBufferPos] = sigma; bufferInt [myBufferPos] = 0; // store global derivatives and their labels for (int i = 0; i < NGL; ++i) { if (derGl[i] || myWriteZero) { // by default store only non-zero derivatives if ((label[i] > 0 || myWriteZero) && label[i] <= myMaxLabel) { // and for valid labels ++myBufferPos; bufferFloat[myBufferPos] = derGl[i]; // global derivatives bufferInt [myBufferPos] = label[i]; // index of global parameter } else { std::cerr << "Mille::mille: Invalid label " << label[i] << " <= 0 or > " << myMaxLabel << std::endl; } } } } //___________________________________________________________________________ /// Add special data to buffer. /** * \param[in] nSpecial number of floats/ints * \param[in] floatings floats * \param[in] integers ints */ void Mille::special(int nSpecial, const float *floatings, const int *integers) { if (nSpecial == 0) return; if (myBufferPos == -1) this->newSet(); // start, e.g. new track if (myHasSpecial) { std::cerr << "Mille::special: Special values already stored for this record." << std::endl; return; } if (!this->checkBufferSize(nSpecial, 0)) return; myHasSpecial = true; // after newSet() (Note: MILLSP sets to buffer position...) // myBufferFloat[.] | myBufferInt[.] // ------------------------------------ // 0.0 | 0 // -float(nSpecial) | 0 // The above indicates special data, following are nSpecial floating and nSpecial integer data. // float* bufferFloat = myBufferFloat.GetArray(); int* bufferInt = myBufferInt.GetArray(); // ++myBufferPos; // zero pair bufferFloat[myBufferPos] = 0.; bufferInt [myBufferPos] = 0; ++myBufferPos; // nSpecial and zero bufferFloat[myBufferPos] = -nSpecial; // automatic conversion to float bufferInt [myBufferPos] = 0; for (int i = 0; i < nSpecial; ++i) { ++myBufferPos; bufferFloat[myBufferPos] = floatings[i]; bufferInt [myBufferPos] = integers[i]; } } //___________________________________________________________________________ /// Reset buffers, i.e. kill derivatives accumulated for current set. void Mille::kill() { myBufferPos = -1; } //___________________________________________________________________________ /// Write buffer (set of derivatives with same local parameters) to file. int Mille::end() { int wrote = 0; if (myBufferPos > 0) { // only if anything stored... const int numWordsToWrite = (myBufferPos + 1)*2; float* bufferFloat = myBufferFloat.GetArray(); int* bufferInt = myBufferInt.GetArray(); if (myAsBinary) { myOutFile.write(reinterpret_cast<const char*>(&numWordsToWrite), sizeof(numWordsToWrite)); myOutFile.write(reinterpret_cast<char*>(bufferFloat), (myBufferPos+1) * sizeof(bufferFloat[0])); myOutFile.write(reinterpret_cast<char*>(bufferInt), (myBufferPos+1) * sizeof(bufferInt[0])); } else { myOutFile << numWordsToWrite << "\n"; for (int i = 0; i < myBufferPos+1; ++i) { myOutFile << bufferFloat[i] << " "; } myOutFile << "\n"; for (int i = 0; i < myBufferPos+1; ++i) { myOutFile << bufferInt[i] << " "; } myOutFile << "\n"; } wrote = (myBufferPos+1)*(sizeof(bufferFloat[0])+sizeof(bufferInt[0]))+sizeof(int); } myBufferPos = -1; // reset buffer for next set of derivatives return wrote; } //___________________________________________________________________________ /// Initialize for new set of locals, e.g. new track. void Mille::newSet() { myBufferPos = 0; myHasSpecial = false; myBufferFloat[0] = 0.0; myBufferInt [0] = 0; // position 0 used as error counter } //___________________________________________________________________________ /// Enough space for next nLocal + nGlobal derivatives incl. measurement? /** * \param[in] nLocal number of local derivatives * \param[in] nGlobal number of global derivatives * \return true if sufficient space available (else false) */ bool Mille::checkBufferSize(int nLocal, int nGlobal) { if (myBufferPos + nLocal + nGlobal + 2 >= myBufferInt.GetSize()) { ++(myBufferInt[0]); // increase error count std::cerr << "Mille::checkBufferSize: Buffer too short (" << myBufferInt.GetSize() << ")," << "\n need space for nLocal (" << nLocal<< ")" << "/nGlobal (" << nGlobal << ") local/global derivatives, " << myBufferPos + 1 << " already stored!" << std::endl; // return false; myBufferInt.Set(myBufferPos + nLocal + nGlobal + 1000); myBufferFloat.Set(myBufferPos + nLocal + nGlobal + 1000); } return true; }
; ; Test Program ; org 5000h START: LD HL,HELLO_MSG CALL STR_PR RET ; STR_PR: LD A,(HL) OR A RET Z RST 08h INC HL JR STR_PR ; HELLO_MSG DB "HELLO WORLD",13,10,0
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "db.h" #include "init.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; // Return average network hashes per second based on the last 'lookup' blocks, // or from the last difficulty change if 'lookup' is nonpositive. // If 'height' is nonnegative, compute the estimate at the time when a given block was found. Value GetNetworkHashPS(int lookup, int height) { CBlockIndex *pb = pindexBest; if (height >= 0 && height < nBestHeight) pb = FindBlockByHeight(height); if (pb == NULL || !pb->nHeight) return 0; // If lookup is -1, then use blocks since last difficulty change. if (lookup <= 0) lookup = pb->nHeight % 2016 + 1; // If lookup is larger than chain, then set it to chain length. if (lookup > pb->nHeight) lookup = pb->nHeight; CBlockIndex *pb0 = pb; int64 minTime = pb0->GetBlockTime(); int64 maxTime = minTime; for (int i = 0; i < lookup; i++) { pb0 = pb0->pprev; int64 time = pb0->GetBlockTime(); minTime = std::min(time, minTime); maxTime = std::max(time, maxTime); } // In case there's a situation where minTime == maxTime, we don't want a divide by zero exception. if (minTime == maxTime) return 0; uint256 workDiff = pb->nChainWork - pb0->nChainWork; int64 timeDiff = maxTime - minTime; return (boost::int64_t)(workDiff.getdouble() / timeDiff); } Value getnetworkhashps(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "getnetworkhashps [blocks] [height]\n" "Returns the estimated network hashes per second based on the last 120 blocks.\n" "Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\n" "Pass in [height] to estimate the network speed at the time when a certain block was found."); return GetNetworkHashPS(params.size() > 0 ? params[0].get_int() : 120, params.size() > 1 ? params[1].get_int() : -1); } // Key used by getwork/getblocktemplate miners. // Allocated in InitRPCMining, free'd in ShutdownRPCMining static CReserveKey* pMiningKey = NULL; void InitRPCMining() { if (!pwalletMain) return; // getwork/getblocktemplate mining rewards paid here: pMiningKey = new CReserveKey(pwalletMain); } void ShutdownRPCMining() { if (!pMiningKey) return; delete pMiningKey; pMiningKey = NULL; } Value getgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getgenerate\n" "Returns true or false."); if (!pMiningKey) return false; return GetBoolArg("-gen"); } Value setgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "setgenerate <generate> [genproclimit]\n" "<generate> is true or false to turn generation on or off.\n" "Generation is limited to [genproclimit] processors, -1 is unlimited."); bool fGenerate = true; if (params.size() > 0) fGenerate = params[0].get_bool(); if (params.size() > 1) { int nGenProcLimit = params[1].get_int(); mapArgs["-genproclimit"] = itostr(nGenProcLimit); if (nGenProcLimit == 0) fGenerate = false; } mapArgs["-gen"] = (fGenerate ? "1" : "0"); assert(pwalletMain != NULL); GenerateBitcoins(fGenerate, pwalletMain); return Value::null; } Value gethashespersec(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "gethashespersec\n" "Returns a recent hashes per second performance measurement while generating."); if (GetTimeMillis() - nHPSTimerStart > 8000) return (boost::int64_t)0; return (boost::int64_t)dHashesPerSec; } Value getmininginfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getmininginfo\n" "Returns an object containing mining-related information."); Object obj; obj.push_back(Pair("blocks", (int)nBestHeight)); obj.push_back(Pair("currentblocksize",(uint64_t)nLastBlockSize)); obj.push_back(Pair("currentblocktx",(uint64_t)nLastBlockTx)); obj.push_back(Pair("difficulty", (double)GetDifficulty())); obj.push_back(Pair("errors", GetWarnings("statusbar"))); obj.push_back(Pair("generate", GetBoolArg("-gen"))); obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1))); obj.push_back(Pair("hashespersec", gethashespersec(params, false))); obj.push_back(Pair("networkhashps", getnetworkhashps(params, false))); obj.push_back(Pair("pooledtx", (uint64_t)mempool.size())); obj.push_back(Pair("testnet", fTestNet)); return obj; } Value getworkex(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "getworkex [data, coinbase]\n" "If [data, coinbase] is not specified, returns extended work data.\n" ); if (vNodes.empty()) throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Infinitecoin is not connected!"); if (IsInitialBlockDownload()) throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Infinitecoin is downloading blocks..."); typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t; static mapNewBlock_t mapNewBlock; // FIXME: thread safety static vector<CBlockTemplate*> vNewBlockTemplate; static CReserveKey reservekey(pwalletMain); if (params.size() == 0) { // Update block static unsigned int nTransactionsUpdatedLast; static CBlockIndex* pindexPrev; static int64 nStart; static CBlockTemplate* pblocktemplate; if (pindexPrev != pindexBest || (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)) { if (pindexPrev != pindexBest) { // Deallocate old blocks since they're obsolete now mapNewBlock.clear(); BOOST_FOREACH(CBlockTemplate* pblocktemplate, vNewBlockTemplate) delete pblocktemplate; vNewBlockTemplate.clear(); } // Clear pindexPrev so future getworks make a new block, despite any failures from here on pindexPrev = NULL; // Store the pindexBest used before CreateNewBlock, to avoid races nTransactionsUpdatedLast = nTransactionsUpdated; CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block pblocktemplate = CreateNewBlockWithKey(*pMiningKey); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); vNewBlockTemplate.push_back(pblocktemplate); // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } CBlock* pblock = &pblocktemplate->block; // pointer for convenience // Update nTime pblock->UpdateTime(pindexPrev); pblock->nNonce = 0; // Update nExtraNonce static unsigned int nExtraNonce = 0; IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); // Save mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig); // Pre-build hash buffers char pmidstate[32]; char pdata[128]; char phash1[64]; FormatHashBuffers(pblock, pmidstate, pdata, phash1); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); CTransaction coinbaseTx = pblock->vtx[0]; std::vector<uint256> merkle = pblock->GetMerkleBranch(0); Object result; result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata)))); result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget)))); CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << coinbaseTx; result.push_back(Pair("coinbase", HexStr(ssTx.begin(), ssTx.end()))); Array merkle_arr; BOOST_FOREACH(uint256 merkleh, merkle) { printf("%s\n", merkleh.ToString().c_str()); merkle_arr.push_back(HexStr(BEGIN(merkleh), END(merkleh))); } result.push_back(Pair("merkle", merkle_arr)); return result; } else { // Parse parameters vector<unsigned char> vchData = ParseHex(params[0].get_str()); vector<unsigned char> coinbase; if(params.size() == 2) coinbase = ParseHex(params[1].get_str()); if (vchData.size() != 128) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter"); CBlock* pdata = (CBlock*)&vchData[0]; // Byte reverse for (int i = 0; i < 128/4; i++) ((unsigned int*)pdata)[i] = ByteReverse(((unsigned int*)pdata)[i]); // Get saved block if (!mapNewBlock.count(pdata->hashMerkleRoot)) return false; CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first; pblock->nTime = pdata->nTime; pblock->nNonce = pdata->nNonce; if(coinbase.size() == 0) pblock->vtx[0].vin[0].scriptSig = mapNewBlock[pdata->hashMerkleRoot].second; else CDataStream(coinbase, SER_NETWORK, PROTOCOL_VERSION) >> pblock->vtx[0]; pblock->hashMerkleRoot = pblock->BuildMerkleTree(); return CheckWork(pblock, *pwalletMain, reservekey); } } Value getwork(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getwork [data]\n" "If [data] is not specified, returns formatted hash data to work on:\n" " \"midstate\" : precomputed hash state after hashing the first half of the data (DEPRECATED)\n" // deprecated " \"data\" : block data\n" " \"hash1\" : formatted hash buffer for second hash (DEPRECATED)\n" // deprecated " \"target\" : little endian hash target\n" "If [data] is specified, tries to solve the block and returns true if it was successful."); if (vNodes.empty()) throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Infinitecoin is not connected!"); if (IsInitialBlockDownload()) throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Infinitecoin is downloading blocks..."); typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t; static mapNewBlock_t mapNewBlock; // FIXME: thread safety static vector<CBlockTemplate*> vNewBlockTemplate; if (params.size() == 0) { // Update block static unsigned int nTransactionsUpdatedLast; static CBlockIndex* pindexPrev; static int64 nStart; static CBlockTemplate* pblocktemplate; if (pindexPrev != pindexBest || (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)) { if (pindexPrev != pindexBest) { // Deallocate old blocks since they're obsolete now mapNewBlock.clear(); BOOST_FOREACH(CBlockTemplate* pblocktemplate, vNewBlockTemplate) delete pblocktemplate; vNewBlockTemplate.clear(); } // Clear pindexPrev so future getworks make a new block, despite any failures from here on pindexPrev = NULL; // Store the pindexBest used before CreateNewBlock, to avoid races nTransactionsUpdatedLast = nTransactionsUpdated; CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block pblocktemplate = CreateNewBlockWithKey(*pMiningKey); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); vNewBlockTemplate.push_back(pblocktemplate); // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } CBlock* pblock = &pblocktemplate->block; // pointer for convenience // Update nTime pblock->UpdateTime(pindexPrev); pblock->nNonce = 0; // Update nExtraNonce static unsigned int nExtraNonce = 0; IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); // Save mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig); // Pre-build hash buffers char pmidstate[32]; char pdata[128]; char phash1[64]; FormatHashBuffers(pblock, pmidstate, pdata, phash1); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); Object result; result.push_back(Pair("midstate", HexStr(BEGIN(pmidstate), END(pmidstate)))); // deprecated result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata)))); result.push_back(Pair("hash1", HexStr(BEGIN(phash1), END(phash1)))); // deprecated result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget)))); return result; } else { // Parse parameters vector<unsigned char> vchData = ParseHex(params[0].get_str()); if (vchData.size() != 128) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter"); CBlock* pdata = (CBlock*)&vchData[0]; // Byte reverse for (int i = 0; i < 128/4; i++) ((unsigned int*)pdata)[i] = ByteReverse(((unsigned int*)pdata)[i]); // Get saved block if (!mapNewBlock.count(pdata->hashMerkleRoot)) return false; CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first; pblock->nTime = pdata->nTime; pblock->nNonce = pdata->nNonce; pblock->vtx[0].vin[0].scriptSig = mapNewBlock[pdata->hashMerkleRoot].second; pblock->hashMerkleRoot = pblock->BuildMerkleTree(); assert(pwalletMain != NULL); return CheckWork(pblock, *pwalletMain, *pMiningKey); } } Value getblocktemplate(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getblocktemplate [params]\n" "Returns data needed to construct a block to work on:\n" " \"version\" : block version\n" " \"previousblockhash\" : hash of current highest block\n" " \"transactions\" : contents of non-coinbase transactions that should be included in the next block\n" " \"coinbaseaux\" : data that should be included in coinbase\n" " \"coinbasevalue\" : maximum allowable input to coinbase transaction, including the generation award and transaction fees\n" " \"target\" : hash target\n" " \"mintime\" : minimum timestamp appropriate for next block\n" " \"curtime\" : current timestamp\n" " \"mutable\" : list of ways the block template may be changed\n" " \"noncerange\" : range of valid nonces\n" " \"sigoplimit\" : limit of sigops in blocks\n" " \"sizelimit\" : limit of block size\n" " \"bits\" : compressed target of next block\n" " \"height\" : height of the next block\n" "See https://en.bitcoin.it/wiki/BIP_0022 for full specification."); std::string strMode = "template"; if (params.size() > 0) { const Object& oparam = params[0].get_obj(); const Value& modeval = find_value(oparam, "mode"); if (modeval.type() == str_type) strMode = modeval.get_str(); else if (modeval.type() == null_type) { /* Do nothing */ } else throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); } if (strMode != "template") throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); if (vNodes.empty()) throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Infinitecoin is not connected!"); if (IsInitialBlockDownload()) throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Infinitecoin is downloading blocks..."); // Update block static unsigned int nTransactionsUpdatedLast; static CBlockIndex* pindexPrev; static int64 nStart; static CBlockTemplate* pblocktemplate; if (pindexPrev != pindexBest || (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 5)) { // Clear pindexPrev so future calls make a new block, despite any failures from here on pindexPrev = NULL; // Store the pindexBest used before CreateNewBlock, to avoid races nTransactionsUpdatedLast = nTransactionsUpdated; CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block if(pblocktemplate) { delete pblocktemplate; pblocktemplate = NULL; } CScript scriptDummy = CScript() << OP_TRUE; pblocktemplate = CreateNewBlock(scriptDummy); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } CBlock* pblock = &pblocktemplate->block; // pointer for convenience // Update nTime pblock->UpdateTime(pindexPrev); pblock->nNonce = 0; Array transactions; map<uint256, int64_t> setTxIndex; int i = 0; BOOST_FOREACH (CTransaction& tx, pblock->vtx) { uint256 txHash = tx.GetHash(); setTxIndex[txHash] = i++; if (tx.IsCoinBase()) continue; Object entry; CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << tx; entry.push_back(Pair("data", HexStr(ssTx.begin(), ssTx.end()))); entry.push_back(Pair("hash", txHash.GetHex())); Array deps; BOOST_FOREACH (const CTxIn &in, tx.vin) { if (setTxIndex.count(in.prevout.hash)) deps.push_back(setTxIndex[in.prevout.hash]); } entry.push_back(Pair("depends", deps)); int index_in_template = i - 1; entry.push_back(Pair("fee", pblocktemplate->vTxFees[index_in_template])); entry.push_back(Pair("sigops", pblocktemplate->vTxSigOps[index_in_template])); transactions.push_back(entry); } Object aux; aux.push_back(Pair("flags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end()))); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); static Array aMutable; if (aMutable.empty()) { aMutable.push_back("time"); aMutable.push_back("transactions"); aMutable.push_back("prevblock"); } Object result; result.push_back(Pair("version", pblock->nVersion)); result.push_back(Pair("previousblockhash", pblock->hashPrevBlock.GetHex())); result.push_back(Pair("transactions", transactions)); result.push_back(Pair("coinbaseaux", aux)); result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue)); result.push_back(Pair("target", hashTarget.GetHex())); result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1)); result.push_back(Pair("mutable", aMutable)); result.push_back(Pair("noncerange", "00000000ffffffff")); result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS)); result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SIZE)); result.push_back(Pair("curtime", (int64_t)pblock->nTime)); result.push_back(Pair("bits", HexBits(pblock->nBits))); result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1))); return result; } Value submitblock(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "submitblock <hex data> [optional-params-obj]\n" "[optional-params-obj] parameter is currently ignored.\n" "Attempts to submit new block to network.\n" "See https://en.bitcoin.it/wiki/BIP_0022 for full specification."); vector<unsigned char> blockData(ParseHex(params[0].get_str())); CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION); CBlock pblock; try { ssBlock >> pblock; } catch (std::exception &e) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed"); } CValidationState state; bool fAccepted = ProcessBlock(state, NULL, &pblock); if (!fAccepted) return "rejected"; // TODO: report validation state return Value::null; }
;============================================================ ; Example 2-1 ; Enabling raster interrupts ;============================================================ !cpu 6502 !to "build/example2-1.prg",cbm * = $1000 sei ; turn off interrupts lda #$7f sta $dc0d ; turn off CIA1 interrupts sta $dd0d ; turn off CIA2 interrupts lda #$01 sta $d01a ; turn on raster interrupts ldx #<rasterirq ; low nibble of interrupt handler address ldy #>rasterirq ; high nibble of interrupt handler address stx $0314 ; store in interrupt vector sty $0315 lda #$1b sta $d011 ; clear high bit of $d012 lda #$00 sta $d012 ; raster line where interrupt will be triggered lda $dc0d ; ACK CIA1 interrupts lda $dd0d ; ACK CIA2 interrupts asl $d019 ; ACK VIC interrupts cli ; re-enable interrupts loop: jmp loop ; infinite loop rasterirq: inc $d020 ; flash border asl $d019 ; ACK interrupt to reenable it pla ; restore registers from the stack. could tay ; be done with jmp $ea81, wasting three cycles pla ; for the JMP, but saving 3 bytes of memory tax pla rti ; return from interrupt
/* //@HEADER // ************************************************************************ // // KokkosKernels 0.9: Linear Algebra and Graph Kernels // Copyright 2017 Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // 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 Corporation nor the names of the // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE // 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. // // Questions? Contact Siva Rajamanickam (srajama@sandia.gov) // // ************************************************************************ //@HEADER */ #define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true #include "KokkosKernels_config.h" #if defined (KOKKOSKERNELS_INST_DOUBLE) \ && defined (KOKKOSKERNELS_INST_LAYOUTLEFT) \ && defined (KOKKOSKERNELS_INST_EXECSPACE_CUDA) \ && defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE) #include "KokkosBlas_gesv_spec.hpp" namespace KokkosBlas { namespace Impl { KOKKOSBLAS_GESV_ETI_SPEC_INST(double, Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaUVMSpace) } // Impl } // KokkosBlas #endif
; BEGIN_LEGAL ; Intel Open Source License ; ; Copyright (c) 2002-2016 Intel Corporation. All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are ; met: ; ; Redistributions of source code must retain the above copyright notice, ; this list of conditions and the following disclaimer. Redistributions ; in binary form must reproduce the above copyright notice, this list of ; conditions and the following disclaimer in the documentation and/or ; other materials provided with the distribution. Neither the name of ; the Intel Corporation nor the names of its contributors may be used to ; endorse or promote products derived from this software without ; specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ; ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; END_LEGAL PUBLIC probed_func_asm .code probed_func_asm PROC xor rax, rax cmp rcx, 0 jne $lNOT_ZERO mov rax, 2 $lNOT_ZERO: mov rax, 1 ret probed_func_asm ENDP end
_CeladonMart1Text1:: text "Hello! Welcome to" line "CELADON DEPT." cont "STORE." para "The board on the" line "right describes" cont "the store layout." done _CeladonMart1Text2:: text "1F: SERVICE" line " COUNTER" para "2F: TRAINER'S" line " MARKET" para "3F: TV GAME SHOP" para "4F: WISEMAN GIFTS" para "5F: DRUG STORE" para "ROOFTOP SQUARE:" line "VENDING MACHINES" done _CeladonMart1Text3:: text "1F: SERVICE" line " COUNTER" done
Name: Poo.asm Type: file Size: 5002 Last-Modified: '1992-07-01T15:00:00Z' SHA-1: A14B1CC03D32D39E2DAA0AACCD3981F83033BFAF Description: null
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r8 push %r9 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x14fef, %rdx clflush (%rdx) nop nop dec %r9 movb (%rdx), %cl nop nop nop cmp %rax, %rax lea addresses_normal_ht+0x43af, %rsi lea addresses_WC_ht+0x1a52f, %rdi nop nop nop add %r8, %r8 mov $84, %rcx rep movsl nop nop nop nop cmp %rsi, %rsi lea addresses_A_ht+0x1e81b, %rcx nop nop nop nop cmp $33030, %rax mov (%rcx), %r8w nop nop nop nop nop inc %rcx lea addresses_WT_ht+0x3aaf, %rsi lea addresses_UC_ht+0x1bcaf, %rdi nop nop nop nop nop cmp %r13, %r13 mov $46, %rcx rep movsb cmp $13469, %r8 lea addresses_WC_ht+0x106e2, %rdx nop nop nop nop nop xor $45362, %rdi movb (%rdx), %cl cmp $32591, %r13 lea addresses_WT_ht+0x15f7f, %r9 xor %rdi, %rdi mov (%r9), %ax nop nop sub %r9, %r9 lea addresses_WC_ht+0x167af, %rsi lea addresses_WC_ht+0x1c4af, %rdi clflush (%rdi) nop xor $55732, %r8 mov $36, %rcx rep movsb nop nop xor $46350, %rsi lea addresses_D_ht+0xdaf, %rdi add $50866, %rcx vmovups (%rdi), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $0, %xmm6, %r9 cmp %rcx, %rcx lea addresses_A_ht+0x29af, %rsi lea addresses_WC_ht+0xf9af, %rdi nop nop nop sub %rdx, %rdx mov $100, %rcx rep movsw nop mfence lea addresses_WC_ht+0x16bbb, %rsi nop cmp $978, %r9 mov (%rsi), %edx sub $13595, %rax lea addresses_WC_ht+0x1bb6f, %rdi nop nop nop inc %r8 mov (%rdi), %edx nop nop nop inc %rdi lea addresses_WC_ht+0x10af, %rsi nop nop nop nop inc %r8 movb $0x61, (%rsi) nop nop nop nop sub $15410, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %r8 push %rcx push %rdi // Store lea addresses_D+0x15aaf, %r13 nop nop and $257, %r14 mov $0x5152535455565758, %r11 movq %r11, (%r13) nop nop cmp %r12, %r12 // Faulty Load lea addresses_WT+0x1bfaf, %rcx nop nop nop nop cmp %rdi, %rdi mov (%rcx), %r13d lea oracles, %r14 and $0xff, %r13 shlq $12, %r13 mov (%r14,%r13,1), %r13 pop %rdi pop %rcx pop %r8 pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_D', 'size': 8, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}} {'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}} {'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': True}} {'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False}} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2016 Intel Corporation All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Function API: ; uint64_t crc64_jones_norm_by8( ; uint64_t init_crc, //initial CRC value, 64 bits ; const unsigned char *buf, //buffer pointer to calculate CRC on ; uint64_t len //buffer length in bytes (64-bit data) ; ); ; %include "reg_sizes.asm" %define fetch_dist 1024 [bits 64] default rel section .text %ifidn __OUTPUT_FORMAT__, win64 %xdefine arg1 rcx %xdefine arg2 rdx %xdefine arg3 r8 %else %xdefine arg1 rdi %xdefine arg2 rsi %xdefine arg3 rdx %endif %define TMP 16*0 %ifidn __OUTPUT_FORMAT__, win64 %define XMM_SAVE 16*2 %define VARIABLE_OFFSET 16*10+8 %else %define VARIABLE_OFFSET 16*2+8 %endif align 16 mk_global crc64_jones_norm_by8, function crc64_jones_norm_by8: endbranch not arg1 ;~init_crc sub rsp,VARIABLE_OFFSET %ifidn __OUTPUT_FORMAT__, win64 ; push the xmm registers into the stack to maintain movdqa [rsp + XMM_SAVE + 16*0], xmm6 movdqa [rsp + XMM_SAVE + 16*1], xmm7 movdqa [rsp + XMM_SAVE + 16*2], xmm8 movdqa [rsp + XMM_SAVE + 16*3], xmm9 movdqa [rsp + XMM_SAVE + 16*4], xmm10 movdqa [rsp + XMM_SAVE + 16*5], xmm11 movdqa [rsp + XMM_SAVE + 16*6], xmm12 movdqa [rsp + XMM_SAVE + 16*7], xmm13 %endif ; check if smaller than 256 cmp arg3, 256 ; for sizes less than 256, we can't fold 128B at a time... jl _less_than_256 ; load the initial crc value movq xmm10, arg1 ; initial crc ; crc value does not need to be byte-reflected, but it needs to be moved to the high part of the register. ; because data will be byte-reflected and will align with initial crc at correct place. pslldq xmm10, 8 movdqa xmm11, [SHUF_MASK] ; receive the initial 128B data, xor the initial crc value movdqu xmm0, [arg2+16*0] movdqu xmm1, [arg2+16*1] movdqu xmm2, [arg2+16*2] movdqu xmm3, [arg2+16*3] movdqu xmm4, [arg2+16*4] movdqu xmm5, [arg2+16*5] movdqu xmm6, [arg2+16*6] movdqu xmm7, [arg2+16*7] pshufb xmm0, xmm11 ; XOR the initial_crc value pxor xmm0, xmm10 pshufb xmm1, xmm11 pshufb xmm2, xmm11 pshufb xmm3, xmm11 pshufb xmm4, xmm11 pshufb xmm5, xmm11 pshufb xmm6, xmm11 pshufb xmm7, xmm11 movdqa xmm10, [rk3] ;xmm10 has rk3 and rk4 ;imm value of pclmulqdq instruction will determine which constant to use ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; we subtract 256 instead of 128 to save one instruction from the loop sub arg3, 256 ; at this section of the code, there is 128*x+y (0<=y<128) bytes of buffer. The _fold_128_B_loop ; loop will fold 128B at a time until we have 128+y Bytes of buffer ; fold 128B at a time. This section of the code folds 8 xmm registers in parallel _fold_128_B_loop: ; update the buffer pointer add arg2, 128 ; buf += 128; prefetchnta [arg2+fetch_dist+0] movdqu xmm9, [arg2+16*0] movdqu xmm12, [arg2+16*1] pshufb xmm9, xmm11 pshufb xmm12, xmm11 movdqa xmm8, xmm0 movdqa xmm13, xmm1 pclmulqdq xmm0, xmm10, 0x0 pclmulqdq xmm8, xmm10 , 0x11 pclmulqdq xmm1, xmm10, 0x0 pclmulqdq xmm13, xmm10 , 0x11 pxor xmm0, xmm9 xorps xmm0, xmm8 pxor xmm1, xmm12 xorps xmm1, xmm13 prefetchnta [arg2+fetch_dist+32] movdqu xmm9, [arg2+16*2] movdqu xmm12, [arg2+16*3] pshufb xmm9, xmm11 pshufb xmm12, xmm11 movdqa xmm8, xmm2 movdqa xmm13, xmm3 pclmulqdq xmm2, xmm10, 0x0 pclmulqdq xmm8, xmm10 , 0x11 pclmulqdq xmm3, xmm10, 0x0 pclmulqdq xmm13, xmm10 , 0x11 pxor xmm2, xmm9 xorps xmm2, xmm8 pxor xmm3, xmm12 xorps xmm3, xmm13 prefetchnta [arg2+fetch_dist+64] movdqu xmm9, [arg2+16*4] movdqu xmm12, [arg2+16*5] pshufb xmm9, xmm11 pshufb xmm12, xmm11 movdqa xmm8, xmm4 movdqa xmm13, xmm5 pclmulqdq xmm4, xmm10, 0x0 pclmulqdq xmm8, xmm10 , 0x11 pclmulqdq xmm5, xmm10, 0x0 pclmulqdq xmm13, xmm10 , 0x11 pxor xmm4, xmm9 xorps xmm4, xmm8 pxor xmm5, xmm12 xorps xmm5, xmm13 prefetchnta [arg2+fetch_dist+96] movdqu xmm9, [arg2+16*6] movdqu xmm12, [arg2+16*7] pshufb xmm9, xmm11 pshufb xmm12, xmm11 movdqa xmm8, xmm6 movdqa xmm13, xmm7 pclmulqdq xmm6, xmm10, 0x0 pclmulqdq xmm8, xmm10 , 0x11 pclmulqdq xmm7, xmm10, 0x0 pclmulqdq xmm13, xmm10 , 0x11 pxor xmm6, xmm9 xorps xmm6, xmm8 pxor xmm7, xmm12 xorps xmm7, xmm13 sub arg3, 128 ; check if there is another 128B in the buffer to be able to fold jge _fold_128_B_loop ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; add arg2, 128 ; at this point, the buffer pointer is pointing at the last y Bytes of the buffer, where 0 <= y < 128 ; the 128B of folded data is in 8 of the xmm registers: xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7 ; fold the 8 xmm registers to 1 xmm register with different constants movdqa xmm10, [rk9] movdqa xmm8, xmm0 pclmulqdq xmm0, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 xorps xmm7, xmm0 movdqa xmm10, [rk11] movdqa xmm8, xmm1 pclmulqdq xmm1, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 xorps xmm7, xmm1 movdqa xmm10, [rk13] movdqa xmm8, xmm2 pclmulqdq xmm2, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 pxor xmm7, xmm2 movdqa xmm10, [rk15] movdqa xmm8, xmm3 pclmulqdq xmm3, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 xorps xmm7, xmm3 movdqa xmm10, [rk17] movdqa xmm8, xmm4 pclmulqdq xmm4, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 pxor xmm7, xmm4 movdqa xmm10, [rk19] movdqa xmm8, xmm5 pclmulqdq xmm5, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 xorps xmm7, xmm5 movdqa xmm10, [rk1] ;xmm10 has rk1 and rk2 movdqa xmm8, xmm6 pclmulqdq xmm6, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 pxor xmm7, xmm6 ; instead of 128, we add 112 to the loop counter to save 1 instruction from the loop ; instead of a cmp instruction, we use the negative flag with the jl instruction add arg3, 128-16 jl _final_reduction_for_128 ; now we have 16+y bytes left to reduce. 16 Bytes is in register xmm7 and the rest is in memory ; we can fold 16 bytes at a time if y>=16 ; continue folding 16B at a time _16B_reduction_loop: movdqa xmm8, xmm7 pclmulqdq xmm7, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 movdqu xmm0, [arg2] pshufb xmm0, xmm11 pxor xmm7, xmm0 add arg2, 16 sub arg3, 16 ; instead of a cmp instruction, we utilize the flags with the jge instruction ; equivalent of: cmp arg3, 16-16 ; check if there is any more 16B in the buffer to be able to fold jge _16B_reduction_loop ;now we have 16+z bytes left to reduce, where 0<= z < 16. ;first, we reduce the data in the xmm7 register _final_reduction_for_128: ; check if any more data to fold. If not, compute the CRC of the final 128 bits add arg3, 16 je _128_done ; here we are getting data that is less than 16 bytes. ; since we know that there was data before the pointer, we can offset the input pointer before the actual point, to receive exactly 16 bytes. ; after that the registers need to be adjusted. _get_last_two_xmms: movdqa xmm2, xmm7 movdqu xmm1, [arg2 - 16 + arg3] pshufb xmm1, xmm11 ; get rid of the extra data that was loaded before ; load the shift constant lea rax, [pshufb_shf_table + 16] sub rax, arg3 movdqu xmm0, [rax] ; shift xmm2 to the left by arg3 bytes pshufb xmm2, xmm0 ; shift xmm7 to the right by 16-arg3 bytes pxor xmm0, [mask1] pshufb xmm7, xmm0 pblendvb xmm1, xmm2 ;xmm0 is implicit ; fold 16 Bytes movdqa xmm2, xmm1 movdqa xmm8, xmm7 pclmulqdq xmm7, xmm10, 0x11 pclmulqdq xmm8, xmm10, 0x0 pxor xmm7, xmm8 pxor xmm7, xmm2 _128_done: ; compute crc of a 128-bit value movdqa xmm10, [rk5] ; rk5 and rk6 in xmm10 movdqa xmm0, xmm7 ;64b fold pclmulqdq xmm7, xmm10, 0x01 ; H*L pslldq xmm0, 8 pxor xmm7, xmm0 ;barrett reduction _barrett: movdqa xmm10, [rk7] ; rk7 and rk8 in xmm10 movdqa xmm0, xmm7 movdqa xmm1, xmm7 pand xmm1, [mask3] pclmulqdq xmm7, xmm10, 0x01 pxor xmm7, xmm1 pclmulqdq xmm7, xmm10, 0x11 pxor xmm7, xmm0 pextrq rax, xmm7, 0 _cleanup: not rax %ifidn __OUTPUT_FORMAT__, win64 movdqa xmm6, [rsp + XMM_SAVE + 16*0] movdqa xmm7, [rsp + XMM_SAVE + 16*1] movdqa xmm8, [rsp + XMM_SAVE + 16*2] movdqa xmm9, [rsp + XMM_SAVE + 16*3] movdqa xmm10, [rsp + XMM_SAVE + 16*4] movdqa xmm11, [rsp + XMM_SAVE + 16*5] movdqa xmm12, [rsp + XMM_SAVE + 16*6] movdqa xmm13, [rsp + XMM_SAVE + 16*7] %endif add rsp, VARIABLE_OFFSET ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; align 16 _less_than_256: ; check if there is enough buffer to be able to fold 16B at a time cmp arg3, 32 jl _less_than_32 movdqa xmm11, [SHUF_MASK] ; if there is, load the constants movdqa xmm10, [rk1] ; rk1 and rk2 in xmm10 movq xmm0, arg1 ; get the initial crc value pslldq xmm0, 8 ; align it to its correct place movdqu xmm7, [arg2] ; load the plaintext pshufb xmm7, xmm11 ; byte-reflect the plaintext pxor xmm7, xmm0 ; update the buffer pointer add arg2, 16 ; update the counter. subtract 32 instead of 16 to save one instruction from the loop sub arg3, 32 jmp _16B_reduction_loop align 16 _less_than_32: ; mov initial crc to the return value. this is necessary for zero-length buffers. mov rax, arg1 test arg3, arg3 je _cleanup movdqa xmm11, [SHUF_MASK] movq xmm0, arg1 ; get the initial crc value pslldq xmm0, 8 ; align it to its correct place cmp arg3, 16 je _exact_16_left jl _less_than_16_left movdqu xmm7, [arg2] ; load the plaintext pshufb xmm7, xmm11 ; byte-reflect the plaintext pxor xmm7, xmm0 ; xor the initial crc value add arg2, 16 sub arg3, 16 movdqa xmm10, [rk1] ; rk1 and rk2 in xmm10 jmp _get_last_two_xmms align 16 _less_than_16_left: ; use stack space to load data less than 16 bytes, zero-out the 16B in memory first. pxor xmm1, xmm1 mov r11, rsp movdqa [r11], xmm1 ; backup the counter value mov r9, arg3 cmp arg3, 8 jl _less_than_8_left ; load 8 Bytes mov rax, [arg2] mov [r11], rax add r11, 8 sub arg3, 8 add arg2, 8 _less_than_8_left: cmp arg3, 4 jl _less_than_4_left ; load 4 Bytes mov eax, [arg2] mov [r11], eax add r11, 4 sub arg3, 4 add arg2, 4 _less_than_4_left: cmp arg3, 2 jl _less_than_2_left ; load 2 Bytes mov ax, [arg2] mov [r11], ax add r11, 2 sub arg3, 2 add arg2, 2 _less_than_2_left: cmp arg3, 1 jl _zero_left ; load 1 Byte mov al, [arg2] mov [r11], al _zero_left: movdqa xmm7, [rsp] pshufb xmm7, xmm11 pxor xmm7, xmm0 ; xor the initial crc value ; shl r9, 4 lea rax, [pshufb_shf_table + 16] sub rax, r9 cmp r9, 8 jl _end_1to7 _end_8to15: movdqu xmm0, [rax] pxor xmm0, [mask1] pshufb xmm7, xmm0 jmp _128_done _end_1to7: ; Right shift (8-length) bytes in XMM add rax, 8 movdqu xmm0, [rax] pshufb xmm7,xmm0 jmp _barrett align 16 _exact_16_left: movdqu xmm7, [arg2] pshufb xmm7, xmm11 pxor xmm7, xmm0 ; xor the initial crc value jmp _128_done section .data ; precomputed constants align 16 rk1: DQ 0x4445ed2750017038 rk2: DQ 0x698b74157cfbd736 rk3: DQ 0x0cfcfb5101c4b775 rk4: DQ 0x65403fd47cbec866 rk5: DQ 0x4445ed2750017038 rk6: DQ 0x0000000000000000 rk7: DQ 0xddf3eeb298be6cf8 rk8: DQ 0xad93d23594c935a9 rk9: DQ 0xd8dc208e2ba527b4 rk10: DQ 0xf032cfec76bb2bc5 rk11: DQ 0xb536044f357f4238 rk12: DQ 0xfdbf104d938ba67a rk13: DQ 0xeeddad9297a843e7 rk14: DQ 0x3550bce629466473 rk15: DQ 0x4e501e58ca43d25e rk16: DQ 0x13c961588f27f643 rk17: DQ 0x3b60d00dcb1099bc rk18: DQ 0x44bf1f468c53b9a3 rk19: DQ 0x96f2236e317179ee rk20: DQ 0xf00839aa0dd64bac mask1: dq 0x8080808080808080, 0x8080808080808080 mask2: dq 0xFFFFFFFFFFFFFFFF, 0x00000000FFFFFFFF mask3: dq 0x0000000000000000, 0xFFFFFFFFFFFFFFFF SHUF_MASK: dq 0x08090A0B0C0D0E0F, 0x0001020304050607 pshufb_shf_table: ; use these values for shift constants for the pshufb instruction ; different alignments result in values as shown: ; dq 0x8887868584838281, 0x008f8e8d8c8b8a89 ; shl 15 (16-1) / shr1 ; dq 0x8988878685848382, 0x01008f8e8d8c8b8a ; shl 14 (16-3) / shr2 ; dq 0x8a89888786858483, 0x0201008f8e8d8c8b ; shl 13 (16-4) / shr3 ; dq 0x8b8a898887868584, 0x030201008f8e8d8c ; shl 12 (16-4) / shr4 ; dq 0x8c8b8a8988878685, 0x04030201008f8e8d ; shl 11 (16-5) / shr5 ; dq 0x8d8c8b8a89888786, 0x0504030201008f8e ; shl 10 (16-6) / shr6 ; dq 0x8e8d8c8b8a898887, 0x060504030201008f ; shl 9 (16-7) / shr7 ; dq 0x8f8e8d8c8b8a8988, 0x0706050403020100 ; shl 8 (16-8) / shr8 ; dq 0x008f8e8d8c8b8a89, 0x0807060504030201 ; shl 7 (16-9) / shr9 ; dq 0x01008f8e8d8c8b8a, 0x0908070605040302 ; shl 6 (16-10) / shr10 ; dq 0x0201008f8e8d8c8b, 0x0a09080706050403 ; shl 5 (16-11) / shr11 ; dq 0x030201008f8e8d8c, 0x0b0a090807060504 ; shl 4 (16-12) / shr12 ; dq 0x04030201008f8e8d, 0x0c0b0a0908070605 ; shl 3 (16-13) / shr13 ; dq 0x0504030201008f8e, 0x0d0c0b0a09080706 ; shl 2 (16-14) / shr14 ; dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1 (16-15) / shr15 dq 0x8786858483828100, 0x8f8e8d8c8b8a8988 dq 0x0706050403020100, 0x0f0e0d0c0b0a0908 dq 0x8080808080808080, 0x0f0e0d0c0b0a0908 dq 0x8080808080808080, 0x8080808080808080 ;;; func core, ver, snum slversion crc64_jones_norm_by8, 01, 00, 0026
//===--- Cuda.cpp - Cuda Tool and ToolChain Implementations -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "Cuda.h" #include "CommonArgs.h" #include "InputInfo.h" #include "clang/Basic/Cuda.h" #include "clang/Config/config.h" #include "clang/Driver/Compilation.h" #include "clang/Driver/Distro.h" #include "clang/Driver/Driver.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/Options.h" #include "llvm/ADT/Optional.h" #include "llvm/Option/ArgList.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Host.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" #include "llvm/Support/Program.h" #include "llvm/Support/TargetParser.h" #include "llvm/Support/VirtualFileSystem.h" #include <system_error> using namespace clang::driver; using namespace clang::driver::toolchains; using namespace clang::driver::tools; using namespace clang; using namespace llvm::opt; namespace { struct CudaVersionInfo { std::string DetectedVersion; CudaVersion Version; }; // Parses the contents of version.txt in an CUDA installation. It should // contain one line of the from e.g. "CUDA Version 7.5.2". CudaVersionInfo parseCudaVersionFile(llvm::StringRef V) { V = V.trim(); if (!V.startswith("CUDA Version ")) return {V.str(), CudaVersion::UNKNOWN}; V = V.substr(strlen("CUDA Version ")); SmallVector<StringRef,4> VersionParts; V.split(VersionParts, '.'); return {"version.txt: " + V.str() + ".", VersionParts.size() < 2 ? CudaVersion::UNKNOWN : CudaStringToVersion( join_items(".", VersionParts[0], VersionParts[1]))}; } CudaVersion getCudaVersion(uint32_t raw_version) { if (raw_version < 7050) return CudaVersion::CUDA_70; if (raw_version < 8000) return CudaVersion::CUDA_75; if (raw_version < 9000) return CudaVersion::CUDA_80; if (raw_version < 9010) return CudaVersion::CUDA_90; if (raw_version < 9020) return CudaVersion::CUDA_91; if (raw_version < 10000) return CudaVersion::CUDA_92; if (raw_version < 10010) return CudaVersion::CUDA_100; if (raw_version < 10020) return CudaVersion::CUDA_101; if (raw_version < 11000) return CudaVersion::CUDA_102; if (raw_version < 11010) return CudaVersion::CUDA_110; return CudaVersion::LATEST; } CudaVersionInfo parseCudaHFile(llvm::StringRef Input) { // Helper lambda which skips the words if the line starts with them or returns // None otherwise. auto StartsWithWords = [](llvm::StringRef Line, const SmallVector<StringRef, 3> words) -> llvm::Optional<StringRef> { for (StringRef word : words) { if (!Line.consume_front(word)) return {}; Line = Line.ltrim(); } return Line; }; Input = Input.ltrim(); while (!Input.empty()) { if (auto Line = StartsWithWords(Input.ltrim(), {"#", "define", "CUDA_VERSION"})) { uint32_t RawVersion; Line->consumeInteger(10, RawVersion); return {"cuda.h: CUDA_VERSION=" + Twine(RawVersion).str() + ".", getCudaVersion(RawVersion)}; } // Find next non-empty line. Input = Input.drop_front(Input.find_first_of("\n\r")).ltrim(); } return {"cuda.h: CUDA_VERSION not found.", CudaVersion::UNKNOWN}; } } // namespace void CudaInstallationDetector::WarnIfUnsupportedVersion() { if (DetectedVersionIsNotSupported) D.Diag(diag::warn_drv_unknown_cuda_version) << DetectedVersion << CudaVersionToString(CudaVersion::LATEST_SUPPORTED); } CudaInstallationDetector::CudaInstallationDetector( const Driver &D, const llvm::Triple &HostTriple, const llvm::opt::ArgList &Args) : D(D) { struct Candidate { std::string Path; bool StrictChecking; Candidate(std::string Path, bool StrictChecking = false) : Path(Path), StrictChecking(StrictChecking) {} }; SmallVector<Candidate, 4> Candidates; // In decreasing order so we prefer newer versions to older versions. std::initializer_list<const char *> Versions = {"8.0", "7.5", "7.0"}; auto &FS = D.getVFS(); if (Args.hasArg(clang::driver::options::OPT_cuda_path_EQ)) { Candidates.emplace_back( Args.getLastArgValue(clang::driver::options::OPT_cuda_path_EQ).str()); } else if (HostTriple.isOSWindows()) { for (const char *Ver : Versions) Candidates.emplace_back( D.SysRoot + "/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v" + Ver); } else { if (!Args.hasArg(clang::driver::options::OPT_cuda_path_ignore_env)) { // Try to find ptxas binary. If the executable is located in a directory // called 'bin/', its parent directory might be a good guess for a valid // CUDA installation. // However, some distributions might installs 'ptxas' to /usr/bin. In that // case the candidate would be '/usr' which passes the following checks // because '/usr/include' exists as well. To avoid this case, we always // check for the directory potentially containing files for libdevice, // even if the user passes -nocudalib. if (llvm::ErrorOr<std::string> ptxas = llvm::sys::findProgramByName("ptxas")) { SmallString<256> ptxasAbsolutePath; llvm::sys::fs::real_path(*ptxas, ptxasAbsolutePath); StringRef ptxasDir = llvm::sys::path::parent_path(ptxasAbsolutePath); if (llvm::sys::path::filename(ptxasDir) == "bin") Candidates.emplace_back( std::string(llvm::sys::path::parent_path(ptxasDir)), /*StrictChecking=*/true); } } Candidates.emplace_back(D.SysRoot + "/usr/local/cuda"); for (const char *Ver : Versions) Candidates.emplace_back(D.SysRoot + "/usr/local/cuda-" + Ver); Distro Dist(FS, llvm::Triple(llvm::sys::getProcessTriple())); if (Dist.IsDebian() || Dist.IsUbuntu()) // Special case for Debian to have nvidia-cuda-toolkit work // out of the box. More info on http://bugs.debian.org/882505 Candidates.emplace_back(D.SysRoot + "/usr/lib/cuda"); } bool NoCudaLib = Args.hasArg(options::OPT_nogpulib); for (const auto &Candidate : Candidates) { InstallPath = Candidate.Path; if (InstallPath.empty() || !FS.exists(InstallPath)) continue; BinPath = InstallPath + "/bin"; IncludePath = InstallPath + "/include"; LibDevicePath = InstallPath + "/nvvm/libdevice"; if (!(FS.exists(IncludePath) && FS.exists(BinPath))) continue; bool CheckLibDevice = (!NoCudaLib || Candidate.StrictChecking); if (CheckLibDevice && !FS.exists(LibDevicePath)) continue; // On Linux, we have both lib and lib64 directories, and we need to choose // based on our triple. On MacOS, we have only a lib directory. // // It's sufficient for our purposes to be flexible: If both lib and lib64 // exist, we choose whichever one matches our triple. Otherwise, if only // lib exists, we use it. if (HostTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64")) LibPath = InstallPath + "/lib64"; else if (FS.exists(InstallPath + "/lib")) LibPath = InstallPath + "/lib"; else continue; CudaVersionInfo VersionInfo = {"", CudaVersion::UNKNOWN}; if (auto VersionFile = FS.getBufferForFile(InstallPath + "/version.txt")) VersionInfo = parseCudaVersionFile((*VersionFile)->getBuffer()); // If version file didn't give us the version, try to find it in cuda.h if (VersionInfo.Version == CudaVersion::UNKNOWN) if (auto CudaHFile = FS.getBufferForFile(InstallPath + "/include/cuda.h")) VersionInfo = parseCudaHFile((*CudaHFile)->getBuffer()); // As the last resort, make an educated guess between CUDA-7.0, (which had // no version.txt file and had old-style libdevice bitcode ) and an unknown // recent CUDA version (no version.txt, new style bitcode). if (VersionInfo.Version == CudaVersion::UNKNOWN) { VersionInfo.Version = (FS.exists(LibDevicePath + "/libdevice.10.bc")) ? Version = CudaVersion::LATEST : Version = CudaVersion::CUDA_70; VersionInfo.DetectedVersion = "No version found in version.txt or cuda.h."; } Version = VersionInfo.Version; DetectedVersion = VersionInfo.DetectedVersion; // TODO(tra): remove the warning once we have all features of 10.2 // and 11.0 implemented. DetectedVersionIsNotSupported = Version > CudaVersion::LATEST_SUPPORTED; if (Version >= CudaVersion::CUDA_90) { // CUDA-9+ uses single libdevice file for all GPU variants. std::string FilePath = LibDevicePath + "/libdevice.10.bc"; if (FS.exists(FilePath)) { for (int Arch = (int)CudaArch::SM_30, E = (int)CudaArch::LAST; Arch < E; ++Arch) { CudaArch GpuArch = static_cast<CudaArch>(Arch); if (!IsNVIDIAGpuArch(GpuArch)) continue; std::string GpuArchName(CudaArchToString(GpuArch)); LibDeviceMap[GpuArchName] = FilePath; } } } else { std::error_code EC; for (llvm::vfs::directory_iterator LI = FS.dir_begin(LibDevicePath, EC), LE; !EC && LI != LE; LI = LI.increment(EC)) { StringRef FilePath = LI->path(); StringRef FileName = llvm::sys::path::filename(FilePath); // Process all bitcode filenames that look like // libdevice.compute_XX.YY.bc const StringRef LibDeviceName = "libdevice."; if (!(FileName.startswith(LibDeviceName) && FileName.endswith(".bc"))) continue; StringRef GpuArch = FileName.slice( LibDeviceName.size(), FileName.find('.', LibDeviceName.size())); LibDeviceMap[GpuArch] = FilePath.str(); // Insert map entries for specific devices with this compute // capability. NVCC's choice of the libdevice library version is // rather peculiar and depends on the CUDA version. if (GpuArch == "compute_20") { LibDeviceMap["sm_20"] = std::string(FilePath); LibDeviceMap["sm_21"] = std::string(FilePath); LibDeviceMap["sm_32"] = std::string(FilePath); } else if (GpuArch == "compute_30") { LibDeviceMap["sm_30"] = std::string(FilePath); if (Version < CudaVersion::CUDA_80) { LibDeviceMap["sm_50"] = std::string(FilePath); LibDeviceMap["sm_52"] = std::string(FilePath); LibDeviceMap["sm_53"] = std::string(FilePath); } LibDeviceMap["sm_60"] = std::string(FilePath); LibDeviceMap["sm_61"] = std::string(FilePath); LibDeviceMap["sm_62"] = std::string(FilePath); } else if (GpuArch == "compute_35") { LibDeviceMap["sm_35"] = std::string(FilePath); LibDeviceMap["sm_37"] = std::string(FilePath); } else if (GpuArch == "compute_50") { if (Version >= CudaVersion::CUDA_80) { LibDeviceMap["sm_50"] = std::string(FilePath); LibDeviceMap["sm_52"] = std::string(FilePath); LibDeviceMap["sm_53"] = std::string(FilePath); } } } } // Check that we have found at least one libdevice that we can link in if // -nocudalib hasn't been specified. if (LibDeviceMap.empty() && !NoCudaLib) continue; IsValid = true; break; } } void CudaInstallationDetector::AddCudaIncludeArgs( const ArgList &DriverArgs, ArgStringList &CC1Args) const { if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { // Add cuda_wrappers/* to our system include path. This lets us wrap // standard library headers. SmallString<128> P(D.ResourceDir); llvm::sys::path::append(P, "include"); llvm::sys::path::append(P, "cuda_wrappers"); CC1Args.push_back("-internal-isystem"); CC1Args.push_back(DriverArgs.MakeArgString(P)); } if (DriverArgs.hasArg(options::OPT_nogpuinc)) return; if (!isValid()) { D.Diag(diag::err_drv_no_cuda_installation); return; } CC1Args.push_back("-internal-isystem"); CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath())); CC1Args.push_back("-include"); CC1Args.push_back("__clang_cuda_runtime_wrapper.h"); } void CudaInstallationDetector::CheckCudaVersionSupportsArch( CudaArch Arch) const { if (Arch == CudaArch::UNKNOWN || Version == CudaVersion::UNKNOWN || ArchsWithBadVersion.count(Arch) > 0) return; auto MinVersion = MinVersionForCudaArch(Arch); auto MaxVersion = MaxVersionForCudaArch(Arch); if (Version < MinVersion || Version > MaxVersion) { ArchsWithBadVersion.insert(Arch); D.Diag(diag::err_drv_cuda_version_unsupported) << CudaArchToString(Arch) << CudaVersionToString(MinVersion) << CudaVersionToString(MaxVersion) << InstallPath << CudaVersionToString(Version); } } void CudaInstallationDetector::print(raw_ostream &OS) const { if (isValid()) OS << "Found CUDA installation: " << InstallPath << ", version " << CudaVersionToString(Version) << "\n"; } namespace { /// Debug info level for the NVPTX devices. We may need to emit different debug /// info level for the host and for the device itselfi. This type controls /// emission of the debug info for the devices. It either prohibits disable info /// emission completely, or emits debug directives only, or emits same debug /// info as for the host. enum DeviceDebugInfoLevel { DisableDebugInfo, /// Do not emit debug info for the devices. DebugDirectivesOnly, /// Emit only debug directives. EmitSameDebugInfoAsHost, /// Use the same debug info level just like for the /// host. }; } // anonymous namespace /// Define debug info level for the NVPTX devices. If the debug info for both /// the host and device are disabled (-g0/-ggdb0 or no debug options at all). If /// only debug directives are requested for the both host and device /// (-gline-directvies-only), or the debug info only for the device is disabled /// (optimization is on and --cuda-noopt-device-debug was not specified), the /// debug directves only must be emitted for the device. Otherwise, use the same /// debug info level just like for the host (with the limitations of only /// supported DWARF2 standard). static DeviceDebugInfoLevel mustEmitDebugInfo(const ArgList &Args) { const Arg *A = Args.getLastArg(options::OPT_O_Group); bool IsDebugEnabled = !A || A->getOption().matches(options::OPT_O0) || Args.hasFlag(options::OPT_cuda_noopt_device_debug, options::OPT_no_cuda_noopt_device_debug, /*Default=*/false); if (const Arg *A = Args.getLastArg(options::OPT_g_Group)) { const Option &Opt = A->getOption(); if (Opt.matches(options::OPT_gN_Group)) { if (Opt.matches(options::OPT_g0) || Opt.matches(options::OPT_ggdb0)) return DisableDebugInfo; if (Opt.matches(options::OPT_gline_directives_only)) return DebugDirectivesOnly; } return IsDebugEnabled ? EmitSameDebugInfoAsHost : DebugDirectivesOnly; } return DisableDebugInfo; } void NVPTX::Assembler::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const { const auto &TC = static_cast<const toolchains::CudaToolChain &>(getToolChain()); assert(TC.getTriple().isNVPTX() && "Wrong platform"); StringRef GPUArchName; // If this is an OpenMP action we need to extract the device architecture // from the -march=arch option. This option may come from -Xopenmp-target // flag or the default value. if (JA.isDeviceOffloading(Action::OFK_OpenMP)) { GPUArchName = Args.getLastArgValue(options::OPT_march_EQ); assert(!GPUArchName.empty() && "Must have an architecture passed in."); } else GPUArchName = JA.getOffloadingArch(); // Obtain architecture from the action. CudaArch gpu_arch = StringToCudaArch(GPUArchName); assert(gpu_arch != CudaArch::UNKNOWN && "Device action expected to have an architecture."); // Check that our installation's ptxas supports gpu_arch. if (!Args.hasArg(options::OPT_no_cuda_version_check)) { TC.CudaInstallation.CheckCudaVersionSupportsArch(gpu_arch); } ArgStringList CmdArgs; CmdArgs.push_back(TC.getTriple().isArch64Bit() ? "-m64" : "-m32"); DeviceDebugInfoLevel DIKind = mustEmitDebugInfo(Args); if (DIKind == EmitSameDebugInfoAsHost) { // ptxas does not accept -g option if optimization is enabled, so // we ignore the compiler's -O* options if we want debug info. CmdArgs.push_back("-g"); CmdArgs.push_back("--dont-merge-basicblocks"); CmdArgs.push_back("--return-at-end"); } else if (Arg *A = Args.getLastArg(options::OPT_O_Group)) { // Map the -O we received to -O{0,1,2,3}. // // TODO: Perhaps we should map host -O2 to ptxas -O3. -O3 is ptxas's // default, so it may correspond more closely to the spirit of clang -O2. // -O3 seems like the least-bad option when -Osomething is specified to // clang but it isn't handled below. StringRef OOpt = "3"; if (A->getOption().matches(options::OPT_O4) || A->getOption().matches(options::OPT_Ofast)) OOpt = "3"; else if (A->getOption().matches(options::OPT_O0)) OOpt = "0"; else if (A->getOption().matches(options::OPT_O)) { // -Os, -Oz, and -O(anything else) map to -O2, for lack of better options. OOpt = llvm::StringSwitch<const char *>(A->getValue()) .Case("1", "1") .Case("2", "2") .Case("3", "3") .Case("s", "2") .Case("z", "2") .Default("2"); } CmdArgs.push_back(Args.MakeArgString(llvm::Twine("-O") + OOpt)); } else { // If no -O was passed, pass -O0 to ptxas -- no opt flag should correspond // to no optimizations, but ptxas's default is -O3. CmdArgs.push_back("-O0"); } if (DIKind == DebugDirectivesOnly) CmdArgs.push_back("-lineinfo"); // Pass -v to ptxas if it was passed to the driver. if (Args.hasArg(options::OPT_v)) CmdArgs.push_back("-v"); CmdArgs.push_back("--gpu-name"); CmdArgs.push_back(Args.MakeArgString(CudaArchToString(gpu_arch))); CmdArgs.push_back("--output-file"); CmdArgs.push_back(Args.MakeArgString(TC.getInputFilename(Output))); for (const auto& II : Inputs) CmdArgs.push_back(Args.MakeArgString(II.getFilename())); for (const auto& A : Args.getAllArgValues(options::OPT_Xcuda_ptxas)) CmdArgs.push_back(Args.MakeArgString(A)); bool Relocatable = false; if (JA.isOffloading(Action::OFK_OpenMP)) // In OpenMP we need to generate relocatable code. Relocatable = Args.hasFlag(options::OPT_fopenmp_relocatable_target, options::OPT_fnoopenmp_relocatable_target, /*Default=*/true); else if (JA.isOffloading(Action::OFK_Cuda)) Relocatable = Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, /*Default=*/false); if (Relocatable) CmdArgs.push_back("-c"); const char *Exec; if (Arg *A = Args.getLastArg(options::OPT_ptxas_path_EQ)) Exec = A->getValue(); else Exec = Args.MakeArgString(TC.GetProgramPath("ptxas")); C.addCommand(std::make_unique<Command>( JA, *this, ResponseFileSupport{ResponseFileSupport::RF_Full, llvm::sys::WEM_UTF8, "--options-file"}, Exec, CmdArgs, Inputs)); } static bool shouldIncludePTX(const ArgList &Args, const char *gpu_arch) { bool includePTX = true; for (Arg *A : Args) { if (!(A->getOption().matches(options::OPT_cuda_include_ptx_EQ) || A->getOption().matches(options::OPT_no_cuda_include_ptx_EQ))) continue; A->claim(); const StringRef ArchStr = A->getValue(); if (ArchStr == "all" || ArchStr == gpu_arch) { includePTX = A->getOption().matches(options::OPT_cuda_include_ptx_EQ); continue; } } return includePTX; } // All inputs to this linker must be from CudaDeviceActions, as we need to look // at the Inputs' Actions in order to figure out which GPU architecture they // correspond to. void NVPTX::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const { const auto &TC = static_cast<const toolchains::CudaToolChain &>(getToolChain()); assert(TC.getTriple().isNVPTX() && "Wrong platform"); ArgStringList CmdArgs; if (TC.CudaInstallation.version() <= CudaVersion::CUDA_100) CmdArgs.push_back("--cuda"); CmdArgs.push_back(TC.getTriple().isArch64Bit() ? "-64" : "-32"); CmdArgs.push_back(Args.MakeArgString("--create")); CmdArgs.push_back(Args.MakeArgString(Output.getFilename())); if (mustEmitDebugInfo(Args) == EmitSameDebugInfoAsHost) CmdArgs.push_back("-g"); for (const auto& II : Inputs) { auto *A = II.getAction(); assert(A->getInputs().size() == 1 && "Device offload action is expected to have a single input"); const char *gpu_arch_str = A->getOffloadingArch(); assert(gpu_arch_str && "Device action expected to have associated a GPU architecture!"); CudaArch gpu_arch = StringToCudaArch(gpu_arch_str); if (II.getType() == types::TY_PP_Asm && !shouldIncludePTX(Args, gpu_arch_str)) continue; // We need to pass an Arch of the form "sm_XX" for cubin files and // "compute_XX" for ptx. const char *Arch = (II.getType() == types::TY_PP_Asm) ? CudaArchToVirtualArchString(gpu_arch) : gpu_arch_str; CmdArgs.push_back(Args.MakeArgString(llvm::Twine("--image=profile=") + Arch + ",file=" + II.getFilename())); } for (const auto& A : Args.getAllArgValues(options::OPT_Xcuda_fatbinary)) CmdArgs.push_back(Args.MakeArgString(A)); const char *Exec = Args.MakeArgString(TC.GetProgramPath("fatbinary")); C.addCommand(std::make_unique<Command>( JA, *this, ResponseFileSupport{ResponseFileSupport::RF_Full, llvm::sys::WEM_UTF8, "--options-file"}, Exec, CmdArgs, Inputs)); } void NVPTX::OpenMPLinker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const { const auto &TC = static_cast<const toolchains::CudaToolChain &>(getToolChain()); assert(TC.getTriple().isNVPTX() && "Wrong platform"); ArgStringList CmdArgs; // OpenMP uses nvlink to link cubin files. The result will be embedded in the // host binary by the host linker. assert(!JA.isHostOffloading(Action::OFK_OpenMP) && "CUDA toolchain not expected for an OpenMP host device."); if (Output.isFilename()) { CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); } else assert(Output.isNothing() && "Invalid output."); if (mustEmitDebugInfo(Args) == EmitSameDebugInfoAsHost) CmdArgs.push_back("-g"); if (Args.hasArg(options::OPT_v)) CmdArgs.push_back("-v"); StringRef GPUArch = Args.getLastArgValue(options::OPT_march_EQ); assert(!GPUArch.empty() && "At least one GPU Arch required for ptxas."); CmdArgs.push_back("-arch"); CmdArgs.push_back(Args.MakeArgString(GPUArch)); // Assume that the directory specified with --libomptarget_nvptx_path // contains the static library libomptarget-nvptx.a. if (const Arg *A = Args.getLastArg(options::OPT_libomptarget_nvptx_path_EQ)) CmdArgs.push_back(Args.MakeArgString(Twine("-L") + A->getValue())); // Add paths specified in LIBRARY_PATH environment variable as -L options. addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH"); // Add paths for the default clang library path. SmallString<256> DefaultLibPath = llvm::sys::path::parent_path(TC.getDriver().Dir); llvm::sys::path::append(DefaultLibPath, "lib" CLANG_LIBDIR_SUFFIX); CmdArgs.push_back(Args.MakeArgString(Twine("-L") + DefaultLibPath)); // Add linking against library implementing OpenMP calls on NVPTX target. CmdArgs.push_back("-lomptarget-nvptx"); for (const auto &II : Inputs) { if (II.getType() == types::TY_LLVM_IR || II.getType() == types::TY_LTO_IR || II.getType() == types::TY_LTO_BC || II.getType() == types::TY_LLVM_BC) { C.getDriver().Diag(diag::err_drv_no_linker_llvm_support) << getToolChain().getTripleString(); continue; } // Currently, we only pass the input files to the linker, we do not pass // any libraries that may be valid only for the host. if (!II.isFilename()) continue; const char *CubinF = C.addTempFile( C.getArgs().MakeArgString(getToolChain().getInputFilename(II))); CmdArgs.push_back(CubinF); } const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("nvlink")); C.addCommand(std::make_unique<Command>( JA, *this, ResponseFileSupport{ResponseFileSupport::RF_Full, llvm::sys::WEM_UTF8, "--options-file"}, Exec, CmdArgs, Inputs)); } /// CUDA toolchain. Our assembler is ptxas, and our "linker" is fatbinary, /// which isn't properly a linker but nonetheless performs the step of stitching /// together object files from the assembler into a single blob. CudaToolChain::CudaToolChain(const Driver &D, const llvm::Triple &Triple, const ToolChain &HostTC, const ArgList &Args, const Action::OffloadKind OK) : ToolChain(D, Triple, Args), HostTC(HostTC), CudaInstallation(D, HostTC.getTriple(), Args), OK(OK) { if (CudaInstallation.isValid()) { CudaInstallation.WarnIfUnsupportedVersion(); getProgramPaths().push_back(std::string(CudaInstallation.getBinPath())); } // Lookup binaries into the driver directory, this is used to // discover the clang-offload-bundler executable. getProgramPaths().push_back(getDriver().Dir); } std::string CudaToolChain::getInputFilename(const InputInfo &Input) const { // Only object files are changed, for example assembly files keep their .s // extensions. CUDA also continues to use .o as they don't use nvlink but // fatbinary. if (!(OK == Action::OFK_OpenMP && Input.getType() == types::TY_Object)) return ToolChain::getInputFilename(Input); // Replace extension for object files with cubin because nvlink relies on // these particular file names. SmallString<256> Filename(ToolChain::getInputFilename(Input)); llvm::sys::path::replace_extension(Filename, "cubin"); return std::string(Filename.str()); } void CudaToolChain::addClangTargetOptions( const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, Action::OffloadKind DeviceOffloadingKind) const { HostTC.addClangTargetOptions(DriverArgs, CC1Args, DeviceOffloadingKind); StringRef GpuArch = DriverArgs.getLastArgValue(options::OPT_march_EQ); assert(!GpuArch.empty() && "Must have an explicit GPU arch."); assert((DeviceOffloadingKind == Action::OFK_OpenMP || DeviceOffloadingKind == Action::OFK_Cuda) && "Only OpenMP or CUDA offloading kinds are supported for NVIDIA GPUs."); if (DeviceOffloadingKind == Action::OFK_Cuda) { CC1Args.push_back("-fcuda-is-device"); if (DriverArgs.hasFlag(options::OPT_fcuda_approx_transcendentals, options::OPT_fno_cuda_approx_transcendentals, false)) CC1Args.push_back("-fcuda-approx-transcendentals"); if (DriverArgs.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false)) CC1Args.push_back("-fgpu-rdc"); } if (DriverArgs.hasArg(options::OPT_nogpulib)) return; std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch); if (LibDeviceFile.empty()) { if (DeviceOffloadingKind == Action::OFK_OpenMP && DriverArgs.hasArg(options::OPT_S)) return; getDriver().Diag(diag::err_drv_no_cuda_libdevice) << GpuArch; return; } CC1Args.push_back("-mlink-builtin-bitcode"); CC1Args.push_back(DriverArgs.MakeArgString(LibDeviceFile)); // New CUDA versions often introduce new instructions that are only supported // by new PTX version, so we need to raise PTX level to enable them in NVPTX // back-end. const char *PtxFeature = nullptr; switch (CudaInstallation.version()) { case CudaVersion::CUDA_110: PtxFeature = "+ptx70"; break; case CudaVersion::CUDA_102: PtxFeature = "+ptx65"; break; case CudaVersion::CUDA_101: PtxFeature = "+ptx64"; break; case CudaVersion::CUDA_100: PtxFeature = "+ptx63"; break; case CudaVersion::CUDA_92: PtxFeature = "+ptx61"; break; case CudaVersion::CUDA_91: PtxFeature = "+ptx61"; break; case CudaVersion::CUDA_90: PtxFeature = "+ptx60"; break; default: PtxFeature = "+ptx42"; } CC1Args.append({"-target-feature", PtxFeature}); if (DriverArgs.hasFlag(options::OPT_fcuda_short_ptr, options::OPT_fno_cuda_short_ptr, false)) CC1Args.append({"-mllvm", "--nvptx-short-ptr"}); if (CudaInstallation.version() >= CudaVersion::UNKNOWN) CC1Args.push_back(DriverArgs.MakeArgString( Twine("-target-sdk-version=") + CudaVersionToString(CudaInstallation.version()))); if (DeviceOffloadingKind == Action::OFK_OpenMP) { SmallVector<StringRef, 8> LibraryPaths; if (const Arg *A = DriverArgs.getLastArg(options::OPT_libomptarget_nvptx_path_EQ)) LibraryPaths.push_back(A->getValue()); // Add user defined library paths from LIBRARY_PATH. llvm::Optional<std::string> LibPath = llvm::sys::Process::GetEnv("LIBRARY_PATH"); if (LibPath) { SmallVector<StringRef, 8> Frags; const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator, '\0'}; llvm::SplitString(*LibPath, Frags, EnvPathSeparatorStr); for (StringRef Path : Frags) LibraryPaths.emplace_back(Path.trim()); } // Add path to lib / lib64 folder. SmallString<256> DefaultLibPath = llvm::sys::path::parent_path(getDriver().Dir); llvm::sys::path::append(DefaultLibPath, Twine("lib") + CLANG_LIBDIR_SUFFIX); LibraryPaths.emplace_back(DefaultLibPath.c_str()); std::string LibOmpTargetName = "libomptarget-nvptx-" + GpuArch.str() + ".bc"; bool FoundBCLibrary = false; for (StringRef LibraryPath : LibraryPaths) { SmallString<128> LibOmpTargetFile(LibraryPath); llvm::sys::path::append(LibOmpTargetFile, LibOmpTargetName); if (llvm::sys::fs::exists(LibOmpTargetFile)) { CC1Args.push_back("-mlink-builtin-bitcode"); CC1Args.push_back(DriverArgs.MakeArgString(LibOmpTargetFile)); FoundBCLibrary = true; break; } } if (!FoundBCLibrary) getDriver().Diag(diag::warn_drv_omp_offload_target_missingbcruntime) << LibOmpTargetName; } } llvm::DenormalMode CudaToolChain::getDefaultDenormalModeForType( const llvm::opt::ArgList &DriverArgs, const JobAction &JA, const llvm::fltSemantics *FPType) const { if (JA.getOffloadingDeviceKind() == Action::OFK_Cuda) { if (FPType && FPType == &llvm::APFloat::IEEEsingle() && DriverArgs.hasFlag(options::OPT_fcuda_flush_denormals_to_zero, options::OPT_fno_cuda_flush_denormals_to_zero, false)) return llvm::DenormalMode::getPreserveSign(); } assert(JA.getOffloadingDeviceKind() != Action::OFK_Host); return llvm::DenormalMode::getIEEE(); } bool CudaToolChain::supportsDebugInfoOption(const llvm::opt::Arg *A) const { const Option &O = A->getOption(); return (O.matches(options::OPT_gN_Group) && !O.matches(options::OPT_gmodules)) || O.matches(options::OPT_g_Flag) || O.matches(options::OPT_ggdbN_Group) || O.matches(options::OPT_ggdb) || O.matches(options::OPT_gdwarf) || O.matches(options::OPT_gdwarf_2) || O.matches(options::OPT_gdwarf_3) || O.matches(options::OPT_gdwarf_4) || O.matches(options::OPT_gdwarf_5) || O.matches(options::OPT_gcolumn_info); } void CudaToolChain::adjustDebugInfoKind( codegenoptions::DebugInfoKind &DebugInfoKind, const ArgList &Args) const { switch (mustEmitDebugInfo(Args)) { case DisableDebugInfo: DebugInfoKind = codegenoptions::NoDebugInfo; break; case DebugDirectivesOnly: DebugInfoKind = codegenoptions::DebugDirectivesOnly; break; case EmitSameDebugInfoAsHost: // Use same debug info level as the host. break; } } void CudaToolChain::AddCudaIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const { // Check our CUDA version if we're going to include the CUDA headers. if (!DriverArgs.hasArg(options::OPT_nogpuinc) && !DriverArgs.hasArg(options::OPT_no_cuda_version_check)) { StringRef Arch = DriverArgs.getLastArgValue(options::OPT_march_EQ); assert(!Arch.empty() && "Must have an explicit GPU arch."); CudaInstallation.CheckCudaVersionSupportsArch(StringToCudaArch(Arch)); } CudaInstallation.AddCudaIncludeArgs(DriverArgs, CC1Args); } llvm::opt::DerivedArgList * CudaToolChain::TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch, Action::OffloadKind DeviceOffloadKind) const { DerivedArgList *DAL = HostTC.TranslateArgs(Args, BoundArch, DeviceOffloadKind); if (!DAL) DAL = new DerivedArgList(Args.getBaseArgs()); const OptTable &Opts = getDriver().getOpts(); // For OpenMP device offloading, append derived arguments. Make sure // flags are not duplicated. // Also append the compute capability. if (DeviceOffloadKind == Action::OFK_OpenMP) { for (Arg *A : Args) { bool IsDuplicate = false; for (Arg *DALArg : *DAL) { if (A == DALArg) { IsDuplicate = true; break; } } if (!IsDuplicate) DAL->append(A); } StringRef Arch = DAL->getLastArgValue(options::OPT_march_EQ); if (Arch.empty()) DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_march_EQ), CLANG_OPENMP_NVPTX_DEFAULT_ARCH); return DAL; } for (Arg *A : Args) { DAL->append(A); } if (!BoundArch.empty()) { DAL->eraseArg(options::OPT_march_EQ); DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_march_EQ), BoundArch); } return DAL; } Tool *CudaToolChain::buildAssembler() const { return new tools::NVPTX::Assembler(*this); } Tool *CudaToolChain::buildLinker() const { if (OK == Action::OFK_OpenMP) return new tools::NVPTX::OpenMPLinker(*this); return new tools::NVPTX::Linker(*this); } void CudaToolChain::addClangWarningOptions(ArgStringList &CC1Args) const { HostTC.addClangWarningOptions(CC1Args); } ToolChain::CXXStdlibType CudaToolChain::GetCXXStdlibType(const ArgList &Args) const { return HostTC.GetCXXStdlibType(Args); } void CudaToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const { HostTC.AddClangSystemIncludeArgs(DriverArgs, CC1Args); } void CudaToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &Args, ArgStringList &CC1Args) const { HostTC.AddClangCXXStdlibIncludeArgs(Args, CC1Args); } void CudaToolChain::AddIAMCUIncludeArgs(const ArgList &Args, ArgStringList &CC1Args) const { HostTC.AddIAMCUIncludeArgs(Args, CC1Args); } SanitizerMask CudaToolChain::getSupportedSanitizers() const { // The CudaToolChain only supports sanitizers in the sense that it allows // sanitizer arguments on the command line if they are supported by the host // toolchain. The CudaToolChain will actually ignore any command line // arguments for any of these "supported" sanitizers. That means that no // sanitization of device code is actually supported at this time. // // This behavior is necessary because the host and device toolchains // invocations often share the command line, so the device toolchain must // tolerate flags meant only for the host toolchain. return HostTC.getSupportedSanitizers(); } VersionTuple CudaToolChain::computeMSVCVersion(const Driver *D, const ArgList &Args) const { return HostTC.computeMSVCVersion(D, Args); }
; A041930: Numerators of continued fraction convergents to sqrt(488). ; Submitted by Jon Maiga ; 22,243,10714,118097,5206982,57394899,2530582538,27893802817,1229857906486,13556330774163,597708411969658,6588348862440401,290485058359347302,3201923990815260723,141175140654230819114,1556128471187354270977,68610827872897818742102,756275235073063360434099,33344721171087685677842458,367548208117037605816701137,16205465878320742341612692486,178627672869645203363556318483,7875823072142709690338090705738,86812681466439451797082554081601,3827633807595478588761970470296182 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 mov $3,$1 mov $1,$2 dif $2,4 mul $2,22 add $3,$2 lpe mov $0,$3
; A133101: Expansion of f(x^2, x^3) in powers of x where f(, ) is Ramanujan's general theta function. ; 1,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,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,1,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,1,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,1,0,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,1,0,0,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,1,0,0,0,0 mul $0,5 mov $1,1 mov $2,2 lpb $0,1 add $0,3 add $2,1 trn $0,$2 mov $1,$0 sub $0,1 lpe
; A024038: a(n) = 4^n - n^2. ; 1,3,12,55,240,999,4060,16335,65472,262063,1048476,4194183,16777072,67108695,268435260,1073741599,4294967040,17179868895,68719476412,274877906583,1099511627376,4398046510663,17592186043932,70368744177135,281474976710080,1125899906841999,4503599627369820,18014398509481255,72057594037927152,288230376151710903,1152921504606846076,4611686018427386943,18446744073709550592,73786976294838205375,295147905179352824700,1180591620717411302199,4722366482869645212400,18889465931478580853415 mov $1,4 pow $1,$0 mov $2,$0 mul $2,$0 sub $1,$2 mov $0,$1
; Elemental types NORMAL EQU $00 FIGHTING EQU $01 FLYING EQU $02 POISON EQU $03 GROUND EQU $04 ROCK EQU $05 BUG EQU $07 GHOST EQU $08 FIRE EQU $14 WATER EQU $15 GRASS EQU $16 ELECTRIC EQU $17 PSYCHIC EQU $18 ICE EQU $19 DRAGON EQU $1A
;=============================================================================== ; Copyright 2014-2018 Intel Corporation ; All Rights Reserved. ; ; If this software was obtained under the Intel Simplified Software License, ; the following terms apply: ; ; The source code, information and material ("Material") contained herein is ; owned by Intel Corporation or its suppliers or licensors, and title to such ; Material remains with Intel Corporation or its suppliers or licensors. The ; Material contains proprietary information of Intel or its suppliers and ; licensors. The Material is protected by worldwide copyright laws and treaty ; provisions. No part of the Material may be used, copied, reproduced, ; modified, published, uploaded, posted, transmitted, distributed or disclosed ; in any way without Intel's prior express written permission. No license under ; any patent, copyright or other intellectual property rights in the Material ; is granted to or conferred upon you, either expressly, by implication, ; inducement, estoppel or otherwise. Any license under such intellectual ; property rights must be express and approved by Intel in writing. ; ; Unless otherwise agreed by Intel in writing, you may not remove or alter this ; notice or any other notice embedded in Materials by Intel or Intel's ; suppliers or licensors in any way. ; ; ; If this software was obtained under the Apache License, Version 2.0 (the ; "License"), the following terms apply: ; ; 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. ;=============================================================================== ; ; ; Purpose: Cryptography Primitive. ; Message block processing according to SHA512 ; ; Content: ; UpdateSHA512 ; ; .686P .XMM .MODEL FLAT,C INCLUDE asmdefs.inc INCLUDE ia_emm.inc INCLUDE pcpvariant.inc IF (_ENABLE_ALG_SHA512_) IF (_IPP GE _IPP_G9) IFDEF IPP_PIC LD_ADDR MACRO reg:REQ, addr:REQ LOCAL LABEL call LABEL LABEL: pop reg sub reg, LABEL-addr ENDM ELSE LD_ADDR MACRO reg:REQ, addr:REQ lea reg, addr ENDM ENDIF ;; ;; ENDIANNESS ;; ENDIANNESS MACRO xmm:REQ, masks:REQ vpshufb xmm, xmm, masks ENDM ;; ;; Rotate Right ;; PRORQ MACRO mm:REQ, nbits:REQ, tmp:REQ vpsllq tmp, mm, (64-nbits) vpsrlq mm, mm, nbits vpor mm, mm,tmp ENDM ;; ;; Init and Update W: ;; ;; j = 0-15 ;; W[j] = ENDIANNESS(src) ;; ;; j = 16-79 ;; W[j] = SIGMA1(W[j- 2]) + W[j- 7] ;; +SIGMA0(W[j-15]) + W[j-16] ;; ;; SIGMA0(x) = ROR64(x,1) ^ROR64(x,8) ^LSR64(x,7) ;; SIGMA1(x) = ROR64(x,19)^ROR64(x,61)^LSR64(x,6) ;; SIGMA0 MACRO sigma:REQ, x:REQ, t1:REQ,t2:REQ vpsrlq sigma, x, 7 vmovdqa t1, x PRORQ x, 1, t2 vpxor sigma, sigma, x PRORQ t1,8, t2 vpxor sigma, sigma, t1 ENDM SIGMA1 MACRO sigma:REQ, x:REQ, t1:REQ,t2:REQ vpsrlq sigma, x, 6 vmovdqa t1, x PRORQ x, 19, t2 vpxor sigma, sigma, x PRORQ t1,61, t2 vpxor sigma, sigma, t1 ENDM ;; ;; SHA512 step ;; ;; Ipp64u T1 = H + SUM1(E) + CHJ(E,F,G) + K_SHA512[t] + W[t]; ;; Ipp64u T2 = SUM0(A) + MAJ(A,B,C); ;; D+= T1; ;; H = T1 + T2; ;; ;; where ;; SUM1(x) = ROR64(x,14) ^ ROR64(x,18) ^ ROR64(x,41) ;; SUM0(x) = ROR64(x,28) ^ ROR64(x,34) ^ ROR64(x,39) ;; ;; CHJ(x,y,z) = (x & y) ^ (~x & z) => x&(y^z) ^z ;; MAJ(x,y,z) = (x & y) ^ (x & z) ^ (y & z) = (x&y)^((x^y)&z) ;; ;; Input: ;; A,B,C,D,E,F,G,H - 8 digest's values ;; pW - pointer to the W array ;; pK512 - pointer to the constants ;; pBuffer - temporary buffer ;; Output: ;; A,B,C,D*,E,F,G,H* - 8 digest's values (D and H updated) ;; pW - pointer to the W array ;; pK512 - pointer to the constants ;; pBuffer - temporary buffer (changed) ;; CHJ MACRO R,E,F,G, T vpxor R, F,G ; R=(f^g) vpand R, R,E ; R=e & (f^g) vpxor R, R,G ; R=e & (f^g) ^g ENDM MAJ MACRO R,A,B,C, T vpxor T, A,B ; T=a^b vpand R, A,B ; R=a&b vpand T, T,C ; T=(a^b)&c vpxor R, R,T ; R=(a&b)^((a^b)&c) ENDM SUM0 MACRO R,X,tmp vmovdqa R,X PRORQ R,28,tmp ; R=ROR(X,28) PRORQ X,34,tmp ; X=ROR(X,34) vpxor R, R,X PRORQ X,(39-34),tmp ; X=ROR(x,39) vpxor R, R,X ENDM SUM1 MACRO R,X,tmp vmovdqa R,X PRORQ R,14,tmp ; R=ROR(X,14) PRORQ X,18,tmp ; X=ROR(X,18) vpxor R, R,X PRORQ X,(41-18),tmp ; X=ROR(x,41) vpxor R, R,X ENDM SHA512_STEP MACRO A,B,C,D,E,F,G,H, pW,pK512, pBuffer vmovdqa oword ptr[pBuffer+0*sizeof(oword)],E ; save E vmovdqa oword ptr[pBuffer+1*sizeof(oword)],A ; save A vmovdqa oword ptr[pBuffer+2*sizeof(oword)],D ; save D vmovdqa oword ptr[pBuffer+3*sizeof(oword)],H ; save H CHJ D,E,F,G, H ; t1 = h+CHJ(e,f,g)+pW[]+pK512[] vmovq H, qword ptr[pW] vpaddq D, D,H ; +[pW] vmovq H, qword ptr[pK512] vpaddq D, D,H ; +[pK512] vpaddq D, D,oword ptr[pBuffer+3*sizeof(oword)] vmovdqa oword ptr[pBuffer+3*sizeof(oword)],D ; save t1 MAJ H,A,B,C, D ; t2 = MAJ(a,b,c) vmovdqa oword ptr[pBuffer+4*sizeof(oword)],H ; save t2 SUM1 D,E,H ; D = SUM1(e) vpaddq D, D,oword ptr[pBuffer+3*sizeof(oword)]; t1 = h+CHJ(e,f,g)+pW[]+pK512[] + SUM1(e) SUM0 H,A,E ; H = SUM0(a) vpaddq H, H,oword ptr[pBuffer+4*sizeof(oword)]; t2 = MAJ(a,b,c)+SUM0(a) vpaddq H, H,D ; h = t1+t2 vpaddq D, D,oword ptr[pBuffer+2*sizeof(oword)]; d+= t1 vmovdqa E,oword ptr[pBuffer+0*sizeof(oword)] ; restore E vmovdqa A,oword ptr[pBuffer+1*sizeof(oword)] ; restore A ENDM IPPCODE SEGMENT 'CODE' ALIGN (IPP_ALIGN_FACTOR) IF _IPP GE _IPP_V8 ALIGN IPP_ALIGN_FACTOR SWP_BYTE: pByteSwp DB 7,6,5,4,3,2,1,0, 15,14,13,12,11,10,9,8 ENDIF ;******************************************************************************************* ;* Purpose: Update internal digest according to message block ;* ;* void UpdateSHA512(DigestSHA512 digest, const Ipp64u* mblk, int mlen, const void* pParam) ;* ;******************************************************************************************* ;; ;; Lib = W7, V8, P8 ;; ;; Caller = ippsSHA512Update ;; Caller = ippsSHA512Final ;; Caller = ippsSHA512MessageDigest ;; ;; Caller = ippsSHA384Update ;; Caller = ippsSHA384Final ;; Caller = ippsSHA384MessageDigest ;; ;; Caller = ippsHMACSHA512Update ;; Caller = ippsHMACSHA512Final ;; Caller = ippsHMACSHA512MessageDigest ;; ;; Caller = ippsHMACSHA384Update ;; Caller = ippsHMACSHA384Final ;; Caller = ippsHMACSHA384MessageDigest ;; ALIGN IPP_ALIGN_FACTOR IPPASM UpdateSHA512 PROC NEAR C PUBLIC \ USES esi edi,\ digest: PTR QWORD,\ ; digest address mblk: PTR BYTE,\ ; buffer address mlen: DWORD,\ ; buffer length pSHA512: PTR QWORD ; address of SHA constants MBS_SHA512 equ (128) ; SHA512 block data size sSize = 5 ; size of save area (oword) dSize = 8 ; size of digest (oword) wSize = 80 ; W values queue (qword) stackSize = (sSize*sizeof(oword)+dSize*sizeof(oword)+wSize*sizeof(qword)+sizeof(dword)) ; stack size (bytes) sOffset = 0 ; save area dOffset = sOffset+sSize*sizeof(oword) ; digest offset wOffset = dOffset+dSize*sizeof(oword) ; W values offset acualOffset = wOffset+wSize*sizeof(qword) ; actual stack size offset mov edi,digest ; digest address mov esi,mblk ; source data address mov eax,mlen ; source data length mov edx, pSHA512 ; table constant address sub esp,stackSize ; allocate local buffer (probably unaligned) mov ecx,esp and esp,-16 ; 16-byte aligned stack sub ecx,esp add ecx,stackSize ; acual stack size (bytes) mov [esp+acualOffset],ecx vmovq xmm0,qword ptr[edi+sizeof(qword)*0] ; A = digest[0] vmovq xmm1,qword ptr[edi+sizeof(qword)*1] ; B = digest[1] vmovq xmm2,qword ptr[edi+sizeof(qword)*2] ; C = digest[2] vmovq xmm3,qword ptr[edi+sizeof(qword)*3] ; D = digest[3] vmovq xmm4,qword ptr[edi+sizeof(qword)*4] ; E = digest[4] vmovq xmm5,qword ptr[edi+sizeof(qword)*5] ; F = digest[5] vmovq xmm6,qword ptr[edi+sizeof(qword)*6] ; G = digest[6] vmovq xmm7,qword ptr[edi+sizeof(qword)*7] ; H = digest[7] vmovdqa oword ptr[esp+dOffset+sizeof(oword)*0], xmm0 vmovdqa oword ptr[esp+dOffset+sizeof(oword)*1], xmm1 vmovdqa oword ptr[esp+dOffset+sizeof(oword)*2], xmm2 vmovdqa oword ptr[esp+dOffset+sizeof(oword)*3], xmm3 vmovdqa oword ptr[esp+dOffset+sizeof(oword)*4], xmm4 vmovdqa oword ptr[esp+dOffset+sizeof(oword)*5], xmm5 vmovdqa oword ptr[esp+dOffset+sizeof(oword)*6], xmm6 vmovdqa oword ptr[esp+dOffset+sizeof(oword)*7], xmm7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process next data block ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; sha512_block_loop: ;; ;; initialize the first 16 qwords in the array W (remember about endian) ;; ;vmovdqa xmm1, oword ptr pByteSwp ; load shuffle mask LD_ADDR ecx, SWP_BYTE movdqa xmm1, oword ptr[ecx+(pByteSwp-SWP_BYTE)] mov ecx,0 ALIGN IPP_ALIGN_FACTOR loop1: vmovdqu xmm0, oword ptr [esi+ecx*sizeof(qword)] ; swap input ENDIANNESS xmm0, xmm1 vmovdqa oword ptr[esp+wOffset+ecx*sizeof(qword)],xmm0 add ecx,sizeof(oword)/sizeof(qword) cmp ecx,16 jl loop1 ;; ;; initialize another 80-16 qwords in the array W ;; ALIGN IPP_ALIGN_FACTOR loop2: vmovdqa xmm1,oword ptr[esp+ecx*sizeof(qword)+wOffset- 2*sizeof(qword)] ; xmm1 = W[j-2] SIGMA1 xmm0,xmm1,xmm2,xmm3 vmovdqu xmm5,oword ptr[esp+ecx*sizeof(qword)+wOffset-15*sizeof(qword)] ; xmm5 = W[j-15] SIGMA0 xmm4,xmm5,xmm6,xmm3 vmovdqu xmm7,oword ptr[esp+ecx*sizeof(qword)+wOffset- 7*sizeof(qword)] ; W[j-7] vpaddq xmm0, xmm0,xmm4 vpaddq xmm7, xmm7,oword ptr[esp+ecx*sizeof(qword)+wOffset-16*sizeof(qword)] ; W[j-16] vpaddq xmm0, xmm0,xmm7 vmovdqa oword ptr[esp+ecx*sizeof(qword)+wOffset],xmm0 add ecx,sizeof(oword)/sizeof(qword) cmp ecx,80 jl loop2 ;; ;; init A,B,C,D,E,F,G,H by the internal digest ;; vmovdqa xmm0,oword ptr[esp+dOffset+sizeof(oword)*0] ; A = digest[0] vmovdqa xmm1,oword ptr[esp+dOffset+sizeof(oword)*1] ; B = digest[1] vmovdqa xmm2,oword ptr[esp+dOffset+sizeof(oword)*2] ; C = digest[2] vmovdqa xmm3,oword ptr[esp+dOffset+sizeof(oword)*3] ; D = digest[3] vmovdqa xmm4,oword ptr[esp+dOffset+sizeof(oword)*4] ; E = digest[4] vmovdqa xmm5,oword ptr[esp+dOffset+sizeof(oword)*5] ; F = digest[5] vmovdqa xmm6,oword ptr[esp+dOffset+sizeof(oword)*6] ; G = digest[6] vmovdqa xmm7,oword ptr[esp+dOffset+sizeof(oword)*7] ; H = digest[7] ;; ;; perform 0-79 steps ;; xor ecx,ecx ALIGN IPP_ALIGN_FACTOR loop3: ;; A, B, C, D, E, F, G, H W[], K[], buffer ;; -------------------------------------------------------------------------------------------------------------------------------------- SHA512_STEP xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*0>,<edx+ecx*sizeof(qword)+sizeof(qword)*0>, <esp> SHA512_STEP xmm7,xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*1>,<edx+ecx*sizeof(qword)+sizeof(qword)*1>, <esp> SHA512_STEP xmm6,xmm7,xmm0,xmm1,xmm2,xmm3,xmm4,xmm5, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*2>,<edx+ecx*sizeof(qword)+sizeof(qword)*2>, <esp> SHA512_STEP xmm5,xmm6,xmm7,xmm0,xmm1,xmm2,xmm3,xmm4, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*3>,<edx+ecx*sizeof(qword)+sizeof(qword)*3>, <esp> SHA512_STEP xmm4,xmm5,xmm6,xmm7,xmm0,xmm1,xmm2,xmm3, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*4>,<edx+ecx*sizeof(qword)+sizeof(qword)*4>, <esp> SHA512_STEP xmm3,xmm4,xmm5,xmm6,xmm7,xmm0,xmm1,xmm2, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*5>,<edx+ecx*sizeof(qword)+sizeof(qword)*5>, <esp> SHA512_STEP xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm0,xmm1, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*6>,<edx+ecx*sizeof(qword)+sizeof(qword)*6>, <esp> SHA512_STEP xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm0, <esp+ecx*sizeof(qword)+wOffset+sizeof(qword)*7>,<edx+ecx*sizeof(qword)+sizeof(qword)*7>, <esp> add ecx,8 cmp ecx,80 jl loop3 ;; ;; update digest ;; vpaddq xmm0, xmm0,oword ptr[esp+dOffset+sizeof(oword)*0] ; A += digest[0] vpaddq xmm1, xmm1,oword ptr[esp+dOffset+sizeof(oword)*1] ; B += digest[1] vpaddq xmm2, xmm2,oword ptr[esp+dOffset+sizeof(oword)*2] ; C += digest[2] vpaddq xmm3, xmm3,oword ptr[esp+dOffset+sizeof(oword)*3] ; D += digest[3] vpaddq xmm4, xmm4,oword ptr[esp+dOffset+sizeof(oword)*4] ; E += digest[4] vpaddq xmm5, xmm5,oword ptr[esp+dOffset+sizeof(oword)*5] ; F += digest[5] vpaddq xmm6, xmm6,oword ptr[esp+dOffset+sizeof(oword)*6] ; G += digest[6] vpaddq xmm7, xmm7,oword ptr[esp+dOffset+sizeof(oword)*7] ; H += digest[7] vmovdqa oword ptr[esp+dOffset+sizeof(oword)*0],xmm0 ; digest[0] = A vmovdqa oword ptr[esp+dOffset+sizeof(oword)*1],xmm1 ; digest[1] = B vmovdqa oword ptr[esp+dOffset+sizeof(oword)*2],xmm2 ; digest[2] = C vmovdqa oword ptr[esp+dOffset+sizeof(oword)*3],xmm3 ; digest[3] = D vmovdqa oword ptr[esp+dOffset+sizeof(oword)*4],xmm4 ; digest[4] = E vmovdqa oword ptr[esp+dOffset+sizeof(oword)*5],xmm5 ; digest[5] = F vmovdqa oword ptr[esp+dOffset+sizeof(oword)*6],xmm6 ; digest[6] = G vmovdqa oword ptr[esp+dOffset+sizeof(oword)*7],xmm7 ; digest[7] = H add esi, MBS_SHA512 sub eax, MBS_SHA512 jg sha512_block_loop vmovq qword ptr[edi+sizeof(qword)*0], xmm0 ; A = digest[0] vmovq qword ptr[edi+sizeof(qword)*1], xmm1 ; B = digest[1] vmovq qword ptr[edi+sizeof(qword)*2], xmm2 ; C = digest[2] vmovq qword ptr[edi+sizeof(qword)*3], xmm3 ; D = digest[3] vmovq qword ptr[edi+sizeof(qword)*4], xmm4 ; E = digest[4] vmovq qword ptr[edi+sizeof(qword)*5], xmm5 ; F = digest[5] vmovq qword ptr[edi+sizeof(qword)*6], xmm6 ; G = digest[6] vmovq qword ptr[edi+sizeof(qword)*7], xmm7 ; H = digest[7] add esp,[esp+acualOffset] ret IPPASM UpdateSHA512 ENDP ENDIF ;; (_IPP GE _IPP_G9) ENDIF ;; _ENABLE_ALG_SHA512_ END
; int im2_remove_generic_callback_callee(uint8_t vector, void *callback) SECTION code_clib SECTION code_z80 PUBLIC _im2_remove_generic_callback_callee EXTERN asm_im2_remove_generic_callback _im2_remove_generic_callback_callee: pop af pop hl pop de push af jp asm_im2_remove_generic_callback
IDEAL MODEL SMALL STACK 512 MACRO main_read ; Початок макросу MOV bx, [ds:si] ;занесення в ax чисельного значення MOV bl, bh CMP bl, 030h ; c ascii = 2SDh ; Вибір відповідної функції jl exit22; CMP bl, 039h ; c ascii = 2SDh ; Вибір відповідної функції ja exit22; MOV bh, '0' ENDM main_read DATASEG;III.ПОЧАТОК СЕГМЕНТУ ДАНИХ X DB " ", 13, 10, '$' Y DB " ", 13, 10, '$' out_of_bounds DB "incorrect number!", 13, 10, '$' final_message DB "result: ", 13, 10, '$' input1 DB "please, input X", 13, 10, '$' input2 DB "please, input Y", 13, 10, '$' result_out_of_bounds DB "result out of bounds!", 13, 10, '$' final_message_rest DB "rest: ", 13, 10, '$' CODESEG Start: MOV ax, @data MOV ds, ax MOV es, ax MOV dx, offset input1 ;; Закоментовані повідомлення у ході налаштування MOV ah,9 INT 21h XOR dx, dx MOV dx, offset X PUSH dx MOV al,7 PUSH cx MOV cx,ax MOV ah,0Ah ;ввод строки в буфер MOV [X],al MOV [X+1],0 MOV dx,offset X ;DX = aдрес буфера INT 21h MOV al,[X+1] ;AL = длина введённой строки add dx,2 ;DX = адрес строки MOV ah,ch ;Восстановление AH POP cx CALL str_transformation ;Преобразование строки в слово (со знаком) MOV dx, offset input2 ;; Закоментовані повідомлення у ході налаштування MOV ah,9 INT 21h XOR dx, dx MOV dx, offset Y MOV al,7 PUSH cx MOV cx,ax MOV ah,0Ah ;ввод строки в буфер MOV [Y],al MOV [Y+1],0 MOV dx,offset Y ;DX = aдрес буфера INT 21h MOV al,[Y+1] ;AL = длина введённой строки add dx,2 ;DX = адрес строки MOV ah,ch ;Восстановление AH POP cx CALL str_transformation ;Преобразование строки в слово (со знаком) POP dx MOV si, 1Bh call read_number CMP ax, 0 JE general MOV si, 0Bh call read_number MOV bx,[ds:02h] ;BL = первый символ строки CMP bl,'-' ;Сравнение первого символа с '-' JE negative JMP positive negative: CMP ax, 5 JE f_1 JMP general f_1: MOV bx,[ds:12h] ;BL = первый символ строки CMP bl,'-' JE case1 JMP general positive: CMP ax, 3 JG f_2 JMP general f_2: MOV bx,[ds:12h] ;BL = первый символ строки CMP bl,'-' JE general JMP case2 general: MOV ax, 1 CALL print JMP exit case1: MOV si, 1Bh CALL read_number MOV bx, ax MOV ax, 200 DIV bx MOV bx, offset final_message MOV [bx+8], '-' CALL print CALL print_rest CALL exit case2: MOV bx, 6 MUL bx CMP dx, 0 JG error_11 JMP skip_error_11 error_11: MOV dx, offset result_out_of_bounds MOV ah,9 INT 21h XOR dx, dx CALL exit skip_error_11: CALL print CALL exit exit: MOV ah,04Ch MOV al,0 ; отримання коду виходу INT 21h ; виклик функції DOS 4ch PROC save_input PUSH cx ;Сохранение всех используемых регистров PUSH dx PUSH bx PUSH si PUSH di MOV si,dx ;SI = адрес строки MOV di,10 ;DI = множитель 10 (основание системы счисления) MOV cl,al ;CX = счётчик цикла = длина строки movzx cx,al ;CX = счётчик цикла = длина строки JCXZ error_end ;Если длина = 0, возвращаем ошибку XOR ax,ax ;AX = 0 XOR bx,bx ;BX = 0 loop21: MOV bl,[si] ;Загрузка в BL очередного символа строки INC si ;Инкремент адреса CMP bl,'0' ;Если код символа меньше кода '0' JL error_end ; возвращаем ошибку CMP bl,'9' ;Если код символа больше кода '9' JG error_end ; возвращаем ошибку SUB bl,'0' ;Преобразование символа-цифры в число MUL di ;AX = AX * 10 JC error_end ;Если результат больше 16 бит - ошибка ADD ax,bx ;Прибавляем цифру JC error_end ;Если переполнение - ошибка LOOP loop21 ;Команда цикла JMP exit21 ;Успешное завершение (здесь всегда CF = 0) error_end: XOR ax,ax ;AX = 0 STC ;CF = 1 (Возвращаем ошибку) exit21: POP di ;Восстановление регистров POP si POP bx POP dx POP cx ret ENDP PROC read_error MOV dx, offset out_of_bounds ;; Закоментовані повідомлення у ході налаштування MOV ah,9 INT 21h XOR dx, dx XOR ax,ax ;AX = 0 CALL exit RET ENDP PROC read_number PUSH cx PUSH dx PUSH bx XOR ax, ax loop1: MOV bx, [ds:si] ;занесення в ax чисельного значення MOV bl, bh XOR bh,bh CMP bl, 030h ; c ascii = 2SDh ; Вибір відповідної функції jl skip1; CMP bl, 039h ; c ascii = 2SDh ; Вибір відповідної функції main_read sub bl, bh MOV al,bl dec si main_read sub bl, bh MOV cx, ax MOV ax, 10 XOR bh,bh MUL bx add ax, cx dec si main_read sub bl, bh MOV cx, ax MOV ax, 100 XOR bh,bh MUL bx add ax, cx dec si main_read sub bl, bh MOV cx, ax MOV ax, 1000 XOR bh,bh MUL bx add ax, cx dec si JMP last_check skip1: dec si JMP loop1 exit22: XOR dx, dx POP bx POP dx POP cx RET last_check: main_read sub bl, bh MOV cx, ax MOV ax, 10000 XOR bh,bh MUL bx add ax, cx dec si JMP exit22 ENDP PROC str_transformation PUSH bx PUSH dx test al,al ;Проверка длины строки jz f2 MOV bx,dx MOV bl,[bx] CMP bl,'-' ;проверка знака jne f1 inc dx dec al f1: CALL save_input jc f2 CMP bl,'-' jne f3 ;Если первый символ не '-', то число положительное CMP ax,32734 ;проверка модуля числа ja f2 JMP f4 f3: CMP ax,32767 ;проверка модуля числа ja f2 f4: clc JMP f5 f2: CALL read_error f5: POP dx ;Восстановление регистров POP bx RET ENDP PROC print PUSH dx MOV di,offset final_message add di,9 PUSH cx PUSH bx MOV bx,10 XOR CX,CX print1: XOR dx,dx DIV bx PUSH DX INC CX TEST AX,AX JNZ print1 print2: POP AX ADD AL,'0' STOSb LOOP print2 POP bx POP cx jc print3 JMP print4 print3: MOV dx, offset result_out_of_bounds MOV ah,9 INT 21h XOR dx, dx CALL exit print4: MOV dx, offset final_message MOV ah,9 INT 21h XOR dx, dx POP dx RET ENDP print PROC print_rest MOV ax, dx MOV di,offset final_message_rest add di, 7 PUSH cx PUSH dx PUSH bx MOV bx,10 XOR CX,CX rest1: XOR dx,dx DIV bx PUSH DX INC CX TEST AX,AX JNZ rest1 rest2: POP AX ADD AL,'0' STOSb LOOP rest2 POP bx POP dx POP cx MOV dx, offset final_message_rest MOV ah,9 INT 21h XOR dx, dx RET ENDP print_rest end Start
#pragma once #include <cmath> #include <exchcxx/impl/builtin/fwd.hpp> #include <exchcxx/impl/builtin/constants.hpp> #include <exchcxx/impl/builtin/kernel_type.hpp> #include <exchcxx/impl/builtin/util.hpp> #include <exchcxx/impl/builtin/kernels/screening_interface.hpp> namespace ExchCXX { template <> struct kernel_traits< BuiltinPW91_LDA_MOD > : public lda_screening_interface< BuiltinPW91_LDA_MOD > { static constexpr bool is_lda = true; static constexpr bool is_gga = false; static constexpr bool is_mgga = false; static constexpr double dens_tol = 1e-24; static constexpr bool is_hyb = false; static constexpr double exx_coeff = 0.0; static constexpr double pp_0 = 1.; static constexpr double pp_1 = 1.; static constexpr double pp_2 = 1.; static constexpr double a_0 = 0.0310907; static constexpr double a_1 = 0.01554535; static constexpr double a_2 = 0.0168869; static constexpr double alpha1_0 = 0.21370; static constexpr double alpha1_1 = 0.20548; static constexpr double alpha1_2 = 0.11125; static constexpr double beta1_0 = 7.5957; static constexpr double beta1_1 = 14.1189; static constexpr double beta1_2 = 10.357; static constexpr double beta2_0 = 3.5876; static constexpr double beta2_1 = 6.1977; static constexpr double beta2_2 = 3.6231; static constexpr double beta3_0 = 1.6382; static constexpr double beta3_1 = 3.3662; static constexpr double beta3_2 = 0.88026; static constexpr double beta4_0 = 0.49294; static constexpr double beta4_1 = 0.62517; static constexpr double beta4_2 = 0.49671; static constexpr double fz20 = 1.709920934161365617563962776245; BUILTIN_KERNEL_EVAL_RETURN eval_exc_unpolar_impl( double rho, double& eps ) { (void)(eps); constexpr double t3 = constants::m_cbrt_3; constexpr double t6 = constants::m_cbrt_one_ov_pi; constexpr double t7 = constants::m_cbrt_4; constexpr double t1 = a_0; constexpr double t2 = alpha1_0; constexpr double t4 = t2 * t3; constexpr double t8 = t7 * t7; constexpr double t9 = t6 * t8; constexpr double t17 = 0.1e1 / t1; constexpr double t18 = beta1_0; constexpr double t19 = t3 * t6; constexpr double t26 = beta2_0 * t3; constexpr double t29 = beta3_0; constexpr double t36 = pp_0 + 0.1e1; const double t10 = cbrt( rho ); const double t11 = 0.1e1 / t10; const double t12 = t9 * t11; const double t13 = t4 * t12; const double t15 = 0.1e1 + t13 / 0.4e1; const double t21 = t19 * t8 * t11; const double t22 = sqrt( t21 ); const double t30 = pow_3_2( t21 ); const double t37 = pow( t21 / 0.4e1, t36 ); const double t38 = beta4_0 * t37; const double t39 = t18 * t22 / 0.2e1 + t26 * t12 / 0.4e1 + 0.12500000000000000000e0 * t29 * t30 + t38; const double t43 = 0.1e1 + t17 / t39 / 0.2e1; const double t44 = log( t43 ); eps = -0.2e1 * t1 * t15 * t44; } BUILTIN_KERNEL_EVAL_RETURN eval_exc_vxc_unpolar_impl( double rho, double& eps, double& vrho ) { (void)(eps); constexpr double t3 = constants::m_cbrt_3; constexpr double t6 = constants::m_cbrt_one_ov_pi; constexpr double t7 = constants::m_cbrt_4; constexpr double t1 = a_0; constexpr double t2 = alpha1_0; constexpr double t4 = t2 * t3; constexpr double t8 = t7 * t7; constexpr double t9 = t6 * t8; constexpr double t17 = 0.1e1 / t1; constexpr double t18 = beta1_0; constexpr double t19 = t3 * t6; constexpr double t26 = beta2_0 * t3; constexpr double t29 = beta3_0; constexpr double t36 = pp_0 + 0.1e1; const double t10 = cbrt( rho ); const double t11 = 0.1e1 / t10; const double t12 = t9 * t11; const double t13 = t4 * t12; const double t15 = 0.1e1 + t13 / 0.4e1; const double t21 = t19 * t8 * t11; const double t22 = sqrt( t21 ); const double t30 = pow_3_2( t21 ); const double t37 = pow( t21 / 0.4e1, t36 ); const double t38 = beta4_0 * t37; const double t39 = t18 * t22 / 0.2e1 + t26 * t12 / 0.4e1 + 0.12500000000000000000e0 * t29 * t30 + t38; const double t43 = 0.1e1 + t17 / t39 / 0.2e1; const double t44 = log( t43 ); const double t53 = rho * t15; const double t54 = t39 * t39; const double t55 = 0.1e1 / t54; const double t58 = t18 / t22 * t3; const double t60 = 0.1e1 / t10 / rho; const double t61 = t9 * t60; const double t66 = sqrt( t21 ); const double t68 = t29 * t66 * t3; const double t71 = 0.1e1 / rho; const double t75 = -t58 * t61 / 0.12e2 - t26 * t61 / 0.12e2 - 0.62500000000000000000e-1 * t68 * t61 - t38 * t36 * t71 / 0.3e1; const double t77 = 0.1e1 / t43; eps = -0.2e1 * t1 * t15 * t44; vrho = ( -0.2e1 * t1 * t15 * t44 ) + t11 * t1 * t2 * t19 * t8 * t44 / 0.6e1 + t53 * t55 * t75 * t77; } BUILTIN_KERNEL_EVAL_RETURN eval_exc_ferr_impl( double rho, double& eps ) { (void)(eps); constexpr double t3 = constants::m_cbrt_3; constexpr double t6 = constants::m_cbrt_one_ov_pi; constexpr double t7 = constants::m_cbrt_4; constexpr double t1 = a_1; constexpr double t2 = alpha1_1; constexpr double t4 = t2 * t3; constexpr double t8 = t7 * t7; constexpr double t9 = t6 * t8; constexpr double t17 = 0.1e1 / t1; constexpr double t18 = beta1_1; constexpr double t19 = t3 * t6; constexpr double t26 = beta2_1 * t3; constexpr double t29 = beta3_1; constexpr double t36 = pp_1 + 0.1e1; const double t10 = cbrt( rho ); const double t11 = 0.1e1 / t10; const double t12 = t9 * t11; const double t13 = t4 * t12; const double t15 = 0.1e1 + t13 / 0.4e1; const double t21 = t19 * t8 * t11; const double t22 = sqrt( t21 ); const double t30 = pow_3_2( t21 ); const double t37 = pow( t21 / 0.4e1, t36 ); const double t38 = beta4_1 * t37; const double t39 = t18 * t22 / 0.2e1 + t26 * t12 / 0.4e1 + 0.12500000000000000000e0 * t29 * t30 + t38; const double t43 = 0.1e1 + t17 / t39 / 0.2e1; const double t44 = log( t43 ); eps = -0.2e1 * t1 * t15 * t44; } BUILTIN_KERNEL_EVAL_RETURN eval_exc_vxc_ferr_impl( double rho, double& eps, double& vrho ) { (void)(eps); constexpr double t3 = constants::m_cbrt_3; constexpr double t6 = constants::m_cbrt_one_ov_pi; constexpr double t7 = constants::m_cbrt_4; constexpr double t1 = a_1; constexpr double t2 = alpha1_1; constexpr double t4 = t2 * t3; constexpr double t8 = t7 * t7; constexpr double t9 = t6 * t8; constexpr double t17 = 0.1e1 / t1; constexpr double t18 = beta1_1; constexpr double t19 = t3 * t6; constexpr double t26 = beta2_1 * t3; constexpr double t29 = beta3_1; constexpr double t36 = pp_1 + 0.1e1; const double t10 = cbrt( rho ); const double t11 = 0.1e1 / t10; const double t12 = t9 * t11; const double t13 = t4 * t12; const double t15 = 0.1e1 + t13 / 0.4e1; const double t21 = t19 * t8 * t11; const double t22 = sqrt( t21 ); const double t30 = pow_3_2( t21 ); const double t37 = pow( t21 / 0.4e1, t36 ); const double t38 = beta4_1 * t37; const double t39 = t18 * t22 / 0.2e1 + t26 * t12 / 0.4e1 + 0.12500000000000000000e0 * t29 * t30 + t38; const double t43 = 0.1e1 + t17 / t39 / 0.2e1; const double t44 = log( t43 ); const double t53 = rho * t15; const double t54 = t39 * t39; const double t55 = 0.1e1 / t54; const double t58 = t18 / t22 * t3; const double t60 = 0.1e1 / t10 / rho; const double t61 = t9 * t60; const double t66 = sqrt( t21 ); const double t68 = t29 * t66 * t3; const double t71 = 0.1e1 / rho; const double t75 = -t58 * t61 / 0.12e2 - t26 * t61 / 0.12e2 - 0.62500000000000000000e-1 * t68 * t61 - t38 * t36 * t71 / 0.3e1; const double t77 = 0.1e1 / t43; eps = -0.2e1 * t1 * t15 * t44; vrho = ( -0.2e1 * t1 * t15 * t44 ) + t11 * t1 * t2 * t19 * t8 * t44 / 0.6e1 + t53 * t55 * t75 * t77; } BUILTIN_KERNEL_EVAL_RETURN eval_exc_polar_impl( double rho_a, double rho_b, double& eps ) { (void)(eps); constexpr double t3 = constants::m_cbrt_3; constexpr double t6 = constants::m_cbrt_one_ov_pi; constexpr double t7 = constants::m_cbrt_4; constexpr double t64 = constants::m_cbrt_2; constexpr double t1 = a_0; constexpr double t2 = alpha1_0; constexpr double t4 = t2 * t3; constexpr double t8 = t7 * t7; constexpr double t9 = t6 * t8; constexpr double t18 = 0.1e1 / t1; constexpr double t19 = beta1_0; constexpr double t20 = t3 * t6; constexpr double t27 = beta2_0 * t3; constexpr double t30 = beta3_0; constexpr double t37 = pp_0 + 0.1e1; constexpr double t69 = a_1; constexpr double t70 = alpha1_1; constexpr double t71 = t70 * t3; constexpr double t76 = 0.1e1 / t69; constexpr double t77 = beta1_1; constexpr double t81 = beta2_1 * t3; constexpr double t84 = beta3_1; constexpr double t89 = pp_1 + 0.1e1; constexpr double t99 = a_2; constexpr double t100 = alpha1_2; constexpr double t101 = t100 * t3; constexpr double t106 = 0.1e1 / t99; constexpr double t107 = beta1_2; constexpr double t111 = beta2_2 * t3; constexpr double t114 = beta3_2; constexpr double t119 = pp_2 + 0.1e1; constexpr double t128 = 0.1e1 / fz20; const double t10 = rho_a + rho_b; const double t11 = cbrt( t10 ); const double t12 = 0.1e1 / t11; const double t13 = t9 * t12; const double t16 = 0.1e1 + t4 * t13 / 0.4e1; const double t22 = t20 * t8 * t12; const double t23 = sqrt( t22 ); const double t31 = pow_3_2( t22 ); const double t35 = t22 / 0.4e1; const double t38 = pow( t35, t37 ); const double t39 = beta4_0 * t38; const double t40 = t19 * t23 / 0.2e1 + t27 * t13 / 0.4e1 + 0.12500000000000000000e0 * t30 * t31 + t39; const double t44 = 0.1e1 + t18 / t40 / 0.2e1; const double t45 = log( t44 ); const double t46 = t1 * t16 * t45; const double t47 = 0.2e1 * t46; const double t48 = rho_a - rho_b; const double t49 = t48 * t48; const double t50 = t49 * t49; const double t51 = t10 * t10; const double t52 = t51 * t51; const double t53 = 0.1e1 / t52; const double t54 = t50 * t53; const double t55 = 0.1e1 / t10; const double t56 = t48 * t55; const double t57 = 0.1e1 + t56; const double t58 = cbrt( t57 ); const double t60 = 0.1e1 - t56; const double t61 = cbrt( t60 ); const double t63 = t58 * t57 + t61 * t60 - 0.2e1; const double t67 = 0.1e1 / ( 0.2e1 * t64 - 0.2e1 ); const double t68 = t63 * t67; const double t74 = 0.1e1 + t71 * t13 / 0.4e1; const double t90 = pow( t35, t89 ); const double t91 = beta4_1 * t90; const double t92 = t77 * t23 / 0.2e1 + t81 * t13 / 0.4e1 + 0.12500000000000000000e0 * t84 * t31 + t91; const double t96 = 0.1e1 + t76 / t92 / 0.2e1; const double t97 = log( t96 ); const double t104 = 0.1e1 + t101 * t13 / 0.4e1; const double t120 = pow( t35, t119 ); const double t121 = beta4_2 * t120; const double t122 = t107 * t23 / 0.2e1 + t111 * t13 / 0.4e1 + 0.12500000000000000000e0 * t114 * t31 + t121; const double t126 = 0.1e1 + t106 / t122 / 0.2e1; const double t127 = log( t126 ); const double t129 = t127 * t128; const double t132 = -0.2e1 * t99 * t104 * t129 - 0.2e1 * t69 * t74 * t97 + 0.2e1 * t46; const double t133 = t68 * t132; const double t134 = t54 * t133; const double t137 = t104 * t127 * t128; const double t139 = 0.2e1 * t68 * t99 * t137; eps = -t47 + t134 + t139; } BUILTIN_KERNEL_EVAL_RETURN eval_exc_vxc_polar_impl( double rho_a, double rho_b, double& eps, double& vrho_a, double& vrho_b ) { (void)(eps); constexpr double t3 = constants::m_cbrt_3; constexpr double t6 = constants::m_cbrt_one_ov_pi; constexpr double t7 = constants::m_cbrt_4; constexpr double t64 = constants::m_cbrt_2; constexpr double t1 = a_0; constexpr double t2 = alpha1_0; constexpr double t4 = t2 * t3; constexpr double t8 = t7 * t7; constexpr double t9 = t6 * t8; constexpr double t18 = 0.1e1 / t1; constexpr double t19 = beta1_0; constexpr double t20 = t3 * t6; constexpr double t27 = beta2_0 * t3; constexpr double t30 = beta3_0; constexpr double t37 = pp_0 + 0.1e1; constexpr double t69 = a_1; constexpr double t70 = alpha1_1; constexpr double t71 = t70 * t3; constexpr double t76 = 0.1e1 / t69; constexpr double t77 = beta1_1; constexpr double t81 = beta2_1 * t3; constexpr double t84 = beta3_1; constexpr double t89 = pp_1 + 0.1e1; constexpr double t99 = a_2; constexpr double t100 = alpha1_2; constexpr double t101 = t100 * t3; constexpr double t106 = 0.1e1 / t99; constexpr double t107 = beta1_2; constexpr double t111 = beta2_2 * t3; constexpr double t114 = beta3_2; constexpr double t119 = pp_2 + 0.1e1; constexpr double t128 = 0.1e1 / fz20; constexpr double t141 = t1 * t2 * t3; constexpr double t192 = t69 * t70 * t3; constexpr double t217 = t99 * t100; constexpr double t218 = t217 * t20; constexpr double t250 = t217 * t3; const double t10 = rho_a + rho_b; const double t11 = cbrt( t10 ); const double t12 = 0.1e1 / t11; const double t13 = t9 * t12; const double t16 = 0.1e1 + t4 * t13 / 0.4e1; const double t22 = t20 * t8 * t12; const double t23 = sqrt( t22 ); const double t31 = pow_3_2( t22 ); const double t35 = t22 / 0.4e1; const double t38 = pow( t35, t37 ); const double t39 = beta4_0 * t38; const double t40 = t19 * t23 / 0.2e1 + t27 * t13 / 0.4e1 + 0.12500000000000000000e0 * t30 * t31 + t39; const double t44 = 0.1e1 + t18 / t40 / 0.2e1; const double t45 = log( t44 ); const double t46 = t1 * t16 * t45; const double t47 = 0.2e1 * t46; const double t48 = rho_a - rho_b; const double t49 = t48 * t48; const double t50 = t49 * t49; const double t51 = t10 * t10; const double t52 = t51 * t51; const double t53 = 0.1e1 / t52; const double t54 = t50 * t53; const double t55 = 0.1e1 / t10; const double t56 = t48 * t55; const double t57 = 0.1e1 + t56; const double t58 = cbrt( t57 ); const double t60 = 0.1e1 - t56; const double t61 = cbrt( t60 ); const double t63 = t58 * t57 + t61 * t60 - 0.2e1; const double t67 = 0.1e1 / ( 0.2e1 * t64 - 0.2e1 ); const double t68 = t63 * t67; const double t74 = 0.1e1 + t71 * t13 / 0.4e1; const double t90 = pow( t35, t89 ); const double t91 = beta4_1 * t90; const double t92 = t77 * t23 / 0.2e1 + t81 * t13 / 0.4e1 + 0.12500000000000000000e0 * t84 * t31 + t91; const double t96 = 0.1e1 + t76 / t92 / 0.2e1; const double t97 = log( t96 ); const double t104 = 0.1e1 + t101 * t13 / 0.4e1; const double t120 = pow( t35, t119 ); const double t121 = beta4_2 * t120; const double t122 = t107 * t23 / 0.2e1 + t111 * t13 / 0.4e1 + 0.12500000000000000000e0 * t114 * t31 + t121; const double t126 = 0.1e1 + t106 / t122 / 0.2e1; const double t127 = log( t126 ); const double t129 = t127 * t128; const double t132 = -0.2e1 * t99 * t104 * t129 - 0.2e1 * t69 * t74 * t97 + 0.2e1 * t46; const double t133 = t68 * t132; const double t134 = t54 * t133; const double t137 = t104 * t127 * t128; const double t139 = 0.2e1 * t68 * t99 * t137; const double t143 = 0.1e1 / t11 / t10; const double t146 = t141 * t9 * t143 * t45; const double t147 = t146 / 0.6e1; const double t148 = t40 * t40; const double t149 = 0.1e1 / t148; const double t150 = t16 * t149; const double t151 = 0.1e1 / t23; const double t153 = t19 * t151 * t3; const double t154 = t9 * t143; const double t159 = sqrt( t22 ); const double t161 = t30 * t159 * t3; const double t167 = -t153 * t154 / 0.12e2 - t27 * t154 / 0.12e2 - 0.62500000000000000000e-1 * t161 * t154 - t39 * t37 * t55 / 0.3e1; const double t168 = 0.1e1 / t44; const double t169 = t167 * t168; const double t170 = t150 * t169; const double t171 = t49 * t48; const double t172 = t171 * t53; const double t173 = t172 * t133; const double t174 = 0.4e1 * t173; const double t175 = t52 * t10; const double t176 = 0.1e1 / t175; const double t177 = t50 * t176; const double t178 = t177 * t133; const double t179 = 0.4e1 * t178; const double t180 = 0.1e1 / t51; const double t181 = t48 * t180; const double t182 = t55 - t181; const double t184 = -t182; const double t188 = ( 0.4e1 / 0.3e1 * t58 * t182 + 0.4e1 / 0.3e1 * t61 * t184 ) * t67; const double t189 = t188 * t132; const double t190 = t54 * t189; const double t197 = t92 * t92; const double t198 = 0.1e1 / t197; const double t199 = t74 * t198; const double t201 = t77 * t151 * t3; const double t207 = t84 * t159 * t3; const double t213 = -t201 * t154 / 0.12e2 - t81 * t154 / 0.12e2 - 0.62500000000000000000e-1 * t207 * t154 - t91 * t89 * t55 / 0.3e1; const double t214 = 0.1e1 / t96; const double t215 = t213 * t214; const double t219 = t8 * t143; const double t223 = t122 * t122; const double t224 = 0.1e1 / t223; const double t225 = t104 * t224; const double t227 = t107 * t151 * t3; const double t233 = t114 * t159 * t3; const double t239 = -t227 * t154 / 0.12e2 - t111 * t154 / 0.12e2 - 0.62500000000000000000e-1 * t233 * t154 - t121 * t119 * t55 / 0.3e1; const double t240 = 0.1e1 / t126; const double t242 = t239 * t240 * t128; const double t244 = t192 * t9 * t143 * t97 / 0.6e1 + t199 * t215 - t147 - t170 + t218 * t219 * t129 / 0.6e1 + t225 * t242; const double t245 = t68 * t244; const double t246 = t54 * t245; const double t248 = t188 * t99 * t137; const double t249 = 0.2e1 * t248; const double t251 = t68 * t250; const double t254 = t9 * t143 * t127 * t128; const double t255 = t251 * t254; const double t256 = t255 / 0.6e1; const double t257 = t68 * t104; const double t259 = t240 * t128; const double t260 = t224 * t239 * t259; const double t261 = t257 * t260; const double t264 = -t55 - t181; const double t266 = -t264; const double t270 = ( 0.4e1 / 0.3e1 * t58 * t264 + 0.4e1 / 0.3e1 * t61 * t266 ) * t67; const double t271 = t270 * t132; const double t272 = t54 * t271; const double t274 = t270 * t99 * t137; const double t275 = 0.2e1 * t274; eps = -t47 + t134 + t139; vrho_a = -t47 + t134 + t139 + t10 * ( t147 + t170 + t174 - t179 + t190 + t246 + t249 - t256 - t261 ); vrho_b = -t47 + t134 + t139 + t10 * ( t147 + t170 - t174 - t179 + t272 + t246 + t275 - t256 - t261 ); } }; struct BuiltinPW91_LDA_MOD : detail::BuiltinKernelImpl< BuiltinPW91_LDA_MOD > { BuiltinPW91_LDA_MOD( Spin p ) : detail::BuiltinKernelImpl< BuiltinPW91_LDA_MOD >(p) { } virtual ~BuiltinPW91_LDA_MOD() = default; }; } // namespace ExchCXX
; A018735: Divisors of 944. ; Submitted by Jamie Morken(s3) ; 1,2,4,8,16,59,118,236,472,944 mov $3,1 lpb $0 sub $0,1 add $2,$3 add $3,$2 cmp $2,8 mul $2,27 lpe mov $0,$3
_zombie: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(void) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 51 push %ecx e: 83 ec 04 sub $0x4,%esp if(fork() > 0) 11: e8 ff 03 00 00 call 415 <fork> 16: 85 c0 test %eax,%eax 18: 7e 0d jle 27 <main+0x27> sleep(5); // Let child exit before parent. 1a: 83 ec 0c sub $0xc,%esp 1d: 6a 05 push $0x5 1f: e8 89 04 00 00 call 4ad <sleep> 24: 83 c4 10 add $0x10,%esp exit(); 27: e8 f1 03 00 00 call 41d <exit> 0000002c <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 2c: 55 push %ebp 2d: 89 e5 mov %esp,%ebp 2f: 57 push %edi 30: 53 push %ebx asm volatile("cld; rep stosb" : 31: 8b 4d 08 mov 0x8(%ebp),%ecx 34: 8b 55 10 mov 0x10(%ebp),%edx 37: 8b 45 0c mov 0xc(%ebp),%eax 3a: 89 cb mov %ecx,%ebx 3c: 89 df mov %ebx,%edi 3e: 89 d1 mov %edx,%ecx 40: fc cld 41: f3 aa rep stos %al,%es:(%edi) 43: 89 ca mov %ecx,%edx 45: 89 fb mov %edi,%ebx 47: 89 5d 08 mov %ebx,0x8(%ebp) 4a: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 4d: 90 nop 4e: 5b pop %ebx 4f: 5f pop %edi 50: 5d pop %ebp 51: c3 ret 00000052 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 52: 55 push %ebp 53: 89 e5 mov %esp,%ebp 55: 83 ec 10 sub $0x10,%esp char *os; os = s; 58: 8b 45 08 mov 0x8(%ebp),%eax 5b: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 5e: 90 nop 5f: 8b 45 08 mov 0x8(%ebp),%eax 62: 8d 50 01 lea 0x1(%eax),%edx 65: 89 55 08 mov %edx,0x8(%ebp) 68: 8b 55 0c mov 0xc(%ebp),%edx 6b: 8d 4a 01 lea 0x1(%edx),%ecx 6e: 89 4d 0c mov %ecx,0xc(%ebp) 71: 0f b6 12 movzbl (%edx),%edx 74: 88 10 mov %dl,(%eax) 76: 0f b6 00 movzbl (%eax),%eax 79: 84 c0 test %al,%al 7b: 75 e2 jne 5f <strcpy+0xd> ; return os; 7d: 8b 45 fc mov -0x4(%ebp),%eax } 80: c9 leave 81: c3 ret 00000082 <strcmp>: int strcmp(const char *p, const char *q) { 82: 55 push %ebp 83: 89 e5 mov %esp,%ebp while(*p && *p == *q) 85: eb 08 jmp 8f <strcmp+0xd> p++, q++; 87: 83 45 08 01 addl $0x1,0x8(%ebp) 8b: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 8f: 8b 45 08 mov 0x8(%ebp),%eax 92: 0f b6 00 movzbl (%eax),%eax 95: 84 c0 test %al,%al 97: 74 10 je a9 <strcmp+0x27> 99: 8b 45 08 mov 0x8(%ebp),%eax 9c: 0f b6 10 movzbl (%eax),%edx 9f: 8b 45 0c mov 0xc(%ebp),%eax a2: 0f b6 00 movzbl (%eax),%eax a5: 38 c2 cmp %al,%dl a7: 74 de je 87 <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; a9: 8b 45 08 mov 0x8(%ebp),%eax ac: 0f b6 00 movzbl (%eax),%eax af: 0f b6 d0 movzbl %al,%edx b2: 8b 45 0c mov 0xc(%ebp),%eax b5: 0f b6 00 movzbl (%eax),%eax b8: 0f b6 c0 movzbl %al,%eax bb: 29 c2 sub %eax,%edx bd: 89 d0 mov %edx,%eax } bf: 5d pop %ebp c0: c3 ret 000000c1 <strlen>: uint strlen(char *s) { c1: 55 push %ebp c2: 89 e5 mov %esp,%ebp c4: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) c7: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) ce: eb 04 jmp d4 <strlen+0x13> d0: 83 45 fc 01 addl $0x1,-0x4(%ebp) d4: 8b 55 fc mov -0x4(%ebp),%edx d7: 8b 45 08 mov 0x8(%ebp),%eax da: 01 d0 add %edx,%eax dc: 0f b6 00 movzbl (%eax),%eax df: 84 c0 test %al,%al e1: 75 ed jne d0 <strlen+0xf> ; return n; e3: 8b 45 fc mov -0x4(%ebp),%eax } e6: c9 leave e7: c3 ret 000000e8 <memset>: void* memset(void *dst, int c, uint n) { e8: 55 push %ebp e9: 89 e5 mov %esp,%ebp stosb(dst, c, n); eb: 8b 45 10 mov 0x10(%ebp),%eax ee: 50 push %eax ef: ff 75 0c pushl 0xc(%ebp) f2: ff 75 08 pushl 0x8(%ebp) f5: e8 32 ff ff ff call 2c <stosb> fa: 83 c4 0c add $0xc,%esp return dst; fd: 8b 45 08 mov 0x8(%ebp),%eax } 100: c9 leave 101: c3 ret 00000102 <strchr>: char* strchr(const char *s, char c) { 102: 55 push %ebp 103: 89 e5 mov %esp,%ebp 105: 83 ec 04 sub $0x4,%esp 108: 8b 45 0c mov 0xc(%ebp),%eax 10b: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 10e: eb 14 jmp 124 <strchr+0x22> if(*s == c) 110: 8b 45 08 mov 0x8(%ebp),%eax 113: 0f b6 00 movzbl (%eax),%eax 116: 3a 45 fc cmp -0x4(%ebp),%al 119: 75 05 jne 120 <strchr+0x1e> return (char*)s; 11b: 8b 45 08 mov 0x8(%ebp),%eax 11e: eb 13 jmp 133 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 120: 83 45 08 01 addl $0x1,0x8(%ebp) 124: 8b 45 08 mov 0x8(%ebp),%eax 127: 0f b6 00 movzbl (%eax),%eax 12a: 84 c0 test %al,%al 12c: 75 e2 jne 110 <strchr+0xe> if(*s == c) return (char*)s; return 0; 12e: b8 00 00 00 00 mov $0x0,%eax } 133: c9 leave 134: c3 ret 00000135 <gets>: char* gets(char *buf, int max) { 135: 55 push %ebp 136: 89 e5 mov %esp,%ebp 138: 83 ec 18 sub $0x18,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 13b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 142: eb 42 jmp 186 <gets+0x51> cc = read(0, &c, 1); 144: 83 ec 04 sub $0x4,%esp 147: 6a 01 push $0x1 149: 8d 45 ef lea -0x11(%ebp),%eax 14c: 50 push %eax 14d: 6a 00 push $0x0 14f: e8 e1 02 00 00 call 435 <read> 154: 83 c4 10 add $0x10,%esp 157: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 15a: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 15e: 7e 33 jle 193 <gets+0x5e> break; buf[i++] = c; 160: 8b 45 f4 mov -0xc(%ebp),%eax 163: 8d 50 01 lea 0x1(%eax),%edx 166: 89 55 f4 mov %edx,-0xc(%ebp) 169: 89 c2 mov %eax,%edx 16b: 8b 45 08 mov 0x8(%ebp),%eax 16e: 01 c2 add %eax,%edx 170: 0f b6 45 ef movzbl -0x11(%ebp),%eax 174: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 176: 0f b6 45 ef movzbl -0x11(%ebp),%eax 17a: 3c 0a cmp $0xa,%al 17c: 74 16 je 194 <gets+0x5f> 17e: 0f b6 45 ef movzbl -0x11(%ebp),%eax 182: 3c 0d cmp $0xd,%al 184: 74 0e je 194 <gets+0x5f> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 186: 8b 45 f4 mov -0xc(%ebp),%eax 189: 83 c0 01 add $0x1,%eax 18c: 3b 45 0c cmp 0xc(%ebp),%eax 18f: 7c b3 jl 144 <gets+0xf> 191: eb 01 jmp 194 <gets+0x5f> cc = read(0, &c, 1); if(cc < 1) break; 193: 90 nop buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 194: 8b 55 f4 mov -0xc(%ebp),%edx 197: 8b 45 08 mov 0x8(%ebp),%eax 19a: 01 d0 add %edx,%eax 19c: c6 00 00 movb $0x0,(%eax) return buf; 19f: 8b 45 08 mov 0x8(%ebp),%eax } 1a2: c9 leave 1a3: c3 ret 000001a4 <stat>: int stat(char *n, struct stat *st) { 1a4: 55 push %ebp 1a5: 89 e5 mov %esp,%ebp 1a7: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 1aa: 83 ec 08 sub $0x8,%esp 1ad: 6a 00 push $0x0 1af: ff 75 08 pushl 0x8(%ebp) 1b2: e8 a6 02 00 00 call 45d <open> 1b7: 83 c4 10 add $0x10,%esp 1ba: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 1bd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1c1: 79 07 jns 1ca <stat+0x26> return -1; 1c3: b8 ff ff ff ff mov $0xffffffff,%eax 1c8: eb 25 jmp 1ef <stat+0x4b> r = fstat(fd, st); 1ca: 83 ec 08 sub $0x8,%esp 1cd: ff 75 0c pushl 0xc(%ebp) 1d0: ff 75 f4 pushl -0xc(%ebp) 1d3: e8 9d 02 00 00 call 475 <fstat> 1d8: 83 c4 10 add $0x10,%esp 1db: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 1de: 83 ec 0c sub $0xc,%esp 1e1: ff 75 f4 pushl -0xc(%ebp) 1e4: e8 5c 02 00 00 call 445 <close> 1e9: 83 c4 10 add $0x10,%esp return r; 1ec: 8b 45 f0 mov -0x10(%ebp),%eax } 1ef: c9 leave 1f0: c3 ret 000001f1 <atoi>: int atoi(const char *s) { 1f1: 55 push %ebp 1f2: 89 e5 mov %esp,%ebp 1f4: 83 ec 10 sub $0x10,%esp int n; n = 0; 1f7: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 1fe: eb 25 jmp 225 <atoi+0x34> n = n*10 + *s++ - '0'; 200: 8b 55 fc mov -0x4(%ebp),%edx 203: 89 d0 mov %edx,%eax 205: c1 e0 02 shl $0x2,%eax 208: 01 d0 add %edx,%eax 20a: 01 c0 add %eax,%eax 20c: 89 c1 mov %eax,%ecx 20e: 8b 45 08 mov 0x8(%ebp),%eax 211: 8d 50 01 lea 0x1(%eax),%edx 214: 89 55 08 mov %edx,0x8(%ebp) 217: 0f b6 00 movzbl (%eax),%eax 21a: 0f be c0 movsbl %al,%eax 21d: 01 c8 add %ecx,%eax 21f: 83 e8 30 sub $0x30,%eax 222: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 225: 8b 45 08 mov 0x8(%ebp),%eax 228: 0f b6 00 movzbl (%eax),%eax 22b: 3c 2f cmp $0x2f,%al 22d: 7e 0a jle 239 <atoi+0x48> 22f: 8b 45 08 mov 0x8(%ebp),%eax 232: 0f b6 00 movzbl (%eax),%eax 235: 3c 39 cmp $0x39,%al 237: 7e c7 jle 200 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 239: 8b 45 fc mov -0x4(%ebp),%eax } 23c: c9 leave 23d: c3 ret 0000023e <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 23e: 55 push %ebp 23f: 89 e5 mov %esp,%ebp 241: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 244: 8b 45 08 mov 0x8(%ebp),%eax 247: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 24a: 8b 45 0c mov 0xc(%ebp),%eax 24d: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 250: eb 17 jmp 269 <memmove+0x2b> *dst++ = *src++; 252: 8b 45 fc mov -0x4(%ebp),%eax 255: 8d 50 01 lea 0x1(%eax),%edx 258: 89 55 fc mov %edx,-0x4(%ebp) 25b: 8b 55 f8 mov -0x8(%ebp),%edx 25e: 8d 4a 01 lea 0x1(%edx),%ecx 261: 89 4d f8 mov %ecx,-0x8(%ebp) 264: 0f b6 12 movzbl (%edx),%edx 267: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 269: 8b 45 10 mov 0x10(%ebp),%eax 26c: 8d 50 ff lea -0x1(%eax),%edx 26f: 89 55 10 mov %edx,0x10(%ebp) 272: 85 c0 test %eax,%eax 274: 7f dc jg 252 <memmove+0x14> *dst++ = *src++; return vdst; 276: 8b 45 08 mov 0x8(%ebp),%eax } 279: c9 leave 27a: c3 ret 0000027b <historyAdd>: void historyAdd(char *buf1){ 27b: 55 push %ebp 27c: 89 e5 mov %esp,%ebp 27e: 53 push %ebx 27f: 81 ec f4 07 00 00 sub $0x7f4,%esp int fd; char hist[10]={'h','\0'}; 285: c7 45 e6 00 00 00 00 movl $0x0,-0x1a(%ebp) 28c: c7 45 ea 00 00 00 00 movl $0x0,-0x16(%ebp) 293: 66 c7 45 ee 00 00 movw $0x0,-0x12(%ebp) 299: c6 45 e6 68 movb $0x68,-0x1a(%ebp) //printf(1,"here\n"); char buf[1000],buf2[1000]; if((fd = open(hist, 0)) < 0){ 29d: 83 ec 08 sub $0x8,%esp 2a0: 6a 00 push $0x0 2a2: 8d 45 e6 lea -0x1a(%ebp),%eax 2a5: 50 push %eax 2a6: e8 b2 01 00 00 call 45d <open> 2ab: 83 c4 10 add $0x10,%esp 2ae: 89 45 f0 mov %eax,-0x10(%ebp) 2b1: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 2b5: 79 1b jns 2d2 <historyAdd+0x57> printf(1, "History: cannot open %s\n", hist); 2b7: 83 ec 04 sub $0x4,%esp 2ba: 8d 45 e6 lea -0x1a(%ebp),%eax 2bd: 50 push %eax 2be: 68 4c 09 00 00 push $0x94c 2c3: 6a 01 push $0x1 2c5: e8 ca 02 00 00 call 594 <printf> 2ca: 83 c4 10 add $0x10,%esp exit(); 2cd: e8 4b 01 00 00 call 41d <exit> } int i=0; 2d2: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) while(buf1[i]!=0) 2d9: eb 1c jmp 2f7 <historyAdd+0x7c> { //printf(1,"%d has %d\n",i,buf1[i]); buf[i]=buf1[i]; 2db: 8b 55 f4 mov -0xc(%ebp),%edx 2de: 8b 45 08 mov 0x8(%ebp),%eax 2e1: 01 d0 add %edx,%eax 2e3: 0f b6 00 movzbl (%eax),%eax 2e6: 8d 8d fe fb ff ff lea -0x402(%ebp),%ecx 2ec: 8b 55 f4 mov -0xc(%ebp),%edx 2ef: 01 ca add %ecx,%edx 2f1: 88 02 mov %al,(%edx) i++; 2f3: 83 45 f4 01 addl $0x1,-0xc(%ebp) printf(1, "History: cannot open %s\n", hist); exit(); } int i=0; while(buf1[i]!=0) 2f7: 8b 55 f4 mov -0xc(%ebp),%edx 2fa: 8b 45 08 mov 0x8(%ebp),%eax 2fd: 01 d0 add %edx,%eax 2ff: 0f b6 00 movzbl (%eax),%eax 302: 84 c0 test %al,%al 304: 75 d5 jne 2db <historyAdd+0x60> { //printf(1,"%d has %d\n",i,buf1[i]); buf[i]=buf1[i]; i++; } buf[i]=0; 306: 8d 95 fe fb ff ff lea -0x402(%ebp),%edx 30c: 8b 45 f4 mov -0xc(%ebp),%eax 30f: 01 d0 add %edx,%eax 311: c6 00 00 movb $0x0,(%eax) // int n; while((read(fd, buf2, 1000)) > 0){ 314: eb 5a jmp 370 <historyAdd+0xf5> //printf(1,"%d %d\n",strlen(buf),strlen(buf2)); while(i<strlen(buf2)+strlen(buf1)){ //printf(1,"%c\n",buf2[i]); buf[i]=buf2[i-strlen(buf1)]; 316: 8b 5d f4 mov -0xc(%ebp),%ebx 319: 83 ec 0c sub $0xc,%esp 31c: ff 75 08 pushl 0x8(%ebp) 31f: e8 9d fd ff ff call c1 <strlen> 324: 83 c4 10 add $0x10,%esp 327: 29 c3 sub %eax,%ebx 329: 89 d8 mov %ebx,%eax 32b: 0f b6 84 05 16 f8 ff movzbl -0x7ea(%ebp,%eax,1),%eax 332: ff 333: 8d 8d fe fb ff ff lea -0x402(%ebp),%ecx 339: 8b 55 f4 mov -0xc(%ebp),%edx 33c: 01 ca add %ecx,%edx 33e: 88 02 mov %al,(%edx) i++; 340: 83 45 f4 01 addl $0x1,-0xc(%ebp) //buf[1001]=0; //int i=0; //printf(1,"%d %d\n",strlen(buf),strlen(buf2)); while(i<strlen(buf2)+strlen(buf1)){ 344: 83 ec 0c sub $0xc,%esp 347: 8d 85 16 f8 ff ff lea -0x7ea(%ebp),%eax 34d: 50 push %eax 34e: e8 6e fd ff ff call c1 <strlen> 353: 83 c4 10 add $0x10,%esp 356: 89 c3 mov %eax,%ebx 358: 83 ec 0c sub $0xc,%esp 35b: ff 75 08 pushl 0x8(%ebp) 35e: e8 5e fd ff ff call c1 <strlen> 363: 83 c4 10 add $0x10,%esp 366: 8d 14 03 lea (%ebx,%eax,1),%edx 369: 8b 45 f4 mov -0xc(%ebp),%eax 36c: 39 c2 cmp %eax,%edx 36e: 77 a6 ja 316 <historyAdd+0x9b> buf[i]=buf1[i]; i++; } buf[i]=0; // int n; while((read(fd, buf2, 1000)) > 0){ 370: 83 ec 04 sub $0x4,%esp 373: 68 e8 03 00 00 push $0x3e8 378: 8d 85 16 f8 ff ff lea -0x7ea(%ebp),%eax 37e: 50 push %eax 37f: ff 75 f0 pushl -0x10(%ebp) 382: e8 ae 00 00 00 call 435 <read> 387: 83 c4 10 add $0x10,%esp 38a: 85 c0 test %eax,%eax 38c: 7f b6 jg 344 <historyAdd+0xc9> } //printf(1,"strlen: %d %s\n",strlen(buf),buf); } //history(fd); close(fd); 38e: 83 ec 0c sub $0xc,%esp 391: ff 75 f0 pushl -0x10(%ebp) 394: e8 ac 00 00 00 call 445 <close> 399: 83 c4 10 add $0x10,%esp if((fd = open(hist,O_CREATE|O_RDWR)) < 0){ 39c: 83 ec 08 sub $0x8,%esp 39f: 68 02 02 00 00 push $0x202 3a4: 8d 45 e6 lea -0x1a(%ebp),%eax 3a7: 50 push %eax 3a8: e8 b0 00 00 00 call 45d <open> 3ad: 83 c4 10 add $0x10,%esp 3b0: 89 45 f0 mov %eax,-0x10(%ebp) 3b3: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 3b7: 79 1b jns 3d4 <historyAdd+0x159> printf(1, "History: cannot open %s\n", hist); 3b9: 83 ec 04 sub $0x4,%esp 3bc: 8d 45 e6 lea -0x1a(%ebp),%eax 3bf: 50 push %eax 3c0: 68 4c 09 00 00 push $0x94c 3c5: 6a 01 push $0x1 3c7: e8 c8 01 00 00 call 594 <printf> 3cc: 83 c4 10 add $0x10,%esp exit(); 3cf: e8 49 00 00 00 call 41d <exit> } if(write(fd, buf, 1000) != 1000){ 3d4: 83 ec 04 sub $0x4,%esp 3d7: 68 e8 03 00 00 push $0x3e8 3dc: 8d 85 fe fb ff ff lea -0x402(%ebp),%eax 3e2: 50 push %eax 3e3: ff 75 f0 pushl -0x10(%ebp) 3e6: e8 52 00 00 00 call 43d <write> 3eb: 83 c4 10 add $0x10,%esp 3ee: 3d e8 03 00 00 cmp $0x3e8,%eax 3f3: 74 1a je 40f <historyAdd+0x194> printf(1, "error: write aa %d new file failed\n", i); 3f5: 83 ec 04 sub $0x4,%esp 3f8: ff 75 f4 pushl -0xc(%ebp) 3fb: 68 68 09 00 00 push $0x968 400: 6a 01 push $0x1 402: e8 8d 01 00 00 call 594 <printf> 407: 83 c4 10 add $0x10,%esp exit(); 40a: e8 0e 00 00 00 call 41d <exit> } } 40f: 90 nop 410: 8b 5d fc mov -0x4(%ebp),%ebx 413: c9 leave 414: c3 ret 00000415 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 415: b8 01 00 00 00 mov $0x1,%eax 41a: cd 40 int $0x40 41c: c3 ret 0000041d <exit>: SYSCALL(exit) 41d: b8 02 00 00 00 mov $0x2,%eax 422: cd 40 int $0x40 424: c3 ret 00000425 <wait>: SYSCALL(wait) 425: b8 03 00 00 00 mov $0x3,%eax 42a: cd 40 int $0x40 42c: c3 ret 0000042d <pipe>: SYSCALL(pipe) 42d: b8 04 00 00 00 mov $0x4,%eax 432: cd 40 int $0x40 434: c3 ret 00000435 <read>: SYSCALL(read) 435: b8 05 00 00 00 mov $0x5,%eax 43a: cd 40 int $0x40 43c: c3 ret 0000043d <write>: SYSCALL(write) 43d: b8 10 00 00 00 mov $0x10,%eax 442: cd 40 int $0x40 444: c3 ret 00000445 <close>: SYSCALL(close) 445: b8 15 00 00 00 mov $0x15,%eax 44a: cd 40 int $0x40 44c: c3 ret 0000044d <kill>: SYSCALL(kill) 44d: b8 06 00 00 00 mov $0x6,%eax 452: cd 40 int $0x40 454: c3 ret 00000455 <exec>: SYSCALL(exec) 455: b8 07 00 00 00 mov $0x7,%eax 45a: cd 40 int $0x40 45c: c3 ret 0000045d <open>: SYSCALL(open) 45d: b8 0f 00 00 00 mov $0xf,%eax 462: cd 40 int $0x40 464: c3 ret 00000465 <mknod>: SYSCALL(mknod) 465: b8 11 00 00 00 mov $0x11,%eax 46a: cd 40 int $0x40 46c: c3 ret 0000046d <unlink>: SYSCALL(unlink) 46d: b8 12 00 00 00 mov $0x12,%eax 472: cd 40 int $0x40 474: c3 ret 00000475 <fstat>: SYSCALL(fstat) 475: b8 08 00 00 00 mov $0x8,%eax 47a: cd 40 int $0x40 47c: c3 ret 0000047d <link>: SYSCALL(link) 47d: b8 13 00 00 00 mov $0x13,%eax 482: cd 40 int $0x40 484: c3 ret 00000485 <mkdir>: SYSCALL(mkdir) 485: b8 14 00 00 00 mov $0x14,%eax 48a: cd 40 int $0x40 48c: c3 ret 0000048d <chdir>: SYSCALL(chdir) 48d: b8 09 00 00 00 mov $0x9,%eax 492: cd 40 int $0x40 494: c3 ret 00000495 <dup>: SYSCALL(dup) 495: b8 0a 00 00 00 mov $0xa,%eax 49a: cd 40 int $0x40 49c: c3 ret 0000049d <getpid>: SYSCALL(getpid) 49d: b8 0b 00 00 00 mov $0xb,%eax 4a2: cd 40 int $0x40 4a4: c3 ret 000004a5 <sbrk>: SYSCALL(sbrk) 4a5: b8 0c 00 00 00 mov $0xc,%eax 4aa: cd 40 int $0x40 4ac: c3 ret 000004ad <sleep>: SYSCALL(sleep) 4ad: b8 0d 00 00 00 mov $0xd,%eax 4b2: cd 40 int $0x40 4b4: c3 ret 000004b5 <uptime>: SYSCALL(uptime) 4b5: b8 0e 00 00 00 mov $0xe,%eax 4ba: cd 40 int $0x40 4bc: c3 ret 000004bd <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 4bd: 55 push %ebp 4be: 89 e5 mov %esp,%ebp 4c0: 83 ec 18 sub $0x18,%esp 4c3: 8b 45 0c mov 0xc(%ebp),%eax 4c6: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 4c9: 83 ec 04 sub $0x4,%esp 4cc: 6a 01 push $0x1 4ce: 8d 45 f4 lea -0xc(%ebp),%eax 4d1: 50 push %eax 4d2: ff 75 08 pushl 0x8(%ebp) 4d5: e8 63 ff ff ff call 43d <write> 4da: 83 c4 10 add $0x10,%esp } 4dd: 90 nop 4de: c9 leave 4df: c3 ret 000004e0 <printint>: static void printint(int fd, int xx, int base, int sgn) { 4e0: 55 push %ebp 4e1: 89 e5 mov %esp,%ebp 4e3: 53 push %ebx 4e4: 83 ec 24 sub $0x24,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 4e7: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 4ee: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 4f2: 74 17 je 50b <printint+0x2b> 4f4: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 4f8: 79 11 jns 50b <printint+0x2b> neg = 1; 4fa: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 501: 8b 45 0c mov 0xc(%ebp),%eax 504: f7 d8 neg %eax 506: 89 45 ec mov %eax,-0x14(%ebp) 509: eb 06 jmp 511 <printint+0x31> } else { x = xx; 50b: 8b 45 0c mov 0xc(%ebp),%eax 50e: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 511: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 518: 8b 4d f4 mov -0xc(%ebp),%ecx 51b: 8d 41 01 lea 0x1(%ecx),%eax 51e: 89 45 f4 mov %eax,-0xc(%ebp) 521: 8b 5d 10 mov 0x10(%ebp),%ebx 524: 8b 45 ec mov -0x14(%ebp),%eax 527: ba 00 00 00 00 mov $0x0,%edx 52c: f7 f3 div %ebx 52e: 89 d0 mov %edx,%eax 530: 0f b6 80 00 0c 00 00 movzbl 0xc00(%eax),%eax 537: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 53b: 8b 5d 10 mov 0x10(%ebp),%ebx 53e: 8b 45 ec mov -0x14(%ebp),%eax 541: ba 00 00 00 00 mov $0x0,%edx 546: f7 f3 div %ebx 548: 89 45 ec mov %eax,-0x14(%ebp) 54b: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 54f: 75 c7 jne 518 <printint+0x38> if(neg) 551: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 555: 74 2d je 584 <printint+0xa4> buf[i++] = '-'; 557: 8b 45 f4 mov -0xc(%ebp),%eax 55a: 8d 50 01 lea 0x1(%eax),%edx 55d: 89 55 f4 mov %edx,-0xc(%ebp) 560: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 565: eb 1d jmp 584 <printint+0xa4> putc(fd, buf[i]); 567: 8d 55 dc lea -0x24(%ebp),%edx 56a: 8b 45 f4 mov -0xc(%ebp),%eax 56d: 01 d0 add %edx,%eax 56f: 0f b6 00 movzbl (%eax),%eax 572: 0f be c0 movsbl %al,%eax 575: 83 ec 08 sub $0x8,%esp 578: 50 push %eax 579: ff 75 08 pushl 0x8(%ebp) 57c: e8 3c ff ff ff call 4bd <putc> 581: 83 c4 10 add $0x10,%esp buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 584: 83 6d f4 01 subl $0x1,-0xc(%ebp) 588: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 58c: 79 d9 jns 567 <printint+0x87> putc(fd, buf[i]); } 58e: 90 nop 58f: 8b 5d fc mov -0x4(%ebp),%ebx 592: c9 leave 593: c3 ret 00000594 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 594: 55 push %ebp 595: 89 e5 mov %esp,%ebp 597: 83 ec 28 sub $0x28,%esp char *s; int c, i, state; uint *ap; state = 0; 59a: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 5a1: 8d 45 0c lea 0xc(%ebp),%eax 5a4: 83 c0 04 add $0x4,%eax 5a7: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 5aa: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 5b1: e9 59 01 00 00 jmp 70f <printf+0x17b> c = fmt[i] & 0xff; 5b6: 8b 55 0c mov 0xc(%ebp),%edx 5b9: 8b 45 f0 mov -0x10(%ebp),%eax 5bc: 01 d0 add %edx,%eax 5be: 0f b6 00 movzbl (%eax),%eax 5c1: 0f be c0 movsbl %al,%eax 5c4: 25 ff 00 00 00 and $0xff,%eax 5c9: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 5cc: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 5d0: 75 2c jne 5fe <printf+0x6a> if(c == '%'){ 5d2: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 5d6: 75 0c jne 5e4 <printf+0x50> state = '%'; 5d8: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 5df: e9 27 01 00 00 jmp 70b <printf+0x177> } else { putc(fd, c); 5e4: 8b 45 e4 mov -0x1c(%ebp),%eax 5e7: 0f be c0 movsbl %al,%eax 5ea: 83 ec 08 sub $0x8,%esp 5ed: 50 push %eax 5ee: ff 75 08 pushl 0x8(%ebp) 5f1: e8 c7 fe ff ff call 4bd <putc> 5f6: 83 c4 10 add $0x10,%esp 5f9: e9 0d 01 00 00 jmp 70b <printf+0x177> } } else if(state == '%'){ 5fe: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 602: 0f 85 03 01 00 00 jne 70b <printf+0x177> if(c == 'd'){ 608: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 60c: 75 1e jne 62c <printf+0x98> printint(fd, *ap, 10, 1); 60e: 8b 45 e8 mov -0x18(%ebp),%eax 611: 8b 00 mov (%eax),%eax 613: 6a 01 push $0x1 615: 6a 0a push $0xa 617: 50 push %eax 618: ff 75 08 pushl 0x8(%ebp) 61b: e8 c0 fe ff ff call 4e0 <printint> 620: 83 c4 10 add $0x10,%esp ap++; 623: 83 45 e8 04 addl $0x4,-0x18(%ebp) 627: e9 d8 00 00 00 jmp 704 <printf+0x170> } else if(c == 'x' || c == 'p'){ 62c: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 630: 74 06 je 638 <printf+0xa4> 632: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 636: 75 1e jne 656 <printf+0xc2> printint(fd, *ap, 16, 0); 638: 8b 45 e8 mov -0x18(%ebp),%eax 63b: 8b 00 mov (%eax),%eax 63d: 6a 00 push $0x0 63f: 6a 10 push $0x10 641: 50 push %eax 642: ff 75 08 pushl 0x8(%ebp) 645: e8 96 fe ff ff call 4e0 <printint> 64a: 83 c4 10 add $0x10,%esp ap++; 64d: 83 45 e8 04 addl $0x4,-0x18(%ebp) 651: e9 ae 00 00 00 jmp 704 <printf+0x170> } else if(c == 's'){ 656: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 65a: 75 43 jne 69f <printf+0x10b> s = (char*)*ap; 65c: 8b 45 e8 mov -0x18(%ebp),%eax 65f: 8b 00 mov (%eax),%eax 661: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 664: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 668: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 66c: 75 25 jne 693 <printf+0xff> s = "(null)"; 66e: c7 45 f4 8c 09 00 00 movl $0x98c,-0xc(%ebp) while(*s != 0){ 675: eb 1c jmp 693 <printf+0xff> putc(fd, *s); 677: 8b 45 f4 mov -0xc(%ebp),%eax 67a: 0f b6 00 movzbl (%eax),%eax 67d: 0f be c0 movsbl %al,%eax 680: 83 ec 08 sub $0x8,%esp 683: 50 push %eax 684: ff 75 08 pushl 0x8(%ebp) 687: e8 31 fe ff ff call 4bd <putc> 68c: 83 c4 10 add $0x10,%esp s++; 68f: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 693: 8b 45 f4 mov -0xc(%ebp),%eax 696: 0f b6 00 movzbl (%eax),%eax 699: 84 c0 test %al,%al 69b: 75 da jne 677 <printf+0xe3> 69d: eb 65 jmp 704 <printf+0x170> putc(fd, *s); s++; } } else if(c == 'c'){ 69f: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 6a3: 75 1d jne 6c2 <printf+0x12e> putc(fd, *ap); 6a5: 8b 45 e8 mov -0x18(%ebp),%eax 6a8: 8b 00 mov (%eax),%eax 6aa: 0f be c0 movsbl %al,%eax 6ad: 83 ec 08 sub $0x8,%esp 6b0: 50 push %eax 6b1: ff 75 08 pushl 0x8(%ebp) 6b4: e8 04 fe ff ff call 4bd <putc> 6b9: 83 c4 10 add $0x10,%esp ap++; 6bc: 83 45 e8 04 addl $0x4,-0x18(%ebp) 6c0: eb 42 jmp 704 <printf+0x170> } else if(c == '%'){ 6c2: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 6c6: 75 17 jne 6df <printf+0x14b> putc(fd, c); 6c8: 8b 45 e4 mov -0x1c(%ebp),%eax 6cb: 0f be c0 movsbl %al,%eax 6ce: 83 ec 08 sub $0x8,%esp 6d1: 50 push %eax 6d2: ff 75 08 pushl 0x8(%ebp) 6d5: e8 e3 fd ff ff call 4bd <putc> 6da: 83 c4 10 add $0x10,%esp 6dd: eb 25 jmp 704 <printf+0x170> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 6df: 83 ec 08 sub $0x8,%esp 6e2: 6a 25 push $0x25 6e4: ff 75 08 pushl 0x8(%ebp) 6e7: e8 d1 fd ff ff call 4bd <putc> 6ec: 83 c4 10 add $0x10,%esp putc(fd, c); 6ef: 8b 45 e4 mov -0x1c(%ebp),%eax 6f2: 0f be c0 movsbl %al,%eax 6f5: 83 ec 08 sub $0x8,%esp 6f8: 50 push %eax 6f9: ff 75 08 pushl 0x8(%ebp) 6fc: e8 bc fd ff ff call 4bd <putc> 701: 83 c4 10 add $0x10,%esp } state = 0; 704: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 70b: 83 45 f0 01 addl $0x1,-0x10(%ebp) 70f: 8b 55 0c mov 0xc(%ebp),%edx 712: 8b 45 f0 mov -0x10(%ebp),%eax 715: 01 d0 add %edx,%eax 717: 0f b6 00 movzbl (%eax),%eax 71a: 84 c0 test %al,%al 71c: 0f 85 94 fe ff ff jne 5b6 <printf+0x22> putc(fd, c); } state = 0; } } } 722: 90 nop 723: c9 leave 724: c3 ret 00000725 <free>: static Header base; static Header *freep; void free(void *ap) { 725: 55 push %ebp 726: 89 e5 mov %esp,%ebp 728: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 72b: 8b 45 08 mov 0x8(%ebp),%eax 72e: 83 e8 08 sub $0x8,%eax 731: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 734: a1 1c 0c 00 00 mov 0xc1c,%eax 739: 89 45 fc mov %eax,-0x4(%ebp) 73c: eb 24 jmp 762 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 73e: 8b 45 fc mov -0x4(%ebp),%eax 741: 8b 00 mov (%eax),%eax 743: 3b 45 fc cmp -0x4(%ebp),%eax 746: 77 12 ja 75a <free+0x35> 748: 8b 45 f8 mov -0x8(%ebp),%eax 74b: 3b 45 fc cmp -0x4(%ebp),%eax 74e: 77 24 ja 774 <free+0x4f> 750: 8b 45 fc mov -0x4(%ebp),%eax 753: 8b 00 mov (%eax),%eax 755: 3b 45 f8 cmp -0x8(%ebp),%eax 758: 77 1a ja 774 <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 75a: 8b 45 fc mov -0x4(%ebp),%eax 75d: 8b 00 mov (%eax),%eax 75f: 89 45 fc mov %eax,-0x4(%ebp) 762: 8b 45 f8 mov -0x8(%ebp),%eax 765: 3b 45 fc cmp -0x4(%ebp),%eax 768: 76 d4 jbe 73e <free+0x19> 76a: 8b 45 fc mov -0x4(%ebp),%eax 76d: 8b 00 mov (%eax),%eax 76f: 3b 45 f8 cmp -0x8(%ebp),%eax 772: 76 ca jbe 73e <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 774: 8b 45 f8 mov -0x8(%ebp),%eax 777: 8b 40 04 mov 0x4(%eax),%eax 77a: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 781: 8b 45 f8 mov -0x8(%ebp),%eax 784: 01 c2 add %eax,%edx 786: 8b 45 fc mov -0x4(%ebp),%eax 789: 8b 00 mov (%eax),%eax 78b: 39 c2 cmp %eax,%edx 78d: 75 24 jne 7b3 <free+0x8e> bp->s.size += p->s.ptr->s.size; 78f: 8b 45 f8 mov -0x8(%ebp),%eax 792: 8b 50 04 mov 0x4(%eax),%edx 795: 8b 45 fc mov -0x4(%ebp),%eax 798: 8b 00 mov (%eax),%eax 79a: 8b 40 04 mov 0x4(%eax),%eax 79d: 01 c2 add %eax,%edx 79f: 8b 45 f8 mov -0x8(%ebp),%eax 7a2: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 7a5: 8b 45 fc mov -0x4(%ebp),%eax 7a8: 8b 00 mov (%eax),%eax 7aa: 8b 10 mov (%eax),%edx 7ac: 8b 45 f8 mov -0x8(%ebp),%eax 7af: 89 10 mov %edx,(%eax) 7b1: eb 0a jmp 7bd <free+0x98> } else bp->s.ptr = p->s.ptr; 7b3: 8b 45 fc mov -0x4(%ebp),%eax 7b6: 8b 10 mov (%eax),%edx 7b8: 8b 45 f8 mov -0x8(%ebp),%eax 7bb: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 7bd: 8b 45 fc mov -0x4(%ebp),%eax 7c0: 8b 40 04 mov 0x4(%eax),%eax 7c3: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 7ca: 8b 45 fc mov -0x4(%ebp),%eax 7cd: 01 d0 add %edx,%eax 7cf: 3b 45 f8 cmp -0x8(%ebp),%eax 7d2: 75 20 jne 7f4 <free+0xcf> p->s.size += bp->s.size; 7d4: 8b 45 fc mov -0x4(%ebp),%eax 7d7: 8b 50 04 mov 0x4(%eax),%edx 7da: 8b 45 f8 mov -0x8(%ebp),%eax 7dd: 8b 40 04 mov 0x4(%eax),%eax 7e0: 01 c2 add %eax,%edx 7e2: 8b 45 fc mov -0x4(%ebp),%eax 7e5: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 7e8: 8b 45 f8 mov -0x8(%ebp),%eax 7eb: 8b 10 mov (%eax),%edx 7ed: 8b 45 fc mov -0x4(%ebp),%eax 7f0: 89 10 mov %edx,(%eax) 7f2: eb 08 jmp 7fc <free+0xd7> } else p->s.ptr = bp; 7f4: 8b 45 fc mov -0x4(%ebp),%eax 7f7: 8b 55 f8 mov -0x8(%ebp),%edx 7fa: 89 10 mov %edx,(%eax) freep = p; 7fc: 8b 45 fc mov -0x4(%ebp),%eax 7ff: a3 1c 0c 00 00 mov %eax,0xc1c } 804: 90 nop 805: c9 leave 806: c3 ret 00000807 <morecore>: static Header* morecore(uint nu) { 807: 55 push %ebp 808: 89 e5 mov %esp,%ebp 80a: 83 ec 18 sub $0x18,%esp char *p; Header *hp; if(nu < 4096) 80d: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 814: 77 07 ja 81d <morecore+0x16> nu = 4096; 816: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 81d: 8b 45 08 mov 0x8(%ebp),%eax 820: c1 e0 03 shl $0x3,%eax 823: 83 ec 0c sub $0xc,%esp 826: 50 push %eax 827: e8 79 fc ff ff call 4a5 <sbrk> 82c: 83 c4 10 add $0x10,%esp 82f: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 832: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 836: 75 07 jne 83f <morecore+0x38> return 0; 838: b8 00 00 00 00 mov $0x0,%eax 83d: eb 26 jmp 865 <morecore+0x5e> hp = (Header*)p; 83f: 8b 45 f4 mov -0xc(%ebp),%eax 842: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 845: 8b 45 f0 mov -0x10(%ebp),%eax 848: 8b 55 08 mov 0x8(%ebp),%edx 84b: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 84e: 8b 45 f0 mov -0x10(%ebp),%eax 851: 83 c0 08 add $0x8,%eax 854: 83 ec 0c sub $0xc,%esp 857: 50 push %eax 858: e8 c8 fe ff ff call 725 <free> 85d: 83 c4 10 add $0x10,%esp return freep; 860: a1 1c 0c 00 00 mov 0xc1c,%eax } 865: c9 leave 866: c3 ret 00000867 <malloc>: void* malloc(uint nbytes) { 867: 55 push %ebp 868: 89 e5 mov %esp,%ebp 86a: 83 ec 18 sub $0x18,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 86d: 8b 45 08 mov 0x8(%ebp),%eax 870: 83 c0 07 add $0x7,%eax 873: c1 e8 03 shr $0x3,%eax 876: 83 c0 01 add $0x1,%eax 879: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 87c: a1 1c 0c 00 00 mov 0xc1c,%eax 881: 89 45 f0 mov %eax,-0x10(%ebp) 884: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 888: 75 23 jne 8ad <malloc+0x46> base.s.ptr = freep = prevp = &base; 88a: c7 45 f0 14 0c 00 00 movl $0xc14,-0x10(%ebp) 891: 8b 45 f0 mov -0x10(%ebp),%eax 894: a3 1c 0c 00 00 mov %eax,0xc1c 899: a1 1c 0c 00 00 mov 0xc1c,%eax 89e: a3 14 0c 00 00 mov %eax,0xc14 base.s.size = 0; 8a3: c7 05 18 0c 00 00 00 movl $0x0,0xc18 8aa: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 8ad: 8b 45 f0 mov -0x10(%ebp),%eax 8b0: 8b 00 mov (%eax),%eax 8b2: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 8b5: 8b 45 f4 mov -0xc(%ebp),%eax 8b8: 8b 40 04 mov 0x4(%eax),%eax 8bb: 3b 45 ec cmp -0x14(%ebp),%eax 8be: 72 4d jb 90d <malloc+0xa6> if(p->s.size == nunits) 8c0: 8b 45 f4 mov -0xc(%ebp),%eax 8c3: 8b 40 04 mov 0x4(%eax),%eax 8c6: 3b 45 ec cmp -0x14(%ebp),%eax 8c9: 75 0c jne 8d7 <malloc+0x70> prevp->s.ptr = p->s.ptr; 8cb: 8b 45 f4 mov -0xc(%ebp),%eax 8ce: 8b 10 mov (%eax),%edx 8d0: 8b 45 f0 mov -0x10(%ebp),%eax 8d3: 89 10 mov %edx,(%eax) 8d5: eb 26 jmp 8fd <malloc+0x96> else { p->s.size -= nunits; 8d7: 8b 45 f4 mov -0xc(%ebp),%eax 8da: 8b 40 04 mov 0x4(%eax),%eax 8dd: 2b 45 ec sub -0x14(%ebp),%eax 8e0: 89 c2 mov %eax,%edx 8e2: 8b 45 f4 mov -0xc(%ebp),%eax 8e5: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 8e8: 8b 45 f4 mov -0xc(%ebp),%eax 8eb: 8b 40 04 mov 0x4(%eax),%eax 8ee: c1 e0 03 shl $0x3,%eax 8f1: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 8f4: 8b 45 f4 mov -0xc(%ebp),%eax 8f7: 8b 55 ec mov -0x14(%ebp),%edx 8fa: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 8fd: 8b 45 f0 mov -0x10(%ebp),%eax 900: a3 1c 0c 00 00 mov %eax,0xc1c return (void*)(p + 1); 905: 8b 45 f4 mov -0xc(%ebp),%eax 908: 83 c0 08 add $0x8,%eax 90b: eb 3b jmp 948 <malloc+0xe1> } if(p == freep) 90d: a1 1c 0c 00 00 mov 0xc1c,%eax 912: 39 45 f4 cmp %eax,-0xc(%ebp) 915: 75 1e jne 935 <malloc+0xce> if((p = morecore(nunits)) == 0) 917: 83 ec 0c sub $0xc,%esp 91a: ff 75 ec pushl -0x14(%ebp) 91d: e8 e5 fe ff ff call 807 <morecore> 922: 83 c4 10 add $0x10,%esp 925: 89 45 f4 mov %eax,-0xc(%ebp) 928: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 92c: 75 07 jne 935 <malloc+0xce> return 0; 92e: b8 00 00 00 00 mov $0x0,%eax 933: eb 13 jmp 948 <malloc+0xe1> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 935: 8b 45 f4 mov -0xc(%ebp),%eax 938: 89 45 f0 mov %eax,-0x10(%ebp) 93b: 8b 45 f4 mov -0xc(%ebp),%eax 93e: 8b 00 mov (%eax),%eax 940: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 943: e9 6d ff ff ff jmp 8b5 <malloc+0x4e> } 948: c9 leave 949: c3 ret
MODULE asm_free PUBLIC asm_free EXTERN MAHeapFree EXTERN _heap ; Realloc using the thread's default heap ; ; enter : hl = void *p (existing pointer to memory) asm_free: ld de,_heap call MAHeapFree ccf ; newlib c on success, classic = nc on failure ret
//////////////////////////////////////////////////////////////////////////// // Module : script_sound_script.cpp // Created : 06.02.2004 // Modified : 06.02.2004 // Author : Dmitriy Iassenev // Description : XRay Script sound class script export //////////////////////////////////////////////////////////////////////////// #include "pch_script.h" #include "script_particles.h" using namespace luabind; #pragma optimize("s",on) void CScriptParticles::script_register(lua_State *L) { module(L) [ class_<CScriptParticles>("particles_object") .def( constructor<LPCSTR>()) .def("play", &CScriptParticles::Play) .def("play_at_pos", &CScriptParticles::PlayAtPos) .def("stop", &CScriptParticles::Stop) .def("stop_deffered", &CScriptParticles::StopDeffered) .def("playing", &CScriptParticles::IsPlaying) .def("looped", &CScriptParticles::IsLooped) .def("move_to", &CScriptParticles::MoveTo) .def("set_direction", &CScriptParticles::SetDirection) .def("set_orientation", &CScriptParticles::SetOrientation) .def("last_position", &CScriptParticles::LastPosition) .def("load_path", &CScriptParticles::LoadPath) .def("start_path", &CScriptParticles::StartPath) .def("stop_path", &CScriptParticles::StopPath) .def("pause_path", &CScriptParticles::PausePath) ]; }
/******************************************************************************* * The MIT License (MIT) * * Copyright (c) 2016 Jean-David Gadina - www.xs-labs.com * * 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. ******************************************************************************/ /*! * @file CXX-Log.cpp * @copyright (c) 2016, Jean-David Gadina - www.xs-labs.com */ #include <ULog/ULog.h> namespace ULog { bool IsEnabled( void ) { Logger * logger; logger = Logger::SharedInstance(); if( logger ) { return logger->IsEnabled(); } return false; } void SetEnabled( bool value ) { Logger * logger; logger = Logger::SharedInstance(); if( logger ) { logger->SetEnabled( value ); } } void Clear( void ) { Logger * logger; logger = Logger::SharedInstance(); if( logger ) { logger->Clear(); } } void AddLogFile( const std::string & path ) { Logger * logger; logger = Logger::SharedInstance(); if( logger ) { logger->AddLogFile( path ); } } void Log( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Log( fmt, ap ); va_end( ap ); } void Log( const char * fmt, va_list ap ) { Logger * logger; logger = Logger::SharedInstance(); if( logger ) { logger->Log( fmt, ap ); } } void Log( Message::Level level, const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Log( level, fmt, ap ); va_end( ap ); } void Log( Message::Level level, const char * fmt, va_list ap ) { Logger * logger; logger = Logger::SharedInstance(); if( logger ) { logger->Log( level, fmt, ap ); } } void Emergency( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Emergency( fmt, ap ); va_end( ap ); } void Emergency( const char * fmt, va_list ap ) { Log( Message::LevelEmergency, fmt, ap ); } void Alert( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Alert( fmt, ap ); va_end( ap ); } void Alert( const char * fmt, va_list ap ) { Log( Message::LevelAlert, fmt, ap ); } void Critical( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Critical( fmt, ap ); va_end( ap ); } void Critical( const char * fmt, va_list ap ) { Log( Message::LevelCritical, fmt, ap ); } void Error( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Error( fmt, ap ); va_end( ap ); } void Error( const char * fmt, va_list ap ) { Log( Message::LevelError, fmt, ap ); } void Warning( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Warning( fmt, ap ); va_end( ap ); } void Warning( const char * fmt, va_list ap ) { Log( Message::LevelWarning, fmt, ap ); } void Notice( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Notice( fmt, ap ); va_end( ap ); } void Notice( const char * fmt, va_list ap ) { Log( Message::LevelNotice, fmt, ap ); } void Info( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Info( fmt, ap ); va_end( ap ); } void Info( const char * fmt, va_list ap ) { Log( Message::LevelInfo, fmt, ap ); } void Debug( const char * fmt, ... ) { va_list ap; va_start( ap, fmt ); Debug( fmt, ap ); va_end( ap ); } void Debug( const char * fmt, va_list ap ) { Log( Message::LevelDebug, fmt, ap ); } }
; =============================================================== ; May 2016 ; =============================================================== ; ; char *lltoa(uint64_t num, char *buf, int radix) ; ; Write number to ascii buffer in radix indicated and zero ; terminate. ; ; If radix==10, the number is treated as signed and a minus ; sign may be written to the buffer. ; ; =============================================================== SECTION code_clib SECTION code_stdlib PUBLIC asm_lltoa, asm0_lltoa, asm1_lltoa EXTERN error_zc, error_einval_zc, l_valid_base EXTERN asm1_ulltoa, l_neg_64_dehldehl asm_lltoa: ; enter : dehl'dehl = unsigned long long num ; ix = char *buf ; bc = int radix ; ; exit : hl = address of terminating 0 in buf ; carry reset no errors ; ; error : (*) if buf == 0 ; carry set, hl = 0 ; ; (*) if radix is invalid ; carry set, hl = 0, errno=EINVAL ; ; uses : af, bc, de, hl, bc', de', hl' ld a,ixh or ixl jp z, error_zc ; if buf == NULL asm0_lltoa: ; bypass NULL check call l_valid_base ; radix in [2,36]? jp nc, error_einval_zc asm1_lltoa: ; base 10 is signed cp 10 jp nz, asm1_ulltoa ; if not base 10 exx bit 7,d exx jp z, asm1_ulltoa ; if num is positive call l_neg_64_dehldehl ld (ix+0),'-' inc ix call asm1_ulltoa dec ix ret
PresetsMenu100early: dw #presets_goto_100early_crateria dw #presets_goto_100early_brinstar dw #presets_goto_100early_speed_booster dw #presets_goto_100early_grapple dw #presets_goto_100early_red_tower_and_crateria dw #presets_goto_100early_wrecked_ship dw #presets_goto_100early_brinstar_cleanup dw #presets_goto_100early_maridia_predraygon dw #presets_goto_100early_maridia_postdraygon dw #presets_goto_100early_kraidicekronic dw #presets_goto_100early_lower_norfair dw #presets_goto_100early_final_cleanup dw #presets_goto_100early_tourian dw #$0000 %cm_header("100% ITEMS - EARLY CROC") presets_goto_100early_crateria: %cm_submenu("Crateria", #presets_submenu_100early_crateria) presets_goto_100early_brinstar: %cm_submenu("Brinstar", #presets_submenu_100early_brinstar) presets_goto_100early_speed_booster: %cm_submenu("Speed Booster", #presets_submenu_100early_speed_booster) presets_goto_100early_grapple: %cm_submenu("Grapple", #presets_submenu_100early_grapple) presets_goto_100early_red_tower_and_crateria: %cm_submenu("Red Tower and Crateria", #presets_submenu_100early_red_tower_and_crateria) presets_goto_100early_wrecked_ship: %cm_submenu("Wrecked Ship", #presets_submenu_100early_wrecked_ship) presets_goto_100early_brinstar_cleanup: %cm_submenu("Brinstar Cleanup", #presets_submenu_100early_brinstar_cleanup) presets_goto_100early_maridia_predraygon: %cm_submenu("Maridia Pre-Draygon", #presets_submenu_100early_maridia_predraygon) presets_goto_100early_maridia_postdraygon: %cm_submenu("Maridia Post-Draygon", #presets_submenu_100early_maridia_postdraygon) presets_goto_100early_kraidicekronic: %cm_submenu("Kraid-Ice-Kronic", #presets_submenu_100early_kraidicekronic) presets_goto_100early_lower_norfair: %cm_submenu("Lower Norfair", #presets_submenu_100early_lower_norfair) presets_goto_100early_final_cleanup: %cm_submenu("Final Cleanup", #presets_submenu_100early_final_cleanup) presets_goto_100early_tourian: %cm_submenu("Tourian", #presets_submenu_100early_tourian) presets_submenu_100early_crateria: dw #presets_100early_crateria_ceres_elevator dw #presets_100early_crateria_ceres_escape dw #presets_100early_crateria_ceres_last_3_rooms dw #presets_100early_crateria_ship dw #presets_100early_crateria_parlor dw #presets_100early_crateria_climb_down dw #presets_100early_crateria_pit_room dw #presets_100early_crateria_morph dw #presets_100early_crateria_construction_zone_down dw #presets_100early_crateria_construction_zone_up dw #presets_100early_crateria_pit_room_revisit dw #presets_100early_crateria_climb_up dw #presets_100early_crateria_parlor_revisit dw #presets_100early_crateria_flyway dw #presets_100early_crateria_bomb_torizo dw #presets_100early_crateria_alcatraz dw #presets_100early_crateria_terminator dw #presets_100early_crateria_green_pirate_shaft dw #$0000 %cm_header("CRATERIA") presets_submenu_100early_brinstar: dw #presets_100early_brinstar_green_brinstar dw #presets_100early_brinstar_early_supers dw #presets_100early_brinstar_reverse_mockball dw #presets_100early_brinstar_dachora_room dw #presets_100early_brinstar_big_pink dw #presets_100early_brinstar_green_hill_zone dw #presets_100early_brinstar_red_tower dw #presets_100early_brinstar_skree_boost dw #presets_100early_brinstar_kraid_entry dw #presets_100early_brinstar_kraid_kihunter_room dw #presets_100early_brinstar_kraid dw #presets_100early_brinstar_leaving_varia dw #presets_100early_brinstar_leaving_kraid_hallway dw #presets_100early_brinstar_leaving_kraid_etank dw #$0000 %cm_header("BRINSTAR") presets_submenu_100early_speed_booster: dw #presets_100early_speed_booster_business_center dw #presets_100early_speed_booster_hijump dw #presets_100early_speed_booster_business_center_climb dw #presets_100early_speed_booster_cathedral_entrance dw #presets_100early_speed_booster_cathedral dw #presets_100early_speed_booster_rising_tide dw #presets_100early_speed_booster_bubble_mountain dw #presets_100early_speed_booster_bat_cave dw #presets_100early_speed_booster_leaving_speed_booster dw #$0000 %cm_header("SPEED BOOSTER") presets_submenu_100early_grapple: dw #presets_100early_grapple_single_chamber dw #presets_100early_grapple_double_chamber dw #presets_100early_grapple_double_chamber_revisited dw #presets_100early_grapple_bubble_mountain_revisited dw #presets_100early_grapple_red_pirate_shaft dw #presets_100early_grapple_crocomire dw #presets_100early_grapple_postcrocomire dw #presets_100early_grapple_leaving_power_bombs dw #presets_100early_grapple_postcrocomire_jump_room dw #presets_100early_grapple_leaving_grapple dw #presets_100early_grapple_postcrocomire_missiles dw #presets_100early_grapple_crocomire_revisit dw #presets_100early_grapple_crocomire_escape dw #presets_100early_grapple_business_center_return dw #$0000 %cm_header("GRAPPLE") presets_submenu_100early_red_tower_and_crateria: dw #presets_100early_red_tower_and_crateria_warehouse_elevator dw #presets_100early_red_tower_and_crateria_red_tower_climb dw #presets_100early_red_tower_and_crateria_hellway dw #presets_100early_red_tower_and_crateria_alpha_power_bombs dw #presets_100early_red_tower_and_crateria_elevator_room_ascent dw #presets_100early_red_tower_and_crateria_beta_power_bombs dw #presets_100early_red_tower_and_crateria_crateria_kihunters dw #presets_100early_red_tower_and_crateria_oceanfly dw #presets_100early_red_tower_and_crateria_the_moat dw #presets_100early_red_tower_and_crateria_ocean_spark dw #$0000 %cm_header("RED TOWER AND CRATERIA") presets_submenu_100early_wrecked_ship: dw #presets_100early_wrecked_ship_enter_wrecked_ship dw #presets_100early_wrecked_ship_phantoon dw #presets_100early_wrecked_ship_leaving_phantoon dw #presets_100early_wrecked_ship_east_supers dw #presets_100early_wrecked_ship_leaving_west_supers dw #presets_100early_wrecked_ship_spiky_room_of_death dw #presets_100early_wrecked_ship_wrecked_ship_etank dw #presets_100early_wrecked_ship_spiky_room_revisit dw #presets_100early_wrecked_ship_shaft_ascent dw #presets_100early_wrecked_ship_attic dw #presets_100early_wrecked_ship_attic_missiles dw #presets_100early_wrecked_ship_attic_revisit dw #presets_100early_wrecked_ship_sky_missiles dw #presets_100early_wrecked_ship_bowling_alley_path dw #presets_100early_wrecked_ship_bowling_alley dw #presets_100early_wrecked_ship_leaving_gravity dw #$0000 %cm_header("WRECKED SHIP") presets_submenu_100early_brinstar_cleanup: dw #presets_100early_brinstar_cleanup_landing_site dw #presets_100early_brinstar_cleanup_gauntlet_spark dw #presets_100early_brinstar_cleanup_gauntlet_etank dw #presets_100early_brinstar_cleanup_leaving_gauntlet dw #presets_100early_brinstar_cleanup_green_brinstar_elevator dw #presets_100early_brinstar_cleanup_green_brinstar_beetoms dw #presets_100early_brinstar_cleanup_etecoon_etank_room dw #presets_100early_brinstar_cleanup_etecoon_room dw #presets_100early_brinstar_cleanup_dachora_room_revisit dw #presets_100early_brinstar_cleanup_big_pink_revisit dw #presets_100early_brinstar_cleanup_big_pink_power_bombs dw #presets_100early_brinstar_cleanup_big_pink_hopper_room dw #presets_100early_brinstar_cleanup_spore_spawn_supers dw #presets_100early_brinstar_cleanup_waterway_etank dw #presets_100early_brinstar_cleanup_green_hills_revisit dw #presets_100early_brinstar_cleanup_blockbuster dw #$0000 %cm_header("BRINSTAR CLEANUP") presets_submenu_100early_maridia_predraygon: dw #presets_100early_maridia_predraygon_main_street dw #presets_100early_maridia_predraygon_fish_tank dw #presets_100early_maridia_predraygon_mama_turtle_etank dw #presets_100early_maridia_predraygon_fish_tank_revisit dw #presets_100early_maridia_predraygon_mt_everest dw #presets_100early_maridia_predraygon_beach_missiles dw #presets_100early_maridia_predraygon_west_beach dw #presets_100early_maridia_predraygon_watering_hole dw #presets_100early_maridia_predraygon_west_beach_revisit dw #presets_100early_maridia_predraygon_beach_missiles_revisit dw #presets_100early_maridia_predraygon_aqueduct dw #presets_100early_maridia_predraygon_botwoon dw #presets_100early_maridia_predraygon_full_halfie dw #presets_100early_maridia_predraygon_draygon_missiles dw #presets_100early_maridia_predraygon_draygon dw #$0000 %cm_header("MARIDIA PRE-DRAYGON") presets_submenu_100early_maridia_postdraygon: dw #presets_100early_maridia_postdraygon_return_halfie dw #presets_100early_maridia_postdraygon_reverse_botwoon_etank dw #presets_100early_maridia_postdraygon_east_sand_pit dw #presets_100early_maridia_postdraygon_pants_room dw #presets_100early_maridia_postdraygon_shaktool dw #presets_100early_maridia_postdraygon_shaktool_revisit dw #presets_100early_maridia_postdraygon_east_sand_hall dw #presets_100early_maridia_postdraygon_plasma_spark_room dw #presets_100early_maridia_postdraygon_kassiuz_room dw #presets_100early_maridia_postdraygon_plasma dw #presets_100early_maridia_postdraygon_leaving_plasma dw #presets_100early_maridia_postdraygon_leaving_kassiuz dw #presets_100early_maridia_postdraygon_cac_alley dw #presets_100early_maridia_postdraygon_botwoon_etank dw #presets_100early_maridia_postdraygon_aqueduct_final dw #presets_100early_maridia_postdraygon_west_sand_pit dw #presets_100early_maridia_postdraygon_thread_the_needle dw #$0000 %cm_header("MARIDIA POST-DRAYGON") presets_submenu_100early_kraidicekronic: dw #presets_100early_kraidicekronic_kraid_entrance_revisit dw #presets_100early_kraidicekronic_kraid_missiles dw #presets_100early_kraidicekronic_kraid_missiles_escape dw #presets_100early_kraidicekronic_ice_beam_gate_room dw #presets_100early_kraidicekronic_ice_beam_snake_room dw #presets_100early_kraidicekronic_snake_room_revisit dw #presets_100early_kraidicekronic_ice_escape dw #presets_100early_kraidicekronic_crumble_shaft_missiles dw #presets_100early_kraidicekronic_crocomire_speedway dw #presets_100early_kraidicekronic_kronic_boost dw #$0000 %cm_header("KRAID-ICE-KRONIC") presets_submenu_100early_lower_norfair: dw #presets_100early_lower_norfair_ln_main_hall dw #presets_100early_lower_norfair_golden_torizo dw #presets_100early_lower_norfair_leaving_golden_torizo dw #presets_100early_lower_norfair_fast_ripper_room dw #presets_100early_lower_norfair_worst_room_in_the_game dw #presets_100early_lower_norfair_mickey_mouse_missiles dw #presets_100early_lower_norfair_amphitheatre dw #presets_100early_lower_norfair_red_kihunter_shaft dw #presets_100early_lower_norfair_ninja_pirates dw #presets_100early_lower_norfair_plowerhouse_room dw #presets_100early_lower_norfair_ridley dw #presets_100early_lower_norfair_ridley_escape dw #presets_100early_lower_norfair_wasteland_revisit dw #presets_100early_lower_norfair_kihunter_shaft_revisit dw #presets_100early_lower_norfair_firefleas_room dw #presets_100early_lower_norfair_springball_maze dw #presets_100early_lower_norfair_three_muskateers dw #presets_100early_lower_norfair_bubble_mountain_return dw #presets_100early_lower_norfair_norfair_reserve dw #presets_100early_lower_norfair_bubble_mountain_final dw #presets_100early_lower_norfair_business_center_final dw #$0000 %cm_header("LOWER NORFAIR") presets_submenu_100early_final_cleanup: dw #presets_100early_final_cleanup_below_spazer dw #presets_100early_final_cleanup_red_tower_xray dw #presets_100early_final_cleanup_xray_passage dw #presets_100early_final_cleanup_xray_passage_return dw #presets_100early_final_cleanup_reverse_slinky dw #presets_100early_final_cleanup_retro_brinstar_hoppers dw #presets_100early_final_cleanup_retro_brinstar_etank dw #presets_100early_final_cleanup_boulder_room dw #presets_100early_final_cleanup_leaving_billy_mays dw #presets_100early_final_cleanup_retro_brinstar_escape dw #presets_100early_final_cleanup_old_tourian_missiles dw #presets_100early_final_cleanup_climb_supers dw #presets_100early_final_cleanup_parlor_missiles dw #presets_100early_final_cleanup_leaving_parlor_missiles dw #presets_100early_final_cleanup_terminator_revisit dw #$0000 %cm_header("FINAL CLEANUP") presets_submenu_100early_tourian: dw #presets_100early_tourian_metroids_1 dw #presets_100early_tourian_metroids_2 dw #presets_100early_tourian_metroids_3 dw #presets_100early_tourian_metroids_4 dw #presets_100early_tourian_baby_skip dw #presets_100early_tourian_after_baby_skip dw #presets_100early_tourian_zeb_skip dw #presets_100early_tourian_mother_brain_2 dw #presets_100early_tourian_zebes_escape dw #presets_100early_tourian_escape_room_3 dw #presets_100early_tourian_escape_room_4 dw #presets_100early_tourian_escape_climb dw #presets_100early_tourian_escape_parlor dw #$0000 %cm_header("TOURIAN") ; Crateria presets_100early_crateria_ceres_elevator: %cm_preset("Ceres Elevator", #preset_100early_crateria_ceres_elevator) presets_100early_crateria_ceres_escape: %cm_preset("Ceres Escape", #preset_100early_crateria_ceres_escape) presets_100early_crateria_ceres_last_3_rooms: %cm_preset("Ceres Last 3 rooms", #preset_100early_crateria_ceres_last_3_rooms) presets_100early_crateria_ship: %cm_preset("Ship", #preset_100early_crateria_ship) presets_100early_crateria_parlor: %cm_preset("Parlor", #preset_100early_crateria_parlor) presets_100early_crateria_climb_down: %cm_preset("Climb Down", #preset_100early_crateria_climb_down) presets_100early_crateria_pit_room: %cm_preset("Pit Room", #preset_100early_crateria_pit_room) presets_100early_crateria_morph: %cm_preset("Morph", #preset_100early_crateria_morph) presets_100early_crateria_construction_zone_down: %cm_preset("Construction Zone Down", #preset_100early_crateria_construction_zone_down) presets_100early_crateria_construction_zone_up: %cm_preset("Construction Zone Up", #preset_100early_crateria_construction_zone_up) presets_100early_crateria_pit_room_revisit: %cm_preset("Pit Room Revisit", #preset_100early_crateria_pit_room_revisit) presets_100early_crateria_climb_up: %cm_preset("Climb Up", #preset_100early_crateria_climb_up) presets_100early_crateria_parlor_revisit: %cm_preset("Parlor Revisit", #preset_100early_crateria_parlor_revisit) presets_100early_crateria_flyway: %cm_preset("Flyway", #preset_100early_crateria_flyway) presets_100early_crateria_bomb_torizo: %cm_preset("Bomb Torizo", #preset_100early_crateria_bomb_torizo) presets_100early_crateria_alcatraz: %cm_preset("Alcatraz", #preset_100early_crateria_alcatraz) presets_100early_crateria_terminator: %cm_preset("Terminator", #preset_100early_crateria_terminator) presets_100early_crateria_green_pirate_shaft: %cm_preset("Green Pirate Shaft", #preset_100early_crateria_green_pirate_shaft) ; Brinstar presets_100early_brinstar_green_brinstar: %cm_preset("Green Brinstar", #preset_100early_brinstar_green_brinstar) presets_100early_brinstar_early_supers: %cm_preset("Early Supers", #preset_100early_brinstar_early_supers) presets_100early_brinstar_reverse_mockball: %cm_preset("Reverse Mockball", #preset_100early_brinstar_reverse_mockball) presets_100early_brinstar_dachora_room: %cm_preset("Dachora Room", #preset_100early_brinstar_dachora_room) presets_100early_brinstar_big_pink: %cm_preset("Big Pink", #preset_100early_brinstar_big_pink) presets_100early_brinstar_green_hill_zone: %cm_preset("Green Hill Zone", #preset_100early_brinstar_green_hill_zone) presets_100early_brinstar_red_tower: %cm_preset("Red Tower", #preset_100early_brinstar_red_tower) presets_100early_brinstar_skree_boost: %cm_preset("Skree Boost", #preset_100early_brinstar_skree_boost) presets_100early_brinstar_kraid_entry: %cm_preset("Kraid Entry", #preset_100early_brinstar_kraid_entry) presets_100early_brinstar_kraid_kihunter_room: %cm_preset("Kraid Kihunter Room", #preset_100early_brinstar_kraid_kihunter_room) presets_100early_brinstar_kraid: %cm_preset("Kraid", #preset_100early_brinstar_kraid) presets_100early_brinstar_leaving_varia: %cm_preset("Leaving Varia", #preset_100early_brinstar_leaving_varia) presets_100early_brinstar_leaving_kraid_hallway: %cm_preset("Leaving Kraid Hallway", #preset_100early_brinstar_leaving_kraid_hallway) presets_100early_brinstar_leaving_kraid_etank: %cm_preset("Leaving Kraid E-Tank", #preset_100early_brinstar_leaving_kraid_etank) ; Speed Booster presets_100early_speed_booster_business_center: %cm_preset("Business Center", #preset_100early_speed_booster_business_center) presets_100early_speed_booster_hijump: %cm_preset("Hi-Jump", #preset_100early_speed_booster_hijump) presets_100early_speed_booster_business_center_climb: %cm_preset("Business Center Climb", #preset_100early_speed_booster_business_center_climb) presets_100early_speed_booster_cathedral_entrance: %cm_preset("Cathedral Entrance", #preset_100early_speed_booster_cathedral_entrance) presets_100early_speed_booster_cathedral: %cm_preset("Cathedral", #preset_100early_speed_booster_cathedral) presets_100early_speed_booster_rising_tide: %cm_preset("Rising Tide", #preset_100early_speed_booster_rising_tide) presets_100early_speed_booster_bubble_mountain: %cm_preset("Bubble Mountain", #preset_100early_speed_booster_bubble_mountain) presets_100early_speed_booster_bat_cave: %cm_preset("Bat Cave", #preset_100early_speed_booster_bat_cave) presets_100early_speed_booster_leaving_speed_booster: %cm_preset("Leaving Speed Booster", #preset_100early_speed_booster_leaving_speed_booster) ; Grapple presets_100early_grapple_single_chamber: %cm_preset("Single Chamber", #preset_100early_grapple_single_chamber) presets_100early_grapple_double_chamber: %cm_preset("Double Chamber", #preset_100early_grapple_double_chamber) presets_100early_grapple_double_chamber_revisited: %cm_preset("Double Chamber Revisited", #preset_100early_grapple_double_chamber_revisited) presets_100early_grapple_bubble_mountain_revisited: %cm_preset("Bubble Mountain Revisited", #preset_100early_grapple_bubble_mountain_revisited) presets_100early_grapple_red_pirate_shaft: %cm_preset("Red Pirate Shaft", #preset_100early_grapple_red_pirate_shaft) presets_100early_grapple_crocomire: %cm_preset("Crocomire", #preset_100early_grapple_crocomire) presets_100early_grapple_postcrocomire: %cm_preset("Post-Crocomire", #preset_100early_grapple_postcrocomire) presets_100early_grapple_leaving_power_bombs: %cm_preset("Leaving Power Bombs", #preset_100early_grapple_leaving_power_bombs) presets_100early_grapple_postcrocomire_jump_room: %cm_preset("Post-Crocomire Jump Room", #preset_100early_grapple_postcrocomire_jump_room) presets_100early_grapple_leaving_grapple: %cm_preset("Leaving Grapple", #preset_100early_grapple_leaving_grapple) presets_100early_grapple_postcrocomire_missiles: %cm_preset("Post-Crocomire Missiles", #preset_100early_grapple_postcrocomire_missiles) presets_100early_grapple_crocomire_revisit: %cm_preset("Crocomire Revisit", #preset_100early_grapple_crocomire_revisit) presets_100early_grapple_crocomire_escape: %cm_preset("Crocomire Escape", #preset_100early_grapple_crocomire_escape) presets_100early_grapple_business_center_return: %cm_preset("Business Center Return", #preset_100early_grapple_business_center_return) ; Red Tower and Crateria presets_100early_red_tower_and_crateria_warehouse_elevator: %cm_preset("Warehouse Elevator", #preset_100early_red_tower_and_crateria_warehouse_elevator) presets_100early_red_tower_and_crateria_red_tower_climb: %cm_preset("Red Tower Climb", #preset_100early_red_tower_and_crateria_red_tower_climb) presets_100early_red_tower_and_crateria_hellway: %cm_preset("Hellway", #preset_100early_red_tower_and_crateria_hellway) presets_100early_red_tower_and_crateria_alpha_power_bombs: %cm_preset("Alpha Power Bombs", #preset_100early_red_tower_and_crateria_alpha_power_bombs) presets_100early_red_tower_and_crateria_elevator_room_ascent: %cm_preset("Elevator Room Ascent", #preset_100early_red_tower_and_crateria_elevator_room_ascent) presets_100early_red_tower_and_crateria_beta_power_bombs: %cm_preset("Beta Power Bombs", #preset_100early_red_tower_and_crateria_beta_power_bombs) presets_100early_red_tower_and_crateria_crateria_kihunters: %cm_preset("Crateria Kihunters", #preset_100early_red_tower_and_crateria_crateria_kihunters) presets_100early_red_tower_and_crateria_oceanfly: %cm_preset("Oceanfly", #preset_100early_red_tower_and_crateria_oceanfly) presets_100early_red_tower_and_crateria_the_moat: %cm_preset("The Moat", #preset_100early_red_tower_and_crateria_the_moat) presets_100early_red_tower_and_crateria_ocean_spark: %cm_preset("Ocean Spark", #preset_100early_red_tower_and_crateria_ocean_spark) ; Wrecked Ship presets_100early_wrecked_ship_enter_wrecked_ship: %cm_preset("Enter Wrecked Ship", #preset_100early_wrecked_ship_enter_wrecked_ship) presets_100early_wrecked_ship_phantoon: %cm_preset("Phantoon", #preset_100early_wrecked_ship_phantoon) presets_100early_wrecked_ship_leaving_phantoon: %cm_preset("Leaving Phantoon", #preset_100early_wrecked_ship_leaving_phantoon) presets_100early_wrecked_ship_east_supers: %cm_preset("East Supers", #preset_100early_wrecked_ship_east_supers) presets_100early_wrecked_ship_leaving_west_supers: %cm_preset("Leaving West Supers", #preset_100early_wrecked_ship_leaving_west_supers) presets_100early_wrecked_ship_spiky_room_of_death: %cm_preset("Spiky Room of Death", #preset_100early_wrecked_ship_spiky_room_of_death) presets_100early_wrecked_ship_wrecked_ship_etank: %cm_preset("Wrecked Ship E-Tank", #preset_100early_wrecked_ship_wrecked_ship_etank) presets_100early_wrecked_ship_spiky_room_revisit: %cm_preset("Spiky Room Revisit", #preset_100early_wrecked_ship_spiky_room_revisit) presets_100early_wrecked_ship_shaft_ascent: %cm_preset("Shaft Ascent", #preset_100early_wrecked_ship_shaft_ascent) presets_100early_wrecked_ship_attic: %cm_preset("Attic", #preset_100early_wrecked_ship_attic) presets_100early_wrecked_ship_attic_missiles: %cm_preset("Attic Missiles", #preset_100early_wrecked_ship_attic_missiles) presets_100early_wrecked_ship_attic_revisit: %cm_preset("Attic Revisit", #preset_100early_wrecked_ship_attic_revisit) presets_100early_wrecked_ship_sky_missiles: %cm_preset("Sky Missiles", #preset_100early_wrecked_ship_sky_missiles) presets_100early_wrecked_ship_bowling_alley_path: %cm_preset("Bowling Alley Path", #preset_100early_wrecked_ship_bowling_alley_path) presets_100early_wrecked_ship_bowling_alley: %cm_preset("Bowling Alley", #preset_100early_wrecked_ship_bowling_alley) presets_100early_wrecked_ship_leaving_gravity: %cm_preset("Leaving Gravity", #preset_100early_wrecked_ship_leaving_gravity) ; Brinstar Cleanup presets_100early_brinstar_cleanup_landing_site: %cm_preset("Landing Site", #preset_100early_brinstar_cleanup_landing_site) presets_100early_brinstar_cleanup_gauntlet_spark: %cm_preset("Gauntlet Spark", #preset_100early_brinstar_cleanup_gauntlet_spark) presets_100early_brinstar_cleanup_gauntlet_etank: %cm_preset("Gauntlet E-Tank", #preset_100early_brinstar_cleanup_gauntlet_etank) presets_100early_brinstar_cleanup_leaving_gauntlet: %cm_preset("Leaving Gauntlet", #preset_100early_brinstar_cleanup_leaving_gauntlet) presets_100early_brinstar_cleanup_green_brinstar_elevator: %cm_preset("Green Brinstar Elevator", #preset_100early_brinstar_cleanup_green_brinstar_elevator) presets_100early_brinstar_cleanup_green_brinstar_beetoms: %cm_preset("Green Brinstar Beetoms", #preset_100early_brinstar_cleanup_green_brinstar_beetoms) presets_100early_brinstar_cleanup_etecoon_etank_room: %cm_preset("Etecoon E-Tank Room", #preset_100early_brinstar_cleanup_etecoon_etank_room) presets_100early_brinstar_cleanup_etecoon_room: %cm_preset("Etecoon Room", #preset_100early_brinstar_cleanup_etecoon_room) presets_100early_brinstar_cleanup_dachora_room_revisit: %cm_preset("Dachora Room Revisit", #preset_100early_brinstar_cleanup_dachora_room_revisit) presets_100early_brinstar_cleanup_big_pink_revisit: %cm_preset("Big Pink Revisit", #preset_100early_brinstar_cleanup_big_pink_revisit) presets_100early_brinstar_cleanup_big_pink_power_bombs: %cm_preset("Big Pink Power Bombs", #preset_100early_brinstar_cleanup_big_pink_power_bombs) presets_100early_brinstar_cleanup_big_pink_hopper_room: %cm_preset("Big Pink Hopper Room", #preset_100early_brinstar_cleanup_big_pink_hopper_room) presets_100early_brinstar_cleanup_spore_spawn_supers: %cm_preset("Spore Spawn Supers", #preset_100early_brinstar_cleanup_spore_spawn_supers) presets_100early_brinstar_cleanup_waterway_etank: %cm_preset("Waterway E-Tank", #preset_100early_brinstar_cleanup_waterway_etank) presets_100early_brinstar_cleanup_green_hills_revisit: %cm_preset("Green Hills Revisit", #preset_100early_brinstar_cleanup_green_hills_revisit) presets_100early_brinstar_cleanup_blockbuster: %cm_preset("Blockbuster", #preset_100early_brinstar_cleanup_blockbuster) ; Maridia Pre-Draygon presets_100early_maridia_predraygon_main_street: %cm_preset("Main Street", #preset_100early_maridia_predraygon_main_street) presets_100early_maridia_predraygon_fish_tank: %cm_preset("Fish Tank", #preset_100early_maridia_predraygon_fish_tank) presets_100early_maridia_predraygon_mama_turtle_etank: %cm_preset("Mama Turtle E-Tank", #preset_100early_maridia_predraygon_mama_turtle_etank) presets_100early_maridia_predraygon_fish_tank_revisit: %cm_preset("Fish Tank Revisit", #preset_100early_maridia_predraygon_fish_tank_revisit) presets_100early_maridia_predraygon_mt_everest: %cm_preset("Mt Everest", #preset_100early_maridia_predraygon_mt_everest) presets_100early_maridia_predraygon_beach_missiles: %cm_preset("Beach Missiles", #preset_100early_maridia_predraygon_beach_missiles) presets_100early_maridia_predraygon_west_beach: %cm_preset("West Beach", #preset_100early_maridia_predraygon_west_beach) presets_100early_maridia_predraygon_watering_hole: %cm_preset("Watering Hole", #preset_100early_maridia_predraygon_watering_hole) presets_100early_maridia_predraygon_west_beach_revisit: %cm_preset("West Beach Revisit", #preset_100early_maridia_predraygon_west_beach_revisit) presets_100early_maridia_predraygon_beach_missiles_revisit: %cm_preset("Beach Missiles Revisit", #preset_100early_maridia_predraygon_beach_missiles_revisit) presets_100early_maridia_predraygon_aqueduct: %cm_preset("Aqueduct", #preset_100early_maridia_predraygon_aqueduct) presets_100early_maridia_predraygon_botwoon: %cm_preset("Botwoon", #preset_100early_maridia_predraygon_botwoon) presets_100early_maridia_predraygon_full_halfie: %cm_preset("Full Halfie", #preset_100early_maridia_predraygon_full_halfie) presets_100early_maridia_predraygon_draygon_missiles: %cm_preset("Draygon Missiles", #preset_100early_maridia_predraygon_draygon_missiles) presets_100early_maridia_predraygon_draygon: %cm_preset("Draygon", #preset_100early_maridia_predraygon_draygon) ; Maridia Post-Draygon presets_100early_maridia_postdraygon_return_halfie: %cm_preset("Return Halfie", #preset_100early_maridia_postdraygon_return_halfie) presets_100early_maridia_postdraygon_reverse_botwoon_etank: %cm_preset("Reverse Botwoon E-Tank", #preset_100early_maridia_postdraygon_reverse_botwoon_etank) presets_100early_maridia_postdraygon_east_sand_pit: %cm_preset("East Sand Pit", #preset_100early_maridia_postdraygon_east_sand_pit) presets_100early_maridia_postdraygon_pants_room: %cm_preset("Pants Room", #preset_100early_maridia_postdraygon_pants_room) presets_100early_maridia_postdraygon_shaktool: %cm_preset("Shaktool", #preset_100early_maridia_postdraygon_shaktool) presets_100early_maridia_postdraygon_shaktool_revisit: %cm_preset("Shaktool Revisit", #preset_100early_maridia_postdraygon_shaktool_revisit) presets_100early_maridia_postdraygon_east_sand_hall: %cm_preset("East Sand Hall", #preset_100early_maridia_postdraygon_east_sand_hall) presets_100early_maridia_postdraygon_plasma_spark_room: %cm_preset("Plasma Spark Room", #preset_100early_maridia_postdraygon_plasma_spark_room) presets_100early_maridia_postdraygon_kassiuz_room: %cm_preset("Kassiuz Room", #preset_100early_maridia_postdraygon_kassiuz_room) presets_100early_maridia_postdraygon_plasma: %cm_preset("Plasma", #preset_100early_maridia_postdraygon_plasma) presets_100early_maridia_postdraygon_leaving_plasma: %cm_preset("Leaving Plasma", #preset_100early_maridia_postdraygon_leaving_plasma) presets_100early_maridia_postdraygon_leaving_kassiuz: %cm_preset("Leaving Kassiuz", #preset_100early_maridia_postdraygon_leaving_kassiuz) presets_100early_maridia_postdraygon_cac_alley: %cm_preset("Cac Alley", #preset_100early_maridia_postdraygon_cac_alley) presets_100early_maridia_postdraygon_botwoon_etank: %cm_preset("Botwoon E-Tank", #preset_100early_maridia_postdraygon_botwoon_etank) presets_100early_maridia_postdraygon_aqueduct_final: %cm_preset("Aqueduct Final", #preset_100early_maridia_postdraygon_aqueduct_final) presets_100early_maridia_postdraygon_west_sand_pit: %cm_preset("West Sand Pit", #preset_100early_maridia_postdraygon_west_sand_pit) presets_100early_maridia_postdraygon_thread_the_needle: %cm_preset("Thread the Needle", #preset_100early_maridia_postdraygon_thread_the_needle) ; Kraid-Ice-Kronic presets_100early_kraidicekronic_kraid_entrance_revisit: %cm_preset("Kraid Entrance Revisit", #preset_100early_kraidicekronic_kraid_entrance_revisit) presets_100early_kraidicekronic_kraid_missiles: %cm_preset("Kraid Missiles", #preset_100early_kraidicekronic_kraid_missiles) presets_100early_kraidicekronic_kraid_missiles_escape: %cm_preset("Kraid Missiles Escape", #preset_100early_kraidicekronic_kraid_missiles_escape) presets_100early_kraidicekronic_ice_beam_gate_room: %cm_preset("Ice Beam Gate Room", #preset_100early_kraidicekronic_ice_beam_gate_room) presets_100early_kraidicekronic_ice_beam_snake_room: %cm_preset("Ice Beam Snake Room", #preset_100early_kraidicekronic_ice_beam_snake_room) presets_100early_kraidicekronic_snake_room_revisit: %cm_preset("Snake Room Revisit", #preset_100early_kraidicekronic_snake_room_revisit) presets_100early_kraidicekronic_ice_escape: %cm_preset("Ice Escape", #preset_100early_kraidicekronic_ice_escape) presets_100early_kraidicekronic_crumble_shaft_missiles: %cm_preset("Crumble Shaft Missiles", #preset_100early_kraidicekronic_crumble_shaft_missiles) presets_100early_kraidicekronic_crocomire_speedway: %cm_preset("Crocomire Speedway", #preset_100early_kraidicekronic_crocomire_speedway) presets_100early_kraidicekronic_kronic_boost: %cm_preset("Kronic Boost", #preset_100early_kraidicekronic_kronic_boost) ; Lower Norfair presets_100early_lower_norfair_ln_main_hall: %cm_preset("LN Main Hall", #preset_100early_lower_norfair_ln_main_hall) presets_100early_lower_norfair_golden_torizo: %cm_preset("Golden Torizo", #preset_100early_lower_norfair_golden_torizo) presets_100early_lower_norfair_leaving_golden_torizo: %cm_preset("Leaving Golden Torizo", #preset_100early_lower_norfair_leaving_golden_torizo) presets_100early_lower_norfair_fast_ripper_room: %cm_preset("Fast Ripper Room", #preset_100early_lower_norfair_fast_ripper_room) presets_100early_lower_norfair_worst_room_in_the_game: %cm_preset("Worst Room in the Game", #preset_100early_lower_norfair_worst_room_in_the_game) presets_100early_lower_norfair_mickey_mouse_missiles: %cm_preset("Mickey Mouse Missiles", #preset_100early_lower_norfair_mickey_mouse_missiles) presets_100early_lower_norfair_amphitheatre: %cm_preset("Amphitheatre", #preset_100early_lower_norfair_amphitheatre) presets_100early_lower_norfair_red_kihunter_shaft: %cm_preset("Red Kihunter Shaft", #preset_100early_lower_norfair_red_kihunter_shaft) presets_100early_lower_norfair_ninja_pirates: %cm_preset("Ninja Pirates", #preset_100early_lower_norfair_ninja_pirates) presets_100early_lower_norfair_plowerhouse_room: %cm_preset("Plowerhouse Room", #preset_100early_lower_norfair_plowerhouse_room) presets_100early_lower_norfair_ridley: %cm_preset("Ridley", #preset_100early_lower_norfair_ridley) presets_100early_lower_norfair_ridley_escape: %cm_preset("Ridley Escape", #preset_100early_lower_norfair_ridley_escape) presets_100early_lower_norfair_wasteland_revisit: %cm_preset("Wasteland Revisit", #preset_100early_lower_norfair_wasteland_revisit) presets_100early_lower_norfair_kihunter_shaft_revisit: %cm_preset("Kihunter Shaft Revisit", #preset_100early_lower_norfair_kihunter_shaft_revisit) presets_100early_lower_norfair_firefleas_room: %cm_preset("Firefleas Room", #preset_100early_lower_norfair_firefleas_room) presets_100early_lower_norfair_springball_maze: %cm_preset("Springball Maze", #preset_100early_lower_norfair_springball_maze) presets_100early_lower_norfair_three_muskateers: %cm_preset("Three Muskateers", #preset_100early_lower_norfair_three_muskateers) presets_100early_lower_norfair_bubble_mountain_return: %cm_preset("Bubble Mountain Return", #preset_100early_lower_norfair_bubble_mountain_return) presets_100early_lower_norfair_norfair_reserve: %cm_preset("Norfair Reserve", #preset_100early_lower_norfair_norfair_reserve) presets_100early_lower_norfair_bubble_mountain_final: %cm_preset("Bubble Mountain Final", #preset_100early_lower_norfair_bubble_mountain_final) presets_100early_lower_norfair_business_center_final: %cm_preset("Business Center Final", #preset_100early_lower_norfair_business_center_final) ; Final Cleanup presets_100early_final_cleanup_below_spazer: %cm_preset("Below Spazer", #preset_100early_final_cleanup_below_spazer) presets_100early_final_cleanup_red_tower_xray: %cm_preset("Red Tower X-Ray", #preset_100early_final_cleanup_red_tower_xray) presets_100early_final_cleanup_xray_passage: %cm_preset("X-Ray Passage", #preset_100early_final_cleanup_xray_passage) presets_100early_final_cleanup_xray_passage_return: %cm_preset("X-Ray Passage Return", #preset_100early_final_cleanup_xray_passage_return) presets_100early_final_cleanup_reverse_slinky: %cm_preset("Reverse Slinky", #preset_100early_final_cleanup_reverse_slinky) presets_100early_final_cleanup_retro_brinstar_hoppers: %cm_preset("Retro Brinstar Hoppers", #preset_100early_final_cleanup_retro_brinstar_hoppers) presets_100early_final_cleanup_retro_brinstar_etank: %cm_preset("Retro Brinstar E-Tank", #preset_100early_final_cleanup_retro_brinstar_etank) presets_100early_final_cleanup_boulder_room: %cm_preset("Boulder Room", #preset_100early_final_cleanup_boulder_room) presets_100early_final_cleanup_leaving_billy_mays: %cm_preset("Leaving Billy Mays", #preset_100early_final_cleanup_leaving_billy_mays) presets_100early_final_cleanup_retro_brinstar_escape: %cm_preset("Retro Brinstar Escape", #preset_100early_final_cleanup_retro_brinstar_escape) presets_100early_final_cleanup_old_tourian_missiles: %cm_preset("Old Tourian Missiles", #preset_100early_final_cleanup_old_tourian_missiles) presets_100early_final_cleanup_climb_supers: %cm_preset("Climb Supers", #preset_100early_final_cleanup_climb_supers) presets_100early_final_cleanup_parlor_missiles: %cm_preset("Parlor Missiles", #preset_100early_final_cleanup_parlor_missiles) presets_100early_final_cleanup_leaving_parlor_missiles: %cm_preset("Leaving Parlor Missiles", #preset_100early_final_cleanup_leaving_parlor_missiles) presets_100early_final_cleanup_terminator_revisit: %cm_preset("Terminator Revisit", #preset_100early_final_cleanup_terminator_revisit) ; Tourian presets_100early_tourian_metroids_1: %cm_preset("Metroids 1", #preset_100early_tourian_metroids_1) presets_100early_tourian_metroids_2: %cm_preset("Metroids 2", #preset_100early_tourian_metroids_2) presets_100early_tourian_metroids_3: %cm_preset("Metroids 3", #preset_100early_tourian_metroids_3) presets_100early_tourian_metroids_4: %cm_preset("Metroids 4", #preset_100early_tourian_metroids_4) presets_100early_tourian_baby_skip: %cm_preset("Baby Skip", #preset_100early_tourian_baby_skip) presets_100early_tourian_after_baby_skip: %cm_preset("After Baby Skip", #preset_100early_tourian_after_baby_skip) presets_100early_tourian_zeb_skip: %cm_preset("Zeb Skip", #preset_100early_tourian_zeb_skip) presets_100early_tourian_mother_brain_2: %cm_preset("Mother Brain 2", #preset_100early_tourian_mother_brain_2) presets_100early_tourian_zebes_escape: %cm_preset("Zebes Escape", #preset_100early_tourian_zebes_escape) presets_100early_tourian_escape_room_3: %cm_preset("Escape Room 3", #preset_100early_tourian_escape_room_3) presets_100early_tourian_escape_room_4: %cm_preset("Escape Room 4", #preset_100early_tourian_escape_room_4) presets_100early_tourian_escape_climb: %cm_preset("Escape Climb", #preset_100early_tourian_escape_climb) presets_100early_tourian_escape_parlor: %cm_preset("Escape Parlor", #preset_100early_tourian_escape_parlor)
%define SD_HEADS 255 %define SD_SECTORS 63 %define SD_CYLINDERS 1024 %macro SEL_HI 0 mov al, 2*7+1 ; Set bit PC7 to 1 out 23h, al %endmacro %macro SEL_LO 0 mov al, 2*7+0 ; Set bit PC7 to 0 out 23h, al %endmacro %macro SEND_BYTE 1 mov al, %1 out 0E0h, al %endmacro %macro READ_BYTE 0 SEND_BYTE 0FFh nop nop in al, 0E0h %endmacro ; -------------------------------------------------------------------------------------- ; Handle INT 13 interrupt for SD card. ; -------------------------------------------------------------------------------------- SD_Handle: cmp ah, 02h jz SD_Func_02 cmp ah, 03h jz SD_Func_03 cmp ah, 08h jz SD_Func_08 cmp ah, 15h jz SD_Func_15 cmp ah, 05h jz SD_Dummy cmp ah, 06h jz SD_Dummy cmp ah, 07h jz SD_Dummy SD_Error: stc mov ah, 0FFh ret ; -------------------------------------------------------------------------------------- ; Dummy functions ; -------------------------------------------------------------------------------------- SD_Dummy: clc xor ah, ah ret ; -------------------------------------------------------------------------------------- ; Function 08 - return hard disk parameters. ; -------------------------------------------------------------------------------------- SD_Func_08: mov dh, SD_HEADS-1 mov dl, 1 mov cl, SD_SECTORS + (((SD_CYLINDERS-1)>>8)<<6) mov ch, (SD_CYLINDERS-1)&255 xor ah, ah clc ret ; -------------------------------------------------------------------------------------- ; Function 15 - read disk type. ; -------------------------------------------------------------------------------------- SD_Func_15: mov ah, 3 mov cx, (SD_SECTORS*SD_HEADS*SD_CYLINDERS)>>16 mov dx, (SD_SECTORS*SD_HEADS*SD_CYLINDERS)&65535 clc ret ; -------------------------------------------------------------------------------------- ; Function 02 - read disk sector. ; -------------------------------------------------------------------------------------- SD_Func_02: call SD_Check jc SD_Error push dx push cx push di mov di, bx push bx mov bl, al push ax call SD_CHS SD_Func_02_Loop: call SD_Read jc SD_Func_02_Error add ax, 1 adc dl, 0 dec bl jnz SD_Func_02_Loop pop ax pop bx pop di pop cx pop dx xor ah, ah clc ret SD_Func_02_Error: pop ax pop bx pop di pop cx pop dx xor ax, ax dec ah stc ret ; -------------------------------------------------------------------------------------- ; Function 03 - write disk sector. ; -------------------------------------------------------------------------------------- SD_Func_03: call SD_Check jc SD_Error push dx push cx push si mov si, bx push bx mov bl, al push ax call SD_CHS push ds push es pop ds SD_Func_03_Loop: call SD_Write jc SD_Func_03_Error add ax, 1 adc dl, 0 dec bl jnz SD_Func_03_Loop pop ds pop ax pop bx pop si pop cx pop dx xor ah, ah clc ret SD_Func_03_Error: pop ds pop ax pop bx pop di pop cx pop dx xor ax, ax dec ah stc ret ; ----------------------------------------------------------------- ; Check if a SD card is present and has been properly initialized. ; ----------------------------------------------------------------- SD_Check: push ax push ds mov ax, Data_Segment mov ds, ax test byte [Data_SD], 80h jnz SD_Check_OK call SD_Init jnc SD_Check_Initialized pop ds pop ax stc ret SD_Check_Initialized: mov al, byte [Data_SD] or al, 80h mov byte [Data_SD], al SD_Check_OK: pop ds pop ax clc ret ; ----------------------------------------------------------------- ; Initialize the SD card. ; ----------------------------------------------------------------- SD_Init: push cx push dx push ax push bx out 0E8h, al ; Step 1 - send dummy pulses with card deselected stc SEL_HI mov cx, 100 SD_Init_Loop_1: SEND_BYTE 0FFh loop SD_Init_Loop_1 SEL_LO ; Step 2 - send dummy pulses with card selected mov cx, 5000 SD_Init_Loop_2: SEND_BYTE 0FFh loop SD_Init_Loop_2 ; Step 3 - send CMD0 SEND_BYTE 40h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 95h READ_BYTE READ_BYTE mov bh, al READ_BYTE cmp bh, 01h jne SD_Init_Error ; Step 4 - send CMD8 SEND_BYTE 48h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 01h SEND_BYTE 0AAh SEND_BYTE 87h READ_BYTE READ_BYTE cmp al, 05h je SD_Init_Skip cmp al, 01h jne SD_Init_Error READ_BYTE READ_BYTE READ_BYTE READ_BYTE SD_Init_Skip: READ_BYTE mov cx, 50000 SD_Init_New: ; Step 5a - send CMD55 SEND_BYTE 77h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 01h READ_BYTE READ_BYTE mov bh, al READ_BYTE cmp bh, 05h je SD_Init_Old cmp bh, 01h jne SD_Init_Error ; Step 5a - send ACMD41 SEND_BYTE 69h SEND_BYTE 40h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 77h READ_BYTE READ_BYTE mov bh, al READ_BYTE cmp bh, 00h je SD_Init_Done cmp bh, 05h je SD_Init_Old cmp bh, 01h jne SD_Init_Error loop SD_Init_New2 jmp SD_Init_Error SD_Init_New2: jmp SD_Init_New SD_Init_Old: ; Step 5a - send CMD41 SEND_BYTE 41h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 0F9h READ_BYTE READ_BYTE mov bh, al READ_BYTE cmp bh, 00h je SD_Init_Done cmp bh, 01h jne SD_Init_Error loop SD_Init_Old jmp SD_Init_Error SD_Init_Done: ; Step 7 - send CMD58 SEND_BYTE 7Ah SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 01h READ_BYTE READ_BYTE cmp al, 00h jne SD_Init_Error READ_BYTE mov bh, al READ_BYTE READ_BYTE READ_BYTE READ_BYTE test bh, 80h jnz SD_Init_Finished SD_Init_Sector: ; Step 8 - send CMD16 SEND_BYTE 50h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 00h SEND_BYTE 02h SEND_BYTE 01h READ_BYTE READ_BYTE mov bh, al READ_BYTE cmp bh, 00h jne SD_Init_Error SD_Init_Finished: SD_Init_OK: clc jmp SD_Init_End SD_Init_Error: stc SD_Init_End: out 0E9h, al pop bx pop ax pop dx pop cx ret ; ----------------------------------------------------------------- ; Read sector from the SD card. ; Input: ; DX:AX - sector number ; ES:DI - destination in memory ; ----------------------------------------------------------------- SD_Read: push bx push ax push dx push cx push ax push ax push dx out 0E8h, al mov al, 1 ; Set bit PC0 to 1 out 23h, al ; Send CMD17 SEND_BYTE 51h SEND_BYTE 00h pop dx xchg dl, dh SEND_BYTE dh pop dx SEND_BYTE dh pop dx SEND_BYTE dl SEND_BYTE 01h ; Wait for "00" response mov cx, 10000 SD_Read_Response: READ_BYTE cmp al, 00h je SD_Read_Do loop SD_Read_Response jmp SD_Read_Error ; Wait for data token SD_Read_Do: mov cx, 10000 SD_Read_Wait: READ_BYTE cmp al, 0FEh je SD_Read_Continue loop SD_Read_Wait jmp SD_Read_Error ; Read sector bytes SD_Read_Continue: SEND_BYTE 0FFh mov cx, 512 ; More efficient routine on NEC V20 db 60h ; PUSHA stc jnc SD_Read_Loop db 61h ; POPA mov dx, 00E1h db 0F3h, 06Ch ; REP INSB jmp SD_Read_Finished SD_Read_Loop: in al, 0E1h stosb loop SD_Read_Loop SD_Read_Finished: READ_BYTE READ_BYTE mov al, 0 ; Set bit PC0 to 0 out 23h, al clc jmp SD_Read_End SD_Read_Error: mov al, 0 ; Set bit PC0 to 0 out 23h, al mov ax, Data_Segment mov ds, ax mov byte [Data_SD], 00h stc SD_Read_End: out 0E9h, al pop cx pop dx pop ax pop bx ret ; ----------------------------------------------------------------- ; Write sector to the SD card. ; Input: ; DX:AX - sector number ; DS:SI - destination in memory ; ----------------------------------------------------------------- SD_Write: push bx push ax push dx push cx push ax push ax push dx out 0E8h, al mov al, 1 ; Set bit PC0 to 1 out 23h, al ; Send CMD24 SEND_BYTE 58h SEND_BYTE 00h pop dx xchg dl, dh SEND_BYTE dh pop dx SEND_BYTE dh pop dx SEND_BYTE dl SEND_BYTE 01h READ_BYTE ; Wait for "00" response mov cx, 10000 SD_Write_Response: READ_BYTE cmp al, 00h je SD_Write_Do loop SD_Write_Response jmp SD_Write_Error SD_Write_Do: ; Write data token SEND_BYTE 0FFh SEND_BYTE 0FEh ; Write sector bytes SD_Write_Continue: mov cx, 512 ; More efficient routine on NEC V20 db 60h ; PUSHA stc jnc SD_Write_Loop db 61h ; POPA mov dx, 00E0h db 0F3h, 06Eh ; REP OUTSB jmp SD_Write_Finished SD_Write_Loop: lodsb out 0E0h, al loop SD_Write_Loop SD_Write_Finished: ; Dummy CRC checksum SEND_BYTE 00h SEND_BYTE 00h ; Check data response READ_BYTE mov ah, al READ_BYTE and ah, 1Fh cmp ah, 05h jne SD_Write_End ; Wait while the card is busy mov cx, 30000 SD_Write_Wait: READ_BYTE cmp al, 0FFh je SD_Write_Finish loop SD_Write_Wait jmp SD_Write_Error SD_Write_Finish: mov al, 0 ; Set bit PC0 to 0 out 23h, al clc jmp SD_Write_End SD_Write_Error: mov al, 0 ; Set bit PC0 to 0 out 23h, al mov ax, Data_Segment mov ds, ax mov byte [Data_SD], 00h stc SD_Write_End: out 0E9h, al pop cx pop dx pop ax pop bx ret ; ----------------------------------------------------------------- ; Convert CHS geometry to LBA sector number ; Input: ; CL - sector number ; CH - cylinder number ; DH - head number ; Output: ; DX:AX - LBA sector ; ----------------------------------------------------------------- SD_CHS: nop nop nop push bx xchg cl, ch mov ax, cx mov cl, 6 shr ah, cl mov cl, dh xor dx, dx mov bx, SD_HEADS mul bx add al, cl adc ah, 00h adc dl, 00h mov bx, SD_SECTORS mul bx and ch, 3Fh dec ch add al, ch adc ah, 00h adc dl, 00h pop bx ret
#define ALFABET -1 struct TrieNode { int adj[ALFABET]; bool word = false; TrieNode() { memset(adj, -1, sizeof adj); } }; struct Trie { vector<TrieNode> trie; Trie() { trie.emplace_back(); } void insert(string str) { int curr = 0; for (char c : str) { int i = c - 'a'; if (trie[curr].adj[i] == -1) trie[curr].adj[i] = trie.size(), trie.emplace_back(); curr = trie[curr].adj[i]; } trie[curr].word = true; } bool contains(string str) { int curr = 0; for (char c : str) { int i = c - 'a'; if (trie[curr].adj[i] == -1) return false; curr = trie[curr].adj[i]; } return trie[curr].word; } }; Trie trie;
; A017102: a(n) = (8n + 3)^2. ; 9,121,361,729,1225,1849,2601,3481,4489,5625,6889,8281,9801,11449,13225,15129,17161,19321,21609,24025,26569,29241,32041,34969,38025,41209,44521,47961,51529,55225,59049,63001,67081,71289,75625,80089,84681,89401,94249,99225,104329,109561,114921,120409,126025,131769,137641,143641,149769,156025,162409,168921,175561,182329,189225,196249,203401,210681,218089,225625,233289,241081,249001,257049,265225,273529,281961,290521,299209,308025,316969,326041,335241,344569,354025,363609,373321,383161,393129,403225,413449,423801,434281,444889,455625,466489,477481,488601,499849,511225,522729,534361,546121,558009,570025,582169,594441,606841,619369,632025 mul $0,8 add $0,3 pow $0,2
; A096015: A096014(n) / 2. ; Submitted by Christian Krause ; 1,3,3,3,5,5,7,3,3,3,11,5,13,3,3,3,17,5,19,3,3,3,23,5,5,3,3,3,29,7,31,3,3,3,5,5,37,3,3,3,41,5,43,3,3,3,47,5,7,3,3,3,53,5,5,3,3,3,59,7,61,3,3,3,5,5,67,3,3,3,71,5,73,3,3,3,7,5,79,3,3,3,83,5,5,3,3,3,89,7,7,3,3 seq $0,126801 ; a(n) = smallest integer which is coprime to n and is > A057237(n). mov $2,2 add $3,$0 gcd $2,$3 mov $4,$0 sub $4,$2 mov $0,$4 add $0,1
_kill: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(int argc, char **argv) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 56 push %esi e: 53 push %ebx f: 51 push %ecx 10: 83 ec 0c sub $0xc,%esp 13: 8b 01 mov (%ecx),%eax 15: 8b 51 04 mov 0x4(%ecx),%edx int i; if(argc < 2){ 18: 83 f8 01 cmp $0x1,%eax 1b: 7e 2c jle 49 <main+0x49> 1d: 8d 5a 04 lea 0x4(%edx),%ebx 20: 8d 34 82 lea (%edx,%eax,4),%esi 23: 90 nop 24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi printf(2, "usage: kill pid...\n"); exit(); } for(i=1; i<argc; i++) kill(atoi(argv[i])); 28: 83 ec 0c sub $0xc,%esp 2b: ff 33 pushl (%ebx) 2d: 83 c3 04 add $0x4,%ebx 30: e8 0b 02 00 00 call 240 <atoi> 35: 89 04 24 mov %eax,(%esp) 38: e8 a5 02 00 00 call 2e2 <kill> for(i=1; i<argc; i++) 3d: 83 c4 10 add $0x10,%esp 40: 39 f3 cmp %esi,%ebx 42: 75 e4 jne 28 <main+0x28> exit(); 44: e8 69 02 00 00 call 2b2 <exit> printf(2, "usage: kill pid...\n"); 49: 50 push %eax 4a: 50 push %eax 4b: 68 78 07 00 00 push $0x778 50: 6a 02 push $0x2 52: e8 c9 03 00 00 call 420 <printf> exit(); 57: e8 56 02 00 00 call 2b2 <exit> 5c: 66 90 xchg %ax,%ax 5e: 66 90 xchg %ax,%ax 00000060 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 60: 55 push %ebp 61: 89 e5 mov %esp,%ebp 63: 53 push %ebx 64: 8b 45 08 mov 0x8(%ebp),%eax 67: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 6a: 89 c2 mov %eax,%edx 6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 70: 83 c1 01 add $0x1,%ecx 73: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 77: 83 c2 01 add $0x1,%edx 7a: 84 db test %bl,%bl 7c: 88 5a ff mov %bl,-0x1(%edx) 7f: 75 ef jne 70 <strcpy+0x10> ; return os; } 81: 5b pop %ebx 82: 5d pop %ebp 83: c3 ret 84: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000090 <strcmp>: int strcmp(const char *p, const char *q) { 90: 55 push %ebp 91: 89 e5 mov %esp,%ebp 93: 53 push %ebx 94: 8b 55 08 mov 0x8(%ebp),%edx 97: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 9a: 0f b6 02 movzbl (%edx),%eax 9d: 0f b6 19 movzbl (%ecx),%ebx a0: 84 c0 test %al,%al a2: 75 1c jne c0 <strcmp+0x30> a4: eb 2a jmp d0 <strcmp+0x40> a6: 8d 76 00 lea 0x0(%esi),%esi a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; b0: 83 c2 01 add $0x1,%edx while(*p && *p == *q) b3: 0f b6 02 movzbl (%edx),%eax p++, q++; b6: 83 c1 01 add $0x1,%ecx b9: 0f b6 19 movzbl (%ecx),%ebx while(*p && *p == *q) bc: 84 c0 test %al,%al be: 74 10 je d0 <strcmp+0x40> c0: 38 d8 cmp %bl,%al c2: 74 ec je b0 <strcmp+0x20> return (uchar)*p - (uchar)*q; c4: 29 d8 sub %ebx,%eax } c6: 5b pop %ebx c7: 5d pop %ebp c8: c3 ret c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi d0: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; d2: 29 d8 sub %ebx,%eax } d4: 5b pop %ebx d5: 5d pop %ebp d6: c3 ret d7: 89 f6 mov %esi,%esi d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000000e0 <strlen>: uint strlen(const char *s) { e0: 55 push %ebp e1: 89 e5 mov %esp,%ebp e3: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) e6: 80 39 00 cmpb $0x0,(%ecx) e9: 74 15 je 100 <strlen+0x20> eb: 31 d2 xor %edx,%edx ed: 8d 76 00 lea 0x0(%esi),%esi f0: 83 c2 01 add $0x1,%edx f3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) f7: 89 d0 mov %edx,%eax f9: 75 f5 jne f0 <strlen+0x10> ; return n; } fb: 5d pop %ebp fc: c3 ret fd: 8d 76 00 lea 0x0(%esi),%esi for(n = 0; s[n]; n++) 100: 31 c0 xor %eax,%eax } 102: 5d pop %ebp 103: c3 ret 104: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 10a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000110 <memset>: void* memset(void *dst, int c, uint n) { 110: 55 push %ebp 111: 89 e5 mov %esp,%ebp 113: 57 push %edi 114: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 117: 8b 4d 10 mov 0x10(%ebp),%ecx 11a: 8b 45 0c mov 0xc(%ebp),%eax 11d: 89 d7 mov %edx,%edi 11f: fc cld 120: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 122: 89 d0 mov %edx,%eax 124: 5f pop %edi 125: 5d pop %ebp 126: c3 ret 127: 89 f6 mov %esi,%esi 129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000130 <strchr>: char* strchr(const char *s, char c) { 130: 55 push %ebp 131: 89 e5 mov %esp,%ebp 133: 53 push %ebx 134: 8b 45 08 mov 0x8(%ebp),%eax 137: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) 13a: 0f b6 10 movzbl (%eax),%edx 13d: 84 d2 test %dl,%dl 13f: 74 1d je 15e <strchr+0x2e> if(*s == c) 141: 38 d3 cmp %dl,%bl 143: 89 d9 mov %ebx,%ecx 145: 75 0d jne 154 <strchr+0x24> 147: eb 17 jmp 160 <strchr+0x30> 149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 150: 38 ca cmp %cl,%dl 152: 74 0c je 160 <strchr+0x30> for(; *s; s++) 154: 83 c0 01 add $0x1,%eax 157: 0f b6 10 movzbl (%eax),%edx 15a: 84 d2 test %dl,%dl 15c: 75 f2 jne 150 <strchr+0x20> return (char*)s; return 0; 15e: 31 c0 xor %eax,%eax } 160: 5b pop %ebx 161: 5d pop %ebp 162: c3 ret 163: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 169: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000170 <gets>: char* gets(char *buf, int max) { 170: 55 push %ebp 171: 89 e5 mov %esp,%ebp 173: 57 push %edi 174: 56 push %esi 175: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 176: 31 f6 xor %esi,%esi 178: 89 f3 mov %esi,%ebx { 17a: 83 ec 1c sub $0x1c,%esp 17d: 8b 7d 08 mov 0x8(%ebp),%edi for(i=0; i+1 < max; ){ 180: eb 2f jmp 1b1 <gets+0x41> 182: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cc = read(0, &c, 1); 188: 8d 45 e7 lea -0x19(%ebp),%eax 18b: 83 ec 04 sub $0x4,%esp 18e: 6a 01 push $0x1 190: 50 push %eax 191: 6a 00 push $0x0 193: e8 32 01 00 00 call 2ca <read> if(cc < 1) 198: 83 c4 10 add $0x10,%esp 19b: 85 c0 test %eax,%eax 19d: 7e 1c jle 1bb <gets+0x4b> break; buf[i++] = c; 19f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 1a3: 83 c7 01 add $0x1,%edi 1a6: 88 47 ff mov %al,-0x1(%edi) if(c == '\n' || c == '\r') 1a9: 3c 0a cmp $0xa,%al 1ab: 74 23 je 1d0 <gets+0x60> 1ad: 3c 0d cmp $0xd,%al 1af: 74 1f je 1d0 <gets+0x60> for(i=0; i+1 < max; ){ 1b1: 83 c3 01 add $0x1,%ebx 1b4: 3b 5d 0c cmp 0xc(%ebp),%ebx 1b7: 89 fe mov %edi,%esi 1b9: 7c cd jl 188 <gets+0x18> 1bb: 89 f3 mov %esi,%ebx break; } buf[i] = '\0'; return buf; } 1bd: 8b 45 08 mov 0x8(%ebp),%eax buf[i] = '\0'; 1c0: c6 03 00 movb $0x0,(%ebx) } 1c3: 8d 65 f4 lea -0xc(%ebp),%esp 1c6: 5b pop %ebx 1c7: 5e pop %esi 1c8: 5f pop %edi 1c9: 5d pop %ebp 1ca: c3 ret 1cb: 90 nop 1cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1d0: 8b 75 08 mov 0x8(%ebp),%esi 1d3: 8b 45 08 mov 0x8(%ebp),%eax 1d6: 01 de add %ebx,%esi 1d8: 89 f3 mov %esi,%ebx buf[i] = '\0'; 1da: c6 03 00 movb $0x0,(%ebx) } 1dd: 8d 65 f4 lea -0xc(%ebp),%esp 1e0: 5b pop %ebx 1e1: 5e pop %esi 1e2: 5f pop %edi 1e3: 5d pop %ebp 1e4: c3 ret 1e5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001f0 <stat>: int stat(const char *n, struct stat *st) { 1f0: 55 push %ebp 1f1: 89 e5 mov %esp,%ebp 1f3: 56 push %esi 1f4: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 1f5: 83 ec 08 sub $0x8,%esp 1f8: 6a 00 push $0x0 1fa: ff 75 08 pushl 0x8(%ebp) 1fd: e8 f0 00 00 00 call 2f2 <open> if(fd < 0) 202: 83 c4 10 add $0x10,%esp 205: 85 c0 test %eax,%eax 207: 78 27 js 230 <stat+0x40> return -1; r = fstat(fd, st); 209: 83 ec 08 sub $0x8,%esp 20c: ff 75 0c pushl 0xc(%ebp) 20f: 89 c3 mov %eax,%ebx 211: 50 push %eax 212: e8 f3 00 00 00 call 30a <fstat> close(fd); 217: 89 1c 24 mov %ebx,(%esp) r = fstat(fd, st); 21a: 89 c6 mov %eax,%esi close(fd); 21c: e8 b9 00 00 00 call 2da <close> return r; 221: 83 c4 10 add $0x10,%esp } 224: 8d 65 f8 lea -0x8(%ebp),%esp 227: 89 f0 mov %esi,%eax 229: 5b pop %ebx 22a: 5e pop %esi 22b: 5d pop %ebp 22c: c3 ret 22d: 8d 76 00 lea 0x0(%esi),%esi return -1; 230: be ff ff ff ff mov $0xffffffff,%esi 235: eb ed jmp 224 <stat+0x34> 237: 89 f6 mov %esi,%esi 239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000240 <atoi>: int atoi(const char *s) { 240: 55 push %ebp 241: 89 e5 mov %esp,%ebp 243: 53 push %ebx 244: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 247: 0f be 11 movsbl (%ecx),%edx 24a: 8d 42 d0 lea -0x30(%edx),%eax 24d: 3c 09 cmp $0x9,%al n = 0; 24f: b8 00 00 00 00 mov $0x0,%eax while('0' <= *s && *s <= '9') 254: 77 1f ja 275 <atoi+0x35> 256: 8d 76 00 lea 0x0(%esi),%esi 259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 260: 8d 04 80 lea (%eax,%eax,4),%eax 263: 83 c1 01 add $0x1,%ecx 266: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax while('0' <= *s && *s <= '9') 26a: 0f be 11 movsbl (%ecx),%edx 26d: 8d 5a d0 lea -0x30(%edx),%ebx 270: 80 fb 09 cmp $0x9,%bl 273: 76 eb jbe 260 <atoi+0x20> return n; } 275: 5b pop %ebx 276: 5d pop %ebp 277: c3 ret 278: 90 nop 279: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000280 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 280: 55 push %ebp 281: 89 e5 mov %esp,%ebp 283: 56 push %esi 284: 53 push %ebx 285: 8b 5d 10 mov 0x10(%ebp),%ebx 288: 8b 45 08 mov 0x8(%ebp),%eax 28b: 8b 75 0c mov 0xc(%ebp),%esi char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 28e: 85 db test %ebx,%ebx 290: 7e 14 jle 2a6 <memmove+0x26> 292: 31 d2 xor %edx,%edx 294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 298: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 29c: 88 0c 10 mov %cl,(%eax,%edx,1) 29f: 83 c2 01 add $0x1,%edx while(n-- > 0) 2a2: 39 d3 cmp %edx,%ebx 2a4: 75 f2 jne 298 <memmove+0x18> return vdst; } 2a6: 5b pop %ebx 2a7: 5e pop %esi 2a8: 5d pop %ebp 2a9: c3 ret 000002aa <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 2aa: b8 01 00 00 00 mov $0x1,%eax 2af: cd 40 int $0x40 2b1: c3 ret 000002b2 <exit>: SYSCALL(exit) 2b2: b8 02 00 00 00 mov $0x2,%eax 2b7: cd 40 int $0x40 2b9: c3 ret 000002ba <wait>: SYSCALL(wait) 2ba: b8 03 00 00 00 mov $0x3,%eax 2bf: cd 40 int $0x40 2c1: c3 ret 000002c2 <pipe>: SYSCALL(pipe) 2c2: b8 04 00 00 00 mov $0x4,%eax 2c7: cd 40 int $0x40 2c9: c3 ret 000002ca <read>: SYSCALL(read) 2ca: b8 05 00 00 00 mov $0x5,%eax 2cf: cd 40 int $0x40 2d1: c3 ret 000002d2 <write>: SYSCALL(write) 2d2: b8 10 00 00 00 mov $0x10,%eax 2d7: cd 40 int $0x40 2d9: c3 ret 000002da <close>: SYSCALL(close) 2da: b8 15 00 00 00 mov $0x15,%eax 2df: cd 40 int $0x40 2e1: c3 ret 000002e2 <kill>: SYSCALL(kill) 2e2: b8 06 00 00 00 mov $0x6,%eax 2e7: cd 40 int $0x40 2e9: c3 ret 000002ea <exec>: SYSCALL(exec) 2ea: b8 07 00 00 00 mov $0x7,%eax 2ef: cd 40 int $0x40 2f1: c3 ret 000002f2 <open>: SYSCALL(open) 2f2: b8 0f 00 00 00 mov $0xf,%eax 2f7: cd 40 int $0x40 2f9: c3 ret 000002fa <mknod>: SYSCALL(mknod) 2fa: b8 11 00 00 00 mov $0x11,%eax 2ff: cd 40 int $0x40 301: c3 ret 00000302 <unlink>: SYSCALL(unlink) 302: b8 12 00 00 00 mov $0x12,%eax 307: cd 40 int $0x40 309: c3 ret 0000030a <fstat>: SYSCALL(fstat) 30a: b8 08 00 00 00 mov $0x8,%eax 30f: cd 40 int $0x40 311: c3 ret 00000312 <link>: SYSCALL(link) 312: b8 13 00 00 00 mov $0x13,%eax 317: cd 40 int $0x40 319: c3 ret 0000031a <mkdir>: SYSCALL(mkdir) 31a: b8 14 00 00 00 mov $0x14,%eax 31f: cd 40 int $0x40 321: c3 ret 00000322 <chdir>: SYSCALL(chdir) 322: b8 09 00 00 00 mov $0x9,%eax 327: cd 40 int $0x40 329: c3 ret 0000032a <dup>: SYSCALL(dup) 32a: b8 0a 00 00 00 mov $0xa,%eax 32f: cd 40 int $0x40 331: c3 ret 00000332 <getpid>: SYSCALL(getpid) 332: b8 0b 00 00 00 mov $0xb,%eax 337: cd 40 int $0x40 339: c3 ret 0000033a <sbrk>: SYSCALL(sbrk) 33a: b8 0c 00 00 00 mov $0xc,%eax 33f: cd 40 int $0x40 341: c3 ret 00000342 <sleep>: SYSCALL(sleep) 342: b8 0d 00 00 00 mov $0xd,%eax 347: cd 40 int $0x40 349: c3 ret 0000034a <uptime>: SYSCALL(uptime) 34a: b8 0e 00 00 00 mov $0xe,%eax 34f: cd 40 int $0x40 351: c3 ret 00000352 <cps>: SYSCALL(cps) 352: b8 16 00 00 00 mov $0x16,%eax 357: cd 40 int $0x40 359: c3 ret 0000035a <chpr>: SYSCALL(chpr) 35a: b8 17 00 00 00 mov $0x17,%eax 35f: cd 40 int $0x40 361: c3 ret 00000362 <pwd>: SYSCALL(pwd) 362: b8 18 00 00 00 mov $0x18,%eax 367: cd 40 int $0x40 369: c3 ret 0000036a <mv>: SYSCALL(mv) 36a: b8 19 00 00 00 mov $0x19,%eax 36f: cd 40 int $0x40 371: c3 ret 372: 66 90 xchg %ax,%ax 374: 66 90 xchg %ax,%ax 376: 66 90 xchg %ax,%ax 378: 66 90 xchg %ax,%ax 37a: 66 90 xchg %ax,%ax 37c: 66 90 xchg %ax,%ax 37e: 66 90 xchg %ax,%ax 00000380 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 380: 55 push %ebp 381: 89 e5 mov %esp,%ebp 383: 57 push %edi 384: 56 push %esi 385: 53 push %ebx 386: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 389: 85 d2 test %edx,%edx { 38b: 89 45 c0 mov %eax,-0x40(%ebp) neg = 1; x = -xx; 38e: 89 d0 mov %edx,%eax if(sgn && xx < 0){ 390: 79 76 jns 408 <printint+0x88> 392: f6 45 08 01 testb $0x1,0x8(%ebp) 396: 74 70 je 408 <printint+0x88> x = -xx; 398: f7 d8 neg %eax neg = 1; 39a: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) } else { x = xx; } i = 0; 3a1: 31 f6 xor %esi,%esi 3a3: 8d 5d d7 lea -0x29(%ebp),%ebx 3a6: eb 0a jmp 3b2 <printint+0x32> 3a8: 90 nop 3a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi do{ buf[i++] = digits[x % base]; 3b0: 89 fe mov %edi,%esi 3b2: 31 d2 xor %edx,%edx 3b4: 8d 7e 01 lea 0x1(%esi),%edi 3b7: f7 f1 div %ecx 3b9: 0f b6 92 94 07 00 00 movzbl 0x794(%edx),%edx }while((x /= base) != 0); 3c0: 85 c0 test %eax,%eax buf[i++] = digits[x % base]; 3c2: 88 14 3b mov %dl,(%ebx,%edi,1) }while((x /= base) != 0); 3c5: 75 e9 jne 3b0 <printint+0x30> if(neg) 3c7: 8b 45 c4 mov -0x3c(%ebp),%eax 3ca: 85 c0 test %eax,%eax 3cc: 74 08 je 3d6 <printint+0x56> buf[i++] = '-'; 3ce: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1) 3d3: 8d 7e 02 lea 0x2(%esi),%edi 3d6: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi 3da: 8b 7d c0 mov -0x40(%ebp),%edi 3dd: 8d 76 00 lea 0x0(%esi),%esi 3e0: 0f b6 06 movzbl (%esi),%eax write(fd, &c, 1); 3e3: 83 ec 04 sub $0x4,%esp 3e6: 83 ee 01 sub $0x1,%esi 3e9: 6a 01 push $0x1 3eb: 53 push %ebx 3ec: 57 push %edi 3ed: 88 45 d7 mov %al,-0x29(%ebp) 3f0: e8 dd fe ff ff call 2d2 <write> while(--i >= 0) 3f5: 83 c4 10 add $0x10,%esp 3f8: 39 de cmp %ebx,%esi 3fa: 75 e4 jne 3e0 <printint+0x60> putc(fd, buf[i]); } 3fc: 8d 65 f4 lea -0xc(%ebp),%esp 3ff: 5b pop %ebx 400: 5e pop %esi 401: 5f pop %edi 402: 5d pop %ebp 403: c3 ret 404: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; 408: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 40f: eb 90 jmp 3a1 <printint+0x21> 411: eb 0d jmp 420 <printf> 413: 90 nop 414: 90 nop 415: 90 nop 416: 90 nop 417: 90 nop 418: 90 nop 419: 90 nop 41a: 90 nop 41b: 90 nop 41c: 90 nop 41d: 90 nop 41e: 90 nop 41f: 90 nop 00000420 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 420: 55 push %ebp 421: 89 e5 mov %esp,%ebp 423: 57 push %edi 424: 56 push %esi 425: 53 push %ebx 426: 83 ec 2c sub $0x2c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 429: 8b 75 0c mov 0xc(%ebp),%esi 42c: 0f b6 1e movzbl (%esi),%ebx 42f: 84 db test %bl,%bl 431: 0f 84 b3 00 00 00 je 4ea <printf+0xca> ap = (uint*)(void*)&fmt + 1; 437: 8d 45 10 lea 0x10(%ebp),%eax 43a: 83 c6 01 add $0x1,%esi state = 0; 43d: 31 ff xor %edi,%edi ap = (uint*)(void*)&fmt + 1; 43f: 89 45 d4 mov %eax,-0x2c(%ebp) 442: eb 2f jmp 473 <printf+0x53> 444: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 448: 83 f8 25 cmp $0x25,%eax 44b: 0f 84 a7 00 00 00 je 4f8 <printf+0xd8> write(fd, &c, 1); 451: 8d 45 e2 lea -0x1e(%ebp),%eax 454: 83 ec 04 sub $0x4,%esp 457: 88 5d e2 mov %bl,-0x1e(%ebp) 45a: 6a 01 push $0x1 45c: 50 push %eax 45d: ff 75 08 pushl 0x8(%ebp) 460: e8 6d fe ff ff call 2d2 <write> 465: 83 c4 10 add $0x10,%esp 468: 83 c6 01 add $0x1,%esi for(i = 0; fmt[i]; i++){ 46b: 0f b6 5e ff movzbl -0x1(%esi),%ebx 46f: 84 db test %bl,%bl 471: 74 77 je 4ea <printf+0xca> if(state == 0){ 473: 85 ff test %edi,%edi c = fmt[i] & 0xff; 475: 0f be cb movsbl %bl,%ecx 478: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 47b: 74 cb je 448 <printf+0x28> state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 47d: 83 ff 25 cmp $0x25,%edi 480: 75 e6 jne 468 <printf+0x48> if(c == 'd'){ 482: 83 f8 64 cmp $0x64,%eax 485: 0f 84 05 01 00 00 je 590 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 48b: 81 e1 f7 00 00 00 and $0xf7,%ecx 491: 83 f9 70 cmp $0x70,%ecx 494: 74 72 je 508 <printf+0xe8> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 496: 83 f8 73 cmp $0x73,%eax 499: 0f 84 99 00 00 00 je 538 <printf+0x118> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 49f: 83 f8 63 cmp $0x63,%eax 4a2: 0f 84 08 01 00 00 je 5b0 <printf+0x190> putc(fd, *ap); ap++; } else if(c == '%'){ 4a8: 83 f8 25 cmp $0x25,%eax 4ab: 0f 84 ef 00 00 00 je 5a0 <printf+0x180> write(fd, &c, 1); 4b1: 8d 45 e7 lea -0x19(%ebp),%eax 4b4: 83 ec 04 sub $0x4,%esp 4b7: c6 45 e7 25 movb $0x25,-0x19(%ebp) 4bb: 6a 01 push $0x1 4bd: 50 push %eax 4be: ff 75 08 pushl 0x8(%ebp) 4c1: e8 0c fe ff ff call 2d2 <write> 4c6: 83 c4 0c add $0xc,%esp 4c9: 8d 45 e6 lea -0x1a(%ebp),%eax 4cc: 88 5d e6 mov %bl,-0x1a(%ebp) 4cf: 6a 01 push $0x1 4d1: 50 push %eax 4d2: ff 75 08 pushl 0x8(%ebp) 4d5: 83 c6 01 add $0x1,%esi } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 4d8: 31 ff xor %edi,%edi write(fd, &c, 1); 4da: e8 f3 fd ff ff call 2d2 <write> for(i = 0; fmt[i]; i++){ 4df: 0f b6 5e ff movzbl -0x1(%esi),%ebx write(fd, &c, 1); 4e3: 83 c4 10 add $0x10,%esp for(i = 0; fmt[i]; i++){ 4e6: 84 db test %bl,%bl 4e8: 75 89 jne 473 <printf+0x53> } } } 4ea: 8d 65 f4 lea -0xc(%ebp),%esp 4ed: 5b pop %ebx 4ee: 5e pop %esi 4ef: 5f pop %edi 4f0: 5d pop %ebp 4f1: c3 ret 4f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi state = '%'; 4f8: bf 25 00 00 00 mov $0x25,%edi 4fd: e9 66 ff ff ff jmp 468 <printf+0x48> 502: 8d b6 00 00 00 00 lea 0x0(%esi),%esi printint(fd, *ap, 16, 0); 508: 83 ec 0c sub $0xc,%esp 50b: b9 10 00 00 00 mov $0x10,%ecx 510: 6a 00 push $0x0 512: 8b 7d d4 mov -0x2c(%ebp),%edi 515: 8b 45 08 mov 0x8(%ebp),%eax 518: 8b 17 mov (%edi),%edx 51a: e8 61 fe ff ff call 380 <printint> ap++; 51f: 89 f8 mov %edi,%eax 521: 83 c4 10 add $0x10,%esp state = 0; 524: 31 ff xor %edi,%edi ap++; 526: 83 c0 04 add $0x4,%eax 529: 89 45 d4 mov %eax,-0x2c(%ebp) 52c: e9 37 ff ff ff jmp 468 <printf+0x48> 531: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi s = (char*)*ap; 538: 8b 45 d4 mov -0x2c(%ebp),%eax 53b: 8b 08 mov (%eax),%ecx ap++; 53d: 83 c0 04 add $0x4,%eax 540: 89 45 d4 mov %eax,-0x2c(%ebp) if(s == 0) 543: 85 c9 test %ecx,%ecx 545: 0f 84 8e 00 00 00 je 5d9 <printf+0x1b9> while(*s != 0){ 54b: 0f b6 01 movzbl (%ecx),%eax state = 0; 54e: 31 ff xor %edi,%edi s = (char*)*ap; 550: 89 cb mov %ecx,%ebx while(*s != 0){ 552: 84 c0 test %al,%al 554: 0f 84 0e ff ff ff je 468 <printf+0x48> 55a: 89 75 d0 mov %esi,-0x30(%ebp) 55d: 89 de mov %ebx,%esi 55f: 8b 5d 08 mov 0x8(%ebp),%ebx 562: 8d 7d e3 lea -0x1d(%ebp),%edi 565: 8d 76 00 lea 0x0(%esi),%esi write(fd, &c, 1); 568: 83 ec 04 sub $0x4,%esp s++; 56b: 83 c6 01 add $0x1,%esi 56e: 88 45 e3 mov %al,-0x1d(%ebp) write(fd, &c, 1); 571: 6a 01 push $0x1 573: 57 push %edi 574: 53 push %ebx 575: e8 58 fd ff ff call 2d2 <write> while(*s != 0){ 57a: 0f b6 06 movzbl (%esi),%eax 57d: 83 c4 10 add $0x10,%esp 580: 84 c0 test %al,%al 582: 75 e4 jne 568 <printf+0x148> 584: 8b 75 d0 mov -0x30(%ebp),%esi state = 0; 587: 31 ff xor %edi,%edi 589: e9 da fe ff ff jmp 468 <printf+0x48> 58e: 66 90 xchg %ax,%ax printint(fd, *ap, 10, 1); 590: 83 ec 0c sub $0xc,%esp 593: b9 0a 00 00 00 mov $0xa,%ecx 598: 6a 01 push $0x1 59a: e9 73 ff ff ff jmp 512 <printf+0xf2> 59f: 90 nop write(fd, &c, 1); 5a0: 83 ec 04 sub $0x4,%esp 5a3: 88 5d e5 mov %bl,-0x1b(%ebp) 5a6: 8d 45 e5 lea -0x1b(%ebp),%eax 5a9: 6a 01 push $0x1 5ab: e9 21 ff ff ff jmp 4d1 <printf+0xb1> putc(fd, *ap); 5b0: 8b 7d d4 mov -0x2c(%ebp),%edi write(fd, &c, 1); 5b3: 83 ec 04 sub $0x4,%esp putc(fd, *ap); 5b6: 8b 07 mov (%edi),%eax write(fd, &c, 1); 5b8: 6a 01 push $0x1 ap++; 5ba: 83 c7 04 add $0x4,%edi putc(fd, *ap); 5bd: 88 45 e4 mov %al,-0x1c(%ebp) write(fd, &c, 1); 5c0: 8d 45 e4 lea -0x1c(%ebp),%eax 5c3: 50 push %eax 5c4: ff 75 08 pushl 0x8(%ebp) 5c7: e8 06 fd ff ff call 2d2 <write> ap++; 5cc: 89 7d d4 mov %edi,-0x2c(%ebp) 5cf: 83 c4 10 add $0x10,%esp state = 0; 5d2: 31 ff xor %edi,%edi 5d4: e9 8f fe ff ff jmp 468 <printf+0x48> s = "(null)"; 5d9: bb 8c 07 00 00 mov $0x78c,%ebx while(*s != 0){ 5de: b8 28 00 00 00 mov $0x28,%eax 5e3: e9 72 ff ff ff jmp 55a <printf+0x13a> 5e8: 66 90 xchg %ax,%ax 5ea: 66 90 xchg %ax,%ax 5ec: 66 90 xchg %ax,%ax 5ee: 66 90 xchg %ax,%ax 000005f0 <free>: static Header base; static Header *freep; void free(void *ap) { 5f0: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 5f1: a1 40 0a 00 00 mov 0xa40,%eax { 5f6: 89 e5 mov %esp,%ebp 5f8: 57 push %edi 5f9: 56 push %esi 5fa: 53 push %ebx 5fb: 8b 5d 08 mov 0x8(%ebp),%ebx bp = (Header*)ap - 1; 5fe: 8d 4b f8 lea -0x8(%ebx),%ecx 601: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 608: 39 c8 cmp %ecx,%eax 60a: 8b 10 mov (%eax),%edx 60c: 73 32 jae 640 <free+0x50> 60e: 39 d1 cmp %edx,%ecx 610: 72 04 jb 616 <free+0x26> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 612: 39 d0 cmp %edx,%eax 614: 72 32 jb 648 <free+0x58> break; if(bp + bp->s.size == p->s.ptr){ 616: 8b 73 fc mov -0x4(%ebx),%esi 619: 8d 3c f1 lea (%ecx,%esi,8),%edi 61c: 39 fa cmp %edi,%edx 61e: 74 30 je 650 <free+0x60> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 620: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 623: 8b 50 04 mov 0x4(%eax),%edx 626: 8d 34 d0 lea (%eax,%edx,8),%esi 629: 39 f1 cmp %esi,%ecx 62b: 74 3a je 667 <free+0x77> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 62d: 89 08 mov %ecx,(%eax) freep = p; 62f: a3 40 0a 00 00 mov %eax,0xa40 } 634: 5b pop %ebx 635: 5e pop %esi 636: 5f pop %edi 637: 5d pop %ebp 638: c3 ret 639: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 640: 39 d0 cmp %edx,%eax 642: 72 04 jb 648 <free+0x58> 644: 39 d1 cmp %edx,%ecx 646: 72 ce jb 616 <free+0x26> { 648: 89 d0 mov %edx,%eax 64a: eb bc jmp 608 <free+0x18> 64c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi bp->s.size += p->s.ptr->s.size; 650: 03 72 04 add 0x4(%edx),%esi 653: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 656: 8b 10 mov (%eax),%edx 658: 8b 12 mov (%edx),%edx 65a: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 65d: 8b 50 04 mov 0x4(%eax),%edx 660: 8d 34 d0 lea (%eax,%edx,8),%esi 663: 39 f1 cmp %esi,%ecx 665: 75 c6 jne 62d <free+0x3d> p->s.size += bp->s.size; 667: 03 53 fc add -0x4(%ebx),%edx freep = p; 66a: a3 40 0a 00 00 mov %eax,0xa40 p->s.size += bp->s.size; 66f: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 672: 8b 53 f8 mov -0x8(%ebx),%edx 675: 89 10 mov %edx,(%eax) } 677: 5b pop %ebx 678: 5e pop %esi 679: 5f pop %edi 67a: 5d pop %ebp 67b: c3 ret 67c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000680 <malloc>: return freep; } void* malloc(uint nbytes) { 680: 55 push %ebp 681: 89 e5 mov %esp,%ebp 683: 57 push %edi 684: 56 push %esi 685: 53 push %ebx 686: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 689: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 68c: 8b 15 40 0a 00 00 mov 0xa40,%edx nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 692: 8d 78 07 lea 0x7(%eax),%edi 695: c1 ef 03 shr $0x3,%edi 698: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 69b: 85 d2 test %edx,%edx 69d: 0f 84 9d 00 00 00 je 740 <malloc+0xc0> 6a3: 8b 02 mov (%edx),%eax 6a5: 8b 48 04 mov 0x4(%eax),%ecx base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 6a8: 39 cf cmp %ecx,%edi 6aa: 76 6c jbe 718 <malloc+0x98> 6ac: 81 ff 00 10 00 00 cmp $0x1000,%edi 6b2: bb 00 10 00 00 mov $0x1000,%ebx 6b7: 0f 43 df cmovae %edi,%ebx p = sbrk(nu * sizeof(Header)); 6ba: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 6c1: eb 0e jmp 6d1 <malloc+0x51> 6c3: 90 nop 6c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 6c8: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 6ca: 8b 48 04 mov 0x4(%eax),%ecx 6cd: 39 f9 cmp %edi,%ecx 6cf: 73 47 jae 718 <malloc+0x98> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 6d1: 39 05 40 0a 00 00 cmp %eax,0xa40 6d7: 89 c2 mov %eax,%edx 6d9: 75 ed jne 6c8 <malloc+0x48> p = sbrk(nu * sizeof(Header)); 6db: 83 ec 0c sub $0xc,%esp 6de: 56 push %esi 6df: e8 56 fc ff ff call 33a <sbrk> if(p == (char*)-1) 6e4: 83 c4 10 add $0x10,%esp 6e7: 83 f8 ff cmp $0xffffffff,%eax 6ea: 74 1c je 708 <malloc+0x88> hp->s.size = nu; 6ec: 89 58 04 mov %ebx,0x4(%eax) free((void*)(hp + 1)); 6ef: 83 ec 0c sub $0xc,%esp 6f2: 83 c0 08 add $0x8,%eax 6f5: 50 push %eax 6f6: e8 f5 fe ff ff call 5f0 <free> return freep; 6fb: 8b 15 40 0a 00 00 mov 0xa40,%edx if((p = morecore(nunits)) == 0) 701: 83 c4 10 add $0x10,%esp 704: 85 d2 test %edx,%edx 706: 75 c0 jne 6c8 <malloc+0x48> return 0; } } 708: 8d 65 f4 lea -0xc(%ebp),%esp return 0; 70b: 31 c0 xor %eax,%eax } 70d: 5b pop %ebx 70e: 5e pop %esi 70f: 5f pop %edi 710: 5d pop %ebp 711: c3 ret 712: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(p->s.size == nunits) 718: 39 cf cmp %ecx,%edi 71a: 74 54 je 770 <malloc+0xf0> p->s.size -= nunits; 71c: 29 f9 sub %edi,%ecx 71e: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 721: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 724: 89 78 04 mov %edi,0x4(%eax) freep = prevp; 727: 89 15 40 0a 00 00 mov %edx,0xa40 } 72d: 8d 65 f4 lea -0xc(%ebp),%esp return (void*)(p + 1); 730: 83 c0 08 add $0x8,%eax } 733: 5b pop %ebx 734: 5e pop %esi 735: 5f pop %edi 736: 5d pop %ebp 737: c3 ret 738: 90 nop 739: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; 740: c7 05 40 0a 00 00 44 movl $0xa44,0xa40 747: 0a 00 00 74a: c7 05 44 0a 00 00 44 movl $0xa44,0xa44 751: 0a 00 00 base.s.size = 0; 754: b8 44 0a 00 00 mov $0xa44,%eax 759: c7 05 48 0a 00 00 00 movl $0x0,0xa48 760: 00 00 00 763: e9 44 ff ff ff jmp 6ac <malloc+0x2c> 768: 90 nop 769: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi prevp->s.ptr = p->s.ptr; 770: 8b 08 mov (%eax),%ecx 772: 89 0a mov %ecx,(%edx) 774: eb b1 jmp 727 <malloc+0xa7>
/********************************************************************** Audacity: A Digital Audio Editor FileFormats.cpp Dominic Mazzoni *******************************************************************//*! \file FileFormats.cpp \brief Works with libsndfile to provide encoding and other file information. *//*******************************************************************/ #include <wx/arrstr.h> #include <wx/intl.h> #include "sndfile.h" #ifndef SNDFILE_1 #error Requires libsndfile 1.0 or higher #endif #include "FileFormats.h" #include "Internat.h" // // enumerating headers // int sf_num_headers() { int count; sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof(count)); return count; } wxString sf_header_index_name(int format) { SF_FORMAT_INFO format_info; memset(&format_info, 0, sizeof(format_info)); format_info.format = format; sf_command(NULL, SFC_GET_FORMAT_MAJOR, &format_info, sizeof (format_info)) ; return LAT1CTOWX(format_info.name); } unsigned int sf_header_index_to_type(int i) { SF_FORMAT_INFO format_info ; memset(&format_info, 0, sizeof(format_info)); format_info.format = i; sf_command (NULL, SFC_GET_FORMAT_MAJOR, &format_info, sizeof (format_info)); return format_info.format & SF_FORMAT_TYPEMASK; } // // enumerating encodings // int sf_num_encodings() { int count ; sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &count, sizeof (int)) ; return count; } wxString sf_encoding_index_name(int i) { SF_FORMAT_INFO format_info ; memset(&format_info, 0, sizeof(format_info)); format_info.format = i; sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &format_info, sizeof (format_info)); return sf_normalize_name(format_info.name); } unsigned int sf_encoding_index_to_subtype(int i) { SF_FORMAT_INFO format_info ; memset(&format_info, 0, sizeof(format_info)); format_info.format = i; sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &format_info, sizeof (format_info)); return format_info.format & SF_FORMAT_SUBMASK; } // // getting info about an actual SF format // wxString sf_header_name(int format) { SF_FORMAT_INFO format_info; memset(&format_info, 0, sizeof(format_info)); format_info.format = (format & SF_FORMAT_TYPEMASK); sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info)); return LAT1CTOWX(format_info.name); } wxString sf_header_shortname(int format) { SF_FORMAT_INFO format_info; char *tmp; int i; wxString s; memset(&format_info, 0, sizeof(format_info)); format_info.format = (format & SF_FORMAT_TYPEMASK); sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info)); tmp = (char *)malloc(strlen(format_info.name)+1); strcpy(tmp, format_info.name); i = 0; while(tmp[i]) { if (tmp[i]==' ') tmp[i] = 0; else i++; } s = LAT1CTOWX(tmp); free(tmp); return s; } wxString sf_header_extension(int format) { SF_FORMAT_INFO format_info; memset(&format_info, 0, sizeof(format_info)); format_info.format = (format & SF_FORMAT_TYPEMASK); sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info)); return LAT1CTOWX(format_info.extension); } wxString sf_encoding_name(int encoding) { SF_FORMAT_INFO format_info; memset(&format_info, 0, sizeof(format_info)); format_info.format = (encoding & SF_FORMAT_SUBMASK); sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info)); return sf_normalize_name(format_info.name); } int sf_num_simple_formats() { int count ; sf_command (NULL, SFC_GET_SIMPLE_FORMAT_COUNT, &count, sizeof (int)) ; return count; } static SF_FORMAT_INFO g_format_info; SF_FORMAT_INFO *sf_simple_format(int i) { memset(&g_format_info, 0, sizeof(g_format_info)); g_format_info.format = i; sf_command (NULL, SFC_GET_SIMPLE_FORMAT, &g_format_info, sizeof(g_format_info)); return &g_format_info; } bool sf_subtype_more_than_16_bits(unsigned int format) { unsigned int subtype = format & SF_FORMAT_SUBMASK; return (subtype == SF_FORMAT_FLOAT || subtype == SF_FORMAT_DOUBLE || subtype == SF_FORMAT_PCM_24 || subtype == SF_FORMAT_PCM_32); } bool sf_subtype_is_integer(unsigned int format) { unsigned int subtype = format & SF_FORMAT_SUBMASK; return (subtype == SF_FORMAT_PCM_16 || subtype == SF_FORMAT_PCM_24 || subtype == SF_FORMAT_PCM_32); } wxArrayString sf_get_all_extensions() { wxArrayString exts; SF_FORMAT_INFO format_info; int count, k; memset(&format_info, 0, sizeof(format_info)); sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof(count)); for(k=0; k<count; k++) { format_info.format = k; sf_command(NULL, SFC_GET_FORMAT_MAJOR, &format_info, sizeof (format_info)) ; exts.Add(LAT1CTOWX(format_info.extension)); } // Some other extensions that are often sound files // but aren't included by libsndfile exts.Add(wxT("aif")); // AIFF file with a DOS-style extension exts.Add(wxT("ircam")); exts.Add(wxT("snd")); exts.Add(wxT("svx")); exts.Add(wxT("svx8")); exts.Add(wxT("sv16")); return exts; } wxString sf_normalize_name(const char *name) { wxString n = LAT1CTOWX(name); n.Replace(wxT("8 bit"), wxT("8-bit")); n.Replace(wxT("16 bit"), wxT("16-bit")); n.Replace(wxT("24 bit"), wxT("24-bit")); n.Replace(wxT("32 bit"), wxT("32-bit")); n.Replace(wxT("64 bit"), wxT("64-bit")); return n; } #ifdef __WXMAC__ // TODO: find out the appropriate OSType // for the ones with an '????'. The others // are at least the same type used by // SoundApp. #define NUM_HEADERS 13 OSType MacNames[NUM_HEADERS] = { 'WAVE', // WAVE 'AIFF', // AIFF 'NeXT', // Sun/NeXT AU 'BINA', // RAW i.e. binary 'PAR ', // ??? Ensoniq PARIS '8SVX', // Amiga IFF / SVX8 'NIST', // ??? NIST/Sphere 'VOC ', // VOC '\?\?\?\?', // ?? Propellorheads Rex 'SF ', // ?? IRCAM 'W64 ', // ?? Wave64 'MAT4', // ?? Matlab 4 'MAT5', // ?? Matlab 5 }; OSType sf_header_mactype(int format) { if (format >= 0x10000) return MacNames[(format/0x10000)-1]; else if (format>=0 && format<NUM_HEADERS) return MacNames[format]; else return '\?\?\?\?'; } #endif // __WXMAC__
############################################################################### # Copyright 2019 Intel Corporation # All Rights Reserved. # # If this software was obtained under the Intel Simplified Software License, # the following terms apply: # # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. The # Material contains proprietary information of Intel or its suppliers and # licensors. The Material is protected by worldwide copyright laws and treaty # provisions. No part of the Material may be used, copied, reproduced, # modified, published, uploaded, posted, transmitted, distributed or disclosed # in any way without Intel's prior express written permission. No license under # any patent, copyright or other intellectual property rights in the Material # is granted to or conferred upon you, either expressly, by implication, # inducement, estoppel or otherwise. Any license under such intellectual # property rights must be express and approved by Intel in writing. # # Unless otherwise agreed by Intel in writing, you may not remove or alter this # notice or any other notice embedded in Materials by Intel or Intel's # suppliers or licensors in any way. # # # If this software was obtained under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # 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. ############################################################################### .section .note.GNU-stack,"",%progbits .text .p2align 6, 0x90 .type mla_1x1, @function mla_1x1: movq (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adox %rax, %rbx mov %rbx, %r8 ret .Lfe1: .size mla_1x1, .Lfe1-(mla_1x1) .p2align 6, 0x90 .type mul_1x1, @function mul_1x1: movq (%rcx), %rdx mulxq (%rsi), %rax, %rdx movq %rax, (%rdi) movq %rdx, (8)(%rdi) ret .Lfe2: .size mul_1x1, .Lfe2-(mul_1x1) .p2align 6, 0x90 .type mla_2x2, @function mla_2x2: movq (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r9 movq (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r9 ret .Lfe3: .size mla_2x2, .Lfe3-(mla_2x2) .p2align 6, 0x90 .type mul_2x2, @function mul_2x2: call mla_2x2 movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) ret .Lfe4: .size mul_2x2, .Lfe4-(mul_2x2) .p2align 6, 0x90 .type mla_3x3, @function mla_3x3: movq (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 movq (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 movq (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 ret .Lfe5: .size mla_3x3, .Lfe5-(mla_3x3) .p2align 6, 0x90 .type mul_3x3, @function mul_3x3: call mla_3x3 movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) ret .Lfe6: .size mul_3x3, .Lfe6-(mul_3x3) .p2align 6, 0x90 .type mla_4x4, @function mla_4x4: movq (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 movq (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 movq (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 movq (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 ret .Lfe7: .size mla_4x4, .Lfe7-(mla_4x4) .p2align 6, 0x90 .type mul_4x4, @function mul_4x4: call mla_4x4 movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) ret .Lfe8: .size mul_4x4, .Lfe8-(mul_4x4) .p2align 6, 0x90 .type mla_5x5, @function mla_5x5: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 mov (32)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (32)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 ret .Lfe9: .size mla_5x5, .Lfe9-(mla_5x5) .p2align 6, 0x90 .type mul_5x5, @function mul_5x5: call mla_5x5 movq %r8, (40)(%rdi) movq %r9, (48)(%rdi) movq %r10, (56)(%rdi) movq %r11, (64)(%rdi) movq %r12, (72)(%rdi) ret .Lfe10: .size mul_5x5, .Lfe10-(mul_5x5) .p2align 6, 0x90 .type mla_6x6, @function mla_6x6: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r13 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r13 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r13 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r13 mov (32)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (32)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r13 mov (40)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (40)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r13 ret .Lfe11: .size mla_6x6, .Lfe11-(mla_6x6) .p2align 6, 0x90 .type mul_6x6, @function mul_6x6: call mla_6x6 movq %r8, (48)(%rdi) movq %r9, (56)(%rdi) movq %r10, (64)(%rdi) movq %r11, (72)(%rdi) movq %r12, (80)(%rdi) movq %r13, (88)(%rdi) ret .Lfe12: .size mul_6x6, .Lfe12-(mul_6x6) .p2align 6, 0x90 .type mla_7x7, @function mla_7x7: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 mov (32)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (32)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 mov (40)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (40)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 mov (48)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (48)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 ret .Lfe13: .size mla_7x7, .Lfe13-(mla_7x7) .p2align 6, 0x90 .type mul_7x7, @function mul_7x7: call mla_7x7 movq %r8, (56)(%rdi) movq %r9, (64)(%rdi) movq %r10, (72)(%rdi) movq %r11, (80)(%rdi) movq %r12, (88)(%rdi) movq %r13, (96)(%rdi) movq %r14, (104)(%rdi) ret .Lfe14: .size mul_7x7, .Lfe14-(mul_7x7) .p2align 6, 0x90 .type mla_8x1, @function mla_8x1: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe15: .size mla_8x1, .Lfe15-(mla_8x1) .p2align 6, 0x90 .type mla_8x2, @function mla_8x2: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe16: .size mla_8x2, .Lfe16-(mla_8x2) .p2align 6, 0x90 .type mla_8x3, @function mla_8x3: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe17: .size mla_8x3, .Lfe17-(mla_8x3) .p2align 6, 0x90 .type mla_8x4, @function mla_8x4: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe18: .size mla_8x4, .Lfe18-(mla_8x4) .p2align 6, 0x90 .type mla_8x5, @function mla_8x5: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (32)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (32)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe19: .size mla_8x5, .Lfe19-(mla_8x5) .p2align 6, 0x90 .type mla_8x6, @function mla_8x6: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (32)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (32)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (40)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (40)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe20: .size mla_8x6, .Lfe20-(mla_8x6) .p2align 6, 0x90 .type mla_8x7, @function mla_8x7: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (32)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (32)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (40)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (40)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (48)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (48)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe21: .size mla_8x7, .Lfe21-(mla_8x7) .p2align 6, 0x90 .type mla_8x8, @function mla_8x8: mov (%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (32)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (32)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (40)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (40)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (48)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (48)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 mov (56)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (56)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe22: .size mla_8x8, .Lfe22-(mla_8x8) .p2align 6, 0x90 .type mul_8x8, @function mul_8x8: call mla_8x8 movq %r8, (64)(%rdi) movq %r9, (72)(%rdi) movq %r10, (80)(%rdi) movq %r11, (88)(%rdi) movq %r12, (96)(%rdi) movq %r13, (104)(%rdi) movq %r14, (112)(%rdi) movq %r15, (120)(%rdi) ret .Lfe23: .size mul_8x8, .Lfe23-(mul_8x8) .p2align 6, 0x90 .type mul_9x9, @function mul_9x9: call mla_8x8 mov (64)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (64)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 push %r15 mov (64)(%rsi), %rdx mov (64)(%rdi), %r15 xor %rax, %rax mulx (%rcx), %rbp, %rbx adox %rbp, %r15 mov %r15, (64)(%rdi) adcx %rbx, %r8 mulx (8)(%rcx), %r15, %rbp adox %r8, %r15 adcx %rbp, %r9 mulx (16)(%rcx), %r8, %rbx adox %r9, %r8 adcx %rbx, %r10 mulx (24)(%rcx), %r9, %rbp adox %r10, %r9 adcx %rbp, %r11 mulx (32)(%rcx), %r10, %rbx adox %r11, %r10 adcx %rbx, %r12 mulx (40)(%rcx), %r11, %rbp adox %r12, %r11 adcx %rbp, %r13 mulx (48)(%rcx), %r12, %rbx adox %r13, %r12 adcx %r14, %rbx mulx (56)(%rcx), %r13, %r14 adox %rbx, %r13 adcx %rax, %r14 adox %rax, %r14 movq %r15, (72)(%rdi) mulx (64)(%rcx), %rbp, %r15 pop %rax add %rax, %r14 adc $(0), %r15 add %rbp, %r14 adc $(0), %r15 movq %r8, (80)(%rdi) movq %r9, (88)(%rdi) movq %r10, (96)(%rdi) movq %r11, (104)(%rdi) movq %r12, (112)(%rdi) movq %r13, (120)(%rdi) movq %r14, (128)(%rdi) movq %r15, (136)(%rdi) ret .Lfe24: .size mul_9x9, .Lfe24-(mul_9x9) .p2align 6, 0x90 .type mul_10x10, @function mul_10x10: call mla_8x8 add $(64), %rdi add $(64), %rcx call mla_8x2 push %r15 push %r14 add $(64), %rsi sub $(64), %rcx xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx mov %r13, %r15 mov %r12, %r14 mov %r11, %r13 mov %r10, %r12 mov %r9, %r11 mov %r8, %r10 movq (8)(%rdi), %r9 movq (%rdi), %r8 call mla_8x2 movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) movq %r10, (32)(%rdi) movq %r11, (40)(%rdi) movq %r12, (48)(%rdi) movq %r13, (56)(%rdi) add $(64), %rdi xor %r10, %r10 pop %r8 pop %r9 add %r14, %r8 adc %r15, %r9 adc $(0), %r10 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx add $(64), %rcx call mla_2x2 add $(16), %rdi add %r10, %r8 adc $(0), %r9 movq %r8, (%rdi) movq %r9, (8)(%rdi) ret .Lfe25: .size mul_10x10, .Lfe25-(mul_10x10) .p2align 6, 0x90 .type mul_11x11, @function mul_11x11: call mla_8x8 add $(64), %rdi add $(64), %rcx call mla_8x3 push %r15 push %r14 push %r13 add $(64), %rsi sub $(64), %rcx xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx mov %r12, %r15 mov %r11, %r14 mov %r10, %r13 mov %r9, %r12 mov %r8, %r11 movq (16)(%rdi), %r10 movq (8)(%rdi), %r9 movq (%rdi), %r8 call mla_8x3 movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) movq %r11, (48)(%rdi) movq %r12, (56)(%rdi) add $(64), %rdi xor %r11, %r11 pop %r8 pop %r9 pop %r10 add %r13, %r8 adc %r14, %r9 adc %r15, %r10 adc $(0), %r11 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx add $(64), %rcx call mla_3x3 add $(24), %rdi add %r11, %r8 adc $(0), %r9 adc $(0), %r10 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) ret .Lfe26: .size mul_11x11, .Lfe26-(mul_11x11) .p2align 6, 0x90 .type mul_12x12, @function mul_12x12: call mla_8x8 add $(64), %rdi add $(64), %rcx call mla_8x4 push %r15 push %r14 push %r13 push %r12 add $(64), %rsi sub $(64), %rcx xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx mov %r11, %r15 mov %r10, %r14 mov %r9, %r13 mov %r8, %r12 movq (24)(%rdi), %r11 movq (16)(%rdi), %r10 movq (8)(%rdi), %r9 movq (%rdi), %r8 call mla_8x4 movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) add $(64), %rdi xor %rax, %rax pop %r8 pop %r9 pop %r10 pop %r11 add %r12, %r8 adc %r13, %r9 adc %r14, %r10 adc %r15, %r11 adc $(0), %rax push %rax xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx add $(64), %rcx call mla_4x4 add $(32), %rdi pop %rax add %rax, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) ret .Lfe27: .size mul_12x12, .Lfe27-(mul_12x12) .p2align 6, 0x90 .type mul_13x13, @function mul_13x13: call mla_8x8 add $(64), %rdi add $(64), %rcx call mla_8x5 push %r15 push %r14 push %r13 push %r12 push %r11 add $(64), %rsi sub $(64), %rcx xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx mov %r10, %r15 mov %r9, %r14 mov %r8, %r13 movq (32)(%rdi), %r12 movq (24)(%rdi), %r11 movq (16)(%rdi), %r10 movq (8)(%rdi), %r9 movq (%rdi), %r8 call mla_8x5 movq %r8, (40)(%rdi) movq %r9, (48)(%rdi) movq %r10, (56)(%rdi) add $(64), %rdi xor %rax, %rax pop %r8 pop %r9 pop %r10 pop %rbx pop %rbp add %r11, %r8 adc %r12, %r9 adc %r13, %r10 adc %r14, %rbx adc %r15, %rbp adc $(0), %rax push %rax mov %rbx, %r11 mov %rbp, %r12 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx add $(64), %rcx call mla_5x5 add $(40), %rdi pop %rax add %rax, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) ret .Lfe28: .size mul_13x13, .Lfe28-(mul_13x13) .p2align 6, 0x90 .type mul_14x14, @function mul_14x14: call mla_7x7 add $(56), %rdi add $(56), %rsi call mla_7x7 movq %r8, (56)(%rdi) movq %r9, (64)(%rdi) movq %r10, (72)(%rdi) movq %r11, (80)(%rdi) movq %r12, (88)(%rdi) movq %r13, (96)(%rdi) movq %r14, (104)(%rdi) movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 add $(56), %rcx sub $(56), %rsi call mla_7x7 xor %rdx, %rdx movq (56)(%rdi), %rax add %rax, %r8 movq (64)(%rdi), %rax adc %rax, %r9 movq (72)(%rdi), %rax adc %rax, %r10 movq (80)(%rdi), %rax adc %rax, %r11 movq (88)(%rdi), %rax adc %rax, %r12 movq (96)(%rdi), %rax adc %rax, %r13 movq (104)(%rdi), %rax adc %rax, %r14 adc $(0), %rdx push %rdx add $(56), %rdi add $(56), %rsi call mla_7x7 sub $(112), %rdi sub $(56), %rsi sub $(56), %rcx pop %rdx add %rdx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 movq %r8, (168)(%rdi) movq %r9, (176)(%rdi) movq %r10, (184)(%rdi) movq %r11, (192)(%rdi) movq %r12, (200)(%rdi) movq %r13, (208)(%rdi) movq %r14, (216)(%rdi) ret .Lfe29: .size mul_14x14, .Lfe29-(mul_14x14) .p2align 6, 0x90 .type mul_15x15, @function mul_15x15: call mla_8x8 add $(64), %rdi add $(64), %rcx call mla_8x7 movq %r8, (56)(%rdi) movq %r9, (64)(%rdi) movq %r10, (72)(%rdi) movq %r11, (80)(%rdi) movq %r12, (88)(%rdi) movq %r13, (96)(%rdi) movq %r14, (104)(%rdi) movq %r15, (112)(%rdi) add $(64), %rsi sub $(64), %rcx xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mla_8x7 movq %r8, (56)(%rdi) add $(64), %rdi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx add $(64), %rcx mov %r9, %r8 mov %r10, %r9 mov %r11, %r10 mov %r12, %r11 mov %r13, %r12 mov %r14, %r13 mov %r15, %r14 xor %rdx, %rdx movq (%rdi), %rax add %rax, %r8 movq (8)(%rdi), %rax adc %rax, %r9 movq (16)(%rdi), %rax adc %rax, %r10 movq (24)(%rdi), %rax adc %rax, %r11 movq (32)(%rdi), %rax adc %rax, %r12 movq (40)(%rdi), %rax adc %rax, %r13 movq (48)(%rdi), %rax adc %rax, %r14 adc $(0), %rdx push %rdx call mla_7x7 add $(56), %rdi pop %rax add %rax, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) ret .Lfe30: .size mul_15x15, .Lfe30-(mul_15x15) .p2align 6, 0x90 .type mul_16x16, @function mul_16x16: call mla_8x8 add $(64), %rdi add $(64), %rsi call mla_8x8 movq %r8, (64)(%rdi) movq %r9, (72)(%rdi) movq %r10, (80)(%rdi) movq %r11, (88)(%rdi) movq %r12, (96)(%rdi) movq %r13, (104)(%rdi) movq %r14, (112)(%rdi) movq %r15, (120)(%rdi) movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 add $(64), %rcx sub $(64), %rsi call mla_8x8 xor %rdx, %rdx movq (64)(%rdi), %rax add %rax, %r8 movq (72)(%rdi), %rax adc %rax, %r9 movq (80)(%rdi), %rax adc %rax, %r10 movq (88)(%rdi), %rax adc %rax, %r11 movq (96)(%rdi), %rax adc %rax, %r12 movq (104)(%rdi), %rax adc %rax, %r13 movq (112)(%rdi), %rax adc %rax, %r14 movq (120)(%rdi), %rax adc %rax, %r15 adc $(0), %rdx push %rdx add $(64), %rdi add $(64), %rsi call mla_8x8 sub $(128), %rdi sub $(64), %rsi sub $(64), %rcx pop %rdx add %rdx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 adc $(0), %r15 movq %r8, (192)(%rdi) movq %r9, (200)(%rdi) movq %r10, (208)(%rdi) movq %r11, (216)(%rdi) movq %r12, (224)(%rdi) movq %r13, (232)(%rdi) movq %r14, (240)(%rdi) movq %r15, (248)(%rdi) ret .Lfe31: .size mul_16x16, .Lfe31-(mul_16x16) mul_lxl_basic: .quad mul_1x1 - mul_lxl_basic .quad mul_2x2 - mul_lxl_basic .quad mul_3x3 - mul_lxl_basic .quad mul_4x4 - mul_lxl_basic .quad mul_5x5 - mul_lxl_basic .quad mul_6x6 - mul_lxl_basic .quad mul_7x7 - mul_lxl_basic .quad mul_8x8 - mul_lxl_basic .quad mul_9x9 - mul_lxl_basic .quad mul_10x10-mul_lxl_basic .quad mul_11x11-mul_lxl_basic .quad mul_12x12-mul_lxl_basic .quad mul_13x13-mul_lxl_basic .quad mul_14x14-mul_lxl_basic .quad mul_15x15-mul_lxl_basic .quad mul_16x16-mul_lxl_basic mla_lxl_short: .quad mla_1x1 - mla_lxl_short .quad mla_2x2 - mla_lxl_short .quad mla_3x3 - mla_lxl_short .quad mla_4x4 - mla_lxl_short .quad mla_5x5 - mla_lxl_short .quad mla_6x6 - mla_lxl_short .quad mla_7x7 - mla_lxl_short mla_8xl_tail: .quad mla_8x1 - mla_8xl_tail .quad mla_8x2 - mla_8xl_tail .quad mla_8x3 - mla_8xl_tail .quad mla_8x4 - mla_8xl_tail .quad mla_8x5 - mla_8xl_tail .quad mla_8x6 - mla_8xl_tail .quad mla_8x7 - mla_8xl_tail .p2align 6, 0x90 .type mul_8Nx8M_adcox, @function mul_8Nx8M_adcox: push %rbx push %rdi push %rsi push %rdx .Lmul_loopAgas_32: push %rdx call mla_8x8 add $(64), %rdi add $(64), %rsi pop %rdx sub $(8), %rdx jnz .Lmul_loopAgas_32 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) jmp .Lmla_enrtygas_32 .Lmla_loopBgas_32: push %rbx push %rdi push %rsi push %rdx xor %rax, %rax push %rax movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 .LloopAgas_32: push %rdx call mla_8x8 add $(64), %rdi add $(64), %rsi pop %rdx sub $(8), %rdx jz .Lexit_loopAgas_32 pop %rax neg %rax movq (%rdi), %rax adc %rax, %r8 movq (8)(%rdi), %rax adc %rax, %r9 movq (16)(%rdi), %rax adc %rax, %r10 movq (24)(%rdi), %rax adc %rax, %r11 movq (32)(%rdi), %rax adc %rax, %r12 movq (40)(%rdi), %rax adc %rax, %r13 movq (48)(%rdi), %rax adc %rax, %r14 movq (56)(%rdi), %rax adc %rax, %r15 sbb %rax, %rax push %rax jmp .LloopAgas_32 .Lexit_loopAgas_32: pop %rax neg %rax adc $(0), %r8 movq %r8, (%rdi) adc $(0), %r9 movq %r9, (8)(%rdi) adc $(0), %r10 movq %r10, (16)(%rdi) adc $(0), %r11 movq %r11, (24)(%rdi) adc $(0), %r12 movq %r12, (32)(%rdi) adc $(0), %r13 movq %r13, (40)(%rdi) adc $(0), %r14 movq %r14, (48)(%rdi) adc $(0), %r15 movq %r15, (56)(%rdi) .Lmla_enrtygas_32: pop %rdx pop %rsi pop %rdi add $(64), %rdi add $(64), %rcx pop %rbx sub $(8), %rbx jnz .Lmla_loopBgas_32 ret .Lfe32: .size mul_8Nx8M_adcox, .Lfe32-(mul_8Nx8M_adcox) .p2align 6, 0x90 .type mla_simple, @function mla_simple: xor %rax, %rax mov %rdx, %r11 cmp %rbx, %r11 jge .Lms_mla_entrygas_33 xor %rbx, %r11 xor %r11, %rbx xor %rbx, %r11 xor %rcx, %rsi xor %rsi, %rcx xor %rcx, %rsi jmp .Lms_mla_entrygas_33 .Lms_loopBgas_33: push %rbx push %rdi push %rsi push %r11 push %rax movq (%rcx), %rdx xor %r10, %r10 .Lms_loopAgas_33: mulxq (%rsi), %r8, %r9 add $(8), %rdi add $(8), %rsi add %r10, %r8 adc $(0), %r9 addq (-8)(%rdi), %r8 adc $(0), %r9 movq %r8, (-8)(%rdi) mov %r9, %r10 sub $(1), %r11 jnz .Lms_loopAgas_33 pop %rax shr $(1), %rax adcq (%rdi), %r10 movq %r10, (%rdi) adc $(0), %rax pop %r11 pop %rsi pop %rdi pop %rbx add $(8), %rdi add $(8), %rcx .Lms_mla_entrygas_33: sub $(1), %rbx jnc .Lms_loopBgas_33 ret .Lfe33: .size mla_simple, .Lfe33-(mla_simple) .p2align 6, 0x90 .type mul_NxM_adcox, @function mul_NxM_adcox: sub $(56), %rsp cmp $(8), %rbx jge .Lregular_entrygas_34 cmp $(8), %rdx jge .Lirregular_entrygas_34 mov %rdx, %r8 add %rbx, %r8 mov %rdi, %rbp xor %rax, %rax .L__0000gas_34: movq %rax, (%rbp) add $(8), %rbp sub $(1), %r8 jnz .L__0000gas_34 call mla_simple jmp .Lquitgas_34 .Lirregular_entrygas_34: mov %rbx, (%rsp) mov %rdx, (24)(%rsp) mov %rdx, (32)(%rsp) lea mla_8xl_tail(%rip), %rax mov (-8)(%rax,%rbx,8), %rbp add %rbp, %rax mov %rax, (48)(%rsp) jmp .Lirr_init_entrygas_34 .Lirr_init_loopgas_34: mov %rdx, (32)(%rsp) call *%rax mov (%rsp), %rbx movq %r8, (%rdi,%rbx,8) movq %r9, (8)(%rdi,%rbx,8) movq %r10, (16)(%rdi,%rbx,8) movq %r11, (24)(%rdi,%rbx,8) movq %r12, (32)(%rdi,%rbx,8) movq %r13, (40)(%rdi,%rbx,8) movq %r14, (48)(%rdi,%rbx,8) movq %r15, (56)(%rdi,%rbx,8) add $(64), %rsi add $(64), %rdi xor %r8, %r8 xor %r9, %r9 xor %r10, %r10 xor %r11, %r11 xor %r12, %r12 xor %r13, %r13 xor %r14, %r14 xor %r15, %r15 movq (%rdi), %r8 cmp $(1), %rbx jz .Lcontinuegas_34 movq (8)(%rdi), %r9 cmp $(2), %rbx jz .Lcontinuegas_34 movq (16)(%rdi), %r10 cmp $(3), %rbx jz .Lcontinuegas_34 movq (24)(%rdi), %r11 cmp $(4), %rbx jz .Lcontinuegas_34 movq (32)(%rdi), %r12 cmp $(5), %rbx jz .Lcontinuegas_34 movq (40)(%rdi), %r13 cmp $(6), %rbx jz .Lcontinuegas_34 movq (48)(%rdi), %r14 .Lcontinuegas_34: mov (32)(%rsp), %rdx .Lirr_init_entrygas_34: sub $(8), %rdx mov (48)(%rsp), %rax jnc .Lirr_init_loopgas_34 add $(8), %rdx jz .Lquitgas_34 lea (%rdi,%rbx,8), %rbp xor %rax, %rax .L__0001gas_34: movq %rax, (%rbp) add $(8), %rbp sub $(1), %rdx jnz .L__0001gas_34 mov (32)(%rsp), %rdx call mla_simple jmp .Lquitgas_34 .Lregular_entrygas_34: sub $(8), %rbx xor %rax, %rax mov %rbx, (%rsp) mov %rdi, (8)(%rsp) mov %rsi, (16)(%rsp) mov %rdx, (24)(%rsp) mov %rdx, (32)(%rsp) mov %rax, (40)(%rsp) mov %rdx, %rbp and $(7), %rbp lea mla_8xl_tail(%rip), %rax mov (-8)(%rax,%rbp,8), %rbp add %rbp, %rax mov %rax, (48)(%rsp) sub $(8), %rdx .Linit_loopAgas_34: mov %rdx, (32)(%rsp) call mla_8x8 mov (32)(%rsp), %rdx add $(64), %rdi add $(64), %rsi sub $(8), %rdx jnc .Linit_loopAgas_34 add $(8), %rdx jz .Linit_completegas_34 mov %rdx, (32)(%rsp) mov (48)(%rsp), %rax xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call *%rax xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx mov (32)(%rsp), %rdx lea (%rdi,%rdx,8), %rdi .Linit_completegas_34: movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) jmp .Lmla_enrtygas_34 .Lmla_loopBgas_34: mov %rbx, (%rsp) mov %rdi, (8)(%rsp) xor %rax, %rax mov %rax, (40)(%rsp) movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 sub $(8), %rdx .LloopAgas_34: mov %rdx, (32)(%rsp) call mla_8x8 mov (32)(%rsp), %rdx add $(64), %rdi add $(64), %rsi sub $(8), %rdx jc .Lexit_loopAgas_34 mov (40)(%rsp), %rax shr $(1), %rax movq (%rdi), %rbx adc %rbx, %r8 movq (8)(%rdi), %rbx adc %rbx, %r9 movq (16)(%rdi), %rbx adc %rbx, %r10 movq (24)(%rdi), %rbx adc %rbx, %r11 movq (32)(%rdi), %rbx adc %rbx, %r12 movq (40)(%rdi), %rbx adc %rbx, %r13 movq (48)(%rdi), %rbx adc %rbx, %r14 movq (56)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax mov %rax, (40)(%rsp) jmp .LloopAgas_34 .Lexit_loopAgas_34: add $(8), %rdx jz .Lcomplete_reg_loopBgas_34 mov %rdx, (32)(%rsp) xor %rax, %rax .Lput_zerogas_34: movq %rax, (%rdi,%rdx,8) add $(1), %rdx cmp $(8), %rdx jl .Lput_zerogas_34 mov (40)(%rsp), %rax shr $(1), %rax mov (%rdi), %rbx adc %rbx, %r8 mov (8)(%rdi), %rbx adc %rbx, %r9 mov (16)(%rdi), %rbx adc %rbx, %r10 mov (24)(%rdi), %rbx adc %rbx, %r11 mov (32)(%rdi), %rbx adc %rbx, %r12 mov (40)(%rdi), %rbx adc %rbx, %r13 mov (48)(%rdi), %rbx adc %rbx, %r14 mov (56)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax mov %rax, (40)(%rsp) mov (48)(%rsp), %rax xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call *%rax xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx mov (32)(%rsp), %rdx lea (%rdi,%rdx,8), %rdi mov (40)(%rsp), %rax shr $(1), %rax dec %rdx jz .Lmt_1gas_34 dec %rdx jz .Lmt_2gas_34 dec %rdx jz .Lmt_3gas_34 dec %rdx jz .Lmt_4gas_34 dec %rdx jz .Lmt_5gas_34 dec %rdx jz .Lmt_6gas_34 .Lmt_7gas_34: adc $(0), %r9 .Lmt_6gas_34: adc $(0), %r10 .Lmt_5gas_34: adc $(0), %r11 .Lmt_4gas_34: adc $(0), %r12 .Lmt_3gas_34: adc $(0), %r13 .Lmt_2gas_34: adc $(0), %r14 .Lmt_1gas_34: adc $(0), %r15 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) jmp .Lmla_enrtygas_34 .Lcomplete_reg_loopBgas_34: mov (40)(%rsp), %rax add %rax, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 adc $(0), %r15 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) .Lmla_enrtygas_34: mov (%rsp), %rbx mov (8)(%rsp), %rdi mov (24)(%rsp), %rdx mov (16)(%rsp), %rsi add $(64), %rcx add $(64), %rdi sub $(8), %rbx jnc .Lmla_loopBgas_34 add $(8), %rbx jz .Lquitgas_34 mov %rbx, (%rsp) lea mla_8xl_tail(%rip), %rax mov (-8)(%rax,%rbx,8), %rbp add %rbp, %rax mov %rax, (48)(%rsp) lea (%rdi,%rdx,8), %rbp xor %rax, %rax .L__0002gas_34: movq %rax, (%rbp) add $(8), %rbp sub $(1), %rbx jnz .L__0002gas_34 xor %rax, %rax mov %rax, (40)(%rsp) sub $(8), %rdx .Ltail_loopAgas_34: movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov %rdx, (32)(%rsp) mov (48)(%rsp), %rax call *%rax .Lenrty_tail_loopAgas_34: mov (40)(%rsp), %rax shr $(1), %rax adc $(0), %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 adc $(0), %r15 adc $(0), %rax mov (%rsp), %rbx mov %rbx, %rbp dec %rbp jz .Ltt_1gas_34 dec %rbp jz .Ltt_2gas_34 dec %rbp jz .Ltt_3gas_34 dec %rbp jz .Ltt_4gas_34 dec %rbp jz .Ltt_5gas_34 dec %rbp jz .Ltt_6gas_34 .Ltt_7gas_34: mov (8)(%rdi,%rbx,8), %rbp adc %rbp, %r9 .Ltt_6gas_34: mov (16)(%rdi,%rbx,8), %rbp adc %rbp, %r10 .Ltt_5gas_34: mov (24)(%rdi,%rbx,8), %rbp adc %rbp, %r11 .Ltt_4gas_34: mov (32)(%rdi,%rbx,8), %rbp adc %rbp, %r12 .Ltt_3gas_34: mov (40)(%rdi,%rbx,8), %rbp adc %rbp, %r13 .Ltt_2gas_34: mov (48)(%rdi,%rbx,8), %rbp adc %rbp, %r14 .Ltt_1gas_34: mov (56)(%rdi,%rbx,8), %rbp adc %rbp, %r15 adc $(0), %rax mov %rax, (40)(%rsp) movq %r8, (%rdi,%rbx,8) movq %r9, (8)(%rdi,%rbx,8) movq %r10, (16)(%rdi,%rbx,8) movq %r11, (24)(%rdi,%rbx,8) movq %r12, (32)(%rdi,%rbx,8) movq %r13, (40)(%rdi,%rbx,8) movq %r14, (48)(%rdi,%rbx,8) movq %r15, (56)(%rdi,%rbx,8) mov (32)(%rsp), %rdx add $(64), %rsi add $(64), %rdi sub $(8), %rdx jnc .Ltail_loopAgas_34 add $(8), %rdx jz .Lquitgas_34 mov (40)(%rsp), %rax mov %rbx, %rbp dec %rbp movq (%rdi,%rbx,8), %r8 add %rax, %r8 movq %r8, (%rdi,%rbx,8) jz .Lsimplegas_34 dec %rbp movq (8)(%rdi,%rbx,8), %r9 adc $(0), %r9 movq %r9, (8)(%rdi,%rbx,8) jz .Lsimplegas_34 dec %rbp movq (16)(%rdi,%rbx,8), %r10 adc $(0), %r10 movq %r10, (16)(%rdi,%rbx,8) jz .Lsimplegas_34 dec %rbp movq (24)(%rdi,%rbx,8), %r11 adc $(0), %r11 movq %r11, (24)(%rdi,%rbx,8) jz .Lsimplegas_34 dec %rbp movq (32)(%rdi,%rbx,8), %r12 adc $(0), %r12 movq %r12, (32)(%rdi,%rbx,8) jz .Lsimplegas_34 dec %rbp movq (40)(%rdi,%rbx,8), %r13 adc $(0), %r13 movq %r13, (40)(%rdi,%rbx,8) jz .Lsimplegas_34 dec %rbp movq (48)(%rdi,%rbx,8), %r14 adc $(0), %r14 movq %r14, (48)(%rdi,%rbx,8) .Lsimplegas_34: call mla_simple .Lquitgas_34: add $(56), %rsp ret .Lfe34: .size mul_NxM_adcox, .Lfe34-(mul_NxM_adcox) .p2align 6, 0x90 sqr_1: movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) movq %rdx, (8)(%rdi) ret .p2align 6, 0x90 .type sqr_2, @function sqr_2: movq (8)(%rsi), %rdx mulxq (%rsi), %r9, %rax mulx %rdx, %r10, %r11 movq (%rsi), %rdx mulx %rdx, %r8, %rdx add %r9, %r9 adc %rax, %rax adc $(0), %r11 movq %r8, (%rdi) add %rdx, %r9 movq %r9, (8)(%rdi) adc %rax, %r10 movq %r10, (16)(%rdi) adc $(0), %r11 movq %r11, (24)(%rdi) ret .Lfe35: .size sqr_2, .Lfe35-(sqr_2) .p2align 6, 0x90 .type sqr_3, @function sqr_3: mov (%rsi), %rdx mulx (8)(%rsi), %r8, %r9 mulx (16)(%rsi), %rax, %r10 add %rax, %r9 adc $(0), %r10 mov (8)(%rsi), %rdx mulx (16)(%rsi), %rax, %r11 add %rax, %r10 adc $(0), %r11 xor %rcx, %rcx mov (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx %r8, %rdx adox %r8, %rdx movq %rdx, (8)(%rdi) mov (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r9, %rax adox %r9, %rax movq %rax, (16)(%rdi) adcx %r10, %rdx adox %r10, %rdx movq %rdx, (24)(%rdi) mov (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r11, %rax adox %r11, %rax movq %rax, (32)(%rdi) adcx %rcx, %rdx adox %rcx, %rdx movq %rdx, (40)(%rdi) ret .Lfe36: .size sqr_3, .Lfe36-(sqr_3) .p2align 6, 0x90 .type sqr_4, @function sqr_4: mov (%rsi), %rdx mulx (8)(%rsi), %r8, %r9 xor %rcx, %rcx mulx (16)(%rsi), %rax, %r10 add %rax, %r9 mulx (24)(%rsi), %rax, %r11 adc %rax, %r10 adc $(0), %r11 mov (8)(%rsi), %rdx mulx (16)(%rsi), %rax, %rbp adcx %rax, %r10 adox %rbp, %r11 mulx (24)(%rsi), %rax, %r12 adcx %rax, %r11 adox %rcx, %r12 adc $(0), %r12 mov (16)(%rsi), %rdx mulx (24)(%rsi), %rax, %r13 add %rax, %r12 adc $(0), %r13 mov (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx %r8, %rdx adox %r8, %rdx movq %rdx, (8)(%rdi) mov (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r9, %rax adox %r9, %rax movq %rax, (16)(%rdi) adcx %r10, %rdx adox %r10, %rdx movq %rdx, (24)(%rdi) mov (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r11, %rax adox %r11, %rax movq %rax, (32)(%rdi) adcx %r12, %rdx adox %r12, %rdx movq %rdx, (40)(%rdi) mov (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r13, %rax adox %r13, %rax movq %rax, (48)(%rdi) adcx %rcx, %rdx adox %rcx, %rdx movq %rdx, (56)(%rdi) ret .Lfe37: .size sqr_4, .Lfe37-(sqr_4) .p2align 6, 0x90 .type sqr_5, @function sqr_5: mov (%rsi), %rdx mulx (8)(%rsi), %r8, %r9 xor %rcx, %rcx mulx (16)(%rsi), %rax, %r10 add %rax, %r9 mulx (24)(%rsi), %rax, %r11 adc %rax, %r10 mulx (32)(%rsi), %rax, %r12 adc %rax, %r11 adc $(0), %r12 mov (8)(%rsi), %rdx mulx (16)(%rsi), %rax, %rbp adcx %rax, %r10 adox %rbp, %r11 mulx (24)(%rsi), %rax, %rbp adcx %rax, %r11 adox %rbp, %r12 mulx (32)(%rsi), %rax, %r13 adcx %rax, %r12 adox %rcx, %r13 adc $(0), %r13 mov (16)(%rsi), %rdx mulx (24)(%rsi), %rax, %rbp adcx %rax, %r12 adox %rbp, %r13 mulx (32)(%rsi), %rax, %r14 adcx %rax, %r13 adox %rcx, %r14 adc $(0), %r14 mov (24)(%rsi), %rdx mulx (32)(%rsi), %rax, %r15 add %rax, %r14 adc $(0), %r15 mov (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx %r8, %rdx adox %r8, %rdx movq %rdx, (8)(%rdi) mov (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r9, %rax adox %r9, %rax movq %rax, (16)(%rdi) adcx %r10, %rdx adox %r10, %rdx movq %rdx, (24)(%rdi) mov (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r11, %rax adox %r11, %rax movq %rax, (32)(%rdi) adcx %r12, %rdx adox %r12, %rdx movq %rdx, (40)(%rdi) mov (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r13, %rax adox %r13, %rax movq %rax, (48)(%rdi) adcx %r14, %rdx adox %r14, %rdx movq %rdx, (56)(%rdi) mov (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r15, %rax adox %r15, %rax movq %rax, (64)(%rdi) adcx %rcx, %rdx adox %rcx, %rdx movq %rdx, (72)(%rdi) ret .Lfe38: .size sqr_5, .Lfe38-(sqr_5) .p2align 6, 0x90 .type sqr_6, @function sqr_6: mov (%rsi), %rdx mulx (8)(%rsi), %r8, %r9 xor %rcx, %rcx mulx (16)(%rsi), %rax, %r10 add %rax, %r9 mulx (24)(%rsi), %rax, %r11 adc %rax, %r10 mulx (32)(%rsi), %rax, %r12 adc %rax, %r11 mulx (40)(%rsi), %rax, %r13 adc %rax, %r12 adc $(0), %r13 mov (8)(%rsi), %rdx mulx (16)(%rsi), %rax, %rbp adcx %rax, %r10 adox %rbp, %r11 mulx (24)(%rsi), %rax, %rbp adcx %rax, %r11 adox %rbp, %r12 mulx (32)(%rsi), %rax, %rbp adcx %rax, %r12 adox %rbp, %r13 mulx (40)(%rsi), %rax, %r14 adcx %rax, %r13 adox %rcx, %r14 adc $(0), %r14 mov (16)(%rsi), %rdx mulx (24)(%rsi), %rax, %rbp adcx %rax, %r12 adox %rbp, %r13 mulx (32)(%rsi), %rax, %rbp adcx %rax, %r13 adox %rbp, %r14 mulx (40)(%rsi), %rax, %r15 adcx %rax, %r14 adox %rcx, %r15 adc $(0), %r15 mov (24)(%rsi), %rdx mulx (32)(%rsi), %rax, %rbp adcx %rax, %r14 adox %rbp, %r15 mulx (40)(%rsi), %rax, %rbx adcx %rax, %r15 adox %rcx, %rbx adc $(0), %rbx mov (32)(%rsi), %rdx mulx (40)(%rsi), %rax, %rbp add %rax, %rbx adc $(0), %rbp mov (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx %r8, %rdx adox %r8, %rdx movq %rdx, (8)(%rdi) mov (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r9, %rax adox %r9, %rax movq %rax, (16)(%rdi) adcx %r10, %rdx adox %r10, %rdx movq %rdx, (24)(%rdi) mov (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r11, %rax adox %r11, %rax movq %rax, (32)(%rdi) adcx %r12, %rdx adox %r12, %rdx movq %rdx, (40)(%rdi) mov (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r13, %rax adox %r13, %rax movq %rax, (48)(%rdi) adcx %r14, %rdx adox %r14, %rdx movq %rdx, (56)(%rdi) mov (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r15, %rax adox %r15, %rax movq %rax, (64)(%rdi) adcx %rbx, %rdx adox %rbx, %rdx movq %rdx, (72)(%rdi) mov (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %rbp, %rax adox %rbp, %rax movq %rax, (80)(%rdi) adcx %rcx, %rdx adox %rcx, %rdx movq %rdx, (88)(%rdi) ret .Lfe39: .size sqr_6, .Lfe39-(sqr_6) .p2align 6, 0x90 .type sqr_7, @function sqr_7: mov (%rsi), %rdx mulx (8)(%rsi), %r8, %r9 xor %rcx, %rcx mulx (16)(%rsi), %rax, %r10 add %rax, %r9 mulx (24)(%rsi), %rax, %r11 adc %rax, %r10 mulx (32)(%rsi), %rax, %r12 adc %rax, %r11 mulx (40)(%rsi), %rax, %r13 adc %rax, %r12 mulx (48)(%rsi), %rax, %r14 adc %rax, %r13 adc $(0), %r14 mov %r8, (8)(%rdi) mov %r9, (16)(%rdi) mov (8)(%rsi), %rdx mulx (16)(%rsi), %rax, %rbp adcx %rax, %r10 adox %rbp, %r11 mulx (24)(%rsi), %rax, %rbp adcx %rax, %r11 adox %rbp, %r12 mulx (32)(%rsi), %rax, %rbp adcx %rax, %r12 adox %rbp, %r13 mulx (40)(%rsi), %rax, %rbp adcx %rax, %r13 adox %rbp, %r14 mulx (48)(%rsi), %rax, %r15 adcx %rax, %r14 adox %rcx, %r15 adc $(0), %r15 mov %r10, (24)(%rdi) mov (16)(%rsi), %rdx mulx (24)(%rsi), %rax, %rbp adcx %rax, %r12 adox %rbp, %r13 mulx (32)(%rsi), %rax, %rbp adcx %rax, %r13 adox %rbp, %r14 mulx (40)(%rsi), %rax, %rbp adcx %rax, %r14 adox %rbp, %r15 mulx (48)(%rsi), %rax, %rbx adcx %rax, %r15 adox %rcx, %rbx adc $(0), %rbx mov (24)(%rsi), %rdx mulx (32)(%rsi), %rax, %rbp adcx %rax, %r14 adox %rbp, %r15 mulx (40)(%rsi), %rax, %rbp adcx %rax, %r15 adox %rbp, %rbx mulx (48)(%rsi), %rax, %r8 adcx %rax, %rbx adox %rcx, %r8 adc $(0), %r8 mov (32)(%rsi), %rdx mulx (40)(%rsi), %rax, %rbp adcx %rax, %rbx adox %rbp, %r8 mulx (48)(%rsi), %rax, %r9 adcx %rax, %r8 adox %rcx, %r9 adc $(0), %r9 mov (40)(%rsi), %rdx mulx (48)(%rsi), %rax, %r10 add %rax, %r9 adc $(0), %r10 mov (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) mov (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) mov (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r11, %rax adox %r11, %rax movq %rax, (32)(%rdi) adcx %r12, %rdx adox %r12, %rdx movq %rdx, (40)(%rdi) mov (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r13, %rax adox %r13, %rax movq %rax, (48)(%rdi) adcx %r14, %rdx adox %r14, %rdx movq %rdx, (56)(%rdi) mov (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r15, %rax adox %r15, %rax movq %rax, (64)(%rdi) adcx %rbx, %rdx adox %rbx, %rdx movq %rdx, (72)(%rdi) mov (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r8, %rax adox %r8, %rax movq %rax, (80)(%rdi) adcx %r9, %rdx adox %r9, %rdx movq %rdx, (88)(%rdi) mov (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r10, %rax adox %r10, %rax movq %rax, (96)(%rdi) adcx %rcx, %rdx adox %rcx, %rdx movq %rdx, (104)(%rdi) ret .Lfe40: .size sqr_7, .Lfe40-(sqr_7) .p2align 6, 0x90 .type sqr_8, @function sqr_8: mov (%rsi), %rdx mulx (8)(%rsi), %r8, %r9 xor %rcx, %rcx mulx (16)(%rsi), %rax, %r10 add %rax, %r9 mulx (24)(%rsi), %rax, %r11 adc %rax, %r10 mulx (32)(%rsi), %rax, %r12 adc %rax, %r11 mulx (40)(%rsi), %rax, %r13 adc %rax, %r12 mulx (48)(%rsi), %rax, %r14 adc %rax, %r13 mulx (56)(%rsi), %rax, %r15 adc %rax, %r14 adc $(0), %r15 mov %r8, (8)(%rdi) mov %r9, (16)(%rdi) mov (8)(%rsi), %rdx mulx (16)(%rsi), %rax, %rbp adcx %rax, %r10 adox %rbp, %r11 mulx (24)(%rsi), %rax, %rbp adcx %rax, %r11 adox %rbp, %r12 mulx (32)(%rsi), %rax, %rbp adcx %rax, %r12 adox %rbp, %r13 mulx (40)(%rsi), %rax, %rbp adcx %rax, %r13 adox %rbp, %r14 mulx (48)(%rsi), %rax, %rbp adcx %rax, %r14 adox %rbp, %r15 mulx (56)(%rsi), %rax, %rbx adcx %rax, %r15 adox %rcx, %rbx adc $(0), %rbx mov %r10, (24)(%rdi) mov %r11, (32)(%rdi) mov (16)(%rsi), %rdx mulx (24)(%rsi), %rax, %rbp adcx %rax, %r12 adox %rbp, %r13 mulx (32)(%rsi), %rax, %rbp adcx %rax, %r13 adox %rbp, %r14 mulx (40)(%rsi), %rax, %rbp adcx %rax, %r14 adox %rbp, %r15 mulx (48)(%rsi), %rax, %rbp adcx %rax, %r15 adox %rbp, %rbx mulx (56)(%rsi), %rax, %r8 adcx %rax, %rbx adox %rcx, %r8 adc $(0), %r8 mov (24)(%rsi), %rdx mulx (32)(%rsi), %rax, %rbp adcx %rax, %r14 adox %rbp, %r15 mulx (40)(%rsi), %rax, %rbp adcx %rax, %r15 adox %rbp, %rbx mulx (48)(%rsi), %rax, %rbp adcx %rax, %rbx adox %rbp, %r8 mulx (56)(%rsi), %rax, %r9 adcx %rax, %r8 adox %rcx, %r9 adc $(0), %r9 mov (32)(%rsi), %rdx mulx (40)(%rsi), %rax, %rbp adcx %rax, %rbx adox %rbp, %r8 mulx (48)(%rsi), %rax, %rbp adcx %rax, %r8 adox %rbp, %r9 mulx (56)(%rsi), %rax, %r10 adcx %rax, %r9 adox %rcx, %r10 adc $(0), %r10 mov (40)(%rsi), %rdx mulx (48)(%rsi), %rax, %rbp adcx %rax, %r9 adox %rbp, %r10 mulx (56)(%rsi), %rax, %r11 adcx %rax, %r10 adox %rcx, %r11 adc $(0), %r11 mov (48)(%rsi), %rdx mulx (56)(%rsi), %rax, %rbp add %rax, %r11 adc $(0), %rbp mov (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) mov (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) mov (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx %r12, %rdx adox %r12, %rdx movq %rdx, (40)(%rdi) mov (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r13, %rax adox %r13, %rax movq %rax, (48)(%rdi) adcx %r14, %rdx adox %r14, %rdx movq %rdx, (56)(%rdi) mov (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r15, %rax adox %r15, %rax movq %rax, (64)(%rdi) adcx %rbx, %rdx adox %rbx, %rdx movq %rdx, (72)(%rdi) mov (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r8, %rax adox %r8, %rax movq %rax, (80)(%rdi) adcx %r9, %rdx adox %r9, %rdx movq %rdx, (88)(%rdi) mov (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %r10, %rax adox %r10, %rax movq %rax, (96)(%rdi) adcx %r11, %rdx adox %r11, %rdx movq %rdx, (104)(%rdi) mov (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx %rbp, %rax adox %rbp, %rax movq %rax, (112)(%rdi) adcx %rcx, %rdx adox %rcx, %rdx movq %rdx, (120)(%rdi) ret .Lfe41: .size sqr_8, .Lfe41-(sqr_8) .p2align 6, 0x90 .type finalize, @function finalize: push %rcx xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx lea (8)(%rsi), %rsi movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) lea (16)(%rdi), %rdi lea (-2)(%rcx), %rcx .Lnext_sqrgas_42: movq (%rsi), %rdx mulx %rdx, %rax, %rdx lea (8)(%rsi), %rsi adcx (%rdi), %rax adox (%rdi), %rax movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) lea (16)(%rdi), %rdi lea (-1)(%rcx), %rcx jrcxz .Llast_sqrgas_42 jmp .Lnext_sqrgas_42 .Llast_sqrgas_42: movq (%rsi), %rdx mulx %rdx, %rax, %rdx adcx (%rdi), %rax adox (%rdi), %rax movq %rax, (%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (8)(%rdi) pop %rcx lea (-8)(,%rcx,8), %rax sub %rax, %rsi sub %rax, %rdi sub %rax, %rdi ret .Lfe42: .size finalize, .Lfe42-(finalize) .p2align 6, 0x90 .type sqr8_triangle, @function sqr8_triangle: mov (%rsi), %rdx xor %rax, %rax mov %r8, (%rdi) mulx (8)(%rsi), %rbx, %rbp adcx %rbx, %r9 adox %rbp, %r10 mulx (16)(%rsi), %rbx, %rbp adcx %rbx, %r10 adox %rbp, %r11 mulx (24)(%rsi), %rbx, %rbp adcx %rbx, %r11 adox %rbp, %r12 mulx (32)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (40)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (48)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (56)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 mov (8)(%rsi), %rdx xor %rax, %rax mov %r9, (8)(%rdi) mulx (16)(%rsi), %rbx, %rbp adcx %rbx, %r11 adox %rbp, %r12 mulx (24)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (32)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (40)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (48)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (56)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 mov (16)(%rsi), %rdx xor %rax, %rax mov %r10, (16)(%rdi) mulx (24)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (32)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (40)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (48)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (56)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 mov (24)(%rsi), %rdx xor %rax, %rax mov %r11, (24)(%rdi) mulx (32)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (40)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (48)(%rsi), %rbx, %rbp adcx %rbx, %r9 adox %rbp, %r10 mulx (56)(%rsi), %rbx, %r11 adcx %rbx, %r10 adox %rax, %r11 adc $(0), %r11 mov (32)(%rsi), %rdx xor %rax, %rax mov %r12, (32)(%rdi) mulx (40)(%rsi), %rbx, %rbp adcx %rbx, %r9 adox %rbp, %r10 mulx (48)(%rsi), %rbx, %rbp adcx %rbx, %r10 adox %rbp, %r11 mulx (56)(%rsi), %rbx, %r12 adcx %rbx, %r11 adox %rax, %r12 adc $(0), %r12 mov (40)(%rsi), %rdx xor %rax, %rax mov %r13, (40)(%rdi) mulx (48)(%rsi), %rbx, %rbp adcx %rbx, %r11 adox %rbp, %r12 mulx (56)(%rsi), %rbx, %r13 adcx %rbx, %r12 adox %rax, %r13 adc $(0), %r13 mov (48)(%rsi), %rdx xor %rax, %rax mov %r14, (48)(%rdi) mulx (56)(%rsi), %rbx, %r14 adcx %rbx, %r13 adox %rax, %r14 adc $(0), %r14 ret .Lfe43: .size sqr8_triangle, .Lfe43-(sqr8_triangle) .p2align 6, 0x90 .type sqr_9, @function sqr_9: call sqr8_triangle movq %r15, (56)(%rdi) lea (64)(%rsi), %rcx add $(64), %rdi xor %r15, %r15 call mla_8x1 movq %r8, (8)(%rdi) movq %r9, (16)(%rdi) movq %r10, (24)(%rdi) movq %r11, (32)(%rdi) movq %r12, (40)(%rdi) movq %r13, (48)(%rdi) movq %r14, (56)(%rdi) movq %r15, (64)(%rdi) xor %rbx, %rbx movq %rbx, (72)(%rdi) sub $(64), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (136)(%rdi) ret .Lfe44: .size sqr_9, .Lfe44-(sqr_9) .p2align 6, 0x90 .type sqr_10, @function sqr_10: call sqr8_triangle movq %r15, (56)(%rdi) lea (64)(%rsi), %rcx add $(64), %rdi xor %r15, %r15 call mla_8x2 movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) movq %r10, (32)(%rdi) movq %r11, (40)(%rdi) movq %r12, (48)(%rdi) movq %r13, (56)(%rdi) movq %r14, (64)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mulx (72)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 xor %rbx, %rbx movq %r15, (72)(%rdi) movq %r8, (80)(%rdi) movq %rbx, (88)(%rdi) sub $(64), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) adcx (136)(%rdi), %rdx adox (136)(%rdi), %rdx movq %rdx, (136)(%rdi) movq (72)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (144)(%rdi), %rax adox (144)(%rdi), %rax movq %rax, (144)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (152)(%rdi) ret .Lfe45: .size sqr_10, .Lfe45-(sqr_10) .p2align 6, 0x90 .type sqr_11, @function sqr_11: call sqr8_triangle movq %r15, (56)(%rdi) lea (64)(%rsi), %rcx add $(64), %rdi xor %r15, %r15 call mla_8x1 add $(8), %rdi add $(8), %rcx call mla_8x2 sub $(8), %rdi sub $(8), %rcx movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) movq %r11, (48)(%rdi) movq %r12, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r13, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (80)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r14, (72)(%rdi) mulx (80)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 xor %rbx, %rbx movq %r15, (80)(%rdi) movq %r8, (88)(%rdi) movq %r9, (96)(%rdi) movq %rbx, (104)(%rdi) sub $(64), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) adcx (136)(%rdi), %rdx adox (136)(%rdi), %rdx movq %rdx, (136)(%rdi) movq (72)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (144)(%rdi), %rax adox (144)(%rdi), %rax movq %rax, (144)(%rdi) adcx (152)(%rdi), %rdx adox (152)(%rdi), %rdx movq %rdx, (152)(%rdi) movq (80)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (160)(%rdi), %rax adox (160)(%rdi), %rax movq %rax, (160)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (168)(%rdi) ret .Lfe46: .size sqr_11, .Lfe46-(sqr_11) .p2align 6, 0x90 .type sqr_12, @function sqr_12: call sqr8_triangle movq %r15, (56)(%rdi) lea (64)(%rsi), %rcx add $(64), %rdi xor %r15, %r15 call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 sub $(16), %rdi sub $(16), %rcx movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r12, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (88)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r13, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (88)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r14, (80)(%rdi) mulx (88)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 xor %rbx, %rbx movq %r15, (88)(%rdi) movq %r8, (96)(%rdi) movq %r9, (104)(%rdi) movq %r10, (112)(%rdi) movq %rbx, (120)(%rdi) sub $(64), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) adcx (136)(%rdi), %rdx adox (136)(%rdi), %rdx movq %rdx, (136)(%rdi) movq (72)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (144)(%rdi), %rax adox (144)(%rdi), %rax movq %rax, (144)(%rdi) adcx (152)(%rdi), %rdx adox (152)(%rdi), %rdx movq %rdx, (152)(%rdi) movq (80)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (160)(%rdi), %rax adox (160)(%rdi), %rax movq %rax, (160)(%rdi) adcx (168)(%rdi), %rdx adox (168)(%rdi), %rdx movq %rdx, (168)(%rdi) movq (88)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (176)(%rdi), %rax adox (176)(%rdi), %rax movq %rax, (176)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (184)(%rdi) ret .Lfe47: .size sqr_12, .Lfe47-(sqr_12) .p2align 6, 0x90 .type sqr_13, @function sqr_13: call sqr8_triangle movq %r15, (56)(%rdi) lea (64)(%rsi), %rcx add $(64), %rdi xor %r15, %r15 call mla_8x1 add $(8), %rdi add $(8), %rcx call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 sub $(24), %rdi sub $(24), %rcx movq %r8, (40)(%rdi) movq %r9, (48)(%rdi) movq %r10, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r11, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (96)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r12, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (96)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r13, (80)(%rdi) mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (96)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 movq (88)(%rsi), %rdx xor %rax, %rax mov %r14, (88)(%rdi) mulx (96)(%rsi), %rbx, %r11 adcx %rbx, %r10 adox %rax, %r11 adc $(0), %r11 xor %rbx, %rbx movq %r15, (96)(%rdi) movq %r8, (104)(%rdi) movq %r9, (112)(%rdi) movq %r10, (120)(%rdi) movq %r11, (128)(%rdi) movq %rbx, (136)(%rdi) sub $(64), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) adcx (136)(%rdi), %rdx adox (136)(%rdi), %rdx movq %rdx, (136)(%rdi) movq (72)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (144)(%rdi), %rax adox (144)(%rdi), %rax movq %rax, (144)(%rdi) adcx (152)(%rdi), %rdx adox (152)(%rdi), %rdx movq %rdx, (152)(%rdi) movq (80)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (160)(%rdi), %rax adox (160)(%rdi), %rax movq %rax, (160)(%rdi) adcx (168)(%rdi), %rdx adox (168)(%rdi), %rdx movq %rdx, (168)(%rdi) movq (88)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (176)(%rdi), %rax adox (176)(%rdi), %rax movq %rax, (176)(%rdi) adcx (184)(%rdi), %rdx adox (184)(%rdi), %rdx movq %rdx, (184)(%rdi) movq (96)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (192)(%rdi), %rax adox (192)(%rdi), %rax movq %rax, (192)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (200)(%rdi) ret .Lfe48: .size sqr_13, .Lfe48-(sqr_13) .p2align 6, 0x90 .type sqr_14, @function sqr_14: call sqr8_triangle movq %r15, (56)(%rdi) lea (64)(%rsi), %rcx add $(64), %rdi xor %r15, %r15 call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 sub $(32), %rdi sub $(32), %rcx movq %r8, (48)(%rdi) movq %r9, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r10, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r11 adox %rbp, %r12 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (104)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r11, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (104)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r12, (80)(%rdi) mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (104)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 movq (88)(%rsi), %rdx xor %rax, %rax mov %r13, (88)(%rdi) mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r9 adox %rbp, %r10 mulx (104)(%rsi), %rbx, %r11 adcx %rbx, %r10 adox %rax, %r11 adc $(0), %r11 movq (96)(%rsi), %rdx xor %rax, %rax mov %r14, (96)(%rdi) mulx (104)(%rsi), %rbx, %r12 adcx %rbx, %r11 adox %rax, %r12 adc $(0), %r12 xor %rbx, %rbx movq %r15, (104)(%rdi) movq %r8, (112)(%rdi) movq %r9, (120)(%rdi) movq %r10, (128)(%rdi) movq %r11, (136)(%rdi) movq %r12, (144)(%rdi) movq %rbx, (152)(%rdi) sub $(64), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) adcx (136)(%rdi), %rdx adox (136)(%rdi), %rdx movq %rdx, (136)(%rdi) movq (72)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (144)(%rdi), %rax adox (144)(%rdi), %rax movq %rax, (144)(%rdi) adcx (152)(%rdi), %rdx adox (152)(%rdi), %rdx movq %rdx, (152)(%rdi) movq (80)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (160)(%rdi), %rax adox (160)(%rdi), %rax movq %rax, (160)(%rdi) adcx (168)(%rdi), %rdx adox (168)(%rdi), %rdx movq %rdx, (168)(%rdi) movq (88)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (176)(%rdi), %rax adox (176)(%rdi), %rax movq %rax, (176)(%rdi) adcx (184)(%rdi), %rdx adox (184)(%rdi), %rdx movq %rdx, (184)(%rdi) movq (96)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (192)(%rdi), %rax adox (192)(%rdi), %rax movq %rax, (192)(%rdi) adcx (200)(%rdi), %rdx adox (200)(%rdi), %rdx movq %rdx, (200)(%rdi) movq (104)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (208)(%rdi), %rax adox (208)(%rdi), %rax movq %rax, (208)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (216)(%rdi) ret .Lfe49: .size sqr_14, .Lfe49-(sqr_14) .p2align 6, 0x90 .type sqr_15, @function sqr_15: call sqr8_triangle movq %r15, (56)(%rdi) lea (64)(%rsi), %rcx add $(64), %rdi xor %r15, %r15 call mla_8x1 add $(8), %rdi add $(8), %rcx call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 sub $(40), %rdi sub $(40), %rcx movq %r8, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r9, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r10 adox %rbp, %r11 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r11 adox %rbp, %r12 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (112)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r10, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (112)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r11, (80)(%rdi) mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (112)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 movq (88)(%rsi), %rdx xor %rax, %rax mov %r12, (88)(%rdi) mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r9 adox %rbp, %r10 mulx (112)(%rsi), %rbx, %r11 adcx %rbx, %r10 adox %rax, %r11 adc $(0), %r11 movq (96)(%rsi), %rdx xor %rax, %rax mov %r13, (96)(%rdi) mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r10 adox %rbp, %r11 mulx (112)(%rsi), %rbx, %r12 adcx %rbx, %r11 adox %rax, %r12 adc $(0), %r12 movq (104)(%rsi), %rdx xor %rax, %rax mov %r14, (104)(%rdi) mulx (112)(%rsi), %rbx, %r13 adcx %rbx, %r12 adox %rax, %r13 adc $(0), %r13 xor %rbx, %rbx movq %r15, (112)(%rdi) movq %r8, (120)(%rdi) movq %r9, (128)(%rdi) movq %r10, (136)(%rdi) movq %r11, (144)(%rdi) movq %r12, (152)(%rdi) movq %r13, (160)(%rdi) movq %rbx, (168)(%rdi) sub $(64), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) adcx (136)(%rdi), %rdx adox (136)(%rdi), %rdx movq %rdx, (136)(%rdi) movq (72)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (144)(%rdi), %rax adox (144)(%rdi), %rax movq %rax, (144)(%rdi) adcx (152)(%rdi), %rdx adox (152)(%rdi), %rdx movq %rdx, (152)(%rdi) movq (80)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (160)(%rdi), %rax adox (160)(%rdi), %rax movq %rax, (160)(%rdi) adcx (168)(%rdi), %rdx adox (168)(%rdi), %rdx movq %rdx, (168)(%rdi) movq (88)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (176)(%rdi), %rax adox (176)(%rdi), %rax movq %rax, (176)(%rdi) adcx (184)(%rdi), %rdx adox (184)(%rdi), %rdx movq %rdx, (184)(%rdi) movq (96)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (192)(%rdi), %rax adox (192)(%rdi), %rax movq %rax, (192)(%rdi) adcx (200)(%rdi), %rdx adox (200)(%rdi), %rdx movq %rdx, (200)(%rdi) movq (104)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (208)(%rdi), %rax adox (208)(%rdi), %rax movq %rax, (208)(%rdi) adcx (216)(%rdi), %rdx adox (216)(%rdi), %rdx movq %rdx, (216)(%rdi) movq (112)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (224)(%rdi), %rax adox (224)(%rdi), %rax movq %rax, (224)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (232)(%rdi) ret .Lfe50: .size sqr_15, .Lfe50-(sqr_15) .p2align 6, 0x90 .type sqr_16, @function sqr_16: call sqr8_triangle movq %r15, (56)(%rdi) mov %rsi, %rcx add $(64), %rsi add $(64), %rdi xor %r15, %r15 call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 add $(16), %rdi add $(16), %rcx call mla_8x2 sub $(48), %rdi sub $(48), %rcx add $(64), %rdi call sqr8_triangle xor %rbx, %rbx movq %r15, (56)(%rdi) movq %r8, (64)(%rdi) movq %r9, (72)(%rdi) movq %r10, (80)(%rdi) movq %r11, (88)(%rdi) movq %r12, (96)(%rdi) movq %r13, (104)(%rdi) movq %r14, (112)(%rdi) movq %rbx, (120)(%rdi) sub $(64), %rsi sub $(128), %rdi xor %rax, %rax movq (%rsi), %rdx mulx %rdx, %rax, %rdx movq %rax, (%rdi) adcx (8)(%rdi), %rdx adox (8)(%rdi), %rdx movq %rdx, (8)(%rdi) movq (8)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (16)(%rdi), %rax adox (16)(%rdi), %rax movq %rax, (16)(%rdi) adcx (24)(%rdi), %rdx adox (24)(%rdi), %rdx movq %rdx, (24)(%rdi) movq (16)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (32)(%rdi), %rax adox (32)(%rdi), %rax movq %rax, (32)(%rdi) adcx (40)(%rdi), %rdx adox (40)(%rdi), %rdx movq %rdx, (40)(%rdi) movq (24)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (48)(%rdi), %rax adox (48)(%rdi), %rax movq %rax, (48)(%rdi) adcx (56)(%rdi), %rdx adox (56)(%rdi), %rdx movq %rdx, (56)(%rdi) movq (32)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (64)(%rdi), %rax adox (64)(%rdi), %rax movq %rax, (64)(%rdi) adcx (72)(%rdi), %rdx adox (72)(%rdi), %rdx movq %rdx, (72)(%rdi) movq (40)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (80)(%rdi), %rax adox (80)(%rdi), %rax movq %rax, (80)(%rdi) adcx (88)(%rdi), %rdx adox (88)(%rdi), %rdx movq %rdx, (88)(%rdi) movq (48)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (96)(%rdi), %rax adox (96)(%rdi), %rax movq %rax, (96)(%rdi) adcx (104)(%rdi), %rdx adox (104)(%rdi), %rdx movq %rdx, (104)(%rdi) movq (56)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (112)(%rdi), %rax adox (112)(%rdi), %rax movq %rax, (112)(%rdi) adcx (120)(%rdi), %rdx adox (120)(%rdi), %rdx movq %rdx, (120)(%rdi) movq (64)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (128)(%rdi), %rax adox (128)(%rdi), %rax movq %rax, (128)(%rdi) adcx (136)(%rdi), %rdx adox (136)(%rdi), %rdx movq %rdx, (136)(%rdi) movq (72)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (144)(%rdi), %rax adox (144)(%rdi), %rax movq %rax, (144)(%rdi) adcx (152)(%rdi), %rdx adox (152)(%rdi), %rdx movq %rdx, (152)(%rdi) movq (80)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (160)(%rdi), %rax adox (160)(%rdi), %rax movq %rax, (160)(%rdi) adcx (168)(%rdi), %rdx adox (168)(%rdi), %rdx movq %rdx, (168)(%rdi) movq (88)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (176)(%rdi), %rax adox (176)(%rdi), %rax movq %rax, (176)(%rdi) adcx (184)(%rdi), %rdx adox (184)(%rdi), %rdx movq %rdx, (184)(%rdi) movq (96)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (192)(%rdi), %rax adox (192)(%rdi), %rax movq %rax, (192)(%rdi) adcx (200)(%rdi), %rdx adox (200)(%rdi), %rdx movq %rdx, (200)(%rdi) movq (104)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (208)(%rdi), %rax adox (208)(%rdi), %rax movq %rax, (208)(%rdi) adcx (216)(%rdi), %rdx adox (216)(%rdi), %rdx movq %rdx, (216)(%rdi) movq (112)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (224)(%rdi), %rax adox (224)(%rdi), %rax movq %rax, (224)(%rdi) adcx (232)(%rdi), %rdx adox (232)(%rdi), %rdx movq %rdx, (232)(%rdi) movq (120)(%rsi), %rdx mulx %rdx, %rax, %rdx adcx (240)(%rdi), %rax adox (240)(%rdi), %rax movq %rax, (240)(%rdi) mov $(0), %rax adcx %rax, %rdx adox %rax, %rdx movq %rdx, (248)(%rdi) ret .Lfe51: .size sqr_16, .Lfe51-(sqr_16) .p2align 6, 0x90 .type sqr9_triangle, @function sqr9_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 lea (64)(%rsi), %rcx add $(64), %rdi call mla_8x1 xor %rax, %rax movq %r8, (8)(%rdi) movq %r9, (16)(%rdi) movq %r10, (24)(%rdi) movq %r11, (32)(%rdi) movq %r12, (40)(%rdi) movq %r13, (48)(%rdi) movq %r14, (56)(%rdi) movq %r15, (64)(%rdi) movq %rax, (72)(%rdi) sub $(64), %rdi ret .Lfe52: .size sqr9_triangle, .Lfe52-(sqr9_triangle) .p2align 6, 0x90 .type sqr10_triangle, @function sqr10_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 lea (64)(%rsi), %rcx add $(64), %rdi call mla_8x2 movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) movq %r10, (32)(%rdi) movq %r11, (40)(%rdi) movq %r12, (48)(%rdi) movq %r13, (56)(%rdi) movq %r14, (64)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mulx (72)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 xor %rax, %rax movq %r15, (72)(%rdi) movq %r8, (80)(%rdi) movq %rax, (88)(%rdi) sub $(64), %rdi ret .Lfe53: .size sqr10_triangle, .Lfe53-(sqr10_triangle) .p2align 6, 0x90 .type sqr11_triangle, @function sqr11_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 lea (64)(%rsi), %rcx add $(64), %rdi call mla_8x3 movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) movq %r11, (48)(%rdi) movq %r12, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r13, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (80)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r14, (72)(%rdi) mulx (80)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 xor %rax, %rax movq %r15, (80)(%rdi) movq %r8, (88)(%rdi) movq %r9, (96)(%rdi) movq %rax, (104)(%rdi) sub $(64), %rdi ret .Lfe54: .size sqr11_triangle, .Lfe54-(sqr11_triangle) .p2align 6, 0x90 .type sqr12_triangle, @function sqr12_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 lea (64)(%rsi), %rcx add $(64), %rdi call mla_8x4 movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r12, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (88)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r13, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (88)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r14, (80)(%rdi) mulx (88)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 xor %rax, %rax movq %r15, (88)(%rdi) movq %r8, (96)(%rdi) movq %r9, (104)(%rdi) movq %r10, (112)(%rdi) movq %rax, (120)(%rdi) sub $(64), %rdi ret .Lfe55: .size sqr12_triangle, .Lfe55-(sqr12_triangle) .p2align 6, 0x90 .type sqr13_triangle, @function sqr13_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 lea (64)(%rsi), %rcx add $(64), %rdi call mla_8x5 movq %r8, (40)(%rdi) movq %r9, (48)(%rdi) movq %r10, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r11, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (96)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r12, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (96)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r13, (80)(%rdi) mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (96)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 movq (88)(%rsi), %rdx xor %rax, %rax mov %r14, (88)(%rdi) mulx (96)(%rsi), %rbx, %r11 adcx %rbx, %r10 adox %rax, %r11 adc $(0), %r11 xor %rax, %rax movq %r15, (96)(%rdi) movq %r8, (104)(%rdi) movq %r9, (112)(%rdi) movq %r10, (120)(%rdi) movq %r11, (128)(%rdi) movq %rax, (136)(%rdi) sub $(64), %rdi ret .Lfe56: .size sqr13_triangle, .Lfe56-(sqr13_triangle) .p2align 6, 0x90 .type sqr14_triangle, @function sqr14_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 lea (64)(%rsi), %rcx add $(64), %rdi call mla_8x6 movq %r8, (48)(%rdi) movq %r9, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r10, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r11 adox %rbp, %r12 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (104)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r11, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (104)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r12, (80)(%rdi) mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (104)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 movq (88)(%rsi), %rdx xor %rax, %rax mov %r13, (88)(%rdi) mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r9 adox %rbp, %r10 mulx (104)(%rsi), %rbx, %r11 adcx %rbx, %r10 adox %rax, %r11 adc $(0), %r11 movq (96)(%rsi), %rdx xor %rax, %rax mov %r14, (96)(%rdi) mulx (104)(%rsi), %rbx, %r12 adcx %rbx, %r11 adox %rax, %r12 adc $(0), %r12 xor %rax, %rax movq %r15, (104)(%rdi) movq %r8, (112)(%rdi) movq %r9, (120)(%rdi) movq %r10, (128)(%rdi) movq %r11, (136)(%rdi) movq %r12, (144)(%rdi) movq %rax, (152)(%rdi) sub $(64), %rdi ret .Lfe57: .size sqr14_triangle, .Lfe57-(sqr14_triangle) .p2align 6, 0x90 .type sqr15_triangle, @function sqr15_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 lea (64)(%rsi), %rcx add $(64), %rdi call mla_8x7 movq %r8, (56)(%rdi) movq (64)(%rsi), %rdx xor %rax, %rax mov %r9, (64)(%rdi) mulx (72)(%rsi), %rbx, %rbp adcx %rbx, %r10 adox %rbp, %r11 mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r11 adox %rbp, %r12 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (112)(%rsi), %rbx, %r8 adcx %rbx, %r15 adox %rax, %r8 adc $(0), %r8 movq (72)(%rsi), %rdx xor %rax, %rax mov %r10, (72)(%rdi) mulx (80)(%rsi), %rbx, %rbp adcx %rbx, %r12 adox %rbp, %r13 mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r13 adox %rbp, %r14 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (112)(%rsi), %rbx, %r9 adcx %rbx, %r8 adox %rax, %r9 adc $(0), %r9 movq (80)(%rsi), %rdx xor %rax, %rax mov %r11, (80)(%rdi) mulx (88)(%rsi), %rbx, %rbp adcx %rbx, %r14 adox %rbp, %r15 mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r15 adox %rbp, %r8 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (112)(%rsi), %rbx, %r10 adcx %rbx, %r9 adox %rax, %r10 adc $(0), %r10 movq (88)(%rsi), %rdx xor %rax, %rax mov %r12, (88)(%rdi) mulx (96)(%rsi), %rbx, %rbp adcx %rbx, %r8 adox %rbp, %r9 mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r9 adox %rbp, %r10 mulx (112)(%rsi), %rbx, %r11 adcx %rbx, %r10 adox %rax, %r11 adc $(0), %r11 movq (96)(%rsi), %rdx xor %rax, %rax mov %r13, (96)(%rdi) mulx (104)(%rsi), %rbx, %rbp adcx %rbx, %r10 adox %rbp, %r11 mulx (112)(%rsi), %rbx, %r12 adcx %rbx, %r11 adox %rax, %r12 adc $(0), %r12 movq (104)(%rsi), %rdx xor %rax, %rax mov %r14, (104)(%rdi) mulx (112)(%rsi), %rbx, %r13 adcx %rbx, %r12 adox %rax, %r13 adc $(0), %r13 xor %rax, %rax movq %r15, (112)(%rdi) movq %r8, (120)(%rdi) movq %r9, (128)(%rdi) movq %r10, (136)(%rdi) movq %r11, (144)(%rdi) movq %r12, (152)(%rdi) movq %r13, (160)(%rdi) movq %rax, (168)(%rdi) sub $(64), %rdi ret .Lfe58: .size sqr15_triangle, .Lfe58-(sqr15_triangle) .p2align 6, 0x90 .type sqr16_triangle, @function sqr16_triangle: call sqr8_triangle movq %r15, (56)(%rdi) xor %r15, %r15 mov %rsi, %rcx add $(64), %rsi add $(64), %rdi call mla_8x8 add $(64), %rdi call sqr8_triangle xor %rax, %rax movq %r15, (56)(%rdi) movq %r8, (64)(%rdi) movq %r9, (72)(%rdi) movq %r10, (80)(%rdi) movq %r11, (88)(%rdi) movq %r12, (96)(%rdi) movq %r13, (104)(%rdi) movq %r14, (112)(%rdi) movq %rax, (120)(%rdi) sub $(64), %rsi sub $(128), %rdi ret .Lfe59: .size sqr16_triangle, .Lfe59-(sqr16_triangle) sqr_l_basic: .quad sqr_1 - sqr_l_basic .quad sqr_2 - sqr_l_basic .quad sqr_3 - sqr_l_basic .quad sqr_4 - sqr_l_basic .quad sqr_5 - sqr_l_basic .quad sqr_6 - sqr_l_basic .quad sqr_7 - sqr_l_basic .quad sqr_8 - sqr_l_basic .quad sqr_9 - sqr_l_basic .quad sqr_10- sqr_l_basic .quad sqr_11- sqr_l_basic .quad sqr_12- sqr_l_basic .quad sqr_13- sqr_l_basic .quad sqr_14- sqr_l_basic .quad sqr_15- sqr_l_basic .quad sqr_16- sqr_l_basic sqrN_triangle: .quad sqr9_triangle - sqrN_triangle .quad sqr10_triangle - sqrN_triangle .quad sqr11_triangle - sqrN_triangle .quad sqr12_triangle - sqrN_triangle .quad sqr13_triangle - sqrN_triangle .quad sqr14_triangle - sqrN_triangle .quad sqr15_triangle - sqrN_triangle .quad sqr16_triangle - sqrN_triangle .p2align 6, 0x90 .type sqr_8N_adcox, @function sqr_8N_adcox: push %rdi push %rsi push %rdx push %rdi push %rsi push %rdx push %rdx call sqr8_triangle pop %rdx movq %r15, (56)(%rdi) xor %r15, %r15 add $(64), %rdi sub $(8), %rdx mov %rsi, %rcx add $(64), %rsi .LinitLoopgas_60: push %rdx call mla_8x8 pop %rdx add $(64), %rsi add $(64), %rdi sub $(8), %rdx jnz .LinitLoopgas_60 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) jmp .Lupdate_Trianglegas_60 .LouterLoopgas_60: push %rdi push %rsi push %rdx xor %rax, %rax push %rax movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 .LinnerLoop_entrygas_60: push %rdx call sqr8_triangle pop %rdx movq %r15, (56)(%rdi) xor %r15, %r15 add $(64), %rdi sub $(8), %rdx jz .LskipInnerLoopgas_60 mov %rsi, %rcx add $(64), %rsi .LinnerLoopgas_60: pop %rax neg %rax movq (%rdi), %rax adc %rax, %r8 movq (8)(%rdi), %rax adc %rax, %r9 movq (16)(%rdi), %rax adc %rax, %r10 movq (24)(%rdi), %rax adc %rax, %r11 movq (32)(%rdi), %rax adc %rax, %r12 movq (40)(%rdi), %rax adc %rax, %r13 movq (48)(%rdi), %rax adc %rax, %r14 movq (56)(%rdi), %rax adc %rax, %r15 sbb %rax, %rax push %rax push %rdx call mla_8x8 pop %rdx add $(64), %rsi add $(64), %rdi sub $(8), %rdx jnz .LinnerLoopgas_60 .LskipInnerLoopgas_60: pop %rax neg %rax adc $(0), %r8 movq %r8, (%rdi) adc $(0), %r9 movq %r9, (8)(%rdi) adc $(0), %r10 movq %r10, (16)(%rdi) adc $(0), %r11 movq %r11, (24)(%rdi) adc $(0), %r12 movq %r12, (32)(%rdi) adc $(0), %r13 movq %r13, (40)(%rdi) adc $(0), %r14 movq %r14, (48)(%rdi) adc $(0), %r15 movq %r15, (56)(%rdi) .Lupdate_Trianglegas_60: pop %rdx pop %rsi pop %rdi add $(64), %rsi add $(128), %rdi sub $(8), %rdx jnz .LouterLoopgas_60 pop %rcx pop %rsi pop %rdi call finalize ret .Lfe60: .size sqr_8N_adcox, .Lfe60-(sqr_8N_adcox) .p2align 6, 0x90 .type sqr_N_adcox, @function sqr_N_adcox: push %rdi push %rsi push %rdx push %rdi push %rsi push %rdx mov %rdx, %rbp and $(7), %rbp lea mla_8xl_tail(%rip), %rax mov (-8)(%rax,%rbp,8), %rbp add %rbp, %rax push %rax sub $(8), %rdx push %rdx call sqr8_triangle pop %rdx movq %r15, (56)(%rdi) add $(64), %rdi xor %r15, %r15 mov %rsi, %rcx add $(64), %rsi sub $(8), %rdx .LinitLoopgas_61: push %rdx call mla_8x8 pop %rdx add $(64), %rsi add $(64), %rdi sub $(8), %rdx jnc .LinitLoopgas_61 add $(8), %rdx xor %rcx, %rsi xor %rsi, %rcx xor %rcx, %rsi mov (%rsp), %rax push %rdx call *%rax pop %rdx lea (%rdi,%rdx,8), %rdi movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) jmp .Lupdate_Trianglegas_61 .LouterLoopgas_61: push %rdi push %rsi push %rdx push %rax xor %rax, %rax push %rax movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 sub $(8), %rdx push %rdx call sqr8_triangle pop %rdx movq %r15, (56)(%rdi) add $(64), %rdi xor %r15, %r15 mov %rsi, %rcx add $(64), %rsi sub $(8), %rdx .LinnerLoopgas_61: pop %rax neg %rax movq (%rdi), %rax adc %rax, %r8 movq (8)(%rdi), %rax adc %rax, %r9 movq (16)(%rdi), %rax adc %rax, %r10 movq (24)(%rdi), %rax adc %rax, %r11 movq (32)(%rdi), %rax adc %rax, %r12 movq (40)(%rdi), %rax adc %rax, %r13 movq (48)(%rdi), %rax adc %rax, %r14 movq (56)(%rdi), %rax adc %rax, %r15 sbb %rax, %rax push %rax push %rdx call mla_8x8 pop %rdx add $(64), %rsi add $(64), %rdi sub $(8), %rdx jnc .LinnerLoopgas_61 add $(8), %rdx pxor %xmm0, %xmm0 movdqu %xmm0, (%rdi,%rdx,8) movdqu %xmm0, (16)(%rdi,%rdx,8) movdqu %xmm0, (32)(%rdi,%rdx,8) movdqu %xmm0, (48)(%rdi,%rdx,8) pop %rax neg %rax movq (%rdi), %rax adc %rax, %r8 movq (8)(%rdi), %rax adc %rax, %r9 movq (16)(%rdi), %rax adc %rax, %r10 movq (24)(%rdi), %rax adc %rax, %r11 movq (32)(%rdi), %rax adc %rax, %r12 movq (40)(%rdi), %rax adc %rax, %r13 movq (48)(%rdi), %rax adc %rax, %r14 movq (56)(%rdi), %rax adc %rax, %r15 sbb %rax, %rax neg %rax movq %rax, (64)(%rdi) xor %rcx, %rsi xor %rsi, %rcx xor %rcx, %rsi mov (%rsp), %rax push %rdx call *%rax pop %rdx lea (%rdi,%rdx,8), %rdi xor %rax, %rax movq (%rdi), %rax add %rax, %r8 movq %r8, (%rdi) movq (8)(%rdi), %rax adc %rax, %r9 movq %r9, (8)(%rdi) movq (16)(%rdi), %rax adc %rax, %r10 movq %r10, (16)(%rdi) movq (24)(%rdi), %rax adc %rax, %r11 movq %r11, (24)(%rdi) movq (32)(%rdi), %rax adc %rax, %r12 movq %r12, (32)(%rdi) movq (40)(%rdi), %rax adc %rax, %r13 movq %r13, (40)(%rdi) movq (48)(%rdi), %rax adc %rax, %r14 movq %r14, (48)(%rdi) movq (56)(%rdi), %rax adc %rax, %r15 movq %r15, (56)(%rdi) .Lupdate_Trianglegas_61: pop %rax pop %rdx pop %rsi pop %rdi add $(64), %rsi add $(128), %rdi sub $(8), %rdx cmp $(16), %rdx jg .LouterLoopgas_61 mov %rdx, %rbp sub $(8), %rbp lea sqrN_triangle(%rip), %rax mov (-8)(%rax,%rbp,8), %rbp add %rbp, %rax sub $(256), %rsp push %rdi push %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 lea (16)(%rsp), %rdi call *%rax mov %rdi, %rsi pop %rdx pop %rdi movdqu (%rsi), %xmm0 movdqu (16)(%rsi), %xmm1 movdqu (32)(%rsi), %xmm2 movdqu (48)(%rsi), %xmm3 add $(64), %rsi movdqu %xmm0, (%rdi) movdqu %xmm1, (16)(%rdi) movdqu %xmm2, (32)(%rdi) movdqu %xmm3, (48)(%rdi) add $(64), %rdi lea (-8)(%rdx), %rax xor %rbx, %rbx .Lupdate1gas_61: movq (%rsi), %r8 movq (%rdi), %r9 add $(8), %rsi neg %rbx adc %r9, %r8 sbb %rbx, %rbx movq %r8, (%rdi) add $(8), %rdi sub $(1), %rax jg .Lupdate1gas_61 .Lupdate2gas_61: movq (%rsi), %r8 add $(8), %rsi neg %rbx adc $(0), %r8 sbb %rbx, %rbx movq %r8, (%rdi) add $(8), %rdi sub $(1), %rdx jg .Lupdate2gas_61 add $(256), %rsp .Ladd_diagonalsgas_61: pop %rcx pop %rsi pop %rdi call finalize .Lquitgas_61: ret .Lfe61: .size sqr_N_adcox, .Lfe61-(sqr_N_adcox) .p2align 6, 0x90 .type sub_N, @function sub_N: xor %rax, %rax .Lsub_nextgas_62: lea (8)(%rdi), %rdi movq (%rsi), %r8 movq (%rcx), %r9 lea (8)(%rsi), %rsi lea (8)(%rcx), %rcx sbb %r9, %r8 movq %r8, (-8)(%rdi) dec %rdx jnz .Lsub_nextgas_62 adc $(0), %rax ret .Lfe62: .size sub_N, .Lfe62-(sub_N) .p2align 6, 0x90 .type copy_ae_N, @function copy_ae_N: lea (8)(%rdi), %rdi movq (%rsi), %r8 movq (%rcx), %r9 lea (8)(%rsi), %rsi lea (8)(%rcx), %rcx cmovae %r9, %r8 movq %r8, (-8)(%rdi) dec %rdx jnz copy_ae_N ret .Lfe63: .size copy_ae_N, .Lfe63-(copy_ae_N) .p2align 6, 0x90 .type mred1_start, @function mred1_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adox %rax, %rbx mov %rbx, %r8 ret .Lfe64: .size mred1_start, .Lfe64-(mred1_start) .p2align 6, 0x90 .type mred2_start, @function mred2_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r9 ret .Lfe65: .size mred2_start, .Lfe65-(mred2_start) .p2align 6, 0x90 .type mred3_start, @function mred3_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 ret .Lfe66: .size mred3_start, .Lfe66-(mred3_start) .p2align 6, 0x90 .type mred4_start, @function mred4_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 ret .Lfe67: .size mred4_start, .Lfe67-(mred4_start) .p2align 6, 0x90 .type mred5_start, @function mred5_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 ret .Lfe68: .size mred5_start, .Lfe68-(mred5_start) .p2align 6, 0x90 .type mred6_start, @function mred6_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r13 ret .Lfe69: .size mred6_start, .Lfe69-(mred6_start) .p2align 6, 0x90 .type mred7_start, @function mred7_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r14 ret .Lfe70: .size mred7_start, .Lfe70-(mred7_start) .p2align 6, 0x90 .type mred8_start, @function mred8_start: xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (32)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rbx, %r13 mulx (40)(%rsi), %r12, %rbp adox %r13, %r12 adcx %rbp, %r14 mulx (48)(%rsi), %r13, %rbx adox %r14, %r13 adcx %r15, %rbx mulx (56)(%rsi), %r14, %r15 adox %rbx, %r14 adcx %rax, %r15 adox %rax, %r15 ret .Lfe71: .size mred8_start, .Lfe71-(mred8_start) .p2align 6, 0x90 .type mred8x1_start, @function mred8x1_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) pop %rdx ret .Lfe72: .size mred8x1_start, .Lfe72-(mred8x1_start) .p2align 6, 0x90 .type mred8x2_start, @function mred8x2_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (8)(%rcx) call mred8_start mov %rax, (8)(%rdi) pop %rdx ret .Lfe73: .size mred8x2_start, .Lfe73-(mred8x2_start) .p2align 6, 0x90 .type mred8x3_start, @function mred8x3_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (8)(%rcx) call mred8_start mov %rax, (8)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (16)(%rcx) call mred8_start mov %rax, (16)(%rdi) pop %rdx ret .Lfe74: .size mred8x3_start, .Lfe74-(mred8x3_start) .p2align 6, 0x90 .type mred8x4_start, @function mred8x4_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (8)(%rcx) call mred8_start mov %rax, (8)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (16)(%rcx) call mred8_start mov %rax, (16)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (24)(%rcx) call mred8_start mov %rax, (24)(%rdi) pop %rdx ret .Lfe75: .size mred8x4_start, .Lfe75-(mred8x4_start) .p2align 6, 0x90 .type mred8x5_start, @function mred8x5_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (8)(%rcx) call mred8_start mov %rax, (8)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (16)(%rcx) call mred8_start mov %rax, (16)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (24)(%rcx) call mred8_start mov %rax, (24)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (32)(%rcx) call mred8_start mov %rax, (32)(%rdi) pop %rdx ret .Lfe76: .size mred8x5_start, .Lfe76-(mred8x5_start) .p2align 6, 0x90 .type mred8x6_start, @function mred8x6_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (8)(%rcx) call mred8_start mov %rax, (8)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (16)(%rcx) call mred8_start mov %rax, (16)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (24)(%rcx) call mred8_start mov %rax, (24)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (32)(%rcx) call mred8_start mov %rax, (32)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (40)(%rcx) call mred8_start mov %rax, (40)(%rdi) pop %rdx ret .Lfe77: .size mred8x6_start, .Lfe77-(mred8x6_start) .p2align 6, 0x90 .type mred8x7_start, @function mred8x7_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (8)(%rcx) call mred8_start mov %rax, (8)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (16)(%rcx) call mred8_start mov %rax, (16)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (24)(%rcx) call mred8_start mov %rax, (24)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (32)(%rcx) call mred8_start mov %rax, (32)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (40)(%rcx) call mred8_start mov %rax, (40)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (48)(%rcx) call mred8_start mov %rax, (48)(%rdi) pop %rdx ret .Lfe78: .size mred8x7_start, .Lfe78-(mred8x7_start) .p2align 6, 0x90 .type mred8x8_start, @function mred8x8_start: push %rdx mulx %r8, %rdx, %rbx movq %rdx, (%rcx) call mred8_start mov %rax, (%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (8)(%rcx) call mred8_start mov %rax, (8)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (16)(%rcx) call mred8_start mov %rax, (16)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (24)(%rcx) call mred8_start mov %rax, (24)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (32)(%rcx) call mred8_start mov %rax, (32)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (40)(%rcx) call mred8_start mov %rax, (40)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (48)(%rcx) call mred8_start mov %rax, (48)(%rdi) mov (%rsp), %rdx mulx %r8, %rdx, %rbx movq %rdx, (56)(%rcx) call mred8_start mov %rax, (56)(%rdi) pop %rdx ret .Lfe79: .size mred8x8_start, .Lfe79-(mred8x8_start) .p2align 6, 0x90 .type mred_5, @function mred_5: push %r8 movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred5_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred5_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred5_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred5_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred5_start pop %rax xor %rax, %rax mov (40)(%rdi), %rbx add %rbx, %r8 movq %r8, (40)(%rdi) mov (48)(%rdi), %rbx adc %rbx, %r9 movq %r9, (48)(%rdi) mov (56)(%rdi), %rbx adc %rbx, %r10 movq %r10, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r11 movq %r11, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r12 movq %r12, (72)(%rdi) adc $(0), %rax mov (%rsi), %rbx sub %rbx, %r8 mov (8)(%rsi), %rbx sbb %rbx, %r9 mov (16)(%rsi), %rbx sbb %rbx, %r10 mov (24)(%rsi), %rbx sbb %rbx, %r11 mov (32)(%rsi), %rbx sbb %rbx, %r12 sbb $(0), %rax movq (40)(%rdi), %rax movq (48)(%rdi), %rbx movq (56)(%rdi), %rcx movq (64)(%rdi), %rdx movq (72)(%rdi), %rbp cmovae %r8, %rax cmovae %r9, %rbx cmovae %r10, %rcx cmovae %r11, %rdx cmovae %r12, %rbp movq %rax, (%r15) movq %rbx, (8)(%r15) movq %rcx, (16)(%r15) movq %rdx, (24)(%r15) movq %rbp, (32)(%r15) ret .Lfe80: .size mred_5, .Lfe80-(mred_5) .p2align 6, 0x90 .type mred_6, @function mred_6: push %r8 movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred6_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred6_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred6_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred6_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred6_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred6_start pop %rax xor %rax, %rax mov (48)(%rdi), %rbx add %rbx, %r8 movq %r8, (48)(%rdi) mov (56)(%rdi), %rbx adc %rbx, %r9 movq %r9, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r10 movq %r10, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r11 movq %r11, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r12 movq %r12, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r13 movq %r13, (88)(%rdi) adc $(0), %rax mov (%rsi), %rbx sub %rbx, %r8 mov (8)(%rsi), %rbx sbb %rbx, %r9 mov (16)(%rsi), %rbx sbb %rbx, %r10 mov (24)(%rsi), %rbx sbb %rbx, %r11 mov (32)(%rsi), %rbx sbb %rbx, %r12 mov (40)(%rsi), %rbx sbb %rbx, %r13 sbb $(0), %rax movq (48)(%rdi), %rax movq (56)(%rdi), %rbx movq (64)(%rdi), %rcx movq (72)(%rdi), %rdx movq (80)(%rdi), %rbp movq (88)(%rdi), %rsi cmovae %r8, %rax cmovae %r9, %rbx cmovae %r10, %rcx cmovae %r11, %rdx cmovae %r12, %rbp cmovae %r13, %rsi movq %rax, (%r15) movq %rbx, (8)(%r15) movq %rcx, (16)(%r15) movq %rdx, (24)(%r15) movq %rbp, (32)(%r15) movq %rsi, (40)(%r15) ret .Lfe81: .size mred_6, .Lfe81-(mred_6) .p2align 6, 0x90 .type mred_7, @function mred_7: push %r8 movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred7_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred7_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred7_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred7_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred7_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred7_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred7_start pop %rax xor %rax, %rax mov (56)(%rdi), %rbx add %rbx, %r8 movq %r8, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r9 movq %r9, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r10 movq %r10, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r11 movq %r11, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r12 movq %r12, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r13 movq %r13, (96)(%rdi) mov (104)(%rdi), %rbx adc %rbx, %r14 movq %r14, (104)(%rdi) adc $(0), %rax mov (%rsi), %rbx sub %rbx, %r8 mov (8)(%rsi), %rbx sbb %rbx, %r9 mov (16)(%rsi), %rbx sbb %rbx, %r10 mov (24)(%rsi), %rbx sbb %rbx, %r11 mov (32)(%rsi), %rbx sbb %rbx, %r12 mov (40)(%rsi), %rbx sbb %rbx, %r13 mov (48)(%rsi), %rbx sbb %rbx, %r14 sbb $(0), %rax movq (56)(%rdi), %rax movq (64)(%rdi), %rbx movq (72)(%rdi), %rcx movq (80)(%rdi), %rdx movq (88)(%rdi), %rbp movq (96)(%rdi), %rsi movq (104)(%rdi), %rdi cmovae %r8, %rax cmovae %r9, %rbx cmovae %r10, %rcx cmovae %r11, %rdx cmovae %r12, %rbp cmovae %r13, %rsi cmovae %r14, %rdi movq %rax, (%r15) movq %rbx, (8)(%r15) movq %rcx, (16)(%r15) movq %rdx, (24)(%r15) movq %rbp, (32)(%r15) movq %rsi, (40)(%r15) movq %rdi, (48)(%r15) ret .Lfe82: .size mred_7, .Lfe82-(mred_7) .p2align 6, 0x90 .type mred_8, @function mred_8: push %r15 push %r8 movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start mov (%rsp), %rdx mulx %r8, %rdx, %rbx call mred8_start pop %rax xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 movq %r8, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r9 movq %r9, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r10 movq %r10, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r11 movq %r11, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r12 movq %r12, (96)(%rdi) mov (104)(%rdi), %rbx adc %rbx, %r13 movq %r13, (104)(%rdi) mov (112)(%rdi), %rbx adc %rbx, %r14 movq %r14, (112)(%rdi) mov (120)(%rdi), %rbx adc %rbx, %r15 movq %r15, (120)(%rdi) adc $(0), %rax mov (%rsi), %rbx sub %rbx, %r8 mov (8)(%rsi), %rbx sbb %rbx, %r9 mov (16)(%rsi), %rbx sbb %rbx, %r10 mov (24)(%rsi), %rbx sbb %rbx, %r11 mov (32)(%rsi), %rbx sbb %rbx, %r12 mov (40)(%rsi), %rbx sbb %rbx, %r13 mov (48)(%rsi), %rbx sbb %rbx, %r14 mov (56)(%rsi), %rbx sbb %rbx, %r15 sbb $(0), %rax pop %rsi movq (64)(%rdi), %rax movq (72)(%rdi), %rbx movq (80)(%rdi), %rcx movq (88)(%rdi), %rdx cmovae %r8, %rax cmovae %r9, %rbx cmovae %r10, %rcx cmovae %r11, %rdx movq %rax, (%rsi) movq %rbx, (8)(%rsi) movq %rcx, (16)(%rsi) movq %rdx, (24)(%rsi) movq (96)(%rdi), %rax movq (104)(%rdi), %rbx movq (112)(%rdi), %rcx movq (120)(%rdi), %rdx cmovae %r12, %rax cmovae %r13, %rbx cmovae %r14, %rcx cmovae %r15, %rdx movq %rax, (32)(%rsi) movq %rbx, (40)(%rsi) movq %rcx, (48)(%rsi) movq %rdx, (56)(%rsi) ret .Lfe83: .size mred_8, .Lfe83-(mred_8) .p2align 6, 0x90 .type mred_9, @function mred_9: push %r15 sub $(64), %rsp mov %rsp, %rcx push %r8 mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call mla_8x1 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx pop %rax shr $(1), %rax movq %r8, (8)(%rdi) movq %r9, (16)(%rdi) movq %r10, (24)(%rdi) movq %r11, (32)(%rdi) movq %r12, (40)(%rdi) movq %r13, (48)(%rdi) movq %r14, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r15 mov %r15, (64)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rdx call mred8x1_start xor %rax, %rax movq %r8, (8)(%rdi) movq %r9, (16)(%rdi) movq %r10, (24)(%rdi) movq %r11, (32)(%rdi) movq %r12, (40)(%rdi) movq %r13, (48)(%rdi) movq %r14, (56)(%rdi) mov %r15, %r8 addq (64)(%rdi), %r8 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_1x1 pop %rax shr $(1), %rax mov (8)(%rdi), %rbx adc %rbx, %r8 adc $(0), %rax pop %rbx add %rbx, %r8 movq %r8, (8)(%rdi) adc $(0), %rax pop %rcx add $(64), %rsp lea (-64)(%rsi), %rcx lea (-56)(%rdi), %rsi pop %rdi mov %rax, %rbx mov $(9), %rdx call sub_N sub %rax, %rbx sub $(72), %rdi sub $(72), %rsi mov %rdi, %rcx mov $(9), %rdx shr $(1), %rbx call copy_ae_N ret .Lfe84: .size mred_9, .Lfe84-(mred_9) .p2align 6, 0x90 .type mred_10, @function mred_10: push %r15 sub $(64), %rsp mov %rsp, %rcx push %r8 mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call mla_8x2 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx pop %rax shr $(1), %rax movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) movq %r10, (32)(%rdi) movq %r11, (40)(%rdi) movq %r12, (48)(%rdi) movq %r13, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r14 mov %r14, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r15 mov %r15, (72)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rdx call mred8x2_start xor %rax, %rax movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) movq %r10, (32)(%rdi) movq %r11, (40)(%rdi) movq %r12, (48)(%rdi) movq %r13, (56)(%rdi) mov %r14, %r8 mov %r15, %r9 addq (64)(%rdi), %r8 adcq (72)(%rdi), %r9 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_2x2 pop %rax shr $(1), %rax mov (16)(%rdi), %rbx adc %rbx, %r8 mov (24)(%rdi), %rbx adc %rbx, %r9 adc $(0), %rax pop %rbx add %rbx, %r8 adc $(0), %r9 movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) adc $(0), %rax pop %rcx add $(64), %rsp lea (-64)(%rsi), %rcx lea (-48)(%rdi), %rsi pop %rdi mov %rax, %rbx mov $(10), %rdx call sub_N sub %rax, %rbx sub $(80), %rdi sub $(80), %rsi mov %rdi, %rcx mov $(10), %rdx shr $(1), %rbx call copy_ae_N ret .Lfe85: .size mred_10, .Lfe85-(mred_10) .p2align 6, 0x90 .type mred_11, @function mred_11: push %r15 sub $(64), %rsp mov %rsp, %rcx push %r8 mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call mla_8x3 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx pop %rax shr $(1), %rax movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) movq %r11, (48)(%rdi) movq %r12, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r13 mov %r13, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r14 mov %r14, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r15 mov %r15, (80)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rdx call mred8x3_start xor %rax, %rax movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) movq %r11, (48)(%rdi) movq %r12, (56)(%rdi) mov %r13, %r8 mov %r14, %r9 mov %r15, %r10 addq (64)(%rdi), %r8 adcq (72)(%rdi), %r9 adcq (80)(%rdi), %r10 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_3x3 pop %rax shr $(1), %rax mov (24)(%rdi), %rbx adc %rbx, %r8 mov (32)(%rdi), %rbx adc %rbx, %r9 mov (40)(%rdi), %rbx adc %rbx, %r10 adc $(0), %rax pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) adc $(0), %rax pop %rcx add $(64), %rsp lea (-64)(%rsi), %rcx lea (-40)(%rdi), %rsi pop %rdi mov %rax, %rbx mov $(11), %rdx call sub_N sub %rax, %rbx sub $(88), %rdi sub $(88), %rsi mov %rdi, %rcx mov $(11), %rdx shr $(1), %rbx call copy_ae_N ret .Lfe86: .size mred_11, .Lfe86-(mred_11) .p2align 6, 0x90 .type mred_12, @function mred_12: push %r15 sub $(64), %rsp mov %rsp, %rcx push %r8 mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call mla_8x4 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx pop %rax shr $(1), %rax movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r12 mov %r12, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r13 mov %r13, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r14 mov %r14, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r15 mov %r15, (88)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rdx call mred8x4_start xor %rax, %rax movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) mov %r12, %r8 mov %r13, %r9 mov %r14, %r10 mov %r15, %r11 addq (64)(%rdi), %r8 adcq (72)(%rdi), %r9 adcq (80)(%rdi), %r10 adcq (88)(%rdi), %r11 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_4x4 pop %rax shr $(1), %rax mov (32)(%rdi), %rbx adc %rbx, %r8 mov (40)(%rdi), %rbx adc %rbx, %r9 mov (48)(%rdi), %rbx adc %rbx, %r10 mov (56)(%rdi), %rbx adc %rbx, %r11 adc $(0), %rax pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) adc $(0), %rax pop %rcx add $(64), %rsp lea (-64)(%rsi), %rcx lea (-32)(%rdi), %rsi pop %rdi mov %rax, %rbx mov $(12), %rdx call sub_N sub %rax, %rbx sub $(96), %rdi sub $(96), %rsi mov %rdi, %rcx mov $(12), %rdx shr $(1), %rbx call copy_ae_N ret .Lfe87: .size mred_12, .Lfe87-(mred_12) .p2align 6, 0x90 .type mred_13, @function mred_13: push %r15 sub $(64), %rsp mov %rsp, %rcx push %r8 mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call mla_8x5 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx pop %rax shr $(1), %rax movq %r8, (40)(%rdi) movq %r9, (48)(%rdi) movq %r10, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r11 mov %r11, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r12 mov %r12, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r13 mov %r13, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r14 mov %r14, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r15 mov %r15, (96)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rdx call mred8x5_start xor %rax, %rax movq %r8, (40)(%rdi) movq %r9, (48)(%rdi) movq %r10, (56)(%rdi) mov %r11, %r8 mov %r12, %r9 mov %r13, %r10 mov %r14, %r11 mov %r15, %r12 addq (64)(%rdi), %r8 adcq (72)(%rdi), %r9 adcq (80)(%rdi), %r10 adcq (88)(%rdi), %r11 adcq (96)(%rdi), %r12 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_5x5 pop %rax shr $(1), %rax mov (40)(%rdi), %rbx adc %rbx, %r8 mov (48)(%rdi), %rbx adc %rbx, %r9 mov (56)(%rdi), %rbx adc %rbx, %r10 mov (64)(%rdi), %rbx adc %rbx, %r11 mov (72)(%rdi), %rbx adc %rbx, %r12 adc $(0), %rax pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 movq %r8, (40)(%rdi) movq %r9, (48)(%rdi) movq %r10, (56)(%rdi) movq %r11, (64)(%rdi) movq %r12, (72)(%rdi) adc $(0), %rax pop %rcx add $(64), %rsp lea (-64)(%rsi), %rcx lea (-24)(%rdi), %rsi pop %rdi mov %rax, %rbx mov $(13), %rdx call sub_N sub %rax, %rbx sub $(104), %rdi sub $(104), %rsi mov %rdi, %rcx mov $(13), %rdx shr $(1), %rbx call copy_ae_N ret .Lfe88: .size mred_13, .Lfe88-(mred_13) .p2align 6, 0x90 .type mred_14, @function mred_14: push %r15 sub $(64), %rsp mov %rsp, %rcx push %r8 mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call mla_8x6 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx pop %rax shr $(1), %rax movq %r8, (48)(%rdi) movq %r9, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r10 mov %r10, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r11 mov %r11, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r12 mov %r12, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r13 mov %r13, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r14 mov %r14, (96)(%rdi) mov (104)(%rdi), %rbx adc %rbx, %r15 mov %r15, (104)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rdx call mred8x6_start xor %rax, %rax movq %r8, (48)(%rdi) movq %r9, (56)(%rdi) mov %r10, %r8 mov %r11, %r9 mov %r12, %r10 mov %r13, %r11 mov %r14, %r12 mov %r15, %r13 addq (64)(%rdi), %r8 adcq (72)(%rdi), %r9 adcq (80)(%rdi), %r10 adcq (88)(%rdi), %r11 adcq (96)(%rdi), %r12 adcq (104)(%rdi), %r13 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_6x6 pop %rax shr $(1), %rax mov (48)(%rdi), %rbx adc %rbx, %r8 mov (56)(%rdi), %rbx adc %rbx, %r9 mov (64)(%rdi), %rbx adc %rbx, %r10 mov (72)(%rdi), %rbx adc %rbx, %r11 mov (80)(%rdi), %rbx adc %rbx, %r12 mov (88)(%rdi), %rbx adc %rbx, %r13 adc $(0), %rax pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 movq %r8, (48)(%rdi) movq %r9, (56)(%rdi) movq %r10, (64)(%rdi) movq %r11, (72)(%rdi) movq %r12, (80)(%rdi) movq %r13, (88)(%rdi) adc $(0), %rax pop %rcx add $(64), %rsp lea (-64)(%rsi), %rcx lea (-16)(%rdi), %rsi pop %rdi mov %rax, %rbx mov $(14), %rdx call sub_N sub %rax, %rbx sub $(112), %rdi sub $(112), %rsi mov %rdi, %rcx mov $(14), %rdx shr $(1), %rbx call copy_ae_N ret .Lfe89: .size mred_14, .Lfe89-(mred_14) .p2align 6, 0x90 .type mred_15, @function mred_15: push %r15 sub $(64), %rsp mov %rsp, %rcx push %r8 mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx call mla_8x7 xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx pop %rax shr $(1), %rax movq %r8, (56)(%rdi) mov (64)(%rdi), %rbx adc %rbx, %r9 mov %r9, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r10 mov %r10, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r11 mov %r11, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r12 mov %r12, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r13 mov %r13, (96)(%rdi) mov (104)(%rdi), %rbx adc %rbx, %r14 mov %r14, (104)(%rdi) mov (112)(%rdi), %rbx adc %rbx, %r15 mov %r15, (112)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rdx call mred8x7_start xor %rax, %rax movq %r8, (56)(%rdi) mov %r9, %r8 mov %r10, %r9 mov %r11, %r10 mov %r12, %r11 mov %r13, %r12 mov %r14, %r13 mov %r15, %r14 addq (64)(%rdi), %r8 adcq (72)(%rdi), %r9 adcq (80)(%rdi), %r10 adcq (88)(%rdi), %r11 adcq (96)(%rdi), %r12 adcq (104)(%rdi), %r13 adcq (112)(%rdi), %r14 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_7x7 pop %rax shr $(1), %rax mov (56)(%rdi), %rbx adc %rbx, %r8 mov (64)(%rdi), %rbx adc %rbx, %r9 mov (72)(%rdi), %rbx adc %rbx, %r10 mov (80)(%rdi), %rbx adc %rbx, %r11 mov (88)(%rdi), %rbx adc %rbx, %r12 mov (96)(%rdi), %rbx adc %rbx, %r13 mov (104)(%rdi), %rbx adc %rbx, %r14 adc $(0), %rax pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 movq %r8, (56)(%rdi) movq %r9, (64)(%rdi) movq %r10, (72)(%rdi) movq %r11, (80)(%rdi) movq %r12, (88)(%rdi) movq %r13, (96)(%rdi) movq %r14, (104)(%rdi) adc $(0), %rax pop %rcx add $(64), %rsp lea (-64)(%rsi), %rcx lea (-8)(%rdi), %rsi pop %rdi mov %rax, %rbx mov $(15), %rdx call sub_N sub %rax, %rbx sub $(120), %rdi sub $(120), %rsi mov %rdi, %rcx mov $(15), %rdx shr $(1), %rbx call copy_ae_N ret .Lfe90: .size mred_15, .Lfe90-(mred_15) .p2align 6, 0x90 .type mred_16, @function mred_16: push %r15 sub $(64), %rsp mov %rsp, %rcx mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rsi add $(64), %rdi push %rdx call mla_8x8 pop %rdx pop %rax shr $(1), %rax mov (64)(%rdi), %rbx adc %rbx, %r8 mov %r8, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r9 mov %r9, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r10 mov %r10, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r11 mov %r11, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r12 mov %r12, (96)(%rdi) mov (104)(%rdi), %rbx adc %rbx, %r13 mov %r13, (104)(%rdi) mov (112)(%rdi), %rbx adc %rbx, %r14 mov %r14, (112)(%rdi) mov (120)(%rdi), %rbx adc %rbx, %r15 mov %r15, (120)(%rdi) adc $(0), %rax push %rax sub $(64), %rsi movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi call mla_8x8 sub $(64), %rsi pop %rax shr $(1), %rax mov (64)(%rdi), %rbx adc %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 adc $(0), %r15 adc $(0), %rax movq %r8, (64)(%rdi) movq %r9, (72)(%rdi) movq %r10, (80)(%rdi) movq %r11, (88)(%rdi) movq %r12, (96)(%rdi) movq %r13, (104)(%rdi) movq %r14, (112)(%rdi) movq %r15, (120)(%rdi) add $(64), %rsp pop %rbp mov (%rdi), %rbx sub (%rsi), %rbx mov %rbx, (%rbp) mov (8)(%rdi), %rbx sbb (8)(%rsi), %rbx mov %rbx, (8)(%rbp) mov (16)(%rdi), %rbx sbb (16)(%rsi), %rbx mov %rbx, (16)(%rbp) mov (24)(%rdi), %rbx sbb (24)(%rsi), %rbx mov %rbx, (24)(%rbp) mov (32)(%rdi), %rbx sbb (32)(%rsi), %rbx mov %rbx, (32)(%rbp) mov (40)(%rdi), %rbx sbb (40)(%rsi), %rbx mov %rbx, (40)(%rbp) mov (48)(%rdi), %rbx sbb (48)(%rsi), %rbx mov %rbx, (48)(%rbp) mov (56)(%rdi), %rbx sbb (56)(%rsi), %rbx mov %rbx, (56)(%rbp) mov (64)(%rsi), %rbx sbb %rbx, %r8 mov (72)(%rsi), %rbx sbb %rbx, %r9 mov (80)(%rsi), %rbx sbb %rbx, %r10 mov (88)(%rsi), %rbx sbb %rbx, %r11 mov (96)(%rsi), %rbx sbb %rbx, %r12 mov (104)(%rsi), %rbx sbb %rbx, %r13 mov (112)(%rsi), %rbx sbb %rbx, %r14 mov (120)(%rsi), %rbx sbb %rbx, %r15 sbb $(0), %rax movq (64)(%rdi), %rax movq (72)(%rdi), %rbx movq (80)(%rdi), %rcx movq (88)(%rdi), %rdx cmovae %r8, %rax cmovae %r9, %rbx cmovae %r10, %rcx cmovae %r11, %rdx movq %rax, (64)(%rbp) movq %rbx, (72)(%rbp) movq %rcx, (80)(%rbp) movq %rdx, (88)(%rbp) movq (96)(%rdi), %rax movq (104)(%rdi), %rbx movq (112)(%rdi), %rcx movq (120)(%rdi), %rdx cmovae %r12, %rax cmovae %r13, %rbx cmovae %r14, %rcx cmovae %r15, %rdx movq %rax, (96)(%rbp) movq %rbx, (104)(%rbp) movq %rcx, (112)(%rbp) movq %rdx, (120)(%rbp) movq (%rbp), %r8 movq (8)(%rbp), %r9 movq (16)(%rbp), %r10 movq (24)(%rbp), %r11 movq (32)(%rbp), %r12 movq (40)(%rbp), %r13 movq (48)(%rbp), %r14 movq (56)(%rbp), %r15 movq (%rdi), %rax movq (8)(%rdi), %rbx movq (16)(%rdi), %rcx movq (24)(%rdi), %rdx cmovae %r8, %rax cmovae %r9, %rbx cmovae %r10, %rcx cmovae %r11, %rdx movq %rax, (%rbp) movq %rbx, (8)(%rbp) movq %rcx, (16)(%rbp) movq %rdx, (24)(%rbp) movq (32)(%rdi), %rax movq (40)(%rdi), %rbx movq (48)(%rdi), %rcx movq (56)(%rdi), %rdx cmovae %r12, %rax cmovae %r13, %rbx cmovae %r14, %rcx cmovae %r15, %rdx movq %rax, (32)(%rbp) movq %rbx, (40)(%rbp) movq %rcx, (48)(%rbp) movq %rdx, (56)(%rbp) ret .Lfe91: .size mred_16, .Lfe91-(mred_16) mred_short: .quad mred_5 - mred_short .quad mred_6 - mred_short .quad mred_7 - mred_short .quad mred_8 - mred_short .quad mred_9 - mred_short .quad mred_10 - mred_short .quad mred_11 - mred_short .quad mred_12 - mred_short .quad mred_13 - mred_short .quad mred_14 - mred_short .quad mred_15 - mred_short .quad mred_16 - mred_short mred8x_start: .quad mred8x1_start - mred8x_start .quad mred8x2_start - mred8x_start .quad mred8x3_start - mred8x_start .quad mred8x4_start - mred8x_start .quad mred8x5_start - mred8x_start .quad mred8x6_start - mred8x_start .quad mred8x7_start - mred8x_start .p2align 6, 0x90 .type mred_8N_adcox, @function mred_8N_adcox: push %r15 sub $(64), %rsp mov %rsp, %rcx mov %rdx, %rbx xor %rax, %rax .LpassLoopgas_92: push %rdi push %rsi push %rdx push %r8 push %rbx push %rax push %rdx mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start pop %rdx xor %rax, %rax mov (64)(%rdi), %rbx add %rbx, %r8 mov (72)(%rdi), %rbx adc %rbx, %r9 mov (80)(%rdi), %rbx adc %rbx, %r10 mov (88)(%rdi), %rbx adc %rbx, %r11 mov (96)(%rdi), %rbx adc %rbx, %r12 mov (104)(%rdi), %rbx adc %rbx, %r13 mov (112)(%rdi), %rbx adc %rbx, %r14 mov (120)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax jmp .LentryInnerLoopgas_92 .LinnerLoopgas_92: push %rdx call mla_8x8 pop %rdx pop %rax shr $(1), %rax mov (64)(%rdi), %rbx adc %rbx, %r8 mov %r8, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r9 mov %r9, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r10 mov %r10, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r11 mov %r11, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r12 mov %r12, (96)(%rdi) mov (104)(%rdi), %rbx adc %rbx, %r13 mov %r13, (104)(%rdi) mov (112)(%rdi), %rbx adc %rbx, %r14 mov %r14, (112)(%rdi) mov (120)(%rdi), %rbx adc %rbx, %r15 mov %r15, (120)(%rdi) adc $(0), %rax push %rax .LentryInnerLoopgas_92: add $(64), %rdi add $(64), %rsi sub $(8), %rdx jg .LinnerLoopgas_92 pop %rax pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 adc $(0), %r15 adc $(0), %rax movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) pop %rbx pop %r8 pop %rdx pop %rsi pop %rdi add $(64), %rdi sub $(8), %rbx jg .LpassLoopgas_92 add $(64), %rsp mov %rdx, %r14 lea (,%rdx,8), %r15 mov %rax, %rbx mov %rsi, %rcx mov %rdi, %rsi pop %rdi call sub_N sub %rax, %rbx mov %r14, %rdx sub %r15, %rdi sub %r15, %rsi mov %rdi, %rcx shr $(1), %rbx call copy_ae_N ret .Lfe92: .size mred_8N_adcox, .Lfe92-(mred_8N_adcox) .p2align 6, 0x90 .type mred_N_adcox, @function mred_N_adcox: push %r15 sub $(64), %rsp mov %rsp, %rcx mov %rdx, %rbx sub $(8), %rbx xor %rax, %rax mov $(7), %r15 and %rdx, %r15 lea mla_8xl_tail(%rip), %rbp mov (-8)(%rbp,%r15,8), %r15 add %r15, %rbp .LpassLoopgas_93: push %rdi push %rsi push %rdx push %r8 push %rbx push %rax push %rbp sub $(8), %rdx push %rdx mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 call mred8x8_start pop %rdx xor %rax, %rax push %rax jmp .LentryInnerLoopgas_93 .LinnerLoopgas_93: push %rdx call mla_8x8 pop %rdx .LentryInnerLoopgas_93: pop %rax shr $(1), %rax mov (64)(%rdi), %rbx adc %rbx, %r8 mov %r8, (64)(%rdi) mov (72)(%rdi), %rbx adc %rbx, %r9 mov %r9, (72)(%rdi) mov (80)(%rdi), %rbx adc %rbx, %r10 mov %r10, (80)(%rdi) mov (88)(%rdi), %rbx adc %rbx, %r11 mov %r11, (88)(%rdi) mov (96)(%rdi), %rbx adc %rbx, %r12 mov %r12, (96)(%rdi) mov (104)(%rdi), %rbx adc %rbx, %r13 mov %r13, (104)(%rdi) mov (112)(%rdi), %rbx adc %rbx, %r14 mov %r14, (112)(%rdi) mov (120)(%rdi), %rbx adc %rbx, %r15 mov %r15, (120)(%rdi) adc $(0), %rax push %rax add $(64), %rdi add $(64), %rsi sub $(8), %rdx jnc .LinnerLoopgas_93 add $(8), %rdx jz .Lcomplete_regular_passgas_93 mov (8)(%rsp), %rax xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx push %rdx call *%rax pop %rdx xor %rsi, %rcx xor %rcx, %rsi xor %rsi, %rcx lea (%rdi,%rdx,8), %rdi pop %rax shr $(1), %rax mov %rdx, %rbx dec %rbx jz .Lmt_1gas_93 dec %rbx jz .Lmt_2gas_93 dec %rbx jz .Lmt_3gas_93 dec %rbx jz .Lmt_4gas_93 dec %rbx jz .Lmt_5gas_93 dec %rbx jz .Lmt_6gas_93 .Lmt_7gas_93: mov (8)(%rdi), %rbx adc %rbx, %r9 .Lmt_6gas_93: mov (16)(%rdi), %rbx adc %rbx, %r10 .Lmt_5gas_93: mov (24)(%rdi), %rbx adc %rbx, %r11 .Lmt_4gas_93: mov (32)(%rdi), %rbx adc %rbx, %r12 .Lmt_3gas_93: mov (40)(%rdi), %rbx adc %rbx, %r13 .Lmt_2gas_93: mov (48)(%rdi), %rbx adc %rbx, %r14 .Lmt_1gas_93: mov (56)(%rdi), %rbx adc %rbx, %r15 adc $(0), %rax push %rax .Lcomplete_regular_passgas_93: pop %rax pop %rbp pop %rbx add %rbx, %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 adc $(0), %r15 adc $(0), %rax movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) movq %r12, (32)(%rdi) movq %r13, (40)(%rdi) movq %r14, (48)(%rdi) movq %r15, (56)(%rdi) pop %rbx pop %r8 pop %rdx pop %rsi pop %rdi add $(64), %rdi sub $(8), %rbx jnc .LpassLoopgas_93 add $(8), %rbx jz .Lcomplete_reductiongas_93 push %rdi push %rsi push %rdx push %r8 push %rbx push %rax push %rbp sub $(8), %rdx push %rdx mov %r8, %rdx movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 lea mred8x_start(%rip), %rax mov (-8)(%rax,%rbx,8), %rbp add %rbp, %rax call *%rax pop %rdx xor %rax, %rax push %rax jmp .LentryTailLoopgas_93 .LtailLoopgas_93: movq (%rdi), %r8 movq (8)(%rdi), %r9 movq (16)(%rdi), %r10 movq (24)(%rdi), %r11 movq (32)(%rdi), %r12 movq (40)(%rdi), %r13 movq (48)(%rdi), %r14 movq (56)(%rdi), %r15 mov (8)(%rsp), %rax push %rdx call *%rax pop %rdx .LentryTailLoopgas_93: pop %rax shr $(1), %rax adc $(0), %r8 adc $(0), %r9 adc $(0), %r10 adc $(0), %r11 adc $(0), %r12 adc $(0), %r13 adc $(0), %r14 adc $(0), %r15 adc $(0), %rax mov (16)(%rsp), %rbx cmp $(1), %rbx jz .Ltt_1gas_93 cmp $(2), %rbx jz .Ltt_2gas_93 cmp $(3), %rbx jz .Ltt_3gas_93 cmp $(4), %rbx jz .Ltt_4gas_93 cmp $(5), %rbx jz .Ltt_5gas_93 cmp $(6), %rbx jz .Ltt_6gas_93 .Ltt_7gas_93: mov (8)(%rdi,%rbx,8), %rbp adc %rbp, %r9 .Ltt_6gas_93: mov (16)(%rdi,%rbx,8), %rbp adc %rbp, %r10 .Ltt_5gas_93: mov (24)(%rdi,%rbx,8), %rbp adc %rbp, %r11 .Ltt_4gas_93: mov (32)(%rdi,%rbx,8), %rbp adc %rbp, %r12 .Ltt_3gas_93: mov (40)(%rdi,%rbx,8), %rbp adc %rbp, %r13 .Ltt_2gas_93: mov (48)(%rdi,%rbx,8), %rbp adc %rbp, %r14 .Ltt_1gas_93: mov (56)(%rdi,%rbx,8), %rbp adc %rbp, %r15 adc $(0), %rax push %rax movq %r8, (%rdi,%rbx,8) movq %r9, (8)(%rdi,%rbx,8) movq %r10, (16)(%rdi,%rbx,8) movq %r11, (24)(%rdi,%rbx,8) movq %r12, (32)(%rdi,%rbx,8) movq %r13, (40)(%rdi,%rbx,8) movq %r14, (48)(%rdi,%rbx,8) movq %r15, (56)(%rdi,%rbx,8) add $(64), %rsi add $(64), %rdi sub $(8), %rdx jnc .LtailLoopgas_93 add $(8), %rdx mov %rdx, %rbx movq (%rdi), %r8 dec %rbx jz .Lget_tail_procgas_93 movq (8)(%rdi), %r9 dec %rbx jz .Lget_tail_procgas_93 movq (16)(%rdi), %r10 dec %rbx jz .Lget_tail_procgas_93 movq (24)(%rdi), %r11 dec %rbx jz .Lget_tail_procgas_93 movq (32)(%rdi), %r12 dec %rbx jz .Lget_tail_procgas_93 movq (40)(%rdi), %r13 dec %rbx jz .Lget_tail_procgas_93 movq (48)(%rdi), %r14 .Lget_tail_procgas_93: lea mla_lxl_short(%rip), %rax mov (-8)(%rax,%rdx,8), %rbp add %rbp, %rax push %rdx call *%rax pop %rdx lea (%rdi,%rdx,8), %rdi pop %rax shr $(1), %rax mov %rdx, %rbx mov (%rdi), %rbp adc %rbp, %r8 dec %rbx jz .Ladd_carry1gas_93 mov (8)(%rdi), %rbp adc %rbp, %r9 dec %rbx jz .Ladd_carry1gas_93 mov (16)(%rdi), %rbp adc %rbp, %r10 dec %rbx jz .Ladd_carry1gas_93 mov (24)(%rdi), %rbp adc %rbp, %r11 dec %rbx jz .Ladd_carry1gas_93 mov (32)(%rdi), %rbp adc %rbp, %r12 dec %rbx jz .Ladd_carry1gas_93 mov (40)(%rdi), %rbp adc %rbp, %r13 dec %rbx jz .Ladd_carry1gas_93 mov (48)(%rdi), %rbp adc %rbp, %r14 .Ladd_carry1gas_93: adc $(0), %rax pop %rbp pop %rbx add %rbx, %r8 movq %r8, (%rdi) dec %rdx jz .Ladd_carry2gas_93 adc $(0), %r9 movq %r9, (8)(%rdi) dec %rdx jz .Ladd_carry2gas_93 adc $(0), %r10 movq %r10, (16)(%rdi) dec %rdx jz .Ladd_carry2gas_93 adc $(0), %r11 movq %r11, (24)(%rdi) dec %rdx jz .Ladd_carry2gas_93 adc $(0), %r12 movq %r12, (32)(%rdi) dec %rdx jz .Ladd_carry2gas_93 adc $(0), %r13 movq %r13, (40)(%rdi) dec %rdx jz .Ladd_carry2gas_93 adc $(0), %r14 movq %r14, (48)(%rdi) .Ladd_carry2gas_93: adc $(0), %rax pop %rbx pop %r8 pop %rdx pop %rsi pop %rdi lea (%rdi,%rbx,8), %rdi .Lcomplete_reductiongas_93: add $(64), %rsp mov %rdx, %r14 lea (,%rdx,8), %r15 mov %rax, %rbx mov %rsi, %rcx mov %rdi, %rsi pop %rdi call sub_N sub %rax, %rbx mov %r14, %rdx sub %r15, %rdi sub %r15, %rsi mov %rdi, %rcx shr $(1), %rbx call copy_ae_N ret .Lfe93: .size mred_N_adcox, .Lfe93-(mred_N_adcox) .p2align 6, 0x90 .globl k0_cpMulAdx_BNU_school .type k0_cpMulAdx_BNU_school, @function k0_cpMulAdx_BNU_school: push %rbx push %rbp push %r12 push %r13 push %r14 push %r15 movslq %edx, %rdx movslq %r8d, %rbx xor %r8, %r8 xor %r9, %r9 xor %r10, %r10 xor %r11, %r11 xor %r12, %r12 xor %r13, %r13 xor %r14, %r14 xor %r15, %r15 cmp %rbx, %rdx jl .Lswap_operansgas_94 jg .Ltest_8N_casegas_94 cmp $(16), %rdx jg .Ltest_8N_casegas_94 cmp $(4), %rdx jg .Lmore_then_4gas_94 cmp $(3), %edx ja .Lmul_4_4gas_94 jz .Lmul_3_3gas_94 jp .Lmul_2_2gas_94 .Lmul_1_1gas_94: mov (%rcx), %rdx mulx (%rsi), %rbp, %r8 mov %rbp, (%rdi) movq %r8, (8)(%rdi) jmp .Lquitgas_94 .Lmul_2_2gas_94: mov (%rcx), %rdx mulx (%rsi), %rbp, %r8 mov %rbp, (%rdi) mulx (8)(%rsi), %rbx, %r9 add %rbx, %r8 adc $(0), %r9 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r9 movq %r8, (16)(%rdi) movq %r9, (24)(%rdi) jmp .Lquitgas_94 .Lmul_3_3gas_94: mov (%rcx), %rdx mulx (%rsi), %rbp, %r8 mov %rbp, (%rdi) mulx (8)(%rsi), %rbx, %r9 add %rbx, %r8 mulx (16)(%rsi), %rbp, %r10 adc %rbp, %r9 adc $(0), %r10 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 movq %r8, (24)(%rdi) movq %r9, (32)(%rdi) movq %r10, (40)(%rdi) jmp .Lquitgas_94 .Lmul_4_4gas_94: mov (%rcx), %rdx mulx (%rsi), %rbp, %r8 mov %rbp, (%rdi) mulx (8)(%rsi), %rbx, %r9 add %rbx, %r8 mulx (16)(%rsi), %rbp, %r10 adc %rbp, %r9 mulx (24)(%rsi), %rbx, %r11 adc %rbx, %r10 adc $(0), %r11 mov (8)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (8)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 mov (16)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (16)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 mov (24)(%rcx), %rdx xor %rax, %rax mulx (%rsi), %rbp, %rbx adox %rbp, %r8 mov %r8, (24)(%rdi) adcx %rbx, %r9 mulx (8)(%rsi), %r8, %rbp adox %r9, %r8 adcx %rbp, %r10 mulx (16)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (24)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 movq %r8, (32)(%rdi) movq %r9, (40)(%rdi) movq %r10, (48)(%rdi) movq %r11, (56)(%rdi) jmp .Lquitgas_94 .Lmore_then_4gas_94: lea mul_lxl_basic(%rip), %rax mov (-8)(%rax,%rdx,8), %rbp add %rbp, %rax call *%rax jmp .Lquitgas_94 .Lswap_operansgas_94: xor %rcx, %rsi xor %rsi, %rcx xor %rcx, %rsi xor %rbx, %rdx xor %rdx, %rbx xor %rbx, %rdx .Ltest_8N_casegas_94: mov %rdx, %rax or %rbx, %rax and $(7), %rax jnz .Lgeneral_mulgas_94 call mul_8Nx8M_adcox jmp .Lquitgas_94 .Lgeneral_mulgas_94: call mul_NxM_adcox jmp .Lquitgas_94 .Lquitgas_94: vzeroupper pop %r15 pop %r14 pop %r13 pop %r12 pop %rbp pop %rbx ret .Lfe94: .size k0_cpMulAdx_BNU_school, .Lfe94-(k0_cpMulAdx_BNU_school) .p2align 6, 0x90 .globl k0_cpSqrAdx_BNU_school .type k0_cpSqrAdx_BNU_school, @function k0_cpSqrAdx_BNU_school: push %rbx push %rbp push %r12 push %r13 push %r14 push %r15 movslq %edx, %rdx xor %r8, %r8 xor %r9, %r9 xor %r10, %r10 xor %r11, %r11 xor %r12, %r12 xor %r13, %r13 xor %r14, %r14 xor %r15, %r15 cmp $(16), %rdx jg .Ltest_8N_casegas_95 lea sqr_l_basic(%rip), %rax mov (-8)(%rax,%rdx,8), %rbp add %rbp, %rax call *%rax jmp .Lquitgas_95 .Ltest_8N_casegas_95: test $(7), %rdx jnz .Lgeneral_sqrgas_95 call sqr_8N_adcox jmp .Lquitgas_95 .Lgeneral_sqrgas_95: call sqr_N_adcox .Lquitgas_95: vzeroupper pop %r15 pop %r14 pop %r13 pop %r12 pop %rbp pop %rbx ret .Lfe95: .size k0_cpSqrAdx_BNU_school, .Lfe95-(k0_cpSqrAdx_BNU_school) .p2align 6, 0x90 .globl k0_cpMontRedAdx_BNU .type k0_cpMontRedAdx_BNU, @function k0_cpMontRedAdx_BNU: push %rbx push %rbp push %r12 push %r13 push %r14 push %r15 mov %rdi, %r15 mov %rsi, %rdi mov %rdx, %rsi movslq %ecx, %rdx cmp $(16), %rdx ja .Ltest_8N_casegas_96 cmp $(4), %rdx ja .Labove4gas_96 cmp $(3), %rdx ja .Lred_4gas_96 jz .Lred_3gas_96 jp .Lred_2gas_96 .Lred_1gas_96: movq (%rdi), %r9 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adox %rax, %rbp mov %rbp, %r9 xor %rbx, %rbx addq (8)(%rdi), %r9 movq %r9, (8)(%rdi) adc $(0), %rbx subq (%rsi), %r9 sbb $(0), %rbx movq (8)(%rdi), %rax cmovae %r9, %rax movq %rax, (%r15) jmp .Lquitgas_96 .Lred_2gas_96: movq (%rdi), %r9 movq (8)(%rdi), %r10 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r10 xor %rbx, %rbx addq (16)(%rdi), %r9 movq %r9, (16)(%rdi) adcq (24)(%rdi), %r10 movq %r10, (24)(%rdi) adc $(0), %rbx subq (%rsi), %r9 sbbq (8)(%rsi), %r10 sbb $(0), %rbx movq (16)(%rdi), %rax cmovae %r9, %rax movq %rax, (%r15) movq (24)(%rdi), %rax cmovae %r10, %rax movq %rax, (8)(%r15) jmp .Lquitgas_96 .Lred_3gas_96: movq (%rdi), %r9 movq (8)(%rdi), %r10 movq (16)(%rdi), %r11 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (16)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (16)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (16)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rax, %rbp adox %rax, %rbp mov %rbp, %r11 xor %rbx, %rbx addq (24)(%rdi), %r9 movq %r9, (24)(%rdi) adcq (32)(%rdi), %r10 movq %r10, (32)(%rdi) adcq (40)(%rdi), %r11 movq %r11, (40)(%rdi) adc $(0), %rbx subq (%rsi), %r9 sbbq (8)(%rsi), %r10 sbbq (16)(%rsi), %r11 sbb $(0), %rbx movq (24)(%rdi), %rax cmovae %r9, %rax movq %rax, (%r15) movq (32)(%rdi), %rax cmovae %r10, %rax movq %rax, (8)(%r15) movq (40)(%rdi), %rax cmovae %r11, %rax movq %rax, (16)(%r15) jmp .Lquitgas_96 .Lred_4gas_96: movq (%rdi), %r9 movq (8)(%rdi), %r10 movq (16)(%rdi), %r11 movq (24)(%rdi), %r12 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (16)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (24)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (16)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (24)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (16)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (24)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 mov %r8, %rdx imul %r9, %rdx xor %rax, %rax mulx (%rsi), %rbx, %rbp adox %rbx, %r9 adcx %rbp, %r10 mulx (8)(%rsi), %r9, %rbx adox %r10, %r9 adcx %rbx, %r11 mulx (16)(%rsi), %r10, %rbp adox %r11, %r10 adcx %rbp, %r12 mulx (24)(%rsi), %r11, %rbx adox %r12, %r11 adcx %rax, %rbx adox %rax, %rbx mov %rbx, %r12 xor %rbx, %rbx addq (32)(%rdi), %r9 movq %r9, (32)(%rdi) adcq (40)(%rdi), %r10 movq %r10, (40)(%rdi) adcq (48)(%rdi), %r11 movq %r11, (48)(%rdi) adcq (56)(%rdi), %r12 movq %r12, (56)(%rdi) adc $(0), %rbx subq (%rsi), %r9 sbbq (8)(%rsi), %r10 sbbq (16)(%rsi), %r11 sbbq (24)(%rsi), %r12 sbb $(0), %rbx movq (32)(%rdi), %rax cmovae %r9, %rax movq %rax, (%r15) movq (40)(%rdi), %rax cmovae %r10, %rax movq %rax, (8)(%r15) movq (48)(%rdi), %rax cmovae %r11, %rax movq %rax, (16)(%r15) movq (56)(%rdi), %rax cmovae %r12, %rax movq %rax, (24)(%r15) jmp .Lquitgas_96 .Labove4gas_96: mov %rdx, %rbp sub $(4), %rbp lea mred_short(%rip), %rax mov (-8)(%rax,%rbp,8), %rbp add %rbp, %rax call *%rax jmp .Lquitgas_96 .Ltest_8N_casegas_96: test $(7), %rdx jnz .Lgeneral_casegas_96 call mred_8N_adcox jmp .Lquitgas_96 .Lgeneral_casegas_96: call mred_N_adcox .Lquitgas_96: vzeroupper pop %r15 pop %r14 pop %r13 pop %r12 pop %rbp pop %rbx ret .Lfe96: .size k0_cpMontRedAdx_BNU, .Lfe96-(k0_cpMontRedAdx_BNU)
; A171390: a(n) = 37*2^(n-1)-1. ; 36,73,147,295,591,1183,2367,4735,9471,18943,37887,75775,151551,303103,606207,1212415,2424831,4849663,9699327,19398655,38797311,77594623,155189247,310378495,620756991,1241513983,2483027967,4966055935,9932111871,19864223743,39728447487,79456894975,158913789951,317827579903,635655159807,1271310319615,2542620639231,5085241278463,10170482556927,20340965113855,40681930227711,81363860455423,162727720910847,325455441821695,650910883643391,1301821767286783,2603643534573567,5207287069147135,10414574138294271,20829148276588543,41658296553177087,83316593106354175,166633186212708351,333266372425416703,666532744850833407,1333065489701666815,2666130979403333631,5332261958806667263,10664523917613334527,21329047835226669055,42658095670453338111,85316191340906676223,170632382681813352447,341264765363626704895,682529530727253409791,1365059061454506819583,2730118122909013639167,5460236245818027278335,10920472491636054556671,21840944983272109113343,43681889966544218226687,87363779933088436453375,174727559866176872906751,349455119732353745813503,698910239464707491627007,1397820478929414983254015,2795640957858829966508031,5591281915717659933016063,11182563831435319866032127,22365127662870639732064255,44730255325741279464128511,89460510651482558928257023,178921021302965117856514047,357842042605930235713028095,715684085211860471426056191,1431368170423720942852112383,2862736340847441885704224767,5725472681694883771408449535,11450945363389767542816899071,22901890726779535085633798143,45803781453559070171267596287,91607562907118140342535192575,183215125814236280685070385151,366430251628472561370140770303,732860503256945122740281540607,1465721006513890245480563081215,2931442013027780490961126162431,5862884026055560981922252324863,11725768052111121963844504649727,23451536104222243927689009299455 mov $1,2 pow $1,$0 sub $1,1 mul $1,37 add $1,36 mov $0,$1
; A213396: Number of (w,x,y) with all terms in {0,...,n} and 2*w < |x+y-w|. ; 0,3,9,21,42,72,114,171,243,333,444,576,732,915,1125,1365,1638,1944,2286,2667,3087,3549,4056,4608,5208,5859,6561,7317,8130,9000,9930,10923,11979,13101,14292,15552,16884,18291,19773,21333,22974,24696 add $0,1 pow $0,3 add $0,1 div $0,3
SECTION code_fp_math48 PUBLIC hypot EXTERN cm48_sccz80_hypot defc hypot = cm48_sccz80_hypot
; A053001: Largest prime < n^2. ; 3,7,13,23,31,47,61,79,97,113,139,167,193,223,251,283,317,359,397,439,479,523,571,619,673,727,773,839,887,953,1021,1087,1153,1223,1291,1367,1439,1511,1597,1669,1759,1847,1933,2017,2113,2207,2297,2399,2477,2593,2699,2803,2909,3023,3121,3229,3361,3469,3593,3719,3833,3967,4093,4219,4349,4483,4621,4759,4889,5039,5179,5323,5471,5623,5749,5927,6079,6229,6397,6553,6719,6883,7043,7219,7393,7561,7741,7919,8093,8273,8461,8647,8831,9013,9209,9403,9601,9791,9973,10193 mov $2,$0 mov $5,$0 seq $0,56927 ; Difference between n^2 and largest prime less than n^2. add $5,6 sub $5,$0 mov $0,-6 add $5,2 add $0,$5 add $0,2 mov $4,$2 mul $4,3 add $0,$4 mov $3,$2 mul $3,$2 add $0,$3
; A093043: Jacobsthal(n)*Fibonacci(n-1). ; Submitted by Christian Krause ; 0,0,1,3,10,33,105,344,1105,3591,11594,37565,121485,393264,1272413,4117971,13325450,43123017,139547457,451587592,1461364025,4729080015,15303613546,49523551333,160261550085,518617316448,1678280815525 mov $1,2 pow $1,$0 trn $0,1 seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1. add $1,1 div $1,3 mul $1,2 mul $0,$1 div $0,2
; Copyright Oliver Kowalke 2009. ; Distributed under the Boost Software License, Version 1.0. ; (See accompanying file LICENSE_1_0.txt or copy at ; http://www.boost.org/LICENSE_1_0.txt) ; --------------------------------------------------------------------------------- ; | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ; --------------------------------------------------------------------------------- ; | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | ; --------------------------------------------------------------------------------- ; | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | ; --------------------------------------------------------------------------------- ; --------------------------------------------------------------------------------- ; | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ; --------------------------------------------------------------------------------- ; | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | ; --------------------------------------------------------------------------------- ; | ESI | EBX | EBP | EIP | to | data | EH NXT |SEH HNDLR| ; --------------------------------------------------------------------------------- .386 .XMM .model flat, c ; standard C library function _exit PROTO, value:SDWORD .code cat_coroutine_context_make PROC EXPORT ; first arg of cat_coroutine_context_make() == top of context-stack mov eax, [esp+04h] ; reserve space for first argument of context-function ; EAX might already point to a 16byte border lea eax, [eax-08h] ; shift address in EAX to lower 16 byte boundary and eax, -16 ; reserve space for context-data on context-stack ; on context-function entry: (ESP -0x4) % 8 == 0 ; additional space is required for SEH lea eax, [eax-040h] ; save MMX control- and status-word stmxcsr [eax] ; save x87 control-word fnstcw [eax+04h] ; first arg of cat_coroutine_context_make() == top of context-stack mov ecx, [esp+04h] ; save top address of context stack as 'base' mov [eax+014h], ecx ; second arg of cat_coroutine_context_make() == size of context-stack mov edx, [esp+08h] ; negate stack size for LEA instruction (== substraction) neg edx ; compute bottom address of context stack (limit) lea ecx, [ecx+edx] ; save bottom address of context-stack as 'limit' mov [eax+010h], ecx ; save bottom address of context-stack as 'dealloction stack' mov [eax+0ch], ecx ; set fiber-storage to zero xor ecx, ecx mov [eax+08h], ecx ; third arg of cat_coroutine_context_make() == address of context-function ; stored in EBX mov ecx, [esp+0ch] mov [eax+024h], ecx ; compute abs address of label trampoline mov ecx, trampoline ; save address of trampoline as return-address for context-function ; will be entered after calling cat_coroutine_context_jump() first time mov [eax+02ch], ecx ; compute abs address of label finish mov ecx, finish ; save address of finish as return-address for context-function in EBP ; will be entered after context-function returns mov [eax+028h], ecx ; traverse current seh chain to get the last exception handler installed by Windows ; note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default ; the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler ; at its end by RaiseException all seh-handlers are disregarded if not present and the ; program is aborted assume fs:nothing ; load NT_TIB into ECX mov ecx, fs:[0h] assume fs:error walk: ; load 'next' member of current SEH into EDX mov edx, [ecx] ; test if 'next' of current SEH is last (== 0xffffffff) inc edx jz found dec edx ; exchange content; ECX contains address of next SEH xchg edx, ecx ; inspect next SEH jmp walk found: ; load 'handler' member of SEH == address of last SEH handler installed by Windows mov ecx, [ecx+04h] ; save address in ECX as SEH handler for context mov [eax+03ch], ecx ; set ECX to -1 mov ecx, 0ffffffffh ; save ECX as next SEH item mov [eax+038h], ecx ; load address of next SEH item lea ecx, [eax+038h] ; save next SEH mov [eax+018h], ecx ret ; return pointer to context-data trampoline: ; move transport_t for entering context-function ; FCTX == EAX, DATA == EDX mov [esp], eax mov [esp+04h], edx push ebp ; jump to context-function jmp ebx finish: ; exit code is zero xor eax, eax mov [esp], eax ; exit application call _exit hlt cat_coroutine_context_make ENDP END
; A144194: Square array (6 X 6) read by rows. ; 0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0 pow $0,8 div $0,7 add $0,7 mod $0,5 mov $1,7 lpb $0 sub $0,1 div $1,$1 lpe trn $1,5 div $1,2
; A170785: a(n) = n^9*(n^3 + 1)/2. ; 0,1,2304,275562,8519680,123046875,1093430016,6940820404,34426847232,141408478485,500500000000,1570393162206,4460630114304,11654344810927,28357286711040,64892390625000,140771848093696,291370412553129,578514870358272,1106818803381970,2048256000000000,3678310895716611,6428104950133504,10958212792340892,18261494621798400,29804229736328125,47717193082680576,75051130447242054,116114421772582912,176914645175722455,265730341500000000,393844611705355216,576478344489467904,833967963218693457 mov $2,2 lpb $2 pow $0,3 add $1,4 mul $1,$0 bin $2,2 lpe div $1,8 mov $0,$1
; A268099: a(n) = 2^(n mod 2)*5*10^floor(n/2) - 1. ; 4,9,49,99,499,999,4999,9999,49999,99999,499999,999999,4999999,9999999,49999999,99999999,499999999,999999999,4999999999,9999999999,49999999999,99999999999,499999999999,999999999999,4999999999999,9999999999999,49999999999999 seq $0,4643 ; Powers of 2 written in base 4. mul $0,5 sub $0,1
#ifndef MLKIT_KMEANS_HPP #define MLKIT_KMEANS_HPP namespace mk { namespace cluster { class KMeans { private: int n_clusters_, n_init_, max_iter_, random_state_; std::string init_; float tol_; public: af::array cluster_centers_; af::array labels_; float inertia_; int n_iter_; KMeans(int n_clusters=8, std::string init="k-means++", int n_init=10, int max_iter=300, float tol=0.0001, int random_state=-1); void fit(af::array & X); af::array fit_predict(af::array & X); af::array fit_transform(af::array & X); af::array transform(af::array & X); }; inline KMeans::KMeans(int n_clusters, std::string init, int n_init, int max_iter, float tol, int random_state): n_clusters_(n_clusters), init_(init), n_init_(n_init), max_iter_(max_iter), tol_(tol), random_state_(random_state) { } inline void KMeans::fit(af::array & X) { std::unordered_map<int, int> cluster_count; af::array X_dist = utils::minkowski_distance(X, X); af::array cluster_centers, cluster_dist, inertia_dist; std::vector<int> indices; std::tie(cluster_centers, indices) = utils::sample(X, this->n_clusters_); if(this->init_ == "k-means++") { for(int i = 0; i < n_init_; ++i) { cluster_dist = utils::choice(X_dist, indices, 1); af::array paf = af::sum(cluster_dist, 1) / af::sum<float>(cluster_dist, 1); std::vector<float> p = utils::array2vec(paf); std::tie(cluster_centers, indices) = utils::sample(X, this->n_clusters_, p); } } this->inertia_ = af::sum<float>(cluster_dist); cluster_dist = utils::choice(X_dist, indices, 1); af::min(inertia_dist, this->labels_, cluster_dist, 1); for(this->n_iter_ = 0; this->n_iter_ < this->max_iter_; ++this->n_iter_) { float inertia = af::sum<float>(inertia_dist); if(this->inertia_ - inertia < this->tol_) break; this->inertia_ = inertia; cluster_centers = 0; cluster_count.clear(); for(int i = 0; i < X.dims(0); ++i) { int label = this->labels_.row(i).scalar<unsigned int>(); cluster_centers.row(label) += X.row(i); cluster_count[label]++; } for(int k = 0; k < this->n_clusters_; ++k) { if(cluster_count[k]) cluster_centers.row(k) /= cluster_count[k]; } cluster_dist = utils::minkowski_distance(X, cluster_centers); af::min(inertia_dist, this->labels_, cluster_dist, 1); } this->inertia_ = af::sum<float>(inertia_dist); this->cluster_centers_ = cluster_centers; } inline af::array KMeans::fit_predict(af::array & X) { this->fit(X); return this->labels_; } inline af::array KMeans::transform(af::array & X) { return utils::minkowski_distance(X, this->cluster_centers_); } inline af::array KMeans::fit_transform(af::array & X) { this->fit(X); return this->transform(X); } } } #endif
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0x12424, %rsi lea addresses_A_ht+0x950c, %rdi nop nop nop nop nop and %rbp, %rbp mov $110, %rcx rep movsl nop nop add $33257, %r11 lea addresses_WT_ht+0x110dc, %r14 nop nop nop nop nop and %rbp, %rbp mov (%r14), %cx nop and $54493, %r14 lea addresses_D_ht+0xdeb4, %rdi nop nop nop nop cmp %rsi, %rsi mov (%rdi), %r14 cmp %rbp, %rbp pop %rsi pop %rdi pop %rcx pop %rbp pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rax push %rbx push %rsi // Faulty Load lea addresses_US+0x1e3f4, %r15 clflush (%r15) nop nop nop inc %r11 movb (%r15), %bl lea oracles, %r14 and $0xff, %rbx shlq $12, %rbx mov (%r14,%rbx,1), %rbx pop %rsi pop %rbx pop %rax pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}} {'00': 1649} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
; A027778: a(n) = 5*(n+1)*binomial(n+2, 5)/2. ; 10,75,315,980,2520,5670,11550,21780,38610,65065,105105,163800,247520,364140,523260,736440,1017450,1382535,1850695,2443980,3187800,4111250,5247450,6633900,8312850,10331685,12743325,15606640,18986880,22956120,27593720,32986800,39230730,46429635,54696915,64155780,74939800,87193470,101072790,116745860,134393490,154209825,176402985,201195720,228826080,259548100,293632500,331367400,373059050,419032575,469632735,525224700,586194840,652951530,725925970,805573020,892372050,986827805,1089471285 mov $1,$0 add $0,5 bin $0,$1 add $1,4 mul $0,$1 div $0,2 mul $0,5
/*========================================================================= Copyright 2009 Rensselaer Polytechnic Institute 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 "SampleEditor.h" //#include "Dendrogram.h" //******************************************************************************* // SampleEditor //******************************************************************************** SampleEditor::SampleEditor(QWidget * parent, Qt::WindowFlags flags) : QMainWindow(parent,flags) { table = new TableWindow(); plot = new PlotWindow(this); histo = new HistoWindow(this); //graph = new GraphWindow(this); dendro1 = new Dendrogram(this); dendro2 = new Dendrogram(this); heatmap = new Heatmap(this); biheatmap = new BiHeatmap(this); spdTestWin = NULL; //progressionheatmap = new ProgressionHeatmap(this); this->cc1 = NULL; this->cc2 = NULL; data = NULL; data = vtkSmartPointer<vtkTable>::New(); //Start with a new table selection = new ObjectSelection(); selection2 = new ObjectSelection(); lastPath = "."; createMenus(); createStatusBar(); this->flag = 0; setCentralWidget(table); setWindowTitle(tr("Sample Editor")); connect(selection, SIGNAL(changed()), this, SLOT(updateStatistics())); this->ClusterSelections = new SelectiveClustering(); //this->SampleClusterManager = new ClusterManager(); //this->SampleClusterManager->setClusteringModel(this->ClusterSelections ); //this->SampleClusterManager->setObjectSelection(selection); //this->SampleClusterManager->setVisible(true); this->resize(500,500); } //****************************************************************************** //Reimplement closeEvent to also close all other windows in the application //****************************************************************************** void SampleEditor::closeEvent(QCloseEvent *event) { //Then Close all other windows foreach (QWidget *widget, qApp->topLevelWidgets()) { if (this != widget) { if(widget->isVisible()) widget->close(); } } //Then close myself event->accept(); } //****************************************************************************** // Here we just show a message in the status bar when loading //****************************************************************************** void SampleEditor::createStatusBar() { QLabel *statusLabel = new QLabel(tr(" Ready")); statusBar()->addWidget(statusLabel, 1); } /*----------------------------------------------------------------------------*/ /* function: createMenus() */ /* */ /* This function is used to create Menus that are associated with various */ /* functions in the application. In order to add a menu, we need to do the */ /* following: */ /* 1.) Define a QMenu type (e.g., QMenu *fileMenu) and add it to menuBar() */ /* 2.) Define QAction elements (e.g., QAction *openAction) associated with */ /* each QMenu */ /* 3.) Add a separator (menuBar()->addSeparator() after each menu group */ /* */ /*In order to create an Action, we need to do the */ /* following: */ /* 1.) Define a QAction (e.g., QAction *openAction) */ /* 2.) Label the QAction element (e.g., openAction = new QAction(QIcon(":src/ */ /* images/open.png"), tr("&Open..."), this). The QIcon argumenet is */ /* optional. */ /* 3.) Add optional "setShortcut" and "setStatusTip". */ /* 4.) Finally, bind this item with a "connect" that essentially calls the */ /* module to implement the operation (e.g., */ /* connect(openAction, SIGNAL(triggered()), this, SLOT(loadImage())). In */ /* this example, "loadImage()" is the module that is being called. These */ /* modules should be defined as "private" operators in the main class. */ /* The actual routines performing the operations (e.g., an image */ /* thresholding operation) must be accessed from within the called module.*/ /* Finally, after all these action's, we bind them to a "QActionGroup". */ /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ void SampleEditor::createMenus() { //FIRST HANDLE FILE MENU fileMenu = menuBar()->addMenu(tr("&File")); loadAction = new QAction(tr("Load File..."), this); loadAction->setStatusTip(tr("Load to table from text file")); connect(loadAction, SIGNAL(triggered()), this, SLOT(loadFile())); fileMenu->addAction(loadAction); loadRotateAction = new QAction(tr("Load Rotated Table..."), this); loadRotateAction->setStatusTip(tr("Load to table from text file")); connect(loadRotateAction, SIGNAL(triggered()), this, SLOT(loadRotateFile())); fileMenu->addAction(loadRotateAction); editMenu = menuBar()->addMenu(tr("&Edit")); removeRowsAction = new QAction(tr("Remove Selected Rows"),this); removeRowsAction->setStatusTip(tr("Remove selected rows from the table")); connect(removeRowsAction, SIGNAL(triggered()), this, SLOT(removeRows())); editMenu->addAction(removeRowsAction); showStatisticsAction = new QAction(tr("Show Statistics Toolbar"), this); connect(showStatisticsAction,SIGNAL(triggered()), this, SLOT(showStatistics())); editMenu->addAction(showStatisticsAction); updateStatisticsAction = new QAction(tr("Update Statistics"), this); connect(updateStatisticsAction, SIGNAL(triggered()), this, SLOT(updateStatistics())); //connect((this->selection), SIGNAL(selectionChanged()), this, SLOT(updateStatistics())); editMenu->addAction(updateStatisticsAction); addBlankRowAction = new QAction(tr("Add Blank Row"), this); addBlankRowAction->setStatusTip(tr("Add blank row to bottom of table")); connect(addBlankRowAction, SIGNAL(triggered()), this, SLOT(addBlankRow())); editMenu->addAction(addBlankRowAction); changeRowDataAction = new QAction(tr("Change Row Data..."), this); changeRowDataAction->setStatusTip(tr("Change data for selected row")); connect(changeRowDataAction, SIGNAL(triggered()), this, SLOT(changeRowData())); editMenu->addAction(changeRowDataAction); //SPDAction = new QAction(tr("SPD"), this); //SPDAction->setStatusTip(tr("SPD Analysis for the data")); //connect(SPDAction, SIGNAL(triggered()), this, SLOT(SPDAnalysis())); //SPDMenu->addAction(SPDAction); SPDAction = new QAction(tr("SPD"), this); SPDAction->setStatusTip(tr("SPD Analysis for the data")); connect(SPDAction, SIGNAL(triggered()), this, SLOT(SPDTestAnalysis())); editMenu->addAction(SPDAction); //spdSampleDendroAction = new QAction(tr("SampleDendrogram"), this); //spdSampleDendroAction->setStatusTip(tr("SampleDandrogram")); //connect(spdSampleDendroAction, SIGNAL(triggered()), this, SLOT(spdSampledendrogram())); //SPDMenu->addAction(spdSampleDendroAction); //spdFeatureDendroAction = new QAction(tr("FeatureDendrogram"), this); //spdFeatureDendroAction->setStatusTip(tr("FeatureDandrogram")); //connect(spdFeatureDendroAction, SIGNAL(triggered()), this, SLOT(spdFeatureDendroram())); //SPDMenu->addAction(spdFeatureDendroAction); //spdHeatmapAction = new QAction(tr("Heatmap"), this); //spdHeatmapAction->setStatusTip(tr("Heatmap")); //connect(spdHeatmapAction, SIGNAL(triggered()), this, SLOT(spdShowHeatmap())); //SPDMenu->addAction(spdHeatmapAction); ClusClusMenu = editMenu->addMenu(tr("&ClusClus")); sampleDendroAction = new QAction(tr("SampleDendrogram"), this); sampleDendroAction->setStatusTip(tr("SampleDandrogram")); connect(sampleDendroAction, SIGNAL(triggered()), this, SLOT(sampledendrogram())); ClusClusMenu->addAction(sampleDendroAction); featureDendroAction = new QAction(tr("FeatureDendrogram"), this); featureDendroAction->setStatusTip(tr("FeatureDandrogram")); connect(featureDendroAction, SIGNAL(triggered()), this, SLOT(featuredendrogram())); ClusClusMenu->addAction(featureDendroAction); heatmapAction = new QAction(tr("Heatmap"), this); heatmapAction->setStatusTip(tr("Heatmap")); connect(heatmapAction, SIGNAL(triggered()), this, SLOT(showheatmap())); ClusClusMenu->addAction(heatmapAction); SpectralClusteringMenu = editMenu->addMenu(tr("&SpectralClusering")); SpectralClusteringAction = new QAction(tr("Spectralclu"), this); SpectralClusteringAction->setStatusTip(tr("Spectralclu")); connect(SpectralClusteringAction, SIGNAL(triggered()), this, SLOT(SpectralCluserting())); SpectralClusteringMenu->addAction(SpectralClusteringAction); BiclusMenu = editMenu->addMenu(tr("&Biclus")); biclusHeatmapAction = new QAction(tr("BiclusHeatmap"), this); biclusHeatmapAction->setStatusTip(tr("BiclusHeatmap")); connect(biclusHeatmapAction, SIGNAL(triggered()), this, SLOT(biclusheatmap())); BiclusMenu->addAction(biclusHeatmapAction); this->CreateCluster = new QAction(tr("Create Cluster"), this); connect(CreateCluster, SIGNAL(triggered()), this, SLOT(CreateClusterSelection())); menuBar()->addAction(CreateCluster); this->DisplayClusterSelections = new QAction(tr("Display"), this); connect(DisplayClusterSelections, SIGNAL(triggered()), this, SLOT(DumpClusterSelections())); menuBar()->addAction(DisplayClusterSelections); } //******************************************************************************** // LoadFile() // // Ask for the header file and the data file that define a table and load the data // into vtkTable, then show results. //******************************************************************************** void SampleEditor::loadRotateFile() { QString headername = QFileDialog::getOpenFileName(this,"Choose a Header File", lastPath, tr("TXT Files (*.txt)") ); if(headername == "") return; lastPath = QFileInfo(headername).absolutePath(); /*QString dataname = QFileDialog::getOpenFileName(this,"Choose a Data File", lastPath, tr("TXT Files (*.txt)") ); if(dataname == "") return; lastPath = QFileInfo(dataname).absolutePath(); selection->clear(); ReadFiles(headername.toStdString(), dataname.toStdString());*/ this->data = ftk::LoadRotatedTable(headername.toStdString()); std::cout<< "Read table:"<<data->GetNumberOfRows()<<"\t"<< data->GetNumberOfColumns()<<endl; table->setModels(data,selection,selection2);////////////////////////////////////////////////////////////////////////// table->show(); //plot->setModels(data,selection); //plot->show(); /*this->histo->setModels(data, selection); this->histo->show();*/ //std::cout << "I reached here inside the sample editor"<<std::endl; //this->graph->setModels(data, selection, selection2); //this->dendro1->setModels(data,selection); //this->dendro2->setModels(data,selection2); //this->heatmap->setModels(data,selection,selection2); //this->ClusterSelections->SetObjectTable(data); //this->SampleClusterManager->setVisible(true); } void SampleEditor::loadFile() { QString headername = QFileDialog::getOpenFileName(this,"Choose a Header File", lastPath, tr("TXT Files (*.txt)") ); if(headername == "") return; lastPath = QFileInfo(headername).absolutePath(); /*QString dataname = QFileDialog::getOpenFileName(this,"Choose a Data File", lastPath, tr("TXT Files (*.txt)") ); if(dataname == "") return; lastPath = QFileInfo(dataname).absolutePath(); selection->clear(); ReadFiles(headername.toStdString(), dataname.toStdString());*/ this->data = ftk::LoadTable(headername.toStdString()); std::cout<< "Read table:"<<data->GetNumberOfRows()<<"\t"<< data->GetNumberOfColumns()<<endl; table->setModels(data,selection,selection2);////////////////////////////////////////////////////////////////////////// table->show(); //plot->setModels(data,selection); //plot->show(); /*this->histo->setModels(data, selection); this->histo->show();*/ //std::cout << "I reached here inside the sample editor"<<std::endl; //this->graph->setModels(data, selection, selection2); //this->dendro1->setModels(data,selection); //this->dendro2->setModels(data,selection2); //this->heatmap->setModels(data,selection,selection2); //this->ClusterSelections->SetObjectTable(data); //this->SampleClusterManager->setVisible(true); } void SampleEditor::ReadFiles(std::string hname, std::string dname) { const int MAXLINESIZE = 102400; //Numbers could be in scientific notation in this file char line[MAXLINESIZE]; //data = vtkSmartPointer<vtkTable>::New(); //Start with a new table data->Initialize(); std::cout << "The value of hname is "<<hname<<std::endl; std::cout << "The value of dname is "<<dname <<std::endl; //LOAD THE HEADER INFO: ifstream headerFile; headerFile.open( hname.c_str() ); if ( !headerFile.is_open() ) return ; vtkSmartPointer<vtkDoubleArray> column = vtkSmartPointer<vtkDoubleArray>::New(); headerFile.getline(line, MAXLINESIZE); /*std::cout << line << std::endl;*/ while ( !headerFile.eof() ) //Get all values { std::string h; char * pch = strtok (line," \t"); while (pch != NULL) { h = pch; pch = strtok (NULL, " \t"); } column = vtkSmartPointer<vtkDoubleArray>::New(); column->SetName( h.c_str() ); data->AddColumn(column); /*std::cout<<"The headers is:"<<std::endl;*/ /*data->Dump(3);*/ headerFile.getline(line, MAXLINESIZE); } headerFile.close(); /*std::cout << "Finished loading headers" << std::endl;*/ //LOAD ALL OF THE FEATURES INFO: ifstream featureFile; featureFile.open( dname.c_str() ); if ( !featureFile.is_open() ) return; featureFile.getline(line, MAXLINESIZE); std::cout << line<<std::endl; while ( !featureFile.eof() ) //Get all values { vtkSmartPointer<vtkVariantArray> row = vtkSmartPointer<vtkVariantArray>::New(); char * pch = strtok (line," \t"); while (pch != NULL) { row->InsertNextValue( vtkVariant( atof(pch) ) ); pch = strtok (NULL, " \t"); } data->InsertNextRow(row); /*std::cout <<"The data is:"<<std::endl;*/ /*data->Dump(3);*/ featureFile.getline(line, MAXLINESIZE); } featureFile.close(); /*std::cout << "Finished loading data" << std::endl;*/ } //*********************************************************************************** // This functions demonstrates how to remove rows from the table and how // to make sure that the views are updated accordingly. // // It is important to realize that row numbers change after removing a row. // This means you cannot iterate through the table to remove rows, but // must look for each row independently. // // Also note that it is important to remove the ids of removed rows from selections. //*********************************************************************************** void SampleEditor::removeRows(void) { if( this->data->GetNumberOfRows() <= 0) { return; } std::set<long int> sels = selection->getSelections(); std::set<long int>::iterator it; for(it=sels.begin(); it!=sels.end(); ++it) { for(int i=0; i<data->GetNumberOfRows(); ++i) { if( data->GetValue(i,0).ToLong() == (*it) ) { data->RemoveRow(i); break; } } } selection->clear(); table->update(); this->ClusterSelections->update(); plot->update(); } void SampleEditor::addBlankRow(void) { if( this->data->GetNumberOfRows() <= 0) { return; } //Get the maximum ID: long max = 0; for(int i=0; i<data->GetNumberOfRows(); ++i) { long val = data->GetValue(i,0).ToLong(); if( val > max ) max = val; } //Insert blank row: data->InsertNextBlankRow(); long newID = max+1; //Set the ID of the new ROW: data->SetValue( data->GetNumberOfRows() - 1, 0, vtkVariant(newID)); //Select the new row only: selection->select(newID); //update views: table->update(); plot->update(); } void SampleEditor::changeRowData(void) { if( this->data->GetNumberOfRows() <= 0) { return; } } void SampleEditor::showStatistics(void) { if( this->data->GetNumberOfRows() <= 0) { return; } if (this->flag == 1) { this->statisticsToolbar->statisticsDockWidget->close(); //QT not closing properly delete this->statisticsToolbar->statisticsDockWidget; this->statisticsToolbar->statisticsDockWidget = NULL; //std::cout << "Statistics widget close" << std::endl; this->flag = 0; return; } this->statisticsDockWidget = new QDockWidget(); this->statisticsToolbar = new StatisticsToolbar(statisticsDockWidget); statisticsDockWidget->setWidget(statisticsToolbar->statisticsDockWidget); statisticsDockWidget->setAllowedAreas(Qt::BottomDockWidgetArea); addDockWidget(Qt::BottomDockWidgetArea, statisticsToolbar->statisticsDockWidget); SampleEditor::statisticsToolbar->setTable(data, selection); this->flag = 1; } void SampleEditor::updateStatistics(void) { if( this->data->GetNumberOfRows() <= 0) { return; } if (this->flag == 1) { //std::cout<< "updattteeeee" << std::endl; statisticsToolbar->statisticsDockWidget->close(); delete this->statisticsToolbar->statisticsDockWidget; this->statisticsToolbar->statisticsDockWidget = NULL; this->statisticsDockWidget = new QDockWidget(); this->statisticsToolbar = new StatisticsToolbar(statisticsDockWidget); statisticsDockWidget->setWidget(statisticsToolbar->statisticsDockWidget); statisticsDockWidget->setAllowedAreas(Qt::BottomDockWidgetArea); addDockWidget(Qt::BottomDockWidgetArea, statisticsToolbar->statisticsDockWidget); SampleEditor::statisticsToolbar->setTable(data, selection); //showStatistics(); } } //void SampleEditor::SPDAnalysis() //{ // if( this->data->GetNumberOfRows() <= 0) // { // spdWin->setModels(); // } // else // { // spdWin->setModels( this->data, selection); // } // // spdWin->show(); // // //SPDAnalysisModel *SPDModel = SPDAnalysisModel::InitInstance(); // //SPDModel->ParseTraceFile( this->data); // //std::cout<< "Normalizing" << std::endl; // //SPDModel->NormalizeData(); // //std::cout<< "clustering" << std::endl; // //SPDModel->ClusterAgglomerate( 0.5, 0.9); // ////std::cout<< "Merging" << std::endl; // ////SPDModel->ClusterMerge( 0.9, 0.9); // //std::cout<< "Generating MST" << std::endl; // //SPDModel->GenerateMST(); // //SPDModel->RunEMDAnalysis(); // // //QString str = "0"; // //vtkSmartPointer<vtkTable> table = SPDModel->GenerateProgressionTree(str.toStdString()); // //if( table != NULL) // //{ // // std::vector<std::string> headers; // // SPDModel->GetTableHeaders( headers); // // QString str = SPDModel->GetFileName(); // // std::set<long int> featureSelectedIDs; // // SPDModel->GetSelectedFeatures(featureSelectedIDs); // // this->graph->SetTreeTable( table, headers[0], headers[1], headers[2], featureSelectedIDs, str); // // //this->graph->SetGraphTable( table, headers[0], headers[1], headers[2]); // // this->graph->ShowGraphWindow(); // //} //} void SampleEditor::SPDTestAnalysis() { if( spdTestWin) { delete spdTestWin; } spdTestWin = new SPDtestWindow(); if( this->data->GetNumberOfRows() <= 0) { spdTestWin->setModels(); } else { spdTestWin->setModels( this->data, selection); } spdTestWin->show(); } void SampleEditor::sampledendrogram() { if( this->data->GetNumberOfRows() <= 0) { return; } this->dendro1->setModels(data,selection); //if(!cc1) // this->dendro1->runClusclus(); //else //{ // this->dendro1->setTreeData(cc1->num_samples, cc1->treedata, cc1->optimalleaforder); // this->dendro1->createDataForDendogram(); //} //this->dendro1->showGraph(); double** datas; vtkVariant temp; datas = new double*[this->data->GetNumberOfRows()]; std::cout<<this->data->GetNumberOfRows()<<endl; std::cout<<this->data->GetNumberOfColumns()<<endl; for (int i = 0; i < this->data->GetNumberOfRows(); i++) { datas[i] = new double[this->data->GetNumberOfColumns() - 1 + 2]; } for(int i = 0; i < this->data->GetNumberOfRows(); i++) { for(int j = 1; j < this->data->GetNumberOfColumns(); j++) { temp = this->data->GetValue(i, j); datas[i][j-1] = temp.ToDouble(); } } cc1 = new clusclus(datas, (int)this->data->GetNumberOfRows(), (int)this->data->GetNumberOfColumns() - 1); cc1->RunClusClus(); cc1->WriteClusteringOutputToFile("mergers.txt","features.txt","progress.txt", "members.txt", "gap.txt", "treedata.txt", "Optimalleaforder.txt"); this->dendro1->setTreeData(cc1->num_samples, cc1->treedata, cc1->optimalleaforder); this->dendro1->createDataForDendogram(); this->dendro1->showGraph(); for (int i = 0; i < this->data->GetNumberOfRows(); i++) { delete datas[i]; } delete datas; } void SampleEditor::featuredendrogram() { this->dendro2->setModels(data,selection2); if(cc1) cc1->Transpose(); else { double** datas; vtkVariant temp; datas = new double*[this->data->GetNumberOfRows()]; std::cout<<this->data->GetNumberOfRows()<<endl; std::cout<<this->data->GetNumberOfColumns()<<endl; for (int i = 0; i < this->data->GetNumberOfRows(); i++) { datas[i] = new double[this->data->GetNumberOfColumns() - 1 + 2]; } for(int i = 0; i < this->data->GetNumberOfRows(); i++) { for(int j = 1; j < this->data->GetNumberOfColumns(); j++) { temp = this->data->GetValue(i, j); datas[i][j-1] = temp.ToDouble(); } } cc1 = new clusclus(datas, (int)this->data->GetNumberOfRows(), (int)this->data->GetNumberOfColumns() - 1); cc1->Transpose(); for (int i = 0; i < this->data->GetNumberOfRows(); i++) { delete datas[i]; } delete datas; } cc2 = new clusclus(cc1->transposefeatures,cc1->num_features, cc1->num_samples); cc2->RunClusClus(); cc2->WriteClusteringOutputToFile("mergers2.txt","features2.txt","progress2.txt", "members2.txt", "gap2.txt", "treedata2.txt", "Optimalleaforder2.txt"); this->dendro2->setTreeData(cc2->num_samples, cc2->treedata, cc2->optimalleaforder); this->dendro2->createDataForDendogram(); this->dendro2->showGraph(); //delete cc1; //delete cc2; } void SampleEditor::showheatmap() { if( this->data->GetNumberOfRows() <= 0) { return; } vtkSmartPointer<vtkTable> featureTable; featureTable = this->data; featureTable->RemoveColumnByName("Trace File"); featureTable->RemoveColumnByName("Soma X Pos"); featureTable->RemoveColumnByName("Soma Y Pos"); featureTable->RemoveColumnByName("Soma Z Pos"); featureTable->RemoveColumnByName("Distance to Device"); this->heatmap->setModels(featureTable,selection,selection2); this->heatmap->runClus(); this->heatmap->showGraph(); } void SampleEditor::biclusheatmap() { if( this->data->GetNumberOfRows() <= 0) { return; } vtkSmartPointer<vtkTable> featureTable; featureTable = this->data; featureTable->RemoveColumnByName("Trace File"); featureTable->RemoveColumnByName("Soma X Pos"); featureTable->RemoveColumnByName("Soma Y Pos"); featureTable->RemoveColumnByName("Soma Z Pos"); featureTable->RemoveColumnByName("Distance to Device"); std::vector<std::vector<double > > points; points.resize(this->data->GetNumberOfRows()); for(int i = 0; i < this->data->GetNumberOfRows(); i++) for(int j = 1; j < this->data->GetNumberOfColumns(); j++) points[i].push_back(featureTable->GetValue(i,j).ToDouble()); Bicluster* bicluster = new Bicluster(); bicluster->setDataToBicluster(points); bicluster->biclustering(); bicluster->WriteFile("order1.txt", "order2.txt"); std::cout<<"begin render heatmap...."<<std::endl; this->biheatmap->setModels(featureTable, selection); this->biheatmap->setDataForHeatmap(bicluster->order1, bicluster->order2); this->biheatmap->setDataForTree1(bicluster->levels1); this->biheatmap->setDataForTree2(bicluster->levels2); this->biheatmap->showHeatmap(); this->biheatmap->showTree1(); this->biheatmap->showTree2(); std::cout<<"Done render heatmap...."<<std::endl; delete bicluster; } void SampleEditor::SpectralCluserting() { if( this->data->GetNumberOfRows() <= 0) { return; } vtkSmartPointer<vtkTable> featureTable; featureTable = this->data; featureTable->RemoveColumnByName("Trace File"); featureTable->RemoveColumnByName("Soma X Pos"); featureTable->RemoveColumnByName("Soma Y Pos"); featureTable->RemoveColumnByName("Soma Z Pos"); featureTable->RemoveColumnByName("Distance to Device"); std::vector<std::vector<double > > points; points.resize(this->data->GetNumberOfRows()); for(int i = 0; i < this->data->GetNumberOfRows(); i++) for(int j = 1; j < this->data->GetNumberOfColumns(); j++) points[i].push_back(featureTable->GetValue(i,j).ToDouble()); Bicluster* bicluster = new Bicluster(); bicluster->setDataToBicluster(points); std::cout<<"begin bi-spectral clustering...."<<std::endl; bicluster->bispectralclustering(); std::cout<<"Done bi-spectral clustering...."<<std::endl; bicluster->WriteFile("order1.txt", "order2.txt"); std::cout<<"begin render heatmap...."<<std::endl; this->biheatmap->setModels(featureTable, selection); this->biheatmap->setDataForHeatmap(bicluster->order1, bicluster->order2); this->biheatmap->setDataForTree1(bicluster->levels1); this->biheatmap->setDataForTree2(bicluster->levels2); this->biheatmap->showHeatmap(); this->biheatmap->showTree1(); this->biheatmap->showTree2(); std::cout<<"Done render heatmap...."<<std::endl; delete bicluster; } void SampleEditor::CreateClusterSelection() { std::set<long int> curSel = this->selection->getSelections(); std::set<long int>::iterator iter = curSel.begin(); std::set< vtkIdType > Selection; for (; iter != curSel.end(); iter++) { vtkIdType id = (vtkIdType) (*iter); Selection.insert(id); } vtkIdType clusterId = this->ClusterSelections->AddCluster(Selection); //std::cout << "Cluster added: " << clusterId << " num Selections: " << this->ClusterSelections->ClusterSelectionSize(clusterId) << std::endl; } void SampleEditor::DumpClusterSelections() { // vtkIdType numClus = this->ClusterSelections->NumberOfClusters(); std::cout << " Number of clusters: " << numClus << " Listed: " << std::endl; std::set< vtkIdType > clusterIDs = this->ClusterSelections->GetClusterIDs(); std::set< vtkIdType >::iterator iter = clusterIDs.begin(); for (; iter != clusterIDs.end(); iter++) { std::cout << "\nTable for Cluster: " << *iter << std::endl; this->ClusterSelections->GetTableOfSelectedFromCluster(*iter)->Dump(16); } std::cout << "\nTable of all Clusters " << std::endl; this->ClusterSelections->GetTableOfAllSelected()->Dump(16); }
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "PhysXCooking.h" #include "Serialization/MemoryWriter.h" #include "Modules/ModuleManager.h" #include "Interfaces/Interface_CollisionDataProvider.h" #include "IPhysXCookingModule.h" #include "PhysicsPublic.h" #include "PhysicsEngine/PhysXSupport.h" static_assert(WITH_PHYSX, "No point in compiling PhysX cooker, if we don't have PhysX."); static FName NAME_PhysXGeneric(TEXT("PhysXGeneric")); static FName NAME_PhysXPC(TEXT("PhysXPC")); bool GetPhysXCooking(FName InFormatName, PxPlatform::Enum& OutFormat) { if ((InFormatName == NAME_PhysXPC) || (InFormatName == NAME_PhysXGeneric)) { OutFormat = PxPlatform::ePC; } else { return false; } return true; } /** * Validates PhysX format name. */ bool CheckPhysXCooking(FName InFormatName) { PxPlatform::Enum Format = PxPlatform::ePC; return GetPhysXCooking(InFormatName, Format); } void UseBVH34IfSupported(FName Format, PxCookingParams& Params) { if((Format == NAME_PhysXPC)) { //TODO: can turn this on once bug is fixed with character movement //Params.midphaseDesc = PxMeshMidPhase::eBVH34; } } FPhysXCooking::FPhysXCooking() { #if WITH_PHYSX PxTolerancesScale PScale; PScale.length = CVarToleranceScaleLength.GetValueOnAnyThread(); PScale.speed = CVarToleranceScaleSpeed.GetValueOnAnyThread(); PxCookingParams PCookingParams(PScale); PCookingParams.meshWeldTolerance = 0.1f; // Weld to 1mm precision PCookingParams.meshPreprocessParams = PxMeshPreprocessingFlags(PxMeshPreprocessingFlag::eWELD_VERTICES); // Force any cooking in PhysX or APEX to use older incremental hull method // This is because the new 'quick hull' method can generate degenerate geometry in some cases (very thin meshes etc.) //PCookingParams.convexMeshCookingType = PxConvexMeshCookingType::eINFLATION_INCREMENTAL_HULL; PCookingParams.targetPlatform = PxPlatform::ePC; PCookingParams.midphaseDesc = PxMeshMidPhase::eBVH33; //PCookingParams.meshCookingHint = PxMeshCookingHint::eCOOKING_PERFORMANCE; //PCookingParams.meshSizePerformanceTradeOff = 0.0f; PhysXCooking = PxCreateCooking(PX_PHYSICS_VERSION, *GPhysXFoundation, PCookingParams); #endif } physx::PxCooking* FPhysXCooking::GetCooking() const { return PhysXCooking; } bool FPhysXCooking::AllowParallelBuild() const { return true; } uint16 FPhysXCooking::GetVersion(FName Format) const { check(CheckPhysXCooking(Format)); return UE_PHYSX_PC_VER; } void FPhysXCooking::GetSupportedFormats(TArray<FName>& OutFormats) const { OutFormats.Add(NAME_PhysXPC); OutFormats.Add(NAME_PhysXGeneric); } /** Utility wrapper for a uint8 TArray for saving into PhysX. */ class FPhysXOutputStream : public PxOutputStream { public: /** Raw byte data */ TArray<uint8> *Data; FPhysXOutputStream() : Data(NULL) {} FPhysXOutputStream(TArray<uint8> *InData) : Data(InData) {} PxU32 write(const void* Src, PxU32 Count) { check(Data); if (Count) //PhysX serializer can pass us 0 bytes to write { check(Src); int32 CurrentNum = (*Data).Num(); (*Data).AddUninitialized(Count); FMemory::Memcpy(&(*Data)[CurrentNum], Src, Count); } return Count; } }; template <bool bUseBuffer> EPhysXCookingResult FPhysXCooking::CookConvexImp(FName Format, EPhysXMeshCookFlags CookFlags, const TArray<FVector>& SrcBuffer, TArray<uint8>& OutBuffer, PxConvexMesh*& OutConvexMesh) const { EPhysXCookingResult CookResult = EPhysXCookingResult::Failed; OutConvexMesh = nullptr; #if WITH_PHYSX PxPlatform::Enum PhysXFormat = PxPlatform::ePC; bool bIsPhysXCookingValid = GetPhysXCooking(Format, PhysXFormat); check(bIsPhysXCookingValid); PxConvexMeshDesc PConvexMeshDesc; PConvexMeshDesc.points.data = SrcBuffer.GetData(); PConvexMeshDesc.points.count = SrcBuffer.Num(); PConvexMeshDesc.points.stride = sizeof(FVector); PConvexMeshDesc.flags = PxConvexFlag::eCOMPUTE_CONVEX | PxConvexFlag::eSHIFT_VERTICES; // Set up cooking const PxCookingParams CurrentParams = PhysXCooking->getParams(); PxCookingParams NewParams = CurrentParams; NewParams.targetPlatform = PhysXFormat; if (!!(CookFlags & EPhysXMeshCookFlags::SuppressFaceRemapTable)) { NewParams.suppressTriangleMeshRemapTable = true; } if (!!(CookFlags & EPhysXMeshCookFlags::DeformableMesh)) { // Meshes which can be deformed need different cooking parameters to inhibit vertex welding and add an extra skin around the collision mesh for safety. // We need to set the meshWeldTolerance to zero, even when disabling 'clean mesh' as PhysX will attempt to perform mesh cleaning anyway according to this meshWeldTolerance // if the convex hull is not well formed. // Set the skin thickness as a proportion of the overall size of the mesh as PhysX's internal tolerances also use the overall size to calculate the epsilon used. const FBox Bounds(SrcBuffer); const float MaxExtent = (Bounds.Max - Bounds.Min).Size(); NewParams.meshPreprocessParams = PxMeshPreprocessingFlags(PxMeshPreprocessingFlag::eDISABLE_CLEAN_MESH); NewParams.meshWeldTolerance = 0.0f; } else { //For meshes that don't deform we can try to use BVH34 UseBVH34IfSupported(Format, NewParams); } // Do we want to do a 'fast' cook on this mesh, may slow down collision performance at runtime if (!!(CookFlags & EPhysXMeshCookFlags::FastCook)) { NewParams.meshCookingHint = PxMeshCookingHint::eCOOKING_PERFORMANCE; } PhysXCooking->setParams(NewParams); if (bUseBuffer) { // Cook the convex mesh to a temp buffer TArray<uint8> CookedMeshBuffer; FPhysXOutputStream Buffer(&CookedMeshBuffer); if (PhysXCooking->cookConvexMesh(PConvexMeshDesc, Buffer)) { CookResult = EPhysXCookingResult::Succeeded; } else { if (!(PConvexMeshDesc.flags & PxConvexFlag::eINFLATE_CONVEX)) { // We failed to cook without inflating convex. Let's try again with inflation //This is not ideal since it makes the collision less accurate. It's needed if given verts are extremely close. PConvexMeshDesc.flags |= PxConvexFlag::eINFLATE_CONVEX; if (PhysXCooking->cookConvexMesh(PConvexMeshDesc, Buffer)) { CookResult = EPhysXCookingResult::SucceededWithInflation; } } } if (CookedMeshBuffer.Num() == 0) { CookResult = EPhysXCookingResult::Failed; } if (CookResult != EPhysXCookingResult::Failed) { // Append the cooked data into cooked buffer OutBuffer.Append(CookedMeshBuffer); } } else { OutConvexMesh = PhysXCooking->createConvexMesh(PConvexMeshDesc, GPhysXSDK->getPhysicsInsertionCallback()); //NOTE: getPhysicsInsertionCallback probably not thread safe! if (OutConvexMesh) { CookResult = EPhysXCookingResult::Succeeded; } else { if (!(PConvexMeshDesc.flags & PxConvexFlag::eINFLATE_CONVEX)) { // We failed to cook without inflating convex. Let's try again with inflation //This is not ideal since it makes the collision less accurate. It's needed if given verts are extremely close. PConvexMeshDesc.flags |= PxConvexFlag::eINFLATE_CONVEX; OutConvexMesh = PhysXCooking->createConvexMesh(PConvexMeshDesc, GPhysXSDK->getPhysicsInsertionCallback()); //NOTE: getPhysicsInsertionCallback probably not thread safe! if (OutConvexMesh) { CookResult = EPhysXCookingResult::SucceededWithInflation; } } } if (!OutConvexMesh) { CookResult = EPhysXCookingResult::Failed; } } // Return default cooking params to normal PhysXCooking->setParams(CurrentParams); #endif // WITH_PHYSX return CookResult; } EPhysXCookingResult FPhysXCooking::CookConvex(FName Format, EPhysXMeshCookFlags CookFlags, const TArray<FVector>& SrcBuffer, TArray<uint8>& OutBuffer) const { PxConvexMesh* JunkConvexMesh; return CookConvexImp</*bUseBuffer=*/true>(Format, CookFlags, SrcBuffer, OutBuffer, JunkConvexMesh); } EPhysXCookingResult FPhysXCooking::CreateConvex(FName Format, EPhysXMeshCookFlags CookFlags, const TArray<FVector>& SrcBuffer, physx::PxConvexMesh*& OutConvexMesh) const { TArray<uint8> JunkBuffer; return CookConvexImp</*bUseBuffer=*/false>(Format, CookFlags, SrcBuffer, JunkBuffer, OutConvexMesh); } template<bool bUseBuffer> bool FPhysXCooking::CookTriMeshImp(FName Format, EPhysXMeshCookFlags CookFlags, const TArray<FVector>& SrcVertices, const TArray<FTriIndices>& SrcIndices, const TArray<uint16>& SrcMaterialIndices, const bool FlipNormals, TArray<uint8>& OutBuffer, PxTriangleMesh*& OutTriangleMesh) const { OutTriangleMesh = nullptr; #if WITH_PHYSX PxPlatform::Enum PhysXFormat = PxPlatform::ePC; bool bIsPhysXCookingValid = GetPhysXCooking(Format, PhysXFormat); check(bIsPhysXCookingValid); PxTriangleMeshDesc PTriMeshDesc; PTriMeshDesc.points.data = SrcVertices.GetData(); PTriMeshDesc.points.count = SrcVertices.Num(); PTriMeshDesc.points.stride = sizeof(FVector); PTriMeshDesc.triangles.data = SrcIndices.GetData(); PTriMeshDesc.triangles.count = SrcIndices.Num(); PTriMeshDesc.triangles.stride = sizeof(FTriIndices); PTriMeshDesc.materialIndices.data = SrcMaterialIndices.GetData(); PTriMeshDesc.materialIndices.stride = sizeof(PxMaterialTableIndex); PTriMeshDesc.flags = FlipNormals ? PxMeshFlag::eFLIPNORMALS : (PxMeshFlags)0; // Set up cooking const PxCookingParams CurrentParams = PhysXCooking->getParams(); PxCookingParams NewParams = CurrentParams; NewParams.targetPlatform = PhysXFormat; if (!!(CookFlags & EPhysXMeshCookFlags::SuppressFaceRemapTable)) { NewParams.suppressTriangleMeshRemapTable = true; } if (!!(CookFlags & EPhysXMeshCookFlags::DeformableMesh)) { // In the case of a deformable mesh, we have to change the cook params NewParams.meshPreprocessParams = PxMeshPreprocessingFlag::eDISABLE_CLEAN_MESH; // The default BVH34 midphase does not support refit NewParams.midphaseDesc = PxMeshMidPhase::eBVH33; } else { if (PhysXCooking->validateTriangleMesh(PTriMeshDesc) == false) { NewParams.meshPreprocessParams = PxMeshPreprocessingFlag::eDISABLE_CLEAN_MESH; } //For non deformable meshes we can try to use BVH34 UseBVH34IfSupported(Format, NewParams); } PhysXCooking->setParams(NewParams); bool bResult = false; // Cook TriMesh Data if (bUseBuffer) { FPhysXOutputStream Buffer(&OutBuffer); bResult = PhysXCooking->cookTriangleMesh(PTriMeshDesc, Buffer); } else { FPhysXOutputStream Buffer(&OutBuffer); OutTriangleMesh = PhysXCooking->createTriangleMesh(PTriMeshDesc, GPhysXSDK->getPhysicsInsertionCallback()); //NOTE: getPhysicsInsertionCallback probably not thread safe! bResult = !!OutTriangleMesh; } // Restore cooking params PhysXCooking->setParams(CurrentParams); return bResult; #else return false; #endif // WITH_PHYSX } bool FPhysXCooking::CookTriMesh(FName Format, EPhysXMeshCookFlags CookFlags, const TArray<FVector>& SrcVertices, const TArray<FTriIndices>& SrcIndices, const TArray<uint16>& SrcMaterialIndices, const bool FlipNormals, TArray<uint8>& OutBuffer) const { PxTriangleMesh* JunkTriangleMesh = nullptr; return CookTriMeshImp</*bUseBuffer=*/true>(Format, CookFlags, SrcVertices, SrcIndices, SrcMaterialIndices, FlipNormals, OutBuffer, JunkTriangleMesh); } bool FPhysXCooking::CreateTriMesh(FName Format, EPhysXMeshCookFlags CookFlags, const TArray<FVector>& SrcVertices, const TArray<FTriIndices>& SrcIndices, const TArray<uint16>& SrcMaterialIndices, const bool FlipNormals, physx::PxTriangleMesh*& OutTriangleMesh) const { TArray<uint8> JunkBuffer; return CookTriMeshImp</*bUseBuffer=*/false>(Format, CookFlags, SrcVertices, SrcIndices, SrcMaterialIndices, FlipNormals, JunkBuffer, OutTriangleMesh); } template <bool bUseBuffer> bool FPhysXCooking::CookHeightFieldImp(FName Format, FIntPoint HFSize, const void* Samples, uint32 SamplesStride, TArray<uint8>& OutBuffer, PxHeightField*& OutHeightField) const { OutHeightField = nullptr; #if WITH_PHYSX PxPlatform::Enum PhysXFormat = PxPlatform::ePC; bool bIsPhysXCookingValid = GetPhysXCooking(Format, PhysXFormat); check(bIsPhysXCookingValid); PxHeightFieldDesc HFDesc; HFDesc.format = PxHeightFieldFormat::eS16_TM; HFDesc.nbColumns = HFSize.X; HFDesc.nbRows = HFSize.Y; HFDesc.samples.data = Samples; HFDesc.samples.stride = SamplesStride; HFDesc.flags = PxHeightFieldFlag::eNO_BOUNDARY_EDGES; // Set up cooking const PxCookingParams& Params = PhysXCooking->getParams(); PxCookingParams NewParams = Params; NewParams.targetPlatform = PhysXFormat; UseBVH34IfSupported(Format, NewParams); PhysXCooking->setParams(NewParams); // Cook to a temp buffer TArray<uint8> CookedBuffer; FPhysXOutputStream Buffer(&CookedBuffer); if (bUseBuffer) { if (PhysXCooking->cookHeightField(HFDesc, Buffer) && CookedBuffer.Num() > 0) { // Append the cooked data into cooked buffer OutBuffer.Append(CookedBuffer); return true; } } else { OutHeightField = PhysXCooking->createHeightField(HFDesc, GPhysXSDK->getPhysicsInsertionCallback()); //NOTE: getPhysicsInsertionCallback probably not thread safe! if (OutHeightField) { return true; } } return false; #else return false; #endif // WITH_PHYSX } bool FPhysXCooking::CookHeightField(FName Format, FIntPoint HFSize, const void* Samples, uint32 SamplesStride, TArray<uint8>& OutBuffer) const { physx::PxHeightField* JunkHeightField = nullptr; return CookHeightFieldImp</*bUseBuffer=*/true>(Format, HFSize, Samples, SamplesStride, OutBuffer, JunkHeightField); } bool FPhysXCooking::CreateHeightField(FName Format, FIntPoint HFSize, const void* Samples, uint32 SamplesStride, physx::PxHeightField*& OutHeightField) const { TArray<uint8> JunkBuffer; return CookHeightFieldImp</*bUseBuffer=*/false>(Format, HFSize, Samples, SamplesStride, JunkBuffer, OutHeightField); } bool FPhysXCooking::SerializeActors(FName Format, const TArray<FBodyInstance*>& Bodies, const TArray<UBodySetup*>& BodySetups, const TArray<UPhysicalMaterial*>& PhysicalMaterials, TArray<uint8>& OutBuffer) const { #if WITH_PHYSX PxSerializationRegistry* PRegistry = PxSerialization::createSerializationRegistry(*GPhysXSDK); PxCollection* PCollection = PxCreateCollection(); PxBase* PLastObject = nullptr; for (FBodyInstance* BodyInstance : Bodies) { if (BodyInstance->RigidActorSync) { PCollection->add(*BodyInstance->RigidActorSync, BodyInstance->RigidActorSyncId); PLastObject = BodyInstance->RigidActorSync; } if (BodyInstance->RigidActorAsync) { PCollection->add(*BodyInstance->RigidActorAsync, BodyInstance->RigidActorAsyncId); PLastObject = BodyInstance->RigidActorAsync; } } PxSerialization::createSerialObjectIds(*PCollection, PxSerialObjectId(1)); //we get physx to assign an id for each actor //Note that rigid bodies may have assigned ids. It's important to let them go first because we rely on that id for deserialization. //One this is done we must find out the next available ID, and use that for naming the shared resources. We have to save this for deserialization uint64 BaseId = PLastObject ? (PCollection->getId(*PLastObject) + 1) : 1; PxCollection* PExceptFor = MakePhysXCollection(PhysicalMaterials, BodySetups, BaseId); for (FBodyInstance* BodyInstance : Bodies) //and then we mark that id back into the bodyinstance so we can pair the two later { if (BodyInstance->RigidActorSync) { BodyInstance->RigidActorSyncId = PCollection->getId(*BodyInstance->RigidActorSync); } if (BodyInstance->RigidActorAsync) { BodyInstance->RigidActorAsyncId = PCollection->getId(*BodyInstance->RigidActorAsync); } } //We must store the BaseId for shared resources. FMemoryWriter Ar(OutBuffer); uint8 bIsLittleEndian = PLATFORM_LITTLE_ENDIAN; //TODO: We should pass the target platform into this function and write it. Then swap the endian on the writer so the reader doesn't have to do it at runtime Ar << bIsLittleEndian; Ar << BaseId; //Note that PhysX expects the binary data to be 128-byte aligned. Because of this we must pad int32 BytesToPad = PHYSX_SERIALIZATION_ALIGNMENT - (Ar.Tell() % PHYSX_SERIALIZATION_ALIGNMENT); OutBuffer.AddZeroed(BytesToPad); FPhysXOutputStream Buffer(&OutBuffer); PxSerialization::complete(*PCollection, *PRegistry, PExceptFor); PxSerialization::serializeCollectionToBinary(Buffer, *PCollection, *PRegistry, PExceptFor); #if PHYSX_MEMORY_VALIDATION GPhysXAllocator->ValidateHeaders(); #endif PCollection->release(); PExceptFor->release(); PRegistry->release(); #if PHYSX_MEMORY_VALIDATION GPhysXAllocator->ValidateHeaders(); #endif return true; #endif return false; } FPhysXPlatformModule::FPhysXPlatformModule() { PhysXCookerTLS = FPlatformTLS::AllocTlsSlot(); } FPhysXPlatformModule::~FPhysXPlatformModule() { //NOTE: we don't bother cleaning up TLS, this is only closed during real shutdown } IPhysXCooking* FPhysXPlatformModule::GetPhysXCooking() { FPhysXCooking* PhysXCooking = (FPhysXCooking*)FPlatformTLS::GetTlsValue(PhysXCookerTLS); if (!PhysXCooking) { InitPhysXCooking(); PhysXCooking = new FPhysXCooking(); FPlatformTLS::SetTlsValue(PhysXCookerTLS, PhysXCooking); } return PhysXCooking; } physx::PxCooking* FPhysXPlatformModule::CreatePhysXCooker(uint32 version, physx::PxFoundation& foundation, const physx::PxCookingParams& params) { #if WITH_PHYSX return PxCreateCooking(PX_PHYSICS_VERSION, foundation, params); #endif return nullptr; } void FPhysXPlatformModule::Terminate() { ShutdownPhysXCooking(); } /** * Load the required modules for PhysX */ void FPhysXPlatformModule::InitPhysXCooking() { if (IsInGameThread()) { // Make sure PhysX libs are loaded PhysDLLHelper::LoadPhysXModules(/*bLoadCookingModule=*/true); } } void FPhysXPlatformModule::ShutdownPhysXCooking() { #if WITH_PHYSX if (PxCooking* PhysXCooking = GetPhysXCooking()->GetCooking()) { PhysXCooking->release(); PhysXCooking = nullptr; } //TODO: is it worth killing all the TLS objects? #endif } IMPLEMENT_MODULE(FPhysXPlatformModule, PhysXCooking);
; A133140: a(0) = 2, a(n) = 2^n + 2 for n>=1. ; 2,4,6,10,18,34,66,130,258,514,1026,2050,4098,8194,16386,32770,65538,131074,262146,524290,1048578,2097154,4194306,8388610,16777218,33554434,67108866,134217730,268435458,536870914,1073741826,2147483650,4294967298 mov $1,2 pow $1,$0 div $1,2 mul $1,2 add $1,2 mov $0,$1
; gp_keydraw.asm ; Draws while you press a key (by George Phillips, I added "equ"s) ; ; zmac gp_keydraw.asm ; trs80gp zout/gp_keydraw.bds screen equ $3c00 block equ $bf ; This is 1011 1111 in binary (a graphic block) org $5200 start: di ; no blinking cursor ld c,block again: ld hl,screen wait: ld a,($38ff) ; spin if no keys pressed or a jr z,wait ld (hl),c inc hl ld b,30 delay: djnz delay ; start with this removed bit 6,h jr z,wait ; keep going until HL == $4000 ld a,c xor $3f ; flip between 191 and 128 ld c,a jr again ; go back to top of screen end start
; void *w_array_front(w_array_t *a) SECTION code_adt_w_array PUBLIC w_array_front w_array_front: INCLUDE "adt/w_array/z80/asm_w_array_front.asm"
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r15 push %r8 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x12b79, %r8 clflush (%r8) nop nop add %rbp, %rbp movb $0x61, (%r8) nop xor $29624, %r8 lea addresses_D_ht+0x12439, %r14 nop nop nop xor %rdx, %rdx movb (%r14), %r15b sub %rdx, %rdx lea addresses_D_ht+0x390f, %rsi lea addresses_UC_ht+0xb759, %rdi nop nop nop lfence mov $79, %rcx rep movsw nop nop nop nop nop cmp $19835, %rbp lea addresses_WC_ht+0x14f79, %rdx nop nop nop nop xor $22410, %r14 mov (%rdx), %r8d nop nop xor $41850, %r8 lea addresses_WT_ht+0x1cf79, %rsi lea addresses_A_ht+0x81a9, %rdi nop sub $29087, %r8 mov $36, %rcx rep movsw nop nop nop nop and $22974, %r14 lea addresses_WT_ht+0xc139, %rsi lea addresses_WC_ht+0x1b79, %rdi nop nop nop nop xor $493, %r14 mov $62, %rcx rep movsw nop nop cmp %rdi, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r8 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %rax push %rbp push %rbx push %rdi push %rsi // Load lea addresses_PSE+0x1b799, %rdi nop nop nop nop nop inc %r13 movb (%rdi), %bl nop add %rsi, %rsi // Store lea addresses_RW+0xa979, %rbx nop nop nop xor %r10, %r10 movl $0x51525354, (%rbx) nop nop nop nop nop inc %r10 // Store mov $0x8d9, %rbx xor %rax, %rax mov $0x5152535455565758, %rsi movq %rsi, (%rbx) nop nop nop xor $30841, %rbx // Faulty Load lea addresses_WT+0x4379, %rbp clflush (%rbp) nop nop nop nop nop sub %rbx, %rbx movups (%rbp), %xmm4 vpextrq $0, %xmm4, %rsi lea oracles, %rdi and $0xff, %rsi shlq $12, %rsi mov (%rdi,%rsi,1), %rsi pop %rsi pop %rdi pop %rbx pop %rbp pop %rax pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 6, 'type': 'addresses_RW', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_P', 'AVXalign': False, 'size': 8}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'same': True, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 4}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}} {'src': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
; A015910: a(n) = 2^n mod n. ; 0,0,2,0,2,4,2,0,8,4,2,4,2,4,8,0,2,10,2,16,8,4,2,16,7,4,26,16,2,4,2,0,8,4,18,28,2,4,8,16,2,22,2,16,17,4,2,16,30,24,8,16,2,28,43,32,8,4,2,16,2,4,8,0,32,64,2,16,8,44,2,64,2,4,68,16,18,64,2,16,80,4,2,64,32,4,8,80,2,64,37,16,8,4,13,64,2,18,17,76,2,64,2,48,92,4,2,28,2,34,8,16,2,64,78,16,44,4,60,16,112,4,8,16,57,64,2,0,8,114,2,4,128,4,53,120,2,64,2,116,8,4,85,64,32,4,50,16,2,124,2,104,53,16,63,40,2,4,8,96,151,82,2,16,32,4,2,64,80,4,170,16,2,64,93,64,8,4,2,136,2,4,8,72,32,64,161,16,134,74,2,64,2,4,8,128,2,190,2,176,8,4,186,16,32,4,98,16,72,64,2,16,8,4,118,136,128,4,8,56,32,64,2,32,107,4,2,220,2,104,134,24,2,64,173,16,8,30,2,16,2,202,242,16,67,64,193,8,8,124 add $0,1 mov $1,1 mov $2,$0 lpb $0,1 sub $0,1 mul $1,2 mod $1,$2 lpe
; A074331: a(n) = Fibonacci(n+1) - (1 + (-1)^n)/2. ; 0,1,1,3,4,8,12,21,33,55,88,144,232,377,609,987,1596,2584,4180,6765,10945,17711,28656,46368,75024,121393,196417,317811,514228,832040,1346268,2178309,3524577,5702887,9227464,14930352,24157816,39088169 max $1,$0 seq $0,71 ; a(n) = Fibonacci(n) - 1. mod $1,2 add $1,$0 mov $0,$1
; A123162: Triangle read by rows: T(n,k) = binomial(2*n - 1, 2*k - 1) for 0 < k <= n and T(n,0) = 1. ; Submitted by Christian Krause ; 1,1,1,1,3,1,1,5,10,1,1,7,35,21,1,1,9,84,126,36,1,1,11,165,462,330,55,1,1,13,286,1287,1716,715,78,1,1,15,455,3003,6435,5005,1365,105,1,1,17,680,6188,19448,24310,12376,2380,136,1,1,19,969,11628,50388,92378,75582,27132,3876,171,1,1,21,1330,20349,116280,293930,352716,203490,54264,5985,210,1,1,23,1771,33649,245157,817190,1352078,1144066,490314,100947,8855,253,1,1,25,2300,53130,480700,2042975,4457400,5200300,3268760 lpb $0 add $1,2 sub $2,1 add $0,$2 lpe mul $0,2 trn $0,1 sub $1,1 bin $1,$0 mov $0,$1
; item_attributes struct members (see data/items/attributes.asm) const_def const ITEMATTR_PRICE const ITEMATTR_PRICE_HI const ITEMATTR_EFFECT const ITEMATTR_PARAM const ITEMATTR_PERMISSIONS const ITEMATTR_POCKET const ITEMATTR_HELP ITEMATTR_STRUCT_LENGTH EQU const_value ; item types const_def 1 const ITEM ; 1 const KEY_ITEM ; 2 const BALL ; 3 const TM_HM ; 4 const BERRIES ; 5 const MEDICINE ; 6 ; item menu types ; UseItem.dw indexes (see engine/items/pack.asm) ; UseRegisteredItem.SwitchTo indexes (see engine/overworld/select_menu.asm) ITEMMENU_NOUSE EQU 0 ITEMMENU_CURRENT EQU 4 ITEMMENU_PARTY EQU 5 ITEMMENU_CLOSE EQU 6 ; item actions CANT_SELECT_F EQU 6 CANT_TOSS_F EQU 7 NO_LIMITS EQU 0 CANT_SELECT EQU 1 << CANT_SELECT_F CANT_TOSS EQU 1 << CANT_TOSS_F ; pack pockets const_def const ITEM_POCKET ; 0 const MEDICINE_POCKET ; 1 const BALL_POCKET ; 2 const BERRY_POCKET ; 3 const KEY_ITEM_POCKET ; 4 const TM_HM_POCKET ; 5 NUM_POCKETS EQU const_value MAX_ITEMS EQU 130 MAX_BALLS EQU 21 MAX_KEY_ITEMS EQU 25 MAX_PC_ITEMS EQU 16 MAX_BERRIES EQU 17 MAX_MEDICINE EQU 35 ; mail MAIL_LINE_LENGTH EQU $10 MAIL_MSG_LENGTH EQU $20 MAILBOX_CAPACITY EQU 10 MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct ; held item effects const_def const HELD_NONE const HELD_BERRY const HELD_2 const HELD_LEFTOVERS const HELD_4 const HELD_5 const HELD_RESTORE_PP const HELD_7 const HELD_CLEANSE_TAG const HELD_BERSERK_GENE const_def 10 const HELD_HEAL_POISON const HELD_HEAL_FREEZE const HELD_HEAL_BURN const HELD_HEAL_SLEEP const HELD_HEAL_PARALYZE const HELD_HEAL_STATUS const HELD_HEAL_CONFUSION const_def 20 const HELD_PREVENT_POISON const HELD_PREVENT_BURN const HELD_PREVENT_FREEZE const HELD_PREVENT_SLEEP const HELD_PREVENT_PARALYZE const HELD_PREVENT_CONFUSE const_def 30 const HELD_30 const HELD_ATTACK_UP const HELD_DEFENSE_UP const HELD_SPEED_UP const HELD_SP_ATTACK_UP const HELD_SP_DEFENSE_UP const HELD_ACCURACY_UP const HELD_EVASION_UP const HELD_38 const_def 40 const HELD_40 const HELD_41 const HELD_METAL_POWDER const_def 50 const HELD_NORMAL_BOOST const HELD_FIGHTING_BOOST const HELD_FLYING_BOOST const HELD_POISON_BOOST const HELD_GROUND_BOOST const HELD_ROCK_BOOST const HELD_BUG_BOOST const HELD_GHOST_BOOST const HELD_FIRE_BOOST const HELD_WATER_BOOST const HELD_GRASS_BOOST const HELD_ELECTRIC_BOOST const HELD_PSYCHIC_BOOST const HELD_ICE_BOOST const HELD_DRAGON_BOOST const HELD_DARK_BOOST const HELD_STEEL_BOOST const_def 70 const HELD_CATCH_CHANCE const HELD_71 const HELD_ESCAPE const HELD_CRITICAL_UP const HELD_QUICK_CLAW const HELD_FLINCH const HELD_AMULET_COIN const HELD_BRIGHTPOWDER const HELD_78 const HELD_FOCUS_BAND const_def 80 const HELD_GRISEOUS_ORB const HELD_ADAMANT_ORB const HELD_LUSTROUS_ORB
// Copyright(c) 2019 - 2020, #Momo // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met : // // 1. Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and /or other materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "VRCameraController.h" #include "Core/MxObject/MxObject.h" #include "Core/Application/Rendering.h" #include "Core/Application/Event.h" #include "Core/Runtime/Reflection.h" namespace MxEngine { void VRCameraController::OnUpdate(float timeDelta) { auto camera = MxObject::GetByComponent(*this).GetComponent<CameraController>(); if (!this->LeftEye.IsValid() || !this->RightEye.IsValid() || !camera.IsValid()) return; this->UpdateEyes(this->LeftEye, this->RightEye); camera->ToggleRendering(false); auto leftTexture = this->LeftEye->GetRenderTexture(); auto rightTexture = this->RightEye->GetRenderTexture(); auto resultTexture = camera->GetRenderTexture(); size_t widthTotal = leftTexture->GetWidth() + rightTexture->GetWidth(); size_t heightTotal = leftTexture->GetHeight() + rightTexture->GetHeight(); if (resultTexture->GetWidth() != widthTotal || resultTexture->GetHeight() != heightTotal) { resultTexture->Load(nullptr, (int)widthTotal, (int)heightTotal, 3, false, resultTexture->GetFormat()); resultTexture->SetInternalEngineTag(MXENGINE_MAKE_INTERNAL_TAG("vr camera out")); } this->Render(resultTexture, leftTexture, rightTexture); } void VRCameraController::UpdateEyes(CameraController::Handle& cameraL, CameraController::Handle& cameraR) { auto& object = MxObject::GetByComponent(*this); auto position = object.LocalTransform.GetPosition(); auto camera = object.GetComponent<CameraController>(); auto& LEyeTransform = MxObject::GetByComponent(*cameraL).LocalTransform; auto& REyeTransform = MxObject::GetByComponent(*cameraR).LocalTransform; auto LEyeDistance = -this->EyeDistance * camera->GetRightVector(); auto REyeDistance = +this->EyeDistance * camera->GetRightVector(); LEyeTransform.SetPosition(position + LEyeDistance); REyeTransform.SetPosition(position + REyeDistance); auto LEyeDirection = this->FocusDistance * camera->GetDirection() - LEyeDistance; auto REyeDirection = this->FocusDistance * camera->GetDirection() - REyeDistance; cameraL->SetDirection(Normalize(LEyeDirection)); cameraR->SetDirection(Normalize(REyeDirection)); } void VRCameraController::Render(TextureHandle& target, const TextureHandle& leftEye, const TextureHandle& rightEye) { leftEye->Bind(0); rightEye->Bind(1); this->shaderVR->Bind(); this->shaderVR->SetUniform("leftEyeTex", 0); this->shaderVR->SetUniform("rightEyeTex", 1); Rendering::GetController().RenderToTexture(target, this->shaderVR); target->GenerateMipmaps(); } void VRCameraController::Init() { this->shaderVR = Rendering::GetController().GetEnvironment().Shaders["VRCamera"_id]; } MXENGINE_REFLECT_TYPE { rttr::registration::class_<VRCameraController>("VRCameraController") ( rttr::metadata(MetaInfo::FLAGS, MetaInfo::CLONE_COPY | MetaInfo::CLONE_INSTANCE) ) .constructor<>() .property("eye distance", &VRCameraController::EyeDistance) ( rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE), rttr::metadata(EditorInfo::EDIT_PRECISION, 0.01f) ) .property("focus distance", &VRCameraController::FocusDistance) ( rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE), rttr::metadata(EditorInfo::EDIT_PRECISION, 0.01f) ) .property("left eye", &VRCameraController::LeftEye) ( rttr::metadata(MetaInfo::FLAGS, MetaInfo::EDITABLE) ) .property("right eye", &VRCameraController::RightEye) ( rttr::metadata(MetaInfo::FLAGS, MetaInfo::EDITABLE) ) .property("eyes", &VRCameraController::LeftEye) // serialization of both eyes ( rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE), rttr::metadata(SerializeInfo::CUSTOM_SERIALIZE, SerializeExtra<VRCameraController>), rttr::metadata(SerializeInfo::CUSTOM_DESERIALIZE, DeserializeExtra<VRCameraController>) ); } }
/* Copyright (C) 2005, 2006 Plamen Neykov Copyright (C) 2007, 2008 Eric Ehlers This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email <quantlib-dev@lists.sf.net>. The license is also available online at <http://quantlib.org/license.shtml>. 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 license for more details. */ #ifndef rp_vo_group_hpp #define rp_vo_group_hpp #include <rp/valueobject.hpp> #include <string> #include <vector> #include <set> #include <boost/serialization/map.hpp> #include <boost/algorithm/string/case_conv.hpp> namespace reposit { namespace ValueObjects { class rpGroup : public reposit::ValueObject { friend class boost::serialization::access; public: rpGroup() {} rpGroup( const std::string& ObjectId, const std::vector<std::string>& ObjectIdList, bool Permanent); const std::set<std::string>& getSystemPropertyNames() const; std::vector<std::string> getPropertyNamesVector() const; reposit::property_t getSystemProperty(const std::string&) const; void setSystemProperty(const std::string& name, const reposit::property_t& value); protected: std::vector<std::string> ObjectIdList_; bool Permanent_; template<class Archive> void serialize(Archive& ar, const unsigned int) { boost::serialization::void_cast_register<rpGroup, reposit::ValueObject>(this, this); ar & boost::serialization::make_nvp("ObjectId", objectId_) & boost::serialization::make_nvp("ClassName", className_) & boost::serialization::make_nvp("ObjectIdList", ObjectIdList_) & boost::serialization::make_nvp("Permanent", Permanent_) & boost::serialization::make_nvp("UserProperties", userProperties); } }; inline const std::set<std::string> &rpGroup::getSystemPropertyNames() const { static std::set<std::string> ret; if (ret.empty()) { ret.insert("ObjectIdList"); ret.insert("Permanent"); } return ret; } inline std::vector<std::string> rpGroup::getPropertyNamesVector() const { std::vector<std::string> ret; ret.push_back("ObjectIdList"); ret.push_back("Permanent"); for (std::map<std::string, reposit::property_t>::const_iterator i = userProperties.begin(); i != userProperties.end(); ++i) ret.push_back(i->first); return ret; } inline reposit::property_t rpGroup::getSystemProperty(const std::string& name) const { std::string nameUpper = boost::algorithm::to_upper_copy(name); if(strcmp(nameUpper.c_str(), "OBJECTID")==0) return objectId_; else if(strcmp(nameUpper.c_str(), "CLASSNAME")==0) return className_; else if(strcmp(nameUpper.c_str(), "OBJECTIDLIST")==0) return ObjectIdList_; else if(strcmp(nameUpper.c_str(), "PERMANENT")==0) return Permanent_; else RP_FAIL("Error: attempt to retrieve non-existent Property: '" + name + "'"); } inline void rpGroup::setSystemProperty(const std::string& name, const reposit::property_t& value) { std::string nameUpper = boost::algorithm::to_upper_copy(name); if(strcmp(nameUpper.c_str(), "OBJECTID")==0) objectId_ = boost::get<std::string>(value); else if(strcmp(nameUpper.c_str(), "CLASSNAME")==0) className_ = boost::get<std::string>(value); else if(strcmp(nameUpper.c_str(), "OBJECTIDLIST")==0) ObjectIdList_ = reposit::vector::convert<std::string>(value, nameUpper); else if(strcmp(nameUpper.c_str(), "PERMANENT")==0) Permanent_ = reposit::convert<bool>(value); else RP_FAIL("Error: attempt to set non-existent Property: '" + name + "'"); } inline rpGroup::rpGroup( const std::string& ObjectId, const std::vector<std::string>& ObjectIdList, bool Permanent) : reposit::ValueObject(ObjectId, "rpGroup", Permanent), ObjectIdList_(ObjectIdList), Permanent_(Permanent) { } } } #endif
%ifdef CONFIG { "RegData": { "MM0": "0x20A121A222A323A4", "MM1": "0x0041424344454647", "MM2": "0x0000414243444546", "MM3": "0x0000000041424344", "MM4": "0x0" }, "MemoryRegions": { "0x100000000": "4096" } } %endif mov rdx, 0xe0000000 mov rax, 0x4142434445464748 mov [rdx + 8 * 0], rax mov rax, 0x5152535455565758 mov [rdx + 8 * 1], rax mov rax, 0x1 mov [rdx + 8 * 2], rax mov rax, 0x0 mov [rdx + 8 * 3], rax mov rax, 0x8 mov [rdx + 8 * 4], rax mov rax, 0x0 mov [rdx + 8 * 5], rax mov rax, 0x10 mov [rdx + 8 * 6], rax mov rax, 0x0 mov [rdx + 8 * 7], rax mov rax, 0x20 mov [rdx + 8 * 8], rax mov rax, 0x0 mov [rdx + 8 * 9], rax ; Will Zero mov rax, 0x40 mov [rdx + 8 * 10], rax mov rax, 0x0 mov [rdx + 8 * 11], rax movq mm0, [rdx + 8 * 0] movq mm1, [rdx + 8 * 0] movq mm2, [rdx + 8 * 0] movq mm3, [rdx + 8 * 0] movq mm4, [rdx + 8 * 0] psrlq mm0, [rdx + 8 * 2] psrlq mm1, [rdx + 8 * 4] psrlq mm2, [rdx + 8 * 6] psrlq mm3, [rdx + 8 * 8] psrlq mm4, [rdx + 8 * 10] hlt
; A179041: Partial sums of ceiling(Fibonacci(n)/3). ; 0,1,2,3,4,6,9,14,21,33,52,82,130,208,334,538,867,1400,2262,3656,5911,9560,15464,25017,40473,65482,105947,171420,277357,448767,726114,1174871,1900974,3075834,4976797,8052619 lpb $0 mov $2,$0 sub $0,1 seq $2,293543 ; a(n) is the least integer k such that k/Fibonacci(n) > 1/3. add $1,$2 lpe mov $0,$1
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r8 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xb140, %rbx nop nop nop sub %rdx, %rdx movl $0x61626364, (%rbx) nop nop nop nop dec %r11 lea addresses_WC_ht+0xdf1c, %rdi nop nop and %rcx, %rcx vmovups (%rdi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r8 nop nop nop nop nop add %rdx, %rdx lea addresses_A_ht+0x1e22a, %rsi lea addresses_D_ht+0x14a8c, %rdi nop nop nop nop nop xor %r12, %r12 mov $58, %rcx rep movsl nop nop nop nop nop sub $3739, %rbx lea addresses_WT_ht+0x11e8c, %rsi lea addresses_UC_ht+0x11e8c, %rdi nop nop nop and $32825, %rdx mov $44, %rcx rep movsb nop nop nop inc %r8 lea addresses_A_ht+0x81d4, %rcx nop nop and $28692, %rsi movw $0x6162, (%rcx) nop nop nop nop xor $52050, %r12 lea addresses_normal_ht+0x8e8c, %r11 nop nop nop add $63715, %rcx movl $0x61626364, (%r11) xor $58180, %r11 lea addresses_UC_ht+0xc8c, %rcx nop nop nop nop dec %rsi movw $0x6162, (%rcx) nop mfence lea addresses_UC_ht+0xb28c, %rsi lea addresses_WC_ht+0x18d1e, %rdi nop nop nop nop xor %r12, %r12 mov $54, %rcx rep movsb nop nop nop nop xor $55494, %rsi lea addresses_UC_ht+0x1b78, %rsi lea addresses_D_ht+0x3e8c, %rdi clflush (%rsi) nop nop inc %rdx mov $23, %rcx rep movsw nop nop nop nop nop cmp %rbx, %rbx lea addresses_A_ht+0x1640c, %rcx clflush (%rcx) nop nop dec %r8 mov (%rcx), %dx nop and %rdx, %rdx lea addresses_WT_ht+0x858c, %rsi nop nop nop nop nop inc %rbx mov (%rsi), %r8w nop nop nop nop cmp $11325, %r12 lea addresses_WC_ht+0x1ca8c, %rsi lea addresses_UC_ht+0x110c, %rdi nop nop nop nop nop and $43457, %r8 mov $26, %rcx rep movsq sub $62903, %rcx lea addresses_normal_ht+0x1768c, %rcx nop nop nop nop nop add %rdi, %rdi mov (%rcx), %bx nop nop nop nop nop xor $14341, %rcx lea addresses_D_ht+0x1458c, %rsi lea addresses_WC_ht+0x1a40c, %rdi nop nop add $38749, %rbx mov $14, %rcx rep movsl nop sub %rbx, %rbx lea addresses_D_ht+0x744c, %rsi nop cmp $44965, %rdx mov $0x6162636465666768, %r8 movq %r8, %xmm5 and $0xffffffffffffffc0, %rsi vmovaps %ymm5, (%rsi) nop nop nop nop nop and %r11, %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r8 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r15 push %r8 push %rbp push %rdi // Store lea addresses_normal+0xd60c, %rdi cmp $20826, %r12 movb $0x51, (%rdi) // Exception!!! nop nop mov (0), %r8 nop add $16088, %r8 // Store lea addresses_normal+0x1cca7, %r8 clflush (%r8) nop nop sub %r10, %r10 mov $0x5152535455565758, %rbp movq %rbp, (%r8) nop nop nop nop nop add $30552, %rbp // Store mov $0x75427e0000000ecc, %r8 and %rbp, %rbp mov $0x5152535455565758, %r10 movq %r10, %xmm5 movups %xmm5, (%r8) add $15335, %rdi // Store lea addresses_US+0x19e8c, %r12 nop nop nop and $38858, %r15 movl $0x51525354, (%r12) nop add %r15, %r15 // Store lea addresses_PSE+0x1b78c, %r10 nop nop nop nop add $37560, %r12 mov $0x5152535455565758, %r8 movq %r8, %xmm2 movups %xmm2, (%r10) inc %r12 // Faulty Load lea addresses_US+0xde8c, %r11 nop nop sub $39562, %r15 movups (%r11), %xmm1 vpextrq $0, %xmm1, %rbp lea oracles, %r11 and $0xff, %rbp shlq $12, %rbp mov (%r11,%rbp,1), %rbp pop %rdi pop %rbp pop %r8 pop %r15 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}} {'54': 16566} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
;; Licensed to the .NET Foundation under one or more agreements. ;; The .NET Foundation licenses this file to you under the MIT license. ;; See the LICENSE file in the project root for more information. #include "AsmMacros.h" TEXTAREA IMPORT RhpReversePInvokeBadTransition ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; RhpWaitForSuspend -- rare path for RhpPInvoke and RhpReversePInvokeReturn ;; ;; ;; INPUT: none ;; ;; TRASHES: none ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NESTED_ENTRY RhpWaitForSuspend ;; FP and LR registers PROLOG_SAVE_REG_PAIR fp, lr, #-0xA0! ;; Push down stack pointer and store FP and LR ;; Need to save argument registers x0-x7 and the return buffer register x8 (twice just for 16B alignment) stp x0, x1, [sp, #0x10] stp x2, x3, [sp, #0x20] stp x4, x5, [sp, #0x30] stp x6, x7, [sp, #0x40] stp x8, x8, [sp, #0x50] ;; Save float argument registers as well since they're volatile stp d0, d1, [sp, #0x60] stp d2, d3, [sp, #0x70] stp d4, d5, [sp, #0x80] stp d6, d7, [sp, #0x90] bl RhpWaitForSuspend2 ;; Restore floating point registers ldp d0, d1, [sp, #0x60] ldp d2, d3, [sp, #0x70] ldp d4, d5, [sp, #0x80] ldp d6, d7, [sp, #0x90] ;; Restore the argument registers ldp x0, x1, [sp, #0x10] ldp x2, x3, [sp, #0x20] ldp x4, x5, [sp, #0x30] ldp x6, x7, [sp, #0x40] ldr x8, [sp, #0x50] ;; Restore FP and LR registers, and free the allocated stack block EPILOG_RESTORE_REG_PAIR fp, lr, #0xA0! EPILOG_RETURN NESTED_END RhpWaitForSuspend ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; RhpWaitForGCNoAbort ;; ;; ;; INPUT: x9: transition frame ;; ;; TRASHES: None ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NESTED_ENTRY RhpWaitForGCNoAbort ;; FP and LR registers PROLOG_SAVE_REG_PAIR fp, lr, #-0x40! ;; Push down stack pointer and store FP and LR ;; Save the integer return registers, as well as the floating return registers stp x0, x1, [sp, #0x10] stp d0, d1, [sp, #0x20] stp d2, d3, [sp, #0x30] ldr x0, [x9, #OFFSETOF__PInvokeTransitionFrame__m_pThread] ldr w0, [x0, #OFFSETOF__Thread__m_ThreadStateFlags] tbnz x0, #TSF_DoNotTriggerGc_Bit, Done mov x0, x9 ; passing transition frame in x0 bl RhpWaitForGC2 Done ldp x0, x1, [sp, #0x10] ldp d0, d1, [sp, #0x20] ldp d2, d3, [sp, #0x30] EPILOG_RESTORE_REG_PAIR fp, lr, #0x40! EPILOG_RETURN NESTED_END RhpWaitForGCNoAbort EXTERN RhpThrowHwEx ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; RhpWaitForGC ;; ;; ;; INPUT: x9: transition frame ;; ;; TRASHES: x0, x1, x10 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NESTED_ENTRY RhpWaitForGC PROLOG_SAVE_REG_PAIR fp, lr, #-0x10! ldr x10, =RhpTrapThreads ldr w10, [x10] tbz x10, #TrapThreadsFlags_TrapThreads_Bit, NoWait bl RhpWaitForGCNoAbort NoWait tbz x10, #TrapThreadsFlags_AbortInProgress_Bit, NoAbort ldr x10, [x9, #OFFSETOF__PInvokeTransitionFrame__m_Flags] tbz x10, #PTFF_THREAD_ABORT_BIT, NoAbort EPILOG_RESTORE_REG_PAIR fp, lr, #0x10! EPILOG_NOP mov w0, #STATUS_REDHAWK_THREAD_ABORT EPILOG_NOP mov x1, lr ; hijack target address as exception PC EPILOG_NOP b RhpThrowHwEx NoAbort EPILOG_RESTORE_REG_PAIR fp, lr, #0x10! EPILOG_RETURN NESTED_END RhpWaitForGC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; RhpReversePInvoke ;; ;; IN: x9: address of reverse pinvoke frame ;; 0: save slot for previous M->U transition frame ;; 8: save slot for thread pointer to avoid re-calc in epilog sequence ;; ;; PRESERVES: x0 - x8 -- need to preserve these because the caller assumes they aren't trashed ;; ;; TRASHES: x10, x11 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LEAF_ENTRY RhpReversePInvoke INLINE_GETTHREAD x10, x11 ; x10 = Thread, x11 trashed str x10, [x9, #8] ; save Thread pointer for RhpReversePInvokeReturn ;; x9 = reverse pinvoke frame ;; x10 = thread ;; x11 = scratch ldr w11, [x10, #OFFSETOF__Thread__m_ThreadStateFlags] tbz x11, #TSF_Attached_Bit, AttachThread ThreadAttached ;; ;; Check for the correct mode. This is accessible via various odd things that we cannot completely ;; prevent such as : ;; 1) Registering a reverse pinvoke entrypoint as a vectored exception handler ;; 2) Performing a managed delegate invoke on a reverse pinvoke delegate. ;; ldr x11, [x10, #OFFSETOF__Thread__m_pTransitionFrame] cbz x11, CheckBadTransition ;; Save previous TransitionFrame prior to making the mode transition so that it is always valid ;; whenever we might attempt to hijack this thread. str x11, [x9] str xzr, [x10, #OFFSETOF__Thread__m_pTransitionFrame] dmb ish ldr x11, =RhpTrapThreads ldr w11, [x11] tbnz x11, #TrapThreadsFlags_TrapThreads_Bit, TrapThread ret CheckBadTransition ;; Allow 'bad transitions' in when the TSF_DoNotTriggerGc mode is set. This allows us to have ;; [NativeCallable] methods that are called via the "restricted GC callouts" as well as from native, ;; which is necessary because the methods are CCW vtable methods on interfaces passed to native. ldr w11, [x10, #OFFSETOF__Thread__m_ThreadStateFlags] tbz x11, #TSF_DoNotTriggerGc_Bit, BadTransition ;; zero-out our 'previous transition frame' save slot mov x11, #0 str x11, [x9] ;; nothing more to do ret TrapThread ;; put the previous frame back (sets us back to preemptive mode) ldr x11, [x9] str x11, [x10, #OFFSETOF__Thread__m_pTransitionFrame] dmb ish AttachThread ; passing address of reverse pinvoke frame in x9 b RhpReversePInvokeAttachOrTrapThread BadTransition mov x0, lr ; arg <- return address b RhpReversePInvokeBadTransition LEAF_END RhpReversePInvoke INLINE_GETTHREAD_CONSTANT_POOL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; RhpReversePInvokeAttachOrTrapThread -- rare path for RhpPInvoke ;; ;; ;; INPUT: x9: address of reverse pinvoke frame ;; ;; PRESERVES: x0-x8 -- need to preserve these because the caller assumes they aren't trashed ;; ;; TRASHES: none ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NESTED_ENTRY RhpReversePInvokeAttachOrTrapThread ;; FP and LR registers PROLOG_SAVE_REG_PAIR fp, lr, #-0xA0! ;; Push down stack pointer and store FP and LR ;; Need to save argument registers x0-x7 and the return buffer register x8 (twice for 16B alignment) stp x0, x1, [sp, #0x10] stp x2, x3, [sp, #0x20] stp x4, x5, [sp, #0x30] stp x6, x7, [sp, #0x40] stp x8, x8, [sp, #0x50] ;; Save float argument registers as well since they're volatile stp d0, d1, [sp, #0x60] stp d2, d3, [sp, #0x70] stp d4, d5, [sp, #0x80] stp d6, d7, [sp, #0x90] mov x0, x9 ; passing reverse pinvoke frame pointer in x0 bl RhpReversePInvokeAttachOrTrapThread2 ;; Restore floating point registers ldp d0, d1, [sp, #0x60] ldp d2, d3, [sp, #0x70] ldp d4, d5, [sp, #0x80] ldp d6, d7, [sp, #0x90] ;; Restore the argument registers ldp x0, x1, [sp, #0x10] ldp x2, x3, [sp, #0x20] ldp x4, x5, [sp, #0x30] ldp x6, x7, [sp, #0x40] ldr x8, [sp, #0x50] ;; Restore FP and LR registers, and free the allocated stack block EPILOG_RESTORE_REG_PAIR fp, lr, #0xA0! EPILOG_RETURN NESTED_END RhpReversePInvokeTrapThread ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; RhpReversePInvokeReturn ;; ;; IN: x9: address of reverse pinvoke frame ;; 0: save slot for previous M->U transition frame ;; 8: save slot for thread pointer to avoid re-calc in epilog sequence ;; ;; TRASHES: x10, x11 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LEAF_ENTRY RhpReversePInvokeReturn ldp x10, x11, [x9] ;; x10: previous M->U transition frame ;; x11: thread pointer str x10, [x11, #OFFSETOF__Thread__m_pTransitionFrame] dmb ish ldr x10, =RhpTrapThreads ldr w10, [x10] tbnz x10, #TrapThreadsFlags_TrapThreads_Bit, RareTrapThread ret RareTrapThread b RhpWaitForSuspend LEAF_END RhpReversePInvokeReturn INLINE_GETTHREAD_CONSTANT_POOL end
; A194460: a(n) is the number of basic ideals in the standard Borel subalgebra of the untwisted affine Lie algebra sl_n. ; Submitted by Jon Maiga ; 1,4,18,82,370,1648,7252,31582,136338,584248,2488156,10540484,44450068,186715072,781628008,3262239862,13579324498,56391614632,233686316428,966556003132,3990942300508,16453094542432,67733512006168,278481359524972,1143593233488340,4691059647588208,19223422417156632,78701561992442632,321927442667030248,1315772552734359296,5373724819498114000,21931238359169263270,89446509447865547218,364580793964653968392,1485150329249556988780,6046555023825076198028,24604813038805420664332,100073481110908065382432 add $0,1 mov $1,4 pow $1,$0 mov $2,$0 mul $2,2 bin $2,$0 add $0,2 mul $2,$0 sub $2,$1 mov $0,$2 div $0,2
; size_t getline(char **lineptr, size_t *n, FILE *stream) INCLUDE "clib_cfg.asm" SECTION code_stdio ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF __CLIB_OPT_MULTITHREAD & $02 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _getline EXTERN l0_getline_callee _getline: pop af pop hl pop de pop bc push af jp l0_getline_callee ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ELSE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _getline EXTERN _getline_unlocked defc _getline = _getline_unlocked ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; A096386: Expansion of x^2(x^4+x^2+x+1)/(x^7-x^6-x+1). ; 0,0,1,2,3,3,4,4,5,6,7,7,8,8,9,10,11,11,12,12,13,14,15,15,16,16,17,18,19,19,20,20,21,22,23,23,24,24,25,26,27,27,28,28,29,30,31,31,32,32,33,34,35,35,36,36,37,38,39,39,40,40,41,42,43,43,44,44,45,46,47,47,48,48 mov $1,$0 div $1,6 sub $1,$0 sub $0,$1 sub $0,$1 div $0,4 mov $1,$0
SECTION code_fp_math16 PUBLIC cm16_sdcc___ulong2h EXTERN asm_f24_u32 EXTERN asm_f16_f24 .cm16_sdcc___ulong2h pop bc ;return pop hl ;value pop de push de push hl push bc call asm_f24_u32 jp asm_f16_f24
; CALLER linkage for function pointers SECTION code_clib PUBLIC strtoul PUBLIC _strtoul EXTERN strtol_callee EXTERN ASMDISP_STRTOL_CALLEE .strtoul ._strtoul pop af pop bc pop de pop hl push hl push de push bc push af jp strtol_callee + ASMDISP_STRTOL_CALLEE
PUBLIC pinput EXTERN print:PROC, readl:PROC ASCII_w EQU 119 ASCII_d EQU 100 ASCII_s EQU 115 ASCII_a EQU 97 MOVE_LEFT EQU 0 MOVE_UP EQU 1 MOVE_RIGHT EQU 2 MOVE_DOWN EQU 3 .data inputstr db "Please enter a move: ", 0 invlstr db "Invalid move, please enter a move: ", 0 .code ; gets player input ; RAX = move pinput PROC SUB RSP, 2 ENTER 32, 0 LEA RCX, inputstr CALL print ploop: MOV RCX, RSP MOV RDX, 2 CALL readl MOV AL, [RSP] CMP AL, ASCII_a MOV RDX, MOVE_LEFT JE pend CMP AL, ASCII_w MOV RDX, MOVE_UP JE pend CMP AL, ASCII_d MOV RDX, MOVE_RIGHT JE pend CMP AL, ASCII_s MOV RDX, MOVE_DOWN JE pend LEA RCX, invlstr CALL print JMP ploop pend: MOV RAX, RDX LEAVE ADD RSP, 2 RET pinput ENDP END
; A246393: Nonnegative integers k satisfying cos(k) >= 0 and cos(k+1) <= 0. ; 1,7,14,20,26,32,39,45,51,58,64,70,76,83,89,95,102,108,114,120,127,133,139,146,152,158,164,171,177,183,190,196,202,208,215,221,227,234,240,246,252,259,265,271,278,284,290,296,303,309,315,322,328,334,340,347,353,359,365,372,378,384,391,397,403,409,416,422,428,435,441,447,453,460,466,472,479,485,491,497,504,510,516,523,529,535,541,548,554,560,567,573,579,585,592,598,604,611,617,623,629,636,642,648,655,661,667,673,680,686,692,699,705,711,717,724,730,736,742,749,755,761,768,774,780,786,793,799,805,812,818,824,830,837,843,849,856,862,868,874,881,887,893,900,906,912,918,925,931,937,944,950,956,962,969,975,981,988,994,1000,1006,1013,1019,1025,1032,1038,1044,1050,1057,1063,1069,1075,1082,1088,1094,1101,1107,1113,1119,1126,1132,1138,1145,1151,1157,1163,1170,1176,1182,1189,1195,1201,1207,1214,1220,1226,1233,1239,1245,1251,1258,1264,1270,1277,1283,1289,1295,1302,1308,1314,1321,1327,1333,1339,1346,1352,1358,1365,1371,1377,1383,1390,1396,1402,1409,1415,1421,1427,1434,1440,1446,1452,1459,1465,1471,1478,1484,1490,1496,1503,1509,1515,1522,1528,1534,1540,1547,1553,1559,1566 mov $2,$0 add $2,959 mov $1,$2 cal $1,4082 ; Numbers n such that sin(n-1) <= 0 and sin(n) > 0. sub $1,6025
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. 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 "tensorflow/core/common_runtime/kernel_benchmark_testlib.h" #include "tensorflow/core/framework/tensor.h" #include "tensorflow/core/graph/node_builder.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/platform/test_benchmark.h" namespace tensorflow { static Graph* BM_AdjustContrast(int batches, int width, int height) { Graph* g = new Graph(OpRegistry::Global()); Tensor in(DT_FLOAT, TensorShape({batches, width, height, 3})); in.flat<float>().setRandom(); Tensor factor(DT_FLOAT, TensorShape({})); factor.flat<float>().setConstant(1.2); Node* ret; TF_CHECK_OK(NodeBuilder(g->NewName("n"), "AdjustContrastv2") .Input(test::graph::Constant(g, in)) .Input(test::graph::Constant(g, factor)) .Finalize(g, &ret)); return g; } #define BM_AdjustContrastDev(DEVICE, B, W, H) \ static void BM_AdjustContrast_##DEVICE##_##B##_##W##_##H(int iters) { \ testing::ItemsProcessed(iters* B* W* H * 3); \ test::Benchmark(#DEVICE, BM_AdjustContrast(B, W, H)).Run(iters); \ } \ BENCHMARK(BM_AdjustContrast_##DEVICE##_##B##_##W##_##H) // Benchmark results as of cl/106323955 // BM_AdjustContrast_cpu_1_299_299 3416770 22008951 100 11.6M items/s // BM_AdjustContrast_gpu_32_299_299 37117844 45512374 100 179.8M items/s // Benchmark results as of cl/109478777 // (note that the definition has changed to perform no min/max or clamping, // so a comparison to cl/106323955 is inherently unfair) // The GPU test ran with -c opt --config=cuda --copt=-mavx, CPU ran without // --config=cuda because for some reason that killed throughput measurement. // CPU: Intel Haswell with HyperThreading (6 cores) dL1:32KB dL2:256KB dL3:15MB // GPU: Tesla K40m // BM_AdjustContrast_cpu_1_299_299 179084 340186 2181 751.9M items/s // BM_AdjustContrast_gpu_32_299_299 85276 123665 4189 2.9G items/s BM_AdjustContrastDev(cpu, 1, 299, 299); BM_AdjustContrastDev(gpu, 32, 299, 299); } // namespace tensorflow
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "intel_gpu/plugin/program.hpp" #include "intel_gpu/plugin/common_utils.hpp" #include "ngraph/op/region_yolo.hpp" #include "intel_gpu/primitives/region_yolo.hpp" namespace ov { namespace runtime { namespace intel_gpu { static void CreateRegionYoloOp(Program& p, const std::shared_ptr<ngraph::op::v0::RegionYolo>& op) { p.ValidateInputs(op, {1}); auto inputPrimitives = p.GetInputPrimitiveIDs(op); std::string layerName = layer_type_name_ID(op); uint32_t coords = op->get_num_coords(); uint32_t classes = op->get_num_classes(); uint32_t num = op->get_num_regions(); bool do_softmax = op->get_do_softmax(); uint32_t mask_size = op->get_mask().size(); auto regionPrim = cldnn::region_yolo(layerName, inputPrimitives[0], coords, classes, num, mask_size, do_softmax, op->get_friendly_name()); p.AddPrimitive(regionPrim); p.AddPrimitiveToProfiler(op); } REGISTER_FACTORY_IMPL(v0, RegionYolo); } // namespace intel_gpu } // namespace runtime } // namespace ov
test_device(): # @test_device() push rax call rand mov ecx, -258049 and ecx, dword ptr [rsp + 4] and eax, 63 shl eax, 12 or eax, ecx mov dword ptr [rsp + 4], eax pop rax ret
; A173036: a(n) = binomial(n+1, 2) + 13. ; 13,14,16,19,23,28,34,41,49,58,68,79,91,104,118,133,149,166,184,203,223,244,266,289,313,338,364,391,419,448,478,509,541,574,608,643,679,716,754,793,833,874,916,959,1003,1048,1094,1141,1189,1238,1288,1339,1391,1444,1498,1553,1609,1666,1724,1783,1843,1904,1966,2029,2093,2158,2224,2291,2359,2428,2498,2569,2641,2714,2788,2863,2939,3016,3094,3173,3253,3334,3416,3499,3583,3668,3754,3841,3929,4018,4108,4199,4291,4384,4478,4573,4669,4766,4864,4963 sub $1,$0 bin $1,2 add $1,13 mov $0,$1
;***************************************************************************** ;* deblock-a.asm: x86 deblocking ;***************************************************************************** ;* Copyright (C) 2005-2016 x264 project ;* ;* Authors: Loren Merritt <lorenm@u.washington.edu> ;* Fiona Glaser <fiona@x264.com> ;* Oskar Arvidsson <oskar@irock.se> ;* ;* 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 02111, USA. ;* ;* This program is also available under a commercial proprietary license. ;* For more information, contact us at licensing@x264.com. ;***************************************************************************** %include "x86inc.asm" %include "x86util.asm" SECTION_RODATA 32 load_bytes_shuf: times 2 db 3,4,5,6,11,12,13,14,4,5,6,7,12,13,14,15 insert_top_shuf: dd 0,1,4,5,7,2,3,6 transpose_shuf: db 0,4,8,12,1,5,9,13,2,6,10,14,3,7,11,15 SECTION .text cextern pb_0 cextern pb_1 cextern pb_3 cextern pb_a1 cextern pw_2 cextern pw_4 cextern pw_00ff cextern pw_pixel_max cextern pb_unpackbd1 %if HIGH_BIT_DEPTH ; out: %4 = |%1-%2|-%3 ; clobbers: %5 %macro ABS_SUB 5 psubusw %5, %2, %1 psubusw %4, %1, %2 por %4, %5 psubw %4, %3 %endmacro ; out: %4 = |%1-%2|<%3 %macro DIFF_LT 5 psubusw %4, %2, %1 psubusw %5, %1, %2 por %5, %4 ; |%1-%2| pxor %4, %4 psubw %5, %3 ; |%1-%2|-%3 pcmpgtw %4, %5 ; 0 > |%1-%2|-%3 %endmacro %macro LOAD_AB 4 movd %1, %3 movd %2, %4 SPLATW %1, %1 SPLATW %2, %2 %endmacro ; in: %2=tc reg ; out: %1=splatted tc %macro LOAD_TC 2 %if mmsize == 8 pshufw %1, [%2-1], 0 %else movd %1, [%2] punpcklbw %1, %1 pshuflw %1, %1, q1100 pshufd %1, %1, q1100 %endif psraw %1, 8 %endmacro ; in: %1=p1, %2=p0, %3=q0, %4=q1 ; %5=alpha, %6=beta, %7-%9=tmp ; out: %7=mask %macro LOAD_MASK 9 ABS_SUB %2, %3, %5, %8, %7 ; |p0-q0| - alpha ABS_SUB %1, %2, %6, %9, %7 ; |p1-p0| - beta pand %8, %9 ABS_SUB %3, %4, %6, %9, %7 ; |q1-q0| - beta pxor %7, %7 pand %8, %9 pcmpgtw %7, %8 %endmacro ; in: %1=p0, %2=q0, %3=p1, %4=q1, %5=mask, %6=tmp, %7=tmp ; out: %1=p0', m2=q0' %macro DEBLOCK_P0_Q0 7 psubw %3, %4 pxor %7, %7 paddw %3, [pw_4] psubw %7, %5 psubw %6, %2, %1 psllw %6, 2 paddw %3, %6 psraw %3, 3 mova %6, [pw_pixel_max] CLIPW %3, %7, %5 pxor %7, %7 paddw %1, %3 psubw %2, %3 CLIPW %1, %7, %6 CLIPW %2, %7, %6 %endmacro ; in: %1=x2, %2=x1, %3=p0, %4=q0 %5=mask&tc, %6=tmp %macro LUMA_Q1 6 pavgw %6, %3, %4 ; (p0+q0+1)>>1 paddw %1, %6 pxor %6, %6 psraw %1, 1 psubw %6, %5 psubw %1, %2 CLIPW %1, %6, %5 paddw %1, %2 %endmacro %macro LUMA_DEBLOCK_ONE 3 DIFF_LT m5, %1, bm, m4, m6 pxor m6, m6 mova %3, m4 pcmpgtw m6, tcm pand m4, tcm pandn m6, m7 pand m4, m6 LUMA_Q1 m5, %2, m1, m2, m4, m6 %endmacro %macro LUMA_H_STORE 2 %if mmsize == 8 movq [r0-4], m0 movq [r0+r1-4], m1 movq [r0+r1*2-4], m2 movq [r0+%2-4], m3 %else movq [r0-4], m0 movhps [r0+r1-4], m0 movq [r0+r1*2-4], m1 movhps [%1-4], m1 movq [%1+r1-4], m2 movhps [%1+r1*2-4], m2 movq [%1+%2-4], m3 movhps [%1+r1*4-4], m3 %endif %endmacro %macro DEBLOCK_LUMA 0 ;----------------------------------------------------------------------------- ; void deblock_v_luma( uint16_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_v_luma, 5,5,8,0-5*mmsize %define tcm [rsp] %define ms1 [rsp+mmsize] %define ms2 [rsp+mmsize*2] %define am [rsp+mmsize*3] %define bm [rsp+mmsize*4] add r1, r1 LOAD_AB m4, m5, r2d, r3d mov r3, 32/mmsize mov r2, r0 sub r0, r1 mova am, m4 sub r0, r1 mova bm, m5 sub r0, r1 .loop: mova m0, [r0+r1] mova m1, [r0+r1*2] mova m2, [r2] mova m3, [r2+r1] LOAD_MASK m0, m1, m2, m3, am, bm, m7, m4, m6 LOAD_TC m6, r4 mova tcm, m6 mova m5, [r0] LUMA_DEBLOCK_ONE m1, m0, ms1 mova [r0+r1], m5 mova m5, [r2+r1*2] LUMA_DEBLOCK_ONE m2, m3, ms2 mova [r2+r1], m5 pxor m5, m5 mova m6, tcm pcmpgtw m5, tcm psubw m6, ms1 pandn m5, m7 psubw m6, ms2 pand m5, m6 DEBLOCK_P0_Q0 m1, m2, m0, m3, m5, m7, m6 mova [r0+r1*2], m1 mova [r2], m2 add r0, mmsize add r2, mmsize add r4, mmsize/8 dec r3 jg .loop RET cglobal deblock_h_luma, 5,6,8,0-7*mmsize %define tcm [rsp] %define ms1 [rsp+mmsize] %define ms2 [rsp+mmsize*2] %define p1m [rsp+mmsize*3] %define p2m [rsp+mmsize*4] %define am [rsp+mmsize*5] %define bm [rsp+mmsize*6] add r1, r1 LOAD_AB m4, m5, r2d, r3d mov r3, r1 mova am, m4 add r3, r1 mov r5, 32/mmsize mova bm, m5 add r3, r1 %if mmsize == 16 mov r2, r0 add r2, r3 %endif .loop: %if mmsize == 8 movq m2, [r0-8] ; y q2 q1 q0 movq m7, [r0+0] movq m5, [r0+r1-8] movq m3, [r0+r1+0] movq m0, [r0+r1*2-8] movq m6, [r0+r1*2+0] movq m1, [r0+r3-8] TRANSPOSE4x4W 2, 5, 0, 1, 4 SWAP 2, 7 movq m7, [r0+r3] TRANSPOSE4x4W 2, 3, 6, 7, 4 %else movu m5, [r0-8] ; y q2 q1 q0 p0 p1 p2 x movu m0, [r0+r1-8] movu m2, [r0+r1*2-8] movu m3, [r2-8] TRANSPOSE4x4W 5, 0, 2, 3, 6 mova tcm, m3 movu m4, [r2+r1-8] movu m1, [r2+r1*2-8] movu m3, [r2+r3-8] movu m7, [r2+r1*4-8] TRANSPOSE4x4W 4, 1, 3, 7, 6 mova m6, tcm punpcklqdq m6, m7 punpckhqdq m5, m4 SBUTTERFLY qdq, 0, 1, 7 SBUTTERFLY qdq, 2, 3, 7 %endif mova p2m, m6 LOAD_MASK m0, m1, m2, m3, am, bm, m7, m4, m6 LOAD_TC m6, r4 mova tcm, m6 LUMA_DEBLOCK_ONE m1, m0, ms1 mova p1m, m5 mova m5, p2m LUMA_DEBLOCK_ONE m2, m3, ms2 mova p2m, m5 pxor m5, m5 mova m6, tcm pcmpgtw m5, tcm psubw m6, ms1 pandn m5, m7 psubw m6, ms2 pand m5, m6 DEBLOCK_P0_Q0 m1, m2, m0, m3, m5, m7, m6 mova m0, p1m mova m3, p2m TRANSPOSE4x4W 0, 1, 2, 3, 4 LUMA_H_STORE r2, r3 add r4, mmsize/8 lea r0, [r0+r1*(mmsize/2)] lea r2, [r2+r1*(mmsize/2)] dec r5 jg .loop RET %endmacro %if ARCH_X86_64 ; in: m0=p1, m1=p0, m2=q0, m3=q1, m8=p2, m9=q2 ; m12=alpha, m13=beta ; out: m0=p1', m3=q1', m1=p0', m2=q0' ; clobbers: m4, m5, m6, m7, m10, m11, m14 %macro DEBLOCK_LUMA_INTER_SSE2 0 LOAD_MASK m0, m1, m2, m3, m12, m13, m7, m4, m6 LOAD_TC m6, r4 DIFF_LT m8, m1, m13, m10, m4 DIFF_LT m9, m2, m13, m11, m4 pand m6, m7 mova m14, m6 pxor m4, m4 pcmpgtw m6, m4 pand m6, m14 mova m5, m10 pand m5, m6 LUMA_Q1 m8, m0, m1, m2, m5, m4 mova m5, m11 pand m5, m6 LUMA_Q1 m9, m3, m1, m2, m5, m4 pxor m4, m4 psubw m6, m10 pcmpgtw m4, m14 pandn m4, m7 psubw m6, m11 pand m4, m6 DEBLOCK_P0_Q0 m1, m2, m0, m3, m4, m5, m6 SWAP 0, 8 SWAP 3, 9 %endmacro %macro DEBLOCK_LUMA_64 0 cglobal deblock_v_luma, 5,5,15 %define p2 m8 %define p1 m0 %define p0 m1 %define q0 m2 %define q1 m3 %define q2 m9 %define mask0 m7 %define mask1 m10 %define mask2 m11 add r1, r1 LOAD_AB m12, m13, r2d, r3d mov r2, r0 sub r0, r1 sub r0, r1 sub r0, r1 mov r3, 2 .loop: mova p2, [r0] mova p1, [r0+r1] mova p0, [r0+r1*2] mova q0, [r2] mova q1, [r2+r1] mova q2, [r2+r1*2] DEBLOCK_LUMA_INTER_SSE2 mova [r0+r1], p1 mova [r0+r1*2], p0 mova [r2], q0 mova [r2+r1], q1 add r0, mmsize add r2, mmsize add r4, 2 dec r3 jg .loop RET cglobal deblock_h_luma, 5,7,15 add r1, r1 LOAD_AB m12, m13, r2d, r3d mov r2, r1 add r2, r1 add r2, r1 mov r5, r0 add r5, r2 mov r6, 2 .loop: movu m8, [r0-8] ; y q2 q1 q0 p0 p1 p2 x movu m0, [r0+r1-8] movu m2, [r0+r1*2-8] movu m9, [r5-8] movu m5, [r5+r1-8] movu m1, [r5+r1*2-8] movu m3, [r5+r2-8] movu m7, [r5+r1*4-8] TRANSPOSE4x4W 8, 0, 2, 9, 10 TRANSPOSE4x4W 5, 1, 3, 7, 10 punpckhqdq m8, m5 SBUTTERFLY qdq, 0, 1, 10 SBUTTERFLY qdq, 2, 3, 10 punpcklqdq m9, m7 DEBLOCK_LUMA_INTER_SSE2 TRANSPOSE4x4W 0, 1, 2, 3, 4 LUMA_H_STORE r5, r2 add r4, 2 lea r0, [r0+r1*8] lea r5, [r5+r1*8] dec r6 jg .loop RET %endmacro INIT_XMM sse2 DEBLOCK_LUMA_64 INIT_XMM avx DEBLOCK_LUMA_64 %endif %macro SWAPMOVA 2 %ifnum sizeof%1 SWAP %1, %2 %else mova %1, %2 %endif %endmacro ; in: t0-t2: tmp registers ; %1=p0 %2=p1 %3=p2 %4=p3 %5=q0 %6=q1 %7=mask0 ; %8=mask1p %9=2 %10=p0' %11=p1' %12=p2' %macro LUMA_INTRA_P012 12 ; p0..p3 in memory %if ARCH_X86_64 paddw t0, %3, %2 mova t2, %4 paddw t2, %3 %else mova t0, %3 mova t2, %4 paddw t0, %2 paddw t2, %3 %endif paddw t0, %1 paddw t2, t2 paddw t0, %5 paddw t2, %9 paddw t0, %9 ; (p2 + p1 + p0 + q0 + 2) paddw t2, t0 ; (2*p3 + 3*p2 + p1 + p0 + q0 + 4) psrlw t2, 3 psrlw t1, t0, 2 psubw t2, %3 psubw t1, %2 pand t2, %8 pand t1, %8 paddw t2, %3 paddw t1, %2 SWAPMOVA %11, t1 psubw t1, t0, %3 paddw t0, t0 psubw t1, %5 psubw t0, %3 paddw t1, %6 paddw t1, %2 paddw t0, %6 psrlw t1, 2 ; (2*p1 + p0 + q1 + 2)/4 psrlw t0, 3 ; (p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4)>>3 pxor t0, t1 pxor t1, %1 pand t0, %8 pand t1, %7 pxor t0, t1 pxor t0, %1 SWAPMOVA %10, t0 SWAPMOVA %12, t2 %endmacro %macro LUMA_INTRA_INIT 1 %define t0 m4 %define t1 m5 %define t2 m6 %define t3 m7 %assign i 4 %rep %1 CAT_XDEFINE t, i, [rsp+mmsize*(i-4)] %assign i i+1 %endrep add r1, r1 %endmacro ; in: %1-%3=tmp, %4=p2, %5=q2 %macro LUMA_INTRA_INTER 5 LOAD_AB t0, t1, r2d, r3d mova %1, t0 LOAD_MASK m0, m1, m2, m3, %1, t1, t0, t2, t3 %if ARCH_X86_64 mova %2, t0 ; mask0 psrlw t3, %1, 2 %else mova t3, %1 mova %2, t0 ; mask0 psrlw t3, 2 %endif paddw t3, [pw_2] ; alpha/4+2 DIFF_LT m1, m2, t3, t2, t0 ; t2 = |p0-q0| < alpha/4+2 pand t2, %2 mova t3, %5 ; q2 mova %1, t2 ; mask1 DIFF_LT t3, m2, t1, t2, t0 ; t2 = |q2-q0| < beta pand t2, %1 mova t3, %4 ; p2 mova %3, t2 ; mask1q DIFF_LT t3, m1, t1, t2, t0 ; t2 = |p2-p0| < beta pand t2, %1 mova %1, t2 ; mask1p %endmacro %macro LUMA_H_INTRA_LOAD 0 %if mmsize == 8 movu t0, [r0-8] movu t1, [r0+r1-8] movu m0, [r0+r1*2-8] movu m1, [r0+r4-8] TRANSPOSE4x4W 4, 5, 0, 1, 2 mova t4, t0 ; p3 mova t5, t1 ; p2 movu m2, [r0] movu m3, [r0+r1] movu t0, [r0+r1*2] movu t1, [r0+r4] TRANSPOSE4x4W 2, 3, 4, 5, 6 mova t6, t0 ; q2 mova t7, t1 ; q3 %else movu t0, [r0-8] movu t1, [r0+r1-8] movu m0, [r0+r1*2-8] movu m1, [r0+r5-8] movu m2, [r4-8] movu m3, [r4+r1-8] movu t2, [r4+r1*2-8] movu t3, [r4+r5-8] TRANSPOSE8x8W 4, 5, 0, 1, 2, 3, 6, 7, t4, t5 mova t4, t0 ; p3 mova t5, t1 ; p2 mova t6, t2 ; q2 mova t7, t3 ; q3 %endif %endmacro ; in: %1=q3 %2=q2' %3=q1' %4=q0' %5=p0' %6=p1' %7=p2' %8=p3 %9=tmp %macro LUMA_H_INTRA_STORE 9 %if mmsize == 8 TRANSPOSE4x4W %1, %2, %3, %4, %9 movq [r0-8], m%1 movq [r0+r1-8], m%2 movq [r0+r1*2-8], m%3 movq [r0+r4-8], m%4 movq m%1, %8 TRANSPOSE4x4W %5, %6, %7, %1, %9 movq [r0], m%5 movq [r0+r1], m%6 movq [r0+r1*2], m%7 movq [r0+r4], m%1 %else TRANSPOSE2x4x4W %1, %2, %3, %4, %9 movq [r0-8], m%1 movq [r0+r1-8], m%2 movq [r0+r1*2-8], m%3 movq [r0+r5-8], m%4 movhps [r4-8], m%1 movhps [r4+r1-8], m%2 movhps [r4+r1*2-8], m%3 movhps [r4+r5-8], m%4 %ifnum %8 SWAP %1, %8 %else mova m%1, %8 %endif TRANSPOSE2x4x4W %5, %6, %7, %1, %9 movq [r0], m%5 movq [r0+r1], m%6 movq [r0+r1*2], m%7 movq [r0+r5], m%1 movhps [r4], m%5 movhps [r4+r1], m%6 movhps [r4+r1*2], m%7 movhps [r4+r5], m%1 %endif %endmacro %if ARCH_X86_64 ;----------------------------------------------------------------------------- ; void deblock_v_luma_intra( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- %macro DEBLOCK_LUMA_INTRA_64 0 cglobal deblock_v_luma_intra, 4,7,16 %define t0 m1 %define t1 m2 %define t2 m4 %define p2 m8 %define p1 m9 %define p0 m10 %define q0 m11 %define q1 m12 %define q2 m13 %define aa m5 %define bb m14 add r1, r1 lea r4, [r1*4] lea r5, [r1*3] ; 3*stride neg r4 add r4, r0 ; pix-4*stride mov r6, 2 mova m0, [pw_2] LOAD_AB aa, bb, r2d, r3d .loop: mova p2, [r4+r1] mova p1, [r4+2*r1] mova p0, [r4+r5] mova q0, [r0] mova q1, [r0+r1] mova q2, [r0+2*r1] LOAD_MASK p1, p0, q0, q1, aa, bb, m3, t0, t1 mova t2, aa psrlw t2, 2 paddw t2, m0 ; alpha/4+2 DIFF_LT p0, q0, t2, m6, t0 ; m6 = |p0-q0| < alpha/4+2 DIFF_LT p2, p0, bb, t1, t0 ; m7 = |p2-p0| < beta DIFF_LT q2, q0, bb, m7, t0 ; t1 = |q2-q0| < beta pand m6, m3 pand m7, m6 pand m6, t1 LUMA_INTRA_P012 p0, p1, p2, [r4], q0, q1, m3, m6, m0, [r4+r5], [r4+2*r1], [r4+r1] LUMA_INTRA_P012 q0, q1, q2, [r0+r5], p0, p1, m3, m7, m0, [r0], [r0+r1], [r0+2*r1] add r0, mmsize add r4, mmsize dec r6 jg .loop RET ;----------------------------------------------------------------------------- ; void deblock_h_luma_intra( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_h_luma_intra, 4,7,16 %define t0 m15 %define t1 m14 %define t2 m2 %define q3 m5 %define q2 m8 %define q1 m9 %define q0 m10 %define p0 m11 %define p1 m12 %define p2 m13 %define p3 m4 %define spill [rsp] %assign pad 24-(stack_offset&15) SUB rsp, pad add r1, r1 lea r4, [r1*4] lea r5, [r1*3] ; 3*stride add r4, r0 ; pix+4*stride mov r6, 2 mova m0, [pw_2] .loop: movu q3, [r0-8] movu q2, [r0+r1-8] movu q1, [r0+r1*2-8] movu q0, [r0+r5-8] movu p0, [r4-8] movu p1, [r4+r1-8] movu p2, [r4+r1*2-8] movu p3, [r4+r5-8] TRANSPOSE8x8W 5, 8, 9, 10, 11, 12, 13, 4, 1 LOAD_AB m1, m2, r2d, r3d LOAD_MASK q1, q0, p0, p1, m1, m2, m3, t0, t1 psrlw m1, 2 paddw m1, m0 ; alpha/4+2 DIFF_LT p0, q0, m1, m6, t0 ; m6 = |p0-q0| < alpha/4+2 DIFF_LT q2, q0, m2, t1, t0 ; t1 = |q2-q0| < beta DIFF_LT p0, p2, m2, m7, t0 ; m7 = |p2-p0| < beta pand m6, m3 pand m7, m6 pand m6, t1 mova spill, q3 LUMA_INTRA_P012 q0, q1, q2, q3, p0, p1, m3, m6, m0, m5, m1, q2 LUMA_INTRA_P012 p0, p1, p2, p3, q0, q1, m3, m7, m0, p0, m6, p2 mova m7, spill LUMA_H_INTRA_STORE 7, 8, 1, 5, 11, 6, 13, 4, 14 lea r0, [r0+r1*8] lea r4, [r4+r1*8] dec r6 jg .loop ADD rsp, pad RET %endmacro INIT_XMM sse2 DEBLOCK_LUMA_INTRA_64 INIT_XMM avx DEBLOCK_LUMA_INTRA_64 %endif %macro DEBLOCK_LUMA_INTRA 0 ;----------------------------------------------------------------------------- ; void deblock_v_luma_intra( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_v_luma_intra, 4,7,8,0-3*mmsize LUMA_INTRA_INIT 3 lea r4, [r1*4] lea r5, [r1*3] neg r4 add r4, r0 mov r6, 32/mmsize .loop: mova m0, [r4+r1*2] ; p1 mova m1, [r4+r5] ; p0 mova m2, [r0] ; q0 mova m3, [r0+r1] ; q1 LUMA_INTRA_INTER t4, t5, t6, [r4+r1], [r0+r1*2] LUMA_INTRA_P012 m1, m0, t3, [r4], m2, m3, t5, t4, [pw_2], [r4+r5], [r4+2*r1], [r4+r1] mova t3, [r0+r1*2] ; q2 LUMA_INTRA_P012 m2, m3, t3, [r0+r5], m1, m0, t5, t6, [pw_2], [r0], [r0+r1], [r0+2*r1] add r0, mmsize add r4, mmsize dec r6 jg .loop RET ;----------------------------------------------------------------------------- ; void deblock_h_luma_intra( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_h_luma_intra, 4,7,8,0-8*mmsize LUMA_INTRA_INIT 8 %if mmsize == 8 lea r4, [r1*3] mov r5, 32/mmsize %else lea r4, [r1*4] lea r5, [r1*3] ; 3*stride add r4, r0 ; pix+4*stride mov r6, 32/mmsize %endif .loop: LUMA_H_INTRA_LOAD LUMA_INTRA_INTER t8, t9, t10, t5, t6 LUMA_INTRA_P012 m1, m0, t3, t4, m2, m3, t9, t8, [pw_2], t8, t5, t11 mova t3, t6 ; q2 LUMA_INTRA_P012 m2, m3, t3, t7, m1, m0, t9, t10, [pw_2], m4, t6, m5 mova m2, t4 mova m0, t11 mova m1, t5 mova m3, t8 mova m6, t6 LUMA_H_INTRA_STORE 2, 0, 1, 3, 4, 6, 5, t7, 7 lea r0, [r0+r1*(mmsize/2)] %if mmsize == 8 dec r5 %else lea r4, [r4+r1*(mmsize/2)] dec r6 %endif jg .loop RET %endmacro %if ARCH_X86_64 == 0 INIT_MMX mmx2 DEBLOCK_LUMA DEBLOCK_LUMA_INTRA INIT_XMM sse2 DEBLOCK_LUMA DEBLOCK_LUMA_INTRA INIT_XMM avx DEBLOCK_LUMA DEBLOCK_LUMA_INTRA %endif %endif ; HIGH_BIT_DEPTH %if HIGH_BIT_DEPTH == 0 ; expands to [base],...,[base+7*stride] %define PASS8ROWS(base, base3, stride, stride3) \ [base], [base+stride], [base+stride*2], [base3], \ [base3+stride], [base3+stride*2], [base3+stride3], [base3+stride*4] %define PASS8ROWS(base, base3, stride, stride3, offset) \ PASS8ROWS(base+offset, base3+offset, stride, stride3) ; in: 4 rows of 8 bytes in m0..m3 ; out: 8 rows of 4 bytes in %1..%8 %macro TRANSPOSE8x4B_STORE 8 punpckhdq m4, m0, m0 punpckhdq m5, m1, m1 punpckhdq m6, m2, m2 punpcklbw m0, m1 punpcklbw m2, m3 punpcklwd m1, m0, m2 punpckhwd m0, m2 movd %1, m1 punpckhdq m1, m1 movd %2, m1 movd %3, m0 punpckhdq m0, m0 movd %4, m0 punpckhdq m3, m3 punpcklbw m4, m5 punpcklbw m6, m3 punpcklwd m5, m4, m6 punpckhwd m4, m6 movd %5, m5 punpckhdq m5, m5 movd %6, m5 movd %7, m4 punpckhdq m4, m4 movd %8, m4 %endmacro ; in: 8 rows of 4 bytes in %9..%10 ; out: 8 rows of 4 bytes in %1..%8 %macro STORE_8x4B 10 movd %1, %9 pextrd %2, %9, 1 pextrd %3, %9, 2 pextrd %4, %9, 3 movd %5, %10 pextrd %6, %10, 1 pextrd %7, %10, 2 pextrd %8, %10, 3 %endmacro ; in: 4 rows of 4 words in %1..%4 ; out: 4 rows of 4 word in m0..m3 ; clobbers: m4 %macro TRANSPOSE4x4W_LOAD 4-8 %if mmsize==8 SWAP 1, 4, 2, 3 movq m0, %1 movq m1, %2 movq m2, %3 movq m3, %4 TRANSPOSE4x4W 0, 1, 2, 3, 4 %else movq m0, %1 movq m2, %2 movq m1, %3 movq m3, %4 punpcklwd m0, m2 punpcklwd m1, m3 mova m2, m0 punpckldq m0, m1 punpckhdq m2, m1 MOVHL m1, m0 MOVHL m3, m2 %endif %endmacro ; in: 2 rows of 4 words in m1..m2 ; out: 4 rows of 2 words in %1..%4 ; clobbers: m0, m1 %macro TRANSPOSE4x2W_STORE 4-8 %if mmsize==8 punpckhwd m0, m1, m2 punpcklwd m1, m2 %else punpcklwd m1, m2 MOVHL m0, m1 %endif movd %3, m0 movd %1, m1 psrlq m1, 32 psrlq m0, 32 movd %2, m1 movd %4, m0 %endmacro ; in: 4/8 rows of 4 words in %1..%8 ; out: 4 rows of 4/8 word in m0..m3 ; clobbers: m4, m5, m6, m7 %macro TRANSPOSE4x8W_LOAD 8 %if mmsize==8 TRANSPOSE4x4W_LOAD %1, %2, %3, %4 %else movq m0, %1 movq m2, %2 movq m1, %3 movq m3, %4 punpcklwd m0, m2 punpcklwd m1, m3 mova m2, m0 punpckldq m0, m1 punpckhdq m2, m1 movq m4, %5 movq m6, %6 movq m5, %7 movq m7, %8 punpcklwd m4, m6 punpcklwd m5, m7 mova m6, m4 punpckldq m4, m5 punpckhdq m6, m5 punpckhqdq m1, m0, m4 punpckhqdq m3, m2, m6 punpcklqdq m0, m4 punpcklqdq m2, m6 %endif %endmacro ; in: 2 rows of 4/8 words in m1..m2 ; out: 4/8 rows of 2 words in %1..%8 ; clobbers: m0, m1 %macro TRANSPOSE8x2W_STORE 8 %if mmsize==8 TRANSPOSE4x2W_STORE %1, %2, %3, %4 %else punpckhwd m0, m1, m2 punpcklwd m1, m2 movd %5, m0 movd %1, m1 psrldq m1, 4 psrldq m0, 4 movd %2, m1 movd %6, m0 psrldq m1, 4 psrldq m0, 4 movd %3, m1 movd %7, m0 psrldq m1, 4 psrldq m0, 4 movd %4, m1 movd %8, m0 %endif %endmacro %macro SBUTTERFLY3 4 punpckh%1 %4, %2, %3 punpckl%1 %2, %3 %endmacro ; in: 8 rows of 8 (only the middle 6 pels are used) in %1..%8 ; out: 6 rows of 8 in [%9+0*16] .. [%9+5*16] %macro TRANSPOSE6x8_MEM 9 RESET_MM_PERMUTATION %if cpuflag(avx) ; input: ; _ABCDEF_ ; _GHIJKL_ ; _MNOPQR_ ; _STUVWX_ ; _YZabcd_ ; _efghij_ ; _klmnop_ ; _qrstuv_ movh m0, %1 movh m2, %2 movh m1, %3 movh m3, %4 punpcklbw m0, m2 ; __ AG BH CI DJ EK FL __ punpcklbw m1, m3 ; __ MS NT OU PV QW RX __ movh m2, %5 movh m3, %6 punpcklbw m2, m3 ; __ Ye Zf ag bh ci dj __ movh m3, %7 movh m4, %8 punpcklbw m3, m4 ; __ kq lr ms nt ou pv __ SBUTTERFLY wd, 0, 1, 4 ; __ __ AG MS BH NT CI OU ; DJ PV EK QW FL RX __ __ SBUTTERFLY wd, 2, 3, 4 ; __ __ Ye kq Zf lr ag ms ; bh nt ci ou dj pv __ __ SBUTTERFLY dq, 0, 2, 4 ; __ __ __ __ AG MS Ye kq ; BH NT Zf lr CI FL OU RX SBUTTERFLY dq, 1, 3, 4 ; DJ PV bh nt EK QW Zf lr ; FL RX dj pv __ __ __ __ movhps [%9+0x00], m0 movh [%9+0x10], m2 movhps [%9+0x20], m2 movh [%9+0x30], m1 movhps [%9+0x40], m1 movh [%9+0x50], m3 %else movq m0, %1 movq m1, %2 movq m2, %3 movq m3, %4 movq m4, %5 movq m5, %6 movq m6, %7 SBUTTERFLY bw, 0, 1, 7 SBUTTERFLY bw, 2, 3, 7 SBUTTERFLY bw, 4, 5, 7 movq [%9+0x10], m3 SBUTTERFLY3 bw, m6, %8, m7 SBUTTERFLY wd, 0, 2, 3 SBUTTERFLY wd, 4, 6, 3 punpckhdq m0, m4 movq [%9+0x00], m0 SBUTTERFLY3 wd, m1, [%9+0x10], m3 SBUTTERFLY wd, 5, 7, 0 SBUTTERFLY dq, 1, 5, 0 SBUTTERFLY dq, 2, 6, 0 punpckldq m3, m7 movq [%9+0x10], m2 movq [%9+0x20], m6 movq [%9+0x30], m1 movq [%9+0x40], m5 movq [%9+0x50], m3 %endif RESET_MM_PERMUTATION %endmacro ; in: 8 rows of 8 in %1..%8 ; out: 8 rows of 8 in %9..%16 %macro TRANSPOSE8x8_MEM 16 RESET_MM_PERMUTATION %if cpuflag(avx) movh m0, %1 movh m4, %2 movh m1, %3 movh m5, %4 movh m2, %5 movh m3, %7 punpcklbw m0, m4 punpcklbw m1, m5 movh m4, %6 movh m5, %8 punpcklbw m2, m4 punpcklbw m3, m5 SBUTTERFLY wd, 0, 1, 4 SBUTTERFLY wd, 2, 3, 4 SBUTTERFLY dq, 0, 2, 4 SBUTTERFLY dq, 1, 3, 4 movh %9, m0 movhps %10, m0 movh %11, m2 movhps %12, m2 movh %13, m1 movhps %14, m1 movh %15, m3 movhps %16, m3 %else movq m0, %1 movq m1, %2 movq m2, %3 movq m3, %4 movq m4, %5 movq m5, %6 movq m6, %7 SBUTTERFLY bw, 0, 1, 7 SBUTTERFLY bw, 2, 3, 7 SBUTTERFLY bw, 4, 5, 7 SBUTTERFLY3 bw, m6, %8, m7 movq %9, m5 SBUTTERFLY wd, 0, 2, 5 SBUTTERFLY wd, 4, 6, 5 SBUTTERFLY wd, 1, 3, 5 movq %11, m6 movq m6, %9 SBUTTERFLY wd, 6, 7, 5 SBUTTERFLY dq, 0, 4, 5 SBUTTERFLY dq, 1, 6, 5 movq %9, m0 movq %10, m4 movq %13, m1 movq %14, m6 SBUTTERFLY3 dq, m2, %11, m0 SBUTTERFLY dq, 3, 7, 4 movq %11, m2 movq %12, m0 movq %15, m3 movq %16, m7 %endif RESET_MM_PERMUTATION %endmacro ; out: %4 = |%1-%2|>%3 ; clobbers: %5 %macro DIFF_GT 5 %if avx_enabled == 0 mova %5, %2 mova %4, %1 psubusb %5, %1 psubusb %4, %2 %else psubusb %5, %2, %1 psubusb %4, %1, %2 %endif por %4, %5 psubusb %4, %3 %endmacro ; out: %4 = |%1-%2|>%3 ; clobbers: %5 %macro DIFF_GT2 5-6 %if %0<6 psubusb %4, %1, %2 psubusb %5, %2, %1 %else mova %4, %1 mova %5, %2 psubusb %4, %2 psubusb %5, %1 %endif psubusb %5, %3 psubusb %4, %3 pcmpeqb %4, %5 %endmacro ; in: m0=p1 m1=p0 m2=q0 m3=q1 %1=alpha %2=beta ; out: m5=beta-1, m7=mask, %3=alpha-1 ; clobbers: m4,m6 %macro LOAD_MASK 2-3 %if cpuflag(ssse3) movd m4, %1 movd m5, %2 pxor m6, m6 pshufb m4, m6 pshufb m5, m6 %else movd m4, %1 movd m5, %2 punpcklbw m4, m4 punpcklbw m5, m5 SPLATW m4, m4 SPLATW m5, m5 %endif mova m6, [pb_1] psubusb m4, m6 ; alpha - 1 psubusb m5, m6 ; beta - 1 %if %0>2 mova %3, m4 %endif DIFF_GT m1, m2, m4, m7, m6 ; |p0-q0| > alpha-1 DIFF_GT m0, m1, m5, m4, m6 ; |p1-p0| > beta-1 por m7, m4 DIFF_GT m3, m2, m5, m4, m6 ; |q1-q0| > beta-1 por m7, m4 pxor m6, m6 pcmpeqb m7, m6 %endmacro ; in: m0=p1 m1=p0 m2=q0 m3=q1 m7=(tc&mask) ; out: m1=p0' m2=q0' ; clobbers: m0,3-6 %macro DEBLOCK_P0_Q0 0 pxor m5, m1, m2 ; p0^q0 pand m5, [pb_1] ; (p0^q0)&1 pcmpeqb m4, m4 pxor m3, m4 pavgb m3, m0 ; (p1 - q1 + 256)>>1 pavgb m3, [pb_3] ; (((p1 - q1 + 256)>>1)+4)>>1 = 64+2+(p1-q1)>>2 pxor m4, m1 pavgb m4, m2 ; (q0 - p0 + 256)>>1 pavgb m3, m5 paddusb m3, m4 ; d+128+33 mova m6, [pb_a1] psubusb m6, m3 psubusb m3, [pb_a1] pminub m6, m7 pminub m3, m7 psubusb m1, m6 psubusb m2, m3 paddusb m1, m3 paddusb m2, m6 %endmacro ; in: m1=p0 m2=q0 ; %1=p1 %2=q2 %3=[q2] %4=[q1] %5=tc0 %6=tmp ; out: [q1] = clip( (q2+((p0+q0+1)>>1))>>1, q1-tc0, q1+tc0 ) ; clobbers: q2, tmp, tc0 %macro LUMA_Q1 6 pavgb %6, m1, m2 pavgb %2, %6 ; avg(p2,avg(p0,q0)) pxor %6, %3 pand %6, [pb_1] ; (p2^avg(p0,q0))&1 psubusb %2, %6 ; (p2+((p0+q0+1)>>1))>>1 psubusb %6, %1, %5 paddusb %5, %1 pmaxub %2, %6 pminub %2, %5 mova %4, %2 %endmacro %if ARCH_X86_64 ;----------------------------------------------------------------------------- ; void deblock_v_luma( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- %macro DEBLOCK_LUMA 0 cglobal deblock_v_luma, 5,5,10 movd m8, [r4] ; tc0 lea r4, [r1*3] neg r4 add r4, r0 ; pix-3*stride mova m0, [r4+r1] ; p1 mova m1, [r4+2*r1] ; p0 mova m2, [r0] ; q0 mova m3, [r0+r1] ; q1 LOAD_MASK r2d, r3d %if cpuflag(avx) pshufb m8, [pb_unpackbd1] pblendvb m9, m7, m6, m8 %else punpcklbw m8, m8 punpcklbw m8, m8 ; tc = 4x tc0[3], 4x tc0[2], 4x tc0[1], 4x tc0[0] pcmpeqb m9, m9 pcmpeqb m9, m8 pandn m9, m7 %endif pand m8, m9 mova m3, [r4] ; p2 DIFF_GT2 m1, m3, m5, m6, m7 ; |p2-p0| > beta-1 pand m6, m9 psubb m7, m8, m6 ; tc++ pand m6, m8 LUMA_Q1 m0, m3, [r4], [r4+r1], m6, m4 mova m4, [r0+2*r1] ; q2 DIFF_GT2 m2, m4, m5, m6, m3 ; |q2-q0| > beta-1 pand m6, m9 pand m8, m6 psubb m7, m6 mova m3, [r0+r1] LUMA_Q1 m3, m4, [r0+2*r1], [r0+r1], m8, m6 DEBLOCK_P0_Q0 mova [r4+2*r1], m1 mova [r0], m2 RET ;----------------------------------------------------------------------------- ; void deblock_h_luma( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- %if cpuflag(avx) INIT_XMM cpuname %else INIT_MMX cpuname %endif cglobal deblock_h_luma, 5,9,0,0x60+16*WIN64 lea r8, [r1*3] lea r6, [r0-4] lea r5, [r0-4+r8] %xdefine pix_tmp rsp+0x30*WIN64 ; shadow space + r4 ; transpose 6x16 -> tmp space TRANSPOSE6x8_MEM PASS8ROWS(r6, r5, r1, r8), pix_tmp lea r6, [r6+r1*8] lea r5, [r5+r1*8] TRANSPOSE6x8_MEM PASS8ROWS(r6, r5, r1, r8), pix_tmp+8 ; vertical filter ; alpha, beta, tc0 are still in r2d, r3d, r4 ; don't backup r6, r5, r7, r8 because deblock_v_luma_sse2 doesn't use them mov r7, r1 lea r0, [pix_tmp+0x30] mov r1d, 0x10 %if WIN64 mov [rsp+0x20], r4 %endif call deblock_v_luma ; transpose 16x4 -> original space (only the middle 4 rows were changed by the filter) add r6, 2 add r5, 2 %if cpuflag(sse4) mova m0, [pix_tmp+0x10] mova m1, [pix_tmp+0x20] mova m2, [pix_tmp+0x30] mova m3, [pix_tmp+0x40] SBUTTERFLY bw, 0, 1, 4 SBUTTERFLY bw, 2, 3, 4 SBUTTERFLY wd, 0, 2, 4 SBUTTERFLY wd, 1, 3, 4 STORE_8x4B PASS8ROWS(r6, r5, r7, r8), m1, m3 shl r7, 3 sub r6, r7 sub r5, r7 shr r7, 3 STORE_8x4B PASS8ROWS(r6, r5, r7, r8), m0, m2 %else movq m0, [pix_tmp+0x18] movq m1, [pix_tmp+0x28] movq m2, [pix_tmp+0x38] movq m3, [pix_tmp+0x48] TRANSPOSE8x4B_STORE PASS8ROWS(r6, r5, r7, r8) shl r7, 3 sub r6, r7 sub r5, r7 shr r7, 3 movq m0, [pix_tmp+0x10] movq m1, [pix_tmp+0x20] movq m2, [pix_tmp+0x30] movq m3, [pix_tmp+0x40] TRANSPOSE8x4B_STORE PASS8ROWS(r6, r5, r7, r8) %endif RET %endmacro INIT_XMM sse2 DEBLOCK_LUMA INIT_XMM avx DEBLOCK_LUMA %else %macro DEBLOCK_LUMA 2 ;----------------------------------------------------------------------------- ; void deblock_v8_luma( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_%1_luma, 5,5,8,2*%2 lea r4, [r1*3] neg r4 add r4, r0 ; pix-3*stride mova m0, [r4+r1] ; p1 mova m1, [r4+2*r1] ; p0 mova m2, [r0] ; q0 mova m3, [r0+r1] ; q1 LOAD_MASK r2d, r3d mov r3, r4mp movd m4, [r3] ; tc0 %if cpuflag(avx) pshufb m4, [pb_unpackbd1] mova [esp+%2], m4 ; tc pblendvb m4, m7, m6, m4 %else punpcklbw m4, m4 punpcklbw m4, m4 ; tc = 4x tc0[3], 4x tc0[2], 4x tc0[1], 4x tc0[0] mova [esp+%2], m4 ; tc pcmpeqb m3, m3 pcmpgtb m4, m3 pand m4, m7 %endif mova [esp], m4 ; mask mova m3, [r4] ; p2 DIFF_GT2 m1, m3, m5, m6, m7 ; |p2-p0| > beta-1 pand m6, m4 pand m4, [esp+%2] ; tc psubb m7, m4, m6 pand m6, m4 LUMA_Q1 m0, m3, [r4], [r4+r1], m6, m4 mova m4, [r0+2*r1] ; q2 DIFF_GT2 m2, m4, m5, m6, m3 ; |q2-q0| > beta-1 mova m5, [esp] ; mask pand m6, m5 mova m5, [esp+%2] ; tc pand m5, m6 psubb m7, m6 mova m3, [r0+r1] LUMA_Q1 m3, m4, [r0+2*r1], [r0+r1], m5, m6 DEBLOCK_P0_Q0 mova [r4+2*r1], m1 mova [r0], m2 RET ;----------------------------------------------------------------------------- ; void deblock_h_luma( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- %if cpuflag(avx) INIT_XMM cpuname %else INIT_MMX cpuname %endif cglobal deblock_h_luma, 1,5,8,0x60+12 mov r3, r1m lea r4, [r3*3] sub r0, 4 lea r1, [r0+r4] %define pix_tmp esp+12 ; esp is intentionally misaligned to make it aligned after pushing the arguments for deblock_%1_luma. ; transpose 6x16 -> tmp space TRANSPOSE6x8_MEM PASS8ROWS(r0, r1, r3, r4), pix_tmp lea r0, [r0+r3*8] lea r1, [r1+r3*8] TRANSPOSE6x8_MEM PASS8ROWS(r0, r1, r3, r4), pix_tmp+8 ; vertical filter lea r0, [pix_tmp+0x30] PUSH dword r4m PUSH dword r3m PUSH dword r2m PUSH dword 16 PUSH dword r0 call deblock_%1_luma %ifidn %1, v8 add dword [esp ], 8 ; pix_tmp+0x38 add dword [esp+16], 2 ; tc0+2 call deblock_%1_luma %endif ADD esp, 20 ; transpose 16x4 -> original space (only the middle 4 rows were changed by the filter) mov r0, r0mp sub r0, 2 lea r1, [r0+r4] %if cpuflag(avx) mova m0, [pix_tmp+0x10] mova m1, [pix_tmp+0x20] mova m2, [pix_tmp+0x30] mova m3, [pix_tmp+0x40] SBUTTERFLY bw, 0, 1, 4 SBUTTERFLY bw, 2, 3, 4 SBUTTERFLY wd, 0, 2, 4 SBUTTERFLY wd, 1, 3, 4 STORE_8x4B PASS8ROWS(r0, r1, r3, r4), m0, m2 lea r0, [r0+r3*8] lea r1, [r1+r3*8] STORE_8x4B PASS8ROWS(r0, r1, r3, r4), m1, m3 %else movq m0, [pix_tmp+0x10] movq m1, [pix_tmp+0x20] movq m2, [pix_tmp+0x30] movq m3, [pix_tmp+0x40] TRANSPOSE8x4B_STORE PASS8ROWS(r0, r1, r3, r4) lea r0, [r0+r3*8] lea r1, [r1+r3*8] movq m0, [pix_tmp+0x18] movq m1, [pix_tmp+0x28] movq m2, [pix_tmp+0x38] movq m3, [pix_tmp+0x48] TRANSPOSE8x4B_STORE PASS8ROWS(r0, r1, r3, r4) %endif RET %endmacro ; DEBLOCK_LUMA INIT_MMX mmx2 DEBLOCK_LUMA v8, 8 INIT_XMM sse2 DEBLOCK_LUMA v, 16 INIT_XMM avx DEBLOCK_LUMA v, 16 %endif ; ARCH %macro LUMA_INTRA_P012 4 ; p0..p3 in memory %if ARCH_X86_64 pavgb t0, p2, p1 pavgb t1, p0, q0 %else mova t0, p2 mova t1, p0 pavgb t0, p1 pavgb t1, q0 %endif pavgb t0, t1 ; ((p2+p1+1)/2 + (p0+q0+1)/2 + 1)/2 mova t5, t1 %if ARCH_X86_64 paddb t2, p2, p1 paddb t3, p0, q0 %else mova t2, p2 mova t3, p0 paddb t2, p1 paddb t3, q0 %endif paddb t2, t3 mova t3, t2 mova t4, t2 psrlw t2, 1 pavgb t2, mpb_0 pxor t2, t0 pand t2, mpb_1 psubb t0, t2 ; p1' = (p2+p1+p0+q0+2)/4; %if ARCH_X86_64 pavgb t1, p2, q1 psubb t2, p2, q1 %else mova t1, p2 mova t2, p2 pavgb t1, q1 psubb t2, q1 %endif paddb t3, t3 psubb t3, t2 ; p2+2*p1+2*p0+2*q0+q1 pand t2, mpb_1 psubb t1, t2 pavgb t1, p1 pavgb t1, t5 ; (((p2+q1)/2 + p1+1)/2 + (p0+q0+1)/2 + 1)/2 psrlw t3, 2 pavgb t3, mpb_0 pxor t3, t1 pand t3, mpb_1 psubb t1, t3 ; p0'a = (p2+2*p1+2*p0+2*q0+q1+4)/8 pxor t3, p0, q1 pavgb t2, p0, q1 pand t3, mpb_1 psubb t2, t3 pavgb t2, p1 ; p0'b = (2*p1+p0+q0+2)/4 pxor t1, t2 pxor t2, p0 pand t1, mask1p pand t2, mask0 pxor t1, t2 pxor t1, p0 mova %1, t1 ; store p0 mova t1, %4 ; p3 paddb t2, t1, p2 pavgb t1, p2 pavgb t1, t0 ; (p3+p2+1)/2 + (p2+p1+p0+q0+2)/4 paddb t2, t2 paddb t2, t4 ; 2*p3+3*p2+p1+p0+q0 psrlw t2, 2 pavgb t2, mpb_0 pxor t2, t1 pand t2, mpb_1 psubb t1, t2 ; p2' = (2*p3+3*p2+p1+p0+q0+4)/8 pxor t0, p1 pxor t1, p2 pand t0, mask1p pand t1, mask1p pxor t0, p1 pxor t1, p2 mova %2, t0 ; store p1 mova %3, t1 ; store p2 %endmacro %macro LUMA_INTRA_SWAP_PQ 0 %define q1 m0 %define q0 m1 %define p0 m2 %define p1 m3 %define p2 q2 %define mask1p mask1q %endmacro %macro DEBLOCK_LUMA_INTRA 1 %define p1 m0 %define p0 m1 %define q0 m2 %define q1 m3 %define t0 m4 %define t1 m5 %define t2 m6 %define t3 m7 %if ARCH_X86_64 %define p2 m8 %define q2 m9 %define t4 m10 %define t5 m11 %define mask0 m12 %define mask1p m13 %if WIN64 %define mask1q [rsp] %else %define mask1q [rsp-24] %endif %define mpb_0 m14 %define mpb_1 m15 %else %define spill(x) [esp+16*x] %define p2 [r4+r1] %define q2 [r0+2*r1] %define t4 spill(0) %define t5 spill(1) %define mask0 spill(2) %define mask1p spill(3) %define mask1q spill(4) %define mpb_0 [pb_0] %define mpb_1 [pb_1] %endif ;----------------------------------------------------------------------------- ; void deblock_v_luma_intra( uint8_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_%1_luma_intra, 4,6,16,0-(1-ARCH_X86_64)*0x50-WIN64*0x10 lea r4, [r1*4] lea r5, [r1*3] ; 3*stride neg r4 add r4, r0 ; pix-4*stride mova p1, [r4+2*r1] mova p0, [r4+r5] mova q0, [r0] mova q1, [r0+r1] %if ARCH_X86_64 pxor mpb_0, mpb_0 mova mpb_1, [pb_1] LOAD_MASK r2d, r3d, t5 ; m5=beta-1, t5=alpha-1, m7=mask0 SWAP 7, 12 ; m12=mask0 pavgb t5, mpb_0 pavgb t5, mpb_1 ; alpha/4+1 movdqa p2, [r4+r1] movdqa q2, [r0+2*r1] DIFF_GT2 p0, q0, t5, t0, t3 ; t0 = |p0-q0| > alpha/4+1 DIFF_GT2 p0, p2, m5, t2, t5, 1 ; mask1 = |p2-p0| > beta-1 DIFF_GT2 q0, q2, m5, t4, t5, 1 ; t4 = |q2-q0| > beta-1 pand t0, mask0 pand t4, t0 pand t2, t0 mova mask1q, t4 mova mask1p, t2 %else LOAD_MASK r2d, r3d, t5 ; m5=beta-1, t5=alpha-1, m7=mask0 mova m4, t5 mova mask0, m7 pavgb m4, [pb_0] pavgb m4, [pb_1] ; alpha/4+1 DIFF_GT2 p0, q0, m4, m6, m7 ; m6 = |p0-q0| > alpha/4+1 pand m6, mask0 DIFF_GT2 p0, p2, m5, m4, m7, 1 ; m4 = |p2-p0| > beta-1 pand m4, m6 mova mask1p, m4 DIFF_GT2 q0, q2, m5, m4, m7, 1 ; m4 = |q2-q0| > beta-1 pand m4, m6 mova mask1q, m4 %endif LUMA_INTRA_P012 [r4+r5], [r4+2*r1], [r4+r1], [r4] LUMA_INTRA_SWAP_PQ LUMA_INTRA_P012 [r0], [r0+r1], [r0+2*r1], [r0+r5] .end: REP_RET %if cpuflag(avx) INIT_XMM cpuname %else INIT_MMX cpuname %endif %if ARCH_X86_64 ;----------------------------------------------------------------------------- ; void deblock_h_luma_intra( uint8_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_h_luma_intra, 4,9,0,0x80 lea r8, [r1*3] lea r6, [r0-4] lea r5, [r0-4+r8] %if WIN64 %define pix_tmp rsp+0x20 ; shadow space %else %define pix_tmp rsp %endif ; transpose 8x16 -> tmp space TRANSPOSE8x8_MEM PASS8ROWS(r6, r5, r1, r8), PASS8ROWS(pix_tmp, pix_tmp+0x30, 0x10, 0x30) lea r6, [r6+r1*8] lea r5, [r5+r1*8] TRANSPOSE8x8_MEM PASS8ROWS(r6, r5, r1, r8), PASS8ROWS(pix_tmp+8, pix_tmp+0x38, 0x10, 0x30) mov r7, r1 lea r0, [pix_tmp+0x40] mov r1, 0x10 call deblock_v_luma_intra ; transpose 16x6 -> original space (but we can't write only 6 pixels, so really 16x8) lea r5, [r6+r8] TRANSPOSE8x8_MEM PASS8ROWS(pix_tmp+8, pix_tmp+0x38, 0x10, 0x30), PASS8ROWS(r6, r5, r7, r8) shl r7, 3 sub r6, r7 sub r5, r7 shr r7, 3 TRANSPOSE8x8_MEM PASS8ROWS(pix_tmp, pix_tmp+0x30, 0x10, 0x30), PASS8ROWS(r6, r5, r7, r8) RET %else cglobal deblock_h_luma_intra, 2,4,8,0x80 lea r3, [r1*3] sub r0, 4 lea r2, [r0+r3] %define pix_tmp rsp ; transpose 8x16 -> tmp space TRANSPOSE8x8_MEM PASS8ROWS(r0, r2, r1, r3), PASS8ROWS(pix_tmp, pix_tmp+0x30, 0x10, 0x30) lea r0, [r0+r1*8] lea r2, [r2+r1*8] TRANSPOSE8x8_MEM PASS8ROWS(r0, r2, r1, r3), PASS8ROWS(pix_tmp+8, pix_tmp+0x38, 0x10, 0x30) lea r0, [pix_tmp+0x40] PUSH dword r3m PUSH dword r2m PUSH dword 16 PUSH r0 call deblock_%1_luma_intra %ifidn %1, v8 add dword [rsp], 8 ; pix_tmp+8 call deblock_%1_luma_intra %endif ADD esp, 16 mov r1, r1m mov r0, r0mp lea r3, [r1*3] sub r0, 4 lea r2, [r0+r3] ; transpose 16x6 -> original space (but we can't write only 6 pixels, so really 16x8) TRANSPOSE8x8_MEM PASS8ROWS(pix_tmp, pix_tmp+0x30, 0x10, 0x30), PASS8ROWS(r0, r2, r1, r3) lea r0, [r0+r1*8] lea r2, [r2+r1*8] TRANSPOSE8x8_MEM PASS8ROWS(pix_tmp+8, pix_tmp+0x38, 0x10, 0x30), PASS8ROWS(r0, r2, r1, r3) RET %endif ; ARCH_X86_64 %endmacro ; DEBLOCK_LUMA_INTRA INIT_XMM sse2 DEBLOCK_LUMA_INTRA v INIT_XMM avx DEBLOCK_LUMA_INTRA v %if ARCH_X86_64 == 0 INIT_MMX mmx2 DEBLOCK_LUMA_INTRA v8 %endif %endif ; !HIGH_BIT_DEPTH %if HIGH_BIT_DEPTH ; in: %1=p0, %2=q0, %3=p1, %4=q1, %5=mask, %6=tmp, %7=tmp ; out: %1=p0', %2=q0' %macro CHROMA_DEBLOCK_P0_Q0_INTRA 7 mova %6, [pw_2] paddw %6, %3 paddw %6, %4 paddw %7, %6, %2 paddw %6, %1 paddw %6, %3 paddw %7, %4 psraw %6, 2 psraw %7, 2 psubw %6, %1 psubw %7, %2 pand %6, %5 pand %7, %5 paddw %1, %6 paddw %2, %7 %endmacro ; out: m0-m3 ; clobbers: m4-m7 %macro CHROMA_H_LOAD 0-1 movq m0, [r0-8] ; p1 p1 p0 p0 movq m2, [r0] ; q0 q0 q1 q1 movq m5, [r0+r1-8] movq m7, [r0+r1] %if mmsize == 8 mova m1, m0 mova m3, m2 punpckldq m0, m5 ; p1 punpckhdq m1, m5 ; p0 punpckldq m2, m7 ; q0 punpckhdq m3, m7 ; q1 %else movq m4, [r0+r1*2-8] movq m6, [r0+r1*2] movq m1, [r0+%1-8] movq m3, [r0+%1] punpckldq m0, m5 ; p1 ... p0 ... punpckldq m2, m7 ; q0 ... q1 ... punpckldq m4, m1 punpckldq m6, m3 punpckhqdq m1, m0, m4 ; p0 punpcklqdq m0, m4 ; p1 punpckhqdq m3, m2, m6 ; q1 punpcklqdq m2, m6 ; q0 %endif %endmacro %macro CHROMA_V_LOAD 1 mova m0, [r0] ; p1 mova m1, [r0+r1] ; p0 mova m2, [%1] ; q0 mova m3, [%1+r1] ; q1 %endmacro ; clobbers: m1, m2, m3 %macro CHROMA_H_STORE 0-1 SBUTTERFLY dq, 1, 2, 3 %if mmsize == 8 movq [r0-4], m1 movq [r0+r1-4], m2 %else movq [r0-4], m1 movq [r0+r1*2-4], m2 movhps [r0+r1-4], m1 movhps [r0+%1-4], m2 %endif %endmacro %macro CHROMA_V_STORE 0 mova [r0+1*r1], m1 mova [r0+2*r1], m2 %endmacro %macro DEBLOCK_CHROMA 0 cglobal deblock_inter_body LOAD_AB m4, m5, r2d, r3d LOAD_MASK m0, m1, m2, m3, m4, m5, m7, m6, m4 pxor m4, m4 LOAD_TC m6, r4 pmaxsw m6, m4 pand m7, m6 DEBLOCK_P0_Q0 m1, m2, m0, m3, m7, m5, m6 ret ;----------------------------------------------------------------------------- ; void deblock_v_chroma( uint16_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_v_chroma, 5,7,8 FIX_STRIDES r1 mov r5, r0 sub r0, r1 sub r0, r1 mov r6, 32/mmsize .loop: CHROMA_V_LOAD r5 call deblock_inter_body CHROMA_V_STORE add r0, mmsize add r5, mmsize add r4, mmsize/8 dec r6 jg .loop RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma( uint16_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma, 5,7,8 add r1, r1 mov r5, 32/mmsize %if mmsize == 16 lea r6, [r1*3] %endif .loop: CHROMA_H_LOAD r6 call deblock_inter_body CHROMA_H_STORE r6 lea r0, [r0+r1*(mmsize/4)] add r4, mmsize/8 dec r5 jg .loop RET cglobal deblock_intra_body LOAD_AB m4, m5, r2d, r3d LOAD_MASK m0, m1, m2, m3, m4, m5, m7, m6, m4 CHROMA_DEBLOCK_P0_Q0_INTRA m1, m2, m0, m3, m7, m5, m6 ret ;----------------------------------------------------------------------------- ; void deblock_v_chroma_intra( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_v_chroma_intra, 4,6,8 add r1, r1 mov r5, 32/mmsize movd m5, r3d mov r4, r0 sub r0, r1 sub r0, r1 SPLATW m5, m5 .loop: CHROMA_V_LOAD r4 call deblock_intra_body CHROMA_V_STORE add r0, mmsize add r4, mmsize dec r5 jg .loop RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma_intra( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma_intra, 4,6,8 add r1, r1 mov r4, 32/mmsize %if mmsize == 16 lea r5, [r1*3] %endif .loop: CHROMA_H_LOAD r5 call deblock_intra_body CHROMA_H_STORE r5 lea r0, [r0+r1*(mmsize/4)] dec r4 jg .loop RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma_intra_mbaff( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma_intra_mbaff, 4,6,8 add r1, r1 %if mmsize == 8 mov r4, 16/mmsize .loop: %else lea r5, [r1*3] %endif CHROMA_H_LOAD r5 LOAD_AB m4, m5, r2d, r3d LOAD_MASK m0, m1, m2, m3, m4, m5, m7, m6, m4 CHROMA_DEBLOCK_P0_Q0_INTRA m1, m2, m0, m3, m7, m5, m6 CHROMA_H_STORE r5 %if mmsize == 8 lea r0, [r0+r1*(mmsize/4)] dec r4 jg .loop %endif RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma_mbaff( uint16_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma_mbaff, 5,7,8 add r1, r1 lea r6, [r1*3] %if mmsize == 8 mov r5, 16/mmsize .loop: %endif CHROMA_H_LOAD r6 LOAD_AB m4, m5, r2d, r3d LOAD_MASK m0, m1, m2, m3, m4, m5, m7, m6, m4 movd m6, [r4] punpcklbw m6, m6 psraw m6, 8 punpcklwd m6, m6 pand m7, m6 DEBLOCK_P0_Q0 m1, m2, m0, m3, m7, m5, m6 CHROMA_H_STORE r6 %if mmsize == 8 lea r0, [r0+r1*(mmsize/4)] add r4, mmsize/4 dec r5 jg .loop %endif RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma_422_intra( uint16_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma_422_intra, 4,6,8 add r1, r1 mov r4, 64/mmsize %if mmsize == 16 lea r5, [r1*3] %endif .loop: CHROMA_H_LOAD r5 call deblock_intra_body CHROMA_H_STORE r5 lea r0, [r0+r1*(mmsize/4)] dec r4 jg .loop RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma_422( uint16_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma_422, 5,7,8 add r1, r1 mov r5, 64/mmsize lea r6, [r1*3] .loop: CHROMA_H_LOAD r6 LOAD_AB m4, m5, r2m, r3d LOAD_MASK m0, m1, m2, m3, m4, m5, m7, m6, m4 pxor m4, m4 movd m6, [r4-1] psraw m6, 8 SPLATW m6, m6 pmaxsw m6, m4 pand m7, m6 DEBLOCK_P0_Q0 m1, m2, m0, m3, m7, m5, m6 CHROMA_H_STORE r6 lea r0, [r0+r1*(mmsize/4)] %if mmsize == 16 inc r4 %else mov r2, r5 and r2, 1 add r4, r2 ; increment once every 2 iterations %endif dec r5 jg .loop RET %endmacro ; DEBLOCK_CHROMA %if ARCH_X86_64 == 0 INIT_MMX mmx2 DEBLOCK_CHROMA %endif INIT_XMM sse2 DEBLOCK_CHROMA INIT_XMM avx DEBLOCK_CHROMA %endif ; HIGH_BIT_DEPTH %if HIGH_BIT_DEPTH == 0 %macro CHROMA_V_START 0 mov t5, r0 sub t5, r1 sub t5, r1 %if mmsize==8 mov dword r0m, 2 .loop: %endif %endmacro %macro CHROMA_H_START 0 sub r0, 4 lea t6, [r1*3] mov t5, r0 add r0, t6 %endmacro %macro CHROMA_V_LOOP 1 %if mmsize==8 add r0, 8 add t5, 8 %if %1 add r4, 2 %endif dec dword r0m jg .loop %endif %endmacro %macro CHROMA_H_LOOP 1 %if mmsize==8 lea r0, [r0+r1*4] lea t5, [t5+r1*4] %if %1 add r4, 2 %endif dec dword r0m jg .loop %endif %endmacro %define t5 r5 %define t6 r6 %macro DEBLOCK_CHROMA 0 cglobal chroma_inter_body LOAD_MASK r2d, r3d movd m6, [r4] ; tc0 punpcklbw m6, m6 punpcklbw m6, m6 pand m7, m6 DEBLOCK_P0_Q0 ret ;----------------------------------------------------------------------------- ; void deblock_v_chroma( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_v_chroma, 5,6,8 CHROMA_V_START mova m0, [t5] mova m1, [t5+r1] mova m2, [r0] mova m3, [r0+r1] call chroma_inter_body mova [t5+r1], m1 mova [r0], m2 CHROMA_V_LOOP 1 RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma, 5,7,8 CHROMA_H_START %if mmsize==8 mov dword r0m, 2 .loop: %endif TRANSPOSE4x8W_LOAD PASS8ROWS(t5, r0, r1, t6) call chroma_inter_body TRANSPOSE8x2W_STORE PASS8ROWS(t5, r0, r1, t6, 2) CHROMA_H_LOOP 1 RET %endmacro ; DEBLOCK_CHROMA INIT_XMM sse2 DEBLOCK_CHROMA INIT_XMM avx DEBLOCK_CHROMA %if ARCH_X86_64 == 0 INIT_MMX mmx2 DEBLOCK_CHROMA %endif ;----------------------------------------------------------------------------- ; void deblock_h_chroma_mbaff( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ) ;----------------------------------------------------------------------------- %macro DEBLOCK_H_CHROMA_420_MBAFF 0 cglobal deblock_h_chroma_mbaff, 5,7,8 CHROMA_H_START TRANSPOSE4x4W_LOAD PASS8ROWS(t5, r0, r1, t6) LOAD_MASK r2d, r3d movd m6, [r4] ; tc0 punpcklbw m6, m6 pand m7, m6 DEBLOCK_P0_Q0 TRANSPOSE4x2W_STORE PASS8ROWS(t5, r0, r1, t6, 2) RET %endmacro INIT_XMM sse2 DEBLOCK_H_CHROMA_420_MBAFF %if ARCH_X86_64 == 0 INIT_MMX mmx2 DEBLOCK_H_CHROMA_420_MBAFF %endif %macro DEBLOCK_H_CHROMA_422 0 cglobal deblock_h_chroma_422, 5,8,8 %if ARCH_X86_64 %define cntr r7 %else %define cntr dword r0m %endif CHROMA_H_START mov cntr, 32/mmsize .loop: TRANSPOSE4x8W_LOAD PASS8ROWS(t5, r0, r1, t6) LOAD_MASK r2d, r3d movd m6, [r4] ; tc0 punpcklbw m6, m6 %if mmsize == 16 punpcklbw m6, m6 punpcklbw m6, m6 %else pshufw m6, m6, q0000 %endif pand m7, m6 DEBLOCK_P0_Q0 TRANSPOSE8x2W_STORE PASS8ROWS(t5, r0, r1, t6, 2) lea r0, [r0+r1*(mmsize/2)] lea t5, [t5+r1*(mmsize/2)] add r4, mmsize/8 dec cntr jg .loop RET %endmacro INIT_MMX mmx2 DEBLOCK_H_CHROMA_422 INIT_XMM sse2 DEBLOCK_H_CHROMA_422 INIT_XMM avx DEBLOCK_H_CHROMA_422 ; in: %1=p0 %2=p1 %3=q1 ; out: p0 = (p0 + q1 + 2*p1 + 2) >> 2 %macro CHROMA_INTRA_P0 3 pxor m4, %1, %3 pand m4, [pb_1] ; m4 = (p0^q1)&1 pavgb %1, %3 psubusb %1, m4 pavgb %1, %2 ; dst = avg(p1, avg(p0,q1) - ((p0^q1)&1)) %endmacro %define t5 r4 %define t6 r5 %macro DEBLOCK_CHROMA_INTRA_BODY 0 cglobal chroma_intra_body LOAD_MASK r2d, r3d mova m5, m1 mova m6, m2 CHROMA_INTRA_P0 m1, m0, m3 CHROMA_INTRA_P0 m2, m3, m0 psubb m1, m5 psubb m2, m6 pand m1, m7 pand m2, m7 paddb m1, m5 paddb m2, m6 ret %endmacro %macro DEBLOCK_CHROMA_INTRA 0 ;----------------------------------------------------------------------------- ; void deblock_v_chroma_intra( uint8_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_v_chroma_intra, 4,5,8 CHROMA_V_START mova m0, [t5] mova m1, [t5+r1] mova m2, [r0] mova m3, [r0+r1] call chroma_intra_body mova [t5+r1], m1 mova [r0], m2 CHROMA_V_LOOP 0 RET ;----------------------------------------------------------------------------- ; void deblock_h_chroma_intra( uint8_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- cglobal deblock_h_chroma_intra, 4,6,8 CHROMA_H_START %if mmsize==8 mov dword r0m, 2 .loop: %endif TRANSPOSE4x8W_LOAD PASS8ROWS(t5, r0, r1, t6) call chroma_intra_body TRANSPOSE8x2W_STORE PASS8ROWS(t5, r0, r1, t6, 2) CHROMA_H_LOOP 0 RET cglobal deblock_h_chroma_422_intra, 4,7,8 CHROMA_H_START mov r6d, 32/mmsize .loop: TRANSPOSE4x8W_LOAD PASS8ROWS(t5, r0, r1, t6) call chroma_intra_body TRANSPOSE8x2W_STORE PASS8ROWS(t5, r0, r1, t6, 2) lea r0, [r0+r1*(mmsize/2)] lea t5, [t5+r1*(mmsize/2)] dec r6d jg .loop RET %endmacro ; DEBLOCK_CHROMA_INTRA INIT_XMM sse2 DEBLOCK_CHROMA_INTRA_BODY DEBLOCK_CHROMA_INTRA INIT_XMM avx DEBLOCK_CHROMA_INTRA_BODY DEBLOCK_CHROMA_INTRA INIT_MMX mmx2 DEBLOCK_CHROMA_INTRA_BODY %if ARCH_X86_64 == 0 DEBLOCK_CHROMA_INTRA %endif ;----------------------------------------------------------------------------- ; void deblock_h_chroma_intra_mbaff( uint8_t *pix, intptr_t stride, int alpha, int beta ) ;----------------------------------------------------------------------------- INIT_MMX mmx2 cglobal deblock_h_chroma_intra_mbaff, 4,6,8 CHROMA_H_START TRANSPOSE4x4W_LOAD PASS8ROWS(t5, r0, r1, t6) call chroma_intra_body TRANSPOSE4x2W_STORE PASS8ROWS(t5, r0, r1, t6, 2) RET %endif ; !HIGH_BIT_DEPTH ;----------------------------------------------------------------------------- ; static void deblock_strength( uint8_t nnz[48], int8_t ref[2][40], int16_t mv[2][40][2], ; uint8_t bs[2][4][4], int mvy_limit, int bframe ) ;----------------------------------------------------------------------------- %define scan8start (4+1*8) %define nnz r0+scan8start %define ref r1+scan8start %define mv r2+scan8start*4 %define bs0 r3 %define bs1 r3+32 %macro LOAD_BYTES_MMX 1 movd m2, [%1+8*0-1] movd m0, [%1+8*0] movd m3, [%1+8*2-1] movd m1, [%1+8*2] punpckldq m2, [%1+8*1-1] punpckldq m0, [%1+8*1] punpckldq m3, [%1+8*3-1] punpckldq m1, [%1+8*3] %endmacro %macro DEBLOCK_STRENGTH_REFS_MMX 0 LOAD_BYTES_MMX ref pxor m2, m0 pxor m3, m1 por m2, [bs0+0] por m3, [bs0+8] movq [bs0+0], m2 movq [bs0+8], m3 movd m2, [ref-8*1] movd m3, [ref+8*1] punpckldq m2, m0 ; row -1, row 0 punpckldq m3, m1 ; row 1, row 2 pxor m0, m2 pxor m1, m3 por m0, [bs1+0] por m1, [bs1+8] movq [bs1+0], m0 movq [bs1+8], m1 %endmacro %macro DEBLOCK_STRENGTH_MVS_MMX 2 mova m0, [mv-%2] mova m1, [mv-%2+8] psubw m0, [mv] psubw m1, [mv+8] packsswb m0, m1 ABSB m0, m1 psubusb m0, m7 packsswb m0, m0 por m0, [%1] movd [%1], m0 %endmacro %macro DEBLOCK_STRENGTH_NNZ_MMX 1 por m2, m0 por m3, m1 mova m4, [%1] mova m5, [%1+8] pminub m2, m6 pminub m3, m6 pminub m4, m6 ; mv ? 1 : 0 pminub m5, m6 paddb m2, m2 ; nnz ? 2 : 0 paddb m3, m3 pmaxub m2, m4 pmaxub m3, m5 %endmacro %macro LOAD_BYTES_XMM 1 movu m2, [%1-4] ; FIXME could be aligned if we changed nnz's allocation movu m1, [%1+12] pslldq m0, m2, 1 shufps m2, m1, q3131 ; cur nnz, all rows pslldq m1, 1 shufps m0, m1, q3131 ; left neighbors pslldq m1, m2, 4 movd m3, [%1-8] ; could be palignr if nnz was aligned por m1, m3 ; top neighbors %endmacro INIT_MMX mmx2 cglobal deblock_strength, 6,6 ; Prepare mv comparison register shl r4d, 8 add r4d, 3 - (1<<8) movd m7, r4d SPLATW m7, m7 mova m6, [pb_1] pxor m0, m0 mova [bs0+0], m0 mova [bs0+8], m0 mova [bs1+0], m0 mova [bs1+8], m0 .lists: DEBLOCK_STRENGTH_REFS_MMX mov r4d, 4 .mvs: DEBLOCK_STRENGTH_MVS_MMX bs0, 4 DEBLOCK_STRENGTH_MVS_MMX bs1, 4*8 add r2, 4*8 add r3, 4 dec r4d jg .mvs add r1, 40 add r2, 4*8 sub r3, 16 dec r5d jge .lists ; Check nnz LOAD_BYTES_MMX nnz DEBLOCK_STRENGTH_NNZ_MMX bs0 ; Transpose column output SBUTTERFLY bw, 2, 3, 4 SBUTTERFLY bw, 2, 3, 4 mova [bs0+0], m2 mova [bs0+8], m3 movd m2, [nnz-8*1] movd m3, [nnz+8*1] punpckldq m2, m0 ; row -1, row 0 punpckldq m3, m1 ; row 1, row 2 DEBLOCK_STRENGTH_NNZ_MMX bs1 mova [bs1+0], m2 mova [bs1+8], m3 RET %macro DEBLOCK_STRENGTH_XMM 0 cglobal deblock_strength, 6,6,7 ; Prepare mv comparison register shl r4d, 8 add r4d, 3 - (1<<8) movd m6, r4d SPLATW m6, m6 pxor m4, m4 ; bs0 pxor m5, m5 ; bs1 .lists: ; Check refs LOAD_BYTES_XMM ref pxor m0, m2 pxor m1, m2 por m4, m0 por m5, m1 ; Check mvs %if cpuflag(ssse3) mova m0, [mv+4*8*0] mova m1, [mv+4*8*1] palignr m3, m0, [mv+4*8*0-16], 12 palignr m2, m1, [mv+4*8*1-16], 12 psubw m0, m3 psubw m1, m2 packsswb m0, m1 mova m2, [mv+4*8*2] mova m1, [mv+4*8*3] palignr m3, m2, [mv+4*8*2-16], 12 psubw m2, m3 palignr m3, m1, [mv+4*8*3-16], 12 psubw m1, m3 packsswb m2, m1 %else movu m0, [mv-4+4*8*0] movu m1, [mv-4+4*8*1] movu m2, [mv-4+4*8*2] movu m3, [mv-4+4*8*3] psubw m0, [mv+4*8*0] psubw m1, [mv+4*8*1] psubw m2, [mv+4*8*2] psubw m3, [mv+4*8*3] packsswb m0, m1 packsswb m2, m3 %endif ABSB m0, m1 ABSB m2, m3 psubusb m0, m6 psubusb m2, m6 packsswb m0, m2 por m4, m0 mova m0, [mv+4*8*-1] mova m1, [mv+4*8* 0] mova m2, [mv+4*8* 1] mova m3, [mv+4*8* 2] psubw m0, m1 psubw m1, m2 psubw m2, m3 psubw m3, [mv+4*8* 3] packsswb m0, m1 packsswb m2, m3 ABSB m0, m1 ABSB m2, m3 psubusb m0, m6 psubusb m2, m6 packsswb m0, m2 por m5, m0 add r1, 40 add r2, 4*8*5 dec r5d jge .lists ; Check nnz LOAD_BYTES_XMM nnz por m0, m2 por m1, m2 mova m6, [pb_1] pminub m0, m6 pminub m1, m6 pminub m4, m6 ; mv ? 1 : 0 pminub m5, m6 paddb m0, m0 ; nnz ? 2 : 0 paddb m1, m1 pmaxub m4, m0 pmaxub m5, m1 %if cpuflag(ssse3) pshufb m4, [transpose_shuf] %else movhlps m3, m4 punpcklbw m4, m3 movhlps m3, m4 punpcklbw m4, m3 %endif mova [bs1], m5 mova [bs0], m4 RET %endmacro INIT_XMM sse2 DEBLOCK_STRENGTH_XMM INIT_XMM ssse3 DEBLOCK_STRENGTH_XMM INIT_XMM avx DEBLOCK_STRENGTH_XMM %macro LOAD_BYTES_YMM 1 movu m0, [%1-4] ; ___E FGHI ___J KLMN ___O PQRS ___T UVWX pshufb m0, [load_bytes_shuf] ; EFGH JKLM FGHI KLMN OPQR TUVW PQRS UVWX mova m2, [insert_top_shuf] vpermq m1, m0, q3131 ; FGHI KLMN PQRS UVWX x2 vpermd m0, m2, m0 ; EFGH JKLM OPQR TUVW ____ FGHI KLMN PQRS vpbroadcastd m2, [%1-8] ; ABCD .... vpblendd m0, m0, m2, 00010000b ; EFGH JKLM OPQR TUVW ABCD FGHI KLMN PQRS %endmacro INIT_YMM avx2 cglobal deblock_strength, 6,6,7 ; Prepare mv comparison register shl r4d, 8 add r4d, 3 - (1<<8) movd xm6, r4d vpbroadcastw m6, xm6 pxor m5, m5 ; bs0,bs1 .lists: ; Check refs LOAD_BYTES_YMM ref pxor m0, m1 por m5, m0 ; Check mvs movu xm0, [mv-4+4*8*0] vinserti128 m0, m0, [mv+4*8*-1], 1 vbroadcasti128 m2, [mv+4*8* 0] vinserti128 m1, m2, [mv-4+4*8*1], 0 vbroadcasti128 m3, [mv+4*8* 1] psubw m0, m2 psubw m1, m3 vinserti128 m2, m3, [mv-4+4*8*2], 0 vbroadcasti128 m4, [mv+4*8* 2] vinserti128 m3, m4, [mv-4+4*8*3], 0 psubw m2, m4 vbroadcasti128 m4, [mv+4*8* 3] psubw m3, m4 packsswb m0, m1 packsswb m2, m3 pabsb m0, m0 pabsb m2, m2 psubusb m0, m6 psubusb m2, m6 packsswb m0, m2 por m5, m0 add r1, 40 add r2, 4*8*5 dec r5d jge .lists ; Check nnz LOAD_BYTES_YMM nnz por m0, m1 mova m6, [pb_1] pminub m0, m6 pminub m5, m6 ; mv ? 1 : 0 paddb m0, m0 ; nnz ? 2 : 0 pmaxub m5, m0 vextracti128 [bs1], m5, 1 pshufb xm5, [transpose_shuf] mova [bs0], xm5 RET
addiu $0,$4,26691 and $3,$5,$3 addu $4,$4,$3 nor $1,$3,$3 lb $4,1($0) xori $3,$3,48036 srav $3,$3,$3 lb $5,6($0) slti $5,$5,-10094 addu $4,$4,$3 lbu $4,0($0) or $3,$5,$3 srlv $6,$2,$3 lhu $5,6($0) lh $6,16($0) sra $3,$3,16 srav $3,$4,$3 sb $1,6($0) nor $3,$4,$3 sltu $3,$4,$3 and $0,$5,$3 sllv $5,$4,$3 ori $3,$6,5644 ori $5,$1,33659 sltiu $4,$5,31243 lb $3,8($0) sllv $4,$4,$3 and $3,$3,$3 sh $3,2($0) addiu $6,$5,-21875 addiu $3,$1,-29032 srav $1,$1,$3 sltu $1,$3,$3 srl $3,$3,22 sltu $4,$3,$3 sltu $4,$3,$3 lbu $5,11($0) andi $5,$0,4175 lw $3,12($0) lhu $0,16($0) andi $5,$1,31878 srav $4,$4,$3 sll $6,$3,6 subu $3,$5,$3 sh $5,0($0) subu $3,$3,$3 lw $6,8($0) nor $0,$2,$3 sh $5,12($0) ori $5,$5,54860 addu $3,$3,$3 sll $3,$4,16 xor $0,$1,$3 slt $0,$4,$3 lw $1,4($0) lw $1,0($0) addiu $4,$3,1109 sb $4,2($0) ori $5,$3,6904 sh $6,10($0) nor $3,$3,$3 addu $4,$3,$3 lw $4,16($0) lh $3,12($0) and $5,$0,$3 addiu $1,$5,27169 xor $4,$4,$3 sb $4,5($0) sll $5,$1,22 sra $3,$5,15 lw $4,16($0) lhu $6,8($0) lw $1,16($0) slt $6,$4,$3 srlv $4,$4,$3 addiu $5,$5,-21352 andi $3,$3,29184 slt $6,$1,$3 sllv $0,$5,$3 ori $6,$4,23034 lbu $4,11($0) lhu $5,12($0) nor $3,$3,$3 sll $3,$5,22 sh $4,12($0) srav $4,$3,$3 sb $0,6($0) lbu $5,6($0) or $3,$1,$3 sw $3,4($0) sb $0,9($0) srlv $4,$4,$3 subu $3,$3,$3 srlv $3,$4,$3 lhu $1,14($0) lbu $3,14($0) sltu $5,$4,$3 sltiu $6,$1,1961 addu $5,$3,$3 andi $1,$3,62799 slti $6,$4,15865 subu $1,$3,$3 nor $4,$4,$3 subu $6,$3,$3 sb $3,1($0) sb $1,11($0) andi $3,$4,54776 or $5,$0,$3 nor $3,$3,$3 and $3,$3,$3 sltiu $4,$4,-28839 lb $3,7($0) addiu $3,$0,29082 sh $5,16($0) sra $6,$0,18 sltiu $4,$4,-28877 andi $4,$3,49633 srlv $0,$4,$3 xor $3,$3,$3 lbu $5,5($0) lw $3,16($0) sllv $0,$0,$3 lh $1,2($0) sltiu $5,$5,-13071 subu $4,$3,$3 or $5,$1,$3 and $5,$5,$3 slti $3,$0,-27901 addu $5,$3,$3 subu $3,$0,$3 sltu $4,$4,$3 ori $0,$3,21700 lw $1,12($0) addu $6,$0,$3 addiu $3,$3,13833 lb $1,10($0) sltu $4,$4,$3 srl $4,$4,16 sltiu $3,$1,22720 sltu $3,$4,$3 ori $3,$1,23186 and $1,$5,$3 addiu $1,$4,-25245 subu $3,$4,$3 sltu $3,$3,$3 addu $3,$1,$3 addu $4,$3,$3 ori $6,$3,43119 sb $3,15($0) lw $3,4($0) subu $3,$1,$3 addu $3,$1,$3 slt $4,$4,$3 lbu $2,12($0) ori $5,$1,51945 lbu $4,1($0) sltu $5,$1,$3 srav $4,$4,$3 lw $3,12($0) lh $5,8($0) addiu $4,$1,-4717 lbu $4,15($0) sw $6,16($0) lhu $6,8($0) subu $5,$3,$3 srlv $3,$1,$3 addiu $4,$6,3771 addiu $0,$0,-24143 andi $4,$6,54587 sw $5,0($0) sra $3,$3,0 lh $5,14($0) sh $4,2($0) srlv $4,$5,$3 sb $3,9($0) srl $4,$5,7 lhu $4,4($0) sll $5,$1,6 lh $1,4($0) sltu $3,$4,$3 srav $5,$5,$3 lhu $1,0($0) nor $0,$4,$3 sra $5,$0,22 addu $1,$1,$3 ori $5,$3,31930 srlv $0,$3,$3 andi $5,$2,40563 sltiu $0,$3,-9793 srav $5,$5,$3 sllv $3,$5,$3 addu $3,$4,$3 sra $5,$4,25 sltu $3,$5,$3 srav $1,$1,$3 lbu $3,10($0) subu $3,$1,$3 xor $5,$5,$3 sltu $4,$4,$3 lh $4,0($0) lh $3,2($0) xori $0,$4,6564 slt $4,$4,$3 addu $3,$3,$3 addu $0,$2,$3 subu $3,$4,$3 addiu $1,$4,-4184 andi $4,$1,50750 nor $1,$5,$3 addiu $3,$6,-1807 lb $1,16($0) sllv $1,$3,$3 sltu $4,$3,$3 sllv $5,$1,$3 lh $4,14($0) srav $0,$6,$3 slti $3,$0,-21851 subu $3,$3,$3 addiu $1,$3,-3607 slt $4,$3,$3 sb $1,6($0) slti $3,$4,-24098 addiu $0,$0,-2530 xor $1,$4,$3 addu $5,$3,$3 srav $3,$3,$3 slt $6,$4,$3 addu $1,$5,$3 addu $3,$5,$3 slti $6,$1,1168 or $6,$6,$3 lh $3,14($0) ori $4,$3,58693 xor $3,$1,$3 lbu $1,14($0) andi $0,$0,889 addiu $3,$6,23699 lh $5,10($0) lw $5,0($0) and $4,$4,$3 addu $4,$4,$3 xor $3,$0,$3 nor $3,$5,$3 slti $4,$1,-19057 sw $4,4($0) xor $3,$4,$3 lb $4,7($0) lhu $3,4($0) sll $0,$1,29 xori $5,$1,13166 subu $4,$3,$3 srlv $5,$4,$3 andi $3,$4,45744 sra $1,$4,5 lbu $4,5($0) andi $1,$1,55749 addu $1,$3,$3 sltiu $3,$3,16106 subu $0,$0,$3 andi $4,$0,29453 sra $4,$0,25 lb $4,16($0) sltu $1,$3,$3 sw $6,16($0) lh $6,16($0) lw $1,0($0) addu $1,$1,$3 lh $4,6($0) lhu $3,10($0) addu $1,$4,$3 ori $6,$4,1927 addu $5,$3,$3 lw $0,4($0) sltu $4,$4,$3 srav $3,$3,$3 srav $3,$1,$3 sw $6,0($0) andi $6,$0,41486 subu $3,$0,$3 subu $5,$1,$3 addiu $4,$3,14283 ori $4,$3,18194 sltiu $4,$0,-22368 sw $4,4($0) addu $3,$3,$3 sltu $5,$5,$3 andi $3,$1,44952 addiu $5,$0,-5292 sllv $1,$0,$3 srav $3,$3,$3 and $0,$4,$3 slti $0,$0,-3111 sltu $6,$6,$3 lb $0,3($0) srav $4,$4,$3 lbu $5,15($0) addiu $4,$0,12015 addu $3,$4,$3 lbu $5,13($0) srl $4,$1,27 addiu $6,$3,-17533 subu $4,$3,$3 andi $4,$5,2932 sltu $6,$3,$3 subu $1,$4,$3 nor $5,$5,$3 srlv $5,$4,$3 srav $1,$3,$3 sltiu $3,$3,-23428 addiu $1,$3,-29777 lhu $1,16($0) ori $1,$1,55330 sll $5,$3,4 lhu $0,6($0) andi $5,$1,64414 lw $1,8($0) subu $4,$5,$3 andi $0,$1,26542 addu $3,$4,$3 sh $5,6($0) slti $3,$0,17944 sltu $0,$3,$3 addu $4,$4,$3 sltiu $4,$1,13024 addu $1,$3,$3 subu $6,$3,$3 sltu $4,$1,$3 nor $4,$4,$3 sra $3,$1,19 subu $4,$3,$3 andi $1,$6,58183 addiu $4,$0,-2484 andi $3,$3,11309 ori $5,$5,2927 addiu $1,$1,448 sra $3,$4,26 subu $1,$3,$3 ori $3,$3,16677 sltu $4,$4,$3 lbu $3,15($0) and $1,$1,$3 sw $4,16($0) srlv $3,$3,$3 addu $5,$5,$3 xori $3,$0,7869 srav $1,$1,$3 sltu $4,$3,$3 and $4,$4,$3 subu $1,$3,$3 subu $1,$1,$3 addiu $1,$1,-26435 sh $4,8($0) sw $5,16($0) sw $1,0($0) xori $4,$6,38457 addiu $5,$3,-22295 lw $1,8($0) xor $6,$6,$3 and $4,$4,$3 sll $0,$2,30 ori $5,$4,19486 andi $1,$1,30963 sw $5,4($0) xor $3,$3,$3 slt $1,$3,$3 sh $1,2($0) sw $4,16($0) sw $1,16($0) and $5,$1,$3 srlv $4,$4,$3 slti $4,$2,13051 addu $5,$4,$3 subu $3,$4,$3 addu $1,$4,$3 xori $3,$6,40655 sll $4,$1,30 subu $3,$3,$3 sltiu $4,$1,21724 andi $3,$3,41967 addu $1,$4,$3 lh $4,10($0) addiu $4,$2,-9318 addu $3,$1,$3 sll $4,$0,29 subu $3,$4,$3 sw $0,16($0) srlv $4,$6,$3 sltiu $3,$5,21635 ori $0,$3,20931 srav $6,$6,$3 addiu $3,$3,27038 nor $0,$1,$3 addu $3,$3,$3 sltiu $1,$5,18184 sltu $5,$5,$3 lb $3,5($0) slt $3,$3,$3 srlv $1,$3,$3 subu $4,$5,$3 sb $4,14($0) sllv $5,$4,$3 sh $1,14($0) srav $4,$4,$3 sb $3,0($0) lhu $0,6($0) sb $4,15($0) sllv $1,$5,$3 nor $3,$1,$3 addiu $1,$1,-30617 addu $0,$0,$3 addu $5,$5,$3 sllv $3,$4,$3 ori $3,$3,44316 sb $4,15($0) sltiu $4,$1,-22837 slti $4,$4,16860 sra $4,$4,30 sb $5,7($0) sllv $3,$2,$3 slti $3,$5,-1484 slti $5,$4,-10209 sltu $1,$4,$3 lhu $5,14($0) addiu $3,$4,-20472 sb $1,6($0) xor $5,$5,$3 xor $0,$1,$3 sra $1,$1,12 lh $1,6($0) xori $5,$3,3678 subu $4,$4,$3 and $1,$5,$3 srav $3,$4,$3 sltu $4,$4,$3 lh $3,0($0) nor $4,$4,$3 sra $3,$1,31 sh $4,16($0) xor $3,$3,$3 slt $3,$5,$3 srlv $0,$0,$3 sra $4,$6,8 sll $3,$2,18 addiu $3,$1,24503 addu $4,$1,$3 addu $1,$4,$3 and $6,$4,$3 sll $4,$0,29 sw $1,12($0) lb $0,6($0) srl $1,$1,12 ori $0,$0,5620 sra $4,$0,25 lb $5,9($0) lb $1,15($0) nor $3,$3,$3 slt $3,$4,$3 xor $5,$4,$3 sll $4,$4,9 lh $4,8($0) ori $3,$3,28111 srl $6,$1,31 slti $3,$3,-2332 lh $4,12($0) srav $0,$4,$3 lw $6,16($0) andi $3,$3,27297 addu $4,$3,$3 and $3,$3,$3 nor $0,$1,$3 srlv $3,$0,$3 sll $1,$4,27 srav $4,$4,$3 sw $4,4($0) addiu $0,$3,5786 lb $3,16($0) srl $3,$6,25 srlv $0,$4,$3 sltu $3,$3,$3 subu $0,$3,$3 addiu $4,$0,19092 sllv $4,$4,$3 sllv $3,$1,$3 subu $4,$4,$3 or $1,$1,$3 addiu $3,$5,32447 srav $3,$3,$3 addiu $3,$3,-23638 addu $3,$0,$3 sra $3,$0,19 sll $5,$6,4 addiu $0,$2,-18319 xor $4,$3,$3 srav $3,$3,$3 xor $3,$5,$3 ori $3,$4,5536 lh $3,6($0) xori $3,$3,1188 or $3,$4,$3 ori $3,$3,49919 or $4,$6,$3 sll $5,$5,21 addiu $6,$1,15840 slti $1,$1,19649 sw $5,16($0) srl $1,$3,8 slti $3,$4,-20700 srav $3,$1,$3 lhu $3,2($0) xor $1,$1,$3 ori $4,$4,12742 sw $1,0($0) sll $6,$3,7 slti $3,$6,-31162 lh $1,10($0) addiu $4,$2,-30091 srav $1,$1,$3 addu $5,$3,$3 slt $5,$5,$3 srl $1,$1,27 sll $0,$3,20 slt $4,$3,$3 srlv $6,$6,$3 addiu $0,$1,-26755 sb $5,10($0) srl $5,$6,19 sh $6,12($0) andi $4,$3,42649 srlv $4,$6,$3 lw $4,12($0) srav $3,$2,$3 andi $3,$3,57551 or $6,$3,$3 addiu $3,$4,22517 srl $5,$5,28 ori $6,$5,41669 nor $4,$4,$3 addu $4,$3,$3 slt $4,$3,$3 srav $3,$3,$3 sw $5,4($0) sw $3,0($0) srl $5,$5,28 sra $3,$6,2 addu $3,$6,$3 addiu $6,$3,19806 nor $4,$4,$3 subu $4,$0,$3 sltu $1,$3,$3 lhu $5,16($0) xor $5,$4,$3 lw $0,16($0) sllv $0,$1,$3 addiu $5,$0,2880 sh $3,4($0) and $3,$3,$3 and $3,$5,$3 sltiu $4,$1,23731 or $3,$3,$3 srl $6,$6,11 lb $4,8($0) lbu $1,7($0) andi $3,$3,17899 addiu $4,$1,26105 sra $1,$1,20 lh $3,16($0) sb $3,8($0) and $3,$3,$3 xori $3,$5,48757 sra $3,$3,23 lw $3,4($0) xori $5,$4,23555 or $0,$3,$3 and $3,$1,$3 andi $4,$5,10797 lb $1,15($0) lhu $3,16($0) srlv $4,$4,$3 srl $4,$3,18 sltu $5,$3,$3 subu $3,$3,$3 addiu $4,$0,-16875 srl $0,$5,28 slti $6,$1,-11160 subu $2,$2,$3 xor $1,$5,$3 xori $3,$2,54797 srav $5,$2,$3 sllv $1,$1,$3 sw $3,0($0) srlv $0,$1,$3 or $3,$0,$3 sll $2,$2,5 lhu $0,6($0) sw $4,8($0) andi $5,$3,37257 srav $5,$5,$3 and $3,$1,$3 xori $5,$5,16982 sh $4,10($0) sltiu $3,$3,15328 sh $4,10($0) sltiu $4,$2,-3823 slti $3,$6,3254 lb $6,3($0) ori $3,$3,14429 ori $0,$6,31247 lb $0,12($0) and $3,$6,$3 sb $3,5($0) slti $5,$0,-14389 andi $4,$1,40822 lhu $5,14($0) lhu $4,8($0) slt $3,$4,$3 sb $3,5($0) or $3,$5,$3 srlv $4,$4,$3 xor $3,$5,$3 addiu $0,$4,-14855 or $5,$3,$3 lh $3,2($0) ori $3,$5,23038 subu $1,$5,$3 lw $3,16($0) lh $4,0($0) sll $1,$5,18 xor $3,$3,$3 or $4,$5,$3 slti $4,$6,31741 slti $3,$3,2445 sra $1,$5,17 lbu $3,7($0) and $5,$3,$3 andi $3,$4,19615 slti $5,$5,29394 sra $6,$6,10 slti $4,$3,-30034 ori $1,$3,65174 lbu $4,3($0) ori $1,$3,21561 srav $1,$1,$3 srav $6,$5,$3 srlv $3,$0,$3 or $4,$2,$3 addiu $4,$4,-28267 sra $4,$4,5 subu $3,$2,$3 slt $0,$4,$3 sllv $5,$5,$3 addiu $3,$4,19967 addu $3,$3,$3 slti $3,$5,-5764 sra $0,$5,2 or $0,$6,$3 or $1,$1,$3 srl $1,$3,8 xor $0,$6,$3 sh $4,14($0) andi $5,$3,12862 subu $6,$5,$3 srl $5,$3,16 addu $0,$6,$3 sltu $5,$1,$3 sll $3,$5,19 addu $4,$3,$3 srl $0,$0,2 xor $1,$2,$3 srl $3,$3,31 subu $5,$3,$3 sllv $6,$3,$3 addu $0,$6,$3 sltu $4,$4,$3 srav $1,$1,$3 or $5,$6,$3 xori $3,$3,64635 srl $4,$4,30 lhu $1,6($0) sra $0,$4,31 addiu $3,$3,-17219 sra $4,$4,14 sllv $4,$4,$3 addiu $5,$1,-15820 addu $1,$1,$3 sw $3,0($0) sh $3,4($0) subu $3,$5,$3 srlv $3,$3,$3 xor $1,$3,$3 or $3,$6,$3 lh $0,4($0) sw $1,12($0) srav $3,$4,$3 addu $4,$4,$3 sllv $4,$4,$3 andi $3,$4,7489 srlv $3,$5,$3 sh $1,10($0) srlv $4,$3,$3 sllv $4,$4,$3 nor $6,$2,$3 addiu $6,$3,11647 srav $4,$1,$3 lh $3,2($0) sh $3,12($0) ori $1,$0,55231 srav $3,$6,$3 sltiu $4,$1,-17184 lw $6,12($0) srlv $1,$1,$3 addiu $3,$3,-15106 sll $3,$3,0 srav $5,$5,$3 subu $3,$3,$3 sh $0,4($0) srlv $3,$2,$3 sltu $1,$4,$3 subu $3,$3,$3 subu $5,$5,$3 sw $6,12($0) xori $5,$0,48217 sra $4,$1,24 addiu $1,$1,3909 sb $5,13($0) addiu $4,$3,8144 and $3,$3,$3 sll $3,$6,10 sh $3,6($0) sra $1,$1,31 sra $1,$3,20 sw $5,16($0) lb $3,12($0) lh $5,2($0) lb $5,10($0) addiu $4,$4,-23109 subu $5,$4,$3 srl $6,$3,6 srlv $3,$0,$3 subu $3,$3,$3 lbu $5,7($0) addiu $3,$1,7120 xori $4,$5,63748 andi $3,$3,40888 addiu $4,$4,-3013 sltiu $3,$2,-23843 ori $4,$4,40268 slti $5,$1,2182 lh $6,12($0) srav $4,$5,$3 sllv $3,$5,$3 xori $3,$0,22688 subu $1,$5,$3 sb $4,6($0) sltiu $5,$3,-27673 subu $4,$3,$3 srav $4,$1,$3 ori $3,$2,21207 addiu $3,$4,-22318 addiu $1,$3,2520 ori $3,$5,27488 sh $4,4($0) sll $5,$5,22 srlv $4,$4,$3 andi $0,$5,9025 sltiu $1,$5,27779 lhu $3,2($0) or $5,$0,$3 sra $3,$1,28 sll $3,$4,31 sra $1,$3,19 subu $3,$3,$3 xor $1,$5,$3 or $3,$2,$3 sw $0,16($0) addiu $4,$3,-28485 addu $3,$4,$3 andi $3,$0,693 sw $3,4($0) addiu $4,$3,11637 nor $3,$5,$3 or $5,$4,$3 sh $3,4($0) sw $4,8($0) andi $0,$5,9460 and $0,$0,$3 sra $1,$1,14 srl $1,$1,20 addiu $3,$3,-23736 lb $4,8($0) sltu $5,$5,$3 or $3,$1,$3 lb $4,1($0) ori $3,$3,196 andi $4,$3,36724 xori $3,$3,24160 addu $3,$1,$3 srl $6,$5,12 sll $1,$5,16 subu $1,$4,$3 sb $1,13($0) andi $6,$6,1855 subu $1,$1,$3 sltiu $5,$0,-22027 addu $4,$4,$3 addiu $1,$1,-6237 xor $3,$3,$3 nor $4,$1,$3 srav $1,$3,$3 sw $5,16($0) srlv $3,$3,$3 slti $3,$4,11064 srav $3,$3,$3 andi $0,$2,33320 lbu $3,9($0) srl $1,$4,29 ori $6,$0,33909 sltiu $5,$0,-14900 sra $0,$4,31 slt $4,$5,$3 xori $1,$4,10932 lw $1,4($0) sh $1,10($0) subu $6,$6,$3 srl $3,$4,4 xor $4,$4,$3 addu $6,$2,$3 lb $5,15($0) subu $5,$1,$3 sltiu $4,$6,26142 sll $4,$4,4 sh $1,10($0) lhu $3,8($0) xor $5,$5,$3 ori $5,$3,61200 ori $3,$3,1358 sltiu $3,$5,-19930 subu $4,$5,$3 addiu $4,$4,-29863 lbu $5,2($0) sb $1,15($0) nor $6,$4,$3 sb $3,13($0) subu $0,$0,$3 subu $3,$1,$3 addiu $4,$3,-23586 addu $6,$6,$3 xor $3,$3,$3 slt $1,$5,$3 xori $4,$6,25040 xor $1,$1,$3 and $6,$3,$3 lw $3,0($0) lbu $4,10($0) and $1,$0,$3 srlv $4,$4,$3 ori $3,$5,5227 nor $3,$4,$3 addu $0,$5,$3 addiu $4,$0,-23212 addu $3,$4,$3 lh $3,4($0) addu $1,$1,$3 sw $4,8($0) lw $1,12($0) sw $3,0($0) slti $3,$5,15967 xor $6,$6,$3 nor $1,$4,$3 addu $5,$0,$3 sll $5,$5,18 sll $2,$2,9 sra $6,$1,12 addu $1,$3,$3 lh $3,10($0) or $5,$6,$3 sw $3,16($0) slti $4,$4,-1903 srl $6,$6,13 srav $4,$6,$3 addiu $3,$3,9730 nor $4,$5,$3 or $4,$3,$3 sra $3,$4,7 ori $4,$4,11753 sltu $4,$0,$3 srl $3,$4,30 srl $4,$3,1 lw $5,12($0)
/*! @file Defines `boost::hana::unfold_left`. @copyright Louis Dionne 2013-2016 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_UNFOLD_LEFT_HPP #define BOOST_HANA_UNFOLD_LEFT_HPP #include <boost/hana/fwd/unfold_left.hpp> #include <boost/hana/append.hpp> #include <boost/hana/concept/sequence.hpp> #include <boost/hana/config.hpp> #include <boost/hana/core/dispatch.hpp> #include <boost/hana/empty.hpp> #include <boost/hana/first.hpp> #include <boost/hana/functional/partial.hpp> #include <boost/hana/optional.hpp> #include <boost/hana/second.hpp> BOOST_HANA_NAMESPACE_BEGIN //! @cond template <typename S> struct unfold_left_t { #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS static_assert(hana::Sequence<S>::value, "hana::unfold_left<S> requires 'S' to be a Sequence"); #endif template <typename State, typename F> constexpr auto operator()(State&& state, F&& f) const { return unfold_left_impl<S>::apply( static_cast<State&&>(state), static_cast<F&&>(f) ); } }; //! @endcond template <typename S, bool condition> struct unfold_left_impl<S, when<condition>> : default_ { struct unfold_left_helper { template <typename F, typename P> constexpr auto operator()(F&& f, P&& p) const { return hana::append( unfold_left_impl::apply( hana::first(static_cast<P&&>(p)), static_cast<F&&>(f) ), hana::second(static_cast<P&&>(p)) ); } }; template <typename Init, typename F> static constexpr auto apply(Init&& init, F&& f) { decltype(auto) elt = f(static_cast<Init&&>(init)); return hana::maybe(empty<S>(), hana::partial(unfold_left_helper{}, static_cast<F&&>(f)), static_cast<decltype(elt)&&>(elt) ); } }; BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_UNFOLD_LEFT_HPP
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xedf9, %rsi lea addresses_A_ht+0x1bab9, %rdi nop xor $8926, %rdx mov $70, %rcx rep movsq nop add %r13, %r13 lea addresses_WT_ht+0x1b2b9, %r14 nop nop nop nop cmp $25080, %r10 movb $0x61, (%r14) nop dec %rcx lea addresses_WC_ht+0x15091, %rsi lea addresses_WC_ht+0x1eab9, %rdi dec %rdx mov $119, %rcx rep movsl nop nop nop nop nop xor %rcx, %rcx lea addresses_D_ht+0xf05f, %r13 nop nop nop sub %r10, %r10 mov $0x6162636465666768, %rdi movq %rdi, %xmm1 and $0xffffffffffffffc0, %r13 movntdq %xmm1, (%r13) nop nop nop nop nop inc %r13 lea addresses_D_ht+0xfcf1, %rsi lea addresses_WC_ht+0x1ef39, %rdi nop nop nop inc %r8 mov $31, %rcx rep movsl xor %r13, %r13 lea addresses_WC_ht+0x17e79, %rcx clflush (%rcx) nop nop sub %r13, %r13 movw $0x6162, (%rcx) nop nop nop nop xor $55031, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %rcx push %rdx push %rsi // Faulty Load lea addresses_WT+0x142b9, %rcx nop nop nop add %r11, %r11 movups (%rcx), %xmm4 vpextrq $0, %xmm4, %rsi lea oracles, %r14 and $0xff, %rsi shlq $12, %rsi mov (%r14,%rsi,1), %rsi pop %rsi pop %rdx pop %rcx pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 1, 'NT': True, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_D_ht'}} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}} {'46': 812, '48': 3277, '6b': 2, '00': 5102, '53': 1569, 'de': 20, '20': 2, 'b0': 542, 'c0': 2, '79': 237, 'ff': 10060, '80': 6, 'aa': 4, '3c': 28, '01': 116, 'e0': 2, '90': 48} 00 48 48 48 48 ff ff ff ff b0 00 ff 00 ff ff ff 01 ff 01 48 ff ff 01 48 00 ff ff ff 46 ff 48 00 ff 48 ff ff ff 01 ff ff 00 ff 00 ff ff 00 ff ff 90 ff ff 00 00 46 53 53 00 ff 00 00 00 ff 53 ff ff 48 46 53 ff 48 00 ff ff ff ff 46 48 00 48 53 ff ff ff 48 ff 48 ff ff 00 48 ff ff 00 ff ff ff 79 ff ff ff ff b0 ff 46 ff ff 48 53 53 ff ff b0 ff ff b0 ff 48 00 ff 01 ff 00 ff 01 ff 48 ff 48 ff ff ff ff 48 48 ff ff ff 00 48 00 48 ff ff 00 00 00 00 46 00 00 00 ff 00 ff ff ff 00 ff 48 53 ff 48 ff ff 46 48 53 53 48 ff 48 48 00 ff ff ff 48 48 00 48 ff 48 ff 48 53 53 ff 48 53 48 ff 48 48 53 ff ff 00 ff ff ff 48 00 53 ff b0 48 53 00 00 aa ff ff 00 48 53 ff ff ff ff 79 ff ff 00 48 00 ff 48 53 00 ff 48 48 48 00 00 ff 00 00 53 ff ff ff 48 53 ff ff 48 ff ff ff 48 48 00 00 48 00 ff ff b0 ff 53 ff ff ff ff 00 ff 00 ff ff 00 ff ff ff 00 00 48 ff ff b0 ff ff 48 53 00 ff ff 00 ff 00 ff 00 00 ff 00 ff ff ff ff 01 ff ff 00 48 53 ff ff 00 ff 00 ff ff ff ff 00 ff ff ff 48 00 ff ff b0 46 53 00 48 48 53 ff ff 46 48 00 ff 48 ff ff ff ff ff 00 ff 00 ff 00 ff 46 ff ff ff 01 ff ff ff ff ff 90 48 ff ff ff 00 ff ff 48 ff ff ff 48 46 53 ff ff b0 48 00 00 ff 48 ff 48 00 ff ff ff ff 00 00 79 ff 48 53 ff 48 00 ff 00 ff ff 00 53 ff 00 46 00 53 ff 00 ff 48 00 53 00 ff 00 00 ff ff 00 ff 00 ff 79 00 ff ff 00 00 00 ff 48 53 ff 48 ff 46 00 ff 48 00 ff 48 48 53 ff ff 00 ff 00 ff 00 00 ff ff 00 00 ff 46 ff ff 00 ff ff b0 ff ff 46 53 ff ff 48 ff ff 48 00 ff 00 ff 00 ff ff 00 00 48 ff 46 ff b0 53 48 ff ff 48 48 48 ff ff 00 00 ff 00 ff ff 00 ff 00 ff ff ff 00 48 53 ff 00 ff 00 ff ff ff ff ff ff ff ff ff 48 00 ff 48 ff 46 ff ff ff 00 00 00 ff ff 48 53 ff ff ff 48 ff ff ff 00 ff 48 00 53 48 48 ff 00 48 53 48 53 53 ff ff ff 48 53 00 46 ff 00 00 48 53 46 00 ff ff ff ff ff b0 48 53 00 ff ff 48 ff ff 53 53 ff 00 00 ff 48 ff 48 00 ff ff 46 ff 00 e0 ff ff ff 00 48 00 ff ff ff b0 ff ff 00 ff 00 ff 46 48 ff ff 48 00 00 ff ff ff 00 ff ff 48 ff 00 ff 79 00 00 00 00 ff ff ff 53 00 00 ff 46 00 ff ff 00 ff ff 79 ff 48 48 ff ff ff ff ff ff ff ff b0 53 53 00 ff 00 ff 00 ff 46 48 ff 00 ff ff b0 53 53 53 00 48 ff 00 ff ff 48 ff 48 00 ff 00 ff 48 48 ff 00 ff 53 48 ff 00 ff ff ff 00 ff 00 00 ff b0 ff ff 79 46 00 48 00 ff 00 48 ff ff 48 ff 48 ff ff ff 46 00 00 ff ff 46 53 ff 00 ff ff ff 00 ff 00 ff ff 01 ff ff ff 00 ff 00 ff ff ff ff 90 48 48 ff 01 00 ff ff ff 48 00 ff 48 ff b0 00 ff ff 00 00 46 48 ff 79 ff ff ff 48 ff ff 48 ff 48 46 53 48 46 ff 00 ff 46 00 ff 00 ff 00 53 53 00 00 00 48 48 ff ff 53 00 ff 46 ff 46 53 00 00 ff 48 48 53 ff ff 00 ff b0 ff ff 00 00 ff 48 00 48 ff 00 48 ff ff 00 48 53 ff ff ff ff ff 46 ff ff 48 00 00 00 ff b0 53 00 ff 00 ff 53 ff 48 00 00 ff 48 48 53 00 48 53 00 00 ff 00 48 ff ff ff 00 ff ff 48 ff 00 48 ff ff 46 53 48 53 ff 53 46 ff 00 ff ff 00 ff ff 00 ff 00 ff ff ff 48 48 53 53 00 48 ff 53 48 48 53 ff ff 79 ff 48 ff ff ff 00 ff 00 00 48 ff 46 46 ff ff ff ff ff 00 ff ff b0 ff 53 00 ff ff 90 48 ff 00 48 53 ff ff 48 46 53 53 00 ff 53 ff ff ff ff ff ff ff ff ff ff ff 46 ff 48 00 ff 48 ff 48 53 */
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. // //********************************************************* // // Scenario1.xaml.cpp // Implementation of the Scenario1 class // #include "pch.h" #include "Scenario1.xaml.h" using namespace SDKSample::EAS; using namespace Windows::UI::Xaml; using namespace Windows::UI::Xaml::Controls; using namespace Windows::UI::Xaml::Navigation; using namespace Windows::Security::ExchangeActiveSyncProvisioning; Scenario1::Scenario1() { InitializeComponent(); } /// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. The Parameter /// property is typically used to configure the page.</param> void Scenario1::OnNavigatedTo(NavigationEventArgs^ e) { // A pointer back to the main page. This is needed if you want to call methods in MainPage such // as NotifyUser() rootPage = MainPage::Current; } void SDKSample::EAS::Scenario1::Launch_Click1(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) { DeviceID ->Text= ""; FriendlyName -> Text= ""; SystemManufacturer ->Text= ""; SystemProductName ->Text= ""; SystemSku ->Text= ""; OperatingSystem ->Text= ""; try { EasClientDeviceInformation^ CurrentDeviceInfor = ref new EasClientDeviceInformation(); auto id = CurrentDeviceInfor->Id; OperatingSystem->Text = CurrentDeviceInfor->OperatingSystem; FriendlyName->Text = CurrentDeviceInfor ->FriendlyName; SystemManufacturer->Text = CurrentDeviceInfor->SystemManufacturer; SystemProductName->Text = CurrentDeviceInfor->SystemProductName; SystemSku->Text = CurrentDeviceInfor->SystemSku; } catch (Platform::Exception^ ex) { DebugArea->Text += "Error: " +ex->Message; } } void SDKSample::EAS::Scenario1::Reset_Click1(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) { try { DeviceID ->Text= ""; FriendlyName -> Text= ""; SystemManufacturer ->Text= ""; SystemProductName ->Text= ""; SystemSku ->Text= ""; OperatingSystem ->Text= ""; } catch(Platform::Exception^ ex) { DebugArea->Text += "Error: " +ex->Message; } }
; DO NOT MODIFY THIS FILE DIRECTLY! ; author: @TinySecEx ; ssdt asm stub for 6.0.6002-sp2-windows-vista amd64 option casemap:none option prologue:none option epilogue:none .code ; ULONG64 __stdcall NtMapUserPhysicalPagesScatter( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtMapUserPhysicalPagesScatter PROC STDCALL mov r10 , rcx mov eax , 0 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtMapUserPhysicalPagesScatter ENDP ; ULONG64 __stdcall NtWaitForSingleObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtWaitForSingleObject PROC STDCALL mov r10 , rcx mov eax , 1 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitForSingleObject ENDP ; ULONG64 __stdcall NtCallbackReturn( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCallbackReturn PROC STDCALL mov r10 , rcx mov eax , 2 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCallbackReturn ENDP ; ULONG64 __stdcall NtReadFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtReadFile PROC STDCALL mov r10 , rcx mov eax , 3 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReadFile ENDP ; ULONG64 __stdcall NtDeviceIoControlFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); _6_0_6002_sp2_windows_vista_NtDeviceIoControlFile PROC STDCALL mov r10 , rcx mov eax , 4 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeviceIoControlFile ENDP ; ULONG64 __stdcall NtWriteFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtWriteFile PROC STDCALL mov r10 , rcx mov eax , 5 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWriteFile ENDP ; ULONG64 __stdcall NtRemoveIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtRemoveIoCompletion PROC STDCALL mov r10 , rcx mov eax , 6 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRemoveIoCompletion ENDP ; ULONG64 __stdcall NtReleaseSemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtReleaseSemaphore PROC STDCALL mov r10 , rcx mov eax , 7 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReleaseSemaphore ENDP ; ULONG64 __stdcall NtReplyWaitReceivePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtReplyWaitReceivePort PROC STDCALL mov r10 , rcx mov eax , 8 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReplyWaitReceivePort ENDP ; ULONG64 __stdcall NtReplyPort( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtReplyPort PROC STDCALL mov r10 , rcx mov eax , 9 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReplyPort ENDP ; ULONG64 __stdcall NtSetInformationThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationThread PROC STDCALL mov r10 , rcx mov eax , 10 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationThread ENDP ; ULONG64 __stdcall NtSetEvent( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetEvent PROC STDCALL mov r10 , rcx mov eax , 11 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetEvent ENDP ; ULONG64 __stdcall NtClose( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtClose PROC STDCALL mov r10 , rcx mov eax , 12 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtClose ENDP ; ULONG64 __stdcall NtQueryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryObject PROC STDCALL mov r10 , rcx mov eax , 13 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryObject ENDP ; ULONG64 __stdcall NtQueryInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationFile PROC STDCALL mov r10 , rcx mov eax , 14 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationFile ENDP ; ULONG64 __stdcall NtOpenKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenKey PROC STDCALL mov r10 , rcx mov eax , 15 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenKey ENDP ; ULONG64 __stdcall NtEnumerateValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtEnumerateValueKey PROC STDCALL mov r10 , rcx mov eax , 16 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtEnumerateValueKey ENDP ; ULONG64 __stdcall NtFindAtom( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtFindAtom PROC STDCALL mov r10 , rcx mov eax , 17 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFindAtom ENDP ; ULONG64 __stdcall NtQueryDefaultLocale( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryDefaultLocale PROC STDCALL mov r10 , rcx mov eax , 18 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryDefaultLocale ENDP ; ULONG64 __stdcall NtQueryKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryKey PROC STDCALL mov r10 , rcx mov eax , 19 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryKey ENDP ; ULONG64 __stdcall NtQueryValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtQueryValueKey PROC STDCALL mov r10 , rcx mov eax , 20 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryValueKey ENDP ; ULONG64 __stdcall NtAllocateVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAllocateVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 21 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAllocateVirtualMemory ENDP ; ULONG64 __stdcall NtQueryInformationProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationProcess PROC STDCALL mov r10 , rcx mov eax , 22 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationProcess ENDP ; ULONG64 __stdcall NtWaitForMultipleObjects32( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtWaitForMultipleObjects32 PROC STDCALL mov r10 , rcx mov eax , 23 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitForMultipleObjects32 ENDP ; ULONG64 __stdcall NtWriteFileGather( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtWriteFileGather PROC STDCALL mov r10 , rcx mov eax , 24 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWriteFileGather ENDP ; ULONG64 __stdcall NtSetInformationProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationProcess PROC STDCALL mov r10 , rcx mov eax , 25 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationProcess ENDP ; ULONG64 __stdcall NtCreateKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtCreateKey PROC STDCALL mov r10 , rcx mov eax , 26 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateKey ENDP ; ULONG64 __stdcall NtFreeVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtFreeVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 27 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFreeVirtualMemory ENDP ; ULONG64 __stdcall NtImpersonateClientOfPort( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtImpersonateClientOfPort PROC STDCALL mov r10 , rcx mov eax , 28 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtImpersonateClientOfPort ENDP ; ULONG64 __stdcall NtReleaseMutant( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtReleaseMutant PROC STDCALL mov r10 , rcx mov eax , 29 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReleaseMutant ENDP ; ULONG64 __stdcall NtQueryInformationToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationToken PROC STDCALL mov r10 , rcx mov eax , 30 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationToken ENDP ; ULONG64 __stdcall NtRequestWaitReplyPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtRequestWaitReplyPort PROC STDCALL mov r10 , rcx mov eax , 31 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRequestWaitReplyPort ENDP ; ULONG64 __stdcall NtQueryVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtQueryVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 32 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryVirtualMemory ENDP ; ULONG64 __stdcall NtOpenThreadToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtOpenThreadToken PROC STDCALL mov r10 , rcx mov eax , 33 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenThreadToken ENDP ; ULONG64 __stdcall NtQueryInformationThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationThread PROC STDCALL mov r10 , rcx mov eax , 34 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationThread ENDP ; ULONG64 __stdcall NtOpenProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtOpenProcess PROC STDCALL mov r10 , rcx mov eax , 35 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenProcess ENDP ; ULONG64 __stdcall NtSetInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtSetInformationFile PROC STDCALL mov r10 , rcx mov eax , 36 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationFile ENDP ; ULONG64 __stdcall NtMapViewOfSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); _6_0_6002_sp2_windows_vista_NtMapViewOfSection PROC STDCALL mov r10 , rcx mov eax , 37 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtMapViewOfSection ENDP ; ULONG64 __stdcall NtAccessCheckAndAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtAccessCheckAndAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 38 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAccessCheckAndAuditAlarm ENDP ; ULONG64 __stdcall NtUnmapViewOfSection( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtUnmapViewOfSection PROC STDCALL mov r10 , rcx mov eax , 39 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtUnmapViewOfSection ENDP ; ULONG64 __stdcall NtReplyWaitReceivePortEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtReplyWaitReceivePortEx PROC STDCALL mov r10 , rcx mov eax , 40 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReplyWaitReceivePortEx ENDP ; ULONG64 __stdcall NtTerminateProcess( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtTerminateProcess PROC STDCALL mov r10 , rcx mov eax , 41 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtTerminateProcess ENDP ; ULONG64 __stdcall NtSetEventBoostPriority( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetEventBoostPriority PROC STDCALL mov r10 , rcx mov eax , 42 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetEventBoostPriority ENDP ; ULONG64 __stdcall NtReadFileScatter( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtReadFileScatter PROC STDCALL mov r10 , rcx mov eax , 43 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReadFileScatter ENDP ; ULONG64 __stdcall NtOpenThreadTokenEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtOpenThreadTokenEx PROC STDCALL mov r10 , rcx mov eax , 44 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenThreadTokenEx ENDP ; ULONG64 __stdcall NtOpenProcessTokenEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtOpenProcessTokenEx PROC STDCALL mov r10 , rcx mov eax , 45 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenProcessTokenEx ENDP ; ULONG64 __stdcall NtQueryPerformanceCounter( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryPerformanceCounter PROC STDCALL mov r10 , rcx mov eax , 46 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryPerformanceCounter ENDP ; ULONG64 __stdcall NtEnumerateKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtEnumerateKey PROC STDCALL mov r10 , rcx mov eax , 47 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtEnumerateKey ENDP ; ULONG64 __stdcall NtOpenFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtOpenFile PROC STDCALL mov r10 , rcx mov eax , 48 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenFile ENDP ; ULONG64 __stdcall NtDelayExecution( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtDelayExecution PROC STDCALL mov r10 , rcx mov eax , 49 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDelayExecution ENDP ; ULONG64 __stdcall NtQueryDirectoryFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtQueryDirectoryFile PROC STDCALL mov r10 , rcx mov eax , 50 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryDirectoryFile ENDP ; ULONG64 __stdcall NtQuerySystemInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtQuerySystemInformation PROC STDCALL mov r10 , rcx mov eax , 51 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySystemInformation ENDP ; ULONG64 __stdcall NtOpenSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenSection PROC STDCALL mov r10 , rcx mov eax , 52 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenSection ENDP ; ULONG64 __stdcall NtQueryTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryTimer PROC STDCALL mov r10 , rcx mov eax , 53 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryTimer ENDP ; ULONG64 __stdcall NtFsControlFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); _6_0_6002_sp2_windows_vista_NtFsControlFile PROC STDCALL mov r10 , rcx mov eax , 54 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFsControlFile ENDP ; ULONG64 __stdcall NtWriteVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtWriteVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 55 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWriteVirtualMemory ENDP ; ULONG64 __stdcall NtCloseObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCloseObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 56 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCloseObjectAuditAlarm ENDP ; ULONG64 __stdcall NtDuplicateObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtDuplicateObject PROC STDCALL mov r10 , rcx mov eax , 57 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDuplicateObject ENDP ; ULONG64 __stdcall NtQueryAttributesFile( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryAttributesFile PROC STDCALL mov r10 , rcx mov eax , 58 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryAttributesFile ENDP ; ULONG64 __stdcall NtClearEvent( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtClearEvent PROC STDCALL mov r10 , rcx mov eax , 59 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtClearEvent ENDP ; ULONG64 __stdcall NtReadVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtReadVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 60 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReadVirtualMemory ENDP ; ULONG64 __stdcall NtOpenEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenEvent PROC STDCALL mov r10 , rcx mov eax , 61 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenEvent ENDP ; ULONG64 __stdcall NtAdjustPrivilegesToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAdjustPrivilegesToken PROC STDCALL mov r10 , rcx mov eax , 62 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAdjustPrivilegesToken ENDP ; ULONG64 __stdcall NtDuplicateToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtDuplicateToken PROC STDCALL mov r10 , rcx mov eax , 63 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDuplicateToken ENDP ; ULONG64 __stdcall NtContinue( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtContinue PROC STDCALL mov r10 , rcx mov eax , 64 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtContinue ENDP ; ULONG64 __stdcall NtQueryDefaultUILanguage( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtQueryDefaultUILanguage PROC STDCALL mov r10 , rcx mov eax , 65 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryDefaultUILanguage ENDP ; ULONG64 __stdcall NtQueueApcThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueueApcThread PROC STDCALL mov r10 , rcx mov eax , 66 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueueApcThread ENDP ; ULONG64 __stdcall NtYieldExecution( ); _6_0_6002_sp2_windows_vista_NtYieldExecution PROC STDCALL mov r10 , rcx mov eax , 67 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtYieldExecution ENDP ; ULONG64 __stdcall NtAddAtom( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAddAtom PROC STDCALL mov r10 , rcx mov eax , 68 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAddAtom ENDP ; ULONG64 __stdcall NtCreateEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtCreateEvent PROC STDCALL mov r10 , rcx mov eax , 69 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateEvent ENDP ; ULONG64 __stdcall NtQueryVolumeInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryVolumeInformationFile PROC STDCALL mov r10 , rcx mov eax , 70 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryVolumeInformationFile ENDP ; ULONG64 __stdcall NtCreateSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtCreateSection PROC STDCALL mov r10 , rcx mov eax , 71 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateSection ENDP ; ULONG64 __stdcall NtFlushBuffersFile( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtFlushBuffersFile PROC STDCALL mov r10 , rcx mov eax , 72 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFlushBuffersFile ENDP ; ULONG64 __stdcall NtApphelpCacheControl( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtApphelpCacheControl PROC STDCALL mov r10 , rcx mov eax , 73 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtApphelpCacheControl ENDP ; ULONG64 __stdcall NtCreateProcessEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtCreateProcessEx PROC STDCALL mov r10 , rcx mov eax , 74 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateProcessEx ENDP ; ULONG64 __stdcall NtCreateThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtCreateThread PROC STDCALL mov r10 , rcx mov eax , 75 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateThread ENDP ; ULONG64 __stdcall NtIsProcessInJob( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtIsProcessInJob PROC STDCALL mov r10 , rcx mov eax , 76 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtIsProcessInJob ENDP ; ULONG64 __stdcall NtProtectVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtProtectVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 77 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtProtectVirtualMemory ENDP ; ULONG64 __stdcall NtQuerySection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQuerySection PROC STDCALL mov r10 , rcx mov eax , 78 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySection ENDP ; ULONG64 __stdcall NtResumeThread( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtResumeThread PROC STDCALL mov r10 , rcx mov eax , 79 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtResumeThread ENDP ; ULONG64 __stdcall NtTerminateThread( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtTerminateThread PROC STDCALL mov r10 , rcx mov eax , 80 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtTerminateThread ENDP ; ULONG64 __stdcall NtReadRequestData( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtReadRequestData PROC STDCALL mov r10 , rcx mov eax , 81 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReadRequestData ENDP ; ULONG64 __stdcall NtCreateFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtCreateFile PROC STDCALL mov r10 , rcx mov eax , 82 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateFile ENDP ; ULONG64 __stdcall NtQueryEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryEvent PROC STDCALL mov r10 , rcx mov eax , 83 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryEvent ENDP ; ULONG64 __stdcall NtWriteRequestData( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtWriteRequestData PROC STDCALL mov r10 , rcx mov eax , 84 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWriteRequestData ENDP ; ULONG64 __stdcall NtOpenDirectoryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenDirectoryObject PROC STDCALL mov r10 , rcx mov eax , 85 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenDirectoryObject ENDP ; ULONG64 __stdcall NtAccessCheckByTypeAndAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 ); _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeAndAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 86 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeAndAuditAlarm ENDP ; ULONG64 __stdcall NtQuerySystemTime( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtQuerySystemTime PROC STDCALL mov r10 , rcx mov eax , 87 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySystemTime ENDP ; ULONG64 __stdcall NtWaitForMultipleObjects( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtWaitForMultipleObjects PROC STDCALL mov r10 , rcx mov eax , 88 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitForMultipleObjects ENDP ; ULONG64 __stdcall NtSetInformationObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationObject PROC STDCALL mov r10 , rcx mov eax , 89 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationObject ENDP ; ULONG64 __stdcall NtCancelIoFile( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtCancelIoFile PROC STDCALL mov r10 , rcx mov eax , 90 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCancelIoFile ENDP ; ULONG64 __stdcall NtTraceEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtTraceEvent PROC STDCALL mov r10 , rcx mov eax , 91 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtTraceEvent ENDP ; ULONG64 __stdcall NtPowerInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtPowerInformation PROC STDCALL mov r10 , rcx mov eax , 92 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPowerInformation ENDP ; ULONG64 __stdcall NtSetValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtSetValueKey PROC STDCALL mov r10 , rcx mov eax , 93 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetValueKey ENDP ; ULONG64 __stdcall NtCancelTimer( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtCancelTimer PROC STDCALL mov r10 , rcx mov eax , 94 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCancelTimer ENDP ; ULONG64 __stdcall NtSetTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtSetTimer PROC STDCALL mov r10 , rcx mov eax , 95 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetTimer ENDP ; ULONG64 __stdcall NtAcceptConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAcceptConnectPort PROC STDCALL mov r10 , rcx mov eax , 96 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAcceptConnectPort ENDP ; ULONG64 __stdcall NtAccessCheck( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtAccessCheck PROC STDCALL mov r10 , rcx mov eax , 97 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAccessCheck ENDP ; ULONG64 __stdcall NtAccessCheckByType( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtAccessCheckByType PROC STDCALL mov r10 , rcx mov eax , 98 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAccessCheckByType ENDP ; ULONG64 __stdcall NtAccessCheckByTypeResultList( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeResultList PROC STDCALL mov r10 , rcx mov eax , 99 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeResultList ENDP ; ULONG64 __stdcall NtAccessCheckByTypeResultListAndAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 ); _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 100 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarm ENDP ; ULONG64 __stdcall NtAccessCheckByTypeResultListAndAuditAlarmByHandle( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 , ULONG64 arg_17 ); _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarmByHandle PROC STDCALL mov r10 , rcx mov eax , 101 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarmByHandle ENDP ; ULONG64 __stdcall NtAcquireCMFViewOwnership( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAcquireCMFViewOwnership PROC STDCALL mov r10 , rcx mov eax , 102 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAcquireCMFViewOwnership ENDP ; ULONG64 __stdcall NtAddBootEntry( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtAddBootEntry PROC STDCALL mov r10 , rcx mov eax , 103 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAddBootEntry ENDP ; ULONG64 __stdcall NtAddDriverEntry( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtAddDriverEntry PROC STDCALL mov r10 , rcx mov eax , 104 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAddDriverEntry ENDP ; ULONG64 __stdcall NtAdjustGroupsToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAdjustGroupsToken PROC STDCALL mov r10 , rcx mov eax , 105 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAdjustGroupsToken ENDP ; ULONG64 __stdcall NtAlertResumeThread( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtAlertResumeThread PROC STDCALL mov r10 , rcx mov eax , 106 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlertResumeThread ENDP ; ULONG64 __stdcall NtAlertThread( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtAlertThread PROC STDCALL mov r10 , rcx mov eax , 107 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlertThread ENDP ; ULONG64 __stdcall NtAllocateLocallyUniqueId( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtAllocateLocallyUniqueId PROC STDCALL mov r10 , rcx mov eax , 108 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAllocateLocallyUniqueId ENDP ; ULONG64 __stdcall NtAllocateUserPhysicalPages( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAllocateUserPhysicalPages PROC STDCALL mov r10 , rcx mov eax , 109 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAllocateUserPhysicalPages ENDP ; ULONG64 __stdcall NtAllocateUuids( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtAllocateUuids PROC STDCALL mov r10 , rcx mov eax , 110 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAllocateUuids ENDP ; ULONG64 __stdcall NtAlpcAcceptConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtAlpcAcceptConnectPort PROC STDCALL mov r10 , rcx mov eax , 111 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcAcceptConnectPort ENDP ; ULONG64 __stdcall NtAlpcCancelMessage( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcCancelMessage PROC STDCALL mov r10 , rcx mov eax , 112 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcCancelMessage ENDP ; ULONG64 __stdcall NtAlpcConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtAlpcConnectPort PROC STDCALL mov r10 , rcx mov eax , 113 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcConnectPort ENDP ; ULONG64 __stdcall NtAlpcCreatePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcCreatePort PROC STDCALL mov r10 , rcx mov eax , 114 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcCreatePort ENDP ; ULONG64 __stdcall NtAlpcCreatePortSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAlpcCreatePortSection PROC STDCALL mov r10 , rcx mov eax , 115 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcCreatePortSection ENDP ; ULONG64 __stdcall NtAlpcCreateResourceReserve( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtAlpcCreateResourceReserve PROC STDCALL mov r10 , rcx mov eax , 116 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcCreateResourceReserve ENDP ; ULONG64 __stdcall NtAlpcCreateSectionView( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcCreateSectionView PROC STDCALL mov r10 , rcx mov eax , 117 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcCreateSectionView ENDP ; ULONG64 __stdcall NtAlpcCreateSecurityContext( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcCreateSecurityContext PROC STDCALL mov r10 , rcx mov eax , 118 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcCreateSecurityContext ENDP ; ULONG64 __stdcall NtAlpcDeletePortSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcDeletePortSection PROC STDCALL mov r10 , rcx mov eax , 119 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcDeletePortSection ENDP ; ULONG64 __stdcall NtAlpcDeleteResourceReserve( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcDeleteResourceReserve PROC STDCALL mov r10 , rcx mov eax , 120 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcDeleteResourceReserve ENDP ; ULONG64 __stdcall NtAlpcDeleteSectionView( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcDeleteSectionView PROC STDCALL mov r10 , rcx mov eax , 121 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcDeleteSectionView ENDP ; ULONG64 __stdcall NtAlpcDeleteSecurityContext( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcDeleteSecurityContext PROC STDCALL mov r10 , rcx mov eax , 122 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcDeleteSecurityContext ENDP ; ULONG64 __stdcall NtAlpcDisconnectPort( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtAlpcDisconnectPort PROC STDCALL mov r10 , rcx mov eax , 123 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcDisconnectPort ENDP ; ULONG64 __stdcall NtAlpcImpersonateClientOfPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcImpersonateClientOfPort PROC STDCALL mov r10 , rcx mov eax , 124 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcImpersonateClientOfPort ENDP ; ULONG64 __stdcall NtAlpcOpenSenderProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAlpcOpenSenderProcess PROC STDCALL mov r10 , rcx mov eax , 125 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcOpenSenderProcess ENDP ; ULONG64 __stdcall NtAlpcOpenSenderThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAlpcOpenSenderThread PROC STDCALL mov r10 , rcx mov eax , 126 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcOpenSenderThread ENDP ; ULONG64 __stdcall NtAlpcQueryInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtAlpcQueryInformation PROC STDCALL mov r10 , rcx mov eax , 127 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcQueryInformation ENDP ; ULONG64 __stdcall NtAlpcQueryInformationMessage( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtAlpcQueryInformationMessage PROC STDCALL mov r10 , rcx mov eax , 128 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcQueryInformationMessage ENDP ; ULONG64 __stdcall NtAlpcRevokeSecurityContext( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtAlpcRevokeSecurityContext PROC STDCALL mov r10 , rcx mov eax , 129 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcRevokeSecurityContext ENDP ; ULONG64 __stdcall NtAlpcSendWaitReceivePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtAlpcSendWaitReceivePort PROC STDCALL mov r10 , rcx mov eax , 130 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcSendWaitReceivePort ENDP ; ULONG64 __stdcall NtAlpcSetInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtAlpcSetInformation PROC STDCALL mov r10 , rcx mov eax , 131 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAlpcSetInformation ENDP ; ULONG64 __stdcall NtAreMappedFilesTheSame( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtAreMappedFilesTheSame PROC STDCALL mov r10 , rcx mov eax , 132 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAreMappedFilesTheSame ENDP ; ULONG64 __stdcall NtAssignProcessToJobObject( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtAssignProcessToJobObject PROC STDCALL mov r10 , rcx mov eax , 133 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtAssignProcessToJobObject ENDP ; ULONG64 __stdcall NtCancelDeviceWakeupRequest( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtCancelDeviceWakeupRequest PROC STDCALL mov r10 , rcx mov eax , 134 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCancelDeviceWakeupRequest ENDP ; ULONG64 __stdcall NtCancelIoFileEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCancelIoFileEx PROC STDCALL mov r10 , rcx mov eax , 135 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCancelIoFileEx ENDP ; ULONG64 __stdcall NtCancelSynchronousIoFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCancelSynchronousIoFile PROC STDCALL mov r10 , rcx mov eax , 136 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCancelSynchronousIoFile ENDP ; ULONG64 __stdcall NtCommitComplete( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtCommitComplete PROC STDCALL mov r10 , rcx mov eax , 137 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCommitComplete ENDP ; ULONG64 __stdcall NtCommitEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtCommitEnlistment PROC STDCALL mov r10 , rcx mov eax , 138 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCommitEnlistment ENDP ; ULONG64 __stdcall NtCommitTransaction( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtCommitTransaction PROC STDCALL mov r10 , rcx mov eax , 139 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCommitTransaction ENDP ; ULONG64 __stdcall NtCompactKeys( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtCompactKeys PROC STDCALL mov r10 , rcx mov eax , 140 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCompactKeys ENDP ; ULONG64 __stdcall NtCompareTokens( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCompareTokens PROC STDCALL mov r10 , rcx mov eax , 141 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCompareTokens ENDP ; ULONG64 __stdcall NtCompleteConnectPort( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtCompleteConnectPort PROC STDCALL mov r10 , rcx mov eax , 142 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCompleteConnectPort ENDP ; ULONG64 __stdcall NtCompressKey( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtCompressKey PROC STDCALL mov r10 , rcx mov eax , 143 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCompressKey ENDP ; ULONG64 __stdcall NtConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtConnectPort PROC STDCALL mov r10 , rcx mov eax , 144 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtConnectPort ENDP ; ULONG64 __stdcall NtCreateDebugObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreateDebugObject PROC STDCALL mov r10 , rcx mov eax , 145 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateDebugObject ENDP ; ULONG64 __stdcall NtCreateDirectoryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCreateDirectoryObject PROC STDCALL mov r10 , rcx mov eax , 146 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateDirectoryObject ENDP ; ULONG64 __stdcall NtCreateEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtCreateEnlistment PROC STDCALL mov r10 , rcx mov eax , 147 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateEnlistment ENDP ; ULONG64 __stdcall NtCreateEventPair( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCreateEventPair PROC STDCALL mov r10 , rcx mov eax , 148 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateEventPair ENDP ; ULONG64 __stdcall NtCreateIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreateIoCompletion PROC STDCALL mov r10 , rcx mov eax , 149 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateIoCompletion ENDP ; ULONG64 __stdcall NtCreateJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCreateJobObject PROC STDCALL mov r10 , rcx mov eax , 150 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateJobObject ENDP ; ULONG64 __stdcall NtCreateJobSet( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtCreateJobSet PROC STDCALL mov r10 , rcx mov eax , 151 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateJobSet ENDP ; ULONG64 __stdcall NtCreateKeyTransacted( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtCreateKeyTransacted PROC STDCALL mov r10 , rcx mov eax , 152 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateKeyTransacted ENDP ; ULONG64 __stdcall NtCreateKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreateKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 153 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateKeyedEvent ENDP ; ULONG64 __stdcall NtCreateMailslotFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtCreateMailslotFile PROC STDCALL mov r10 , rcx mov eax , 154 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateMailslotFile ENDP ; ULONG64 __stdcall NtCreateMutant( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreateMutant PROC STDCALL mov r10 , rcx mov eax , 155 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateMutant ENDP ; ULONG64 __stdcall NtCreateNamedPipeFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 ); _6_0_6002_sp2_windows_vista_NtCreateNamedPipeFile PROC STDCALL mov r10 , rcx mov eax , 156 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateNamedPipeFile ENDP ; ULONG64 __stdcall NtCreatePagingFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreatePagingFile PROC STDCALL mov r10 , rcx mov eax , 157 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreatePagingFile ENDP ; ULONG64 __stdcall NtCreatePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtCreatePort PROC STDCALL mov r10 , rcx mov eax , 158 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreatePort ENDP ; ULONG64 __stdcall NtCreatePrivateNamespace( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreatePrivateNamespace PROC STDCALL mov r10 , rcx mov eax , 159 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreatePrivateNamespace ENDP ; ULONG64 __stdcall NtCreateProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtCreateProcess PROC STDCALL mov r10 , rcx mov eax , 160 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateProcess ENDP ; ULONG64 __stdcall NtCreateProfile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtCreateProfile PROC STDCALL mov r10 , rcx mov eax , 161 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateProfile ENDP ; ULONG64 __stdcall NtCreateResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtCreateResourceManager PROC STDCALL mov r10 , rcx mov eax , 162 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateResourceManager ENDP ; ULONG64 __stdcall NtCreateSemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtCreateSemaphore PROC STDCALL mov r10 , rcx mov eax , 163 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateSemaphore ENDP ; ULONG64 __stdcall NtCreateSymbolicLinkObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreateSymbolicLinkObject PROC STDCALL mov r10 , rcx mov eax , 164 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateSymbolicLinkObject ENDP ; ULONG64 __stdcall NtCreateThreadEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtCreateThreadEx PROC STDCALL mov r10 , rcx mov eax , 165 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateThreadEx ENDP ; ULONG64 __stdcall NtCreateTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtCreateTimer PROC STDCALL mov r10 , rcx mov eax , 166 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateTimer ENDP ; ULONG64 __stdcall NtCreateToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 ); _6_0_6002_sp2_windows_vista_NtCreateToken PROC STDCALL mov r10 , rcx mov eax , 167 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateToken ENDP ; ULONG64 __stdcall NtCreateTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); _6_0_6002_sp2_windows_vista_NtCreateTransaction PROC STDCALL mov r10 , rcx mov eax , 168 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateTransaction ENDP ; ULONG64 __stdcall NtCreateTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtCreateTransactionManager PROC STDCALL mov r10 , rcx mov eax , 169 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateTransactionManager ENDP ; ULONG64 __stdcall NtCreateUserProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); _6_0_6002_sp2_windows_vista_NtCreateUserProcess PROC STDCALL mov r10 , rcx mov eax , 170 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateUserProcess ENDP ; ULONG64 __stdcall NtCreateWaitablePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtCreateWaitablePort PROC STDCALL mov r10 , rcx mov eax , 171 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateWaitablePort ENDP ; ULONG64 __stdcall NtCreateWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); _6_0_6002_sp2_windows_vista_NtCreateWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 172 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtCreateWorkerFactory ENDP ; ULONG64 __stdcall NtDebugActiveProcess( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtDebugActiveProcess PROC STDCALL mov r10 , rcx mov eax , 173 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDebugActiveProcess ENDP ; ULONG64 __stdcall NtDebugContinue( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtDebugContinue PROC STDCALL mov r10 , rcx mov eax , 174 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDebugContinue ENDP ; ULONG64 __stdcall NtDeleteAtom( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtDeleteAtom PROC STDCALL mov r10 , rcx mov eax , 175 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeleteAtom ENDP ; ULONG64 __stdcall NtDeleteBootEntry( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtDeleteBootEntry PROC STDCALL mov r10 , rcx mov eax , 176 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeleteBootEntry ENDP ; ULONG64 __stdcall NtDeleteDriverEntry( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtDeleteDriverEntry PROC STDCALL mov r10 , rcx mov eax , 177 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeleteDriverEntry ENDP ; ULONG64 __stdcall NtDeleteFile( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtDeleteFile PROC STDCALL mov r10 , rcx mov eax , 178 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeleteFile ENDP ; ULONG64 __stdcall NtDeleteKey( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtDeleteKey PROC STDCALL mov r10 , rcx mov eax , 179 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeleteKey ENDP ; ULONG64 __stdcall NtDeleteObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtDeleteObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 180 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeleteObjectAuditAlarm ENDP ; ULONG64 __stdcall NtDeletePrivateNamespace( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtDeletePrivateNamespace PROC STDCALL mov r10 , rcx mov eax , 181 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeletePrivateNamespace ENDP ; ULONG64 __stdcall NtDeleteValueKey( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtDeleteValueKey PROC STDCALL mov r10 , rcx mov eax , 182 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDeleteValueKey ENDP ; ULONG64 __stdcall NtDisplayString( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtDisplayString PROC STDCALL mov r10 , rcx mov eax , 183 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtDisplayString ENDP ; ULONG64 __stdcall NtEnumerateBootEntries( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtEnumerateBootEntries PROC STDCALL mov r10 , rcx mov eax , 184 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtEnumerateBootEntries ENDP ; ULONG64 __stdcall NtEnumerateDriverEntries( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtEnumerateDriverEntries PROC STDCALL mov r10 , rcx mov eax , 185 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtEnumerateDriverEntries ENDP ; ULONG64 __stdcall NtEnumerateSystemEnvironmentValuesEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtEnumerateSystemEnvironmentValuesEx PROC STDCALL mov r10 , rcx mov eax , 186 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtEnumerateSystemEnvironmentValuesEx ENDP ; ULONG64 __stdcall NtEnumerateTransactionObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtEnumerateTransactionObject PROC STDCALL mov r10 , rcx mov eax , 187 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtEnumerateTransactionObject ENDP ; ULONG64 __stdcall NtExtendSection( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtExtendSection PROC STDCALL mov r10 , rcx mov eax , 188 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtExtendSection ENDP ; ULONG64 __stdcall NtFilterToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtFilterToken PROC STDCALL mov r10 , rcx mov eax , 189 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFilterToken ENDP ; ULONG64 __stdcall NtFlushInstallUILanguage( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtFlushInstallUILanguage PROC STDCALL mov r10 , rcx mov eax , 190 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFlushInstallUILanguage ENDP ; ULONG64 __stdcall NtFlushInstructionCache( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtFlushInstructionCache PROC STDCALL mov r10 , rcx mov eax , 191 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFlushInstructionCache ENDP ; ULONG64 __stdcall NtFlushKey( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtFlushKey PROC STDCALL mov r10 , rcx mov eax , 192 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFlushKey ENDP ; ULONG64 __stdcall NtFlushProcessWriteBuffers( ); _6_0_6002_sp2_windows_vista_NtFlushProcessWriteBuffers PROC STDCALL mov r10 , rcx mov eax , 193 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFlushProcessWriteBuffers ENDP ; ULONG64 __stdcall NtFlushVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtFlushVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 194 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFlushVirtualMemory ENDP ; ULONG64 __stdcall NtFlushWriteBuffer( ); _6_0_6002_sp2_windows_vista_NtFlushWriteBuffer PROC STDCALL mov r10 , rcx mov eax , 195 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFlushWriteBuffer ENDP ; ULONG64 __stdcall NtFreeUserPhysicalPages( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtFreeUserPhysicalPages PROC STDCALL mov r10 , rcx mov eax , 196 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFreeUserPhysicalPages ENDP ; ULONG64 __stdcall NtFreezeRegistry( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtFreezeRegistry PROC STDCALL mov r10 , rcx mov eax , 197 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFreezeRegistry ENDP ; ULONG64 __stdcall NtFreezeTransactions( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtFreezeTransactions PROC STDCALL mov r10 , rcx mov eax , 198 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtFreezeTransactions ENDP ; ULONG64 __stdcall NtGetContextThread( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtGetContextThread PROC STDCALL mov r10 , rcx mov eax , 199 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetContextThread ENDP ; ULONG64 __stdcall NtGetCurrentProcessorNumber( ); _6_0_6002_sp2_windows_vista_NtGetCurrentProcessorNumber PROC STDCALL mov r10 , rcx mov eax , 200 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetCurrentProcessorNumber ENDP ; ULONG64 __stdcall NtGetDevicePowerState( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtGetDevicePowerState PROC STDCALL mov r10 , rcx mov eax , 201 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetDevicePowerState ENDP ; ULONG64 __stdcall NtGetMUIRegistryInfo( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtGetMUIRegistryInfo PROC STDCALL mov r10 , rcx mov eax , 202 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetMUIRegistryInfo ENDP ; ULONG64 __stdcall NtGetNextProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtGetNextProcess PROC STDCALL mov r10 , rcx mov eax , 203 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetNextProcess ENDP ; ULONG64 __stdcall NtGetNextThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtGetNextThread PROC STDCALL mov r10 , rcx mov eax , 204 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetNextThread ENDP ; ULONG64 __stdcall NtGetNlsSectionPtr( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtGetNlsSectionPtr PROC STDCALL mov r10 , rcx mov eax , 205 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetNlsSectionPtr ENDP ; ULONG64 __stdcall NtGetNotificationResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtGetNotificationResourceManager PROC STDCALL mov r10 , rcx mov eax , 206 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetNotificationResourceManager ENDP ; ULONG64 __stdcall NtGetPlugPlayEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtGetPlugPlayEvent PROC STDCALL mov r10 , rcx mov eax , 207 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetPlugPlayEvent ENDP ; ULONG64 __stdcall NtGetWriteWatch( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtGetWriteWatch PROC STDCALL mov r10 , rcx mov eax , 208 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtGetWriteWatch ENDP ; ULONG64 __stdcall NtImpersonateAnonymousToken( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtImpersonateAnonymousToken PROC STDCALL mov r10 , rcx mov eax , 209 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtImpersonateAnonymousToken ENDP ; ULONG64 __stdcall NtImpersonateThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtImpersonateThread PROC STDCALL mov r10 , rcx mov eax , 210 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtImpersonateThread ENDP ; ULONG64 __stdcall NtInitializeNlsFiles( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtInitializeNlsFiles PROC STDCALL mov r10 , rcx mov eax , 211 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtInitializeNlsFiles ENDP ; ULONG64 __stdcall NtInitializeRegistry( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtInitializeRegistry PROC STDCALL mov r10 , rcx mov eax , 212 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtInitializeRegistry ENDP ; ULONG64 __stdcall NtInitiatePowerAction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtInitiatePowerAction PROC STDCALL mov r10 , rcx mov eax , 213 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtInitiatePowerAction ENDP ; ULONG64 __stdcall NtIsSystemResumeAutomatic( ); _6_0_6002_sp2_windows_vista_NtIsSystemResumeAutomatic PROC STDCALL mov r10 , rcx mov eax , 214 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtIsSystemResumeAutomatic ENDP ; ULONG64 __stdcall NtIsUILanguageComitted( ); _6_0_6002_sp2_windows_vista_NtIsUILanguageComitted PROC STDCALL mov r10 , rcx mov eax , 215 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtIsUILanguageComitted ENDP ; ULONG64 __stdcall NtListenPort( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtListenPort PROC STDCALL mov r10 , rcx mov eax , 216 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtListenPort ENDP ; ULONG64 __stdcall NtLoadDriver( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtLoadDriver PROC STDCALL mov r10 , rcx mov eax , 217 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLoadDriver ENDP ; ULONG64 __stdcall NtLoadKey( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtLoadKey PROC STDCALL mov r10 , rcx mov eax , 218 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLoadKey ENDP ; ULONG64 __stdcall NtLoadKey2( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtLoadKey2 PROC STDCALL mov r10 , rcx mov eax , 219 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLoadKey2 ENDP ; ULONG64 __stdcall NtLoadKeyEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); _6_0_6002_sp2_windows_vista_NtLoadKeyEx PROC STDCALL mov r10 , rcx mov eax , 220 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLoadKeyEx ENDP ; ULONG64 __stdcall NtLockFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); _6_0_6002_sp2_windows_vista_NtLockFile PROC STDCALL mov r10 , rcx mov eax , 221 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLockFile ENDP ; ULONG64 __stdcall NtLockProductActivationKeys( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtLockProductActivationKeys PROC STDCALL mov r10 , rcx mov eax , 222 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLockProductActivationKeys ENDP ; ULONG64 __stdcall NtLockRegistryKey( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtLockRegistryKey PROC STDCALL mov r10 , rcx mov eax , 223 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLockRegistryKey ENDP ; ULONG64 __stdcall NtLockVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtLockVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 224 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtLockVirtualMemory ENDP ; ULONG64 __stdcall NtMakePermanentObject( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtMakePermanentObject PROC STDCALL mov r10 , rcx mov eax , 225 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtMakePermanentObject ENDP ; ULONG64 __stdcall NtMakeTemporaryObject( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtMakeTemporaryObject PROC STDCALL mov r10 , rcx mov eax , 226 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtMakeTemporaryObject ENDP ; ULONG64 __stdcall NtMapCMFModule( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtMapCMFModule PROC STDCALL mov r10 , rcx mov eax , 227 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtMapCMFModule ENDP ; ULONG64 __stdcall NtMapUserPhysicalPages( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtMapUserPhysicalPages PROC STDCALL mov r10 , rcx mov eax , 228 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtMapUserPhysicalPages ENDP ; ULONG64 __stdcall NtModifyBootEntry( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtModifyBootEntry PROC STDCALL mov r10 , rcx mov eax , 229 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtModifyBootEntry ENDP ; ULONG64 __stdcall NtModifyDriverEntry( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtModifyDriverEntry PROC STDCALL mov r10 , rcx mov eax , 230 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtModifyDriverEntry ENDP ; ULONG64 __stdcall NtNotifyChangeDirectoryFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtNotifyChangeDirectoryFile PROC STDCALL mov r10 , rcx mov eax , 231 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtNotifyChangeDirectoryFile ENDP ; ULONG64 __stdcall NtNotifyChangeKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); _6_0_6002_sp2_windows_vista_NtNotifyChangeKey PROC STDCALL mov r10 , rcx mov eax , 232 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtNotifyChangeKey ENDP ; ULONG64 __stdcall NtNotifyChangeMultipleKeys( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 ); _6_0_6002_sp2_windows_vista_NtNotifyChangeMultipleKeys PROC STDCALL mov r10 , rcx mov eax , 233 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtNotifyChangeMultipleKeys ENDP ; ULONG64 __stdcall NtOpenEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtOpenEnlistment PROC STDCALL mov r10 , rcx mov eax , 234 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenEnlistment ENDP ; ULONG64 __stdcall NtOpenEventPair( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenEventPair PROC STDCALL mov r10 , rcx mov eax , 235 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenEventPair ENDP ; ULONG64 __stdcall NtOpenIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenIoCompletion PROC STDCALL mov r10 , rcx mov eax , 236 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenIoCompletion ENDP ; ULONG64 __stdcall NtOpenJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenJobObject PROC STDCALL mov r10 , rcx mov eax , 237 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenJobObject ENDP ; ULONG64 __stdcall NtOpenKeyTransacted( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtOpenKeyTransacted PROC STDCALL mov r10 , rcx mov eax , 238 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenKeyTransacted ENDP ; ULONG64 __stdcall NtOpenKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 239 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenKeyedEvent ENDP ; ULONG64 __stdcall NtOpenMutant( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenMutant PROC STDCALL mov r10 , rcx mov eax , 240 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenMutant ENDP ; ULONG64 __stdcall NtOpenObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 ); _6_0_6002_sp2_windows_vista_NtOpenObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 241 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenObjectAuditAlarm ENDP ; ULONG64 __stdcall NtOpenPrivateNamespace( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtOpenPrivateNamespace PROC STDCALL mov r10 , rcx mov eax , 242 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenPrivateNamespace ENDP ; ULONG64 __stdcall NtOpenProcessToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenProcessToken PROC STDCALL mov r10 , rcx mov eax , 243 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenProcessToken ENDP ; ULONG64 __stdcall NtOpenResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtOpenResourceManager PROC STDCALL mov r10 , rcx mov eax , 244 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenResourceManager ENDP ; ULONG64 __stdcall NtOpenSemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenSemaphore PROC STDCALL mov r10 , rcx mov eax , 245 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenSemaphore ENDP ; ULONG64 __stdcall NtOpenSession( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenSession PROC STDCALL mov r10 , rcx mov eax , 246 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenSession ENDP ; ULONG64 __stdcall NtOpenSymbolicLinkObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenSymbolicLinkObject PROC STDCALL mov r10 , rcx mov eax , 247 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenSymbolicLinkObject ENDP ; ULONG64 __stdcall NtOpenThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtOpenThread PROC STDCALL mov r10 , rcx mov eax , 248 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenThread ENDP ; ULONG64 __stdcall NtOpenTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtOpenTimer PROC STDCALL mov r10 , rcx mov eax , 249 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenTimer ENDP ; ULONG64 __stdcall NtOpenTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtOpenTransaction PROC STDCALL mov r10 , rcx mov eax , 250 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenTransaction ENDP ; ULONG64 __stdcall NtOpenTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtOpenTransactionManager PROC STDCALL mov r10 , rcx mov eax , 251 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtOpenTransactionManager ENDP ; ULONG64 __stdcall NtPlugPlayControl( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtPlugPlayControl PROC STDCALL mov r10 , rcx mov eax , 252 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPlugPlayControl ENDP ; ULONG64 __stdcall NtPrePrepareComplete( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtPrePrepareComplete PROC STDCALL mov r10 , rcx mov eax , 253 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPrePrepareComplete ENDP ; ULONG64 __stdcall NtPrePrepareEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtPrePrepareEnlistment PROC STDCALL mov r10 , rcx mov eax , 254 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPrePrepareEnlistment ENDP ; ULONG64 __stdcall NtPrepareComplete( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtPrepareComplete PROC STDCALL mov r10 , rcx mov eax , 255 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPrepareComplete ENDP ; ULONG64 __stdcall NtPrepareEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtPrepareEnlistment PROC STDCALL mov r10 , rcx mov eax , 256 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPrepareEnlistment ENDP ; ULONG64 __stdcall NtPrivilegeCheck( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtPrivilegeCheck PROC STDCALL mov r10 , rcx mov eax , 257 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPrivilegeCheck ENDP ; ULONG64 __stdcall NtPrivilegeObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtPrivilegeObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 258 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPrivilegeObjectAuditAlarm ENDP ; ULONG64 __stdcall NtPrivilegedServiceAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtPrivilegedServiceAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 259 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPrivilegedServiceAuditAlarm ENDP ; ULONG64 __stdcall NtPropagationComplete( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtPropagationComplete PROC STDCALL mov r10 , rcx mov eax , 260 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPropagationComplete ENDP ; ULONG64 __stdcall NtPropagationFailed( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtPropagationFailed PROC STDCALL mov r10 , rcx mov eax , 261 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPropagationFailed ENDP ; ULONG64 __stdcall NtPulseEvent( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtPulseEvent PROC STDCALL mov r10 , rcx mov eax , 262 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtPulseEvent ENDP ; ULONG64 __stdcall NtQueryBootEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryBootEntryOrder PROC STDCALL mov r10 , rcx mov eax , 263 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryBootEntryOrder ENDP ; ULONG64 __stdcall NtQueryBootOptions( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryBootOptions PROC STDCALL mov r10 , rcx mov eax , 264 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryBootOptions ENDP ; ULONG64 __stdcall NtQueryDebugFilterState( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryDebugFilterState PROC STDCALL mov r10 , rcx mov eax , 265 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryDebugFilterState ENDP ; ULONG64 __stdcall NtQueryDirectoryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); _6_0_6002_sp2_windows_vista_NtQueryDirectoryObject PROC STDCALL mov r10 , rcx mov eax , 266 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryDirectoryObject ENDP ; ULONG64 __stdcall NtQueryDriverEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryDriverEntryOrder PROC STDCALL mov r10 , rcx mov eax , 267 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryDriverEntryOrder ENDP ; ULONG64 __stdcall NtQueryEaFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtQueryEaFile PROC STDCALL mov r10 , rcx mov eax , 268 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryEaFile ENDP ; ULONG64 __stdcall NtQueryFullAttributesFile( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryFullAttributesFile PROC STDCALL mov r10 , rcx mov eax , 269 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryFullAttributesFile ENDP ; ULONG64 __stdcall NtQueryInformationAtom( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationAtom PROC STDCALL mov r10 , rcx mov eax , 270 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationAtom ENDP ; ULONG64 __stdcall NtQueryInformationEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationEnlistment PROC STDCALL mov r10 , rcx mov eax , 271 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationEnlistment ENDP ; ULONG64 __stdcall NtQueryInformationJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationJobObject PROC STDCALL mov r10 , rcx mov eax , 272 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationJobObject ENDP ; ULONG64 __stdcall NtQueryInformationPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationPort PROC STDCALL mov r10 , rcx mov eax , 273 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationPort ENDP ; ULONG64 __stdcall NtQueryInformationResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationResourceManager PROC STDCALL mov r10 , rcx mov eax , 274 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationResourceManager ENDP ; ULONG64 __stdcall NtQueryInformationTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationTransaction PROC STDCALL mov r10 , rcx mov eax , 275 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationTransaction ENDP ; ULONG64 __stdcall NtQueryInformationTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationTransactionManager PROC STDCALL mov r10 , rcx mov eax , 276 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationTransactionManager ENDP ; ULONG64 __stdcall NtQueryInformationWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryInformationWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 277 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInformationWorkerFactory ENDP ; ULONG64 __stdcall NtQueryInstallUILanguage( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtQueryInstallUILanguage PROC STDCALL mov r10 , rcx mov eax , 278 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryInstallUILanguage ENDP ; ULONG64 __stdcall NtQueryIntervalProfile( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryIntervalProfile PROC STDCALL mov r10 , rcx mov eax , 279 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryIntervalProfile ENDP ; ULONG64 __stdcall NtQueryIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryIoCompletion PROC STDCALL mov r10 , rcx mov eax , 280 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryIoCompletion ENDP ; ULONG64 __stdcall NtQueryLicenseValue( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryLicenseValue PROC STDCALL mov r10 , rcx mov eax , 281 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryLicenseValue ENDP ; ULONG64 __stdcall NtQueryMultipleValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtQueryMultipleValueKey PROC STDCALL mov r10 , rcx mov eax , 282 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryMultipleValueKey ENDP ; ULONG64 __stdcall NtQueryMutant( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQueryMutant PROC STDCALL mov r10 , rcx mov eax , 283 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryMutant ENDP ; ULONG64 __stdcall NtQueryOpenSubKeys( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtQueryOpenSubKeys PROC STDCALL mov r10 , rcx mov eax , 284 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryOpenSubKeys ENDP ; ULONG64 __stdcall NtQueryOpenSubKeysEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtQueryOpenSubKeysEx PROC STDCALL mov r10 , rcx mov eax , 285 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryOpenSubKeysEx ENDP ; ULONG64 __stdcall NtQueryPortInformationProcess( ); _6_0_6002_sp2_windows_vista_NtQueryPortInformationProcess PROC STDCALL mov r10 , rcx mov eax , 286 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryPortInformationProcess ENDP ; ULONG64 __stdcall NtQueryQuotaInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtQueryQuotaInformationFile PROC STDCALL mov r10 , rcx mov eax , 287 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryQuotaInformationFile ENDP ; ULONG64 __stdcall NtQuerySecurityObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQuerySecurityObject PROC STDCALL mov r10 , rcx mov eax , 288 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySecurityObject ENDP ; ULONG64 __stdcall NtQuerySemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQuerySemaphore PROC STDCALL mov r10 , rcx mov eax , 289 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySemaphore ENDP ; ULONG64 __stdcall NtQuerySymbolicLinkObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtQuerySymbolicLinkObject PROC STDCALL mov r10 , rcx mov eax , 290 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySymbolicLinkObject ENDP ; ULONG64 __stdcall NtQuerySystemEnvironmentValue( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtQuerySystemEnvironmentValue PROC STDCALL mov r10 , rcx mov eax , 291 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySystemEnvironmentValue ENDP ; ULONG64 __stdcall NtQuerySystemEnvironmentValueEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtQuerySystemEnvironmentValueEx PROC STDCALL mov r10 , rcx mov eax , 292 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQuerySystemEnvironmentValueEx ENDP ; ULONG64 __stdcall NtQueryTimerResolution( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtQueryTimerResolution PROC STDCALL mov r10 , rcx mov eax , 293 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtQueryTimerResolution ENDP ; ULONG64 __stdcall NtRaiseException( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtRaiseException PROC STDCALL mov r10 , rcx mov eax , 294 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRaiseException ENDP ; ULONG64 __stdcall NtRaiseHardError( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtRaiseHardError PROC STDCALL mov r10 , rcx mov eax , 295 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRaiseHardError ENDP ; ULONG64 __stdcall NtReadOnlyEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtReadOnlyEnlistment PROC STDCALL mov r10 , rcx mov eax , 296 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReadOnlyEnlistment ENDP ; ULONG64 __stdcall NtRecoverEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRecoverEnlistment PROC STDCALL mov r10 , rcx mov eax , 297 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRecoverEnlistment ENDP ; ULONG64 __stdcall NtRecoverResourceManager( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtRecoverResourceManager PROC STDCALL mov r10 , rcx mov eax , 298 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRecoverResourceManager ENDP ; ULONG64 __stdcall NtRecoverTransactionManager( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtRecoverTransactionManager PROC STDCALL mov r10 , rcx mov eax , 299 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRecoverTransactionManager ENDP ; ULONG64 __stdcall NtRegisterProtocolAddressInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtRegisterProtocolAddressInformation PROC STDCALL mov r10 , rcx mov eax , 300 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRegisterProtocolAddressInformation ENDP ; ULONG64 __stdcall NtRegisterThreadTerminatePort( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtRegisterThreadTerminatePort PROC STDCALL mov r10 , rcx mov eax , 301 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRegisterThreadTerminatePort ENDP ; ULONG64 __stdcall NtReleaseCMFViewOwnership( ); _6_0_6002_sp2_windows_vista_NtReleaseCMFViewOwnership PROC STDCALL mov r10 , rcx mov eax , 302 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReleaseCMFViewOwnership ENDP ; ULONG64 __stdcall NtReleaseKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtReleaseKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 303 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReleaseKeyedEvent ENDP ; ULONG64 __stdcall NtReleaseWorkerFactoryWorker( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtReleaseWorkerFactoryWorker PROC STDCALL mov r10 , rcx mov eax , 304 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReleaseWorkerFactoryWorker ENDP ; ULONG64 __stdcall NtRemoveIoCompletionEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtRemoveIoCompletionEx PROC STDCALL mov r10 , rcx mov eax , 305 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRemoveIoCompletionEx ENDP ; ULONG64 __stdcall NtRemoveProcessDebug( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRemoveProcessDebug PROC STDCALL mov r10 , rcx mov eax , 306 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRemoveProcessDebug ENDP ; ULONG64 __stdcall NtRenameKey( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRenameKey PROC STDCALL mov r10 , rcx mov eax , 307 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRenameKey ENDP ; ULONG64 __stdcall NtRenameTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRenameTransactionManager PROC STDCALL mov r10 , rcx mov eax , 308 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRenameTransactionManager ENDP ; ULONG64 __stdcall NtReplaceKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtReplaceKey PROC STDCALL mov r10 , rcx mov eax , 309 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReplaceKey ENDP ; ULONG64 __stdcall NtReplacePartitionUnit( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtReplacePartitionUnit PROC STDCALL mov r10 , rcx mov eax , 310 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReplacePartitionUnit ENDP ; ULONG64 __stdcall NtReplyWaitReplyPort( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtReplyWaitReplyPort PROC STDCALL mov r10 , rcx mov eax , 311 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtReplyWaitReplyPort ENDP ; ULONG64 __stdcall NtRequestDeviceWakeup( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtRequestDeviceWakeup PROC STDCALL mov r10 , rcx mov eax , 312 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRequestDeviceWakeup ENDP ; ULONG64 __stdcall NtRequestPort( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRequestPort PROC STDCALL mov r10 , rcx mov eax , 313 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRequestPort ENDP ; ULONG64 __stdcall NtRequestWakeupLatency( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtRequestWakeupLatency PROC STDCALL mov r10 , rcx mov eax , 314 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRequestWakeupLatency ENDP ; ULONG64 __stdcall NtResetEvent( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtResetEvent PROC STDCALL mov r10 , rcx mov eax , 315 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtResetEvent ENDP ; ULONG64 __stdcall NtResetWriteWatch( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtResetWriteWatch PROC STDCALL mov r10 , rcx mov eax , 316 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtResetWriteWatch ENDP ; ULONG64 __stdcall NtRestoreKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtRestoreKey PROC STDCALL mov r10 , rcx mov eax , 317 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRestoreKey ENDP ; ULONG64 __stdcall NtResumeProcess( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtResumeProcess PROC STDCALL mov r10 , rcx mov eax , 318 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtResumeProcess ENDP ; ULONG64 __stdcall NtRollbackComplete( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRollbackComplete PROC STDCALL mov r10 , rcx mov eax , 319 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRollbackComplete ENDP ; ULONG64 __stdcall NtRollbackEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRollbackEnlistment PROC STDCALL mov r10 , rcx mov eax , 320 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRollbackEnlistment ENDP ; ULONG64 __stdcall NtRollbackTransaction( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRollbackTransaction PROC STDCALL mov r10 , rcx mov eax , 321 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRollbackTransaction ENDP ; ULONG64 __stdcall NtRollforwardTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtRollforwardTransactionManager PROC STDCALL mov r10 , rcx mov eax , 322 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtRollforwardTransactionManager ENDP ; ULONG64 __stdcall NtSaveKey( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSaveKey PROC STDCALL mov r10 , rcx mov eax , 323 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSaveKey ENDP ; ULONG64 __stdcall NtSaveKeyEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtSaveKeyEx PROC STDCALL mov r10 , rcx mov eax , 324 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSaveKeyEx ENDP ; ULONG64 __stdcall NtSaveMergedKeys( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtSaveMergedKeys PROC STDCALL mov r10 , rcx mov eax , 325 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSaveMergedKeys ENDP ; ULONG64 __stdcall NtSecureConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); _6_0_6002_sp2_windows_vista_NtSecureConnectPort PROC STDCALL mov r10 , rcx mov eax , 326 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSecureConnectPort ENDP ; ULONG64 __stdcall NtSetBootEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetBootEntryOrder PROC STDCALL mov r10 , rcx mov eax , 327 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetBootEntryOrder ENDP ; ULONG64 __stdcall NtSetBootOptions( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetBootOptions PROC STDCALL mov r10 , rcx mov eax , 328 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetBootOptions ENDP ; ULONG64 __stdcall NtSetContextThread( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetContextThread PROC STDCALL mov r10 , rcx mov eax , 329 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetContextThread ENDP ; ULONG64 __stdcall NtSetDebugFilterState( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtSetDebugFilterState PROC STDCALL mov r10 , rcx mov eax , 330 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetDebugFilterState ENDP ; ULONG64 __stdcall NtSetDefaultHardErrorPort( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetDefaultHardErrorPort PROC STDCALL mov r10 , rcx mov eax , 331 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetDefaultHardErrorPort ENDP ; ULONG64 __stdcall NtSetDefaultLocale( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetDefaultLocale PROC STDCALL mov r10 , rcx mov eax , 332 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetDefaultLocale ENDP ; ULONG64 __stdcall NtSetDefaultUILanguage( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetDefaultUILanguage PROC STDCALL mov r10 , rcx mov eax , 333 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetDefaultUILanguage ENDP ; ULONG64 __stdcall NtSetDriverEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetDriverEntryOrder PROC STDCALL mov r10 , rcx mov eax , 334 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetDriverEntryOrder ENDP ; ULONG64 __stdcall NtSetEaFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetEaFile PROC STDCALL mov r10 , rcx mov eax , 335 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetEaFile ENDP ; ULONG64 __stdcall NtSetHighEventPair( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetHighEventPair PROC STDCALL mov r10 , rcx mov eax , 336 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetHighEventPair ENDP ; ULONG64 __stdcall NtSetHighWaitLowEventPair( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetHighWaitLowEventPair PROC STDCALL mov r10 , rcx mov eax , 337 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetHighWaitLowEventPair ENDP ; ULONG64 __stdcall NtSetInformationDebugObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtSetInformationDebugObject PROC STDCALL mov r10 , rcx mov eax , 338 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationDebugObject ENDP ; ULONG64 __stdcall NtSetInformationEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationEnlistment PROC STDCALL mov r10 , rcx mov eax , 339 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationEnlistment ENDP ; ULONG64 __stdcall NtSetInformationJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationJobObject PROC STDCALL mov r10 , rcx mov eax , 340 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationJobObject ENDP ; ULONG64 __stdcall NtSetInformationKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationKey PROC STDCALL mov r10 , rcx mov eax , 341 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationKey ENDP ; ULONG64 __stdcall NtSetInformationResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationResourceManager PROC STDCALL mov r10 , rcx mov eax , 342 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationResourceManager ENDP ; ULONG64 __stdcall NtSetInformationToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationToken PROC STDCALL mov r10 , rcx mov eax , 343 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationToken ENDP ; ULONG64 __stdcall NtSetInformationTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationTransaction PROC STDCALL mov r10 , rcx mov eax , 344 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationTransaction ENDP ; ULONG64 __stdcall NtSetInformationTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationTransactionManager PROC STDCALL mov r10 , rcx mov eax , 345 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationTransactionManager ENDP ; ULONG64 __stdcall NtSetInformationWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetInformationWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 346 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetInformationWorkerFactory ENDP ; ULONG64 __stdcall NtSetIntervalProfile( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetIntervalProfile PROC STDCALL mov r10 , rcx mov eax , 347 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetIntervalProfile ENDP ; ULONG64 __stdcall NtSetIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtSetIoCompletion PROC STDCALL mov r10 , rcx mov eax , 348 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetIoCompletion ENDP ; ULONG64 __stdcall NtSetLdtEntries( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtSetLdtEntries PROC STDCALL mov r10 , rcx mov eax , 349 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetLdtEntries ENDP ; ULONG64 __stdcall NtSetLowEventPair( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetLowEventPair PROC STDCALL mov r10 , rcx mov eax , 350 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetLowEventPair ENDP ; ULONG64 __stdcall NtSetLowWaitHighEventPair( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetLowWaitHighEventPair PROC STDCALL mov r10 , rcx mov eax , 351 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetLowWaitHighEventPair ENDP ; ULONG64 __stdcall NtSetQuotaInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSetQuotaInformationFile PROC STDCALL mov r10 , rcx mov eax , 352 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetQuotaInformationFile ENDP ; ULONG64 __stdcall NtSetSecurityObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtSetSecurityObject PROC STDCALL mov r10 , rcx mov eax , 353 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetSecurityObject ENDP ; ULONG64 __stdcall NtSetSystemEnvironmentValue( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetSystemEnvironmentValue PROC STDCALL mov r10 , rcx mov eax , 354 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetSystemEnvironmentValue ENDP ; ULONG64 __stdcall NtSetSystemEnvironmentValueEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtSetSystemEnvironmentValueEx PROC STDCALL mov r10 , rcx mov eax , 355 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetSystemEnvironmentValueEx ENDP ; ULONG64 __stdcall NtSetSystemInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtSetSystemInformation PROC STDCALL mov r10 , rcx mov eax , 356 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetSystemInformation ENDP ; ULONG64 __stdcall NtSetSystemPowerState( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtSetSystemPowerState PROC STDCALL mov r10 , rcx mov eax , 357 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetSystemPowerState ENDP ; ULONG64 __stdcall NtSetSystemTime( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetSystemTime PROC STDCALL mov r10 , rcx mov eax , 358 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetSystemTime ENDP ; ULONG64 __stdcall NtSetThreadExecutionState( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSetThreadExecutionState PROC STDCALL mov r10 , rcx mov eax , 359 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetThreadExecutionState ENDP ; ULONG64 __stdcall NtSetTimerResolution( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); _6_0_6002_sp2_windows_vista_NtSetTimerResolution PROC STDCALL mov r10 , rcx mov eax , 360 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetTimerResolution ENDP ; ULONG64 __stdcall NtSetUuidSeed( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSetUuidSeed PROC STDCALL mov r10 , rcx mov eax , 361 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetUuidSeed ENDP ; ULONG64 __stdcall NtSetVolumeInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtSetVolumeInformationFile PROC STDCALL mov r10 , rcx mov eax , 362 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSetVolumeInformationFile ENDP ; ULONG64 __stdcall NtShutdownSystem( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtShutdownSystem PROC STDCALL mov r10 , rcx mov eax , 363 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtShutdownSystem ENDP ; ULONG64 __stdcall NtShutdownWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtShutdownWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 364 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtShutdownWorkerFactory ENDP ; ULONG64 __stdcall NtSignalAndWaitForSingleObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtSignalAndWaitForSingleObject PROC STDCALL mov r10 , rcx mov eax , 365 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSignalAndWaitForSingleObject ENDP ; ULONG64 __stdcall NtSinglePhaseReject( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSinglePhaseReject PROC STDCALL mov r10 , rcx mov eax , 366 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSinglePhaseReject ENDP ; ULONG64 __stdcall NtStartProfile( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtStartProfile PROC STDCALL mov r10 , rcx mov eax , 367 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtStartProfile ENDP ; ULONG64 __stdcall NtStopProfile( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtStopProfile PROC STDCALL mov r10 , rcx mov eax , 368 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtStopProfile ENDP ; ULONG64 __stdcall NtSuspendProcess( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtSuspendProcess PROC STDCALL mov r10 , rcx mov eax , 369 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSuspendProcess ENDP ; ULONG64 __stdcall NtSuspendThread( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtSuspendThread PROC STDCALL mov r10 , rcx mov eax , 370 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSuspendThread ENDP ; ULONG64 __stdcall NtSystemDebugControl( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtSystemDebugControl PROC STDCALL mov r10 , rcx mov eax , 371 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtSystemDebugControl ENDP ; ULONG64 __stdcall NtTerminateJobObject( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtTerminateJobObject PROC STDCALL mov r10 , rcx mov eax , 372 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtTerminateJobObject ENDP ; ULONG64 __stdcall NtTestAlert( ); _6_0_6002_sp2_windows_vista_NtTestAlert PROC STDCALL mov r10 , rcx mov eax , 373 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtTestAlert ENDP ; ULONG64 __stdcall NtThawRegistry( ); _6_0_6002_sp2_windows_vista_NtThawRegistry PROC STDCALL mov r10 , rcx mov eax , 374 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtThawRegistry ENDP ; ULONG64 __stdcall NtThawTransactions( ); _6_0_6002_sp2_windows_vista_NtThawTransactions PROC STDCALL mov r10 , rcx mov eax , 375 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtThawTransactions ENDP ; ULONG64 __stdcall NtTraceControl( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); _6_0_6002_sp2_windows_vista_NtTraceControl PROC STDCALL mov r10 , rcx mov eax , 376 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtTraceControl ENDP ; ULONG64 __stdcall NtTranslateFilePath( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtTranslateFilePath PROC STDCALL mov r10 , rcx mov eax , 377 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtTranslateFilePath ENDP ; ULONG64 __stdcall NtUnloadDriver( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtUnloadDriver PROC STDCALL mov r10 , rcx mov eax , 378 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtUnloadDriver ENDP ; ULONG64 __stdcall NtUnloadKey( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtUnloadKey PROC STDCALL mov r10 , rcx mov eax , 379 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtUnloadKey ENDP ; ULONG64 __stdcall NtUnloadKey2( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtUnloadKey2 PROC STDCALL mov r10 , rcx mov eax , 380 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtUnloadKey2 ENDP ; ULONG64 __stdcall NtUnloadKeyEx( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtUnloadKeyEx PROC STDCALL mov r10 , rcx mov eax , 381 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtUnloadKeyEx ENDP ; ULONG64 __stdcall NtUnlockFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); _6_0_6002_sp2_windows_vista_NtUnlockFile PROC STDCALL mov r10 , rcx mov eax , 382 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtUnlockFile ENDP ; ULONG64 __stdcall NtUnlockVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtUnlockVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 383 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtUnlockVirtualMemory ENDP ; ULONG64 __stdcall NtVdmControl( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtVdmControl PROC STDCALL mov r10 , rcx mov eax , 384 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtVdmControl ENDP ; ULONG64 __stdcall NtWaitForDebugEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtWaitForDebugEvent PROC STDCALL mov r10 , rcx mov eax , 385 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitForDebugEvent ENDP ; ULONG64 __stdcall NtWaitForKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); _6_0_6002_sp2_windows_vista_NtWaitForKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 386 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitForKeyedEvent ENDP ; ULONG64 __stdcall NtWaitForWorkViaWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 ); _6_0_6002_sp2_windows_vista_NtWaitForWorkViaWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 387 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitForWorkViaWorkerFactory ENDP ; ULONG64 __stdcall NtWaitHighEventPair( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtWaitHighEventPair PROC STDCALL mov r10 , rcx mov eax , 388 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitHighEventPair ENDP ; ULONG64 __stdcall NtWaitLowEventPair( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtWaitLowEventPair PROC STDCALL mov r10 , rcx mov eax , 389 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWaitLowEventPair ENDP ; ULONG64 __stdcall NtWorkerFactoryWorkerReady( ULONG64 arg_01 ); _6_0_6002_sp2_windows_vista_NtWorkerFactoryWorkerReady PROC STDCALL mov r10 , rcx mov eax , 390 ;syscall db 0Fh , 05h ret _6_0_6002_sp2_windows_vista_NtWorkerFactoryWorkerReady ENDP
; A157821: 8984250n + 330. ; 8984580,17968830,26953080,35937330,44921580,53905830,62890080,71874330,80858580,89842830,98827080,107811330,116795580,125779830,134764080,143748330,152732580,161716830,170701080,179685330,188669580,197653830,206638080,215622330,224606580,233590830,242575080,251559330,260543580,269527830,278512080,287496330,296480580,305464830,314449080,323433330,332417580,341401830,350386080,359370330,368354580,377338830,386323080,395307330,404291580,413275830,422260080,431244330,440228580,449212830,458197080 mul $0,8984250 add $0,8984580
CinnabarPokecenter_Script: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing CinnabarPokecenter_TextPointers: dw CinnabarHealNurseText dw CinnabarPokecenterText2 dw CinnabarPokecenterText3 dw CinnabarTradeNurseText CinnabarHealNurseText: TX_POKECENTER_NURSE CinnabarPokecenterText2: TX_FAR _CinnabarPokecenterText2 db "@" CinnabarPokecenterText3: TX_FAR _CinnabarPokecenterText3 db "@" CinnabarTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST
; A184587: a(n) = floor((n+1/2)*s), where s=(5+sqrt(5))/4; complement of A184586. ; Submitted by Jon Maiga ; 2,4,6,8,9,11,13,15,17,18,20,22,24,26,28,29,31,33,35,37,38,40,42,44,46,47,49,51,53,55,56,58,60,62,64,66,67,69,71,73,75,76,78,80,82,84,85,87,89,91,93,94,96,98,100,102,104,105,107,109,111,113,114,116,118,120,122,123,125,127,129,131,132,134,136,138,140,142,143,145,147,149,151,152,154,156,158,160,161,163,165,167,169,170,172,174,176,178,179,181 mov $2,$0 seq $0,184657 ; floor(n*s+h-h*s), where s=(3+sqrt(5))/2, h=-1/2; complement of A184656. add $0,$2 div $0,2 add $0,1
/********************************************************************** Audacity: A Digital Audio Editor EffectEqualization.cpp Andrew Hallendorff *******************************************************************//** \file Equalization48x.cpp \brief Fast SSE based implementation of equalization. *//****************************************************************/ #include "../Audacity.h" // for USE_* macros #include "Equalization48x.h" #include "../Experimental.h" #ifdef EXPERIMENTAL_EQ_SSE_THREADED #include "../Project.h" #include "Equalization.h" #include "../WaveClip.h" #include "../WaveTrack.h" #include "../float_cast.h" #include <vector> #include <wx/setup.h> // for wxUSE_* macros #include <wx/dcmemory.h> #include <wx/event.h> #include <wx/string.h> #if wxUSE_TOOLTIPS #include <wx/tooltip.h> #endif #include <wx/utils.h> #include <math.h> #include "../RealFFTf48x.h" #ifndef USE_SSE2 #define USE_SSE2 #endif #include <stdlib.h> #ifdef __WXMSW__ #include <malloc.h> #endif #include <stdio.h> #include <math.h> #include <emmintrin.h> #ifdef _WIN32 // Windows #include <intrin.h> #define cpuid __cpuid #else // GCC Inline Assembly void cpuid(int CPUInfo[4],int InfoType){ __asm__ __volatile__ ( "cpuid": "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType) ); } #endif bool sMathCapsInitialized = false; MathCaps sMathCaps; // dirty switcher int sMathPath=MATH_FUNCTION_SSE|MATH_FUNCTION_THREADED; void EffectEqualization48x::SetMathPath(int mathPath) { sMathPath=mathPath; }; int EffectEqualization48x::GetMathPath() { return sMathPath; }; void EffectEqualization48x::AddMathPathOption(int mathPath) { sMathPath|=mathPath; }; void EffectEqualization48x::RemoveMathPathOption(int mathPath) { sMathPath&=~mathPath; }; MathCaps *EffectEqualization48x::GetMathCaps() { if(!sMathCapsInitialized) { sMathCapsInitialized=true; sMathCaps.x64 = false; sMathCaps.MMX = false; sMathCaps.SSE = false; sMathCaps.SSE2 = false; sMathCaps.SSE3 = false; sMathCaps.SSSE3 = false; sMathCaps.SSE41 = false; sMathCaps.SSE42 = false; sMathCaps.SSE4a = false; sMathCaps.AVX = false; sMathCaps.XOP = false; sMathCaps.FMA3 = false; sMathCaps.FMA4 = false; int info[4]; cpuid(info, 0); int nIds = info[0]; cpuid(info, 0x80000000); int nExIds = info[0]; // Detect Instruction Set if (nIds >= 1){ cpuid(info,0x00000001); sMathCaps.MMX = (info[3] & ((int)1 << 23)) != 0; sMathCaps.SSE = (info[3] & ((int)1 << 25)) != 0; sMathCaps.SSE2 = (info[3] & ((int)1 << 26)) != 0; sMathCaps.SSE3 = (info[2] & ((int)1 << 0)) != 0; sMathCaps.SSSE3 = (info[2] & ((int)1 << 9)) != 0; sMathCaps.SSE41 = (info[2] & ((int)1 << 19)) != 0; sMathCaps.SSE42 = (info[2] & ((int)1 << 20)) != 0; sMathCaps.AVX = (info[2] & ((int)1 << 28)) != 0; sMathCaps.FMA3 = (info[2] & ((int)1 << 12)) != 0; } if (nExIds >= 0x80000001){ cpuid(info,0x80000001); sMathCaps.x64 = (info[3] & ((int)1 << 29)) != 0; sMathCaps.SSE4a = (info[2] & ((int)1 << 6)) != 0; sMathCaps.FMA4 = (info[2] & ((int)1 << 16)) != 0; sMathCaps.XOP = (info[2] & ((int)1 << 11)) != 0; } if(sMathCaps.SSE) sMathPath=MATH_FUNCTION_SSE|MATH_FUNCTION_THREADED; // we are starting on. } return &sMathCaps; }; void * malloc_simd(const size_t size) { #if defined WIN32 // WIN32 return _aligned_malloc(size, 16); #elif defined __linux__ // Linux return memalign (16, size); #elif defined __MACH__ // Mac OS X return malloc(size); #else // other (use valloc for page-aligned memory) return valloc(size); #endif } void free_simd::operator() (void* mem) const { #if defined WIN32 // WIN32 _aligned_free(mem); #else free(mem); #endif } EffectEqualization48x::EffectEqualization48x(): mThreadCount(0),mFilterSize(0),mWindowSize(0),mBlockSize(0),mWorkerDataCount(0),mBlocksPerBuffer(20), mScratchBufferSize(0),mSubBufferSize(0),mThreaded(false), mBenching(false),mBufferCount(0) { } EffectEqualization48x::~EffectEqualization48x() { } bool EffectEqualization48x::AllocateBuffersWorkers(int nThreads) { if(mBigBuffer) FreeBuffersWorkers(); mFilterSize=(mEffectEqualization->mM-1)&(~15); // 4000 !!! Filter MUST BE QUAD WORD ALIGNED !!!! mWindowSize=mEffectEqualization->windowSize; wxASSERT(mFilterSize < mWindowSize); mBlockSize=mWindowSize-mFilterSize; // 12,384 auto threadCount = wxThread::GetCPUCount(); mThreaded = (nThreads > 0 && threadCount > 0); if(mThreaded) { mThreadCount = threadCount; mWorkerDataCount=mThreadCount+2; // 2 extra slots (maybe double later) } else { mWorkerDataCount=1; mThreadCount=0; } #ifdef __AVX_ENABLED mBufferCount=sMathPath&MATH_FUNCTION_AVX?8:4; #else mBufferCount=4; #endif // we're skewing the data by one block to allow for 1/4 block intersections. // this will remove the disparity in data at the intersections of the runs // The nice magic allocation // megabyte - 3 windows - 4 overlaping buffers - filter // 2^20 = 1,048,576 - 3 * 2^14 (16,384) - ((4 * 20) - 3) * 12,384 - 4000 // 1,048,576 - 49,152 - 953,568 - 4000 = 41,856 (leftover) mScratchBufferSize=mWindowSize*3*sizeof(float)*mBufferCount; // 3 window size blocks of instruction size mSubBufferSize=mBlockSize*(mBufferCount*(mBlocksPerBuffer-1)); // we are going to do a full block overlap mBigBuffer.reset( (float *)malloc_simd(sizeof(float) * (mSubBufferSize + mFilterSize + mScratchBufferSize) * mWorkerDataCount) ); // we run over by filtersize // fill the bufferInfo mBufferInfo.reinit(mWorkerDataCount); for(int i=0;i<mWorkerDataCount;i++) { mBufferInfo[i].mFftWindowSize=mWindowSize; mBufferInfo[i].mFftFilterSize=mFilterSize; mBufferInfo[i].mBufferLength=mBlockSize*mBlocksPerBuffer; mBufferInfo[i].mContiguousBufferSize=mSubBufferSize; mBufferInfo[i].mScratchBuffer=&mBigBuffer[(mSubBufferSize+mScratchBufferSize)*i+mSubBufferSize]; for(int j=0;j<mBufferCount;j++) mBufferInfo[i].mBufferDest[j]=mBufferInfo[i].mBufferSouce[j]=&mBigBuffer[j*(mBufferInfo[i].mBufferLength-mBlockSize)+(mSubBufferSize+mScratchBufferSize)*i]; } if(mThreadCount) { // start the workers mDataMutex.IsOk(); mEQWorkers.reinit(mThreadCount); for(int i=0;i<mThreadCount;i++) { mEQWorkers[i].SetData( mBufferInfo.get(), mWorkerDataCount, &mDataMutex, this); mEQWorkers[i].Create(); mEQWorkers[i].Run(); } } return true; } bool EffectEqualization48x::FreeBuffersWorkers() { if(mThreaded) { for(int i=0;i<mThreadCount;i++) { // tell all the workers to exit mEQWorkers[i].ExitLoop(); } for(int i=0;i<mThreadCount;i++) { mEQWorkers[i].Wait(); } mEQWorkers.reset(); // kill the workers ( go directly to jail) mThreadCount=0; mWorkerDataCount=0; } mBufferInfo.reset(); mBigBuffer.reset(); return true; } #pragma warning(push) // Disable the unreachable code warning in MSVC, for this function. #pragma warning(disable: 4702) bool EffectEqualization48x::RunFunctionSelect(int flags, int count, WaveTrack * track, sampleCount start, sampleCount len) { // deal with tables here flags&=~(MATH_FUNCTION_BITREVERSE_TABLE|MATH_FUNCTION_SIN_COS_TABLE); // clear out the table flags switch (flags) { case MATH_FUNCTION_SSE: return ProcessOne4x(count, track, start, len); break; case MATH_FUNCTION_SSE|MATH_FUNCTION_THREADED: return ProcessOne1x4xThreaded(count, track, start, len); break; case MATH_FUNCTION_THREADED: case MATH_FUNCTION_THREADED|MATH_FUNCTION_SEGMENTED_CODE: return ProcessOne1x4xThreaded(count, track, start, len, 1); break; case MATH_FUNCTION_SEGMENTED_CODE: return ProcessOne1x(count, track, start, len); break; default: return !mEffectEqualization->ProcessOne(count, track, start, len); break; } return false; } #pragma warning(pop) bool EffectEqualization48x::Process(EffectEqualization* effectEqualization) { mEffectEqualization=effectEqualization; // return TrackCompare(); // used for debugging data mEffectEqualization->CopyInputTracks(); // Set up mOutputTracks. bool bBreakLoop = false; TableUsage(sMathPath); if(sMathPath) // !!! Filter MUST BE QUAD WORD ALIGNED !!!! mEffectEqualization->mM=(mEffectEqualization->mM&(~15))+1; AllocateBuffersWorkers(sMathPath&MATH_FUNCTION_THREADED); auto cleanup = finally( [&] { FreeBuffersWorkers(); } ); int count = 0; for( auto track : mEffectEqualization->mOutputTracks->Selected< WaveTrack >() ) { double trackStart = track->GetStartTime(); double trackEnd = track->GetEndTime(); double t0 = mEffectEqualization->mT0 < trackStart? trackStart: mEffectEqualization->mT0; double t1 = mEffectEqualization->mT1 > trackEnd? trackEnd: mEffectEqualization->mT1; if (t1 > t0) { auto start = track->TimeToLongSamples(t0); auto end = track->TimeToLongSamples(t1); auto len = end - start; bBreakLoop=RunFunctionSelect(sMathPath, count, track, start, len); if( bBreakLoop ) break; } count++; } mEffectEqualization->ReplaceProcessedTracks(!bBreakLoop); return !bBreakLoop; } bool EffectEqualization48x::TrackCompare() { mEffectEqualization->CopyInputTracks(); // Set up mOutputTracks. bool bBreakLoop = false; TableUsage(sMathPath); if(sMathPath) // !!! Filter MUST BE QUAD WORD ALIGNED !!!! mEffectEqualization->mM=(mEffectEqualization->mM&(~15))+1; AllocateBuffersWorkers(sMathPath&MATH_FUNCTION_THREADED); auto cleanup = finally( [&] { FreeBuffersWorkers(); } ); // Reset map // PRL: These two maps aren't really used std::vector<const Track*> SecondIMap; std::vector<Track*> SecondOMap; SecondIMap.clear(); SecondOMap.clear(); auto pSecondOutputTracks = TrackList::Create(); auto &SecondOutputTracks = *pSecondOutputTracks; for (auto aTrack : mEffectEqualization->inputTracks()->Any< const WaveTrack >()) { // Include selected tracks, plus sync-lock selected tracks for Track::All. if (aTrack->GetSelected() || (// mEffectEqualization->mOutputTracksType == TrackKind::All && aTrack->IsSyncLockSelected())) { auto o = mEffectEqualization->mFactory->DuplicateWaveTrack( *aTrack ); SecondIMap.push_back(aTrack); SecondIMap.push_back(o.get()); SecondOutputTracks.Add( o ); } } for(int i = 0; i < 2; i++) { i?sMathPath=sMathPath:sMathPath=0; int count = 0; for( auto track : ( i ? mEffectEqualization->mOutputTracks.get() : &SecondOutputTracks ) -> Selected< WaveTrack >() ) { double trackStart = track->GetStartTime(); double trackEnd = track->GetEndTime(); double t0 = mEffectEqualization->mT0 < trackStart? trackStart: mEffectEqualization->mT0; double t1 = mEffectEqualization->mT1 > trackEnd? trackEnd: mEffectEqualization->mT1; if (t1 > t0) { auto start = track->TimeToLongSamples(t0); auto end = track->TimeToLongSamples(t1); auto len = end - start; bBreakLoop=RunFunctionSelect(sMathPath, count, track, start, len); if( bBreakLoop ) break; } count++; } } auto iter2 = (SecondOutputTracks.Selected< const WaveTrack >()).first; auto track2 = *iter2; for ( auto track : mEffectEqualization->mOutputTracks->Selected< WaveTrack >() ) { double trackStart = track->GetStartTime(); double trackEnd = track->GetEndTime(); double t0 = mEffectEqualization->mT0 < trackStart? trackStart: mEffectEqualization->mT0; double t1 = mEffectEqualization->mT1 > trackEnd? trackEnd: mEffectEqualization->mT1; if (t1 > t0) { auto start = track->TimeToLongSamples(t0); auto end = track->TimeToLongSamples(t1); auto len = end - start; DeltaTrack(track, track2, start, len); } track2 = * ++iter2; } mEffectEqualization->ReplaceProcessedTracks(!bBreakLoop); return bBreakLoop; // return !bBreakLoop ? } bool EffectEqualization48x::DeltaTrack( WaveTrack * t, const WaveTrack * t2, sampleCount start, sampleCount len) { auto trackBlockSize = t->GetMaxBlockSize(); Floats buffer1{ trackBlockSize }; Floats buffer2{ trackBlockSize }; AudacityProject *p = GetActiveProject(); auto output = TrackFactory::Get( *p ).NewWaveTrack(floatSample, t->GetRate()); auto originalLen = len; auto currentSample = start; while(len > 0) { auto curretLength = limitSampleBufferSize(trackBlockSize, len); t->Get((samplePtr)buffer1.get(), floatSample, currentSample, curretLength); t2->Get((samplePtr)buffer2.get(), floatSample, currentSample, curretLength); for(decltype(curretLength) i=0;i<curretLength;i++) buffer1[i]-=buffer2[i]; output->Append((samplePtr)buffer1.get(), floatSample, curretLength); currentSample+=curretLength; len-=curretLength; } output->Flush(); len=originalLen; ProcessTail(t, output.get(), start, len); return true; } #include <wx/stopwatch.h> bool EffectEqualization48x::Benchmark(EffectEqualization* effectEqualization) { mEffectEqualization=effectEqualization; mEffectEqualization->CopyInputTracks(); // Set up mOutputTracks. bool bBreakLoop = false; TableUsage(sMathPath); if(sMathPath) // !!! Filter MUST BE QUAD WORD ALIGNED !!!! mEffectEqualization->mM=(mEffectEqualization->mM&(~15))+1; AllocateBuffersWorkers(MATH_FUNCTION_THREADED); auto cleanup = finally( [&] { FreeBuffersWorkers(); } ); long times[] = { 0,0,0,0,0 }; wxStopWatch timer; mBenching = true; for(int i = 0; i < 5 && !bBreakLoop; i++) { int localMathPath; switch(i) { case 0: localMathPath=MATH_FUNCTION_SSE|MATH_FUNCTION_THREADED; if(!sMathCaps.SSE) localMathPath=-1; break; case 1: localMathPath=MATH_FUNCTION_SSE; if(!sMathCaps.SSE) localMathPath=-1; break; case 2: localMathPath=MATH_FUNCTION_SEGMENTED_CODE; break; case 3: localMathPath=MATH_FUNCTION_THREADED|MATH_FUNCTION_SEGMENTED_CODE; break; case 4: localMathPath=0; break; default: localMathPath=-1; } if(localMathPath >= 0) { timer.Start(); int count = 0; for (auto track : mEffectEqualization->mOutputTracks->Selected< WaveTrack >() ) { double trackStart = track->GetStartTime(); double trackEnd = track->GetEndTime(); double t0 = mEffectEqualization->mT0 < trackStart? trackStart: mEffectEqualization->mT0; double t1 = mEffectEqualization->mT1 > trackEnd? trackEnd: mEffectEqualization->mT1; if (t1 > t0) { auto start = track->TimeToLongSamples(t0); auto end = track->TimeToLongSamples(t1); auto len = end - start; bBreakLoop=RunFunctionSelect( localMathPath, count, track, start, len); if( bBreakLoop ) break; } count++; } times[i]=timer.Time(); } } mBenching=false; bBreakLoop=false; mEffectEqualization->ReplaceProcessedTracks(bBreakLoop); wxTimeSpan tsSSEThreaded(0, 0, 0, times[0]); wxTimeSpan tsSSE(0, 0, 0, times[1]); wxTimeSpan tsDefaultEnhanced(0, 0, 0, times[2]); wxTimeSpan tsDefaultThreaded(0, 0, 0, times[3]); wxTimeSpan tsDefault(0, 0, 0, times[4]); mEffectEqualization->MessageBox( wxString::Format(_("Benchmark times:\nOriginal: %s\nDefault Segmented: %s\nDefault Threaded: %s\nSSE: %s\nSSE Threaded: %s\n"),tsDefault.Format(wxT("%M:%S.%l")), tsDefaultEnhanced.Format(wxT("%M:%S.%l")), tsDefaultThreaded.Format(wxT("%M:%S.%l")),tsSSE.Format(wxT("%M:%S.%l")),tsSSEThreaded.Format(wxT("%M:%S.%l")))); return bBreakLoop; // return !bBreakLoop ? } bool EffectEqualization48x::ProcessTail(WaveTrack * t, WaveTrack * output, sampleCount start, sampleCount len) { // double offsetT0 = t->LongSamplesToTime(offset); double lenT = t->LongSamplesToTime(len); // 'start' is the sample offset in 't', the passed in track // 'startT' is the equivalent time value // 'output' starts at zero double startT = t->LongSamplesToTime(start); //output has one waveclip for the total length, even though //t might have whitespace seperating multiple clips //we want to maintain the original clip structure, so //only paste the intersections of the NEW clip. //Find the bits of clips that need replacing std::vector<std::pair<double, double> > clipStartEndTimes; std::vector<std::pair<double, double> > clipRealStartEndTimes; //the above may be truncated due to a clip being partially selected for (const auto &clip: t->GetClips()) { double clipStartT; double clipEndT; clipStartT = clip->GetStartTime(); clipEndT = clip->GetEndTime(); if( clipEndT <= startT ) continue; // clip is not within selection if( clipStartT >= startT + lenT ) continue; // clip is not within selection //save the actual clip start/end so that we can rejoin them after we paste. clipRealStartEndTimes.push_back(std::pair<double,double>(clipStartT,clipEndT)); if( clipStartT < startT ) // does selection cover the whole clip? clipStartT = startT; // don't copy all the NEW clip if( clipEndT > startT + lenT ) // does selection cover the whole clip? clipEndT = startT + lenT; // don't copy all the NEW clip //save them clipStartEndTimes.push_back(std::pair<double,double>(clipStartT,clipEndT)); } //now go thru and replace the old clips with NEW for(unsigned int i=0;i<clipStartEndTimes.size();i++) { //remove the old audio and get the NEW t->Clear(clipStartEndTimes[i].first,clipStartEndTimes[i].second); // output->Copy(clipStartEndTimes[i].first-startT+offsetT0,clipStartEndTimes[i].second-startT+offsetT0, &toClipOutput); auto toClipOutput = output->Copy(clipStartEndTimes[i].first-startT, clipStartEndTimes[i].second-startT); //put the processed audio in t->Paste(clipStartEndTimes[i].first, toClipOutput.get()); //if the clip was only partially selected, the Paste will have created a split line. Join is needed to take care of this //This is not true when the selection is fully contained within one clip (second half of conditional) if( (clipRealStartEndTimes[i].first != clipStartEndTimes[i].first || clipRealStartEndTimes[i].second != clipStartEndTimes[i].second) && !(clipRealStartEndTimes[i].first <= startT && clipRealStartEndTimes[i].second >= startT+lenT) ) t->Join(clipRealStartEndTimes[i].first,clipRealStartEndTimes[i].second); } return true; } bool EffectEqualization48x::ProcessBuffer(fft_type *sourceBuffer, fft_type *destBuffer, size_t bufferLength) { BufferInfo bufferInfo; bufferInfo.mContiguousBufferSize=bufferLength; bufferInfo.mBufferSouce[0]=sourceBuffer; bufferInfo.mBufferDest[0]=destBuffer; bufferInfo.mScratchBuffer=&sourceBuffer[mSubBufferSize]; return ProcessBuffer1x(&bufferInfo); } bool EffectEqualization48x::ProcessBuffer1x(BufferInfo *bufferInfo) { int bufferCount=bufferInfo->mContiguousBufferSize?1:4; for(int bufferIndex=0;bufferIndex<bufferCount;bufferIndex++) { auto bufferLength=bufferInfo->mBufferLength; if(bufferInfo->mContiguousBufferSize) bufferLength=bufferInfo->mContiguousBufferSize; auto blockCount=bufferLength/mBlockSize; auto lastBlockSize=bufferLength%mBlockSize; if(lastBlockSize) blockCount++; float *workBuffer=bufferInfo->mScratchBuffer; // all scratch buffers are at the end float *scratchBuffer=&workBuffer[mWindowSize*2]; // all scratch buffers are at the end float *sourceBuffer=bufferInfo->mBufferSouce[bufferIndex]; float *destBuffer=bufferInfo->mBufferDest[bufferIndex]; for(size_t runx=0;runx<blockCount;runx++) { float *currentBuffer=&workBuffer[mWindowSize*(runx&1)]; for(int i=0;i<mBlockSize;i++) currentBuffer[i]=sourceBuffer[i]; sourceBuffer+=mBlockSize; float *currentFilter=&currentBuffer[mBlockSize]; for(int i=0;i<mFilterSize;i++) currentFilter[i]=0; // mEffectEqualization->Filter(mWindowSize, currentBuffer); Filter1x(mWindowSize, currentBuffer, scratchBuffer); float *writeEnd=currentBuffer+mBlockSize; if(runx==blockCount) writeEnd=currentBuffer+(lastBlockSize+mFilterSize); if(runx) { float *lastOverrun=&workBuffer[mWindowSize*((runx+1)&1)+mBlockSize]; for(int j=0;j<mFilterSize;j++) *destBuffer++= *currentBuffer++ + *lastOverrun++; } else currentBuffer+=mFilterSize>>1; // this will skip the first filterSize on the first run while(currentBuffer<writeEnd) *destBuffer++ = *currentBuffer++; } } return true; } bool EffectEqualization48x::ProcessOne1x(int count, WaveTrack * t, sampleCount start, sampleCount len) { //sampleCount blockCount=len/mBlockSize; auto trackBlockSize = t->GetMaxBlockSize(); AudacityProject *p = GetActiveProject(); auto output = TrackFactory::Get( *p ).NewWaveTrack(floatSample, t->GetRate()); mEffectEqualization->TrackProgress(count, 0.0); int subBufferSize=mBufferCount==8?(mSubBufferSize>>1):mSubBufferSize; // half the buffers if avx is active auto bigRuns=len/(subBufferSize-mBlockSize); int trackBlocksPerBig=subBufferSize/trackBlockSize; int trackLeftovers=subBufferSize-trackBlocksPerBig*trackBlockSize; size_t singleProcessLength; if(bigRuns == 0) singleProcessLength = len.as_size_t(); else singleProcessLength = ((mFilterSize>>1)*bigRuns + len%(bigRuns*(subBufferSize-mBlockSize))) .as_size_t(); auto currentSample=start; bool bBreakLoop = false; for(int bigRun=0;bigRun<bigRuns;bigRun++) { // fill the buffer for(int i=0;i<trackBlocksPerBig;i++) { t->Get((samplePtr)&mBigBuffer[i*trackBlockSize], floatSample, currentSample, trackBlockSize); currentSample+=trackBlockSize; } if(trackLeftovers) { t->Get((samplePtr)&mBigBuffer[trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); currentSample+=trackLeftovers; } currentSample-=mBlockSize+(mFilterSize>>1); ProcessBuffer1x(mBufferInfo.get()); bBreakLoop=mEffectEqualization->TrackProgress(count, (double)(bigRun)/bigRuns.as_double()); if( bBreakLoop ) break; output->Append((samplePtr)&mBigBuffer[(bigRun?mBlockSize:0)+(mFilterSize>>1)], floatSample, subBufferSize-((bigRun?mBlockSize:0)+(mFilterSize>>1))); } if(singleProcessLength && !bBreakLoop) { t->Get((samplePtr)mBigBuffer.get(), floatSample, currentSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); ProcessBuffer(mBigBuffer.get(), mBigBuffer.get(), singleProcessLength+mBlockSize+(mFilterSize>>1)); output->Append((samplePtr)&mBigBuffer[bigRuns > 0 ? mBlockSize : 0], floatSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); } output->Flush(); if(!bBreakLoop) ProcessTail(t, output.get(), start, len); return bBreakLoop; } void EffectEqualization48x::Filter1x(size_t len, float *buffer, float *scratchBuffer) { int i; float real, imag; // Apply FFT RealFFTf1x(buffer, mEffectEqualization->hFFT.get()); // Apply filter // DC component is purely real float filterFuncR, filterFuncI; filterFuncR = mEffectEqualization->mFilterFuncR[0]; scratchBuffer[0] = buffer[0] * filterFuncR; auto halfLength = (len / 2); bool useBitReverseTable=sMathPath&1; for(i = 1; i < halfLength; i++) { if(useBitReverseTable) { real=buffer[mEffectEqualization->hFFT->BitReversed[i] ]; imag=buffer[mEffectEqualization->hFFT->BitReversed[i]+1]; } else { int bitReversed=SmallRB(i,mEffectEqualization->hFFT->pow2Bits); real=buffer[bitReversed]; imag=buffer[bitReversed+1]; } filterFuncR=mEffectEqualization->mFilterFuncR[i]; filterFuncI=mEffectEqualization->mFilterFuncI[i]; scratchBuffer[2*i ] = real*filterFuncR - imag*filterFuncI; scratchBuffer[2*i+1] = real*filterFuncI + imag*filterFuncR; } // Fs/2 component is purely real filterFuncR=mEffectEqualization->mFilterFuncR[halfLength]; scratchBuffer[1] = buffer[1] * filterFuncR; // Inverse FFT and normalization InverseRealFFTf1x(scratchBuffer, mEffectEqualization->hFFT.get()); ReorderToTime1x(mEffectEqualization->hFFT.get(), scratchBuffer, buffer); } bool EffectEqualization48x::ProcessBuffer4x(BufferInfo *bufferInfo) { // length must be a factor of window size for 4x processing. if(bufferInfo->mBufferLength%mBlockSize) return false; auto blockCount=bufferInfo->mBufferLength/mBlockSize; __m128 *readBlocks[4]; // some temps so we dont destroy the vars in the struct __m128 *writeBlocks[4]; for(int i=0;i<4;i++) { readBlocks[i]=(__m128 *)bufferInfo->mBufferSouce[i]; writeBlocks[i]=(__m128 *)bufferInfo->mBufferDest[i]; } __m128 *swizzledBuffer128=(__m128 *)bufferInfo->mScratchBuffer; __m128 *scratchBuffer=&swizzledBuffer128[mWindowSize*2]; for(size_t run4x=0;run4x<blockCount;run4x++) { // swizzle the data to the swizzle buffer __m128 *currentSwizzledBlock=&swizzledBuffer128[mWindowSize*(run4x&1)]; for(int i=0,j=0;j<mBlockSize;i++,j+=4) { __m128 tmp0 = _mm_shuffle_ps(readBlocks[0][i], readBlocks[1][i], _MM_SHUFFLE(1,0,1,0)); __m128 tmp1 = _mm_shuffle_ps(readBlocks[0][i], readBlocks[1][i], _MM_SHUFFLE(3,2,3,2)); __m128 tmp2 = _mm_shuffle_ps(readBlocks[2][i], readBlocks[3][i], _MM_SHUFFLE(1,0,1,0)); __m128 tmp3 = _mm_shuffle_ps(readBlocks[2][i], readBlocks[3][i], _MM_SHUFFLE(3,2,3,2)); currentSwizzledBlock[j] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(2,0,2,0)); currentSwizzledBlock[j+1] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(3,1,3,1)); currentSwizzledBlock[j+2] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(2,0,2,0)); currentSwizzledBlock[j+3] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(3,1,3,1)); } __m128 *thisOverrun128=&currentSwizzledBlock[mBlockSize]; for(int i=0;i<mFilterSize;i++) thisOverrun128[i]=_mm_set1_ps(0.0); Filter4x(mWindowSize, (float *)currentSwizzledBlock, (float *)scratchBuffer); int writeStart=0, writeToStart=0; // note readStart is where the read data is written int writeEnd=mBlockSize; if(run4x) { // maybe later swizzle add and write in one __m128 *lastOverrun128=&swizzledBuffer128[mWindowSize*((run4x+1)&1)+mBlockSize]; // add and swizzle data + filter for(int i=0,j=0;j<mFilterSize;i++,j+=4) { __m128 tmps0 = _mm_add_ps(currentSwizzledBlock[j], lastOverrun128[j]); __m128 tmps1 = _mm_add_ps(currentSwizzledBlock[j+1], lastOverrun128[j+1]); __m128 tmps2 = _mm_add_ps(currentSwizzledBlock[j+2], lastOverrun128[j+2]); __m128 tmps3 = _mm_add_ps(currentSwizzledBlock[j+3], lastOverrun128[j+3]); __m128 tmp0 = _mm_shuffle_ps(tmps1, tmps0, _MM_SHUFFLE(0,1,0,1)); __m128 tmp1 = _mm_shuffle_ps(tmps1, tmps0, _MM_SHUFFLE(2,3,2,3)); __m128 tmp2 = _mm_shuffle_ps(tmps3, tmps2, _MM_SHUFFLE(0,1,0,1)); __m128 tmp3 = _mm_shuffle_ps(tmps3, tmps2, _MM_SHUFFLE(2,3,2,3)); writeBlocks[0][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); writeBlocks[1][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(0,2,0,2)); writeBlocks[2][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(1,3,1,3)); writeBlocks[3][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(0,2,0,2)); } writeStart=mFilterSize; writeToStart=mFilterSize>>2; // swizzle it back. for(int i=writeToStart,j=writeStart;j<writeEnd;i++,j+=4) { __m128 tmp0 = _mm_shuffle_ps(currentSwizzledBlock[j+1], currentSwizzledBlock[j], _MM_SHUFFLE(0,1,0,1)); __m128 tmp1 = _mm_shuffle_ps(currentSwizzledBlock[j+1], currentSwizzledBlock[j], _MM_SHUFFLE(2,3,2,3)); __m128 tmp2 = _mm_shuffle_ps(currentSwizzledBlock[j+3], currentSwizzledBlock[j+2], _MM_SHUFFLE(0,1,0,1)); __m128 tmp3 = _mm_shuffle_ps(currentSwizzledBlock[j+3], currentSwizzledBlock[j+2], _MM_SHUFFLE(2,3,2,3)); writeBlocks[0][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); writeBlocks[1][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(0,2,0,2)); writeBlocks[2][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(1,3,1,3)); writeBlocks[3][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(0,2,0,2)); } } else { // swizzle it back. We overlap one block so we only write the first block on the first run writeStart=0; writeToStart=0; for(int i=writeToStart,j=writeStart;j<writeEnd;i++,j+=4) { __m128 tmp0 = _mm_shuffle_ps(currentSwizzledBlock[j+1], currentSwizzledBlock[j], _MM_SHUFFLE(0,1,0,1)); __m128 tmp2 = _mm_shuffle_ps(currentSwizzledBlock[j+3], currentSwizzledBlock[j+2], _MM_SHUFFLE(0,1,0,1)); writeBlocks[0][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); } } for(int i=0;i<4;i++) { // shift each block readBlocks[i]+=mBlockSize>>2; // these are 128b pointers, each window is 1/4 blockSize for those writeBlocks[i]+=mBlockSize>>2; } } return true; } bool EffectEqualization48x::ProcessOne4x(int count, WaveTrack * t, sampleCount start, sampleCount len) { int subBufferSize=mBufferCount==8?(mSubBufferSize>>1):mSubBufferSize; // half the buffers if avx is active if(len<subBufferSize) // it's not worth 4x processing do a regular process return ProcessOne1x(count, t, start, len); auto trackBlockSize = t->GetMaxBlockSize(); AudacityProject *p = GetActiveProject(); auto output = TrackFactory::Get( *p ).NewWaveTrack(floatSample, t->GetRate()); mEffectEqualization->TrackProgress(count, 0.0); auto bigRuns = len/(subBufferSize-mBlockSize); int trackBlocksPerBig=subBufferSize/trackBlockSize; int trackLeftovers=subBufferSize-trackBlocksPerBig*trackBlockSize; size_t singleProcessLength = ((mFilterSize>>1)*bigRuns + len%(bigRuns*(subBufferSize-mBlockSize))) .as_size_t(); auto currentSample=start; bool bBreakLoop = false; for(int bigRun=0;bigRun<bigRuns;bigRun++) { // fill the buffer for(int i=0;i<trackBlocksPerBig;i++) { t->Get((samplePtr)&mBigBuffer[i*trackBlockSize], floatSample, currentSample, trackBlockSize); currentSample+=trackBlockSize; } if(trackLeftovers) { t->Get((samplePtr)&mBigBuffer[trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); currentSample+=trackLeftovers; } currentSample-=mBlockSize+(mFilterSize>>1); ProcessBuffer4x(mBufferInfo.get()); bBreakLoop=mEffectEqualization->TrackProgress(count, (double)(bigRun)/bigRuns.as_double()); if( bBreakLoop ) break; output->Append((samplePtr)&mBigBuffer[(bigRun?mBlockSize:0)+(mFilterSize>>1)], floatSample, subBufferSize-((bigRun?mBlockSize:0)+(mFilterSize>>1))); } if(singleProcessLength && !bBreakLoop) { t->Get((samplePtr)mBigBuffer.get(), floatSample, currentSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); ProcessBuffer(mBigBuffer.get(), mBigBuffer.get(), singleProcessLength+mBlockSize+(mFilterSize>>1)); output->Append((samplePtr)&mBigBuffer[bigRuns > 0 ? mBlockSize : 0], floatSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); // output->Append((samplePtr)&mBigBuffer[bigRuns?mBlockSize:0], floatSample, singleProcessLength); } output->Flush(); if(!bBreakLoop) ProcessTail(t, output.get(), start, len); return bBreakLoop; } #include <wx/thread.h> void *EQWorker::Entry() { while(!mExitLoop) { int i = 0; { wxMutexLocker locker( *mMutex ); for(; i < mBufferInfoCount; i++) { if(mBufferInfoList[i].mBufferStatus==BufferReady) { // we found an unlocked ready buffer mBufferInfoList[i].mBufferStatus=BufferBusy; // we own it now break; } } } if ( i < mBufferInfoCount ) { switch (mProcessingType) { case 1: mEffectEqualization48x->ProcessBuffer1x(&mBufferInfoList[i]); break; case 4: mEffectEqualization48x->ProcessBuffer4x(&mBufferInfoList[i]); break; } mBufferInfoList[i].mBufferStatus=BufferDone; // we're done } } return NULL; } bool EffectEqualization48x::ProcessOne1x4xThreaded(int count, WaveTrack * t, sampleCount start, sampleCount len, int processingType) { int subBufferSize=mBufferCount==8?(mSubBufferSize>>1):mSubBufferSize; // half the buffers if avx is active sampleCount blockCount=len/mBlockSize; if(blockCount<16) // it's not worth 4x processing do a regular process return ProcessOne4x(count, t, start, len); if(mThreadCount<=0 || blockCount<256) // dont do it without cores or big data return ProcessOne4x(count, t, start, len); for(int i=0;i<mThreadCount;i++) mEQWorkers[i].mProcessingType=processingType; AudacityProject *p = GetActiveProject(); auto output = TrackFactory::Get( *p ).NewWaveTrack(floatSample, t->GetRate()); auto trackBlockSize = t->GetMaxBlockSize(); mEffectEqualization->TrackProgress(count, 0.0); auto bigRuns = len/(subBufferSize-mBlockSize); int trackBlocksPerBig=subBufferSize/trackBlockSize; int trackLeftovers=subBufferSize-trackBlocksPerBig*trackBlockSize; size_t singleProcessLength = ((mFilterSize>>1)*bigRuns + len%(bigRuns*(subBufferSize-mBlockSize))) .as_size_t(); auto currentSample=start; int bigBlocksRead=mWorkerDataCount, bigBlocksWritten=0; // fill the first workerDataCount buffers we checked above and there is at least this data auto maxPreFill = bigRuns < mWorkerDataCount ? bigRuns : mWorkerDataCount; for(int i=0;i<maxPreFill;i++) { // fill the buffer for(int j=0;j<trackBlocksPerBig;j++) { t->Get((samplePtr)&mBufferInfo[i].mBufferSouce[0][j*trackBlockSize], floatSample, currentSample, trackBlockSize); currentSample+=trackBlockSize; } if(trackLeftovers) { t->Get((samplePtr)&mBufferInfo[i].mBufferSouce[0][trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); currentSample+=trackLeftovers; } currentSample-=mBlockSize+(mFilterSize>>1); mBufferInfo[i].mBufferStatus=BufferReady; // free for grabbin } int currentIndex=0; bool bBreakLoop = false; while(bigBlocksWritten<bigRuns && !bBreakLoop) { bBreakLoop=mEffectEqualization->TrackProgress(count, (double)(bigBlocksWritten)/bigRuns.as_double()); if( bBreakLoop ) break; wxMutexLocker locker( mDataMutex ); // Get in line for data // process as many blocks as we can while((mBufferInfo[currentIndex].mBufferStatus==BufferDone) && (bigBlocksWritten<bigRuns)) { // data is ours output->Append((samplePtr)&mBufferInfo[currentIndex].mBufferDest[0][(bigBlocksWritten?mBlockSize:0)+(mFilterSize>>1)], floatSample, subBufferSize-((bigBlocksWritten?mBlockSize:0)+(mFilterSize>>1))); bigBlocksWritten++; if(bigBlocksRead<bigRuns) { // fill the buffer for(int j=0;j<trackBlocksPerBig;j++) { t->Get((samplePtr)&mBufferInfo[currentIndex].mBufferSouce[0][j*trackBlockSize], floatSample, currentSample, trackBlockSize); currentSample+=trackBlockSize; } if(trackLeftovers) { t->Get((samplePtr)&mBufferInfo[currentIndex].mBufferSouce[0][trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); currentSample+=trackLeftovers; } currentSample-=mBlockSize+(mFilterSize>>1); mBufferInfo[currentIndex].mBufferStatus=BufferReady; // free for grabbin bigBlocksRead++; } else mBufferInfo[currentIndex].mBufferStatus=BufferEmpty; // this is completely unecessary currentIndex=(currentIndex+1)%mWorkerDataCount; } } if(singleProcessLength && !bBreakLoop) { t->Get((samplePtr)mBigBuffer.get(), floatSample, currentSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); ProcessBuffer(mBigBuffer.get(), mBigBuffer.get(), singleProcessLength+mBlockSize+(mFilterSize>>1)); output->Append((samplePtr)&mBigBuffer[mBlockSize], floatSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); } output->Flush(); if(!bBreakLoop) ProcessTail(t, output.get(), start, len); return bBreakLoop; } void EffectEqualization48x::Filter4x(size_t len, float *buffer, float *scratchBuffer) { int i; __m128 real128, imag128; // Apply FFT RealFFTf4x(buffer, mEffectEqualization->hFFT.get()); // Apply filter // DC component is purely real __m128 *localFFTBuffer=(__m128 *)scratchBuffer; __m128 *localBuffer=(__m128 *)buffer; __m128 filterFuncR, filterFuncI; filterFuncR = _mm_set1_ps(mEffectEqualization->mFilterFuncR[0]); localFFTBuffer[0] = _mm_mul_ps(localBuffer[0], filterFuncR); auto halfLength = (len / 2); bool useBitReverseTable = sMathPath & 1; for(i = 1; i < halfLength; i++) { if(useBitReverseTable) { real128=localBuffer[mEffectEqualization->hFFT->BitReversed[i] ]; imag128=localBuffer[mEffectEqualization->hFFT->BitReversed[i]+1]; } else { int bitReversed=SmallRB(i,mEffectEqualization->hFFT->pow2Bits); real128=localBuffer[bitReversed]; imag128=localBuffer[bitReversed+1]; } filterFuncR=_mm_set1_ps(mEffectEqualization->mFilterFuncR[i]); filterFuncI=_mm_set1_ps(mEffectEqualization->mFilterFuncI[i]); localFFTBuffer[2*i ] = _mm_sub_ps( _mm_mul_ps(real128, filterFuncR), _mm_mul_ps(imag128, filterFuncI)); localFFTBuffer[2*i+1] = _mm_add_ps( _mm_mul_ps(real128, filterFuncI), _mm_mul_ps(imag128, filterFuncR)); } // Fs/2 component is purely real filterFuncR=_mm_set1_ps(mEffectEqualization->mFilterFuncR[halfLength]); localFFTBuffer[1] = _mm_mul_ps(localBuffer[1], filterFuncR); // Inverse FFT and normalization InverseRealFFTf4x(scratchBuffer, mEffectEqualization->hFFT.get()); ReorderToTime4x(mEffectEqualization->hFFT.get(), scratchBuffer, buffer); } #ifdef __AVX_ENABLED // note although written it has not been tested bool EffectEqualization48x::ProcessBuffer8x(BufferInfo *bufferInfo) { // length must be a factor of window size for 4x processing. if(bufferInfo->mBufferLength%mBlockSize || mBufferCount!=8) return false; auto blockCount=bufferInfo->mBufferLength/mBlockSize; __m128 *readBlocks[8]; // some temps so we dont destroy the vars in the struct __m128 *writeBlocks[8]; for(int i=0;i<8;i++) { readBlocks[i]=(__m128 *)bufferInfo->mBufferSouce[i]; writeBlocks[i]=(__m128 *)bufferInfo->mBufferDest[i]; } __m128 *swizzledBuffer128=(__m128 *)bufferInfo->mScratchBuffer; __m128 *scratchBuffer=&swizzledBuffer128[mWindowSize*4]; int doubleFilter=mFilterSize<<1; int doubleWindow=mWindowSize<<1; int doubleBlock=mBlockSize<<1; for(int run4x=0;run4x<blockCount;run4x++) { // swizzle the data to the swizzle buffer __m128 *currentSwizzledBlock=&swizzledBuffer128[doubleWindow*(run4x&1)]; for(int i=0,j=0;j<doubleBlock;i++,j+=8) { // mBlockSize or doubleBlock??? __m128 tmp0 = _mm_shuffle_ps(readBlocks[0][i], readBlocks[1][i], _MM_SHUFFLE(1,0,1,0)); __m128 tmp1 = _mm_shuffle_ps(readBlocks[0][i], readBlocks[1][i], _MM_SHUFFLE(3,2,3,2)); __m128 tmp2 = _mm_shuffle_ps(readBlocks[2][i], readBlocks[3][i], _MM_SHUFFLE(1,0,1,0)); __m128 tmp3 = _mm_shuffle_ps(readBlocks[2][i], readBlocks[3][i], _MM_SHUFFLE(3,2,3,2)); currentSwizzledBlock[j] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(2,0,2,0)); currentSwizzledBlock[j+2] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(3,1,3,1)); currentSwizzledBlock[j+4] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(2,0,2,0)); currentSwizzledBlock[j+6] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(3,1,3,1)); tmp0 = _mm_shuffle_ps(readBlocks[4][i], readBlocks[5][i], _MM_SHUFFLE(1,0,1,0)); tmp1 = _mm_shuffle_ps(readBlocks[4][i], readBlocks[5][i], _MM_SHUFFLE(3,2,3,2)); tmp2 = _mm_shuffle_ps(readBlocks[6][i], readBlocks[7][i], _MM_SHUFFLE(1,0,1,0)); tmp3 = _mm_shuffle_ps(readBlocks[6][i], readBlocks[7][i], _MM_SHUFFLE(3,2,3,2)); currentSwizzledBlock[j+1] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(2,0,2,0)); currentSwizzledBlock[j+3] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(3,1,3,1)); currentSwizzledBlock[j+5] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(2,0,2,0)); currentSwizzledBlock[j+7] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(3,1,3,1)); } __m128 *thisOverrun128=&currentSwizzledBlock[doubleBlock]; for(int i=0;i<doubleFilter;i++) thisOverrun128[i]=_mm_set1_ps(0.0); Filter8x(mWindowSize, (float *)currentSwizzledBlock, (float *)scratchBuffer); int writeStart=0, writeToStart=0; // note readStart is where the read data is written int writeEnd=doubleBlock; if(run4x) { // maybe later swizzle add and write in one __m128 *lastOverrun128=&swizzledBuffer128[doubleWindow*((run4x+1)&1)+doubleBlock]; // add and swizzle data + filter for(int i=0,j=0;j<doubleFilter;i++,j+=8) { __m128 tmps0 = _mm_add_ps(currentSwizzledBlock[j], lastOverrun128[j]); __m128 tmps1 = _mm_add_ps(currentSwizzledBlock[j+2], lastOverrun128[j+2]); __m128 tmps2 = _mm_add_ps(currentSwizzledBlock[j+4], lastOverrun128[j+4]); __m128 tmps3 = _mm_add_ps(currentSwizzledBlock[j+6], lastOverrun128[j+6]); __m128 tmp0 = _mm_shuffle_ps(tmps1, tmps0, _MM_SHUFFLE(0,1,0,1)); __m128 tmp1 = _mm_shuffle_ps(tmps1, tmps0, _MM_SHUFFLE(2,3,2,3)); __m128 tmp2 = _mm_shuffle_ps(tmps3, tmps2, _MM_SHUFFLE(0,1,0,1)); __m128 tmp3 = _mm_shuffle_ps(tmps3, tmps2, _MM_SHUFFLE(2,3,2,3)); writeBlocks[0][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); writeBlocks[1][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(0,2,0,2)); writeBlocks[2][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(1,3,1,3)); writeBlocks[3][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(0,2,0,2)); tmps0 = _mm_add_ps(currentSwizzledBlock[j+1], lastOverrun128[j+1]); tmps1 = _mm_add_ps(currentSwizzledBlock[j+3], lastOverrun128[j+3]); tmps2 = _mm_add_ps(currentSwizzledBlock[j+5], lastOverrun128[j+5]); tmps3 = _mm_add_ps(currentSwizzledBlock[j+7], lastOverrun128[j+7]); tmp0 = _mm_shuffle_ps(tmps1, tmps0, _MM_SHUFFLE(0,1,0,1)); tmp1 = _mm_shuffle_ps(tmps1, tmps0, _MM_SHUFFLE(2,3,2,3)); tmp2 = _mm_shuffle_ps(tmps3, tmps2, _MM_SHUFFLE(0,1,0,1)); tmp3 = _mm_shuffle_ps(tmps3, tmps2, _MM_SHUFFLE(2,3,2,3)); writeBlocks[4][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); writeBlocks[5][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(0,2,0,2)); writeBlocks[6][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(1,3,1,3)); writeBlocks[7][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(0,2,0,2)); } writeStart=doubleFilter; writeToStart=mFilterSize>>2; // swizzle it back. for(int i=writeToStart,j=writeStart;j<writeEnd;i++,j+=8) { __m128 tmp0 = _mm_shuffle_ps(currentSwizzledBlock[j+2], currentSwizzledBlock[j], _MM_SHUFFLE(0,1,0,1)); __m128 tmp1 = _mm_shuffle_ps(currentSwizzledBlock[j+2], currentSwizzledBlock[j], _MM_SHUFFLE(2,3,2,3)); __m128 tmp2 = _mm_shuffle_ps(currentSwizzledBlock[j+6], currentSwizzledBlock[j+4], _MM_SHUFFLE(0,1,0,1)); __m128 tmp3 = _mm_shuffle_ps(currentSwizzledBlock[j+6], currentSwizzledBlock[j+4], _MM_SHUFFLE(2,3,2,3)); writeBlocks[0][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); writeBlocks[1][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(0,2,0,2)); writeBlocks[2][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(1,3,1,3)); writeBlocks[3][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(0,2,0,2)); tmp0 = _mm_shuffle_ps(currentSwizzledBlock[j+3], currentSwizzledBlock[j+1], _MM_SHUFFLE(0,1,0,1)); tmp1 = _mm_shuffle_ps(currentSwizzledBlock[j+3], currentSwizzledBlock[j+1], _MM_SHUFFLE(2,3,2,3)); tmp2 = _mm_shuffle_ps(currentSwizzledBlock[j+7], currentSwizzledBlock[j+5], _MM_SHUFFLE(0,1,0,1)); tmp3 = _mm_shuffle_ps(currentSwizzledBlock[j+7], currentSwizzledBlock[j+5], _MM_SHUFFLE(2,3,2,3)); writeBlocks[4][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); writeBlocks[5][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(0,2,0,2)); writeBlocks[6][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(1,3,1,3)); writeBlocks[7][i] = _mm_shuffle_ps(tmp1, tmp3, _MM_SHUFFLE(0,2,0,2)); } } else { // swizzle it back. We overlap one block so we only write the first block on the first run writeStart=0; writeToStart=0; for(int i=writeToStart,j=writeStart;j<writeEnd;i++,j+=8) { __m128 tmp0 = _mm_shuffle_ps(currentSwizzledBlock[j+2], currentSwizzledBlock[j], _MM_SHUFFLE(0,1,0,1)); __m128 tmp2 = _mm_shuffle_ps(currentSwizzledBlock[j+6], currentSwizzledBlock[j+4], _MM_SHUFFLE(0,1,0,1)); writeBlocks[0][i] = _mm_shuffle_ps(tmp0, tmp2, _MM_SHUFFLE(1,3,1,3)); } } for(int i=0;i<8;i++) { // shift each block readBlocks[i]+=mBlockSize>>2; // these are 128b pointers, each window is 1/4 blockSize for those writeBlocks[i]+=mBlockSize>>2; } } return true; } bool EffectEqualization48x::ProcessOne8x(int count, WaveTrack * t, sampleCount start, sampleCount len) { sampleCount blockCount=len/mBlockSize; if(blockCount<32) // it's not worth 8x processing do a regular process return ProcessOne4x(count, t, start, len); auto trackBlockSize = t->GetMaxBlockSize(); AudacityProject *p = GetActiveProject(); auto output = TrackFactory::Get( *p ).NewWaveTrack(floatSample, t->GetRate()); mEffectEqualization->TrackProgress(count, 0.0); int bigRuns=len/(mSubBufferSize-mBlockSize); int trackBlocksPerBig=mSubBufferSize/trackBlockSize; int trackLeftovers=mSubBufferSize-trackBlocksPerBig*trackBlockSize; int singleProcessLength=(mFilterSize>>1)*bigRuns + len%(bigRuns*(mSubBufferSize-mBlockSize)); auto currentSample=start; bool bBreakLoop = false; for(int bigRun=0;bigRun<bigRuns;bigRun++) { // fill the buffer for(int i=0;i<trackBlocksPerBig;i++) { t->Get((samplePtr)&mBigBuffer[i*trackBlockSize], floatSample, currentSample, trackBlockSize); currentSample+=trackBlockSize; } if(trackLeftovers) { t->Get((samplePtr)&mBigBuffer[trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); currentSample+=trackLeftovers; } currentSample-=mBlockSize+(mFilterSize>>1); ProcessBuffer4x(mBufferInfo); if (bBreakLoop=mEffectEqualization->TrackProgress(count, (double)(bigRun)/(double)bigRuns)) { break; } output->Append((samplePtr)&mBigBuffer[(bigRun?mBlockSize:0)+(mFilterSize>>1)], floatSample, mSubBufferSize-((bigRun?mBlockSize:0)+(mFilterSize>>1))); } if(singleProcessLength && !bBreakLoop) { t->Get((samplePtr)mBigBuffer.get(), floatSample, currentSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); ProcessBuffer(mBigBuffer.get(), mBigBuffer.get(), singleProcessLength+mBlockSize+(mFilterSize>>1)); output->Append((samplePtr)&mBigBuffer[mBlockSize], floatSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); } output->Flush(); if(!bBreakLoop) ProcessTail(t, output.get(), start, len); return bBreakLoop; } bool EffectEqualization48x::ProcessOne8xThreaded(int count, WaveTrack * t, sampleCount start, sampleCount len) { sampleCount blockCount=len/mBlockSize; if(blockCount<16) // it's not worth 4x processing do a regular process return ProcessOne4x(count, t, start, len); if(mThreadCount<=0 || blockCount<256) // dont do it without cores or big data return ProcessOne4x(count, t, start, len); AudacityProject *p = GetActiveProject(); auto output = TrackFactory::Get( *p ).NewWaveTrack(floatSample, t->GetRate()); auto trackBlockSize = t->GetMaxBlockSize(); mEffectEqualization->TrackProgress(count, 0.0); int bigRuns=len/(mSubBufferSize-mBlockSize); int trackBlocksPerBig=mSubBufferSize/trackBlockSize; int trackLeftovers=mSubBufferSize-trackBlocksPerBig*trackBlockSize; int singleProcessLength=(mFilterSize>>1)*bigRuns + len%(bigRuns*(mSubBufferSize-mBlockSize)); auto currentSample=start; int bigBlocksRead=mWorkerDataCount, bigBlocksWritten=0; // fill the first workerDataCount buffers we checked above and there is at least this data for(int i=0;i<mWorkerDataCount;i++) { // fill the buffer for(int j=0;j<trackBlocksPerBig;j++) { t->Get((samplePtr)&mBufferInfo[i].mBufferSouce[0][j*trackBlockSize], floatSample, currentSample, trackBlockSize); currentSample+=trackBlockSize; } if(trackLeftovers) { t->Get((samplePtr)&mBufferInfo[i].mBufferSouce[0][trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); currentSample+=trackLeftovers; } currentSample-=mBlockSize+(mFilterSize>>1); mBufferInfo[i].mBufferStatus=BufferReady; // free for grabbin } int currentIndex=0; bool bBreakLoop = false; while(bigBlocksWritten<bigRuns) { if (bBreakLoop=mEffectEqualization->TrackProgress(count, (double)(bigBlocksWritten)/(double)bigRuns)) { break; } wxMutexLocker locker( mDataMutex ); // Get in line for data // process as many blocks as we can while((mBufferInfo[currentIndex].mBufferStatus==BufferDone) && (bigBlocksWritten<bigRuns)) { // data is ours output->Append((samplePtr)&mBufferInfo[currentIndex].mBufferDest[0][(bigBlocksWritten?mBlockSize:0)+(mFilterSize>>1)], floatSample, mSubBufferSize-((bigBlocksWritten?mBlockSize:0)+(mFilterSize>>1))); bigBlocksWritten++; if(bigBlocksRead<bigRuns) { // fill the buffer for(int j=0;j<trackBlocksPerBig;j++) { t->Get((samplePtr)&mBufferInfo[currentIndex].mBufferSouce[0][j*trackBlockSize], floatSample, currentSample, trackBlockSize); currentSample+=trackBlockSize; } if(trackLeftovers) { t->Get((samplePtr)&mBufferInfo[currentIndex].mBufferSouce[0][trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); currentSample+=trackLeftovers; } currentSample-=mBlockSize+(mFilterSize>>1); mBufferInfo[currentIndex].mBufferStatus=BufferReady; // free for grabbin bigBlocksRead++; } else mBufferInfo[currentIndex].mBufferStatus=BufferEmpty; // this is completely unecessary currentIndex=(currentIndex+1)%mWorkerDataCount; } } if(singleProcessLength && !bBreakLoop) { t->Get((samplePtr)mBigBuffer.get(), floatSample, currentSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); ProcessBuffer(mBigBuffer.get(), mBigBuffer.get(), singleProcessLength+mBlockSize+(mFilterSize>>1)); output->Append((samplePtr)&mBigBuffer[mBlockSize], floatSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); } output->Flush(); if(!bBreakLoop) ProcessTail(t, output.get(), start, len); return bBreakLoop; } void EffectEqualization48x::Filter8x(size_t len, float *buffer, float *scratchBuffer) { int i; __m256 real256, imag256; // Apply FFT RealFFTf8x(buffer, mEffectEqualization->hFFT); // Apply filter // DC component is purely real __m256 *localFFTBuffer=(__m256 *)scratchBuffer; __m256 *localBuffer=(__m256 *)buffer; __m256 filterFuncR, filterFuncI; filterFuncR = _mm256_set1_ps(mEffectEqualization->mFilterFuncR[0]); localFFTBuffer[0] = _mm256_mul_ps(localBuffer[0], filterFuncR); auto halfLength = (len / 2); bool useBitReverseTable = sMathPath & 1; for(i = 1; i < halfLength; i++) { if(useBitReverseTable) { real256=localBuffer[mEffectEqualization->hFFT->BitReversed[i] ]; imag256=localBuffer[mEffectEqualization->hFFT->BitReversed[i]+1]; } else { int bitReversed=SmallRB(i,mEffectEqualization->hFFT->pow2Bits); real256=localBuffer[bitReversed]; imag256=localBuffer[bitReversed+1]; } filterFuncR=_mm256_set1_ps(mEffectEqualization->mFilterFuncR[i]); filterFuncI=_mm256_set1_ps(mEffectEqualization->mFilterFuncI[i]); localFFTBuffer[2*i ] = _mm256_sub_ps( _mm256_mul_ps(real256, filterFuncR), _mm256_mul_ps(imag256, filterFuncI)); localFFTBuffer[2*i+1] = _mm256_add_ps( _mm256_mul_ps(real256, filterFuncI), _mm256_mul_ps(imag256, filterFuncR)); } // Fs/2 component is purely real filterFuncR=_mm256_set1_ps(mEffectEqualization->mFilterFuncR[halfLength]); localFFTBuffer[1] = _mm256_mul_ps(localBuffer[1], filterFuncR); // Inverse FFT and normalization InverseRealFFTf8x(scratchBuffer, mEffectEqualization->hFFT); ReorderToTime8x(mEffectEqualization->hFFT, scratchBuffer, buffer); } #endif #endif
;Tritone v2 beeper music engine by Shiru (shiru@mail.ru) 03'11 ;Three channels of tone, per-pattern tempo ;One channel of interrupting drums ;Feel free to do whatever you want with the code, it is PD OP_NOP equ #00 OP_SCF equ #37 OP_ORC equ #b1 ;define NO_VOLUME ;define this if you want to have the same volume for all the channels module tritone play di ld (nextPos.pos),hl ld c,16 push iy exx push hl ld (stopPlayer.prevSP),sp xor a ld h,a ld l,h ld (playRow.cnt0),hl ld (playRow.cnt1),hl ld (playRow.cnt2),hl ld (soundLoop.duty0),a ld (soundLoop.duty1),a ld (soundLoop.duty2),a ld (nextRow.skipDrum),a in a,(#1f) and #1f ld a,OP_NOP jr nz,$+4 ld a,OP_ORC ld (soundLoop.checkKempston),a jp nextPos nextRow .pos=$+1 ld hl,0 ld a,(hl) inc hl cp 2 jr c,.ch0 cp 128 jr c,drumSound cp 255 jp z,nextPos .ch0 ld d,1 cp d jr z,.ch1 or a jr nz,.ch0note ld b,a ld c,a jr .ch0set .ch0note ld e,a and #0f ld b,a ld c,(hl) inc hl ld a,e and #f0 .ch0set ld (soundLoop.duty0),a ld (playRow.cnt0),bc .ch1 ld a,(hl) inc hl cp d jr z,.ch2 or a jr nz,.ch1note ld b,a ld c,a jr .ch1set .ch1note ld e,a and #0f ld b,a ld c,(hl) inc hl ld a,e and #f0 .ch1set ld (soundLoop.duty1),a ld (playRow.cnt1),bc .ch2 ld a,(hl) inc hl cp d jr z,.skip or a jr nz,.ch2note ld b,a ld c,a jr .ch2set .ch2note ld e,a and #0f ld b,a ld c,(hl) inc hl ld a,e and #f0 .ch2set ld (soundLoop.duty2),a ld (playRow.cnt2),bc .skip ld (.pos),hl .skipDrum=$ scf jp nc,playRow ld a,OP_NOP ld (.skipDrum),a ld hl,(playRow.speed) ld de,-150 add hl,de ex de,hl jr c,$+5 ld de,257 ld a,d or a jr nz,$+3 inc d ld a,e or a jr nz,$+3 inc e jr playRow.drum drumSound ld (nextRow.pos),hl add a,a ld ixl,a ld ixh,0 ld bc,drumSettings-4 add ix,bc cp 14*2 ld a,OP_SCF ld (nextRow.skipDrum),a jr nc,drumNoise drumTone ld bc,2 ld a,b ld de,#1001 ld l,(ix) .l0 bit 0,b jr z,.l1 dec e jr nz,.l1 ld e,l exa ld a,l add a,(ix+1) ld l,a exa xor d .l1 out (#fe),a djnz .l0 dec c jp nz,.l0 jp nextRow drumNoise ld b,0 ld h,b ld l,h ld de,#1001 .l0 ld a,(hl) and d out (#fe),a and (ix) dec e out (#fe),a jr nz,.l1 ld e,(ix+1) inc hl .l1 djnz .l0 jp nextRow nextPos .pos=$+1 ld hl,0 .read ld e,(hl) inc hl ld d,(hl) inc hl ld a,d or e jr z,orderLoop ld (.pos),hl ex de,hl ld c,(hl) inc hl ld b,(hl) inc hl ld (nextRow.pos),hl ld (playRow.speed),bc jp nextRow orderLoop ld e,(hl) inc hl ld d,(hl) ex de,hl jr nextPos.read playRow .speed=$+1 ld de,0 .drum .cnt0=$+1 ld bc,0 .prevHL=$+1 ld hl,0 exx .cnt1=$+1 ld de,0 .cnt2=$+1 ld sp,0 exx soundLoop ifdef NO_VOLUME ;all the channels has the same volume add hl,bc ;11 ld a,h ;4 .duty0=$+1 cp 128 ;7 sbc a,a ;4 exx ;4 and c ;4 out (#fe),a ;11 add ix,de ;15 ld a,ixh ;8 .duty1=$+1 cp 128 ;7 sbc a,a ;4 and c ;4 out (#fe),a ;11 add hl,sp ;11 ld a,h ;4 .duty2=$+1 cp 128 ;7 sbc a,a ;4 and c ;4 exx ;4 dec e ;4 out (#fe),a ;11 jp nz,soundLoop ;10=153t dec d ;4 jp nz,soundLoop ;10 else ; all the channels has different volume add hl,bc ;11 ld a,h ;4 exx ;4 .duty0=$+1 cp 128 ;7 sbc a,a ;4 and c ;4 add ix,de ;15 out (#fe),a ;11 ld a,ixh ;8 .duty1=$+1 cp 128 ;7 sbc a,a ;4 and c ;4 out (#fe),a ;11 add hl,sp ;11 ld a,h ;4 .duty2=$+1 cp 128 ;7 sbc a,a ;4 and c ;4 exx ;4 dec e ;4 out (#fe),a ;11 jp nz,soundLoop ;10=153t dec d ;4 jp nz,soundLoop ;10 endif xor a out (#fe),a ld (playRow.prevHL),hl in a,(#1f) and #1f ld c,a in a,(#fe) cpl .checkKempston=$ or c and #1f jp z,nextRow stopPlayer .prevSP=$+1 ld sp,0 pop hl exx pop iy ei ret drumSettings db #01,#01 ;tone,highest db #01,#02 db #01,#04 db #01,#08 db #01,#20 db #20,#04 db #40,#04 db #40,#08 ;lowest db #04,#80 ;special db #08,#80 db #10,#80 db #10,#02 db #20,#02 db #40,#02 db #16,#01 ;noise,highest db #16,#02 db #16,#04 db #16,#08 db #16,#10 db #00,#01 db #00,#02 db #00,#04 db #00,#08 db #00,#10 endmodule
; A191448: Dispersion of the odd integers greater than 1, by antidiagonals. ; Submitted by Christian Krause ; 1,3,2,7,5,4,15,11,9,6,31,23,19,13,8,63,47,39,27,17,10,127,95,79,55,35,21,12,255,191,159,111,71,43,25,14,511,383,319,223,143,87,51,29,16,1023,767,639,447,287,175,103,59,33,18,2047,1535,1279,895,575,351,207,119,67,37,20,4095,3071,2559,1791,1151,703,415,239,135,75,41,22,8191,6143,5119,3583,2303,1407,831,479,271,151,83,45,24,16383,12287,10239,7167,4607,2815,1663,959,543 lpb $0 add $1,1 sub $0,$1 mov $2,$1 sub $2,$0 lpe mov $1,2 pow $1,$2 mov $2,$1 mul $2,2 mul $2,$0 max $2,$1 add $2,$1 mov $0,$2 sub $0,1
; A088865: (Sum of distinct prime factors)^(sum of prime exponents). ; Submitted by Christian Krause ; 1,2,3,4,5,25,7,8,9,49,11,125,13,81,64,16,17,125,19,343,100,169,23,625,25,225,27,729,29,1000,31,32,196,361,144,625,37,441,256,2401,41,1728,43,2197,512,625,47,3125,49,343,400,3375,53,625,256,6561,484,961,59,10000,61,1089,1000,64,324,4096,67,6859,676,2744,71,3125,73,1521,512,9261,324,5832,79,16807,81,1849,83,20736,484,2025,1024,28561,89,10000,400,15625,1156,2401,576,15625,97,729,2744,2401 add $0,1 lpb $0 mov $3,$0 lpb $3 mov $4,$0 mov $6,$2 cmp $6,0 add $2,$6 mod $4,$2 cmp $4,0 cmp $4,0 add $5,$2 add $2,1 cmp $5,1 max $4,$5 sub $3,$4 lpe lpb $0 dif $0,$2 add $8,1 lpe add $7,$2 lpe pow $7,$8 mov $0,$7
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "default_opset.hpp" #include "gtest/gtest.h" #include "ngraph/file_util.hpp" #include "ngraph/type.hpp" #include "ngraph/type/element_type.hpp" #include "onnx_import/onnx.hpp" #include "util/engine/test_engines.hpp" #include "util/test_case.hpp" #include "util/test_control.hpp" #include "util/test_tools.hpp" #include "util/type_prop.hpp" using namespace ngraph; using namespace ngraph::onnx_import; using namespace ngraph::test; static std::string s_manifest = "${MANIFEST}"; using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); // ~~~~~~~~TERMINATION CONDITION/TRIP COUNT COMBINATIONS TESTS:~~~~~~~~ // input (trip_count, "") // Note this is analogous to a for loop // int trip_count = ... // for (int i=0; i < trip_count; ++i) { // cond = ...; // ignored // } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add.prototxt")); // Shape inference tests const auto& parameters = function->get_parameters(); EXPECT_EQ(parameters.size(), 1); EXPECT_EQ(parameters.at(0)->get_element_type(), ngraph::element::f32); EXPECT_TRUE(parameters.at(0)->get_partial_shape().is_static()); EXPECT_EQ(parameters.at(0)->get_partial_shape().to_shape(), (Shape{1, 2})); const auto& results = function->get_results(); EXPECT_EQ(results.size(), 2); EXPECT_EQ(function->get_output_element_type(0), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(0).is_static()); EXPECT_EQ(function->get_output_shape(0), (Shape{1, 2})); EXPECT_EQ(function->get_output_element_type(1), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(1).is_static()); EXPECT_EQ(function->get_output_shape(1), (Shape{3, 1, 2})); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {3.f, 3.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } // input ("", cond) // Note this is analogous to a while loop // bool cond = ...; // for (int i=0; cond; ++i) { // cond = ...; // } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond.prototxt")); auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function); // termination condition test_case.add_input<bool>({true}); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {6.f, 6.f}); test_case.add_expected_output<float>( Shape{6, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_max_int) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_max_int.prototxt")); auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function); // termination condition test_case.add_input<bool>({true}); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {6.f, 6.f}); test_case.add_expected_output<float>( Shape{6, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond_static_shapes) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond_static_shapes.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // termination condition test_case.add_input<bool>({true}); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {6.f, 6.f}); test_case.run(); } // cond = false // input ("", cond) // Note this is analogous to a while loop NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond_false) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond_false.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({3.f, 4.f}); test_case.add_expected_output<float>(Shape{1, 2}, {3.f, 4.f}); test_case.add_expected_output<float>(Shape{1, 2}, {3.f, 4.f}); test_case.run(); } // input ("", 1) // Note this is analogous to a do-while loop // bool cond = true // for (int i=0; cond; ++i) { // cond = ...; // } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termination_cond) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_no_identity_termination_cond.prototxt")); auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {4.f, 4.f}); test_case.add_expected_output<float>(Shape{4, 1, 2}, {1, 1, 2, 2, 3, 3, 4, 4}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termination_cond_static_shapes) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_no_identity_termination_cond_static_shapes.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {4.f, 4.f}); test_case.run(); } // input (trip_count, cond) // int trip_count = ...; // bool cond = ...; // for (int i=0; i < trip_count && cond; ++i) { // cond = ...; // } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count_as_inputs) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs.prototxt")); auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function); // trip count test_case.add_input<int64_t>({10}); // termination condition test_case.add_input<bool>({true}); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {6.f, 6.f}); test_case.add_expected_output<float>( Shape{6, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count_as_inputs_static_shapes) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs_static_shapes.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // trip count test_case.add_input<int64_t>({10}); // termination condition test_case.add_input<bool>({true}); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {6.f, 6.f}); test_case.run(); } // ~~~~~~~~SCOPES VISIBILITY TESTS:~~~~~~~~ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent_scope) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_initializer_from_parent_scope.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {6.f, 6.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {2.f, 2.f, 4.f, 4.f, 6.f, 6.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_node_from_parent_scope.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {12.f, 12.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {4.f, 4.f, 8.f, 8.f, 12.f, 12.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope_used_in_parent_and_in_body) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); // parent_input test_case.add_input<float>({3.f}); test_case.add_expected_output<float>(Shape{1, 2}, {18.f, 18.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {6.f, 6.f, 12.f, 12.f, 18.f, 18.f}); test_case.add_expected_output<float>(Shape{1}, {9.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_access_to_body_scope_exception) { try { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_incorrect_access_body_scope.prototxt")); FAIL() << "Incorrect access to body scope not detected"; } catch (const ngraph_error& e) { // patent graph should have no access to subgraph (body Loop) scope EXPECT_HAS_SUBSTRING(e.what(), std::string("from_body_scope node not found in graph cache")); } catch (...) { FAIL() << "Deduced type check failed for unexpected reason"; } } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_from_parent_and_subgraph) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_the_same_name.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {3.f, 3.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_input_from_parent_graph.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); // b input test_case.add_input<float>({1.f, 1.f}); test_case.add_expected_output<float>(Shape{1, 2}, {3.f, 3.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_the_proper_opset_in_subgraph) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_mul_opset1.prototxt")); const auto parent_ops = function->get_ops(); const auto loop_node_it = std::find_if(parent_ops.begin(), parent_ops.end(), [](const std::shared_ptr<Node>& op) { return std::string{op->get_type_name()} == "Loop"; }); const auto body_ops = ngraph::as_type_ptr<default_opset::Loop>(*loop_node_it)->get_function()->get_ops(); const auto body_mul_node_it = std::find_if(body_ops.begin(), body_ops.end(), [](const std::shared_ptr<Node>& op) { return std::string{op->get_type_name()} == "Multiply"; }); const auto body_mul_node = ngraph::as_type_ptr<default_opset::Multiply>(*body_mul_node_it); EXPECT_TRUE(body_mul_node); } // ~~~~~~~~STATIC/DYNAMIC/CONSTANT INPUTS TESTS:~~~~~~~~ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_scalars) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_scalars_add.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f}); test_case.add_expected_output<float>(Shape{}, {3.f}); test_case.add_expected_output<float>(Shape{3}, {1.f, 2.f, 3.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_cond.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {3.f, 3.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_dynamic) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_dynamic.prototxt")); auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function); // trip count test_case.add_input<int64_t>({3}); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {3.f, 3.f}); test_case.add_expected_output<float>(Shape{3, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } // ~~~~~~~~SUBGRAPH TYPES INFERENCE:~~~~~~~~ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_infer_types) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/onnx_controlflow_loop_2d_infer_types.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // trip count test_case.add_input<int64_t>({10}); // termination condition test_case.add_input<bool>({true}); // a_init test_case.add_input<float>({0.f, 0.f}); test_case.add_expected_output<float>(Shape{1, 2}, {6.f, 6.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope_infer_types) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_add_node_from_parent_scope_infer_types.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // a_init test_case.add_input<float>({0.f, 0.f}); // parent_input test_case.add_input<float>({3.f}); test_case.add_expected_output<float>(Shape{1, 2}, {18.f, 18.f}); test_case.add_expected_output<float>(Shape{3, 1, 2}, {6.f, 6.f, 12.f, 12.f, 18.f, 18.f}); test_case.add_expected_output<float>(Shape{1}, {9.f}); test_case.run(); } // ~~~~~~~~ADDITIONAL TESTS:~~~~~~~~ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_concat_values) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_concat_values.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // trip_count test_case.add_input<int64_t>({5}); // init condition test_case.add_input<bool>({true}); // seq_init test_case.add_input<float>({0}); // trip_count is concatenated during Loop iterations test_case.add_expected_output<int64_t>(Shape{6}, {0, 1, 2, 3, 4, 5}); test_case.add_expected_output<int64_t>( Shape{2 + 3 + 4 + 5 + 6}, {0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5}); test_case.run(); } // infinitive loop shape inference // input ("", ""): // for (int i=0; ; ++i) { // cond = ... // Note this value is ignored, but is required in the body // } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skipped_shape_inference) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_and_cond_skipped.prototxt")); const auto& results = function->get_results(); EXPECT_EQ(results.size(), 2); EXPECT_EQ(function->get_output_element_type(0), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(0).is_static()); EXPECT_EQ(function->get_output_shape(0), (Shape{1, 2})); EXPECT_EQ(function->get_output_element_type(1), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(1).rank().is_static()); EXPECT_EQ(function->get_output_partial_shape(1).rank(), 3); EXPECT_EQ(function->get_output_partial_shape(1), (PartialShape{Dimension::dynamic(), 1, 2})); } // infinitive loop execution NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_infinite) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_infinite.prototxt")); auto test_case = test::TestCase<TestEngine>(function); // trip_count test_case.add_input<int64_t>({std::numeric_limits<int64_t>::max()}); // init condition test_case.add_input<bool>({true}); // fake test_case.add_input<float>({0.f}); // outer_scope test_case.add_input<float>({3.f}); // final value not changed test_case.add_expected_output<float>(Shape{1}, {0.f}); // outer_scope passed as scan output test_case.add_expected_output<float>(Shape{1}, {3.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_no_variadic_inputs_and_outputs) { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, "onnx/loop/loop_no_variadic_inputs_and_outputs.prototxt")); auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function); // trip_count test_case.add_input<int64_t>({1}); // init condition test_case.add_input<bool>({true}); // loop_scan_out test_case.add_expected_output<float>(Shape{1}, {1.f}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_power) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_pow.prototxt")); auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function); // trip_count test_case.add_input<int64_t>({5}); // pow init test_case.add_input<int64_t>({5}); // pow_final test_case.add_expected_output<int64_t>(Shape{1}, {16}); // pow_scans test_case.add_expected_output<int64_t>(Shape{5}, {0, 1, 4, 9, 16}); test_case.run(); }
; ; OEM FORMAT module for IBM PC DOS 2.1 ; CODE SEGMENT PUBLIC 'CODE' ASSUME CS:CODE,DS:CODE EXTRN SWITCHMAP:WORD,DRIVE:BYTE EXTRN FDSKSIZ:DWORD,SECSIZ:WORD,CLUSSIZ:WORD,SYSSIZ:DWORD PUBLIC INIT,DISKFORMAT,BADSECTOR,DONE,WRTFAT,HARDFLAG PUBLIC FATID,STARTSECTOR,SWITCHLIST,FREESPACE,FATSPACE DW OFFSET BOOT2X DW OFFSET BOOT1X ; =================================================== WRTFAT: MOV AL,DRIVE CBW MOV CX,BPFTSEC ; All FAT sectors MOV DX,1 ; Starting sector of 1st FAT MOV BX,FATSPACE INT 26H ; Absolute disk write POP AX JB GORET MOV AL,DRIVE CBW MOV CX,BPFTSEC ; All FAT sectors MOV DX,CX INC DX ; Starting sector of 2nd FAT MOV BX,FATSPACE INT 26H ; Absolute disk write POP AX JB GORET JMP SHORT OKRET ; =================================================== INIT: MOV AL,DRIVE MOV FMTDRIVE,AL INT 11H ; EQUIPMENT DETERMINATION ; Return: AX = equipment flag bits ROL AL,1 ROL AL,1 AND AX,3 ; Any additional drives installed? JNZ INIT1 MOV BYTE PTR FMTDRIVE,0 ; No, force A: (drive 0) INC AX INIT1: MOV BYTE PTR HARDFLAG,0 CMP DRIVE,AL JBE PHANTOM MOV HARDFLAG,AL PUSH AX MOV AH,8 MOV DL,80H INT 13H ; Get drive parms, returns # of drives in DL POP AX JB SETDRV ADD AL,DL SETDRV: CMP DRIVE,AL JBE DRVOK MOV DX,OFFSET NOTCDM JMP SHORT OUTMSG DRVOK: TEST SWITCHMAP,18H ; SWITCH_8+SWITCH_1 JZ OKRET MOV DX,OFFSET HDCOMPM OUTMSG: CALL PRTMSG STC RET PHANTOM: MOV AL,DRIVE PUSH DS MOV BX,50H MOV DS,BX ASSUME DS:NOTHING MOV DS:4,AL POP DS ASSUME DS:CODE MOV AL,BYTE PTR SWITCHMAP AND AL,13H ; Mask SWITCH_8+SWITCH_V+SWITCH_S CMP AL,12H ; SWITCH_8+SWITCH_V? JNZ OKRET MOV DX,OFFSET INCOMPM JMP SHORT OUTMSG OKRET: CLC GORET: RET ; =================================================== DONE: TEST SWITCHMAP,20H ; SWITCH_B? JZ DONE_B MOV AL,DRIVE ADD AL,'A' MOV BYTE PTR BIONAME,AL MOV BYTE PTR DOSNAME,AL MOV CX,6 MOV DX,OFFSET BIONAME MOV AH,3CH INT 21H ; Create a file with handle MOV BX,AX MOV CX,780H MOV DX,OFFSET BOGUSDOS MOV AH,40H INT 21H ; Write file with handle MOV AH,3EH INT 21H ; Close a file with handle MOV CX,6 MOV DX,OFFSET DOSNAME MOV AH,3CH INT 21H ; Create a file with handle MOV BX,AX MOV CX,1900H MOV DX,OFFSET BOGUSDOS MOV AH,40H INT 21H ; Write file with handle MOV AH,3EH INT 21H ; Close file with handle ADD WORD PTR SYSSIZ,2200h DONE_B: JMP SHORT CHK_8 BIONAME: DB 'X:\IBMBIO.COM',0 DOSNAME: DB 'X:\IBMDOS.COM',0 BOGUSDOS: PUSH CS POP DS MOV AL,20H OUT 20H,AL ; Send EOI MOV SI,BOGUSMSG SYSMESLP: LODSB ENDSYSLP: OR AL,AL JZ ENDSYSLP MOV AH,0EH MOV BX,7 INT 10H ; Write TTY JMP SHORT SYSMESLP NO_SYS_MES: DB 'Non-System disk or disk error',13,10,0 BOGUSMSG = NO_SYS_MES - BOGUSDOS CHK_8: TEST SWITCHMAP,10H ; SWITCH_8? JNZ DO_SW_8 JMP OKRET DO_SW_8: MOV AL,DRIVE CBW MOV CX,7 ; Read 7 sectors MOV DX,3 ; 4th sector -- root directory MOV BX,FATSPACE INT 25H ; Absolute disk read POP AX JNB CLR_ROOT DONE_ERR: RET CLR_ROOT: MOV BX,FATSPACE MOV BYTE PTR [BX+11],6 MOV BYTE PTR [BX+11+32],6 MOV AX,BPDRCNT DEC AX MOV BX,32 MUL BX ADD AX,FATSPACE MOV BX,AX XOR AX,AX MOV AH,0E5H ; Unused directory entry marker NXTROOT: CMP [BX],AL JNZ WR_ROOT MOV [BX],AH ; Set markers for DOS 1.x SUB BX,32 CMP BX,FATSPACE JNB NXTROOT WR_ROOT: MOV AL,DRIVE CBW MOV CX,7 ; Write 7 sectors MOV DX,3 ; Start at sector 3 (4th sector) MOV BX,FATSPACE INT 26H ; Absolute disk write POP AX DON_ERR2: JB DONE_ERR TEST SWITCHMAP,1 ; SWITCH_S? JNZ DONEOK MOV AL,DRIVE CBW MOV BX,OFFSET BOOT1X CMP BYTE PTR FATID,0FEH ; Single-sided 8-sector disk? JZ WRSEC MOV WORD PTR [BX+3],103H ; Fix up starting sector of system area WRSEC: MOV CX,1 XOR DX, DX INT 26H ; Absolute disk write POP AX JB DON_ERR2 DONEOK: CLC RET ; =================================================== DISKFORMAT: CMP HARDFLAG,0 JNZ FMTHARD JMP FMTFLOP FMTHARD: MOV BYTE PTR FATID,0F8h XOR BX,BX MOV WORD PTR HDD_BPB,BX ; Initially points to 70:0 PUSH DS LDS BX,HDD_BPB MOV BX,[BX] ; Word at 70:0 is offset of HARDDRV in IBMBIO MOV AL,[BX] ; First BIOS drive number INC BX ; Point to the hard disk BPB POP DS MOV WORD PTR HDD_BPB,BX MOV HARDDRV,AL MOV DL,DRIVE SUB DL,HARDFLAG DEC DL JZ HAVHDD ; Was it the first hard disk? ADD WORD PTR HDD_BPB,19 ; No, point to the second BPB HAVHDD: ADD DL,HARDDRV MOV FMTDRIVE,DL CALL GETHDPARM JMP FMTCMN FMTFLOP: MOV CURCYL, 0 MOV TRACKS, 40 ; No 96tpi yet! MOV BYTE PTR ERRFLG,0 MOV SI,OFFSET BPB92 ; 9 SPT, double sided TEST SWITCHMAP,8 ; SWITCH_1? JZ CHK8SEC MOV SI,OFFSET BPB91 ; 9 SPT, single sided TEST SWITCHMAP,10H ; SWITCH_8? JZ SETBPB MOV SI,OFFSET BPB81 ; 8 SPT, single sided JMP SHORT SETBPB ; --------------------------------------------------------------------------- CHK8SEC: TEST SWITCHMAP,10H ; SWITCH_8? JZ SETBPB MOV SI,OFFSET BPB82 ; 8 SPT, double sided SETBPB: PUSH DS POP ES ASSUME ES:CODE MOV DI,OFFSET BPCLUS MOV CX,BPBSIZ CLD REP MOVSB ; Copy over, skip sector size (leave at 512) FMTCMN: MOV AL,BPFTCNT CBW MUL BPFTSEC ADD AX,BPRES MOV STARTSECTOR,AX MOV AX,32 MUL BPDRCNT MOV BX,BPSECSZ ADD AX,BX DEC AX XOR DX,DX DIV BX ADD STARTSECTOR, AX CALL SETHEAD MOV DX,OFFSET FMTPRGM CALL PRTMSG RSTTRY: CALL DSKRESET JNB RSTOK CALL CHKERR CMP BYTE PTR RETRIES,0 JNZ RSTTRY RSTOK: CMP HARDFLAG,0 JNZ TRKVERIFY MOV BYTE PTR RETRIES,3 TRKFORMAT: MOV DH,CURHEAD XOR CH,CH CALL FMTTRACK JNB SETRETRY CALL CHKERR CMP BYTE PTR RETRIES,0 JNZ TRKFORMAT MOV BYTE PTR ERRFLG,1 CLC RET SETRETRY: MOV BYTE PTR RETRIES,3 MOV DH,CURHEAD DEC CURHEAD OR DH,DH JNZ TRKFORMAT CALL SETHEAD TRKVERIFY: MOV DH,CURHEAD CALL SETCYL CALL VFYTRACK JNC FMTDON CALL CHKERR CMP BYTE PTR RETRIES,0 JNZ TRKVERIFY CMP HARDFLAG,0 JNZ BADHDTRK CMP CURHEAD,0 JNZ FIX1SIDE BADHDTRK: MOV BYTE PTR ERRFLG,1 CLC RET FIX1SIDE: DEC BYTE PTR FATID SUB BYTE PTR STARTSECTOR,3 MOV BYTE PTR BPDRCNT,64 MOV BYTE PTR BPB_HED,1 SHR BPSCCNT,1 FMTDON: MOV BYTE PTR RETRIES,3 MOV DH,CURHEAD DEC CURHEAD OR DH,DH JNZ TRKVERIFY CALL SETHEAD INC CURCYL CLC RET ; =================================================== DSKRESET: MOV AL,BYTE PTR BPB_SPT MOV CX,1 MOV DL,FMTDRIVE XOR DH,DH MOV AH,0 ; Reset disk CALL INT13 RET ; =================================================== FMTTRACK: MOV DI,1 MOV BX,OFFSET FMTMEND MOV AL,9 NXTSEC: SUB BX,4 MOV [BX],CH MOV [BX+DI],DH DEC AL JNZ NXTSEC MOV DL,FMTDRIVE MOV AL,BYTE PTR BPB_SPT MOV AH,5 ; Format track CALL COPYMAP MOV BX,60H ; Buffer at 60:0 MOV ES,BX ASSUME ES:NOTHING XOR BX,BX CALL INT13 PUSH CS POP ES ASSUME ES:CODE CALL COPYMAP RET ; =================================================== VFYTRACK: MOV DL,FMTDRIVE MOV AL,BYTE PTR BPB_SPT ; One track OR CL,1 ; Start at sector 1 MOV AH,4 ; Verify disk sectors CALL INT13 RET ; =================================================== CHKERR: CMP AH,3 JNZ NOTWP MOV DX,OFFSET WPERRM PRTERR: CALL PRTMSG MOV AH,0 ; Reset disk CALL INT13 ADD SP,2 JMP RETERR NOTWP: CMP AH,80H JNZ GENERR MOV DX,OFFSET NOTRDYM JMP SHORT PRTERR GENERR: MOV AH,0 ; Reset disk CALL INT13 DEC BYTE PTR RETRIES RET ; =================================================== BADSECTOR: MOV BYTE PTR RETRIES,3 CMP BYTE PTR ERRFLG,0 ; Was there an error? JZ FMTCONT MOV BYTE PTR ERRFLG,0 ; Yes, clear flag and report XOR AX,AX MOV BX,AX ; Bad sector number MOV AL,BYTE PTR BPB_SPT ; Number of consecutive sectors CLC RET FMTCONT: CALL DSKRESET JNB NEXTTRACK CALL CHKERR CMP BYTE PTR RETRIES,0 JNZ FMTCONT NEXTTRACK: MOV CX,CURCYL CMP CX,TRACKS ; All tracks/cylinders done? JNB WRBOOT CMP HARDFLAG,0 JNZ RETRYVFY MOV BYTE PTR RETRIES,3 TRYFMT: MOV DH,CURHEAD MOV CH,BYTE PTR CURCYL CALL FMTTRACK JNB RETRYVFY CALL CHKERR CMP BYTE PTR RETRIES,0 ; Retries left? JNZ TRYFMT JMP RPTBAD ; Report bad sectors (track) RETRYVFY: MOV BYTE PTR RETRIES,3 TRYVFY: MOV DH,CURHEAD CALL SETCYL CALL VFYTRACK JNB NXTHED CALL CHKERR CMP BYTE PTR RETRIES,0 ; Retries left? JNZ TRYVFY JMP RPTBAD ; Report bad sectors (track) NXTHED: MOV DH,CURHEAD DEC CURHEAD OR DH,DH ; Last head done? JNZ NEXTTRACK ; No, next head on same cylinder CALL SETHEAD CALL SETCYL MOV DX,CURCYL INC DX ; Next cylinder MOV CURCYL, DX JMP SHORT NEXTTRACK WRBOOT: MOV BX,OFFSET BOOT2X MOV DX,0 ; Start at very first sector MOV CX,1 ; Write 1 sector MOV AH,0 MOV AL,DRIVE INT 26H ; Absolute disk write JB BTWERR MOV DX,OFFSET FMTDONM CALL PRTMSG POPF XOR AX,AX CLC RET BTWERR: POPF MOV DX,OFFSET BWERRM CALL PRTMSG RETERR: STC RET RPTBAD: MOV AX,CURCYL MUL BPB_HED MOV BL,CURHEAD XOR BH,BH ADD AX,BX MUL BPB_SPT SUB AX,BPB_HID MOV BX,AX ; First bad sector to report MOV DH,CURHEAD DEC CURHEAD OR DH,DH ; Done last head? JNZ BSRET CALL SETHEAD ; Reset head INC CURCYL ; Next track/cylinder BSRET: MOV AX,BPB_SPT ; Number of consecutive sectors CLC RET ; =================================================== PRTMSG: MOV AH,9 INT 21H ; DOS Print String RET ; =================================================== SETCYL: MOV CX,CURCYL XCHG CH,CL ROR CL,1 ROR CL,1 AND CL,0C0H RET ; =================================================== GETHDPARM: PUSH DS POP ES MOV DI,OFFSET BPSECSZ LDS SI,HDD_BPB MOV CX,19 CLD REP MOVSB ; Copy BPB from IBMBIO PUSH CS POP DS MOV AX,BPB_HID MOV BX,BPSCCNT CALL CALC_CYL DEC AX MOV CURCYL, AX MOV AX,BX CALL CALC_CYL ADD AX,CURCYL MOV TRACKS, AX RET ; =================================================== CALC_CYL: PUSH AX MOV AL,BYTE PTR BPB_HED MUL BYTE PTR BPB_SPT MOV CX,AX POP AX ADD AX,CX DEC AX XOR DX,DX DIV CX RET ; =================================================== SETHEAD: MOV DH,BYTE PTR BPB_HED DEC DH MOV CURHEAD,DH RET ; =================================================== COPYMAP: PUSHF PUSH ES PUSH DI PUSH SI PUSH CX PUSH BX PUSH AX MOV DI,60H MOV ES,DI ASSUME ES:NOTHING XOR DI,DI MOV SI,OFFSET FMTMAP MOV CX,18 ; 9*4 bytes MCPYLP: LODSW MOV BX,ES:[DI] STOSW MOV [SI-2], BX LOOP MCPYLP POP AX POP BX POP CX POP SI POP DI POP ES ASSUME ES:NOTHING POPF RET ; =================================================== INT13: INT 13H RET SWITCHLIST: DB 6 DB 'B' ; 8-sector disk that can be made ; bootable under either DOS 1.x or 2.x DB '8' ; 8 sectors per track DB '1' ; Single-sided format DB 'O' ; Old style directory with E5h in all ; unused entries DB 'V' ; Ask for a volume label DB 'S' ; Copy system files BPB81 DB 1 DW 1 DB 2 DW 64 DW 320 DB 0FEH DW 1 DW 8 DW 1 DW 0 DB 0 BPB82 DB 2 DW 1 DB 2 DW 112 DW 640 DB 0FFH DW 1 DW 8 DW 2 DW 0 DB 0 BPB91 DB 1 DW 1 DB 2 DW 64 DW 360 DB 0FCH DW 2 DW 9 DW 1 DW 0 DB 0 BPB92 DB 2 DW 1 DB 2 DW 112 DW 720 DB 0FDH DW 2 DW 9 DW 2 DW 0 DB 0 FMTPRGM DB 'Formatting...$' DB '0' FMTDONM DB 'Format complete',13,10,'$' WPERRM DB 13,10,'Attempted write-protect violation',13,10,'$' BWERRM DB 13,10,'Unable to write BOOT',13,10,'$' HDCOMPM DB 13,10,'Parameter not compatible with fixed disk',13,10,'$' INCOMPM DB 13,10,'Parameters not compatible',13,10,'$' NOTRDYM DB 13,10,'Drive not ready',13,10,'$' NOTCDM DB 13,10,'Disk not compatible',13,10,'$' FMTMAP DB 0 ; Floppy format template DB 0 DB 1 DB 2 DB 0 DB 0 DB 2 DB 2 DB 0 DB 0 DB 3 DB 2 DB 0 DB 0 DB 4 DB 2 DB 0 DB 0 DB 5 DB 2 DB 0 DB 0 DB 6 DB 2 DB 0 DB 0 DB 7 DB 2 DB 0 DB 0 DB 8 DB 2 DB 0 DB 0 DB 9 DB 2 FMTMEND: HARDFLAG DB 0 FMTDRIVE DB 0 CURCYL DW 0 CURHEAD DB 0 ERRFLG DB 0 RETRIES DB 0 STARTSECTOR DW 0 TRACKS DW 0 HDD_BPB DD 700000h FREESPACE DW 33F8h FATSPACE DW OFFSET FAT_SPACE BOOT1X db 0EBh db 27h db 90h db 8 db 0 db 14h, 21h dup(0), 0CDh, 19h, 0FAh, 8Ch, 0C8h, 8Eh, 0D8h db 33h, 0D2h, 8Eh, 0D2h, 0BCh, 0, 7Ch, 0FBh, 0B8h, 60h db 0, 8Eh, 0D8h, 8Eh, 0C0h, 33h, 0D2h, 8Bh, 0C2h, 0CDh db 13h, 72h, 69h, 0E8h, 85h, 0, 72h, 0DDh, 2Eh, 83h, 3Eh db 3, 7Ch, 8, 74h, 6, 2Eh, 0C6h, 6, 64h, 7Dh, 2, 0BBh db 2 dup(0), 2Eh, 8Bh, 0Eh, 3, 7Ch, 51h, 0B0h, 9, 2Ah db 0C1h, 0B4h, 0, 8Bh, 0F0h, 56h, 33h, 0D2h, 33h, 0C0h db 8Ah, 0C5h, 2Eh, 0F6h, 36h, 64h, 7Dh, 8Ah, 0E8h, 8Ah db 0F4h, 8Bh, 0C6h, 0B4h, 2, 0CDh, 13h, 72h, 2Dh, 5Eh db 59h, 2Eh, 29h, 36h, 5, 7Ch, 74h, 1Fh, 8Bh, 0C6h, 2Eh db 0F7h, 26h, 65h, 7Dh, 3, 0D8h, 0FEh, 0C5h, 0B1h, 1, 51h db 0BEh, 8, 0, 2Eh, 3Bh, 36h, 5, 2 dup(7Ch), 5, 2Eh, 8Bh db 36h, 5, 7Ch, 0EBh, 0C0h, 0EAh, 2 dup(0), 60h, 0, 0BEh db 67h, 7Dh, 0E8h, 2, 0, 0EBh, 0FEh, 32h, 0FFh, 2Eh, 0ACh db 24h, 7Fh, 74h, 0Bh, 56h, 0B4h, 0Eh, 0BBh, 7, 0, 0CDh db 10h, 5Eh, 0EBh, 0EFh, 0C3h, 0E9h, 33h, 0FFh, 0BBh, 2 dup(0) db 0B9h, 4, 0, 0B8h, 1, 2, 0CDh, 13h, 1Eh, 72h, 33h, 8Ch db 0C8h, 8Eh, 0D8h, 0BFh, 2 dup(0), 0B9h, 0Bh, 0, 26h db 80h, 0Dh, 20h, 26h, 80h, 4Dh, 2 dup(20h), 47h, 0E2h db 0F4h, 0BFh, 2 dup(0), 0BEh, 8Bh, 7Dh, 0B9h, 0Bh, 0 db 0FCh, 0F3h, 0A6h, 75h, 0Fh, 0BFh, 20h, 0, 0BEh, 97h db 7Dh, 0B9h, 0Bh, 0, 0F3h, 0A6h, 75h, 2, 1Fh, 0C3h, 0BEh db 1Bh, 7Dh, 0E8h, 0A2h, 0FFh, 0B4h, 0, 0CDh, 16h, 1Fh db 0F9h, 0C3h db 0Dh,0Ah db 'Non-System disk or disk error',0Dh,0Ah db 'Replace and strike any key when ready',0Dh,0Ah,0 db 1, 0, 2 db 0Dh,0Ah db 'Disk Boot failure',0Dh,0Ah,0 db 'Microsoft,Inc ibmbio com0ibmdos com0' db 5 db 0C6h db 6 db 77h db 2Fh db 0FFh db 83h db 7Eh db 0FCh db 0 db 75h db 0Bh db 80h db 7Eh db 0F7h db 3Bh db 75h db 5 db 0C6h db 6 db 76h db 2Fh db 0FFh db 89h db 0ECh db 5Dh db 0CAh db 4 ORG BOOT1X + 512 BOOT2X DB 0EBh,2Ch,90h ; JMP short DB 'IBM 2.0' BPSECSZ DW 512 BPCLUS DB 1 BPRES DW 1 BPFTCNT DB 2 BPDRCNT DW 64 BPSCCNT DW 360 FATID DB 0FCH BPFTSEC DW 2 BPB_SPT DW 9 BPB_HED DW 1 BPB_HID DW 0 HARDDRV DB 0 BPBSIZ = $ - BPCLUS db 0 db 0Ah, 0DFh, 2, 25h, 2, 9, 2Ah, 0FFh, 50h, 0F6h, 0Fh db 2, 0CDh, 19h, 0FAh, 33h, 0C0h, 8Eh, 0D0h, 0BCh, 0, 7Ch db 8Eh, 0D8h, 0A3h, 7Ah, 0, 0C7h, 6, 78h, 0, 21h, 7Ch db 0FBh, 0CDh, 13h, 73h, 3, 0E9h, 95h, 0, 0Eh, 1Fh, 0A0h db 10h, 7Ch, 98h, 0F7h, 26h, 16h, 7Ch, 3, 6, 1Ch, 7Ch db 3, 6, 0Eh, 7Ch, 0A3h, 3, 7Ch, 0A3h, 13h, 7Ch, 0B8h db 20h, 0, 0F7h, 26h, 11h, 7Ch, 5, 0FFh, 1, 0BBh, 0, 2 db 0F7h, 0F3h, 1, 6, 13h, 7Ch, 0E8h, 7Eh, 0, 72h, 0B3h db 0A1h, 13h, 7Ch, 0A3h, 7Eh, 7Dh, 0B8h, 70h, 0, 8Eh, 0C0h db 8Eh, 0D8h, 0BBh, 2 dup(0), 2Eh, 0A1h, 13h, 7Ch, 0E8h db 0B6h, 0, 2Eh, 0A0h, 18h, 7Ch, 2Eh, 2Ah, 6, 15h, 7Ch db 0FEh, 0C0h, 32h, 0E4h, 50h, 0B4h, 2, 0E8h, 0C1h, 0 db 58h, 72h, 38h, 2Eh, 28h, 6, 20h, 7Ch, 76h, 0Eh, 2Eh db 1, 6, 13h, 7Ch, 2Eh, 0F7h, 26h, 0Bh, 7Ch, 3, 0D8h, 0EBh db 0CEh, 0Eh, 1Fh, 0CDh, 11h, 0D0h, 0C0h, 0D0h, 0C0h, 25h db 3, 0, 75h, 1, 2 dup(40h), 8Bh, 0C8h, 0F6h, 6, 1Eh, 7Ch db 80h, 75h, 2, 33h, 0C0h, 8Bh, 1Eh, 7Eh, 7Dh, 0EAh, 2 dup(0) db 70h, 0, 0BEh, 0C9h, 7Dh, 0E8h, 2, 0, 0EBh, 0FEh, 2Eh db 0ACh, 24h, 7Fh, 74h, 4Dh, 0B4h, 0Eh, 0BBh, 7, 0, 0CDh db 10h, 0EBh, 0F1h, 0B8h, 50h, 0, 8Eh, 0C0h, 0Eh, 1Fh db 2Eh, 0A1h, 3, 7Ch, 0E8h, 43h, 0, 0BBh, 2 dup(0), 0B8h db 1, 2, 0E8h, 58h, 0, 72h, 2Ch, 33h, 0FFh, 0B9h, 0Bh db 0, 26h, 80h, 0Dh, 20h, 26h, 80h, 4Dh, 2 dup(20h), 47h db 0E2h, 0F4h, 33h, 0FFh, 0BEh, 0DFh, 7Dh, 0B9h, 0Bh, 0 db 0FCh, 0F3h, 0A6h, 75h, 0Eh, 0BFh, 20h, 0, 0BEh, 0EBh db 7Dh, 0B9h, 0Bh, 0, 0F3h, 0A6h, 75h, 1, 0C3h, 0BEh, 80h db 7Dh, 0E8h, 0A6h, 0FFh, 0B4h, 0, 0CDh, 16h, 0F9h, 0C3h db 1Eh, 0Eh, 1Fh, 33h, 0D2h, 0F7h, 36h, 18h, 7Ch, 0FEh db 0C2h, 88h, 16h, 15h, 7Ch, 33h, 0D2h, 0F7h, 36h, 1Ah db 7Ch, 88h, 16h, 1Fh, 7Ch, 0A3h, 8, 7Ch, 1Fh, 0C3h, 2Eh db 8Bh, 16h, 8, 7Ch, 0B1h, 6, 0D2h, 0E6h, 2Eh, 0Ah, 36h db 15h, 7Ch, 8Bh, 0CAh, 86h, 0E9h, 2Eh, 8Bh, 16h, 1Eh db 7Ch, 0CDh, 13h, 0C3h, 2 dup(0) db 0Dh,0Ah db 'Non-System disk or disk error',0Dh,0Ah db 'Replace and strike any key when ready',0Dh,0Ah,0 db 0Dh,0Ah db 'Disk Boot failure',0Dh,0Ah,0 db 'ibmbio com0ibmdos com0',0 db 0 db 0 db 0 db 0 db 0 db 0 db 55h db 0AAh FAT_SPACE: DB 0F8H,0FFH,0FFH DB 1AH,1AH,1AH,1AH,1AH CODE ENDS END
; A246724: Decimal expansion of r_2, the second smallest radius for which a compact packing of the plane exists, with disks of radius 1 and r_2. ; Submitted by Jamie Morken(s4) ; 1,5,4,7,0,0,5,3,8,3,7,9,2,5,1,5,2,9,0,1,8,2,9,7,5,6,1,0,0,3,9,1,4,9,1,1,2,9,5,2,0,3,5,0,2,5,4,0,2,5,3,7,5,2,0,3,7,2,0,4,6,5,2,9,6,7,9,5,5,3,4,4,6,0,5,8,6,6,6,9,1,3,8,7,4,3,0,7,9,1,1,7,1,4,9,9,0,5,0,4 add $0,2 seq $0,11549 ; Decimal expansion of sqrt(3) truncated to n places. div $0,15 mod $0,10
; A259059: One half of numbers representable in at least two different ways as sums of four distinct nonvanishing squares. See A259058 for these numbers and their representations. ; 227,265,307,353,403,457,515,577,643,713,787,865,947,1033,1123,1217,1315,1417,1523,1633,1747,1865,1987,2113,2243,2377,2515,2657,2803,2953,3107,3265,3427,3593,3763,3937,4115,4297,4483,4673,4867,5065,5267,5473 mov $1,$0 add $0,18 mul $0,$1 mul $0,2 add $0,227
;; ;; Copyright (c) 2020-2021, Intel Corporation ;; ;; 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 Intel Corporation nor the names of its contributors ;; may be used to endorse or promote products derived from this software ;; without specific prior written permission. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; %include "include/os.asm" %include "include/imb_job.asm" %include "include/mb_mgr_datastruct.asm" %include "include/constants.asm" %include "include/cet.inc" %include "include/reg_sizes.asm" %include "include/const.inc" %ifndef SUBMIT_JOB_ZUC128_EEA3 %define SUBMIT_JOB_ZUC128_EEA3 submit_job_zuc_eea3_no_gfni_avx512 %define SUBMIT_JOB_ZUC256_EEA3 submit_job_zuc256_eea3_no_gfni_avx512 %define FLUSH_JOB_ZUC128_EEA3 flush_job_zuc_eea3_no_gfni_avx512 %define FLUSH_JOB_ZUC256_EEA3 flush_job_zuc256_eea3_no_gfni_avx512 %define SUBMIT_JOB_ZUC128_EIA3 submit_job_zuc_eia3_no_gfni_avx512 %define FLUSH_JOB_ZUC128_EIA3 flush_job_zuc_eia3_no_gfni_avx512 %define SUBMIT_JOB_ZUC256_EIA3 submit_job_zuc256_eia3_no_gfni_avx512 %define FLUSH_JOB_ZUC256_EIA3 flush_job_zuc256_eia3_no_gfni_avx512 %define ZUC128_INIT_16 asm_ZucInitialization_16_avx512 %define ZUC256_INIT_16 asm_Zuc256Initialization_16_avx512 %define ZUC_KEYGEN4B_16 asm_ZucGenKeystream4B_16_avx512 %define ZUC_CIPHER asm_ZucCipher_16_avx512 %define ZUC_REMAINDER_16 asm_Eia3RemainderAVX512_16 %define ZUC256_REMAINDER_16 asm_Eia3_256_RemainderAVX512_16 %define ZUC_KEYGEN_SKIP8_16 asm_ZucGenKeystream_16_skip8_avx512 %define ZUC_KEYGEN64B_SKIP8_16 asm_ZucGenKeystream64B_16_skip8_avx512 %define ZUC_KEYGEN_16 asm_ZucGenKeystream_16_avx512 %define ZUC_KEYGEN64B_16 asm_ZucGenKeystream64B_16_avx512 %define ZUC_ROUND64B asm_Eia3Round64BAVX512_16 %define ZUC_EIA3_N64B asm_Eia3_Nx64B_AVX512_16 %endif section .data default rel index_to_mask: dw 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080 dw 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000 extern asm_ZucInitialization_16_avx512 extern asm_ZucInitialization_16_gfni_avx512 extern asm_ZucCipher_16_avx512 extern asm_ZucCipher_16_gfni_avx512 extern asm_Zuc256Initialization_16_avx512 extern asm_Zuc256Initialization_16_gfni_avx512 extern asm_ZucGenKeystream4B_16_avx512 extern asm_ZucGenKeystream4B_16_gfni_avx512 extern asm_Eia3RemainderAVX512_16 extern asm_Eia3RemainderAVX512_16_VPCLMUL extern asm_Eia3_256_RemainderAVX512_16 extern asm_Eia3_256_RemainderAVX512_16_VPCLMUL extern asm_ZucGenKeystream_16_skip8_avx512 extern asm_ZucGenKeystream_16_skip8_gfni_avx512 extern asm_ZucGenKeystream64B_16_skip8_avx512 extern asm_ZucGenKeystream64B_16_skip8_gfni_avx512 extern asm_ZucGenKeystream_16_avx512 extern asm_ZucGenKeystream_16_gfni_avx512 extern asm_ZucGenKeystream64B_16_avx512 extern asm_ZucGenKeystream64B_16_gfni_avx512 extern asm_Eia3Round64BAVX512_16 extern asm_Eia3Round64B_16_VPCLMUL extern asm_Eia3_Nx64B_AVX512_16 extern asm_Eia3_Nx64B_AVX512_16_VPCLMUL %ifdef LINUX %define arg1 rdi %define arg2 rsi %define arg3 rdx %define arg4 rcx %define arg5 r8 %define arg6 r9 %else %define arg1 rcx %define arg2 rdx %define arg3 r8 %define arg4 r9 %define arg5 qword [rsp + 32] %define arg6 dword [rsp + 40] %endif %define state arg1 %define job arg2 %define job_rax rax ; This routine and its callee clobbers all GPRs struc STACK _gpr_save: resq 10 _rsp_save: resq 1 endstruc %define OFS_R1 (16*(4*16)) %define OFS_R2 (OFS_R1 + (4*16)) section .text %define APPEND(a,b) a %+ b %macro SUBMIT_JOB_ZUC_EEA3 1 %define %%KEY_SIZE %1 ; [constant] Key size (128 or 256) ; idx needs to be in rbp %define len rbp %define idx rbp %define lane r8 %define unused_lanes rbx %define tmp r12 %define tmp2 r13 %define tmp3 r14 %define min_len r14 mov rax, rsp sub rsp, STACK_size and rsp, -16 mov [rsp + _gpr_save + 8*0], rbx mov [rsp + _gpr_save + 8*1], rbp mov [rsp + _gpr_save + 8*2], r12 mov [rsp + _gpr_save + 8*3], r13 mov [rsp + _gpr_save + 8*4], r14 mov [rsp + _gpr_save + 8*5], r15 %ifndef LINUX mov [rsp + _gpr_save + 8*6], rsi mov [rsp + _gpr_save + 8*7], rdi %endif mov [rsp + _gpr_save + 8*8], state mov [rsp + _gpr_save + 8*9], job mov [rsp + _rsp_save], rax ; original SP mov unused_lanes, [state + _zuc_unused_lanes] mov lane, unused_lanes and lane, 0xF ;; just a nibble shr unused_lanes, 4 mov tmp, [job + _iv] mov [state + _zuc_args_IV + lane*8], tmp mov [state + _zuc_unused_lanes], unused_lanes add qword [state + _zuc_lanes_in_use], 1 mov [state + _zuc_job_in_lane + lane*8], job ; New job that needs init (update bit in zuc_init_not_done bitmask) lea tmp2, [rel index_to_mask] movzx DWORD(tmp), word [tmp2 + lane*2] kmovw k1, DWORD(tmp) or [state + _zuc_init_not_done], WORD(tmp) not DWORD(tmp) and [state + _zuc_unused_lane_bitmask], WORD(tmp) mov tmp, [job + _src] add tmp, [job + _cipher_start_src_offset_in_bytes] mov [state + _zuc_args_in + lane*8], tmp mov tmp, [job + _enc_keys] mov [state + _zuc_args_keys + lane*8], tmp mov tmp, [job + _dst] mov [state + _zuc_args_out + lane*8], tmp ;; insert len into proper lane mov len, [job + _msg_len_to_cipher_in_bytes] ;; Update lane len vmovdqa64 ymm0, [state + _zuc_lens] vpbroadcastw ymm1, WORD(len) vmovdqu16 ymm0{k1}, ymm1 vmovdqa64 [state + _zuc_lens], ymm0 ;; Find min length for lanes 0-7 vphminposuw xmm2, xmm0 cmp qword [state + _zuc_lanes_in_use], 16 jne %%return_null_submit_eea3 ; Find min length for lanes 8-15 vpextrw DWORD(min_len), xmm2, 0 ; min value vpextrw DWORD(idx), xmm2, 1 ; min index vextracti128 xmm1, ymm0, 1 vphminposuw xmm2, xmm1 vpextrw DWORD(tmp), xmm2, 0 ; min value cmp DWORD(min_len), DWORD(tmp) jle %%use_min vpextrw DWORD(idx), xmm2, 1 ; min index add DWORD(idx), 8 ; but index +8 mov min_len, tmp ; min len %%use_min: or min_len, min_len je %%len_is_0_submit_eea3 ; Move state into r11, as register for state will be used ; to pass parameter to next function mov r11, state %if %%KEY_SIZE == 128 lea arg1, [r11 + _zuc_args_keys] lea arg2, [r11 + _zuc_args_IV] lea arg3, [r11 + _zuc_state] movzx DWORD(arg4), word [r11 + _zuc_init_not_done] call ZUC128_INIT_16 %else ;; %%KEY_SIZE == 256 lea arg1, [r11 + _zuc_args_keys] lea arg2, [r11 + _zuc_args_IV] lea arg3, [r11 + _zuc_state] movzx DWORD(arg4), word [r11 + _zuc_init_not_done] mov r10, 2 ; Argument 5 hardcoded to r10, as INIT is expecting it in that register call ZUC256_INIT_16 %endif ;; %%KEY_SIZE == 128 mov r11, [rsp + _gpr_save + 8*8] mov word [r11 + _zuc_init_not_done], 0 ; Init done for all lanes ;; If Windows, reserve memory in stack for parameter transferring %ifndef LINUX ;; 40 bytes for 5 parameters sub rsp, 40 %endif lea arg1, [r11 + _zuc_state] lea arg2, [r11 + _zuc_args_in] lea arg3, [r11 + _zuc_args_out] lea arg4, [r11 + _zuc_lens] mov arg5, min_len call ZUC_CIPHER %ifndef LINUX add rsp, 40 %endif mov state, [rsp + _gpr_save + 8*8] mov job, [rsp + _gpr_save + 8*9] %%len_is_0_submit_eea3: ; process completed job "idx" ;; - decrement number of jobs in use sub qword [state + _zuc_lanes_in_use], 1 mov job_rax, [state + _zuc_job_in_lane + idx*8] mov unused_lanes, [state + _zuc_unused_lanes] mov qword [state + _zuc_job_in_lane + idx*8], 0 or dword [job_rax + _status], IMB_STATUS_COMPLETED_CIPHER shl unused_lanes, 4 or unused_lanes, idx mov [state + _zuc_unused_lanes], unused_lanes lea tmp2, [rel index_to_mask] movzx DWORD(tmp), word [tmp2 + idx*2] or [state + _zuc_unused_lane_bitmask], WORD(tmp) ; Clear ZUC state of lane that is returned %ifdef SAFE_DATA vpxorq zmm0, zmm0 kmovw k1, [tmp2 + idx*2] %assign i 0 %rep (16 + 6) vmovdqa32 [state + _zuc_state]{k1}, zmm0 %assign i (i + 1) %endrep %endif %%return_submit_eea3: vzeroupper mov rbx, [rsp + _gpr_save + 8*0] mov rbp, [rsp + _gpr_save + 8*1] mov r12, [rsp + _gpr_save + 8*2] mov r13, [rsp + _gpr_save + 8*3] mov r14, [rsp + _gpr_save + 8*4] mov r15, [rsp + _gpr_save + 8*5] %ifndef LINUX mov rsi, [rsp + _gpr_save + 8*6] mov rdi, [rsp + _gpr_save + 8*7] %endif mov rsp, [rsp + _rsp_save] ; original SP ret %%return_null_submit_eea3: xor job_rax, job_rax jmp %%return_submit_eea3 %endmacro %macro FLUSH_JOB_ZUC_EEA3 1 %define %%KEY_SIZE %1 ; [constant] Key size (128 or 256) %define unused_lanes rbx %define tmp1 rbx %define tmp2 rax ; idx needs to be in rbp (will be maintained after function calls) %define tmp rbp %define idx rbp %define tmp3 r8 %define tmp4 r9 %define tmp5 r10 %define null_jobs_mask r13 ; Will be maintained after function calls %define min_len r14 ; Will be maintained after function calls mov rax, rsp sub rsp, STACK_size and rsp, -16 mov [rsp + _gpr_save + 8*0], rbx mov [rsp + _gpr_save + 8*1], rbp mov [rsp + _gpr_save + 8*2], r12 mov [rsp + _gpr_save + 8*3], r13 mov [rsp + _gpr_save + 8*4], r14 mov [rsp + _gpr_save + 8*5], r15 %ifndef LINUX mov [rsp + _gpr_save + 8*6], rsi mov [rsp + _gpr_save + 8*7], rdi %endif mov [rsp + _gpr_save + 8*8], state mov [rsp + _rsp_save], rax ; original SP ; check for empty cmp qword [state + _zuc_lanes_in_use], 0 jz %%return_null_flush_eea3 ; Find lanes with NULL jobs vpxorq zmm0, zmm0 vmovdqu64 zmm1, [state + _zuc_job_in_lane] vmovdqu64 zmm2, [state + _zuc_job_in_lane + (8*8)] vpcmpq k1, zmm1, zmm0, 0 ; EQ ; mask of null jobs (L8) vpcmpq k2, zmm2, zmm0, 0 ; EQ ; mask of null jobs (H8) kshiftlw k3, k2, 8 korw k3, k3, k1 ; mask of NULL jobs for all lanes kmovw DWORD(null_jobs_mask), k3 ;; - Update lengths of NULL lanes to 0xFFFF, to find minimum vmovdqa ymm0, [state + _zuc_lens] mov WORD(tmp3), 0xffff vpbroadcastw ymm1, WORD(tmp3) vmovdqu16 ymm0{k3}, ymm1 vmovdqa64 [state + _zuc_lens], ymm0 ; Find if a job has been finished (length is zero) vpxor ymm1, ymm1 vpcmpw k4, ymm0, ymm1, 0 kmovw DWORD(tmp), k4 bsf DWORD(idx), DWORD(tmp) jnz %%len_is_0_flush_eea3 ;; Find min length for lanes 0-7 vphminposuw xmm2, xmm0 ; extract min length of lanes 0-7 vpextrw DWORD(min_len), xmm2, 0 ; min value vpextrw DWORD(idx), xmm2, 1 ; min index ;; Update lens and find min for lanes 8-15 vextracti128 xmm1, ymm0, 1 vphminposuw xmm2, xmm1 vpextrw DWORD(tmp3), xmm2, 0 ; min value cmp DWORD(min_len), DWORD(tmp3) jle %%use_min_flush vpextrw DWORD(idx), xmm2, 1 ; min index add DWORD(idx), 8 ; but index +8 mov min_len, tmp3 ; min len %%use_min_flush: ; Move state into r12, as register for state will be used ; to pass parameter to next function mov r12, state ;; copy good lane data (with minimum length) into NULL lanes ;; - k1(L8)/k2(H8)/k3 - masks of NULL jobs ;; - idx index of job with minimum length ;; - in pointer mov tmp3, [state + _zuc_args_in + idx*8] vpbroadcastq zmm1, tmp3 vmovdqu64 [state + _zuc_args_in + (0*PTR_SZ)]{k1}, zmm1 vmovdqu64 [state + _zuc_args_in + (8*PTR_SZ)]{k2}, zmm1 ;; - out pointer mov tmp3, [state + _zuc_args_out + idx*8] vpbroadcastq zmm1, tmp3 vmovdqu64 [state + _zuc_args_out + (0*PTR_SZ)]{k1}, zmm1 vmovdqu64 [state + _zuc_args_out + (8*PTR_SZ)]{k2}, zmm1 ;; - key pointer mov tmp3, [state + _zuc_args_keys + idx*8] vpbroadcastq zmm1, tmp3 vmovdqu64 [state + _zuc_args_keys + (0*PTR_SZ)]{k1}, zmm1 vmovdqu64 [state + _zuc_args_keys + (8*PTR_SZ)]{k2}, zmm1 ;; - IV pointer mov tmp3, [state + _zuc_args_IV + idx*8] vpbroadcastq zmm1, tmp3 vmovdqu64 [state + _zuc_args_IV + (0*PTR_SZ)]{k1}, zmm1 vmovdqu64 [state + _zuc_args_IV + (8*PTR_SZ)]{k2}, zmm1 cmp word [r12 + _zuc_init_not_done], 0 je %%skip_init_flush %if %%KEY_SIZE == 128 lea arg1, [r12 + _zuc_args_keys] lea arg2, [r12 + _zuc_args_IV] lea arg3, [r12 + _zuc_state] movzx DWORD(arg4), word [r12 + _zuc_init_not_done] call ZUC128_INIT_16 %else ;; %%KEY_SIZE == 256 lea arg1, [r12 + _zuc_args_keys] lea arg2, [r12 + _zuc_args_IV] lea arg3, [r12 + _zuc_state] movzx DWORD(arg4), word [r12 + _zuc_init_not_done] mov r10, 2 ; Argument 5 hardcoded to r10, as INIT is expecting it in that register call ZUC256_INIT_16 %endif ;; %%KEY_SIZE == 128 mov word [r12 + _zuc_init_not_done], 0 %%skip_init_flush: ;; Copy state from valid lane into NULL job masks kmovq k1, null_jobs_mask ;; Copy LFSR registers %assign off 0 %rep 16 mov DWORD(tmp4), [r12 + _zuc_state + off + idx*4] vpbroadcastd zmm0, DWORD(tmp4) vmovdqa32 [r12 + _zuc_state + off]{k1}, zmm0 %assign off (off + 64) %endrep ;; Copy R1-2 mov DWORD(tmp4), [r12 + _zuc_state + OFS_R1 + idx*4] vpbroadcastd zmm0, DWORD(tmp4) vmovdqa32 [r12 + _zuc_state + OFS_R1]{k1}, zmm0 mov DWORD(tmp4), [r12 + _zuc_state + OFS_R2 + idx*4] vpbroadcastd zmm0, DWORD(tmp4) vmovdqa32 [r12 + _zuc_state + OFS_R2]{k1}, zmm0 ;; If Windows, reserve memory in stack for parameter transferring %ifndef LINUX ;; 40 bytes for 5 parameters sub rsp, 40 %endif lea arg1, [r12 + _zuc_state] lea arg2, [r12 + _zuc_args_in] lea arg3, [r12 + _zuc_args_out] lea arg4, [r12 + _zuc_lens] mov arg5, min_len call ZUC_CIPHER %ifndef LINUX add rsp, 40 %endif mov state, [rsp + _gpr_save + 8*8] ; Prepare bitmask to clear ZUC state with lane ; that is returned and NULL lanes %ifdef SAFE_DATA lea tmp2, [rel index_to_mask] movzx DWORD(tmp1), word [tmp2 + idx*2] movzx DWORD(tmp3), word [state + _zuc_unused_lane_bitmask] or tmp3, tmp1 ;; bitmask with NULL lanes and job to return kmovq k1, tmp3 jmp %%skip_flush_clear_state %endif %%len_is_0_flush_eea3: %ifdef SAFE_DATA ; Prepare bitmask to clear ZUC state with lane that is returned lea tmp3, [rel index_to_mask] kmovw k1, [tmp3 + idx*2] %%skip_flush_clear_state: %endif ; process completed job "idx" ;; - decrement number of jobs in use sub qword [state + _zuc_lanes_in_use], 1 mov job_rax, [state + _zuc_job_in_lane + idx*8] mov unused_lanes, [state + _zuc_unused_lanes] mov qword [state + _zuc_job_in_lane + idx*8], 0 or dword [job_rax + _status], IMB_STATUS_COMPLETED_CIPHER shl unused_lanes, 4 or unused_lanes, idx mov [state + _zuc_unused_lanes], unused_lanes lea tmp4, [rel index_to_mask] movzx DWORD(tmp3), word [tmp4 + idx*2] or [state + _zuc_unused_lane_bitmask], WORD(tmp3) ; Clear ZUC state using k1 bitmask set above %ifdef SAFE_DATA vpxorq zmm0, zmm0 %assign i 0 %rep (16 + 6) vmovdqa32 [state + _zuc_state]{k1}, zmm0 %assign i (i + 1) %endrep %endif vzeroupper %%return_flush_eea3: mov rbx, [rsp + _gpr_save + 8*0] mov rbp, [rsp + _gpr_save + 8*1] mov r12, [rsp + _gpr_save + 8*2] mov r13, [rsp + _gpr_save + 8*3] mov r14, [rsp + _gpr_save + 8*4] mov r15, [rsp + _gpr_save + 8*5] %ifndef LINUX mov rsi, [rsp + _gpr_save + 8*6] mov rdi, [rsp + _gpr_save + 8*7] %endif mov rsp, [rsp + _rsp_save] ; original SP ret %%return_null_flush_eea3: xor job_rax, job_rax jmp %%return_flush_eea3 %endmacro ; JOB* SUBMIT_JOB_ZUC128_EEA3(MB_MGR_ZUC_OOO *state, IMB_JOB *job) ; arg 1 : state ; arg 2 : job MKGLOBAL(SUBMIT_JOB_ZUC128_EEA3,function,internal) SUBMIT_JOB_ZUC128_EEA3: endbranch64 SUBMIT_JOB_ZUC_EEA3 128 ; JOB* SUBMIT_JOB_ZUC256_EEA3(MB_MGR_ZUC_OOO *state, IMB_JOB *job) ; arg 1 : state ; arg 2 : job MKGLOBAL(SUBMIT_JOB_ZUC256_EEA3,function,internal) SUBMIT_JOB_ZUC256_EEA3: endbranch64 SUBMIT_JOB_ZUC_EEA3 256 ; JOB* FLUSH_JOB_ZUC128_EEA3(MB_MGR_ZUC_OOO *state) ; arg 1 : state MKGLOBAL(FLUSH_JOB_ZUC128_EEA3,function,internal) FLUSH_JOB_ZUC128_EEA3: endbranch64 FLUSH_JOB_ZUC_EEA3 128 ; JOB* FLUSH_JOB_ZUC256_EEA3(MB_MGR_ZUC_OOO *state) ; arg 1 : state MKGLOBAL(FLUSH_JOB_ZUC256_EEA3,function,internal) FLUSH_JOB_ZUC256_EEA3: endbranch64 FLUSH_JOB_ZUC_EEA3 256 %macro ZUC_EIA3_16_BUFFER 5 %define %%OOO %1 ; [in] Pointer to ZUC OOO manager %define %%KEY_SIZE %2 ; [constant] Key size (16 or 32) %define %%L %3 ; [clobbered] Temporary GP register (dword) %define %%REMAIN_BITS %4 ; [clobbered] Temporary GP register (dword) %define %%TMP %5 ; [clobbered] Temporary GP register ; Find minimum length vmovdqa xmm0, [%%OOO + _zuc_lens] vphminposuw xmm0, xmm0 vmovdqa xmm1, [%%OOO + _zuc_lens + 16] vphminposuw xmm1, xmm1 vpextrw %%REMAIN_BITS, xmm0, 0 vpextrw DWORD(%%TMP), xmm1, 0 cmp DWORD(%%TMP), %%REMAIN_BITS cmovbe %%REMAIN_BITS, DWORD(%%TMP) ; Get number of KS 32-bit words to generate ([length/32] + 2)) lea %%L, [%%REMAIN_BITS + 31 + (2 << 5)] shr %%L, 5 cmp %%L, 16 jae %%_above_eq_16 ; Generate L KS words (less than 16), except for old buffers, which only need L-2, ; since 2 words are reused from previous iteration %ifndef LINUX ;; 40 bytes for 5 parameters sub rsp, 40 %endif lea arg1, [%%OOO + _zuc_state] lea arg2, [%%OOO + _zuc_args_KS] xor arg3, arg3 ; offset = 0 movzx DWORD(arg4), word [%%OOO + _zuc_init_not_done] %ifdef LINUX mov DWORD(arg5), %%L %else mov [rsp + 32], %%L %endif call ZUC_KEYGEN_SKIP8_16 %ifndef LINUX add rsp, 40 %endif jmp %%_exit %%_above_eq_16: ; Generate 16 KS words, except for old buffers. which only need 14 (16 - 2), ; since 2 words are reused from previous iteration lea arg1, [%%OOO + _zuc_state] lea arg2, [%%OOO + _zuc_args_KS] xor arg3, arg3 ; offset = 0 movzx DWORD(arg4), word [%%OOO + _zuc_init_not_done] call ZUC_KEYGEN64B_SKIP8_16 sub %%L, 16 %%_loop: cmp %%REMAIN_BITS, 64*8 jbe %%_exit_loop cmp %%L, 16 jae %%_above_eq_16_loop ; Generate last KS words needed lea arg1, [%%OOO + _zuc_state] lea arg2, [%%OOO + _zuc_args_KS] mov arg3, 64 ; offset = 64 mov DWORD(arg4), %%L call ZUC_KEYGEN_16 ; Digest 64 bytes of data lea arg1, [%%OOO + _zuc_args_digest] lea arg2, [%%OOO + _zuc_args_KS] lea arg3, [%%OOO + _zuc_args_in] lea arg4, [%%OOO + _zuc_lens] call ZUC_ROUND64B sub %%REMAIN_BITS, 64*8 jmp %%_exit %%_above_eq_16_loop: ; Generate next 16 KS words and digest 64 bytes of data %ifndef LINUX ;; 48 bytes for 6 parameters sub rsp, 48 %endif mov DWORD(%%TMP), %%L shr DWORD(%%TMP), 4 ; Number of rounds of 64 bytes ;; Calculate number of remaining bits after function call mov eax, 64*8 mul %%TMP sub %%REMAIN_BITS, eax lea arg1, [%%OOO + _zuc_state] lea arg2, [%%OOO + _zuc_args_KS] lea arg3, [%%OOO + _zuc_args_digest] lea arg4, [%%OOO + _zuc_args_in] %ifdef LINUX mov arg6, %%TMP lea arg5, [%%OOO + _zuc_lens] %else mov [rsp + 40], %%TMP lea %%TMP, [%%OOO + _zuc_lens] mov [rsp + 32], %%TMP %endif call ZUC_EIA3_N64B %ifndef LINUX ;; 48 bytes for 6 parameters add rsp, 48 %endif and %%L, 0xf ; Remaining words of KS left to generate jmp %%_loop %%_exit_loop: or %%L, %%L jz %%_exit lea arg1, [%%OOO + _zuc_state] lea arg2, [%%OOO + _zuc_args_KS] mov arg3, 64 ; offset = 64 mov DWORD(arg4), %%L ; Generate final KS words call ZUC_KEYGEN_16 %%_exit: %ifndef LINUX ;; 40 bytes for 5 parameters sub rsp, 40 %endif ; Digest final bytes of data and generate tag for finished buffers lea arg1, [%%OOO + _zuc_args_digest] lea arg2, [%%OOO + _zuc_args_KS] lea arg3, [%%OOO + _zuc_args_in] lea arg4, [%%OOO + _zuc_lens] %ifdef LINUX mov DWORD(arg5), %%REMAIN_BITS %else mov [rsp + 32], %%REMAIN_BITS %endif %if %%KEY_SIZE == 128 call ZUC_REMAINDER_16 %else call ZUC256_REMAINDER_16 %endif %ifndef LINUX add rsp, 40 %endif mov word [%%OOO + _zuc_init_not_done], 0 %endmacro %macro SUBMIT_JOB_ZUC_EIA3 1 %define %%KEY_SIZE %1 ; [constant] Key size (128 or 256) ; idx needs to be in rbp %define len rbp %define idx rbp %define lane r8 %define unused_lanes rbx %define tmp r15 %define tmp2 r13 %define tmp3 r14 %define min_len r14 mov rax, rsp sub rsp, STACK_size and rsp, -16 mov [rsp + _gpr_save + 8*0], rbx mov [rsp + _gpr_save + 8*1], rbp mov [rsp + _gpr_save + 8*2], r12 mov [rsp + _gpr_save + 8*3], r13 mov [rsp + _gpr_save + 8*4], r14 mov [rsp + _gpr_save + 8*5], r15 %ifndef LINUX mov [rsp + _gpr_save + 8*6], rsi mov [rsp + _gpr_save + 8*7], rdi %endif mov [rsp + _gpr_save + 8*8], state mov [rsp + _gpr_save + 8*9], job mov [rsp + _rsp_save], rax ; original SP mov unused_lanes, [state + _zuc_unused_lanes] mov lane, unused_lanes and lane, 0xF ;; just a nibble shr unused_lanes, 4 mov tmp, [job + _zuc_eia3_iv] mov [state + _zuc_args_IV + lane*8], tmp mov [state + _zuc_unused_lanes], unused_lanes add qword [state + _zuc_lanes_in_use], 1 mov [state + _zuc_job_in_lane + lane*8], job ; New job that needs init (update bit in zuc_init_not_done bitmask) lea tmp2, [rel index_to_mask] movzx DWORD(tmp), word [tmp2 + lane*2] or [state + _zuc_init_not_done], WORD(tmp) kmovq k1, tmp not tmp and [state + _zuc_unused_lane_bitmask], WORD(tmp) ; Reset temporary digest for the lane mov dword [state + _zuc_args_digest + lane*4], 0 mov tmp, [job + _src] add tmp, [job + _hash_start_src_offset_in_bytes] mov [state + _zuc_args_in + lane*8], tmp mov tmp, [job + _zuc_eia3_key] mov [state + _zuc_args_keys + lane*8], tmp ;; insert len into proper lane mov len, [job + _msg_len_to_hash_in_bits] ;; Update lane len vmovdqa64 ymm0, [state + _zuc_lens] vpbroadcastw ymm1, WORD(len) vmovdqu16 ymm0{k1}, ymm1 vmovdqa64 [state + _zuc_lens], ymm0 cmp qword [state + _zuc_lanes_in_use], 16 jne %%return_null_submit_eia3 ;; Find min length for lanes 0-7 vphminposuw xmm2, xmm0 ; Find min length for lanes 8-15 vpextrw DWORD(min_len), xmm2, 0 ; min value vpextrw DWORD(idx), xmm2, 1 ; min index vextracti128 xmm1, ymm0, 1 vphminposuw xmm2, xmm1 vpextrw DWORD(tmp), xmm2, 0 ; min value cmp DWORD(min_len), DWORD(tmp) jle %%use_min_eia3 vpextrw DWORD(idx), xmm2, 1 ; min index add DWORD(idx), 8 ; but index +8 mov min_len, tmp ; min len %%use_min_eia3: or min_len, min_len jz %%len_is_0_submit_eia3 ; Move state into r12, as register for state will be used ; to pass parameter to next function mov r12, state %if %%KEY_SIZE == 128 lea arg1, [r12 + _zuc_args_keys] lea arg2, [r12 + _zuc_args_IV] lea arg3, [r12 + _zuc_state] movzx DWORD(arg4), word [r12 + _zuc_init_not_done] call ZUC128_INIT_16 %else ;; %%KEY_SIZE == 256 lea arg1, [r12 + _zuc_args_keys] lea arg2, [r12 + _zuc_args_IV] lea arg3, [r12 + _zuc_state] movzx DWORD(arg4), word [r12 + _zuc_init_not_done] mov r10, 4 ; Argument 5 hardcoded to r10, as INIT is expecting it in that register call ZUC256_INIT_16 lea arg1, [r12 + _zuc_state] lea arg2, [r12 + _zuc_args_digest] movzx DWORD(arg3), word [r12 + _zuc_init_not_done] ; Generate first 4 bytes of keystream, used as the initial value of digests call ZUC_KEYGEN4B_16 %endif ;; %%KEY_SIZE == 128 ZUC_EIA3_16_BUFFER r12, %%KEY_SIZE, DWORD(tmp), DWORD(tmp2), tmp3 mov state, [rsp + _gpr_save + 8*8] mov job, [rsp + _gpr_save + 8*9] %%len_is_0_submit_eia3: ; process completed job "idx" ;; - decrement number of jobs in use sub qword [state + _zuc_lanes_in_use], 1 mov job_rax, [state + _zuc_job_in_lane + idx*8] mov unused_lanes, [state + _zuc_unused_lanes] mov qword [state + _zuc_job_in_lane + idx*8], 0 or dword [job_rax + _status], IMB_STATUS_COMPLETED_AUTH ; Copy digest to auth tag output mov r10d, [state + _zuc_args_digest + idx*4] mov r11, [job_rax + _auth_tag_output] mov [r11], r10d shl unused_lanes, 4 or unused_lanes, idx mov [state + _zuc_unused_lanes], unused_lanes lea tmp2, [rel index_to_mask] movzx DWORD(tmp), word [tmp2 + idx*2] or [state + _zuc_unused_lane_bitmask], WORD(tmp) ; Clear ZUC state of lane that is returned %ifdef SAFE_DATA vpxorq zmm0, zmm0 kmovw k1, [tmp2 + idx*2] %assign i 0 %rep (16 + 6) vmovdqa32 [state + _zuc_state]{k1}, zmm0 %assign i (i + 1) %endrep %endif %%return_submit_eia3: vzeroupper mov rbx, [rsp + _gpr_save + 8*0] mov rbp, [rsp + _gpr_save + 8*1] mov r12, [rsp + _gpr_save + 8*2] mov r13, [rsp + _gpr_save + 8*3] mov r14, [rsp + _gpr_save + 8*4] mov r15, [rsp + _gpr_save + 8*5] %ifndef LINUX mov rsi, [rsp + _gpr_save + 8*6] mov rdi, [rsp + _gpr_save + 8*7] %endif mov rsp, [rsp + _rsp_save] ; original SP ret %%return_null_submit_eia3: xor job_rax, job_rax jmp %%return_submit_eia3 %endmacro %macro FLUSH_JOB_ZUC_EIA3 1 %define %%KEY_SIZE %1 ; [constant] Key size (128 or 256) %define unused_lanes rbx %define tmp1 rbx %define tmp2 r13 %define tmp rbp %define tmp3 r8 %define tmp4 r15 %define idx r14 ; Will be maintained after function calls %define min_len r15 mov rax, rsp sub rsp, STACK_size and rsp, -16 mov [rsp + _gpr_save + 8*0], rbx mov [rsp + _gpr_save + 8*1], rbp mov [rsp + _gpr_save + 8*2], r12 mov [rsp + _gpr_save + 8*3], r13 mov [rsp + _gpr_save + 8*4], r14 mov [rsp + _gpr_save + 8*5], r15 %ifndef LINUX mov [rsp + _gpr_save + 8*6], rsi mov [rsp + _gpr_save + 8*7], rdi %endif mov [rsp + _gpr_save + 8*8], state mov [rsp + _rsp_save], rax ; original SP ; check for empty cmp qword [state + _zuc_lanes_in_use], 0 jz %%return_null_flush_eia3 ; find a lane with a null job vpxorq zmm0, zmm0 vmovdqu64 zmm1, [state + _zuc_job_in_lane] vmovdqu64 zmm2, [state + _zuc_job_in_lane + (8*8)] vpcmpq k1, zmm1, zmm0, 0 ; EQ ; mask of null jobs (L8) vpcmpq k2, zmm2, zmm0, 0 ; EQ ; mask of null jobs (H8) kshiftlw k3, k2, 8 korw k3, k3, k1 ; mask of NULL jobs for all lanes ;; - Update lengths of NULL lanes to 0xFFFF, to find minimum vmovdqa ymm0, [state + _zuc_lens] mov WORD(tmp3), 0xffff vpbroadcastw ymm1, WORD(tmp3) vmovdqu16 ymm0{k3}, ymm1 vmovdqa64 [state + _zuc_lens], ymm0 ; Find if a job has been finished (length is zero) vpxor ymm1, ymm1 vpcmpw k4, ymm0, ymm1, 0 kmovw DWORD(tmp), k4 bsf DWORD(idx), DWORD(tmp) jnz %%len_is_0_flush_eia3 ;; Find min length for lanes 0-7 vphminposuw xmm2, xmm0 ; extract min length of lanes 0-7 vpextrw DWORD(min_len), xmm2, 0 ; min value vpextrw DWORD(idx), xmm2, 1 ; min index ;; Update lens and find min for lanes 8-15 vextracti128 xmm1, ymm0, 1 vphminposuw xmm2, xmm1 vpextrw DWORD(tmp3), xmm2, 0 ; min value cmp DWORD(min_len), DWORD(tmp3) jle %%use_min_flush_eia3 vpextrw DWORD(idx), xmm2, 1 ; min index add DWORD(idx), 8 ; but index +8 mov min_len, tmp3 ; min len %%use_min_flush_eia3: ;; copy good lane data into NULL lanes ;; - k1(L8)/k2(H8)/k3 - masks of NULL jobs ;; - idx - index of 1st non-null job ;; - in pointer mov tmp3, [state + _zuc_args_in + idx*8] vpbroadcastq zmm1, tmp3 vmovdqu64 [state + _zuc_args_in + (0*PTR_SZ)]{k1}, zmm1 vmovdqu64 [state + _zuc_args_in + (8*PTR_SZ)]{k2}, zmm1 ;; - key pointer mov tmp3, [state + _zuc_args_keys + idx*8] vpbroadcastq zmm1, tmp3 vmovdqu64 [state + _zuc_args_keys + (0*PTR_SZ)]{k1}, zmm1 vmovdqu64 [state + _zuc_args_keys + (8*PTR_SZ)]{k2}, zmm1 ;; - IV pointer mov tmp3, [state + _zuc_args_IV + idx*8] vpbroadcastq zmm1, tmp3 vmovdqu64 [state + _zuc_args_IV + (0*PTR_SZ)]{k1}, zmm1 vmovdqu64 [state + _zuc_args_IV + (8*PTR_SZ)]{k2}, zmm1 ; Move state into r12, as register for state will be used ; to pass parameter to next function mov r12, state cmp word [r12 + _zuc_init_not_done], 0 je %%skip_init_flush_eia3 %if %%KEY_SIZE == 128 lea arg1, [r12 + _zuc_args_keys] lea arg2, [r12 + _zuc_args_IV] lea arg3, [r12 + _zuc_state] movzx DWORD(arg4), word [r12 + _zuc_init_not_done] call ZUC128_INIT_16 %else ;; %%KEY_SIZE == 256 lea arg1, [r12 + _zuc_args_keys] lea arg2, [r12 + _zuc_args_IV] lea arg3, [r12 + _zuc_state] movzx DWORD(arg4), word [r12 + _zuc_init_not_done] mov r10, 4 ; Argument 5 hardcoded to r10, as INIT is expecting it in that register call ZUC256_INIT_16 lea arg1, [r12 + _zuc_state] lea arg2, [r12 + _zuc_args_digest] movzx DWORD(arg3), word [r12 + _zuc_init_not_done] ; Generate first 4 bytes of keystream, used as the initial value of digests call ZUC_KEYGEN4B_16 %endif ;; %%KEY_SIZE == 128 %%skip_init_flush_eia3: ZUC_EIA3_16_BUFFER r12, %%KEY_SIZE, DWORD(tmp), DWORD(tmp2), tmp4 mov state, [rsp + _gpr_save + 8*8] ; Prepare bitmask to clear ZUC state with lane ; that is returned and NULL lanes %ifdef SAFE_DATA lea tmp2, [rel index_to_mask] movzx DWORD(tmp1), word [tmp2 + idx*2] movzx DWORD(tmp3), word [state + _zuc_unused_lane_bitmask] or tmp3, tmp1 ;; bitmask with NULL lanes and job to return kmovq k1, tmp3 jmp %%skip_flush_clear_state_eia3 %endif %%len_is_0_flush_eia3: %ifdef SAFE_DATA ; Prepare bitmask to clear ZUC state with lane that is returned lea tmp3, [rel index_to_mask] kmovw k1, [tmp3 + idx*2] %%skip_flush_clear_state_eia3: %endif ; process completed job "idx" ;; - decrement number of jobs in use sub qword [state + _zuc_lanes_in_use], 1 mov job_rax, [state + _zuc_job_in_lane + idx*8] mov unused_lanes, [state + _zuc_unused_lanes] mov qword [state + _zuc_job_in_lane + idx*8], 0 or dword [job_rax + _status], IMB_STATUS_COMPLETED_AUTH ; Copy digest to auth tag output mov r10d, [state + _zuc_args_digest + idx*4] mov r11, [job_rax + _auth_tag_output] mov [r11], r10d shl unused_lanes, 4 or unused_lanes, idx mov [state + _zuc_unused_lanes], unused_lanes lea tmp4, [rel index_to_mask] movzx DWORD(tmp3), word [tmp4 + idx*2] or [state + _zuc_unused_lane_bitmask], WORD(tmp3) ; Clear ZUC state using k1 bitmask set above %ifdef SAFE_DATA vpxorq zmm0, zmm0 %assign i 0 %rep (16 + 6) vmovdqa32 [state + _zuc_state]{k1}, zmm0 %assign i (i + 1) %endrep %endif vzeroupper %%return_flush_eia3: mov rbx, [rsp + _gpr_save + 8*0] mov rbp, [rsp + _gpr_save + 8*1] mov r12, [rsp + _gpr_save + 8*2] mov r13, [rsp + _gpr_save + 8*3] mov r14, [rsp + _gpr_save + 8*4] mov r15, [rsp + _gpr_save + 8*5] %ifndef LINUX mov rsi, [rsp + _gpr_save + 8*6] mov rdi, [rsp + _gpr_save + 8*7] %endif mov rsp, [rsp + _rsp_save] ; original SP ret %%return_null_flush_eia3: xor job_rax, job_rax jmp %%return_flush_eia3 %endmacro ; JOB* SUBMIT_JOB_ZUC128_EIA3(MB_MGR_ZUC_OOO *state, IMB_JOB *job) ; arg 1 : state ; arg 2 : job MKGLOBAL(SUBMIT_JOB_ZUC128_EIA3,function,internal) SUBMIT_JOB_ZUC128_EIA3: endbranch64 SUBMIT_JOB_ZUC_EIA3 128 ; JOB* SUBMIT_JOB_ZUC256_EIA3(MB_MGR_ZUC_OOO *state, IMB_JOB *job) ; arg 1 : state ; arg 2 : job MKGLOBAL(SUBMIT_JOB_ZUC256_EIA3,function,internal) SUBMIT_JOB_ZUC256_EIA3: endbranch64 SUBMIT_JOB_ZUC_EIA3 256 ; JOB* FLUSH_JOB_ZUC128_EIA3(MB_MGR_ZUC_OOO *state) ; arg 1 : state MKGLOBAL(FLUSH_JOB_ZUC128_EIA3,function,internal) FLUSH_JOB_ZUC128_EIA3: endbranch64 FLUSH_JOB_ZUC_EIA3 128 ; JOB* FLUSH_JOB_ZUC256_EIA3(MB_MGR_ZUC_OOO *state) ; arg 1 : state MKGLOBAL(FLUSH_JOB_ZUC256_EIA3,function,internal) FLUSH_JOB_ZUC256_EIA3: endbranch64 FLUSH_JOB_ZUC_EIA3 256 %ifdef LINUX section .note.GNU-stack noalloc noexec nowrite progbits %endif
/* * @lc app=leetcode id=200 lang=cpp * * [200] Number of Islands * * https://leetcode.com/problems/number-of-islands/description/ * * algorithms * Medium (42.46%) * Likes: 3014 * Dislikes: 109 * Total Accepted: 408K * Total Submissions: 958.3K * Testcase Example: '[["1","1","1","1","0"],["1","1","0","1","0"],["1","1","0","0","0"],["0","0","0","0","0"]]' * * Given a 2d grid map of '1's (land) and '0's (water), count the number of * islands. An island is surrounded by water and is formed by connecting * adjacent lands horizontally or vertically. You may assume all four edges of * the grid are all surrounded by water. * * Example 1: * * * Input: * 11110 * 11010 * 11000 * 00000 * * Output: 1 * * * Example 2: * * * Input: * 11000 * 11000 * 00100 * 00011 * * Output: 3 * */ class Solution { public: void depth(vector<vector<char>> &grid, int row, int col) { if (row >= grid.size() || col >= grid[0].size() || row < 0 || col < 0 || grid[row][col] == '0') { return; } grid[row][col] = '0'; depth(grid, row - 1, col); depth(grid, row + 1, col); depth(grid, row, col - 1); depth(grid, row, col + 1); } int numIslands(vector<vector<char>> &grid) { int num = 0; for (int i = 0; i < grid.size(); i++) { for (int j = 0; j < grid[0].size(); j++) { if (grid[i][j] == '1') { num++; depth(grid, i, j); } } } return num; } };
; =============================================================== ; Dec 2013 ; =============================================================== ; ; int obstack_align_to(struct obstack *ob, size_t alignment) ; ; Set the obstack fence to the next address aligned to alignment. ; Any following allocations or further growth will begin at this ; address. Does not close the currently growing object. ; ; =============================================================== SECTION code_clib SECTION code_alloc_obstack PUBLIC obstack_align_to_callee EXTERN asm_obstack_align_to obstack_align_to_callee: pop hl pop bc ex (sp),hl jp asm_obstack_align_to
;------------------------------------------------------------------------------------------------------- ; Copyright (C) Microsoft. All rights reserved. ; Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. ;------------------------------------------------------------------------------------------------------- ;Var arm64_CallFunction(JavascriptFunction* function, CallInfo info, Var* values, JavascriptMethod entryPoint) ; ; This method should be called as follows ; varResult = arm64_CallFunction((JavascriptFunction*)function, args.Info, args.Values, entryPoint); ; ; and makes the following call ; return entryPoint(function, info, values[0], values[1], ..., values[n-2], values[n-1]); ; where n = info.Count >= 6 (so we know we'll need to pass 6 values in registers). ; ; ARM64 calling convention is: ; x0 parameter 1 = function ; x1 parameter 2 = info ; x2 values[0] ; x3 values[1] ; x4 values[2] ; x5 values[3] ; x6 values[4] ; x7 values[5] ; [sp+0] values[6] ; [sp+8] values[7] ; ... ; ; (8 bytes) return values are passed in x0. ; ; Since the 1st two parameters are the same for this method and the entry point, we don't need to touch them. ; OPT 2 ; disable listing #include "ksarm64.h" #if defined(_CONTROL_FLOW_GUARD) IMPORT __guard_check_icall_fptr #endif OPT 1 ; re-enable listing TTL Lib\Runtime\Library\arm64\arm64_CallFunction.asm EXPORT arm64_CallFunction IMPORT __chkstk ;See \\cpvsbuild\drops\dev11\Main\raw\current\sources\vctools\crt\crtw32\startup\arm64\chkstk.asm. TEXTAREA NESTED_ENTRY arm64_CallFunction PROLOG_SAVE_REG_PAIR fp, lr, #-16! ; save fp/lr (implicitly saves SP in FP) mov x15, x3 ; copy entry point to x15 #if _CONTROL_FLOW_GUARD adrp x16, __guard_check_icall_fptr ; ldr x16, [x16, __guard_check_icall_fptr]; fetch address of guard check handler blr x16 ; call it #endif and x4, x1, #0xffffff ; clear high order 40 bits of x1(callInfo) ; (clean callInfo.Flags which shares same word as callInfo.Count) subs x5, x4, #6 ; more than 6 parameters? bgt StackAlloc ; if so, allocate necessary stack adr x5, CopyZero ; get bottom of parameter copy loop sub x5, x5, x4, lsl #2 ; compute address of where to start br x5 ; branch there CopyAll ldr x7, [x2, #40] ; load remaining 6 registers here ldr x6, [x2, #32] ; ldr x5, [x2, #24] ; ldr x4, [x2, #16] ; ldr x3, [x2, #8] ; ldr x2, [x2, #0] ; CopyZero blr x15 ; call saved entry point mov sp, fp ; explicitly restore sp EPILOG_RESTORE_REG_PAIR fp, lr, #16! ; restore FP/LR EPILOG_RETURN ; return StackAlloc add x15, x5, #1 ; round (param_count - 6) up by 1 lsr x15, x15, #1 ; divide by 2 bl __chkstk ; ensure stack is allocated sub sp, sp, x15, lsl #4 ; then allocate the space add x6, x2, #48 ; use x6 = source mov x7, sp ; use x7 = dest CopyLoop subs x5, x5, #1 ; decrement param count by 1 ldr x4, [x6], #8 ; read param from source str x4, [x7], #8 ; store param to dest bne CopyLoop ; loop until all copied mov x15, x3 ; recover entry point in x15 b CopyAll ; jump ahead to copy all 6 remaining parameters NESTED_END END
; A122653: a(n) = 10*a(n-1) - a(n-2) with a(0)=0, a(1)=6. ; 0,6,60,594,5880,58206,576180,5703594,56459760,558894006,5532480300,54765908994,542126609640,5366500187406,53122875264420,525862252456794,5205499649303520,51529134240578406,510085842756480540,5049329293324226994,49983207090485789400,494782741611533667006,4897844209024850880660,48483659348636975139594,479938749277344900515280,4750903833424812030013206,47029099584970775399616780,465540092016282941966154594,4608371820577858644261929160,45618178113762303500653137006,451573409317045176362269440900 mov $2,2 lpb $0 sub $0,1 add $1,$2 add $2,$1 add $1,$2 add $2,$1 add $2,$1 lpe mov $0,$1
BITS 32 org 0x7c00 push 0xFF ; 0x7BFC: 0xFF mov dword eax, 0x80 mov edx, esp test byte [edx], al pushfd ; 0x7BF8: 10000000 (0x80) (sign flag) push 0xFF ; 0x7BF4: 0xFF mov dword eax, 0 mov edx, esp test dword [edx], eax pushfd ; 0x7BF0: 01000000 (0x40) (zero flag) mov dword eax, 0xFF test byte al, 0x80 pushfd ; 0x7BEC: 10000000 (0x80) (sign flag) mov dword eax, 0 test byte al, 0x80 pushfd ; 0x7BE8: 01000000 (0x40) (zero flag) mov dword eax, 0xF0000000 test dword eax, 0x80000000 pushfd ; 0x7BE4: 10000000 (0x80) (sign flag) mov dword eax, 0 test dword eax, 0xFFFFFFFF pushfd ; 0x7BE0: 01000000 (0x40) (zero flag) jmp 0
// // pde_solver.hpp // PDE_solver // // Created by Florian on 08/01/2020. // Copyright © 2020 Florian. All rights reserved. // #ifndef pde_solver_hpp #define pde_solver_hpp #include <stdio.h> #include <iostream> #include <vector> #include <math.h> #include "matrix.hpp" #include "Option.hpp" #include "Payoff.h" #include "pde.hpp" namespace Solve { class BS_Solver { public: //BS_Solver(); BS_Solver(BS_PDE* _pde, double _theta, std::size_t _space_dim, std::size_t _time_dim, double _S0, double _maturity); void calculate_parameters(); void set_initial_conditions(); virtual std::vector<double> boundary_increment(const double& t); virtual std::vector<double> forward_coefficient(const double& temp, const size_t& i = 0); virtual std::vector<double> present_coefficient(const double& temp, const size_t& i = 0); virtual std::vector<double> backward_coefficient(const double& temp, const size_t& i = 0); dauphine::matrix transition_matrix(const double& temp, const size_t& i = 0); virtual void Crout_Algo_Resolution(); std::vector<double> LU_compute( dauphine::matrix& L, dauphine::matrix& U, const std::vector<double>& b); std::vector<double> get_option_payoff(); std::vector<double> get_S_grid(); std::vector<double> get_price_curve(); double get_price(const double& S); double compute_delta(const double& S); std::vector<double> compute_delta(); double compute_gamma(const double& S); std::vector<double> compute_gamma(); double compute_theta(const double& S); std::vector<double> compute_theta(); std::vector<double> compute_vega(); double compute_vega(const double& S); private: BS_PDE* pde; double theta; double S0; double x_max; double x_min; double dx; std::size_t space_dim; std::vector<double> x_values; std::vector<double> S_values; double dt; double maturity; std::size_t time_dim; std::string l; std::string r; std::vector<double> option_payoff; std::vector<double> old_result; std::vector<double> new_result; bool resolved; std::vector<double> vega; }; class Exo_Solver : public BS_Solver { public: Exo_Solver(Exo_PDE* _pde, double _theta, std::size_t _space_dim, std::size_t _time_dim, double _S0, double _maturity); std::vector<double> forward_coefficient(const double& temp, const size_t& i); std::vector<double> present_coefficient(const double& temp, const size_t& i); std::vector<double> backward_coefficient(const double& temp, const size_t& i); std::vector<double> boundary_increment(const size_t& i); void Crout_Algo_Resolution(); private: Exo_PDE* pde; double theta; double S0; double x_max; double x_min; double dx; std::size_t space_dim; std::vector<double> x_values; std::vector<double> S_values; double dt; double maturity; std::size_t time_dim; std::string l; std::string r; std::vector<double> option_payoff; std::vector<double> old_result; std::vector<double> new_result; bool resolved; //std::vector<double> vega; }; } #endif /* pde_solver_hpp */
db 0 ; 341 DEX NO db 43, 80, 65, 35, 50, 35 ; hp atk def spd sat sdf db WATER, WATER ; type db 205 ; catch rate db 111 ; base exp db NO_ITEM, NO_ITEM ; items db GENDER_F50 ; gender ratio db 100 ; unknown 1 db 15 ; step cycles to hatch db 5 ; unknown 2 INCBIN "gfx/pokemon/hoenn/corphish/front.dimensions" db 0, 0, 0, 0 ; padding db GROWTH_FLUCTUATING ; growth rate dn EGG_WATER_1, EGG_WATER_3 ; egg groups ; tm/hm learnset tmhm ; end