Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/compat/nvml/libnvidia-ml.c # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / compat / nvml / libnvidia-ml.c` 887 lines · 49606 bytes Raw Blame History 1 /* GENERATED by omega-bridge cabi-1 from src/toc.om SHA256 `218214ab7dcc6658eed338bdd6347e2e26c23a34be259e601bef0689abf86821`; source SHA256 `d61c7ebf5f327f6a27baa0c42a4d29c1169b1852b7d74ffda23e74fbe96192cc`. */ 2 #if defined(__GNUC__) 3 #pragma GCC diagnostic push 4 #pragma GCC diagnostic ignored "-Wunused-function" 5 #pragma GCC diagnostic ignored "-Wunused-parameter" 6 #pragma GCC diagnostic ignored "-Wmisleading-indentation" 7 #endif 8 /* Emitted by Omega Bridge. GNU C11, POSIX. Scalars use canonical 64-bit bits. */ 9 #include 10 #include 11 #include 12 #include 13 #include 14 static _Thread_local jmp_buf o_jmp; 15 static _Thread_local int o_busy; 16 static __attribute__((noreturn)) void o_trap(int c){if(o_busy)longjmp(o_jmp,c);_exit(100+c);} 17 static _Thread_local unsigned o_depth; 18 static void o_enter(void){if(++o_depth>128)o_trap(6);} 19 static uint64_t o_leave(uint64_t v){--o_depth;return v;} 20 static unsigned o_width(unsigned t){static const unsigned w[]={0,1,8,16,32,64,8,16,32,64};return w[t];} 21 static __int128 o_value(unsigned t,uint64_t v){return t>=6 && v>>63 ? (__int128)v-(((__int128)1)<<64):(__int128)v;} 22 static 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)<=6&&op<=11){switch(op){case 6:return x==y;case 7:return x!=y;case 8:return xy;default:return x>=y;}} 27 if(op==12)return a&b;if(op==13)return a|b;if(op==14)return a^b; 28 if(op==15||op==16){if(b>=w)o_trap(7);if(op==15)return t>=6?o_norm(t,x*(((__int128)1)<>b;if(!b)return a;return (a>>b)|((a>>63)?(UINT64_MAX<<(64-b)):0);} 29 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); 30 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;} 31 if(t<6){if(op==1)return (a+b)&mask;if(op==2)return (a-b)&mask;return (a*b)&mask;} 32 if(op==1)z=x+y;if(op==2)z=x-y;if(op==3)z=x*y;return o_norm(t,z,1); 33 } 34 static 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<=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);} 36 static void o_fill(void *p,uint64_t n,uint64_t v,unsigned t){for(uint64_t i=0;in||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;} 38 static 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=0&&x 45 #include 46 #if FLT_RADIX != 2 || FLT_MANT_DIG != 24 || FLT_MAX_EXP != 128 || DBL_MANT_DIG != 53 || DBL_MAX_EXP != 1024 || FLT_EVAL_METHOD != 0 47 #error unsupported binary32 or binary64 environment 48 #endif 49 #if defined(__FAST_MATH__) 50 #error fast math is not a supported Omega environment 51 #endif 52 static 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);} 53 static 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);} 54 static float o_sqrt32(float a){float r; 55 #if defined(__aarch64__) 56 __asm__("fsqrt %s0, %s1":"=w"(r):"w"(a)); 57 #elif defined(__x86_64__) 58 __asm__("sqrtss %1, %0":"=x"(r):"x"(a)); 59 #else 60 #error unsupported seeded float sqrt target 61 #endif 62 return r;} 63 static double o_sqrt64(double a){double r; 64 #if defined(__aarch64__) 65 __asm__("fsqrt %d0, %d1":"=w"(r):"w"(a)); 66 #elif defined(__x86_64__) 67 __asm__("sqrtsd %1, %0":"=x"(r):"x"(a)); 68 #else 69 #error unsupported seeded float sqrt target 70 #endif 71 return r;} 72 static 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 xy;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 xy;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);} 73 static 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< 75 static uint64_t o_arg32(float v){uint32_t b;memcpy(&b,&v,4);return b;} 76 static uint64_t o_arg64(double v){uint64_t b;memcpy(&b,&v,8);return b;} 77 #include 78 static int o_span(uint64_t n,uint64_t o,uint64_t l){return o>n||l>n-o;} 79 typedef enum nvmlReturn_enum { 80 NVML_SUCCESS = 0, 81 NVML_ERROR_UNINITIALIZED = 1, 82 NVML_ERROR_INVALID_ARGUMENT = 2, 83 NVML_ERROR_NOT_SUPPORTED = 3, 84 NVML_ERROR_NO_PERMISSION = 4, 85 NVML_ERROR_ALREADY_INITIALIZED = 5, 86 NVML_ERROR_NOT_FOUND = 6, 87 NVML_ERROR_INSUFFICIENT_SIZE = 7, 88 NVML_ERROR_INSUFFICIENT_POWER = 8, 89 NVML_ERROR_DRIVER_NOT_LOADED = 9, 90 NVML_ERROR_TIMEOUT = 10, 91 NVML_ERROR_IRQ_ISSUE = 11, 92 NVML_ERROR_LIBRARY_NOT_FOUND = 12, 93 NVML_ERROR_FUNCTION_NOT_FOUND = 13, 94 NVML_ERROR_CORRUPTED_INFOROM = 14, 95 NVML_ERROR_GPU_IS_LOST = 15, 96 NVML_ERROR_RESET_REQUIRED = 16, 97 NVML_ERROR_OPERATING_SYSTEM = 17, 98 NVML_ERROR_LIB_RM_VERSION_MISMATCH = 18, 99 NVML_ERROR_IN_USE = 19, 100 NVML_ERROR_MEMORY = 20, 101 NVML_ERROR_NO_DATA = 21, 102 NVML_ERROR_VGPU_ECC_NOT_SUPPORTED = 22, 103 NVML_ERROR_INSUFFICIENT_RESOURCES = 23, 104 NVML_ERROR_FREQ_NOT_SUPPORTED = 24, 105 NVML_ERROR_ARGUMENT_VERSION_MISMATCH = 25, 106 NVML_ERROR_DEPRECATED = 26, 107 NVML_ERROR_NOT_READY = 27, 108 NVML_ERROR_GPU_NOT_FOUND = 28, 109 NVML_ERROR_INVALID_STATE = 29, 110 NVML_ERROR_RESET_TYPE_NOT_SUPPORTED = 30, 111 NVML_ERROR_UNKNOWN = 999 112 } nvmlReturn_t; 113 typedef enum nvmlTemperatureSensors_enum { 114 NVML_TEMPERATURE_GPU = 0, 115 NVML_TEMPERATURE_COUNT = 1 116 } nvmlTemperatureSensors_t; 117 typedef struct nvmlDevice_st *nvmlDevice_t; 118 typedef struct nvmlUtilization_st { 119 unsigned int gpu; 120 unsigned int memory; 121 } nvmlUtilization_t; 122 typedef struct nvmlMemory_st { 123 unsigned long long total; 124 unsigned long long free; 125 unsigned long long used; 126 } nvmlMemory_t; 127 typedef struct nvmlProcessInfo_v2_st { 128 unsigned int pid; 129 unsigned long long usedGpuMemory; 130 unsigned int gpuInstanceId; 131 unsigned int computeInstanceId; 132 } nvmlProcessInfo_v2_t, nvmlProcessInfo_t; 133 static pthread_mutex_t NvLock=PTHREAD_MUTEX_INITIALIZER; 134 static int o_in2(uint64_t v){switch(v){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 999:return 1;default:return 0;}} 135 static int o_in35(uint64_t v){switch(v){case 0:case 1:return 1;default:return 0;}} 136 struct nvmlDevice_st{uint64_t o_magic,o_index;}; 137 static struct nvmlDevice_st NvDevs[8]; 138 static uint64_t o_hi48(nvmlDevice_t o_d){uintptr_t a=(uintptr_t)o_d,b=(uintptr_t)NvDevs;if(a=sizeof NvDevs||(a-b)%sizeof NvDevs[0])return UINT64_MAX;uint64_t i=(a-b)/sizeof NvDevs[0];return NvDevs[i].o_magic==UINT64_C(0x4f6d656761484e44)&&NvDevs[i].o_index==i?i:UINT64_MAX;} 139 static nvmlDevice_t o_ho48(uint64_t i){NvDevs[i].o_magic=UINT64_C(0x4f6d656761484e44);NvDevs[i].o_index=i;return &NvDevs[i];} 140 _Static_assert(sizeof(nvmlUtilization_t)==8&&_Alignof(nvmlUtilization_t)==4,"record layout"); 141 _Static_assert(offsetof(nvmlUtilization_t,gpu)==0,"record layout"); 142 _Static_assert(offsetof(nvmlUtilization_t,memory)==4,"record layout"); 143 _Static_assert(sizeof(nvmlMemory_t)==24&&_Alignof(nvmlMemory_t)==8,"record layout"); 144 _Static_assert(offsetof(nvmlMemory_t,total)==0,"record layout"); 145 _Static_assert(offsetof(nvmlMemory_t,free)==8,"record layout"); 146 _Static_assert(offsetof(nvmlMemory_t,used)==16,"record layout"); 147 _Static_assert(sizeof(nvmlProcessInfo_v2_t)==24&&_Alignof(nvmlProcessInfo_v2_t)==8,"record layout"); 148 _Static_assert(offsetof(nvmlProcessInfo_v2_t,pid)==0,"record layout"); 149 _Static_assert(offsetof(nvmlProcessInfo_v2_t,usedGpuMemory)==8,"record layout"); 150 _Static_assert(offsetof(nvmlProcessInfo_v2_t,gpuInstanceId)==16,"record layout"); 151 _Static_assert(offsetof(nvmlProcessInfo_v2_t,computeInstanceId)==20,"record layout"); 152 static uint64_t NvS[128]; 153 static uint8_t NvB[83296] __attribute__((aligned(8))); 154 static uint64_t NvR[1]; 155 static uint8_t NvT[2048] __attribute__((aligned(8))); 156 static uint8_t NvO[96] __attribute__((aligned(8))); 157 static const char o_fb66[]="Unknown Error"; 158 uint32_t omega_nvml_step(uint64_t*,void*,uint64_t,void*,uint64_t); 159 uint32_t omega_nvml_errstr(uint64_t*,uint64_t,void*,uint64_t); 160 uint32_t omega2_nvrm_ioctl(uint64_t*,uint64_t,uint64_t,void*,uint64_t,void*,uint64_t); 161 uint32_t omega2_nvrm_open_file(uint64_t*,void*,uint64_t); 162 uint32_t omega2_nvrm_close_file(uint64_t*,uint64_t); 163 static uint64_t f0(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, uint64_t v2, void *v3, uint64_t v3_n, uint64_t v4); 164 static uint64_t f1(void *v0, uint64_t v0_n, uint64_t v1, void *v2, uint64_t v2_n, uint64_t v3); 165 static uint64_t f2(void *v0, uint64_t v0_n, uint64_t v1, uint64_t v2, void *v3, uint64_t v3_n, uint64_t v4, uint64_t v5); 166 static uint64_t f3(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, uint64_t v2); 167 static uint64_t f4(void *v0, uint64_t v0_n, uint64_t v1); 168 static uint64_t f5(void *v0, uint64_t v0_n, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5); 169 static uint64_t f6(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n); 170 static uint64_t f7(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n); 171 static uint64_t f8(void *v0, uint64_t v0_n, uint64_t v1, uint64_t v2, uint64_t v3); 172 static uint64_t f9(void *v0, uint64_t v0_n); 173 static uint64_t f10(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n, uint64_t v4); 174 static uint64_t f11(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 175 static uint64_t f12(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 176 static uint64_t f13(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 177 static uint64_t f14(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 178 static uint64_t f15(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n, uint64_t v4); 179 static uint64_t f16(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 180 static uint64_t f17(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 181 static uint64_t f18(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 182 static uint64_t f19(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n, uint64_t v4, uint64_t v5); 183 static uint64_t f20(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 184 static uint64_t f21(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 185 static uint64_t f22(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 186 static uint64_t f23(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n); 187 static uint64_t f0(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, uint64_t v2, void *v3, uint64_t v3_n, uint64_t v4){ 188 o_enter(); 189 if(o_span(v1_n,0,v2))o_trap(3); 190 if(o_span(v3_n,0,v4))o_trap(3); 191 return o_leave((uint64_t)omega_nvml_step((uint64_t*)v0,(uint64_t*)v1+0,v2,(uint8_t*)v3+0,v4)); 192 } 193 static uint64_t f1(void *v0, uint64_t v0_n, uint64_t v1, void *v2, uint64_t v2_n, uint64_t v3){ 194 o_enter(); 195 if(o_span(v2_n,0,v3))o_trap(3); 196 return o_leave((uint64_t)omega_nvml_errstr((uint64_t*)v0,v1,(uint8_t*)v2+0,v3)); 197 } 198 static uint64_t f2(void *v0, uint64_t v0_n, uint64_t v1, uint64_t v2, void *v3, uint64_t v3_n, uint64_t v4, uint64_t v5){ 199 o_enter(); 200 if(o_span(v3_n,0,v4))o_trap(3); 201 if(o_span(v3_n,4608,v5))o_trap(3); 202 return o_leave((uint64_t)omega2_nvrm_ioctl((uint64_t*)v0,v1,v2,(uint8_t*)v3+0,v4,(uint8_t*)v3+4608,v5)); 203 } 204 static uint64_t f3(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, uint64_t v2){ 205 o_enter(); 206 if(o_span(v1_n,4608,v2))o_trap(3); 207 return o_leave((uint64_t)omega2_nvrm_open_file((uint64_t*)v0,(uint8_t*)v1+4608,v2)); 208 } 209 static uint64_t f4(void *v0, uint64_t v0_n, uint64_t v1){ 210 o_enter(); 211 return o_leave((uint64_t)omega2_nvrm_close_file((uint64_t*)v0,v1)); 212 } 213 static uint64_t f5(void *v0, uint64_t v0_n, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5){ 214 o_enter(); 215 {uint64_t _i=0ULL;uint64_t _v=v1;o_put(v0, v0_n, _i,_v,5);} 216 {uint64_t _i=1ULL;uint64_t _v=v2;o_put(v0, v0_n, _i,_v,5);} 217 {uint64_t _i=2ULL;uint64_t _v=v3;o_put(v0, v0_n, _i,_v,5);} 218 {uint64_t _i=3ULL;uint64_t _v=v4;o_put(v0, v0_n, _i,_v,5);} 219 {uint64_t _i=4ULL;uint64_t _v=v5;o_put(v0, v0_n, _i,_v,5);} 220 return o_leave(0); 221 } 222 static uint64_t f6(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n){ 223 o_enter(); 224 uint64_t __attribute__((unused)) v3=o_get(v0, v0_n, 8ULL, 5); 225 {uint64_t _i=0ULL;uint64_t _v=0ULL;o_put(v2, v2_n, _i,_v,5);} 226 uint64_t __attribute__((unused)) v4=0ULL; 227 if(({uint64_t _a=({uint64_t _a=v3;uint64_t _b=0ULL;o_op(6, 5, _a,_b);});uint64_t _b=({uint64_t _a=v3;uint64_t _b=3ULL;o_op(10, 5, _a,_b);});o_op(13, 1, _a,_b);})){ 228 return o_leave(0ULL); 229 } 230 if(({uint64_t _a=v3;uint64_t _b=1ULL;o_op(6, 5, _a,_b);})){ 231 uint64_t __attribute__((unused)) v5=o_get(v0, v0_n, 11ULL, 5); 232 uint64_t __attribute__((unused)) v6=o_get(v0, v0_n, 12ULL, 5); 233 if(({uint64_t _a=({uint64_t _a=v5;uint64_t _b=4608ULL;o_op(10, 5, _a,_b);});uint64_t _b=({uint64_t _a=v6;uint64_t _b=55888ULL;o_op(10, 5, _a,_b);});o_op(13, 1, _a,_b);})){ 234 return o_leave(0ULL); 235 } 236 v4=({uint64_t p1=o_get(v0, v0_n, 9ULL, 5);uint64_t p2=o_get(v0, v0_n, 10ULL, 5);uint64_t p4=v5;uint64_t p5=v6;f2(v2, v2_n, p1, p2, v1, v1_n, p4, p5);}); 237 } 238 if(({uint64_t _a=v3;uint64_t _b=2ULL;o_op(6, 5, _a,_b);})){ 239 uint64_t __attribute__((unused)) v5=o_get(v0, v0_n, 13ULL, 5); 240 if(({uint64_t _a=({uint64_t _a=v5;uint64_t _b=0ULL;o_op(6, 5, _a,_b);});uint64_t _b=({uint64_t _a=v5;uint64_t _b=55888ULL;o_op(10, 5, _a,_b);});o_op(13, 1, _a,_b);})){ 241 return o_leave(0ULL); 242 } 243 v4=({uint64_t p2=v5;f3(v2, v2_n, v1, v1_n, p2);}); 244 } 245 if(({uint64_t _a=v3;uint64_t _b=3ULL;o_op(6, 5, _a,_b);})){ 246 v4=({uint64_t p1=o_get(v0, v0_n, 9ULL, 5);f4(v2, v2_n, p1);}); 247 } 248 {uint64_t _i=14ULL;uint64_t _v=o_get(v2, v2_n, 0ULL, 5);o_put(v0, v0_n, _i,_v,5);} 249 {uint64_t _i=15ULL;uint64_t _v=v4;o_put(v0, v0_n, _i,_v,5);} 250 return o_leave(1ULL); 251 } 252 static uint64_t f7(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n){ 253 o_enter(); 254 uint64_t __attribute__((unused)) v3=0ULL; 255 {uint64_t _i=22ULL;uint64_t _v=0ULL;o_put(v0, v0_n, _i,_v,5);} 256 { 257 uint64_t v4=0; 258 uint64_t k1=4096ULL; 259 for(;o_op(8,5, v4, k1);v4=o_op(1,5, v4,1)){ 260 {uint64_t _i=0ULL;uint64_t _v=1ULL;o_put(v2, v2_n, _i,_v,5);} 261 uint64_t __attribute__((unused)) v5=({uint64_t p2=128ULL;uint64_t p4=83296ULL;f0(v2, v2_n, v0, v0_n, p2, v1, v1_n, p4);}); 262 if(({uint64_t _a=({uint64_t _a=v5;uint64_t _b=0ULL;o_op(7, 5, _a,_b);});uint64_t _b=({uint64_t _a=o_get(v2, v2_n, 0ULL, 5);uint64_t _b=0ULL;o_op(7, 5, _a,_b);});o_op(13, 1, _a,_b);})){ 263 break; 264 } 265 if(({uint64_t _a=o_get(v0, v0_n, 8ULL, 5);uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 266 v3=1ULL; 267 break; 268 } 269 if(({uint64_t _a=({f6(v0, v0_n, v1, v1_n, v2, v2_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 270 break; 271 } 272 } 273 } 274 {uint64_t _i=22ULL;uint64_t _v=0ULL;o_put(v0, v0_n, _i,_v,5);} 275 return o_leave(v3); 276 } 277 static uint64_t f8(void *v0, uint64_t v0_n, uint64_t v1, uint64_t v2, uint64_t v3){ 278 o_enter(); 279 uint64_t __attribute__((unused)) v4=o_get(v0, v0_n, 7ULL, 5); 280 if(({uint64_t _a=v4;uint64_t _b=v1;o_op(10, 5, _a,_b);})){ 281 return o_leave(0ULL); 282 } 283 if(({uint64_t _a=({uint64_t _a=v4;uint64_t _b=0ULL;o_op(7, 5, _a,_b);});uint64_t _b=({uint64_t _a=v2;uint64_t _b=0ULL;o_op(6, 5, _a,_b);});o_op(12, 1, _a,_b);})){ 284 return o_leave(0ULL); 285 } 286 if(({uint64_t _a=o_get(v0, v0_n, 27ULL, 5);uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 287 if(({uint64_t _a=({uint64_t _a=v3;uint64_t _b=0ULL;o_op(6, 5, _a,_b);});uint64_t _b=({uint64_t _a=o_get(v0, v0_n, 5ULL, 5);uint64_t _b=4294967295ULL;o_op(10, 5, _a,_b);});o_op(13, 1, _a,_b);})){ 288 return o_leave(0ULL); 289 } 290 } 291 return o_leave(1ULL); 292 } 293 static uint64_t f9(void *v0, uint64_t v0_n){ 294 o_enter(); 295 uint64_t __attribute__((unused)) v1=o_get(v0, v0_n, 6ULL, 5); 296 if(({uint64_t _a=({uint64_t _a=v1;uint64_t _b=30ULL;o_op(9, 5, _a,_b);});uint64_t _b=({uint64_t _a=v1;uint64_t _b=999ULL;o_op(6, 5, _a,_b);});o_op(13, 1, _a,_b);})){ 297 return o_leave(v1); 298 } 299 return o_leave(999ULL); 300 } 301 static uint64_t f10(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n, uint64_t v4){ 302 o_enter(); 303 ({uint64_t p1=v4;uint64_t p2=0ULL;uint64_t p3=0ULL;uint64_t p4=0ULL;uint64_t p5=0ULL;f5(v1, v1_n, p1, p2, p3, p4, p5);}); 304 if(({uint64_t _a=({f7(v1, v1_n, v2, v2_n, v3, v3_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 305 return o_leave(0ULL); 306 } 307 if(({uint64_t _a=({uint64_t p1=0ULL;uint64_t p2=0ULL;uint64_t p3=0ULL;f8(v1, v1_n, p1, p2, p3);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 308 return o_leave(0ULL); 309 } 310 {uint64_t _i=0ULL;uint64_t _v=({f9(v1, v1_n);});o_put(v0, v0_n, _i,_v,5);} 311 return o_leave(0ULL); 312 } 313 static uint64_t f11(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 314 o_enter(); 315 return o_leave(({uint64_t p4=1ULL;f10(v0, v0_n, v1, v1_n, v2, v2_n, v3, v3_n, p4);})); 316 } 317 static uint64_t f12(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 318 o_enter(); 319 return o_leave(({uint64_t p4=2ULL;f10(v0, v0_n, v1, v1_n, v2, v2_n, v3, v3_n, p4);})); 320 } 321 static uint64_t f13(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 322 o_enter(); 323 uint64_t __attribute__((unused)) v4=o_get(v0, v0_n, 2ULL, 5); 324 ({uint64_t p1=3ULL;uint64_t p2=0ULL;uint64_t p3=v4;uint64_t p4=0ULL;uint64_t p5=0ULL;f5(v1, v1_n, p1, p2, p3, p4, p5);}); 325 if(({uint64_t _a=({f7(v1, v1_n, v2, v2_n, v3, v3_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 326 return o_leave(0ULL); 327 } 328 if(({uint64_t _a=({uint64_t p1=0ULL;uint64_t p2=0ULL;uint64_t p3=v4;f8(v1, v1_n, p1, p2, p3);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 329 return o_leave(0ULL); 330 } 331 if(({uint64_t _a=o_get(v1, v1_n, 27ULL, 5);uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 332 {uint64_t _i=3ULL;uint64_t _v=o_get(v1, v1_n, 5ULL, 5);o_put(v0, v0_n, _i,_v,5);} 333 {uint64_t _i=1ULL;uint64_t _v=1ULL;o_put(v0, v0_n, _i,_v,5);} 334 } 335 {uint64_t _i=0ULL;uint64_t _v=({f9(v1, v1_n);});o_put(v0, v0_n, _i,_v,5);} 336 return o_leave(0ULL); 337 } 338 static uint64_t f14(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 339 o_enter(); 340 ({uint64_t p1=4ULL;uint64_t p2=o_get(v0, v0_n, 2ULL, 5);uint64_t p3=o_get(v0, v0_n, 3ULL, 5);uint64_t p4=0ULL;uint64_t p5=0ULL;f5(v1, v1_n, p1, p2, p3, p4, p5);}); 341 if(({uint64_t _a=({f7(v1, v1_n, v2, v2_n, v3, v3_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 342 return o_leave(0ULL); 343 } 344 if(({uint64_t _a=({uint64_t p1=0ULL;uint64_t p2=0ULL;uint64_t p3=1ULL;f8(v1, v1_n, p1, p2, p3);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 345 return o_leave(0ULL); 346 } 347 uint64_t __attribute__((unused)) v4=({f9(v1, v1_n);}); 348 if(({uint64_t _a=v4;uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 349 uint64_t __attribute__((unused)) v5=0ULL; 350 if(({uint64_t _a=o_get(v1, v1_n, 27ULL, 5);uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 351 v5=o_get(v1, v1_n, 5ULL, 5); 352 } 353 if(({uint64_t _a=v5;uint64_t _b=8ULL;o_op(11, 5, _a,_b);})){ 354 return o_leave(0ULL); 355 } 356 if(({uint64_t _a=o_get(v0, v0_n, 3ULL, 5);uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 357 {uint64_t _i=4ULL;uint64_t _v=v5;o_put(v0, v0_n, _i,_v,5);} 358 {uint64_t _i=1ULL;uint64_t _v=1ULL;o_put(v0, v0_n, _i,_v,5);} 359 } 360 } 361 {uint64_t _i=0ULL;uint64_t _v=v4;o_put(v0, v0_n, _i,_v,5);} 362 return o_leave(0ULL); 363 } 364 static uint64_t f15(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n, uint64_t v4){ 365 o_enter(); 366 ({uint64_t p1=v4;uint64_t p2=o_get(v0, v0_n, 2ULL, 5);uint64_t p3=o_get(v0, v0_n, 3ULL, 5);uint64_t p4=o_get(v0, v0_n, 5ULL, 5);uint64_t p5=0ULL;f5(v1, v1_n, p1, p2, p3, p4, p5);}); 367 if(({uint64_t _a=({f7(v1, v1_n, v2, v2_n, v3, v3_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 368 return o_leave(0ULL); 369 } 370 if(({uint64_t _a=({uint64_t p1=o_get(v0, v0_n, 5ULL, 5);uint64_t p2=o_get(v0, v0_n, 3ULL, 5);uint64_t p3=0ULL;f8(v1, v1_n, p1, p2, p3);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 371 return o_leave(0ULL); 372 } 373 uint64_t __attribute__((unused)) v5=o_get(v1, v1_n, 7ULL, 5); 374 if(({uint64_t _a=v5;uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 375 {uint64_t _i=4ULL;uint64_t _v=v5;o_put(v0, v0_n, _i,_v,5);} 376 {uint64_t _i=1ULL;uint64_t _v=1ULL;o_put(v0, v0_n, _i,_v,5);} 377 } 378 {uint64_t _i=0ULL;uint64_t _v=({f9(v1, v1_n);});o_put(v0, v0_n, _i,_v,5);} 379 return o_leave(0ULL); 380 } 381 static uint64_t f16(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 382 o_enter(); 383 return o_leave(({uint64_t p4=5ULL;f15(v0, v0_n, v1, v1_n, v2, v2_n, v3, v3_n, p4);})); 384 } 385 static uint64_t f17(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 386 o_enter(); 387 return o_leave(({uint64_t p4=6ULL;f15(v0, v0_n, v1, v1_n, v2, v2_n, v3, v3_n, p4);})); 388 } 389 static uint64_t f18(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 390 o_enter(); 391 uint64_t __attribute__((unused)) v4=o_get(v0, v0_n, 4ULL, 5); 392 ({uint64_t p1=7ULL;uint64_t p2=o_get(v0, v0_n, 2ULL, 5);uint64_t p3=v4;uint64_t p4=o_get(v0, v0_n, 3ULL, 5);uint64_t p5=0ULL;f5(v1, v1_n, p1, p2, p3, p4, p5);}); 393 if(({uint64_t _a=({f7(v1, v1_n, v2, v2_n, v3, v3_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 394 return o_leave(0ULL); 395 } 396 if(({uint64_t _a=({uint64_t p1=0ULL;uint64_t p2=0ULL;uint64_t p3=v4;f8(v1, v1_n, p1, p2, p3);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 397 return o_leave(0ULL); 398 } 399 if(({uint64_t _a=o_get(v1, v1_n, 27ULL, 5);uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 400 {uint64_t _i=5ULL;uint64_t _v=o_get(v1, v1_n, 5ULL, 5);o_put(v0, v0_n, _i,_v,5);} 401 {uint64_t _i=1ULL;uint64_t _v=1ULL;o_put(v0, v0_n, _i,_v,5);} 402 } 403 {uint64_t _i=0ULL;uint64_t _v=({f9(v1, v1_n);});o_put(v0, v0_n, _i,_v,5);} 404 return o_leave(0ULL); 405 } 406 static uint64_t f19(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n, uint64_t v4, uint64_t v5){ 407 o_enter(); 408 ({uint64_t p1=v4;uint64_t p2=o_get(v0, v0_n, 2ULL, 5);uint64_t p3=o_get(v0, v0_n, 3ULL, 5);uint64_t p4=0ULL;uint64_t p5=0ULL;f5(v1, v1_n, p1, p2, p3, p4, p5);}); 409 if(({uint64_t _a=({f7(v1, v1_n, v2, v2_n, v3, v3_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 410 return o_leave(0ULL); 411 } 412 if(({uint64_t _a=({uint64_t p1=v5;uint64_t p2=o_get(v0, v0_n, 3ULL, 5);uint64_t p3=0ULL;f8(v1, v1_n, p1, p2, p3);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 413 return o_leave(0ULL); 414 } 415 uint64_t __attribute__((unused)) v6=o_get(v1, v1_n, 7ULL, 5); 416 if(({uint64_t _a=v6;uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 417 if(({uint64_t _a=v6;uint64_t _b=v5;o_op(7, 5, _a,_b);})){ 418 return o_leave(0ULL); 419 } 420 {uint64_t _i=1ULL;uint64_t _v=1ULL;o_put(v0, v0_n, _i,_v,5);} 421 } 422 {uint64_t _i=0ULL;uint64_t _v=({f9(v1, v1_n);});o_put(v0, v0_n, _i,_v,5);} 423 return o_leave(0ULL); 424 } 425 static uint64_t f20(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 426 o_enter(); 427 return o_leave(({uint64_t p4=8ULL;uint64_t p5=24ULL;f19(v0, v0_n, v1, v1_n, v2, v2_n, v3, v3_n, p4, p5);})); 428 } 429 static uint64_t f21(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 430 o_enter(); 431 return o_leave(({uint64_t p4=9ULL;uint64_t p5=8ULL;f19(v0, v0_n, v1, v1_n, v2, v2_n, v3, v3_n, p4, p5);})); 432 } 433 static uint64_t f22(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 434 o_enter(); 435 uint64_t __attribute__((unused)) v4=o_get(v0, v0_n, 3ULL, 5); 436 uint64_t __attribute__((unused)) v5=0ULL; 437 if(({uint64_t _a=v4;uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 438 v5=o_get(v0, v0_n, 4ULL, 5); 439 } 440 ({uint64_t p1=10ULL;uint64_t p2=o_get(v0, v0_n, 2ULL, 5);uint64_t p3=v4;uint64_t p4=v5;uint64_t p5=o_get(v0, v0_n, 5ULL, 5);f5(v1, v1_n, p1, p2, p3, p4, p5);}); 441 if(({uint64_t _a=({f7(v1, v1_n, v2, v2_n, v3, v3_n);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 442 return o_leave(0ULL); 443 } 444 if(({uint64_t _a=({uint64_t p1=({uint64_t _a=v5;uint64_t _b=24ULL;o_op(3, 5, _a,_b);});uint64_t p2=o_get(v0, v0_n, 5ULL, 5);uint64_t p3=v4;f8(v1, v1_n, p1, p2, p3);});uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 445 return o_leave(0ULL); 446 } 447 uint64_t __attribute__((unused)) v6=0ULL; 448 uint64_t __attribute__((unused)) v7=o_get(v1, v1_n, 7ULL, 5); 449 if(({uint64_t _a=v7;uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 450 if(({uint64_t _a=({uint64_t _a=v7;uint64_t _b=24ULL;o_op(5, 5, _a,_b);});uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 451 return o_leave(0ULL); 452 } 453 {uint64_t _i=6ULL;uint64_t _v=({uint64_t _a=v7;uint64_t _b=24ULL;o_op(4, 5, _a,_b);});o_put(v0, v0_n, _i,_v,5);} 454 v6=4ULL; 455 } 456 if(({uint64_t _a=o_get(v1, v1_n, 27ULL, 5);uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 457 {uint64_t _i=4ULL;uint64_t _v=o_get(v1, v1_n, 5ULL, 5);o_put(v0, v0_n, _i,_v,5);} 458 v6=({uint64_t _a=v6;uint64_t _b=2ULL;o_op(1, 5, _a,_b);}); 459 } 460 {uint64_t _i=1ULL;uint64_t _v=v6;o_put(v0, v0_n, _i,_v,5);} 461 {uint64_t _i=0ULL;uint64_t _v=({f9(v1, v1_n);});o_put(v0, v0_n, _i,_v,5);} 462 return o_leave(0ULL); 463 } 464 static uint64_t f23(void *v0, uint64_t v0_n, void *v1, uint64_t v1_n, void *v2, uint64_t v2_n, void *v3, uint64_t v3_n){ 465 o_enter(); 466 {uint64_t _i=0ULL;uint64_t _v=32ULL;o_put(v0, v0_n, _i,_v,5);} 467 {uint64_t _i=1ULL;uint64_t _v=0ULL;o_put(v0, v0_n, _i,_v,5);} 468 {uint64_t _i=0ULL;uint64_t _v=0ULL;o_put(v3, v3_n, _i,_v,5);} 469 uint64_t __attribute__((unused)) v4=({uint64_t p1=o_get(v0, v0_n, 2ULL, 5);uint64_t p3=64ULL;f1(v3, v3_n, p1, v2, v2_n, p3);}); 470 if(({uint64_t _a=v4;uint64_t _b=0ULL;o_op(7, 5, _a,_b);})){ 471 return o_leave(0ULL); 472 } 473 uint64_t __attribute__((unused)) v5=o_get(v3, v3_n, 0ULL, 5); 474 uint64_t __attribute__((unused)) v6=({uint64_t _a=v5;uint64_t _b=255ULL;o_op(12, 5, _a,_b);}); 475 uint64_t __attribute__((unused)) v7=({uint64_t _a=({uint64_t _a=v5;uint64_t _b=8ULL;o_op(16, 5, _a,_b);});uint64_t _b=255ULL;o_op(12, 5, _a,_b);}); 476 if(({uint64_t _a=({uint64_t _a=v6;uint64_t _b=64ULL;o_op(11, 5, _a,_b);});uint64_t _b=({uint64_t _a=v7;uint64_t _b=32ULL;o_op(11, 5, _a,_b);});o_op(13, 1, _a,_b);})){ 477 return o_leave(0ULL); 478 } 479 uint64_t __attribute__((unused)) v8=({uint64_t _a=v7;uint64_t _b=64ULL;o_op(3, 5, _a,_b);}); 480 if(({uint64_t _a=o_cast(5, 2, o_get(v2, v2_n, ({uint64_t _a=64ULL;uint64_t _b=v7;o_op(1, 5, _a,_b);}), 2));uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){ 481 { 482 uint64_t v9=0; 483 uint64_t k2=64ULL; 484 for(;o_op(8,5, v9, k2);v9=o_op(1,5, v9,1)){ 485 {uint64_t _i=({uint64_t _a=v8;uint64_t _b=v9;o_op(1, 5, _a,_b);});uint64_t _v=o_get(v2, v2_n, v9, 2);o_put(v1, v1_n, _i,_v,2);} 486 } 487 } 488 {uint64_t _i=({uint64_t _a=v8;uint64_t _b=v6;o_op(1, 5, _a,_b);});uint64_t _v=0ULL;o_put(v1, v1_n, _i,_v,2);} 489 {uint64_t _i=({uint64_t _a=64ULL;uint64_t _b=v7;o_op(1, 5, _a,_b);});uint64_t _v=1ULL;o_put(v2, v2_n, _i,_v,2);} 490 } 491 uint64_t __attribute__((unused)) v9=64ULL; 492 { 493 uint64_t v10=0; 494 uint64_t k1=64ULL; 495 for(;o_op(8,5, v10, k1);v10=o_op(1,5, v10,1)){ 496 if(({uint64_t _a=({uint64_t _a=v9;uint64_t _b=64ULL;o_op(6, 5, _a,_b);});uint64_t _b=({uint64_t _a=o_cast(5, 2, o_get(v1, v1_n, ({uint64_t _a=v8;uint64_t _b=v10;o_op(1, 5, _a,_b);}), 2));uint64_t _b=0ULL;o_op(6, 5, _a,_b);});o_op(12, 1, _a,_b);})){ 497 v9=v10; 498 } 499 } 500 } 501 if(({uint64_t _a=v9;uint64_t _b=64ULL;o_op(11, 5, _a,_b);})){ 502 return o_leave(0ULL); 503 } 504 {uint64_t _i=0ULL;uint64_t _v=v7;o_put(v0, v0_n, _i,_v,5);} 505 {uint64_t _i=1ULL;uint64_t _v=v9;o_put(v0, v0_n, _i,_v,5);} 506 return o_leave(0ULL); 507 } 508 static uint32_t omega_nv_init(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 509 if(!o_buf(result,1,1,5))return 32; 510 if(!o_buf(p0, p0_n,2, 5))return 32; 511 if(o_overlap(result,8,p0, p0_n*8))return 32; 512 if(!o_buf(p1, p1_n,128, 5))return 32; 513 if(o_overlap(result,8,p1, p1_n*8))return 32; 514 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 515 if(!o_buf(p2, p2_n,83296, 2))return 32; 516 if(o_overlap(result,8,p2, p2_n*1))return 32; 517 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 518 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 519 if(!o_buf(p3, p3_n,1, 5))return 32; 520 if(o_overlap(result,8,p3, p3_n*8))return 32; 521 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 522 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 523 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 524 if(o_busy)return 33; 525 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f11(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 526 o_busy=0;return (uint32_t)code; 527 } 528 __attribute__((visibility("default"))) nvmlReturn_t nvmlInit_v2(void){ 529 uint64_t o_f[2]={999},o_d=1;int o_ok=0; 530 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 531 if(!omega_nv_init(&o_d,o_f,2,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(0))){ 532 o_ok=1; 533 } 534 if(o_ok){ 535 } 536 pthread_mutex_unlock(&NvLock); 537 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 538 } 539 static uint32_t omega_nv_shut(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 540 if(!o_buf(result,1,1,5))return 32; 541 if(!o_buf(p0, p0_n,2, 5))return 32; 542 if(o_overlap(result,8,p0, p0_n*8))return 32; 543 if(!o_buf(p1, p1_n,128, 5))return 32; 544 if(o_overlap(result,8,p1, p1_n*8))return 32; 545 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 546 if(!o_buf(p2, p2_n,83296, 2))return 32; 547 if(o_overlap(result,8,p2, p2_n*1))return 32; 548 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 549 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 550 if(!o_buf(p3, p3_n,1, 5))return 32; 551 if(o_overlap(result,8,p3, p3_n*8))return 32; 552 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 553 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 554 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 555 if(o_busy)return 33; 556 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f12(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 557 o_busy=0;return (uint32_t)code; 558 } 559 __attribute__((visibility("default"))) nvmlReturn_t nvmlShutdown(void){ 560 uint64_t o_f[2]={999},o_d=1;int o_ok=0; 561 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 562 if(!omega_nv_shut(&o_d,o_f,2,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(0))){ 563 o_ok=1; 564 } 565 if(o_ok){ 566 } 567 pthread_mutex_unlock(&NvLock); 568 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 569 } 570 static uint32_t omega_nv_err(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 571 if(!o_buf(result,1,1,5))return 32; 572 if(!o_buf(p0, p0_n,3, 5))return 32; 573 if(o_overlap(result,8,p0, p0_n*8))return 32; 574 if(!o_buf(p1, p1_n,2048, 2))return 32; 575 if(o_overlap(result,8,p1, p1_n*1))return 32; 576 if(o_overlap(p1, p1_n*1, p0, p0_n*8))return 32; 577 if(!o_buf(p2, p2_n,96, 2))return 32; 578 if(o_overlap(result,8,p2, p2_n*1))return 32; 579 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 580 if(o_overlap(p2, p2_n*1, p1, p1_n*1))return 32; 581 if(!o_buf(p3, p3_n,1, 5))return 32; 582 if(o_overlap(result,8,p3, p3_n*8))return 32; 583 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 584 if(o_overlap(p3, p3_n*8, p1, p1_n*1))return 32; 585 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 586 if(o_busy)return 33; 587 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f23(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 588 o_busy=0;return (uint32_t)code; 589 } 590 __attribute__((visibility("default"))) const char *nvmlErrorString(nvmlReturn_t result){ 591 uint64_t o_f[3]={32},o_d=1;const char *o_r=o_fb66; 592 if(pthread_mutex_lock(&NvLock))return o_fb66; 593 o_f[2]=(uint64_t)(int64_t)(int32_t)result; 594 if(!omega_nv_err(&o_d,o_f,3,NvT,2048,NvO,96,NvR,1)&&!o_d&&o_f[0]<32&&o_f[1]<64&&!NvT[o_f[0]*64+o_f[1]])o_r=(const char*)NvT+o_f[0]*64; 595 pthread_mutex_unlock(&NvLock); 596 return o_r; 597 } 598 static uint32_t omega_nv_count(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 599 if(!o_buf(result,1,1,5))return 32; 600 if(!o_buf(p0, p0_n,4, 5))return 32; 601 if(o_overlap(result,8,p0, p0_n*8))return 32; 602 if(!o_buf(p1, p1_n,128, 5))return 32; 603 if(o_overlap(result,8,p1, p1_n*8))return 32; 604 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 605 if(!o_buf(p2, p2_n,83296, 2))return 32; 606 if(o_overlap(result,8,p2, p2_n*1))return 32; 607 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 608 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 609 if(!o_buf(p3, p3_n,1, 5))return 32; 610 if(o_overlap(result,8,p3, p3_n*8))return 32; 611 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 612 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 613 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 614 if(o_busy)return 33; 615 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f13(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 616 o_busy=0;return (uint32_t)code; 617 } 618 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetCount_v2(unsigned int *deviceCount){ 619 uint64_t o_f[4]={999},o_d=1;int o_ok=0; 620 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 621 o_f[2]=deviceCount!=NULL; 622 if(!omega_nv_count(&o_d,o_f,4,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 623 o_ok=1; 624 if(o_f[1]&UINT64_C(1)&&(!deviceCount||o_f[3]>UINT32_MAX))o_ok=0; 625 } 626 if(o_ok){ 627 if(o_f[1]&UINT64_C(1))*deviceCount=(unsigned int)o_f[3]; 628 } 629 pthread_mutex_unlock(&NvLock); 630 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 631 } 632 static uint32_t omega_nv_handle(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 633 if(!o_buf(result,1,1,5))return 32; 634 if(!o_buf(p0, p0_n,5, 5))return 32; 635 if(o_overlap(result,8,p0, p0_n*8))return 32; 636 if(!o_buf(p1, p1_n,128, 5))return 32; 637 if(o_overlap(result,8,p1, p1_n*8))return 32; 638 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 639 if(!o_buf(p2, p2_n,83296, 2))return 32; 640 if(o_overlap(result,8,p2, p2_n*1))return 32; 641 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 642 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 643 if(!o_buf(p3, p3_n,1, 5))return 32; 644 if(o_overlap(result,8,p3, p3_n*8))return 32; 645 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 646 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 647 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 648 if(o_busy)return 33; 649 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f14(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 650 o_busy=0;return (uint32_t)code; 651 } 652 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetHandleByIndex_v2(unsigned int index, nvmlDevice_t *device){ 653 uint64_t o_f[5]={999},o_d=1;int o_ok=0; 654 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 655 o_f[2]=(uint64_t)(uint32_t)index; 656 o_f[3]=device!=NULL; 657 if(!omega_nv_handle(&o_d,o_f,5,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 658 o_ok=1; 659 if(o_f[1]&UINT64_C(1)&&(!device||o_f[4]>=8))o_ok=0; 660 } 661 if(o_ok){ 662 if(o_f[1]&UINT64_C(1))*device=o_ho48(o_f[4]); 663 } 664 pthread_mutex_unlock(&NvLock); 665 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 666 } 667 static uint32_t omega_nv_name(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 668 if(!o_buf(result,1,1,5))return 32; 669 if(!o_buf(p0, p0_n,6, 5))return 32; 670 if(o_overlap(result,8,p0, p0_n*8))return 32; 671 if(!o_buf(p1, p1_n,128, 5))return 32; 672 if(o_overlap(result,8,p1, p1_n*8))return 32; 673 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 674 if(!o_buf(p2, p2_n,83296, 2))return 32; 675 if(o_overlap(result,8,p2, p2_n*1))return 32; 676 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 677 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 678 if(!o_buf(p3, p3_n,1, 5))return 32; 679 if(o_overlap(result,8,p3, p3_n*8))return 32; 680 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 681 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 682 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 683 if(o_busy)return 33; 684 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f16(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 685 o_busy=0;return (uint32_t)code; 686 } 687 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int length){ 688 uint64_t o_f[6]={999},o_d=1;int o_ok=0; 689 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 690 o_f[2]=o_hi48(device); 691 o_f[3]=name!=NULL; 692 o_f[5]=(uint64_t)(uint32_t)length; 693 if(!omega_nv_name(&o_d,o_f,6,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 694 o_ok=1; 695 if(o_f[1]&UINT64_C(1)&&(!name||o_f[4]>(uint64_t)length||o_f[4]>22800||!o_f[4]||NvB[60496+o_f[4]-1]))o_ok=0; 696 } 697 if(o_ok){ 698 if(o_f[1]&UINT64_C(1))memcpy(name,NvB+60496,o_f[4]); 699 } 700 pthread_mutex_unlock(&NvLock); 701 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 702 } 703 static uint32_t omega_nv_uuid(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 704 if(!o_buf(result,1,1,5))return 32; 705 if(!o_buf(p0, p0_n,6, 5))return 32; 706 if(o_overlap(result,8,p0, p0_n*8))return 32; 707 if(!o_buf(p1, p1_n,128, 5))return 32; 708 if(o_overlap(result,8,p1, p1_n*8))return 32; 709 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 710 if(!o_buf(p2, p2_n,83296, 2))return 32; 711 if(o_overlap(result,8,p2, p2_n*1))return 32; 712 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 713 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 714 if(!o_buf(p3, p3_n,1, 5))return 32; 715 if(o_overlap(result,8,p3, p3_n*8))return 32; 716 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 717 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 718 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 719 if(o_busy)return 33; 720 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f17(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 721 o_busy=0;return (uint32_t)code; 722 } 723 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetUUID(nvmlDevice_t device, char *uuid, unsigned int length){ 724 uint64_t o_f[6]={999},o_d=1;int o_ok=0; 725 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 726 o_f[2]=o_hi48(device); 727 o_f[3]=uuid!=NULL; 728 o_f[5]=(uint64_t)(uint32_t)length; 729 if(!omega_nv_uuid(&o_d,o_f,6,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 730 o_ok=1; 731 if(o_f[1]&UINT64_C(1)&&(!uuid||o_f[4]>(uint64_t)length||o_f[4]>22800||!o_f[4]||NvB[60496+o_f[4]-1]))o_ok=0; 732 } 733 if(o_ok){ 734 if(o_f[1]&UINT64_C(1))memcpy(uuid,NvB+60496,o_f[4]); 735 } 736 pthread_mutex_unlock(&NvLock); 737 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 738 } 739 static uint32_t omega_nv_temp(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 740 if(!o_buf(result,1,1,5))return 32; 741 if(!o_buf(p0, p0_n,6, 5))return 32; 742 if(o_overlap(result,8,p0, p0_n*8))return 32; 743 if(!o_buf(p1, p1_n,128, 5))return 32; 744 if(o_overlap(result,8,p1, p1_n*8))return 32; 745 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 746 if(!o_buf(p2, p2_n,83296, 2))return 32; 747 if(o_overlap(result,8,p2, p2_n*1))return 32; 748 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 749 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 750 if(!o_buf(p3, p3_n,1, 5))return 32; 751 if(o_overlap(result,8,p3, p3_n*8))return 32; 752 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 753 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 754 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 755 if(o_busy)return 33; 756 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f18(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 757 o_busy=0;return (uint32_t)code; 758 } 759 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetTemperature(nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp){ 760 uint64_t o_f[6]={999},o_d=1;int o_ok=0; 761 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 762 o_f[2]=o_hi48(device); 763 o_f[3]=(uint64_t)(uint32_t)sensorType; 764 o_f[4]=temp!=NULL; 765 if(!omega_nv_temp(&o_d,o_f,6,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 766 o_ok=1; 767 if(o_f[1]&UINT64_C(1)&&(!temp||o_f[5]>UINT32_MAX))o_ok=0; 768 } 769 if(o_ok){ 770 if(o_f[1]&UINT64_C(1))*temp=(unsigned int)o_f[5]; 771 } 772 pthread_mutex_unlock(&NvLock); 773 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 774 } 775 static uint32_t omega_nv_mem(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 776 if(!o_buf(result,1,1,5))return 32; 777 if(!o_buf(p0, p0_n,4, 5))return 32; 778 if(o_overlap(result,8,p0, p0_n*8))return 32; 779 if(!o_buf(p1, p1_n,128, 5))return 32; 780 if(o_overlap(result,8,p1, p1_n*8))return 32; 781 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 782 if(!o_buf(p2, p2_n,83296, 2))return 32; 783 if(o_overlap(result,8,p2, p2_n*1))return 32; 784 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 785 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 786 if(!o_buf(p3, p3_n,1, 5))return 32; 787 if(o_overlap(result,8,p3, p3_n*8))return 32; 788 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 789 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 790 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 791 if(o_busy)return 33; 792 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f20(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 793 o_busy=0;return (uint32_t)code; 794 } 795 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetMemoryInfo(nvmlDevice_t device, nvmlMemory_t *memory){ 796 uint64_t o_f[4]={999},o_d=1;int o_ok=0; 797 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 798 o_f[2]=o_hi48(device); 799 o_f[3]=memory!=NULL; 800 if(!omega_nv_mem(&o_d,o_f,4,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 801 o_ok=1; 802 if(o_f[1]&UINT64_C(1)&&(!memory))o_ok=0; 803 } 804 if(o_ok){ 805 if(o_f[1]&UINT64_C(1)){memcpy(&memory->total,NvB+60496,8);memcpy(&memory->free,NvB+60504,8);memcpy(&memory->used,NvB+60512,8);} 806 } 807 pthread_mutex_unlock(&NvLock); 808 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 809 } 810 static uint32_t omega_nv_util(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 811 if(!o_buf(result,1,1,5))return 32; 812 if(!o_buf(p0, p0_n,4, 5))return 32; 813 if(o_overlap(result,8,p0, p0_n*8))return 32; 814 if(!o_buf(p1, p1_n,128, 5))return 32; 815 if(o_overlap(result,8,p1, p1_n*8))return 32; 816 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 817 if(!o_buf(p2, p2_n,83296, 2))return 32; 818 if(o_overlap(result,8,p2, p2_n*1))return 32; 819 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 820 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 821 if(!o_buf(p3, p3_n,1, 5))return 32; 822 if(o_overlap(result,8,p3, p3_n*8))return 32; 823 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 824 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 825 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 826 if(o_busy)return 33; 827 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f21(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 828 o_busy=0;return (uint32_t)code; 829 } 830 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtilization_t *utilization){ 831 uint64_t o_f[4]={999},o_d=1;int o_ok=0; 832 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 833 o_f[2]=o_hi48(device); 834 o_f[3]=utilization!=NULL; 835 if(!omega_nv_util(&o_d,o_f,4,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 836 o_ok=1; 837 if(o_f[1]&UINT64_C(1)&&(!utilization))o_ok=0; 838 } 839 if(o_ok){ 840 if(o_f[1]&UINT64_C(1)){memcpy(&utilization->gpu,NvB+60496,4);memcpy(&utilization->memory,NvB+60500,4);} 841 } 842 pthread_mutex_unlock(&NvLock); 843 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 844 } 845 static uint32_t omega_nv_procs(uint64_t *result, void *p0, uint64_t p0_n, void *p1, uint64_t p1_n, void *p2, uint64_t p2_n, void *p3, uint64_t p3_n){ 846 if(!o_buf(result,1,1,5))return 32; 847 if(!o_buf(p0, p0_n,7, 5))return 32; 848 if(o_overlap(result,8,p0, p0_n*8))return 32; 849 if(!o_buf(p1, p1_n,128, 5))return 32; 850 if(o_overlap(result,8,p1, p1_n*8))return 32; 851 if(o_overlap(p1, p1_n*8, p0, p0_n*8))return 32; 852 if(!o_buf(p2, p2_n,83296, 2))return 32; 853 if(o_overlap(result,8,p2, p2_n*1))return 32; 854 if(o_overlap(p2, p2_n*1, p0, p0_n*8))return 32; 855 if(o_overlap(p2, p2_n*1, p1, p1_n*8))return 32; 856 if(!o_buf(p3, p3_n,1, 5))return 32; 857 if(o_overlap(result,8,p3, p3_n*8))return 32; 858 if(o_overlap(p3, p3_n*8, p0, p0_n*8))return 32; 859 if(o_overlap(p3, p3_n*8, p1, p1_n*8))return 32; 860 if(o_overlap(p3, p3_n*8, p2, p2_n*1))return 32; 861 if(o_busy)return 33; 862 o_busy=1;o_depth=0;int code=setjmp(o_jmp);if(!code){uint64_t _result=f22(p0, p0_n, p1, p1_n, p2, p2_n, p3, p3_n);o_put(result,1,0,_result,5);} 863 o_busy=0;return (uint32_t)code; 864 } 865 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int *infoCount, nvmlProcessInfo_v2_t *infos){ 866 uint64_t o_f[7]={999},o_d=1;int o_ok=0; 867 if(pthread_mutex_lock(&NvLock))return (nvmlReturn_t)999; 868 o_f[2]=o_hi48(device); 869 o_f[3]=infoCount!=NULL; 870 if(infoCount)o_f[4]=(uint64_t)(uint32_t)*infoCount; 871 const uint64_t o_i3=o_f[4]; 872 o_f[5]=infos!=NULL; 873 if(!omega_nv_procs(&o_d,o_f,7,NvS,128,NvB,83296,NvR,1)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(6))){ 874 o_ok=1; 875 if(o_f[1]&UINT64_C(2)&&(!infoCount||o_f[4]>UINT32_MAX))o_ok=0; 876 if(o_f[1]&UINT64_C(4)&&(!infos||o_f[6]>o_i3||o_f[6]>950))o_ok=0; 877 } 878 if(o_ok){ 879 if(o_f[1]&UINT64_C(2))*infoCount=(unsigned int)o_f[4]; 880 if(o_f[1]&UINT64_C(4))for(uint64_t o_j=0;o_j