interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / src / cudapp_om_ar_foldh.c

306 lines · 18009 bytes Raw Blame History
1#if defined(__GNUC__)
2#pragma GCC diagnostic push
3#pragma GCC diagnostic ignored "-Wunused-function"
4#pragma GCC diagnostic ignored "-Wunused-parameter"
5#pragma GCC diagnostic ignored "-Wmisleading-indentation"
6#endif
7/* Emitted by Omega Bridge. GNU C11, POSIX. Scalars use canonical 64-bit bits. */
8#include <stdint.h>
9#include <stddef.h>
10#include <unistd.h>
11#include <errno.h>
12#include <setjmp.h>
13static _Thread_local jmp_buf o_jmp;
14static _Thread_local int o_busy;
15static __attribute__((noreturn)) void o_trap(int c){if(o_busy)longjmp(o_jmp,c);_exit(100+c);}
16static _Thread_local unsigned o_depth;
17static void o_enter(void){if(++o_depth>128)o_trap(6);}
18static uint64_t o_leave(uint64_t v){--o_depth;return v;}
19static unsigned o_width(unsigned t){static const unsigned w[]={0,1,8,16,32,64,8,16,32,64};return w[t];}
20static __int128 o_value(unsigned t,uint64_t v){return t>=6 && v>>63 ? (__int128)v-(((__int128)1)<<64):(__int128)v;}
21static uint64_t o_norm(unsigned t,__int128 v,int code){unsigned w=o_width(t);if(t>=6){__int128 m=((__int128)1)<<(w-1);if(v< -m||v>=m)o_trap(code);}else {if(v<0||(__uint128_t)v>=(((__uint128_t)1)<<w))o_trap(code);}return (uint64_t)v;}
22static uint64_t o_cast(unsigned t,unsigned s,uint64_t a){return o_norm(t,o_value(s,a),5);}
23static uint64_t o_op(unsigned op,unsigned t,uint64_t a,uint64_t b){
24 __int128 x=o_value(t,a),y=o_value(t,b),z=0;unsigned w=o_width(t);uint64_t mask=w==64?UINT64_MAX:(((uint64_t)1<<w)-1);
25 if(op>=6&&op<=11){switch(op){case 6:return x==y;case 7:return x!=y;case 8:return x<y;case 9:return x<=y;case 10:return x>y;default:return x>=y;}}
26 if(op==12)return a&b;if(op==13)return a|b;if(op==14)return a^b;
27 if(op==15||op==16){if(b>=w)o_trap(7);if(op==15)return t>=6?o_norm(t,x*(((__int128)1)<<b),1):(a<<b)&mask;if(t<6)return a>>b;if(!b)return a;return (a>>b)|((a>>63)?(UINT64_MAX<<(64-b)):0);}
28 if(op==17){if(t<6)return (0-a)&mask;return o_norm(t,-x,1);}if(op==18)return t==1?!a:(t>=6?~a:(~a)&mask);
29 if(op==4||op==5){if(!b)o_trap(2);z=op==4?x/y:x%y;return t>=6?o_norm(t,z,1):(uint64_t)z;}
30 if(t<6){if(op==1)return (a+b)&mask;if(op==2)return (a-b)&mask;return (a*b)&mask;}
31 if(op==1)z=x+y;if(op==2)z=x-y;if(op==3)z=x*y;return o_norm(t,z,1);
32}
33static uint64_t o_get(const void *p,uint64_t n,uint64_t i,unsigned t){if(i>=n)o_trap(3);unsigned w=t==11?32:t==12?64:o_width(t);const uint8_t *b=(const uint8_t*)p+i*(w/8);uint64_t v=0;if(w==8)v=b[0];else if(w==16){uint16_t x;__builtin_memcpy(&x,b,2);v=x;}else if(w==32){uint32_t x;__builtin_memcpy(&x,b,4);v=x;}else if(w==64)__builtin_memcpy(&v,b,8);if(t>=6&&t<=9&&w<64&&(v>> (w-1)))v|=UINT64_MAX<<w;return v;}
34static void o_put(void *p,uint64_t n,uint64_t i,uint64_t v,unsigned t){if(i>=n)o_trap(3);unsigned w=t==11?32:t==12?64:o_width(t);if(t<11)o_norm(t,o_value(t,v),5);uint8_t *b=(uint8_t*)p+i*(w/8);if(w==8)b[0]=(uint8_t)v;else if(w==16){uint16_t x=(uint16_t)v;__builtin_memcpy(b,&x,2);}else if(w==32){uint32_t x=(uint32_t)v;__builtin_memcpy(b,&x,4);}else if(w==64)__builtin_memcpy(b,&v,8);}
35static void o_fill(void *p,uint64_t n,uint64_t v,unsigned t){for(uint64_t i=0;i<n;i++)o_put(p,n,i,v,t);}
36static uint64_t o_io(unsigned op,uint64_t fd,const void *p,uint64_t n,uint64_t off,uint64_t len){if(off>n||len>n-off)o_trap(3);int f=(int)o_value(8,fd);ssize_t r=op==1?read(f,(uint8_t*)p+off,(size_t)len):write(f,(const uint8_t*)p+off,(size_t)len);return r<0?(uint64_t)(-(int64_t)errno):(uint64_t)r;}
37static int o_valid(unsigned t,uint64_t v){unsigned w=o_width(t);__int128 x=o_value(t,v);__int128 m=((__int128)1)<<(t>=6?w-1:w);return t>=6?x>=-m&&x<m:x>=0&&x<m;}
38static int o_buf(const void *p,uint64_t n,uint64_t want,unsigned t){uintptr_t a=(uintptr_t)p;uint64_t z=t==11?4:t==12?8:o_width(t)/8;return p&&n==want&&a%z==0&&n<=UINTPTR_MAX/z&&a<=UINTPTR_MAX-n*z;}
39static int o_overlap(const void *a,uint64_t an,const void *b,uint64_t bn){uintptr_t x=(uintptr_t)a,y=(uintptr_t)b;return x<y+bn&&y<x+an;}
40/* Omega Bridge runtime views: numeric extents are capacities; * is unsized. */
41static int o_rbuf(const void *p,uint64_t n,uint64_t want,unsigned t){uintptr_t a=(uintptr_t)p;uint64_t z=t==11?4:o_width(t)/8;if(n>UINTPTR_MAX/z)return 0;if(want&&n>want)return 0;if(!n)return 1;if(!p)return 0;return a%z==0&&a<=UINTPTR_MAX-n*z;}
42static int o_rover(const void *a,uint64_t an,const void *b,uint64_t bn){return an&&bn&&o_overlap(a,an,b,bn);}
43#if !defined(__BYTE_ORDER__) || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
44#error seeded C profile requires little-endian storage
45#endif
46#include <float.h>
47#include <fenv.h>
48#if FLT_RADIX != 2 || FLT_MANT_DIG != 24 || FLT_MAX_EXP != 128 || DBL_MANT_DIG != 53 || DBL_MAX_EXP != 1024 || FLT_EVAL_METHOD != 0
49#error unsupported binary32 or binary64 environment
50#endif
51#if defined(__FAST_MATH__)
52#error fast math is not a supported Omega environment
53#endif
54static int o_fnan(unsigned t,uint64_t a){return t==11?((a>>23&255)==255&&(a&UINT64_C(0x7fffff))!=0):((a>>52&2047)==2047&&(a&UINT64_C(0xfffffffffffff))!=0);}
55static uint64_t o_fpn(unsigned t,uint64_t a,uint64_t b,uint64_t r){uint64_t q=t==11?UINT64_C(0x400000):UINT64_C(0x8000000000000);if(!o_fnan(t,r))return r;if(o_fnan(t,a)&&!(a&q))return a|q;if(o_fnan(t,b)&&!(b&q))return b|q;if(o_fnan(t,a))return a;if(o_fnan(t,b))return b;return t==11?UINT64_C(0x7fc00000):UINT64_C(0x7ff8000000000000);}
56static float o_sqrt32(float a){float r;
57#if defined(__aarch64__)
58__asm__("fsqrt %s0, %s1":"=w"(r):"w"(a));
59#elif defined(__x86_64__)
60__asm__("sqrtss %1, %0":"=x"(r):"x"(a));
61#else
62#error unsupported seeded float sqrt target
63#endif
64return r;}
65static double o_sqrt64(double a){double r;
66#if defined(__aarch64__)
67__asm__("fsqrt %d0, %d1":"=w"(r):"w"(a));
68#elif defined(__x86_64__)
69__asm__("sqrtsd %1, %0":"=x"(r):"x"(a));
70#else
71#error unsupported seeded float sqrt target
72#endif
73return r;}
74static uint64_t o_fp(unsigned op,unsigned t,uint64_t a,uint64_t b){if(t==11){uint32_t ua=(uint32_t)a,ub=(uint32_t)b,ur;float x,y;volatile float z;__builtin_memcpy(&x,&ua,4);__builtin_memcpy(&y,&ub,4);switch(op){case 1:z=x+y;break;case 2:z=x-y;break;case 3:z=x*y;break;case 4:z=x/y;break;case 6:return x==y;case 7:return x!=y;case 8:return x<y;case 9:return x<=y;case 10:return x>y;case 11:return x>=y;case 17:return ua^UINT32_C(0x80000000);case 19:return ua&UINT32_C(0x7fffffff);case 20:z=o_sqrt32(x);break;default:__builtin_trap();}__builtin_memcpy(&ur,(const void*)&z,4);return o_fpn(11,ua,ub,ur);}uint64_t ur;double x,y;volatile double z;__builtin_memcpy(&x,&a,8);__builtin_memcpy(&y,&b,8);switch(op){case 1:z=x+y;break;case 2:z=x-y;break;case 3:z=x*y;break;case 4:z=x/y;break;case 6:return x==y;case 7:return x!=y;case 8:return x<y;case 9:return x<=y;case 10:return x>y;case 11:return x>=y;case 17:return a^UINT64_C(0x8000000000000000);case 19:return a&UINT64_C(0x7fffffffffffffff);case 20:z=o_sqrt64(x);break;default:__builtin_trap();}__builtin_memcpy(&ur,(const void*)&z,8);return o_fpn(12,a,b,ur);}
75static uint64_t o_fcv(unsigned t,unsigned s,uint64_t a){uint32_t u=(uint32_t)a;float f;double x;if(s==t)return a;if(s<11){if(t==11){volatile float z=s>=6?(float)(int64_t)a:(float)a;__builtin_memcpy(&u,(const void*)&z,4);return u;}volatile double z=s>=6?(double)(int64_t)a:(double)a;__builtin_memcpy(&a,(const void*)&z,8);return a;}if(t==12){if(o_fnan(11,a))return (uint64_t)(u>>31)<<63|UINT64_C(0x7ff8000000000000)|(uint64_t)(u&UINT32_C(0x7fffff))<<29;__builtin_memcpy(&f,&u,4);volatile double z=f;__builtin_memcpy(&a,(const void*)&z,8);return a;}if(t==11){if(o_fnan(12,a))return (a>>63)<<31|UINT64_C(0x7fc00000)|(a>>29&UINT64_C(0x3fffff));__builtin_memcpy(&x,&a,8);volatile float z=(float)x;__builtin_memcpy(&u,(const void*)&z,4);return u;}if(s==11){__builtin_memcpy(&f,&u,4);x=f;}else __builtin_memcpy(&x,&a,8);if(x!=x)return 0;unsigned w=o_width(t);if(t>=6){double m=(double)((uint64_t)1<<(w-1));if(x>=m)return ((uint64_t)1<<(w-1))-1;if(x<-m)return (uint64_t)0-((uint64_t)1<<(w-1));return (uint64_t)(int64_t)x;}if(x<1.0)return 0;if(x>=(w==64?18446744073709551616.0:(double)((uint64_t)1<<w)))return w==64?UINT64_MAX:((uint64_t)1<<w)-1;return (uint64_t)x;}
76#include <string.h>
77static uint64_t o_arg32(float v){uint32_t b;memcpy(&b,&v,4);return b;}
78static uint64_t o_arg64(double v){uint64_t b;memcpy(&b,&v,8);return b;}
79static uint64_t f0(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n);
80static uint64_t f1(uint64_t v0, const void *v1, uint64_t v1_n, void *v2, uint64_t v2_n);
81static uint64_t f2(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n);
82static uint64_t f3(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n);
83static uint64_t f4(uint64_t v0);
84static uint64_t f5(uint64_t v0);
85static uint64_t f6(uint64_t v0);
86static uint64_t f7(uint64_t v0, uint64_t v1);
87static uint64_t f8(uint64_t v0, uint64_t v1);
88static uint64_t f9(uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5);
89static uint64_t f10(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n);
90static uint64_t f0(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n){
91o_enter();
92uint64_t __attribute__((unused)) v2=0ULL;
93uint64_t __attribute__((unused)) v3=0ULL;
94{
95uint64_t v4=0;
96uint64_t k1=281474976710656ULL;
97for(;o_op(8,5, v4, k1);v4=o_op(1,5, v4,1)){
98if(({uint64_t _a=v3;uint64_t _b=v0_n;o_op(11, 5, _a,_b);})){
99break;
100}
101{
102uint64_t v5=0;
103uint64_t k2=65536ULL;
104for(;o_op(8,5, v5, k2);v5=o_op(1,5, v5,1)){
105uint64_t __attribute__((unused)) v6=({uint64_t _a=v3;uint64_t _b=v5;o_op(1, 5, _a,_b);});
106if(({uint64_t _a=v6;uint64_t _b=v0_n;o_op(11, 5, _a,_b);})){
107break;
108}
109if(({uint64_t _a=({uint64_t p0=o_cast(4, 2, o_get(v0, v0_n, v6, 2));f6(p0);});uint64_t _b=0ULL;o_op(7, 4, _a,_b);})){
110if(({uint64_t _a=v2;uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){
111{uint64_t _i=0ULL;uint64_t _v=v6;o_put(v1, v1_n, _i,_v,5);}
112}
113v2=({uint64_t _a=v2;uint64_t _b=1ULL;o_op(1, 5, _a,_b);});
114}
115}
116}
117v3=({uint64_t _a=v3;uint64_t _b=65536ULL;o_op(1, 5, _a,_b);});
118}
119}
120{uint64_t _i=1ULL;uint64_t _v=v2;o_put(v1, v1_n, _i,_v,5);}
121return o_leave(0ULL);
122}
123static uint64_t f1(uint64_t v0, const void *v1, uint64_t v1_n, void *v2, uint64_t v2_n){
124o_enter();
125if(({uint64_t _a=v1_n;uint64_t _b=v2_n;o_op(7, 5, _a,_b);})){
126return o_leave(1ULL);
127}
128uint64_t __attribute__((unused)) v3=0ULL;
129{
130uint64_t v4=0;
131uint64_t k1=281474976710656ULL;
132for(;o_op(8,5, v4, k1);v4=o_op(1,5, v4,1)){
133if(({uint64_t _a=v3;uint64_t _b=v1_n;o_op(11, 5, _a,_b);})){
134break;
135}
136{
137uint64_t v5=0;
138uint64_t k2=65536ULL;
139for(;o_op(8,5, v5, k2);v5=o_op(1,5, v5,1)){
140uint64_t __attribute__((unused)) v6=({uint64_t _a=v3;uint64_t _b=v5;o_op(1, 5, _a,_b);});
141if(({uint64_t _a=v6;uint64_t _b=v1_n;o_op(11, 5, _a,_b);})){
142break;
143}
144uint64_t __attribute__((unused)) v7=({uint64_t p0=o_cast(4, 3, o_get(v1, v1_n, v6, 3));uint64_t p1=o_cast(4, 5, v0);f7(p0, p1);});
145if(({uint64_t _a=({uint64_t _a=v7;uint64_t _b=32ULL;o_op(16, 5, _a,_b);});uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){
146return o_leave(1ULL);
147}
148{uint64_t _i=v6;uint64_t _v=o_cast(4, 5, v7);o_put(v2, v2_n, _i,_v,11);}
149}
150}
151v3=({uint64_t _a=v3;uint64_t _b=65536ULL;o_op(1, 5, _a,_b);});
152}
153}
154return o_leave(0ULL);
155}
156static uint64_t f2(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n){
157o_enter();
158if(({uint64_t _a=v0_n;uint64_t _b=v1_n;o_op(7, 5, _a,_b);})){
159return o_leave(1ULL);
160}
161uint64_t __attribute__((unused)) v2=0ULL;
162{
163uint64_t v3=0;
164uint64_t k1=281474976710656ULL;
165for(;o_op(8,5, v3, k1);v3=o_op(1,5, v3,1)){
166if(({uint64_t _a=v2;uint64_t _b=v0_n;o_op(11, 5, _a,_b);})){
167break;
168}
169{
170uint64_t v4=0;
171uint64_t k2=65536ULL;
172for(;o_op(8,5, v4, k2);v4=o_op(1,5, v4,1)){
173uint64_t __attribute__((unused)) v5=({uint64_t _a=v2;uint64_t _b=v4;o_op(1, 5, _a,_b);});
174if(({uint64_t _a=v5;uint64_t _b=v0_n;o_op(11, 5, _a,_b);})){
175break;
176}
177{uint64_t _i=v5;uint64_t _v=({uint64_t p0=o_get(v0, v0_n, v5, 11);uint64_t p1=64ULL;f8(p0, p1);});o_put(v1, v1_n, _i,_v,11);}
178}
179}
180v2=({uint64_t _a=v2;uint64_t _b=65536ULL;o_op(1, 5, _a,_b);});
181}
182}
183return o_leave(0ULL);
184}
185static uint64_t f3(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n){
186o_enter();
187if(({uint64_t _a=v0_n;uint64_t _b=v1_n;o_op(7, 5, _a,_b);})){
188return o_leave(1ULL);
189}
190uint64_t __attribute__((unused)) v2=0ULL;
191{
192uint64_t v3=0;
193uint64_t k1=281474976710656ULL;
194for(;o_op(8,5, v3, k1);v3=o_op(1,5, v3,1)){
195if(({uint64_t _a=v2;uint64_t _b=v0_n;o_op(11, 5, _a,_b);})){
196break;
197}
198{
199uint64_t v4=0;
200uint64_t k2=65536ULL;
201for(;o_op(8,5, v4, k2);v4=o_op(1,5, v4,1)){
202uint64_t __attribute__((unused)) v5=({uint64_t _a=v2;uint64_t _b=v4;o_op(1, 5, _a,_b);});
203if(({uint64_t _a=v5;uint64_t _b=v0_n;o_op(11, 5, _a,_b);})){
204break;
205}
206{uint64_t _i=v5;uint64_t _v=({uint64_t p0=({uint64_t _a=o_cast(4, 3, o_get(v0, v0_n, v5, 3));uint64_t _b=16ULL;o_op(15, 4, _a,_b);});uint64_t p1=64ULL;f8(p0, p1);});o_put(v1, v1_n, _i,_v,11);}
207}
208}
209v2=({uint64_t _a=v2;uint64_t _b=65536ULL;o_op(1, 5, _a,_b);});
210}
211}
212return o_leave(0ULL);
213}
214static uint64_t f4(uint64_t v0){
215o_enter();
216uint64_t __attribute__((unused)) v1=({uint64_t _a=v0;uint64_t _b=128ULL;o_op(12, 4, _a,_b);});
217uint64_t __attribute__((unused)) v2=({uint64_t _a=({uint64_t _a=v0;uint64_t _b=3ULL;o_op(16, 4, _a,_b);});uint64_t _b=15ULL;o_op(12, 4, _a,_b);});
218uint64_t __attribute__((unused)) v3=({uint64_t _a=v0;uint64_t _b=7ULL;o_op(12, 4, _a,_b);});
219if(({uint64_t _a=({uint64_t _a=v2;uint64_t _b=15ULL;o_op(6, 4, _a,_b);});uint64_t _b=({uint64_t _a=v3;uint64_t _b=7ULL;o_op(6, 4, _a,_b);});o_op(12, 1, _a,_b);})){
220return o_leave(2143289344ULL);
221}
222if(({uint64_t _a=v2;uint64_t _b=0ULL;o_op(6, 4, _a,_b);})){
223uint64_t __attribute__((unused)) v4=({uint64_t _a=o_fcv(11, 4, v3);uint64_t _b=({uint64_t _a=({uint64_t _a=127ULL;uint64_t _b=9ULL;o_op(2, 4, _a,_b);});uint64_t _b=23ULL;o_op(15, 4, _a,_b);});o_fp(3, 11, _a,_b);});
224if(({uint64_t _a=v1;uint64_t _b=0ULL;o_op(7, 4, _a,_b);})){
225return o_leave(({uint64_t _a=v4;uint64_t _b=({uint64_t _a=1ULL;uint64_t _b=31ULL;o_op(15, 4, _a,_b);});o_op(14, 4, _a,_b);}));
226}
227return o_leave(v4);
228}
229uint64_t __attribute__((unused)) v4=({uint64_t _a=({uint64_t _a=127ULL;uint64_t _b=23ULL;o_op(15, 4, _a,_b);});uint64_t _b=({uint64_t _a=o_fcv(11, 4, v3);uint64_t _b=1090519040ULL;o_fp(4, 11, _a,_b);});o_fp(1, 11, _a,_b);});
230uint64_t __attribute__((unused)) v5=({uint64_t _a=v4;uint64_t _b=({uint64_t _a=({uint64_t _a=120ULL;uint64_t _b=v2;o_op(1, 4, _a,_b);});uint64_t _b=23ULL;o_op(15, 4, _a,_b);});o_fp(3, 11, _a,_b);});
231if(({uint64_t _a=v1;uint64_t _b=0ULL;o_op(7, 4, _a,_b);})){
232return o_leave(({uint64_t _a=v5;uint64_t _b=({uint64_t _a=1ULL;uint64_t _b=31ULL;o_op(15, 4, _a,_b);});o_op(14, 4, _a,_b);}));
233}
234return o_leave(v5);
235}
236static uint64_t f5(uint64_t v0){
237o_enter();
238return o_leave(({uint64_t _a=({uint64_t _a=({uint64_t _a=v0;uint64_t _b=127ULL;o_op(12, 4, _a,_b);});uint64_t _b=20ULL;o_op(15, 4, _a,_b);});uint64_t _b=({uint64_t _a=({uint64_t _a=v0;uint64_t _b=128ULL;o_op(12, 4, _a,_b);});uint64_t _b=24ULL;o_op(15, 4, _a,_b);});o_op(13, 4, _a,_b);}));
239}
240static uint64_t f6(uint64_t v0){
241o_enter();
242if(({uint64_t _a=({uint64_t _a=v0;uint64_t _b=127ULL;o_op(12, 4, _a,_b);});uint64_t _b=127ULL;o_op(6, 4, _a,_b);})){
243return o_leave(1ULL);
244}
245return o_leave(0ULL);
246}
247static uint64_t f7(uint64_t v0, uint64_t v1){
248o_enter();
249uint64_t __attribute__((unused)) v2=({uint64_t _a=v0;uint64_t _b=16ULL;o_op(15, 4, _a,_b);});
250if(({uint64_t _a=({uint64_t _a=({uint64_t _a=v2;uint64_t _b=0;o_fp(19, 11, _a,_b);});uint64_t _b=2137108966ULL;o_fp(9, 11, _a,_b);});uint64_t _b=0;o_op(18, 1, _a,_b);})){
251return o_leave(({uint64_t _a=1ULL;uint64_t _b=32ULL;o_op(15, 5, _a,_b);}));
252}
253uint64_t __attribute__((unused)) v3=({uint64_t _a=({uint64_t _a=127ULL;uint64_t _b=56ULL;o_op(1, 4, _a,_b);});uint64_t _b=23ULL;o_op(15, 4, _a,_b);});
254if(({uint64_t _a=v1;uint64_t _b=0ULL;o_op(7, 4, _a,_b);})){
255v3=({uint64_t _a=127ULL;uint64_t _b=23ULL;o_op(15, 4, _a,_b);});
256}
257uint64_t __attribute__((unused)) v4=({uint64_t _a=v2;uint64_t _b=v3;o_fp(3, 11, _a,_b);});
258if(({uint64_t _a=({uint64_t _a=({uint64_t _a=v4;uint64_t _b=0;o_fp(19, 11, _a,_b);});uint64_t _b=2137108966ULL;o_fp(9, 11, _a,_b);});uint64_t _b=0;o_op(18, 1, _a,_b);})){
259return o_leave(({uint64_t _a=1ULL;uint64_t _b=32ULL;o_op(15, 5, _a,_b);}));
260}
261return o_leave(o_cast(5, 4, v4));
262}
263static uint64_t f8(uint64_t v0, uint64_t v1){
264o_enter();
265return o_leave(({uint64_t _a=v0;uint64_t _b=({uint64_t _a=({uint64_t _a=127ULL;uint64_t _b=v1;o_op(1, 4, _a,_b);});uint64_t _b=23ULL;o_op(15, 4, _a,_b);});o_fp(3, 11, _a,_b);}));
266}
267static uint64_t f9(uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5){
268o_enter();
269if(({uint64_t _a=v0;uint64_t _b=1ULL;o_op(6, 4, _a,_b);})){
270return o_leave(o_cast(5, 4, ({uint64_t p0=v1;f4(p0);})));
271}
272if(({uint64_t _a=v0;uint64_t _b=2ULL;o_op(6, 4, _a,_b);})){
273return o_leave(o_cast(5, 4, ({uint64_t p0=v1;f5(p0);})));
274}
275if(({uint64_t _a=v0;uint64_t _b=3ULL;o_op(6, 4, _a,_b);})){
276return o_leave(o_cast(5, 4, ({uint64_t p0=v1;f6(p0);})));
277}
278if(({uint64_t _a=v0;uint64_t _b=4ULL;o_op(6, 4, _a,_b);})){
279return o_leave(({uint64_t p0=v1;uint64_t p1=v2;f7(p0, p1);}));
280}
281if(({uint64_t _a=v0;uint64_t _b=5ULL;o_op(6, 4, _a,_b);})){
282return o_leave(o_cast(5, 4, ({uint64_t p0=v1;uint64_t p1=64ULL;f8(p0, p1);})));
283}
284if(({uint64_t _a=v0;uint64_t _b=6ULL;o_op(6, 4, _a,_b);})){
285return o_leave(o_cast(5, 4, ({uint64_t p0=({uint64_t _a=v1;uint64_t _b=16ULL;o_op(15, 4, _a,_b);});uint64_t p1=64ULL;f8(p0, p1);})));
286}
287return o_leave(({uint64_t _a=1ULL;uint64_t _b=32ULL;o_op(15, 5, _a,_b);}));
288}
289static uint64_t f10(const void *v0, uint64_t v0_n, void *v1, uint64_t v1_n){
290o_enter();
291return o_leave(({f3(v0, v0_n, v1, v1_n);}));
292}
293uint32_t omega_arfoldh(uint64_t *result, const void *p0, volatile uint64_t p0_n, void *p1, volatile uint64_t p1_n){
294 if(!o_buf(result,1,1,5))return 32;
295if(!o_rbuf(p0, p0_n,0, 3))return 32;
296 if(o_rover(result,8,p0, p0_n*2))return 32;
297if(!o_rbuf(p1, p1_n,0, 11))return 32;
298 if(o_rover(result,8,p1, p1_n*4))return 32;
299if(o_rover(p1, p1_n*4, p0, p0_n*2))return 32;
300 if(o_busy)return 33;
301 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f10(p0, p0_n, p1, p1_n);o_put(result,1,0,_result,5);}
302 o_busy=0;return (uint32_t)code;
303}
304#if defined(__GNUC__)
305#pragma GCC diagnostic pop
306#endif