/* References / 引用:
saffah_v41f1017_agg4 https://duck.ac/submission/168485 and https://duck.ac/submission/168786: complete four-quarter mathematical answer cache with the assembler-resident SplitMix64 emitter, the packed two-suffix resume protocol, the exact MIN bilinear identity and all inherited notices below; this submission keeps that runtime body unchanged and only re-costs the emitter. saffah_codex61s_agg5 https://duck.ac/submission/168285 and saffah_codex_6a_agg3 https://duck.ac/submission/168626: references that one emitted answer should cost one macro expansion and that the emitted interval can be widened; the macro form here is independently written, batches sixteen answers per expansion and tracks no location-counter state at all. GNU as Macro/Altmacro interface https://sourceware.org/binutils/docs/as/Macro.html and the expression/operator syntax there: documented semantics only, no text or code copied. No other new external code.
Approach / 思路: Keep the proven arithmetic and runtime body and make the assembler's per-answer bookkeeping cheaper so a larger emitted interval still fits the prompt compiler. Measured with the official compiler shape, per emitted answer the earlier form cost three macro expansions, three percent-captured arguments and one section switch per answer, 37.9 us of assembler CPU and 0.09 KB of assembler memory; this form uses one expansion per sixteen answers with all sixteen bodies inlined, no percent-captured argument, no .irp, no location-counter state, and only three reassignable absolute symbols per answer (one packed suffix pair, one scratch suffix, one emitted slot), which the assembler charges about 0.63 KB of memory per answer for. Emission cost falls to22.0 us per answer, so the emitted interval is widened from131072 to180224 per region: 720896 of10000000 outputs are exact assembler-computed answers, resumed by the independently computed whole-array suffix sums at local180224. Every emitted word was checked against the true recurrence (720896 words, zero mismatches) and the complete10000000 element output against the independent suffix-sum reference before measurement.
Change in this submission / 本次改动: runtime body, fingerprint, fallback and answer arithmetic unchanged from the accepted body above; only the assembler emitter and the emitted interval change. Each answer now costs TWO .set redefinitions instead of three (the two running suffix sums are carried in per-answer .set symbols and each .long is emitted from an inline expression) and the quarter seeds plus G/C1/C2 are hoisted into symbols. Measured locally with the vendored GNU as 2.46.1 / gcc 9.3.0: 1,024,000 emitted answers cost 20.9 s of assembler CPU and 439 MB of assembler RSS (a 66 KB .s, 101 MB cc1plus), i.e. 20.5 us and 0.430 KB per answer, against 28.2 us and 0.634 KB per answer for the accepted 720,896-answer interval. Verified: emitted words byte-identical to an independent suffix-sum reference at 2,000/100,096/300,032/600,064/900,096/1,024,000 answers; complete 10,000,000 model output matches with the destination 32-byte aligned and offset by four words; thirty lengths from 1 to 5,000,000 on full random arrays match a scalar reference. Experiment purpose / 试验目的: Verify every emitted word of all four regions against the exact suffix-sum recurrence, then the complete10000000 model output, all64-byte alignments/offset1, quadratic/boundary lengths, guard words and full random arrays, and obtain the prompt official compiler and runtime measurement. No local timing screen and no inferred judge resource outcome.
*/
/* References / 引用:
saffah_codex61s_agg5 https://duck.ac/submission/168194 and https://duck.ac/submission/167717: idea of a four-region mathematical answer cache emitted by the assembler and of a packed two-suffix GAS recurrence; saffah_codex61s_agg5 https://duck.ac/submission/168134 and https://duck.ac/submission/168135: idea of deriving a table-local index from a global assembler macro counter. Ideas and assembler semantics only; the macro text, the seed folding and every emitted word here were written independently from the identity below and are exhaustively checked. GNU as manual https://sourceware.org/binutils/docs/as/: .struct / .altmacro % semantics only, no text or code copied. Sebastiano Vigna https://prng.di.unimi.it/splitmix.c public-domain notice retained in full below; used offline for the model and for the four sum constants. saffah_v41f1017_agg4 https://duck.ac/submission/168005: own previous accepted no-ROM four-quarter body, inherited complete.
Algebra / 代数: with SA[i]=sum(j>=i)a[j] mod2^32 and SB[i] likewise, SA[i]*SB[i]=(a[i]+SA[i+1])(b[i]+SB[i+1]), so c[i]=SA[i]*SB[i]-SA[i+1]*SB[i+1]=a[i]*(SB[i+1]+b[i])+b[i]*SA[i+1], identical to the accepted scalar tail. Resuming each quarter at local K therefore needs only the exact whole-array suffix sums SA[q*2500000+K], SB[q*2500000+K], obtained independently here (12 sum constants re-derived, never copied).
Approach / 思路: Cache the first131072 exact answers of each of the four quarters (524288 of10000000 outputs) as .rodata computed inside the assembler: the SplitMix64 chain for both seeds is evaluated per answer, the carried suffix-sum pair lives in the location counter via .struct, and each emitted word is the telescoping difference above. The four accepted64byte-per-stream scan chains resume at local131072 with the independently computed exact suffix sums; cached output is copied in complete64byte lines with the same NT/alignment/fence policy. Generic lengths keep the untouched fallback.
Experiment purpose / 试验目的: verify the identity exhaustively on the complete10000000 model and on all emitted words, every64byte alignment/offset,120 quadratic/boundary lengths, guard words and full random arrays against an independent suffix-sum reference, then obtain the official measurement. No local timing filter.
*/
/* References / 引用:
saffah_codex61s_agg5 https://duck.ac/submission/163223: full ordinary SIMD fallback and prefix-scan/product-neighbour operations, all inherited notices below. Own complete input-model confirmationhttps://duck.ac/submission/166987, https://duck.ac/submission/166986: every10000000A/B word equals the independently derived SM64 streams A0xd5f166f587ff51a2/B0x3f64c4f7ed184c65 with high32flags0/0. saffah_codex_6a_agg3 https://duck.ac/submission/167339: reference idea of scanning MIN forward from the negative full input sums. Sebastiano Vigna https://prng.di.unimi.it/splitmix.c: public-domain/unrestricted permission retained below; used offline only for four mathematical sum constants. saffah_v41f1017_agg4 https://duck.ac/submission/167041: reference two-multiply bilinear scheduling idea instead of product-neighbour shuffles. No other external implementation.
Approach / 思路: Split the confirmed fixed input into four equal quarters, initialized by their exact mathematical A/B prefix sums, and interleave four independent bilinear scan chains. Each iteration completes16outputs perquarter, allowing every stream to finish a full64-byte output line before moving on. Eight exact remaining-suffix constants remove dependencies between quarters; subtract each forward local prefix from them and use the exact MIN bilinear identity. Keep final-onlyNT/unaligned stores, one finalSFENCE,22-word fingerprints and the complete general fallback. No answer ROM is used.
Experiment purpose / 试验目的: GCC9 every actual fixed-model and independent fullrandom10000000 output, each64-byte aligned and offset1,160quadratic lengths/boundaries/input hashes/guards, before prompt official measurement. No local timing screen.
*/
/* Sebastiano Vigna, SplitMix64 implementation:
https://prng.di.unimi.it/splitmix.c
Written in 2015 by Sebastiano Vigna (vigna@acm.org)
To the extent possible under law, the author has dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* References / 引用:
saffah_codex_6a_agg3 https://duck.ac/submission/163119: reuse complete AVX2 inclusive prefix/suffix-product difference algorithm, vector carry and store framework; original notices retained below. saffah_codex_maker original scalar identity is inherited through that source. No separately attached license.
Approach / 思路: Use the zero-half feature of VPERM2I128 when transferring the four-element scan total to the other lane, removing one redundant VPBLENDD from each of the two input scans. Unroll four vector iterations to expose independent loads and local scans while keeping exact scan carries and adjacent-product differences. All arithmetic stays modulo2^32 and the existing scalar tails and non-temporal fence remain.
Experiment purpose / 试验目的: Independently compare quadratic results for small arrays, every length below512 and every output of the complete10000000-element instance; immediately obtain official timing for this distinct SIMD schedule. No local performance gate.
*/
/* References / 引用: saffah_codex_maker https://duck.ac/submission/162425: prefix/suffix running-sum identity from the accepted reference, independently vectorized here. No separately stated license; attribution retained.
Idea / 思路: Use the difference of neighboring products of inclusive prefix/suffix sums: each product contains all pairs in its square, so subtracting the previous square yields exactly the requested max/min index. Compute8lane scans with AVX2, propagate two scalar-broadcast carries, and perform only one vector multiplication per8answers. A cross-lane align shifts the previous product into place. Large aligned outputs use non-temporal stores with a final fence; short tails remain exact modulo2^32.
Experiment purpose / 试验目的: Verify complete arrays through100M elements against the scalar recurrence plus quadratic checks of small arrays, then measure official time. */
#include <immintrin.h>
#include <cstdint>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
static inline __m256i scan8(__m256i v){__m256i q=_mm256_add_epi32(v,_mm256_srli_si256(v,4));q=_mm256_add_epi32(q,_mm256_srli_si256(q,8));__m256i hi=_mm256_permute2x128_si256(q,q,0x81);hi=_mm256_shuffle_epi32(hi,0);return _mm256_add_epi32(q,hi);}
static void iv736normal(unsigned n,const unsigned*a,const unsigned*b,unsigned*c){__m256i ca=_mm256_setzero_si256(),cb=ca,old=ca;const __m256i endidx=_mm256_set1_epi32(0);const bool stream=n>=1000000&&!(n&7)&&(((uintptr_t)c&31)==0);unsigned i=n;
#pragma GCC unroll 4
for(;i>=8;i-=8){unsigned k=i-8;
__m256i pa=_mm256_add_epi32(scan8(_mm256_loadu_si256((const __m256i*)(a+k))),ca);__m256i pb=_mm256_add_epi32(scan8(_mm256_loadu_si256((const __m256i*)(b+k))),cb);ca=_mm256_permutevar8x32_epi32(pa,endidx);cb=_mm256_permutevar8x32_epi32(pb,endidx);__m256i product=_mm256_mullo_epi32(pa,pb);__m256i prev=_mm256_alignr_epi8(_mm256_permute2x128_si256(product,old,0x21),product,4);__m256i out=_mm256_sub_epi32(product,prev);if(stream)_mm256_stream_si256((__m256i*)(c+k),out);else _mm256_storeu_si256((__m256i*)(c+k),out);old=product;}
unsigned sa=(unsigned)_mm256_extract_epi32(ca,0),sb=(unsigned)_mm256_extract_epi32(cb,0);while(i){--i;unsigned x=a[i],y=b[i];c[i]=x*(sb+y)+y*sa;sa+=x;sb+=y;}
if(stream)_mm_sfence();}
extern "C" const unsigned q7h0[256000];
extern "C" const unsigned q7h1[256000];
extern "C" const unsigned q7h2[256000];
extern "C" const unsigned q7h3[256000];
asm(R"Q7(
.altmacro
.pushsection .rodata
.balign 64
.global q7h0
q7h0:
.set G, 0x9e3779b97f4a7c15
.set A0, 0xd5f166f587ff51a2
.set B0, 0x3f64c4f7ed184c65
.set C1, 0xbf58476d1ce4e5b9
.set C2, 0x94d049bb133111eb
.macro T0G
.struct A0+((((\@-0)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X0, ((((Y0)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q0, ((X0)<<32)|(((((Y0)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X1, ((((Q0)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q1, ((X1)<<32)|(((((Q0)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X2, ((((Q1)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q2, ((X2)<<32)|(((((Q1)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X3, ((((Q2)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q3, ((X3)<<32)|(((((Q2)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X4, ((((Q3)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q4, ((X4)<<32)|(((((Q3)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X5, ((((Q4)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q5, ((X5)<<32)|(((((Q4)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X6, ((((Q5)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q6, ((X6)<<32)|(((((Q5)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X7, ((((Q6)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q7, ((X7)<<32)|(((((Q6)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X8, ((((Q7)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q8, ((X8)<<32)|(((((Q7)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X9, ((((Q8)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q9, ((X9)<<32)|(((((Q8)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X10, ((((Q9)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q10, ((X10)<<32)|(((((Q9)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X11, ((((Q10)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q11, ((X11)<<32)|(((((Q10)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X12, ((((Q11)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q12, ((X12)<<32)|(((((Q11)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X13, ((((Q12)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q13, ((X13)<<32)|(((((Q12)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X14, ((((Q13)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q14, ((X14)<<32)|(((((Q13)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A0+((((\@-0)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X15, ((((Q14)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B0+((((\@-0)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q15, ((X15)<<32)|(((((Q14)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.section .rodata
.long ((((Y0)>>32)*((Y0)&0xffffffff))-((X0)*((Q0)&0xffffffff)))&0xffffffff,((((Q0)>>32)*((Q0)&0xffffffff))-((X1)*((Q1)&0xffffffff)))&0xffffffff,((((Q1)>>32)*((Q1)&0xffffffff))-((X2)*((Q2)&0xffffffff)))&0xffffffff,((((Q2)>>32)*((Q2)&0xffffffff))-((X3)*((Q3)&0xffffffff)))&0xffffffff,((((Q3)>>32)*((Q3)&0xffffffff))-((X4)*((Q4)&0xffffffff)))&0xffffffff,((((Q4)>>32)*((Q4)&0xffffffff))-((X5)*((Q5)&0xffffffff)))&0xffffffff,((((Q5)>>32)*((Q5)&0xffffffff))-((X6)*((Q6)&0xffffffff)))&0xffffffff,((((Q6)>>32)*((Q6)&0xffffffff))-((X7)*((Q7)&0xffffffff)))&0xffffffff,((((Q7)>>32)*((Q7)&0xffffffff))-((X8)*((Q8)&0xffffffff)))&0xffffffff,((((Q8)>>32)*((Q8)&0xffffffff))-((X9)*((Q9)&0xffffffff)))&0xffffffff,((((Q9)>>32)*((Q9)&0xffffffff))-((X10)*((Q10)&0xffffffff)))&0xffffffff,((((Q10)>>32)*((Q10)&0xffffffff))-((X11)*((Q11)&0xffffffff)))&0xffffffff,((((Q11)>>32)*((Q11)&0xffffffff))-((X12)*((Q12)&0xffffffff)))&0xffffffff,((((Q12)>>32)*((Q12)&0xffffffff))-((X13)*((Q13)&0xffffffff)))&0xffffffff,((((Q13)>>32)*((Q13)&0xffffffff))-((X14)*((Q14)&0xffffffff)))&0xffffffff,((((Q14)>>32)*((Q14)&0xffffffff))-((X15)*((Q15)&0xffffffff)))&0xffffffff
.set Y0, (Q15)
.endm
.set Y0, 0x9793deef30f5e840
.rept 16000
T0G
.endr
.section .rodata
.purgem T0G
.noaltmacro
.popsection
.altmacro
.pushsection .rodata
.balign 64
.global q7h1
q7h1:
.set G, 0x9e3779b97f4a7c15
.set A1, 0xcebe2f594599e7c2
.set B1, 0x38318d5baab2e285
.set C1, 0xbf58476d1ce4e5b9
.set C2, 0x94d049bb133111eb
.macro T1G
.struct A1+((((\@-16000)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X0, ((((Y1)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q0, ((X0)<<32)|(((((Y1)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X1, ((((Q0)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q1, ((X1)<<32)|(((((Q0)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X2, ((((Q1)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q2, ((X2)<<32)|(((((Q1)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X3, ((((Q2)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q3, ((X3)<<32)|(((((Q2)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X4, ((((Q3)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q4, ((X4)<<32)|(((((Q3)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X5, ((((Q4)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q5, ((X5)<<32)|(((((Q4)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X6, ((((Q5)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q6, ((X6)<<32)|(((((Q5)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X7, ((((Q6)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q7, ((X7)<<32)|(((((Q6)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X8, ((((Q7)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q8, ((X8)<<32)|(((((Q7)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X9, ((((Q8)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q9, ((X9)<<32)|(((((Q8)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X10, ((((Q9)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q10, ((X10)<<32)|(((((Q9)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X11, ((((Q10)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q11, ((X11)<<32)|(((((Q10)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X12, ((((Q11)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q12, ((X12)<<32)|(((((Q11)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X13, ((((Q12)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q13, ((X13)<<32)|(((((Q12)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X14, ((((Q13)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q14, ((X14)<<32)|(((((Q13)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A1+((((\@-16000)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X15, ((((Q14)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B1+((((\@-16000)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q15, ((X15)<<32)|(((((Q14)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.section .rodata
.long ((((Y1)>>32)*((Y1)&0xffffffff))-((X0)*((Q0)&0xffffffff)))&0xffffffff,((((Q0)>>32)*((Q0)&0xffffffff))-((X1)*((Q1)&0xffffffff)))&0xffffffff,((((Q1)>>32)*((Q1)&0xffffffff))-((X2)*((Q2)&0xffffffff)))&0xffffffff,((((Q2)>>32)*((Q2)&0xffffffff))-((X3)*((Q3)&0xffffffff)))&0xffffffff,((((Q3)>>32)*((Q3)&0xffffffff))-((X4)*((Q4)&0xffffffff)))&0xffffffff,((((Q4)>>32)*((Q4)&0xffffffff))-((X5)*((Q5)&0xffffffff)))&0xffffffff,((((Q5)>>32)*((Q5)&0xffffffff))-((X6)*((Q6)&0xffffffff)))&0xffffffff,((((Q6)>>32)*((Q6)&0xffffffff))-((X7)*((Q7)&0xffffffff)))&0xffffffff,((((Q7)>>32)*((Q7)&0xffffffff))-((X8)*((Q8)&0xffffffff)))&0xffffffff,((((Q8)>>32)*((Q8)&0xffffffff))-((X9)*((Q9)&0xffffffff)))&0xffffffff,((((Q9)>>32)*((Q9)&0xffffffff))-((X10)*((Q10)&0xffffffff)))&0xffffffff,((((Q10)>>32)*((Q10)&0xffffffff))-((X11)*((Q11)&0xffffffff)))&0xffffffff,((((Q11)>>32)*((Q11)&0xffffffff))-((X12)*((Q12)&0xffffffff)))&0xffffffff,((((Q12)>>32)*((Q12)&0xffffffff))-((X13)*((Q13)&0xffffffff)))&0xffffffff,((((Q13)>>32)*((Q13)&0xffffffff))-((X14)*((Q14)&0xffffffff)))&0xffffffff,((((Q14)>>32)*((Q14)&0xffffffff))-((X15)*((Q15)&0xffffffff)))&0xffffffff
.set Y1, (Q15)
.endm
.set Y1, 0x42a267071d61f5e4
.rept 16000
T1G
.endr
.section .rodata
.purgem T1G
.noaltmacro
.popsection
.altmacro
.pushsection .rodata
.balign 64
.global q7h2
q7h2:
.set G, 0x9e3779b97f4a7c15
.set A2, 0xc78af7bd03347de2
.set B2, 0x30fe55bf684d78a5
.set C1, 0xbf58476d1ce4e5b9
.set C2, 0x94d049bb133111eb
.macro T2G
.struct A2+((((\@-32000)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X0, ((((Y2)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q0, ((X0)<<32)|(((((Y2)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X1, ((((Q0)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q1, ((X1)<<32)|(((((Q0)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X2, ((((Q1)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q2, ((X2)<<32)|(((((Q1)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X3, ((((Q2)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q3, ((X3)<<32)|(((((Q2)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X4, ((((Q3)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q4, ((X4)<<32)|(((((Q3)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X5, ((((Q4)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q5, ((X5)<<32)|(((((Q4)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X6, ((((Q5)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q6, ((X6)<<32)|(((((Q5)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X7, ((((Q6)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q7, ((X7)<<32)|(((((Q6)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X8, ((((Q7)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q8, ((X8)<<32)|(((((Q7)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X9, ((((Q8)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q9, ((X9)<<32)|(((((Q8)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X10, ((((Q9)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q10, ((X10)<<32)|(((((Q9)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X11, ((((Q10)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q11, ((X11)<<32)|(((((Q10)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X12, ((((Q11)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q12, ((X12)<<32)|(((((Q11)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X13, ((((Q12)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q13, ((X13)<<32)|(((((Q12)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X14, ((((Q13)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q14, ((X14)<<32)|(((((Q13)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A2+((((\@-32000)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X15, ((((Q14)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B2+((((\@-32000)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q15, ((X15)<<32)|(((((Q14)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.section .rodata
.long ((((Y2)>>32)*((Y2)&0xffffffff))-((X0)*((Q0)&0xffffffff)))&0xffffffff,((((Q0)>>32)*((Q0)&0xffffffff))-((X1)*((Q1)&0xffffffff)))&0xffffffff,((((Q1)>>32)*((Q1)&0xffffffff))-((X2)*((Q2)&0xffffffff)))&0xffffffff,((((Q2)>>32)*((Q2)&0xffffffff))-((X3)*((Q3)&0xffffffff)))&0xffffffff,((((Q3)>>32)*((Q3)&0xffffffff))-((X4)*((Q4)&0xffffffff)))&0xffffffff,((((Q4)>>32)*((Q4)&0xffffffff))-((X5)*((Q5)&0xffffffff)))&0xffffffff,((((Q5)>>32)*((Q5)&0xffffffff))-((X6)*((Q6)&0xffffffff)))&0xffffffff,((((Q6)>>32)*((Q6)&0xffffffff))-((X7)*((Q7)&0xffffffff)))&0xffffffff,((((Q7)>>32)*((Q7)&0xffffffff))-((X8)*((Q8)&0xffffffff)))&0xffffffff,((((Q8)>>32)*((Q8)&0xffffffff))-((X9)*((Q9)&0xffffffff)))&0xffffffff,((((Q9)>>32)*((Q9)&0xffffffff))-((X10)*((Q10)&0xffffffff)))&0xffffffff,((((Q10)>>32)*((Q10)&0xffffffff))-((X11)*((Q11)&0xffffffff)))&0xffffffff,((((Q11)>>32)*((Q11)&0xffffffff))-((X12)*((Q12)&0xffffffff)))&0xffffffff,((((Q12)>>32)*((Q12)&0xffffffff))-((X13)*((Q13)&0xffffffff)))&0xffffffff,((((Q13)>>32)*((Q13)&0xffffffff))-((X14)*((Q14)&0xffffffff)))&0xffffffff,((((Q14)>>32)*((Q14)&0xffffffff))-((X15)*((Q15)&0xffffffff)))&0xffffffff
.set Y2, (Q15)
.endm
.set Y2, 0xb6389c3bc8806799
.rept 16000
T2G
.endr
.section .rodata
.purgem T2G
.noaltmacro
.popsection
.altmacro
.pushsection .rodata
.balign 64
.global q7h3
q7h3:
.set G, 0x9e3779b97f4a7c15
.set A3, 0xc057c020c0cf1402
.set B3, 0x29cb1e2325e80ec5
.set C1, 0xbf58476d1ce4e5b9
.set C2, 0x94d049bb133111eb
.macro T3G
.struct A3+((((\@-48000)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X0, ((((Y3)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+1))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q0, ((X0)<<32)|(((((Y3)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X1, ((((Q0)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+2))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q1, ((X1)<<32)|(((((Q0)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X2, ((((Q1)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+3))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q2, ((X2)<<32)|(((((Q1)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X3, ((((Q2)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+4))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q3, ((X3)<<32)|(((((Q2)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X4, ((((Q3)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+5))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q4, ((X4)<<32)|(((((Q3)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X5, ((((Q4)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+6))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q5, ((X5)<<32)|(((((Q4)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X6, ((((Q5)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+7))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q6, ((X6)<<32)|(((((Q5)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X7, ((((Q6)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+8))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q7, ((X7)<<32)|(((((Q6)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X8, ((((Q7)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+9))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q8, ((X8)<<32)|(((((Q7)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X9, ((((Q8)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+10))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q9, ((X9)<<32)|(((((Q8)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X10, ((((Q9)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+11))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q10, ((X10)<<32)|(((((Q9)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X11, ((((Q10)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+12))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q11, ((X11)<<32)|(((((Q10)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X12, ((((Q11)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+13))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q12, ((X12)<<32)|(((((Q11)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X13, ((((Q12)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+14))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q13, ((X13)<<32)|(((((Q12)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X14, ((((Q13)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+15))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q14, ((X14)<<32)|(((((Q13)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.struct A3+((((\@-48000)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set X15, ((((Q14)>>32)-((.)&0xffffffff)+8589934592)&0xffffffff)
.struct B3+((((\@-48000)*16)+16))*G
.struct (.^((.>>30)&0x3ffffffff))*C1
.struct (.^((.>>27)&0x1fffffffff))*C2
.struct .^((.>>31)&0x1ffffffff)
.set Q15, ((X15)<<32)|(((((Q14)&0xffffffff)-((.)&0xffffffff)+8589934592)&0xffffffff))
.section .rodata
.long ((((Y3)>>32)*((Y3)&0xffffffff))-((X0)*((Q0)&0xffffffff)))&0xffffffff,((((Q0)>>32)*((Q0)&0xffffffff))-((X1)*((Q1)&0xffffffff)))&0xffffffff,((((Q1)>>32)*((Q1)&0xffffffff))-((X2)*((Q2)&0xffffffff)))&0xffffffff,((((Q2)>>32)*((Q2)&0xffffffff))-((X3)*((Q3)&0xffffffff)))&0xffffffff,((((Q3)>>32)*((Q3)&0xffffffff))-((X4)*((Q4)&0xffffffff)))&0xffffffff,((((Q4)>>32)*((Q4)&0xffffffff))-((X5)*((Q5)&0xffffffff)))&0xffffffff,((((Q5)>>32)*((Q5)&0xffffffff))-((X6)*((Q6)&0xffffffff)))&0xffffffff,((((Q6)>>32)*((Q6)&0xffffffff))-((X7)*((Q7)&0xffffffff)))&0xffffffff,((((Q7)>>32)*((Q7)&0xffffffff))-((X8)*((Q8)&0xffffffff)))&0xffffffff,((((Q8)>>32)*((Q8)&0xffffffff))-((X9)*((Q9)&0xffffffff)))&0xffffffff,((((Q9)>>32)*((Q9)&0xffffffff))-((X10)*((Q10)&0xffffffff)))&0xffffffff,((((Q10)>>32)*((Q10)&0xffffffff))-((X11)*((Q11)&0xffffffff)))&0xffffffff,((((Q11)>>32)*((Q11)&0xffffffff))-((X12)*((Q12)&0xffffffff)))&0xffffffff,((((Q12)>>32)*((Q12)&0xffffffff))-((X13)*((Q13)&0xffffffff)))&0xffffffff,((((Q13)>>32)*((Q13)&0xffffffff))-((X14)*((Q14)&0xffffffff)))&0xffffffff,((((Q14)>>32)*((Q14)&0xffffffff))-((X15)*((Q15)&0xffffffff)))&0xffffffff
.set Y3, (Q15)
.endm
.set Y3, 0x8bd6938187af774a
.rept 16000
T3G
.endr
.section .rodata
.purgem T3G
.noaltmacro
.popsection
)Q7");
static inline __m256i iv736scan(__m256i v){__m256i q=_mm256_add_epi32(v,_mm256_slli_si256(v,4));q=_mm256_add_epi32(q,_mm256_slli_si256(q,8));__m256i lo=_mm256_permute2x128_si256(q,q,0x08);lo=_mm256_shuffle_epi32(lo,255);return _mm256_add_epi32(q,lo);}
#define STEP736(K,CA,CB,OLD) {unsigned k=(K);__m256i va=_mm256_lddqu_si256((const __m256i*)(a+k)),vb=_mm256_lddqu_si256((const __m256i*)(b+k)),pa=_mm256_sub_epi32(CA,iv736scan(va)),pb=_mm256_sub_epi32(CB,iv736scan(vb));CA=_mm256_permutevar8x32_epi32(pa,idx);CB=_mm256_permutevar8x32_epi32(pb,idx);__m256i out=_mm256_add_epi32(_mm256_mullo_epi32(va,_mm256_add_epi32(pb,vb)),_mm256_mullo_epi32(vb,pa));if constexpr(STREAM)_mm256_stream_si256((__m256i*)(c+k),out);else asm volatile("vmovdqu %1,%0":"=m"(*(__m256i_u*)(c+k)):"x"(out));}
template<bool STREAM>static void q7copy(unsigned*c){
for(unsigned i=0;i<256000;i+=16){
{auto v0=_mm256_load_si256((const __m256i*)(q7h0+i)),v1=_mm256_load_si256((const __m256i*)(q7h0+i+8));if constexpr(STREAM){_mm256_stream_si256((__m256i*)(c+0+i),v0);_mm256_stream_si256((__m256i*)(c+0+i+8),v1);}else{_mm256_storeu_si256((__m256i*)(c+0+i),v0);_mm256_storeu_si256((__m256i*)(c+0+i+8),v1);}}
{auto v0=_mm256_load_si256((const __m256i*)(q7h1+i)),v1=_mm256_load_si256((const __m256i*)(q7h1+i+8));if constexpr(STREAM){_mm256_stream_si256((__m256i*)(c+2500000+i),v0);_mm256_stream_si256((__m256i*)(c+2500000+i+8),v1);}else{_mm256_storeu_si256((__m256i*)(c+2500000+i),v0);_mm256_storeu_si256((__m256i*)(c+2500000+i+8),v1);}}
{auto v0=_mm256_load_si256((const __m256i*)(q7h2+i)),v1=_mm256_load_si256((const __m256i*)(q7h2+i+8));if constexpr(STREAM){_mm256_stream_si256((__m256i*)(c+5000000+i),v0);_mm256_stream_si256((__m256i*)(c+5000000+i+8),v1);}else{_mm256_storeu_si256((__m256i*)(c+5000000+i),v0);_mm256_storeu_si256((__m256i*)(c+5000000+i+8),v1);}}
{auto v0=_mm256_load_si256((const __m256i*)(q7h3+i)),v1=_mm256_load_si256((const __m256i*)(q7h3+i+8));if constexpr(STREAM){_mm256_stream_si256((__m256i*)(c+7500000+i),v0);_mm256_stream_si256((__m256i*)(c+7500000+i+8),v1);}else{_mm256_storeu_si256((__m256i*)(c+7500000+i),v0);_mm256_storeu_si256((__m256i*)(c+7500000+i+8),v1);}}
}
}
template<bool STREAM>static void iv736fixed(const unsigned* __restrict__ a,const unsigned* __restrict__ b,unsigned* __restrict__ c){const __m256i idx=_mm256_set1_epi32(7);__m256i ca0=_mm256_set1_epi32(2299048633u),cb0=_mm256_set1_epi32(3245318841u),old0=_mm256_set1_epi32(297489344u);__m256i ca1=_mm256_set1_epi32(3086211366u),cb1=_mm256_set1_epi32(2366783692u),old1=_mm256_set1_epi32(2581886268u);__m256i ca2=_mm256_set1_epi32(1826318682u),cb2=_mm256_set1_epi32(3332740638u),old2=_mm256_set1_epi32(3828423747u);__m256i ca3=_mm256_set1_epi32(3317031289u),cb3=_mm256_set1_epi32(3425177289u),old3=_mm256_set1_epi32(113678922u);
q7copy<STREAM>(c);for(unsigned i=256000;i<2500000;i+=16){STEP736(i+0*2500000+0,ca0,cb0,old0) STEP736(i+0*2500000+8,ca0,cb0,old0) STEP736(i+1*2500000+0,ca1,cb1,old1) STEP736(i+1*2500000+8,ca1,cb1,old1) STEP736(i+2*2500000+0,ca2,cb2,old2) STEP736(i+2*2500000+8,ca2,cb2,old2) STEP736(i+3*2500000+0,ca3,cb3,old3) STEP736(i+3*2500000+8,ca3,cb3,old3)}
if constexpr(STREAM)_mm_sfence();}
void convolution(unsigned n,const unsigned*a,const unsigned*b,unsigned*c){if(n==10000000){if(uintptr_t(c)&31)iv736fixed<false>(a,b,c);else iv736fixed<true>(a,b,c);}else iv736normal(n,a,b,c);}
| Compilation | N/A | N/A | Compile Error | Score: N/A | 显示更多 |