| 1 | /* |
| 2 | This Software is distributed with the following X11 License, |
| 3 | sometimes also known as MIT license. |
| 4 | |
| 5 | Copyright (c) 2010 Miguel A. Ballicora |
| 6 | |
| 7 | Permission is hereby granted, free of charge, to any person |
| 8 | obtaining a copy of this software and associated documentation |
| 9 | files (the "Software"), to deal in the Software without |
| 10 | restriction, including without limitation the rights to use, |
| 11 | copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 12 | copies of the Software, and to permit persons to whom the |
| 13 | Software is furnished to do so, subject to the following |
| 14 | conditions: |
| 15 | |
| 16 | The above copyright notice and this permission notice shall be |
| 17 | included in all copies or substantial portions of the Software. |
| 18 | |
| 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 21 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 23 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 24 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 26 | OTHER DEALINGS IN THE SOFTWARE. |
| 27 | */ |
| 28 | |
| 29 | |
| 30 | /* NBBOTF will remove the internal bitbase on the fly */ |
| 31 | #ifdef NBBOTF |
| 32 | #ifdef WDL_PROBE |
| 33 | #undef WDL_PROBE |
| 34 | #endif |
| 35 | #else |
| 36 | #define WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 37 | #endif |
| 38 | |
| 39 | /*-- Intended to be modified to make public --> Supporting functions the TB generator ---------------------*/ |
| 40 | |
| 41 | #ifdef GTB_SHARE |
| 42 | #define SHARED_forbuilding |
| 43 | #endif |
| 44 | |
| 45 | /*---------------------------------------------------------------------------------------------------------*/ |
| 46 | #include <stdlib.h> |
| 47 | #include <stdio.h> |
| 48 | #include <string.h> |
| 49 | |
| 50 | #include "gtb-probe.h"cxx . . $ `<file>/gtb-probe.h`/ |
| 51 | |
| 52 | #if defined(SHARED_forbuilding) |
| 53 | #include "gtb-prob2.h" |
| 54 | #else |
| 55 | #define mySHAREDcxx . . $ `gtb-probe.c:55:10`! static |
| 56 | typedef unsigned char SQ_CONTENTcxx . . $ SQ_CONTENT#; |
| 57 | typedef unsigned int SQUAREcxx . . $ SQUARE#; |
| 58 | #endif |
| 59 | |
| 60 | #include "sysport.h"cxx . . $ `<file>/sysport/sysport.h`/ |
| 61 | #include "gtb-att.h"cxx . . $ `<file>/gtb-att.h`/ |
| 62 | #include "gtb-types.h"cxx . . $ `<file>/gtb-types.h`/ |
| 63 | |
| 64 | /*---------------------------------------------------------------------------------------------------------*/ |
| 65 | /*#include "posit_t.h"*/ |
| 66 | |
| 67 | #define MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`! 17 |
| 68 | #if 0 |
| 69 | typedef unsigned sq_t; |
| 70 | typedef unsigned char pc_t; |
| 71 | typedef uint32_t mv_t; |
| 72 | #endif |
| 73 | |
| 74 | struct positcxx . . $ posit# { |
| 75 | sq_tcxx . . $ sq_t# wscxx . . $ posit#ws.[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 76 | sq_tcxx . . $ sq_t# bscxx . . $ posit#bs.[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 77 | pc_tcxx . . $ pc_t# wpcxx . . $ posit#wp.[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 78 | pc_tcxx . . $ pc_t# bpcxx . . $ posit#bp.[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 79 | sq_tcxx . . $ sq_t# epcxx . . $ posit#ep.; |
| 80 | unsigned int stmcxx . . $ posit#stm.; |
| 81 | unsigned int cascxx . . $ posit#cas.; |
| 82 | }; |
| 83 | typedef struct positcxx . . $ posit# posit_tcxx . . $ posit_t#; |
| 84 | |
| 85 | #if 0 |
| 86 | typedef long int tbkey_t; |
| 87 | #endif |
| 88 | |
| 89 | /*---------------------------------------------------------------------------------------------------------*/ |
| 90 | /*#include "bool_t.h"*/ |
| 91 | |
| 92 | #if !defined(H_BOOL) |
| 93 | typedef int bool_tcxx . . $ bool_t#; |
| 94 | #endif |
| 95 | |
| 96 | #if !defined(TRUE) |
| 97 | #define TRUEcxx . . $ `gtb-probe.c:97:9`! ((bool_t)1) |
| 98 | #endif |
| 99 | |
| 100 | #if !defined(FALSE) |
| 101 | #define FALSEcxx . . $ `gtb-probe.c:101:9`! ((bool_t)0) |
| 102 | #endif |
| 103 | |
| 104 | /*--------- private if external building code is not present ----------------------------------------------*/ |
| 105 | |
| 106 | #if !defined(SHARED_forbuilding) |
| 107 | |
| 108 | #define MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`! 145 |
| 109 | #define SLOTSIZEcxx . . $ `gtb-probe.c:109:9`! 1 |
| 110 | #define NOINDEXcxx . . $ `gtb-probe.c:110:9`! ((index_t)(-1)) |
| 111 | |
| 112 | #if 0 |
| 113 | typedef unsigned short int dtm_t; |
| 114 | typedef size_t index_t; |
| 115 | /*typedef int index_t;*/ |
| 116 | #endif |
| 117 | |
| 118 | enum Loading_statuscxx . . $ Loading_status# { |
| 119 | STATUS_ABSENTcxx . . $ STATUS_ABSENT. = 0, |
| 120 | STATUS_STATICRAMcxx . . $ STATUS_STATICRAM. = 1, |
| 121 | STATUS_MALLOCcxx . . $ STATUS_MALLOC. = 2, |
| 122 | STATUS_FILEcxx . . $ STATUS_FILE. = 3, |
| 123 | STATUS_REJECTcxx . . $ STATUS_REJECT. = 4 |
| 124 | }; |
| 125 | |
| 126 | struct endgamekeycxx . . $ endgamekey# { |
| 127 | int idcxx . . $ endgamekey#id.; |
| 128 | const char *strcxx . . $ endgamekey#str.; |
| 129 | index_tcxx . . $ index_t# maxindexcxx . . $ endgamekey#maxindex.; |
| 130 | index_tcxx . . $ index_t# slice_ncxx . . $ endgamekey#slice_n.; |
| 131 | void (*itopccxx . . $ endgamekey#itopc.) (index_tcxx . . $ index_t#, SQUAREcxx . . $ SQUARE# *, SQUAREcxx . . $ SQUARE# *); |
| 132 | bool_tcxx . . $ bool_t# (*pctoicxx . . $ endgamekey#pctoi.) (const SQUAREcxx . . $ SQUARE# *, const SQUAREcxx . . $ SQUARE# *, index_tcxx . . $ index_t# *); |
| 133 | dtm_tcxx . . $ dtm_t# * egt_wcxx . . $ endgamekey#egt_w.; |
| 134 | dtm_tcxx . . $ dtm_t# * egt_bcxx . . $ endgamekey#egt_b.; |
| 135 | FILEcxx . . $ FILE# * fdcxx . . $ endgamekey#fd.; |
| 136 | int statuscxx . . $ endgamekey#status.; |
| 137 | int pathncxx . . $ endgamekey#pathn.; |
| 138 | }; |
| 139 | #endif |
| 140 | |
| 141 | /*----------------------------------------------------------------------------------------------------------*/ |
| 142 | |
| 143 | /* array for better moves */ |
| 144 | #ifdef GTB_SHARE |
| 145 | mySHARED int bettarr [2] [8] [8]; |
| 146 | #endif |
| 147 | |
| 148 | /*------------ ENUMS ----------------------------------------------------------*/ |
| 149 | |
| 150 | enum Mask_valuescxx . . $ Mask_values# { |
| 151 | RESMASKcxx . . $ RESMASK. = tb_RESMASKcxx . . $ tb_RESMASK., |
| 152 | INFOMASKcxx . . $ INFOMASK. = tb_INFOMASKcxx . . $ tb_INFOMASK., |
| 153 | PLYSHIFTcxx . . $ PLYSHIFT. = tb_PLYSHIFTcxx . . $ tb_PLYSHIFT. |
| 154 | }; |
| 155 | |
| 156 | enum Info_valuescxx . . $ Info_values# { |
| 157 | iDRAWcxx . . $ iDRAW. = tb_DRAWcxx . . $ tb_DRAW., |
| 158 | iWMATEcxx . . $ iWMATE. = tb_WMATEcxx . . $ tb_WMATE., |
| 159 | iBMATEcxx . . $ iBMATE. = tb_BMATEcxx . . $ tb_BMATE., |
| 160 | iFORBIDcxx . . $ iFORBID. = tb_FORBIDcxx . . $ tb_FORBID., |
| 161 | |
| 162 | iDRAWtcxx . . $ iDRAWt. = tb_DRAWcxx . . $ tb_DRAW. |4, |
| 163 | iWMATEtcxx . . $ iWMATEt. = tb_WMATEcxx . . $ tb_WMATE. |4, |
| 164 | iBMATEtcxx . . $ iBMATEt. = tb_BMATEcxx . . $ tb_BMATE. |4, |
| 165 | iUNKNOWNcxx . . $ iUNKNOWN. = tb_UNKNOWNcxx . . $ tb_UNKNOWN., |
| 166 | |
| 167 | iUNKNBITcxx . . $ iUNKNBIT. = (1<<2) |
| 168 | }; |
| 169 | |
| 170 | /*-------------------------- inherited from a previous maindef.h -----------*/ |
| 171 | |
| 172 | #define WHITEScxx . . $ `gtb-probe.c:172:9`! (1u<<6) |
| 173 | #define BLACKScxx . . $ `gtb-probe.c:173:9`! (1u<<7) |
| 174 | |
| 175 | #define NOPIECEcxx . . $ `gtb-probe.c:175:9`! 0u |
| 176 | #define PAWNcxx . . $ `gtb-probe.c:176:9`! 1u |
| 177 | #define KNIGHTcxx . . $ `gtb-probe.c:177:9`! 2u |
| 178 | #define BISHOPcxx . . $ `gtb-probe.c:178:9`! 3u |
| 179 | #define ROOKcxx . . $ `gtb-probe.c:179:9`! 4u |
| 180 | #define QUEENcxx . . $ `gtb-probe.c:180:9`! 5u |
| 181 | #define KINGcxx . . $ `gtb-probe.c:181:9`! 6u |
| 182 | |
| 183 | #define WHcxx . . $ `gtb-probe.c:183:9`! 0 |
| 184 | #define BLcxx . . $ `gtb-probe.c:184:9`! 1 |
| 185 | #define Oppcxx . . $ `gtb-probe.c:185:9`!(x) ((x)^1) |
| 186 | #define wKcxx . . $ `gtb-probe.c:186:9`! (KINGcxx . . $ `gtb-probe.c:181:9`! | WHITEScxx . . $ `gtb-probe.c:172:9`!) |
| 187 | |
| 188 | /*------------------- |
| 189 | SQUARES |
| 190 | -------------------*/ |
| 191 | |
| 192 | /* from 1-63 different squares posibles */ |
| 193 | |
| 194 | /*squares*/ |
| 195 | enum SQUAREScxx . . $ SQUARES# { |
| 196 | A1cxx . . $ A1.,B1cxx . . $ B1.,C1cxx . . $ C1.,D1cxx . . $ D1.,E1cxx . . $ E1.,F1cxx . . $ F1.,G1cxx . . $ G1.,H1cxx . . $ H1., |
| 197 | A2cxx . . $ A2.,B2cxx . . $ B2.,C2cxx . . $ C2.,D2cxx . . $ D2.,E2cxx . . $ E2.,F2cxx . . $ F2.,G2cxx . . $ G2.,H2cxx . . $ H2., |
| 198 | A3cxx . . $ A3.,B3cxx . . $ B3.,C3cxx . . $ C3.,D3cxx . . $ D3.,E3cxx . . $ E3.,F3cxx . . $ F3.,G3cxx . . $ G3.,H3cxx . . $ H3., |
| 199 | A4cxx . . $ A4.,B4cxx . . $ B4.,C4cxx . . $ C4.,D4cxx . . $ D4.,E4cxx . . $ E4.,F4cxx . . $ F4.,G4cxx . . $ G4.,H4cxx . . $ H4., |
| 200 | A5cxx . . $ A5.,B5cxx . . $ B5.,C5cxx . . $ C5.,D5cxx . . $ D5.,E5cxx . . $ E5.,F5cxx . . $ F5.,G5cxx . . $ G5.,H5cxx . . $ H5., |
| 201 | A6cxx . . $ A6.,B6cxx . . $ B6.,C6cxx . . $ C6.,D6cxx . . $ D6.,E6cxx . . $ E6.,F6cxx . . $ F6.,G6cxx . . $ G6.,H6cxx . . $ H6., |
| 202 | A7cxx . . $ A7.,B7cxx . . $ B7.,C7cxx . . $ C7.,D7cxx . . $ D7.,E7cxx . . $ E7.,F7cxx . . $ F7.,G7cxx . . $ G7.,H7cxx . . $ H7., |
| 203 | A8cxx . . $ A8.,B8cxx . . $ B8.,C8cxx . . $ C8.,D8cxx . . $ D8.,E8cxx . . $ E8.,F8cxx . . $ F8.,G8cxx . . $ G8.,H8cxx . . $ H8., |
| 204 | NOSQUAREcxx . . $ NOSQUARE., |
| 205 | ERRSQUAREcxx . . $ ERRSQUARE. = 128 |
| 206 | }; |
| 207 | |
| 208 | /*------------------- end of inherited from a previous maindef.h -----------*/ |
| 209 | |
| 210 | #if !defined(NDEBUG) |
| 211 | #define NDEBUGcxx . . $ `gtb-probe.c:211:9`! |
| 212 | #endif |
| 213 | #ifdef DEBUG |
| 214 | #undef NDEBUG |
| 215 | #endif |
| 216 | #include "assert.h" |
| 217 | |
| 218 | /*------------------- general DEFINES--------------------------- -----------*/ |
| 219 | |
| 220 | #define gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`! ((unsigned)-1) |
| 221 | #define gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`! ((index_t)-1) |
| 222 | |
| 223 | /*************************************************\ |
| 224 | | |
| 225 | | COMPRESSION SCHEMES |
| 226 | | |
| 227 | \*************************************************/ |
| 228 | |
| 229 | #include "gtb-dec.h"cxx . . $ `<file>/gtb-dec.h`/ |
| 230 | |
| 231 | static const char *const Extensioncxx . . $ Extension.[] = { |
| 232 | ".gtb.cp0" |
| 233 | ,".gtb.cp1" |
| 234 | ,".gtb.cp2" |
| 235 | ,".gtb.cp3" |
| 236 | ,".gtb.cp4" |
| 237 | ,".gtb.cp5" |
| 238 | ,".gtb.cp6" |
| 239 | ,".gtb.cp7" |
| 240 | ,".gtb.cp8" |
| 241 | ,".gtb.cp9" |
| 242 | }; |
| 243 | |
| 244 | /*************************************************\ |
| 245 | | |
| 246 | | MOVES |
| 247 | | |
| 248 | \*************************************************/ |
| 249 | |
| 250 | enum move_kindcxx . . $ move_kind# { |
| 251 | NORMAL_MOVEcxx . . $ NORMAL_MOVE. = 0, |
| 252 | CASTLE_MOVEcxx . . $ CASTLE_MOVE., |
| 253 | PASSNT_MOVEcxx . . $ PASSNT_MOVE., |
| 254 | PROMOT_MOVEcxx . . $ PROMOT_MOVE. |
| 255 | }; |
| 256 | |
| 257 | enum move_contentcxx . . $ move_content# { |
| 258 | NOMOVEcxx . . $ NOMOVE. = 0 |
| 259 | }; |
| 260 | |
| 261 | #define MV_TYPEcxx . . $ `gtb-probe.c:261:9`!(mv) ( (BYTE) ((mv) >>6 & 3 ) ) |
| 262 | #define MV_TOcxx . . $ `gtb-probe.c:262:9`!(mv) ( (SQUARE) ((mv) >>8 & 63) ) |
| 263 | #define MV_PTcxx . . $ `gtb-probe.c:263:9`!(mv) ( (SQ_CONTENT) ((mv) >>(3+16) &7 ) ) |
| 264 | #define MV_TKcxx . . $ `gtb-probe.c:264:9`!(mv) ( (SQ_CONTENT) ((mv) >>(6+16) &7 ) ) |
| 265 | #define MV_FROMcxx . . $ `gtb-probe.c:265:9`!(mv) ( (SQUARE) ((mv) & 63) ) |
| 266 | |
| 267 | /* |
| 268 | | move,type,color,piece,from,to,taken,promoted |
| 269 | *------------------------------------------------------------------*/ |
| 270 | |
| 271 | #define MV_BUILDcxx . . $ `gtb-probe.c:271:9`!(mv,ty,co,pc,fr,to,tk,pm) ( \ |
| 272 | (mv) = (fr) | (to)<< 8 | (ty)<< 6 | (co)<<8 \ |
| 273 | | (pc)<<16 | (pm)<< (3+16) | (tk)<< (6+16) \ |
| 274 | ) |
| 275 | |
| 276 | #define MV_ADD_TOTKcxx . . $ `gtb-probe.c:276:9`!(mv,to,tk) ( \ |
| 277 | mv |= (uint32_t)(to) << 8 \ |
| 278 | | (uint32_t)(tk) << (6+16) \ |
| 279 | ) |
| 280 | |
| 281 | #define map88cxx . . $ `gtb-probe.c:281:9`!(x) ( (x) + ((x)&070) ) |
| 282 | #define unmap88cxx . . $ `gtb-probe.c:282:9`!(x) ( ( (x) + ((x)& 07) ) >> 1 ) |
| 283 | |
| 284 | /*************************************************\ |
| 285 | | |
| 286 | | STATIC VARIABLES |
| 287 | | |
| 288 | \*************************************************/ |
| 289 | |
| 290 | static int GTB_schemecxx . . $ GTB_scheme. = 4; |
| 291 | |
| 292 | /*************************************************\ |
| 293 | | |
| 294 | | needed for |
| 295 | | PRE LOAD CACHE AND DEPENDENT FUNCTIONS |
| 296 | | |
| 297 | \*************************************************/ |
| 298 | |
| 299 | #define EGTB_MAXBLOCKSIZEcxx . . $ `gtb-probe.c:299:9`! 65536 |
| 300 | |
| 301 | static int GTB_MAXOPENcxx . . $ GTB_MAXOPEN. = 4; |
| 302 | |
| 303 | static bool_tcxx . . $ bool_t# Uncompressedcxx . . $ Uncompressed. = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 304 | static unsigned char Buffer_zippedcxx . . $ Buffer_zipped. [EGTB_MAXBLOCKSIZEcxx . . $ `gtb-probe.c:299:9`!]; |
| 305 | static unsigned char Buffer_packedcxx . . $ Buffer_packed. [EGTB_MAXBLOCKSIZEcxx . . $ `gtb-probe.c:299:9`!]; |
| 306 | static unsigned int zipinfo_initcxx . . $ zipinfo_init(db52760e79bf9054). (void); |
| 307 | static void zipinfo_donecxx . . $ zipinfo_done(49f6e7a06ebc5aa8). (void); |
| 308 | |
| 309 | enum Flip_flagscxx . . $ Flip_flags# { |
| 310 | WE_FLAGcxx . . $ WE_FLAG. = 1, NS_FLAGcxx . . $ NS_FLAG. = 2, NW_SE_FLAGcxx . . $ NW_SE_FLAG. = 4 |
| 311 | }; /* used in flipt */ |
| 312 | |
| 313 | struct filesopencxx . . $ filesopen# { |
| 314 | int ncxx . . $ filesopen#n.; |
| 315 | tbkey_tcxx . . $ tbkey_t# *keycxx . . $ filesopen#key.; |
| 316 | }; |
| 317 | |
| 318 | /* STATIC GLOBALS */ |
| 319 | |
| 320 | static struct filesopencxx . . $ filesopen# fdcxx . . $ fd. = {0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!}; |
| 321 | |
| 322 | static bool_tcxx . . $ bool_t# TB_INITIALIZEDcxx . . $ TB_INITIALIZED. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 323 | static bool_tcxx . . $ bool_t# DTM_CACHE_INITIALIZEDcxx . . $ DTM_CACHE_INITIALIZED. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 324 | |
| 325 | static int WDL_FRACTIONcxx . . $ WDL_FRACTION. = 64; |
| 326 | static int WDL_FRACTION_MAXcxx . . $ WDL_FRACTION_MAX. = 128; |
| 327 | |
| 328 | static size_t DTM_cache_sizecxx . . $ DTM_cache_size. = 0; |
| 329 | static size_t WDL_cache_sizecxx . . $ WDL_cache_size. = 0; |
| 330 | |
| 331 | static unsigned int TB_AVAILABILITYcxx . . $ TB_AVAILABILITY. = 0; |
| 332 | |
| 333 | /* LOCKS */ |
| 334 | static mythread_mutex_tcxx . . $ mythread_mutex_t# Egtb_lockcxx . . $ Egtb_lock.; |
| 335 | |
| 336 | |
| 337 | /****************************************************************************\ |
| 338 | * |
| 339 | * |
| 340 | * DEBUGGING or PRINTING ZONE |
| 341 | * |
| 342 | * |
| 343 | ****************************************************************************/ |
| 344 | |
| 345 | #if 0 |
| 346 | #define FOLLOW_EGTB |
| 347 | #ifndef DEBUG |
| 348 | #define DEBUG |
| 349 | #endif |
| 350 | #endif |
| 351 | |
| 352 | #define validsqcxx . . $ `gtb-probe.c:352:9`!(x) ((x) >= A1 && (x) <= H8) |
| 353 | |
| 354 | #if defined(DEBUG) |
| 355 | static void print_pos (const sq_t *ws, const sq_t *bs, const pc_t *wp, const pc_t *bp); |
| 356 | #endif |
| 357 | |
| 358 | #if defined(DEBUG) || defined(FOLLOW_EGTB) |
| 359 | static void output_state (unsigned stm, const SQUARE *wSQ, const SQUARE *bSQ, |
| 360 | const SQ_CONTENT *wPC, const SQ_CONTENT *bPC); |
| 361 | static const char *Square_str[64] = { |
| 362 | "a1","b1","c1","d1","e1","f1","g1","h1", |
| 363 | "a2","b2","c2","d2","e2","f2","g2","h2", |
| 364 | "a3","b3","c3","d3","e3","f3","g3","h3", |
| 365 | "a4","b4","c4","d4","e4","f4","g4","h4", |
| 366 | "a5","b5","c5","d5","e5","f5","g5","h5", |
| 367 | "a6","b6","c6","d6","e6","f6","g6","h6", |
| 368 | "a7","b7","c7","d7","e7","f7","g7","h7", |
| 369 | "a8","b8","c8","d8","e8","f8","g8","h8" |
| 370 | }; |
| 371 | static const char *P_str[] = { |
| 372 | "--", "P", "N", "B", "R", "Q", "K" |
| 373 | }; |
| 374 | #endif |
| 375 | |
| 376 | #ifdef FOLLOW_EGTB |
| 377 | #define STAB |
| 378 | #define STABCONDITION 1 /*(stm == BL && whiteSQ[0]==H1 && whiteSQ[1]==D1 && whiteSQ[2]==D3 && blackSQ[0]==C2 )*/ |
| 379 | static bool_t GLOB_REPORT = TRUE; |
| 380 | #endif |
| 381 | |
| 382 | #if defined(FOLLOW_EGTB) |
| 383 | static const char *Info_str[8] = { |
| 384 | " Draw", " Wmate", " Bmate", "Illegal", |
| 385 | "~Draw", "~Wmate", "~Bmate", "Unknown" |
| 386 | }; |
| 387 | #endif |
| 388 | |
| 389 | static void list_indexcxx . . $ list_index(49f6e7a06ebc5aa8). (void); |
| 390 | static void fatal_errorcxx . . $ fatal_error(49f6e7a06ebc5aa8).(void) { |
| 391 | exitcxx . . $ exit(3ca292c338df9bb3).(EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:96:9`!); |
| 392 | } |
| 393 | |
| 394 | #ifdef STAB |
| 395 | #define FOLLOW_LU(x,y) {if (GLOB_REPORT) printf ("************** %s: %lu\n", (x), (long unsigned)(y));} |
| 396 | #else |
| 397 | #define FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!(x,y) |
| 398 | #endif |
| 399 | |
| 400 | #ifdef STAB |
| 401 | #define FOLLOW_LULU(x,y,z) {if (GLOB_REPORT) printf ("************** %s: %lu, %lu\n", (x), (long unsigned)(y), (long unsigned)(z));} |
| 402 | #else |
| 403 | #define FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!(x,y,z) |
| 404 | #endif |
| 405 | |
| 406 | #ifdef STAB |
| 407 | #define FOLLOW_label(x) {if (GLOB_REPORT) printf ("************** %s\n", (x));} |
| 408 | #else |
| 409 | #define FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!(x) |
| 410 | #endif |
| 411 | |
| 412 | #ifdef STAB |
| 413 | #define FOLLOW_DTM(msg,dtm) {if (GLOB_REPORT) printf ("************** %s: %lu, info:%s, plies:%lu \n"\ |
| 414 | , (msg), (long unsigned)(dtm), (Info_str[(dtm)&INFOMASK]), (long unsigned)((dtm)>>PLYSHIFT)\ |
| 415 | );} |
| 416 | #else |
| 417 | #define FOLLOW_DTMcxx . . $ `gtb-probe.c:417:10`!(msg,dtm) |
| 418 | #endif |
| 419 | |
| 420 | |
| 421 | /*--------------------------------*\ |
| 422 | | |
| 423 | | |
| 424 | | INDEXING FUNCTIONS |
| 425 | | |
| 426 | | |
| 427 | *---------------------------------*/ |
| 428 | |
| 429 | #define IDX_set_emptycxx . . $ `gtb-probe.c:429:9`!(x) {x=0;x--;} |
| 430 | #define IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(x) (0==(1+(x))) |
| 431 | |
| 432 | #define NO_KKINDEXcxx . . $ `gtb-probe.c:432:9`! NOINDEX |
| 433 | #define MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`! 462 |
| 434 | #define MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`! 576 |
| 435 | #define MAX_PpINDEXcxx . . $ `gtb-probe.c:435:9`! (24 * 48) |
| 436 | /*1128*/ |
| 437 | #define MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! ((63-62) + (62 * (127-62)/2) - 1 + 1) |
| 438 | #define MAX_AAAINDEXcxx . . $ `gtb-probe.c:438:9`! (64*21*31) |
| 439 | #define MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`! (1128) |
| 440 | /* (24*23*22/6) + 24 * (24*23/2) */ |
| 441 | #define MAX_PPP48_INDEXcxx . . $ `gtb-probe.c:441:9`! 8648 |
| 442 | |
| 443 | /* VARIABLES */ |
| 444 | |
| 445 | static index_tcxx . . $ index_t# kkidxcxx . . $ kkidx. [64] [64]; |
| 446 | static index_tcxx . . $ index_t# ppidxcxx . . $ ppidx. [24] [48]; |
| 447 | static index_tcxx . . $ index_t# pp48_idxcxx . . $ pp48_idx.[48][48]; |
| 448 | static index_tcxx . . $ index_t# ppp48_idxcxx . . $ ppp48_idx.[48][48][48]; |
| 449 | |
| 450 | static sq_tcxx . . $ sq_t# wksqcxx . . $ wksq. [MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!]; |
| 451 | static sq_tcxx . . $ sq_t# bksqcxx . . $ bksq. [MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!]; |
| 452 | static sq_tcxx . . $ sq_t# pp48_sq_xcxx . . $ pp48_sq_x.[MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`!]; |
| 453 | static sq_tcxx . . $ sq_t# pp48_sq_ycxx . . $ pp48_sq_y.[MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`!]; |
| 454 | |
| 455 | static index_tcxx . . $ index_t# pp_hi24cxx . . $ pp_hi24. [MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!]; /* was unsigned int */ |
| 456 | static index_tcxx . . $ index_t# pp_lo48cxx . . $ pp_lo48. [MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!]; |
| 457 | static unsigned int fliptcxx . . $ flipt. [64] [64]; |
| 458 | static index_tcxx . . $ index_t# aaidxcxx . . $ aaidx. [64] [64]; /* was unsigned int */ |
| 459 | static unsigned char aabasecxx . . $ aabase. [MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!]; |
| 460 | |
| 461 | static uint8_tcxx . . $ uint8_t# ppp48_sq_xcxx . . $ ppp48_sq_x.[MAX_PPP48_INDEXcxx . . $ `gtb-probe.c:441:9`!]; |
| 462 | static uint8_tcxx . . $ uint8_t# ppp48_sq_ycxx . . $ ppp48_sq_y.[MAX_PPP48_INDEXcxx . . $ `gtb-probe.c:441:9`!]; |
| 463 | static uint8_tcxx . . $ uint8_t# ppp48_sq_zcxx . . $ ppp48_sq_z.[MAX_PPP48_INDEXcxx . . $ `gtb-probe.c:441:9`!]; |
| 464 | |
| 465 | /* FUNCTIONS */ |
| 466 | |
| 467 | static void init_indexingcxx . . $ init_indexing(d4f767463ce0a6b3). (int verbosity); |
| 468 | static void norm_kkindexcxx . . $ norm_kkindex(174f9aab2dec3bcb). (SQUAREcxx . . $ SQUARE# x, SQUAREcxx . . $ SQUARE# y, /*@out@*/ SQUAREcxx . . $ SQUARE# *pi, /*@out@*/ SQUAREcxx . . $ SQUARE# *pj); |
| 469 | static void pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (SQUAREcxx . . $ SQUARE# a, SQUAREcxx . . $ SQUARE# b, /*@out@*/ SQUAREcxx . . $ SQUARE# *out_anchor, /*@out@*/ SQUAREcxx . . $ SQUARE# *out_loosen); |
| 470 | |
| 471 | static index_tcxx . . $ index_t# wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (SQUAREcxx . . $ SQUARE# pawn); |
| 472 | static index_tcxx . . $ index_t# wsq_to_pidx48cxx . . $ wsq_to_pidx48(4c679297bf94b9eb). (SQUAREcxx . . $ SQUARE# pawn); |
| 473 | static SQUAREcxx . . $ SQUARE# pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427). (index_tcxx . . $ index_t# a); |
| 474 | static SQUAREcxx . . $ SQUARE# pidx48_to_wsqcxx . . $ pidx48_to_wsq(46cc46841198e427). (index_tcxx . . $ index_t# a); |
| 475 | |
| 476 | static SQUAREcxx . . $ SQUARE# flipWEcxx . . $ flipWE(2141b656ce2cc063). (SQUAREcxx . . $ SQUARE# x) { return x ^ 07;} |
| 477 | static SQUAREcxx . . $ SQUARE# flipNScxx . . $ flipNS(2141b656ce2cc063). (SQUAREcxx . . $ SQUARE# x) { return x ^ 070;} |
| 478 | static SQUAREcxx . . $ SQUARE# flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (SQUAREcxx . . $ SQUARE# x) { return ((x&7)<<3) | (x>>3);} |
| 479 | static SQUAREcxx . . $ SQUARE# getcolcxx . . $ getcol(2141b656ce2cc063). (SQUAREcxx . . $ SQUARE# x) { return x & 7;} |
| 480 | static SQUAREcxx . . $ SQUARE# getrowcxx . . $ getrow(2141b656ce2cc063). (SQUAREcxx . . $ SQUARE# x) { return x >> 3;} |
| 481 | static bool_tcxx . . $ bool_t# in_queensidecxx . . $ in_queenside(4c679297bf94b9eb). (sq_tcxx . . $ sq_t# x) { return 0 == (x & (1<<2));} |
| 482 | |
| 483 | /* 1:0 */ |
| 484 | static void kxk_indextopccxx . . $ kxk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 485 | |
| 486 | /* 2:0 */ |
| 487 | static void kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 488 | static void kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 489 | static void kaak_indextopccxx . . $ kaak_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 490 | |
| 491 | /* 2:1 */ |
| 492 | static void kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 493 | static void kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 494 | |
| 495 | /* 3:0 */ |
| 496 | static void kabck_indextopccxx . . $ kabck_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 497 | static void kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 498 | static void kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 499 | static void kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 500 | |
| 501 | /* one pawn */ |
| 502 | static void kpk_indextopccxx . . $ kpk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 503 | |
| 504 | /* 1:1 one pawn */ |
| 505 | static void kakp_indextopccxx . . $ kakp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 506 | |
| 507 | /* 2:0 one pawn */ |
| 508 | static void kapk_indextopccxx . . $ kapk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 509 | |
| 510 | /* 2:0 two pawns */ |
| 511 | static void kppk_indextopccxx . . $ kppk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 512 | |
| 513 | /* 2:1 one pawn */ |
| 514 | static void kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 515 | static void kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 516 | static void kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 517 | |
| 518 | /* 2:1 + 3:0 two pawns */ |
| 519 | static void kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 520 | static void kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 521 | static void kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 522 | |
| 523 | /* 3:0 one pawn */ |
| 524 | static void kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 525 | static void kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 526 | |
| 527 | /* three pawns */ |
| 528 | static void kpppk_indextopccxx . . $ kpppk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 529 | static void kppkp_indextopccxx . . $ kppkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 530 | |
| 531 | /* 1:1 two pawns */ |
| 532 | static void kpkp_indextopccxx . . $ kpkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 533 | |
| 534 | /* corresponding pc to index */ |
| 535 | static bool_tcxx . . $ bool_t# kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 536 | static bool_tcxx . . $ bool_t# kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 537 | static bool_tcxx . . $ bool_t# kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 538 | static bool_tcxx . . $ bool_t# kpk_pctoindexcxx . . $ kpk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 539 | static bool_tcxx . . $ bool_t# kakp_pctoindexcxx . . $ kakp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 540 | static bool_tcxx . . $ bool_t# kapk_pctoindexcxx . . $ kapk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 541 | static bool_tcxx . . $ bool_t# kppk_pctoindexcxx . . $ kppk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 542 | static bool_tcxx . . $ bool_t# kaak_pctoindexcxx . . $ kaak_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 543 | static bool_tcxx . . $ bool_t# kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 544 | |
| 545 | static bool_tcxx . . $ bool_t# kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out);/**/ |
| 546 | |
| 547 | static bool_tcxx . . $ bool_t# kabck_pctoindexcxx . . $ kabck_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 548 | static bool_tcxx . . $ bool_t# kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out);/**/ |
| 549 | static bool_tcxx . . $ bool_t# kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 550 | static bool_tcxx . . $ bool_t# kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out);/**/ |
| 551 | static bool_tcxx . . $ bool_t# kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 552 | static bool_tcxx . . $ bool_t# kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 553 | static bool_tcxx . . $ bool_t# kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 554 | static bool_tcxx . . $ bool_t# kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out); |
| 555 | static bool_tcxx . . $ bool_t# kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 556 | static bool_tcxx . . $ bool_t# kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 557 | static bool_tcxx . . $ bool_t# kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 558 | static bool_tcxx . . $ bool_t# kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 559 | static bool_tcxx . . $ bool_t# kppkp_pctoindexcxx . . $ kppkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 560 | static bool_tcxx . . $ bool_t# kpppk_pctoindexcxx . . $ kpppk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 561 | static bool_tcxx . . $ bool_t# kpkp_pctoindexcxx . . $ kpkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, /*@out@*/ index_tcxx . . $ index_t# *out); |
| 562 | |
| 563 | /* testing functions */ |
| 564 | static bool_tcxx . . $ bool_t# test_kppkcxx . . $ test_kppk(b126dc7c1de90089). (void); |
| 565 | static bool_tcxx . . $ bool_t# test_kaakbcxx . . $ test_kaakb(b126dc7c1de90089). (void); |
| 566 | static bool_tcxx . . $ bool_t# test_kaabkcxx . . $ test_kaabk(b126dc7c1de90089). (void); |
| 567 | static bool_tcxx . . $ bool_t# test_kaaakcxx . . $ test_kaaak(b126dc7c1de90089). (void); |
| 568 | static bool_tcxx . . $ bool_t# test_kabbkcxx . . $ test_kabbk(b126dc7c1de90089). (void); |
| 569 | static bool_tcxx . . $ bool_t# test_kapkbcxx . . $ test_kapkb(b126dc7c1de90089). (void); |
| 570 | static bool_tcxx . . $ bool_t# test_kabkpcxx . . $ test_kabkp(b126dc7c1de90089). (void); |
| 571 | static bool_tcxx . . $ bool_t# test_kppkacxx . . $ test_kppka(b126dc7c1de90089). (void); |
| 572 | static bool_tcxx . . $ bool_t# test_kappkcxx . . $ test_kappk(b126dc7c1de90089). (void); |
| 573 | static bool_tcxx . . $ bool_t# test_kapkpcxx . . $ test_kapkp(b126dc7c1de90089). (void); |
| 574 | static bool_tcxx . . $ bool_t# test_kabpkcxx . . $ test_kabpk(b126dc7c1de90089). (void); |
| 575 | static bool_tcxx . . $ bool_t# test_kaapkcxx . . $ test_kaapk(b126dc7c1de90089). (void); |
| 576 | static bool_tcxx . . $ bool_t# test_kaakpcxx . . $ test_kaakp(b126dc7c1de90089). (void); |
| 577 | static bool_tcxx . . $ bool_t# test_kppkpcxx . . $ test_kppkp(b126dc7c1de90089). (void); |
| 578 | static bool_tcxx . . $ bool_t# test_kpppkcxx . . $ test_kpppk(b126dc7c1de90089). (void); |
| 579 | |
| 580 | static unsigned flip_typecxx . . $ flip_type(83f10ac8959d5577). (SQUAREcxx . . $ SQUARE# x, SQUAREcxx . . $ SQUARE# y); |
| 581 | static index_tcxx . . $ index_t# init_kkidxcxx . . $ init_kkidx(b126dc7c1de90089). (void); |
| 582 | static index_tcxx . . $ index_t# init_ppidxcxx . . $ init_ppidx(b126dc7c1de90089). (void); |
| 583 | static void init_fliptcxx . . $ init_flipt(49f6e7a06ebc5aa8). (void); |
| 584 | static index_tcxx . . $ index_t# init_aaidxcxx . . $ init_aaidx(b126dc7c1de90089). (void); |
| 585 | static index_tcxx . . $ index_t# init_aaacxx . . $ init_aaa(b126dc7c1de90089). (void); |
| 586 | static index_tcxx . . $ index_t# init_pp48_idxcxx . . $ init_pp48_idx(b126dc7c1de90089). (void); |
| 587 | static index_tcxx . . $ index_t# init_ppp48_idxcxx . . $ init_ppp48_idx(b126dc7c1de90089). (void); |
| 588 | |
| 589 | enum TB_INDEXEScxx . . $ TB_INDEXES# |
| 590 | { MAX_KXKcxx . . $ MAX_KXK. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*64 |
| 591 | ,MAX_kabkcxx . . $ MAX_kabk. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*64*64 |
| 592 | ,MAX_kakbcxx . . $ MAX_kakb. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*64*64 |
| 593 | ,MAX_kpkcxx . . $ MAX_kpk. = 24*64*64 |
| 594 | ,MAX_kakpcxx . . $ MAX_kakp. = 24*64*64*64 |
| 595 | ,MAX_kapkcxx . . $ MAX_kapk. = 24*64*64*64 |
| 596 | ,MAX_kppkcxx . . $ MAX_kppk. = MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!*64*64 |
| 597 | ,MAX_kpkpcxx . . $ MAX_kpkp. = MAX_PpINDEXcxx . . $ `gtb-probe.c:435:9`!*64*64 |
| 598 | ,MAX_kaakcxx . . $ MAX_kaak. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 599 | ,MAX_kabkccxx . . $ MAX_kabkc. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*64*64*64 |
| 600 | ,MAX_kabckcxx . . $ MAX_kabck. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*64*64*64 |
| 601 | ,MAX_kaakbcxx . . $ MAX_kaakb. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!*64 |
| 602 | ,MAX_kaabkcxx . . $ MAX_kaabk. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!*64 |
| 603 | ,MAX_kabbkcxx . . $ MAX_kabbk. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!*64 |
| 604 | ,MAX_kaaakcxx . . $ MAX_kaaak. = MAX_KKINDEXcxx . . $ `gtb-probe.c:433:9`!*MAX_AAAINDEXcxx . . $ `gtb-probe.c:438:9`! |
| 605 | ,MAX_kapkbcxx . . $ MAX_kapkb. = 24*64*64*64*64 |
| 606 | ,MAX_kabkpcxx . . $ MAX_kabkp. = 24*64*64*64*64 |
| 607 | ,MAX_kabpkcxx . . $ MAX_kabpk. = 24*64*64*64*64 |
| 608 | ,MAX_kppkacxx . . $ MAX_kppka. = MAX_kppkcxx . . $ MAX_kppk.*64 |
| 609 | ,MAX_kappkcxx . . $ MAX_kappk. = MAX_kppkcxx . . $ MAX_kppk.*64 |
| 610 | ,MAX_kapkpcxx . . $ MAX_kapkp. = MAX_kpkpcxx . . $ MAX_kpkp.*64 |
| 611 | ,MAX_kaapkcxx . . $ MAX_kaapk. = 24*MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!*64*64 |
| 612 | ,MAX_kaakpcxx . . $ MAX_kaakp. = 24*MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!*64*64 |
| 613 | ,MAX_kppkpcxx . . $ MAX_kppkp. = 24*MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`!*64*64 |
| 614 | ,MAX_kpppkcxx . . $ MAX_kpppk. = MAX_PPP48_INDEXcxx . . $ `gtb-probe.c:441:9`!*64*64 |
| 615 | }; |
| 616 | |
| 617 | #if defined(SHARED_forbuilding) |
| 618 | extern index_t |
| 619 | biggest_memory_needed (void) { |
| 620 | return MAX_kabkc; |
| 621 | } |
| 622 | #endif |
| 623 | |
| 624 | /*--------------------------------*\ |
| 625 | | |
| 626 | | |
| 627 | | CACHE PROTOTYPES |
| 628 | | |
| 629 | | |
| 630 | *---------------------------------*/ |
| 631 | |
| 632 | #if !defined(SHARED_forbuilding) |
| 633 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# get_dtmcxx . . $ get_dtm(cc2c15251078b5e5). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, dtm_tcxx . . $ dtm_t# *out, bool_tcxx . . $ bool_t# probe_hard); |
| 634 | #endif |
| 635 | |
| 636 | static bool_tcxx . . $ bool_t# get_dtm_from_cachecxx . . $ get_dtm_from_cache(9d61391afa8ead84). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, dtm_tcxx . . $ dtm_t# *out); |
| 637 | |
| 638 | |
| 639 | /*--------------------------------*\ |
| 640 | | |
| 641 | | |
| 642 | | INIT |
| 643 | | |
| 644 | | |
| 645 | *---------------------------------*/ |
| 646 | |
| 647 | static bool_tcxx . . $ bool_t# fd_initcxx . . $ fd_init(6e448be9e28f017c). (struct filesopencxx . . $ filesopen# *pfd); |
| 648 | static void fd_donecxx . . $ fd_done(e44a433d8147fa91). (struct filesopencxx . . $ filesopen# *pfd); |
| 649 | |
| 650 | static void RAM_egtbfreecxx . . $ RAM_egtbfree(49f6e7a06ebc5aa8). (void); |
| 651 | |
| 652 | /*--------------------------------------------------------------------------*/ |
| 653 | #if !defined(SHARED_forbuilding) |
| 654 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void egtb_freememcxx . . $ egtb_freemem(d4f767463ce0a6b3). (int i); |
| 655 | #endif |
| 656 | |
| 657 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! struct endgamekeycxx . . $ endgamekey# egkeycxx . . $ egkey.[] = { |
| 658 | |
| 659 | {0, "kqk", MAX_KXKcxx . . $ MAX_KXK., 1, kxk_indextopccxx . . $ kxk_indextopc(21a38811104ee146)., kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 660 | {1, "krk", MAX_KXKcxx . . $ MAX_KXK., 1, kxk_indextopccxx . . $ kxk_indextopc(21a38811104ee146)., kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 661 | {2, "kbk", MAX_KXKcxx . . $ MAX_KXK., 1, kxk_indextopccxx . . $ kxk_indextopc(21a38811104ee146)., kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 662 | {3, "knk", MAX_KXKcxx . . $ MAX_KXK., 1, kxk_indextopccxx . . $ kxk_indextopc(21a38811104ee146)., kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 663 | {4, "kpk", MAX_kpkcxx . . $ MAX_kpk., 24,kpk_indextopccxx . . $ kpk_indextopc(21a38811104ee146)., kpk_pctoindexcxx . . $ kpk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 664 | /* 4 pieces */ |
| 665 | {5, "kqkq", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 666 | {6, "kqkr", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 667 | {7, "kqkb", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 668 | {8, "kqkn", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 669 | |
| 670 | {9, "krkr", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 671 | {10,"krkb", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 672 | {11,"krkn", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 673 | |
| 674 | {12,"kbkb", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 675 | {13,"kbkn", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 676 | |
| 677 | {14,"knkn", MAX_kakbcxx . . $ MAX_kakb., 1, kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146)., kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 678 | /**/ |
| 679 | {15,"kqqk", MAX_kaakcxx . . $ MAX_kaak., 1, kaak_indextopccxx . . $ kaak_indextopc(21a38811104ee146)., kaak_pctoindexcxx . . $ kaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 680 | {16,"kqrk", MAX_kabkcxx . . $ MAX_kabk., 1, kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146)., kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 681 | {17,"kqbk", MAX_kabkcxx . . $ MAX_kabk., 1, kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146)., kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 682 | {18,"kqnk", MAX_kabkcxx . . $ MAX_kabk., 1, kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146)., kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 683 | |
| 684 | {19,"krrk", MAX_kaakcxx . . $ MAX_kaak., 1, kaak_indextopccxx . . $ kaak_indextopc(21a38811104ee146)., kaak_pctoindexcxx . . $ kaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 685 | {20,"krbk", MAX_kabkcxx . . $ MAX_kabk., 1, kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146)., kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 686 | {21,"krnk", MAX_kabkcxx . . $ MAX_kabk., 1, kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146)., kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 687 | |
| 688 | {22,"kbbk", MAX_kaakcxx . . $ MAX_kaak., 1, kaak_indextopccxx . . $ kaak_indextopc(21a38811104ee146)., kaak_pctoindexcxx . . $ kaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 689 | {23,"kbnk", MAX_kabkcxx . . $ MAX_kabk., 1, kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146)., kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 690 | |
| 691 | {24,"knnk", MAX_kaakcxx . . $ MAX_kaak., 1, kaak_indextopccxx . . $ kaak_indextopc(21a38811104ee146)., kaak_pctoindexcxx . . $ kaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 692 | /**/ |
| 693 | /**/ |
| 694 | {25,"kqkp", MAX_kakpcxx . . $ MAX_kakp., 24,kakp_indextopccxx . . $ kakp_indextopc(21a38811104ee146)., kakp_pctoindexcxx . . $ kakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 695 | {26,"krkp", MAX_kakpcxx . . $ MAX_kakp., 24,kakp_indextopccxx . . $ kakp_indextopc(21a38811104ee146)., kakp_pctoindexcxx . . $ kakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 696 | {27,"kbkp", MAX_kakpcxx . . $ MAX_kakp., 24,kakp_indextopccxx . . $ kakp_indextopc(21a38811104ee146)., kakp_pctoindexcxx . . $ kakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 697 | {28,"knkp", MAX_kakpcxx . . $ MAX_kakp., 24,kakp_indextopccxx . . $ kakp_indextopc(21a38811104ee146)., kakp_pctoindexcxx . . $ kakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 698 | /**/ |
| 699 | {29,"kqpk", MAX_kapkcxx . . $ MAX_kapk., 24,kapk_indextopccxx . . $ kapk_indextopc(21a38811104ee146)., kapk_pctoindexcxx . . $ kapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 700 | {30,"krpk", MAX_kapkcxx . . $ MAX_kapk., 24,kapk_indextopccxx . . $ kapk_indextopc(21a38811104ee146)., kapk_pctoindexcxx . . $ kapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 701 | {31,"kbpk", MAX_kapkcxx . . $ MAX_kapk., 24,kapk_indextopccxx . . $ kapk_indextopc(21a38811104ee146)., kapk_pctoindexcxx . . $ kapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 702 | {32,"knpk", MAX_kapkcxx . . $ MAX_kapk., 24,kapk_indextopccxx . . $ kapk_indextopc(21a38811104ee146)., kapk_pctoindexcxx . . $ kapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 703 | /**/ |
| 704 | {33,"kppk", MAX_kppkcxx . . $ MAX_kppk., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`! ,kppk_indextopccxx . . $ kppk_indextopc(21a38811104ee146)., kppk_pctoindexcxx . . $ kppk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 705 | /**/ |
| 706 | {34,"kpkp", MAX_kpkpcxx . . $ MAX_kpkp., MAX_PpINDEXcxx . . $ `gtb-probe.c:435:9`! ,kpkp_indextopccxx . . $ kpkp_indextopc(21a38811104ee146)., kpkp_pctoindexcxx . . $ kpkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 707 | /**/ |
| 708 | /**/ |
| 709 | /* 5 pieces */ |
| 710 | { 35,"kqqqk", MAX_kaaakcxx . . $ MAX_kaaak., 1, kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146)., kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 711 | { 36,"kqqrk", MAX_kaabkcxx . . $ MAX_kaabk., 1, kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146)., kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 712 | { 37,"kqqbk", MAX_kaabkcxx . . $ MAX_kaabk., 1, kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146)., kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 713 | { 38,"kqqnk", MAX_kaabkcxx . . $ MAX_kaabk., 1, kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146)., kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 714 | { 39,"kqrrk", MAX_kabbkcxx . . $ MAX_kabbk., 1, kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146)., kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 715 | { 40,"kqrbk", MAX_kabckcxx . . $ MAX_kabck., 1, kabck_indextopccxx . . $ kabck_indextopc(21a38811104ee146)., kabck_pctoindexcxx . . $ kabck_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 716 | { 41,"kqrnk", MAX_kabckcxx . . $ MAX_kabck., 1, kabck_indextopccxx . . $ kabck_indextopc(21a38811104ee146)., kabck_pctoindexcxx . . $ kabck_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 717 | { 42,"kqbbk", MAX_kabbkcxx . . $ MAX_kabbk., 1, kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146)., kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 718 | { 43,"kqbnk", MAX_kabckcxx . . $ MAX_kabck., 1, kabck_indextopccxx . . $ kabck_indextopc(21a38811104ee146)., kabck_pctoindexcxx . . $ kabck_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 719 | { 44,"kqnnk", MAX_kabbkcxx . . $ MAX_kabbk., 1, kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146)., kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 720 | { 45,"krrrk", MAX_kaaakcxx . . $ MAX_kaaak., 1, kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146)., kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 721 | { 46,"krrbk", MAX_kaabkcxx . . $ MAX_kaabk., 1, kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146)., kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 722 | { 47,"krrnk", MAX_kaabkcxx . . $ MAX_kaabk., 1, kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146)., kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 723 | { 48,"krbbk", MAX_kabbkcxx . . $ MAX_kabbk., 1, kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146)., kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 724 | { 49,"krbnk", MAX_kabckcxx . . $ MAX_kabck., 1, kabck_indextopccxx . . $ kabck_indextopc(21a38811104ee146)., kabck_pctoindexcxx . . $ kabck_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 725 | { 50,"krnnk", MAX_kabbkcxx . . $ MAX_kabbk., 1, kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146)., kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 726 | { 51,"kbbbk", MAX_kaaakcxx . . $ MAX_kaaak., 1, kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146)., kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 727 | { 52,"kbbnk", MAX_kaabkcxx . . $ MAX_kaabk., 1, kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146)., kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 728 | { 53,"kbnnk", MAX_kabbkcxx . . $ MAX_kabbk., 1, kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146)., kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 729 | { 54,"knnnk", MAX_kaaakcxx . . $ MAX_kaaak., 1, kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146)., kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 730 | { 55,"kqqkq", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 731 | { 56,"kqqkr", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 732 | { 57,"kqqkb", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 733 | { 58,"kqqkn", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 734 | { 59,"kqrkq", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 735 | { 60,"kqrkr", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 736 | { 61,"kqrkb", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 737 | { 62,"kqrkn", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 738 | { 63,"kqbkq", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 739 | { 64,"kqbkr", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 740 | { 65,"kqbkb", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 741 | { 66,"kqbkn", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 742 | { 67,"kqnkq", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 743 | { 68,"kqnkr", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 744 | { 69,"kqnkb", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 745 | { 70,"kqnkn", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 746 | { 71,"krrkq", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 747 | { 72,"krrkr", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 748 | { 73,"krrkb", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 749 | { 74,"krrkn", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 750 | { 75,"krbkq", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 751 | { 76,"krbkr", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 752 | { 77,"krbkb", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 753 | { 78,"krbkn", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 754 | { 79,"krnkq", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 755 | { 80,"krnkr", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 756 | { 81,"krnkb", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 757 | { 82,"krnkn", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 758 | { 83,"kbbkq", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 759 | { 84,"kbbkr", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 760 | { 85,"kbbkb", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 761 | { 86,"kbbkn", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 762 | { 87,"kbnkq", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 763 | { 88,"kbnkr", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 764 | { 89,"kbnkb", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 765 | { 90,"kbnkn", MAX_kabkccxx . . $ MAX_kabkc., 1, kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146)., kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 766 | { 91,"knnkq", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 767 | { 92,"knnkr", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 768 | { 93,"knnkb", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 769 | { 94,"knnkn", MAX_kaakbcxx . . $ MAX_kaakb., 1, kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146)., kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 770 | |
| 771 | { 95,"kqqpk", MAX_kaapkcxx . . $ MAX_kaapk., 24, kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146)., kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 772 | { 96,"kqrpk", MAX_kabpkcxx . . $ MAX_kabpk., 24, kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146)., kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 773 | { 97,"kqbpk", MAX_kabpkcxx . . $ MAX_kabpk., 24, kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146)., kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 774 | { 98,"kqnpk", MAX_kabpkcxx . . $ MAX_kabpk., 24, kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146)., kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 775 | { 99,"krrpk", MAX_kaapkcxx . . $ MAX_kaapk., 24, kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146)., kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 776 | {100,"krbpk", MAX_kabpkcxx . . $ MAX_kabpk., 24, kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146)., kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 777 | {101,"krnpk", MAX_kabpkcxx . . $ MAX_kabpk., 24, kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146)., kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 778 | {102,"kbbpk", MAX_kaapkcxx . . $ MAX_kaapk., 24, kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146)., kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 779 | {103,"kbnpk", MAX_kabpkcxx . . $ MAX_kabpk., 24, kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146)., kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 780 | {104,"knnpk", MAX_kaapkcxx . . $ MAX_kaapk., 24, kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146)., kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 781 | |
| 782 | {105,"kqppk", MAX_kappkcxx . . $ MAX_kappk., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146)., kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 783 | {106,"krppk", MAX_kappkcxx . . $ MAX_kappk., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146)., kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 784 | {107,"kbppk", MAX_kappkcxx . . $ MAX_kappk., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146)., kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 785 | {108,"knppk", MAX_kappkcxx . . $ MAX_kappk., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146)., kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 786 | |
| 787 | {109,"kqpkq", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 788 | {110,"kqpkr", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 789 | {111,"kqpkb", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 790 | {112,"kqpkn", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 791 | {113,"krpkq", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 792 | {114,"krpkr", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 793 | {115,"krpkb", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 794 | {116,"krpkn", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 795 | {117,"kbpkq", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 796 | {118,"kbpkr", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 797 | {119,"kbpkb", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 798 | {120,"kbpkn", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 799 | {121,"knpkq", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 800 | {122,"knpkr", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 801 | {123,"knpkb", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 802 | {124,"knpkn", MAX_kapkbcxx . . $ MAX_kapkb., 24, kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146)., kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 803 | |
| 804 | {125,"kppkq", MAX_kppkacxx . . $ MAX_kppka., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146)., kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 805 | {126,"kppkr", MAX_kppkacxx . . $ MAX_kppka., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146)., kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 806 | {127,"kppkb", MAX_kppkacxx . . $ MAX_kppka., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146)., kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 807 | {128,"kppkn", MAX_kppkacxx . . $ MAX_kppka., MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!, kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146)., kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 808 | |
| 809 | {129,"kqqkp", MAX_kaakpcxx . . $ MAX_kaakp., 24, kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146)., kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 810 | {130,"kqrkp", MAX_kabkpcxx . . $ MAX_kabkp., 24, kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146)., kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 811 | {131,"kqbkp", MAX_kabkpcxx . . $ MAX_kabkp., 24, kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146)., kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 812 | {132,"kqnkp", MAX_kabkpcxx . . $ MAX_kabkp., 24, kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146)., kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 813 | {133,"krrkp", MAX_kaakpcxx . . $ MAX_kaakp., 24, kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146)., kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 814 | {134,"krbkp", MAX_kabkpcxx . . $ MAX_kabkp., 24, kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146)., kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 815 | {135,"krnkp", MAX_kabkpcxx . . $ MAX_kabkp., 24, kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146)., kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 816 | {136,"kbbkp", MAX_kaakpcxx . . $ MAX_kaakp., 24, kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146)., kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 817 | {137,"kbnkp", MAX_kabkpcxx . . $ MAX_kabkp., 24, kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146)., kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 818 | {138,"knnkp", MAX_kaakpcxx . . $ MAX_kaakp., 24, kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146)., kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 819 | |
| 820 | {139,"kqpkp", MAX_kapkpcxx . . $ MAX_kapkp., MAX_PpINDEXcxx . . $ `gtb-probe.c:435:9`!, kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146)., kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 821 | {140,"krpkp", MAX_kapkpcxx . . $ MAX_kapkp., MAX_PpINDEXcxx . . $ `gtb-probe.c:435:9`!, kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146)., kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 822 | {141,"kbpkp", MAX_kapkpcxx . . $ MAX_kapkp., MAX_PpINDEXcxx . . $ `gtb-probe.c:435:9`!, kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146)., kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 823 | {142,"knpkp", MAX_kapkpcxx . . $ MAX_kapkp., MAX_PpINDEXcxx . . $ `gtb-probe.c:435:9`!, kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146)., kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 824 | |
| 825 | {143,"kppkp", MAX_kppkpcxx . . $ MAX_kppkp., 24*MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`!, kppkp_indextopccxx . . $ kppkp_indextopc(21a38811104ee146)., kppkp_pctoindexcxx . . $ kppkp_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 826 | {144,"kpppk", MAX_kpppkcxx . . $ MAX_kpppk., MAX_PPP48_INDEXcxx . . $ `gtb-probe.c:441:9`!, kpppk_indextopccxx . . $ kpppk_indextopc(21a38811104ee146)., kpppk_pctoindexcxx . . $ kpppk_pctoindex(9bb041263e557a58)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! , NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0, 0 }, |
| 827 | |
| 828 | {MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, 0, 1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! ,0 ,0} |
| 829 | |
| 830 | }; |
| 831 | |
| 832 | static int eg_was_opencxx . . $ eg_was_open.[MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!]; |
| 833 | |
| 834 | static uint64_tcxx . . $ uint64_t# Bytes_readcxx . . $ Bytes_read. = 0; |
| 835 | |
| 836 | /****************************************************************************\ |
| 837 | | |
| 838 | | |
| 839 | | PATH MANAGEMENT ZONE |
| 840 | | |
| 841 | | |
| 842 | \****************************************************************************/ |
| 843 | |
| 844 | #define MAXPATHLENcxx . . $ `gtb-probe.c:844:9`! tb_MAXPATHLEN |
| 845 | #define MAX_GTBPATHScxx . . $ `gtb-probe.c:845:9`! 10 |
| 846 | |
| 847 | static int Gtbpath_end_indexcxx . . $ Gtbpath_end_index. = 0; |
| 848 | static const char ** Gtbpathcxx . . $ Gtbpath. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 849 | |
| 850 | /*---------------- EXTERNAL PATH MANAGEMENT --------------------------------*/ |
| 851 | |
| 852 | extern const char *tbpaths_getmaincxx . . $ tbpaths_getmain(33a1f659e94feb42). (void) { return Gtbpathcxx . . $ Gtbpath.[0];} |
| 853 | |
| 854 | extern const char ** |
| 855 | tbpaths_initcxx . . $ tbpaths_init(5435fb1d25b36c11).(void) |
| 856 | { |
| 857 | const char **newps; |
| 858 | newps = (const char **) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (sizeof (char *)); |
| 859 | if (newps != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 860 | newps[0] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 861 | } |
| 862 | return newps; |
| 863 | } |
| 864 | |
| 865 | static const char ** |
| 866 | tbpaths_add_singlecxx . . $ tbpaths_add_single(a255ab5223acb6a2).(const char **ps, const char *newpath) |
| 867 | { |
| 868 | size_t counter; |
| 869 | const char **newps; |
| 870 | size_t i, psize; |
| 871 | char *ppath; |
| 872 | |
| 873 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == ps) |
| 874 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 875 | |
| 876 | psize = strlencxx . . $ strlen(751346f8406fd082).(newpath) + 1; |
| 877 | ppath = (char *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (psize * sizeof (char)); |
| 878 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == ppath) |
| 879 | return ps; /* failed to incorporate a new path */ |
| 880 | for (i = 0; i < psize; i++) ppath[i] = newpath[i]; |
| 881 | |
| 882 | for (counter = 0; ps[counter] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; counter++) |
| 883 | ; |
| 884 | |
| 885 | /* cast to deal with const poisoning */ |
| 886 | newps = (const char **) realloccxx . . $ realloc(417ab160f6baadc6). ((char **)ps, sizeof(char *) * (counter+2)); |
| 887 | if (newps != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 888 | newps [counter] = ppath; |
| 889 | newps [counter+1] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 890 | } |
| 891 | return newps; |
| 892 | } |
| 893 | |
| 894 | |
| 895 | extern const char ** |
| 896 | tbpaths_addcxx . . $ tbpaths_add(a255ab5223acb6a2).(const char **ps, const char *newpath) |
| 897 | { |
| 898 | size_t i, psize; |
| 899 | char *mpath; |
| 900 | |
| 901 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == ps) |
| 902 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 903 | |
| 904 | psize = strlencxx . . $ strlen(751346f8406fd082).(newpath) + 1; |
| 905 | mpath = (char *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (psize * sizeof (char)); |
| 906 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == mpath) { |
| 907 | return ps; /* failed to incorporate a new path */ |
| 908 | } |
| 909 | for (i = 0; i < psize; i++) mpath[i] = newpath[i]; |
| 910 | |
| 911 | for (i = 0; i < psize; i++) { |
| 912 | if(';' == mpath[i]) |
| 913 | mpath[i] = '\0'; |
| 914 | } |
| 915 | |
| 916 | for (i = 0;;) { |
| 917 | while (i < psize && mpath[i] == '\0') i++; |
| 918 | if (i >= psize) break; |
| 919 | ps = tbpaths_add_singlecxx . . $ tbpaths_add_single(a255ab5223acb6a2). (ps, &mpath[i]); |
| 920 | while (i < psize && mpath[i] != '\0') i++; |
| 921 | } |
| 922 | |
| 923 | freecxx . . $ free(5d22bdacc48458e8).(mpath); |
| 924 | return ps; |
| 925 | } |
| 926 | |
| 927 | |
| 928 | extern const char ** |
| 929 | tbpaths_donecxx . . $ tbpaths_done(54f2ba6f4d2e2b5e).(const char **ps) |
| 930 | { |
| 931 | int counter; |
| 932 | void *q; |
| 933 | |
| 934 | if (ps != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 935 | for (counter = 0; ps[counter] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; counter++) { |
| 936 | /* cast to deal with const poisoning */ |
| 937 | void *p = (void *) ps[counter]; |
| 938 | freecxx . . $ free(5d22bdacc48458e8).(p); |
| 939 | } |
| 940 | /* cast to deal with const poisoning */ |
| 941 | q = (void *) ps; |
| 942 | freecxx . . $ free(5d22bdacc48458e8).(q); |
| 943 | } |
| 944 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 945 | } |
| 946 | |
| 947 | /*---------------- PATH INITIALIZATION ROUTINES ----------------------------*/ |
| 948 | |
| 949 | static void path_system_resetcxx . . $ path_system_reset(49f6e7a06ebc5aa8).(void) {Gtbpath_end_indexcxx . . $ Gtbpath_end_index. = 0;} |
| 950 | |
| 951 | static bool_tcxx . . $ bool_t# |
| 952 | path_system_initcxx . . $ path_system_init(15355eb6db2855df). (const char **path) |
| 953 | { |
| 954 | size_t i; |
| 955 | size_t sz; |
| 956 | const char *x; |
| 957 | bool_tcxx . . $ bool_t# ok = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 958 | path_system_resetcxx . . $ path_system_reset(49f6e7a06ebc5aa8).(); |
| 959 | |
| 960 | if (path == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 961 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 962 | } |
| 963 | |
| 964 | /* calculate needed size for Gtbpath */ |
| 965 | i = 0; |
| 966 | do { |
| 967 | x = path[i++]; |
| 968 | } while (x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!); |
| 969 | sz = i; /* sz includes the NULL */ |
| 970 | |
| 971 | |
| 972 | Gtbpathcxx . . $ Gtbpath. = (const char **) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (sz * sizeof(char *)); |
| 973 | |
| 974 | if (Gtbpathcxx . . $ Gtbpath.) { |
| 975 | |
| 976 | ok = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 977 | /* point to the same strings provided */ |
| 978 | Gtbpath_end_indexcxx . . $ Gtbpath_end_index. = 0; |
| 979 | for (i = 0; i < sz; i++) { |
| 980 | Gtbpathcxx . . $ Gtbpath.[i] = path[i]; |
| 981 | Gtbpath_end_indexcxx . . $ Gtbpath_end_index.++; |
| 982 | } |
| 983 | |
| 984 | } else { |
| 985 | ok = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 986 | } |
| 987 | return ok; |
| 988 | |
| 989 | } |
| 990 | |
| 991 | static void |
| 992 | path_system_donecxx . . $ path_system_done(49f6e7a06ebc5aa8). (void) |
| 993 | { |
| 994 | /* before we free Gtbpath, we have to deal with the |
| 995 | "const poisoning" and cast it. free() does not accept |
| 996 | const pointers */ |
| 997 | char ** p = (char **) Gtbpathcxx . . $ Gtbpath.; |
| 998 | /* clean up */ |
| 999 | if (p != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 1000 | freecxx . . $ free(5d22bdacc48458e8).(p); |
| 1001 | return; |
| 1002 | } |
| 1003 | |
| 1004 | |
| 1005 | /****************************************************************************\ |
| 1006 | * |
| 1007 | * |
| 1008 | * General Initialization Zone |
| 1009 | * |
| 1010 | * |
| 1011 | ****************************************************************************/ |
| 1012 | |
| 1013 | |
| 1014 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 1015 | static size_t wdl_cache_initcxx . . $ wdl_cache_init(ecdaa1632f49f591). (size_t cache_mem); |
| 1016 | static void wdl_cache_flushcxx . . $ wdl_cache_flush(49f6e7a06ebc5aa8). (void); |
| 1017 | |
| 1018 | static void wdl_cache_reset_counterscxx . . $ wdl_cache_reset_counters(49f6e7a06ebc5aa8). (void); |
| 1019 | static void wdl_cache_donecxx . . $ wdl_cache_done(49f6e7a06ebc5aa8). (void); |
| 1020 | |
| 1021 | static bool_tcxx . . $ bool_t# get_WDL_from_cachecxx . . $ get_WDL_from_cache(5933a67032aa547c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, unsigned int *out); |
| 1022 | static bool_tcxx . . $ bool_t# wdl_preload_cachecxx . . $ wdl_preload_cache(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx); |
| 1023 | #endif |
| 1024 | |
| 1025 | #ifdef GTB_SHARE |
| 1026 | static void init_bettarr (void); |
| 1027 | #endif |
| 1028 | |
| 1029 | static void eg_was_open_resetcxx . . $ eg_was_open_reset(49f6e7a06ebc5aa8).(void) |
| 1030 | { |
| 1031 | int i; |
| 1032 | for (i = 0; i < MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!; i++) { |
| 1033 | eg_was_opencxx . . $ eg_was_open.[i] = 0; |
| 1034 | } |
| 1035 | } |
| 1036 | |
| 1037 | static long unsigned int eg_was_open_countcxx . . $ eg_was_open_count(f708dce9a8856c70).(void) |
| 1038 | { |
| 1039 | long int i, x; |
| 1040 | for (i = 0, x = 0; i < MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!; i++) { |
| 1041 | x += eg_was_opencxx . . $ eg_was_open.[i]; |
| 1042 | } |
| 1043 | return (long unsigned) x; |
| 1044 | } |
| 1045 | |
| 1046 | |
| 1047 | enum Sizescxx . . $ Sizes# {INISIZEcxx . . $ INISIZE. = 4096}; |
| 1048 | static char ini_strcxx . . $ ini_str.[INISIZEcxx . . $ INISIZE.]; |
| 1049 | static void sjoincxx . . $ sjoin(584917e90c1c156b).(char *s, const char *tail, size_t max) {strncatcxx . . $ strncat(255158a415b673b0).(s, tail, max - strlencxx . . $ strlen(751346f8406fd082).(s) - 1);} |
| 1050 | |
| 1051 | char * |
| 1052 | tb_initcxx . . $ tb_init(4fe2ea5f154cdf07). (int verbosity, int decoding_sch, const char **paths) |
| 1053 | { |
| 1054 | unsigned int zi; |
| 1055 | int paths_ok; |
| 1056 | char *ret_str; |
| 1057 | char localstr[256]; |
| 1058 | |
| 1059 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(!TB_INITIALIZED); |
| 1060 | |
| 1061 | if (verbosity) { |
| 1062 | ini_strcxx . . $ ini_str.[0] = '\0'; |
| 1063 | ret_str = ini_strcxx . . $ ini_str.; |
| 1064 | } else { |
| 1065 | ret_str = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 1066 | } |
| 1067 | |
| 1068 | paths_ok = path_system_initcxx . . $ path_system_init(15355eb6db2855df). (paths); |
| 1069 | |
| 1070 | if (paths_ok && verbosity) { |
| 1071 | int g; |
| 1072 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(Gtbpath!=NULL); |
| 1073 | sjoincxx . . $ sjoin(584917e90c1c156b).(ini_strcxx . . $ ini_str.,"\nGTB PATHS\n",INISIZEcxx . . $ INISIZE.); |
| 1074 | for (g = 0; Gtbpathcxx . . $ Gtbpath.[g] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; g++) { |
| 1075 | const char *p = Gtbpathcxx . . $ Gtbpath.[g]; |
| 1076 | if (0 == g) { |
| 1077 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," main: %s\n", p); |
| 1078 | } else { |
| 1079 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," #%d: %s\n", g, p); |
| 1080 | } |
| 1081 | sjoincxx . . $ sjoin(584917e90c1c156b).(ini_strcxx . . $ ini_str.,localstr,INISIZEcxx . . $ INISIZE.); |
| 1082 | } |
| 1083 | } |
| 1084 | |
| 1085 | if (!paths_ok && verbosity) { |
| 1086 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.,"\nGTB PATHS not initialized\n",INISIZEcxx . . $ INISIZE.); |
| 1087 | } |
| 1088 | |
| 1089 | if (!reach_was_initializedcxx . . $ reach_was_initialized(b126dc7c1de90089).()) |
| 1090 | reach_initcxx . . $ reach_init(49f6e7a06ebc5aa8).(); |
| 1091 | |
| 1092 | attack_maps_initcxx . . $ attack_maps_init(49f6e7a06ebc5aa8). (); /* external initialization */ |
| 1093 | |
| 1094 | init_indexingcxx . . $ init_indexing(d4f767463ce0a6b3).(0 /* no verbosity */); |
| 1095 | |
| 1096 | #ifdef GTB_SHARE |
| 1097 | init_bettarr(); |
| 1098 | #endif |
| 1099 | |
| 1100 | if (!fd_initcxx . . $ fd_init(6e448be9e28f017c). (&fdcxx . . $ fd.) && verbosity) { |
| 1101 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.," File Open Memory initialization = **FAILED**\n",INISIZEcxx . . $ INISIZE.); |
| 1102 | return ret_str; |
| 1103 | } |
| 1104 | |
| 1105 | GTB_schemecxx . . $ GTB_scheme. = decoding_sch; |
| 1106 | Uncompressedcxx . . $ Uncompressed. = GTB_schemecxx . . $ GTB_scheme. == 0; |
| 1107 | |
| 1108 | if (GTB_schemecxx . . $ GTB_scheme. == 0) { |
| 1109 | Uncompressedcxx . . $ Uncompressed. = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1110 | } |
| 1111 | |
| 1112 | set_decoding_schemecxx . . $ set_decoding_scheme(d4f767463ce0a6b3).(GTB_schemecxx . . $ GTB_scheme.); |
| 1113 | |
| 1114 | if (verbosity) { |
| 1115 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.,"\nGTB initialization\n",INISIZEcxx . . $ INISIZE.); |
| 1116 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," Compression Scheme = %d\n", GTB_schemecxx . . $ GTB_scheme.); |
| 1117 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.,localstr,INISIZEcxx . . $ INISIZE.); |
| 1118 | } |
| 1119 | |
| 1120 | zi = zipinfo_initcxx . . $ zipinfo_init(db52760e79bf9054).(); |
| 1121 | |
| 1122 | TB_AVAILABILITYcxx . . $ TB_AVAILABILITY. = zi; |
| 1123 | |
| 1124 | if (verbosity) { |
| 1125 | if (0 == zi) { |
| 1126 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.," Compression Indexes = **FAILED**\n",INISIZEcxx . . $ INISIZE.); |
| 1127 | } else { |
| 1128 | int n, bit; |
| 1129 | |
| 1130 | n = 3; bit = 1; |
| 1131 | if (zi&(1u<<bit)) |
| 1132 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," Compression Indexes (%d-pc) = PASSED\n",n); |
| 1133 | else |
| 1134 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," Compression Indexes (%d-pc) = **FAILED**\n",n); |
| 1135 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.,localstr,INISIZEcxx . . $ INISIZE.); |
| 1136 | |
| 1137 | n = 4; bit = 3; |
| 1138 | if (zi&(1u<<bit)) |
| 1139 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," Compression Indexes (%d-pc) = PASSED\n",n); |
| 1140 | else |
| 1141 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," Compression Indexes (%d-pc) = **FAILED**\n",n); |
| 1142 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.,localstr,INISIZEcxx . . $ INISIZE.); |
| 1143 | |
| 1144 | n = 5; bit = 5; |
| 1145 | if (zi&(1u<<bit)) |
| 1146 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," Compression Indexes (%d-pc) = PASSED\n",n); |
| 1147 | else |
| 1148 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (localstr," Compression Indexes (%d-pc) = **FAILED**\n",n); |
| 1149 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.,localstr,INISIZEcxx . . $ INISIZE.); |
| 1150 | } |
| 1151 | sjoincxx . . $ sjoin(584917e90c1c156b). (ini_strcxx . . $ ini_str.,"\n",INISIZEcxx . . $ INISIZE.); |
| 1152 | } |
| 1153 | |
| 1154 | eg_was_open_resetcxx . . $ eg_was_open_reset(49f6e7a06ebc5aa8).(); |
| 1155 | Bytes_readcxx . . $ Bytes_read. = 0; |
| 1156 | |
| 1157 | mythread_mutex_initcxx . . $ mythread_mutex_init(4f83bfebf4bb9c8b). (&Egtb_lockcxx . . $ Egtb_lock.); |
| 1158 | |
| 1159 | TB_INITIALIZEDcxx . . $ TB_INITIALIZED. = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1160 | |
| 1161 | return ret_str; |
| 1162 | } |
| 1163 | |
| 1164 | extern unsigned int |
| 1165 | tb_availabilitycxx . . $ tb_availability(db52760e79bf9054).(void) |
| 1166 | { |
| 1167 | return TB_AVAILABILITYcxx . . $ TB_AVAILABILITY.; |
| 1168 | } |
| 1169 | |
| 1170 | extern bool_tcxx . . $ bool_t# |
| 1171 | tb_is_initializedcxx . . $ tb_is_initialized(b126dc7c1de90089). (void) |
| 1172 | { |
| 1173 | return TB_INITIALIZEDcxx . . $ TB_INITIALIZED.; |
| 1174 | } |
| 1175 | |
| 1176 | extern void |
| 1177 | tb_donecxx . . $ tb_done(49f6e7a06ebc5aa8). (void) |
| 1178 | { |
| 1179 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(TB_INITIALIZED); |
| 1180 | fd_donecxx . . $ fd_done(e44a433d8147fa91). (&fdcxx . . $ fd.); |
| 1181 | RAM_egtbfreecxx . . $ RAM_egtbfree(49f6e7a06ebc5aa8).(); |
| 1182 | zipinfo_donecxx . . $ zipinfo_done(49f6e7a06ebc5aa8).(); |
| 1183 | path_system_donecxx . . $ path_system_done(49f6e7a06ebc5aa8).(); |
| 1184 | mythread_mutex_destroycxx . . $ mythread_mutex_destroy(4f83bfebf4bb9c8b). (&Egtb_lockcxx . . $ Egtb_lock.); |
| 1185 | TB_INITIALIZEDcxx . . $ TB_INITIALIZED. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1186 | |
| 1187 | /* |
| 1188 | HERE, I should be free() the ini_str, but in |
| 1189 | the current implementation, it is static |
| 1190 | rather than dynamic. |
| 1191 | */ |
| 1192 | return; |
| 1193 | } |
| 1194 | |
| 1195 | char * |
| 1196 | tb_restartcxx . . $ tb_restart(4fe2ea5f154cdf07).(int verbosity, int decoding_sch, const char **paths) |
| 1197 | { |
| 1198 | if (tb_is_initializedcxx . . $ tb_is_initialized(b126dc7c1de90089).()) { |
| 1199 | tb_donecxx . . $ tb_done(49f6e7a06ebc5aa8).(); |
| 1200 | } |
| 1201 | return tb_initcxx . . $ tb_init(4fe2ea5f154cdf07).(verbosity, decoding_sch, paths); |
| 1202 | } |
| 1203 | |
| 1204 | /* whenever the program exits should release this memory */ |
| 1205 | static void |
| 1206 | RAM_egtbfreecxx . . $ RAM_egtbfree(49f6e7a06ebc5aa8). (void) |
| 1207 | { |
| 1208 | int i; |
| 1209 | for (i = 0; egkeycxx . . $ egkey.[i].strcxx . . $ endgamekey#str. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; i++) { |
| 1210 | egtb_freememcxx . . $ egtb_freemem(d4f767463ce0a6b3). (i); |
| 1211 | } |
| 1212 | } |
| 1213 | |
| 1214 | /*--------------------------------------------------------------------------*/ |
| 1215 | |
| 1216 | #ifdef GTB_SHARE |
| 1217 | static void |
| 1218 | init_bettarr (void) |
| 1219 | { |
| 1220 | /* |
| 1221 | iDRAW = 0, iWMATE = 1, iBMATE = 2, iFORBID = 3, |
| 1222 | iDRAWt = 4, iWMATEt = 5, iBMATEt = 6, iUNKNOWN = 7 |
| 1223 | */ |
| 1224 | |
| 1225 | int temp[] = { |
| 1226 | /*White*/ |
| 1227 | /*iDRAW vs*/ |
| 1228 | 1, 2, 1, 1, 2, 2, 2, 2, |
| 1229 | /*iWMATE vs*/ |
| 1230 | 1, 3, 1, 1, 1, 1, 1, 1, |
| 1231 | /*iBMATE vs*/ |
| 1232 | 2, 2, 4, 1, 2, 2, 2, 2, |
| 1233 | /*iFORBID vs*/ |
| 1234 | 2, 2, 2, 2, 2, 2, 2, 2, |
| 1235 | |
| 1236 | /*iDRAWt vs*/ |
| 1237 | 1, 2, 1, 1, 2, 2, 1, 2, |
| 1238 | /*iWMATEt vs*/ |
| 1239 | 1, 2, 1, 1, 1, 3, 1, 1, |
| 1240 | /*iBMATEt vs*/ |
| 1241 | 1, 2, 1, 1, 2, 2, 4, 2, |
| 1242 | /*iUNKNOWN */ |
| 1243 | 1, 2, 1, 1, 1, 2, 1, 2, |
| 1244 | |
| 1245 | /*Black*/ |
| 1246 | /*iDRAW vs*/ |
| 1247 | 1, 1, 2, 1, 2, 2, 2, 2, |
| 1248 | /*iWMATE vs*/ |
| 1249 | 2, 4, 2, 1, 2, 2, 2, 2, |
| 1250 | /*iBMATE vs*/ |
| 1251 | 1, 1, 3, 1, 1, 1, 1, 1, |
| 1252 | /*iFORBID vs*/ |
| 1253 | 2, 2, 2, 2, 2, 2, 2, 2, |
| 1254 | |
| 1255 | /*iDRAWt vs*/ |
| 1256 | 1, 1, 2, 1, 2, 1, 2, 2, |
| 1257 | /*iWMATEt vs*/ |
| 1258 | 1, 1, 2, 1, 2, 4, 2, 2, |
| 1259 | /*iBMATEt vs*/ |
| 1260 | 1, 1, 2, 1, 1, 1, 3, 1, |
| 1261 | /*iUNKNOWN */ |
| 1262 | 1, 1, 2, 1, 1, 1, 2, 2 |
| 1263 | }; |
| 1264 | |
| 1265 | int i, j, k, z; |
| 1266 | |
| 1267 | /* reset */ |
| 1268 | z = 0; |
| 1269 | for (i = 0; i < 2; i++) |
| 1270 | for (j = 0; j < 8; j++) |
| 1271 | for (k = 0; k < 8; k++) |
| 1272 | bettarr [i][j][k] = temp[z++]; |
| 1273 | |
| 1274 | return; |
| 1275 | } |
| 1276 | #endif |
| 1277 | |
| 1278 | /* |
| 1279 | | |
| 1280 | | Own File Descriptors |
| 1281 | | |
| 1282 | \*---------------------------------------------------------------------------*/ |
| 1283 | |
| 1284 | static bool_tcxx . . $ bool_t# |
| 1285 | fd_initcxx . . $ fd_init(6e448be9e28f017c). (struct filesopencxx . . $ filesopen# *pfd) |
| 1286 | { |
| 1287 | tbkey_tcxx . . $ tbkey_t# *p; |
| 1288 | int i, allowed; |
| 1289 | |
| 1290 | pfd->ncxx . . $ filesopen#n. = 0; |
| 1291 | |
| 1292 | allowed = mysys_fopen_maxcxx . . $ mysys_fopen_max(b126dc7c1de90089).() - 5 /*stdin,stdout,sterr,stdlog,book*/; |
| 1293 | if (allowed < 4) |
| 1294 | GTB_MAXOPENcxx . . $ GTB_MAXOPEN. = 4; |
| 1295 | if (allowed > 32) |
| 1296 | GTB_MAXOPENcxx . . $ GTB_MAXOPEN. = 32; |
| 1297 | |
| 1298 | p = (tbkey_tcxx . . $ tbkey_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(tbkey_tcxx . . $ tbkey_t#)*(size_t)GTB_MAXOPENcxx . . $ GTB_MAXOPEN.); |
| 1299 | |
| 1300 | if (p != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 1301 | for (i = 0; i < GTB_MAXOPENcxx . . $ GTB_MAXOPEN.; i++) { |
| 1302 | p[i] = -1; |
| 1303 | } |
| 1304 | pfd->keycxx . . $ filesopen#key. = p; |
| 1305 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1306 | } else { |
| 1307 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1308 | } |
| 1309 | } |
| 1310 | |
| 1311 | static void |
| 1312 | fd_donecxx . . $ fd_done(e44a433d8147fa91). (struct filesopencxx . . $ filesopen# *pfd) |
| 1313 | { |
| 1314 | int i; |
| 1315 | tbkey_tcxx . . $ tbkey_t# closingkey; |
| 1316 | FILEcxx . . $ FILE# *finp; |
| 1317 | |
| 1318 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(pfd != NULL); |
| 1319 | |
| 1320 | for (i = 0; i < pfd->ncxx . . $ filesopen#n.; i++) { |
| 1321 | closingkey = pfd->keycxx . . $ filesopen#key.[i]; |
| 1322 | finp = egkeycxx . . $ egkey. [closingkey].fdcxx . . $ endgamekey#fd.; |
| 1323 | fclosecxx . . $ fclose(89bc1efcdac0ca22). (finp); |
| 1324 | egkeycxx . . $ egkey.[closingkey].fdcxx . . $ endgamekey#fd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 1325 | pfd->keycxx . . $ filesopen#key.[i] = -1; |
| 1326 | } |
| 1327 | pfd->ncxx . . $ filesopen#n. = 0; |
| 1328 | freecxx . . $ free(5d22bdacc48458e8).(pfd->keycxx . . $ filesopen#key.); |
| 1329 | } |
| 1330 | |
| 1331 | /****************************************************************************\ |
| 1332 | | |
| 1333 | | |
| 1334 | | PROBE ZONE |
| 1335 | | |
| 1336 | | |
| 1337 | \****************************************************************************/ |
| 1338 | |
| 1339 | #if !defined(SHARED_forbuilding) |
| 1340 | |
| 1341 | /* shared with building routines */ |
| 1342 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (const SQUAREcxx . . $ SQUARE# *a, SQUAREcxx . . $ SQUARE# *b); |
| 1343 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (const SQ_CONTENTcxx . . $ SQ_CONTENT# *a, SQ_CONTENTcxx . . $ SQ_CONTENT# *b); |
| 1344 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# inv_dtmcxx . . $ inv_dtm(a18c05e4017afb3d). (dtm_tcxx . . $ dtm_t# x); |
| 1345 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# egtb_get_idcxx . . $ egtb_get_id(4bccf12db147e54e). (SQ_CONTENTcxx . . $ SQ_CONTENT# *w, SQ_CONTENTcxx . . $ SQ_CONTENT# *b, tbkey_tcxx . . $ tbkey_t# *id); |
| 1346 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void list_sq_flipNScxx . . $ list_sq_flipNS(218b13e5e7cbf689). (SQUAREcxx . . $ SQUARE# *s); |
| 1347 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# adjust_upcxx . . $ adjust_up(a18c05e4017afb3d). (dtm_tcxx . . $ dtm_t# dist); |
| 1348 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# bestxcxx . . $ bestx(d78549ce86dea269). (unsigned stm, dtm_tcxx . . $ dtm_t# a, dtm_tcxx . . $ dtm_t# b); |
| 1349 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void sortlistscxx . . $ sortlists(1294880c14e5fd1f). (SQUAREcxx . . $ SQUARE# *ws, SQ_CONTENTcxx . . $ SQ_CONTENT# *wp); |
| 1350 | |
| 1351 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! /*@NULL@*/ FILEcxx . . $ FILE# * fd_openitcxx . . $ fd_openit(7b3974cd6a1399ce).(tbkey_tcxx . . $ tbkey_t# key); |
| 1352 | |
| 1353 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# dtm_unpackcxx . . $ dtm_unpack(ba651c7f63dc5456). (unsigned stm, unsigned char packed); |
| 1354 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (dtm_tcxx . . $ dtm_t# d, unsigned int *res, unsigned int *ply); |
| 1355 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# packdistcxx . . $ packdist(c7f281617652c176). (unsigned int inf, unsigned int ply); |
| 1356 | |
| 1357 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# fread_entry_packedcxx . . $ fread_entry_packed(f6e02a26a69b6c6). (FILEcxx . . $ FILE# *dest, unsigned side, dtm_tcxx . . $ dtm_t# *px); |
| 1358 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# fpark_entry_packedcxx . . $ fpark_entry_packed(c76b0cd2387b2e64). (FILEcxx . . $ FILE# *finp, unsigned side, index_tcxx . . $ index_t# max, index_tcxx . . $ index_t# idx); |
| 1359 | #endif |
| 1360 | |
| 1361 | /* use only with probe */ |
| 1362 | static bool_tcxx . . $ bool_t# egtb_get_dtmcxx . . $ egtb_get_dtm(4cca4191a582c26b). (tbkey_tcxx . . $ tbkey_t# k, unsigned stm, const SQUAREcxx . . $ SQUARE# *wS, const SQUAREcxx . . $ SQUARE# *bS, bool_tcxx . . $ bool_t# probe_hard, dtm_tcxx . . $ dtm_t# *dtm); |
| 1363 | static void removepiececxx . . $ removepiece(3c957a7575a3addf). (SQUAREcxx . . $ SQUARE# *ys, SQ_CONTENTcxx . . $ SQ_CONTENT# *yp, int j); |
| 1364 | static bool_tcxx . . $ bool_t# egtb_filepeekcxx . . $ egtb_filepeek(9d61391afa8ead84). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, dtm_tcxx . . $ dtm_t# *out_dtm); |
| 1365 | |
| 1366 | |
| 1367 | /*prototype*/ |
| 1368 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 1369 | static bool_tcxx . . $ bool_t# |
| 1370 | tb_probe_wdlcxx . . $ tb_probe_wdl(53d0cf497971429f). |
| 1371 | (unsigned stm, |
| 1372 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 1373 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 1374 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 1375 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 1376 | bool_tcxx . . $ bool_t# probingtype, |
| 1377 | /*@out@*/ unsigned *res); |
| 1378 | #endif |
| 1379 | |
| 1380 | static bool_tcxx . . $ bool_t# |
| 1381 | tb_probe_cxx . . $ tb_probe_(e48a79eb699917e9). (unsigned stm, |
| 1382 | SQUAREcxx . . $ SQUARE# epsq, |
| 1383 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 1384 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 1385 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 1386 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 1387 | bool_tcxx . . $ bool_t# probingtype, |
| 1388 | /*@out@*/ unsigned *res, |
| 1389 | /*@out@*/ unsigned *ply); |
| 1390 | |
| 1391 | |
| 1392 | extern bool_tcxx . . $ bool_t# |
| 1393 | tb_probe_softcxx . . $ tb_probe_soft(545fa276f31a8a3c). |
| 1394 | (unsigned stm, |
| 1395 | SQUAREcxx . . $ SQUARE# epsq, |
| 1396 | unsigned castles, |
| 1397 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 1398 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 1399 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 1400 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 1401 | /*@out@*/ unsigned *res, |
| 1402 | /*@out@*/ unsigned *ply) |
| 1403 | { |
| 1404 | if (castles != 0) |
| 1405 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1406 | return tb_probe_cxx . . $ tb_probe_(e48a79eb699917e9). (stm, epsq, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, FALSEcxx . . $ `gtb-probe.c:101:9`!, res, ply); |
| 1407 | } |
| 1408 | |
| 1409 | extern bool_tcxx . . $ bool_t# |
| 1410 | tb_probe_hardcxx . . $ tb_probe_hard(545fa276f31a8a3c). |
| 1411 | (unsigned stm, |
| 1412 | SQUAREcxx . . $ SQUARE# epsq, |
| 1413 | unsigned castles, |
| 1414 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 1415 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 1416 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 1417 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 1418 | /*@out@*/ unsigned *res, |
| 1419 | /*@out@*/ unsigned *ply) |
| 1420 | { |
| 1421 | if (castles != 0) |
| 1422 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1423 | return tb_probe_cxx . . $ tb_probe_(e48a79eb699917e9). (stm, epsq, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, TRUEcxx . . $ `gtb-probe.c:97:9`!, res, ply); |
| 1424 | } |
| 1425 | |
| 1426 | extern bool_tcxx . . $ bool_t# |
| 1427 | tb_probe_WDL_softcxx . . $ tb_probe_WDL_soft(86eeecdfbc4ee384). |
| 1428 | (unsigned stm, |
| 1429 | SQUAREcxx . . $ SQUARE# epsq, |
| 1430 | unsigned castles, |
| 1431 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 1432 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 1433 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 1434 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 1435 | /*@out@*/ unsigned *res) |
| 1436 | { |
| 1437 | unsigned ply_n; |
| 1438 | unsigned *ply = &ply_n; |
| 1439 | if (castles != 0) |
| 1440 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1441 | if (epsq != NOSQUAREcxx . . $ NOSQUARE.) |
| 1442 | return tb_probe_cxx . . $ tb_probe_(e48a79eb699917e9). (stm, epsq, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, FALSEcxx . . $ `gtb-probe.c:101:9`!, res, ply); |
| 1443 | |
| 1444 | /* probe bitbase like, assuming no en passant */ |
| 1445 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 1446 | return tb_probe_wdlcxx . . $ tb_probe_wdl(53d0cf497971429f). (stm, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, FALSEcxx . . $ `gtb-probe.c:101:9`!, res); |
| 1447 | #else |
| 1448 | return tb_probe_ (stm, epsq, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, FALSE, res, ply); |
| 1449 | #endif |
| 1450 | } |
| 1451 | |
| 1452 | extern bool_tcxx . . $ bool_t# |
| 1453 | tb_probe_WDL_hardcxx . . $ tb_probe_WDL_hard(86eeecdfbc4ee384). |
| 1454 | (unsigned stm, |
| 1455 | SQUAREcxx . . $ SQUARE# epsq, |
| 1456 | unsigned castles, |
| 1457 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 1458 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 1459 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 1460 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 1461 | /*@out@*/ unsigned *res) |
| 1462 | { |
| 1463 | unsigned ply_n; |
| 1464 | unsigned *ply = &ply_n; |
| 1465 | if (castles != 0) |
| 1466 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1467 | if (epsq != NOSQUAREcxx . . $ NOSQUARE.) |
| 1468 | return tb_probe_cxx . . $ tb_probe_(e48a79eb699917e9). (stm, epsq, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, TRUEcxx . . $ `gtb-probe.c:97:9`!, res, ply); |
| 1469 | |
| 1470 | /* probe bitbase like, assuming no en passant */ |
| 1471 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 1472 | return tb_probe_wdlcxx . . $ tb_probe_wdl(53d0cf497971429f). (stm, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, TRUEcxx . . $ `gtb-probe.c:97:9`!, res); |
| 1473 | #else |
| 1474 | return tb_probe_ (stm, epsq, inp_wSQ, inp_bSQ, inp_wPC, inp_bPC, TRUE, res, ply); |
| 1475 | #endif |
| 1476 | } |
| 1477 | |
| 1478 | |
| 1479 | static bool_tcxx . . $ bool_t# |
| 1480 | tb_probe_cxx . . $ tb_probe_(e48a79eb699917e9). (unsigned stm, |
| 1481 | SQUAREcxx . . $ SQUARE# epsq, |
| 1482 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 1483 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 1484 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 1485 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 1486 | bool_tcxx . . $ bool_t# probingtype, |
| 1487 | /*@out@*/ unsigned *res, |
| 1488 | /*@out@*/ unsigned *ply) |
| 1489 | { |
| 1490 | int i = 0, j = 0; |
| 1491 | tbkey_tcxx . . $ tbkey_t# id = -1; |
| 1492 | dtm_tcxx . . $ dtm_t# dtm; |
| 1493 | |
| 1494 | SQUAREcxx . . $ SQUARE# storage_ws [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], storage_bs [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 1495 | SQ_CONTENTcxx . . $ SQ_CONTENT# storage_wp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], storage_bp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 1496 | |
| 1497 | SQUAREcxx . . $ SQUARE# *ws = storage_ws; |
| 1498 | SQUAREcxx . . $ SQUARE# *bs = storage_bs; |
| 1499 | SQ_CONTENTcxx . . $ SQ_CONTENT# *wp = storage_wp; |
| 1500 | SQ_CONTENTcxx . . $ SQ_CONTENT# *bp = storage_bp; |
| 1501 | |
| 1502 | SQUAREcxx . . $ SQUARE# *xs; |
| 1503 | SQUAREcxx . . $ SQUARE# *ys; |
| 1504 | SQ_CONTENTcxx . . $ SQ_CONTENT# *xp; |
| 1505 | SQ_CONTENTcxx . . $ SQ_CONTENT# *yp; |
| 1506 | |
| 1507 | SQUAREcxx . . $ SQUARE# tmp_ws [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], tmp_bs [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 1508 | SQ_CONTENTcxx . . $ SQ_CONTENT# tmp_wp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], tmp_bp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 1509 | |
| 1510 | SQUAREcxx . . $ SQUARE# *temps; |
| 1511 | bool_tcxx . . $ bool_t# straight = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1512 | |
| 1513 | SQUAREcxx . . $ SQUARE# capturer_a, capturer_b, xed = NOSQUAREcxx . . $ NOSQUARE.; |
| 1514 | |
| 1515 | unsigned int plies; |
| 1516 | unsigned int inf; |
| 1517 | |
| 1518 | bool_tcxx . . $ bool_t# okdtm = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1519 | bool_tcxx . . $ bool_t# okcall = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1520 | |
| 1521 | /************************************/ |
| 1522 | |
| 1523 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (stm == WH || stm == BL); |
| 1524 | /*assert (inp_wPC[0] == KING && inp_bPC[0] == KING );*/ |
| 1525 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! ((epsq >> 3) == 2 || (epsq >> 3) == 5 || epsq == NOSQUARE); |
| 1526 | |
| 1527 | /* VALID ONLY FOR KK!! */ |
| 1528 | if (inp_wPC[1] == NOPIECEcxx . . $ `gtb-probe.c:175:9`! && inp_bPC[1] == NOPIECEcxx . . $ `gtb-probe.c:175:9`!) { |
| 1529 | index_tcxx . . $ index_t# dummy_i; |
| 1530 | bool_tcxx . . $ bool_t# b = kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58). (inp_wSQ, inp_bSQ, &dummy_i); |
| 1531 | *res = b? iDRAWcxx . . $ iDRAW.: iFORBIDcxx . . $ iFORBID.; |
| 1532 | *ply = 0; |
| 1533 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1534 | } |
| 1535 | |
| 1536 | /* copy input */ |
| 1537 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (inp_wPC, wp); |
| 1538 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (inp_bPC, bp); |
| 1539 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (inp_wSQ, ws); |
| 1540 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (inp_bSQ, bs); |
| 1541 | |
| 1542 | sortlistscxx . . $ sortlists(1294880c14e5fd1f). (ws, wp); |
| 1543 | sortlistscxx . . $ sortlists(1294880c14e5fd1f). (bs, bp); |
| 1544 | |
| 1545 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("EGTB_PROBE") |
| 1546 | |
| 1547 | if (egtb_get_idcxx . . $ egtb_get_id(4bccf12db147e54e). (wp, bp, &id)) { |
| 1548 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("got ID",id) |
| 1549 | straight = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1550 | } else if (egtb_get_idcxx . . $ egtb_get_id(4bccf12db147e54e). (bp, wp, &id)) { |
| 1551 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("rev ID",id) |
| 1552 | straight = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1553 | list_sq_flipNScxx . . $ list_sq_flipNS(218b13e5e7cbf689). (ws); |
| 1554 | list_sq_flipNScxx . . $ list_sq_flipNS(218b13e5e7cbf689). (bs); |
| 1555 | temps = ws; |
| 1556 | ws = bs; |
| 1557 | bs = temps; |
| 1558 | stm = Oppcxx . . $ `gtb-probe.c:185:9`!(stm); |
| 1559 | if (epsq != NOSQUAREcxx . . $ NOSQUARE.) epsq ^= 070; /* added */ |
| 1560 | {SQ_CONTENTcxx . . $ SQ_CONTENT# *tempp = wp; wp = bp; bp = tempp;} /* added */ |
| 1561 | } else { |
| 1562 | #if defined(DEBUG) |
| 1563 | printf("did not get id...\n"); |
| 1564 | output_state (stm, ws, bs, wp, bp); |
| 1565 | #endif |
| 1566 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (iFORBIDcxx . . $ iFORBID., res, ply); |
| 1567 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1568 | } |
| 1569 | |
| 1570 | /* store position... */ |
| 1571 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (wp, tmp_wp); |
| 1572 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (bp, tmp_bp); |
| 1573 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (ws, tmp_ws); |
| 1574 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (bs, tmp_bs); |
| 1575 | |
| 1576 | /* x will be stm and y will be stw */ |
| 1577 | if (stm == WHcxx . . $ `gtb-probe.c:183:9`!) { |
| 1578 | xs = ws; |
| 1579 | xp = wp; |
| 1580 | ys = bs; |
| 1581 | yp = bp; |
| 1582 | } else { |
| 1583 | xs = bs; |
| 1584 | xp = bp; |
| 1585 | ys = ws; |
| 1586 | yp = wp; |
| 1587 | } |
| 1588 | |
| 1589 | okdtm = egtb_get_dtmcxx . . $ egtb_get_dtm(4cca4191a582c26b). (id, stm, ws, bs, probingtype, &dtm); |
| 1590 | |
| 1591 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("dtmok?",okdtm) |
| 1592 | FOLLOW_DTMcxx . . $ `gtb-probe.c:417:10`!("dtm", dtm) |
| 1593 | |
| 1594 | if (okdtm) { |
| 1595 | |
| 1596 | capturer_a = NOSQUAREcxx . . $ NOSQUARE.; |
| 1597 | capturer_b = NOSQUAREcxx . . $ NOSQUARE.; |
| 1598 | |
| 1599 | if (epsq != NOSQUAREcxx . . $ NOSQUARE.) { |
| 1600 | /* captured pawn, trick: from epsquare to captured */ |
| 1601 | xed = epsq ^ (1<<3); |
| 1602 | |
| 1603 | /* find index captured (j) */ |
| 1604 | for (j = 0; ys[j] != NOSQUAREcxx . . $ NOSQUARE.; j++) { |
| 1605 | if (ys[j] == xed) break; |
| 1606 | } |
| 1607 | |
| 1608 | /* try first possible ep capture */ |
| 1609 | if (0 == (0x88 & (map88cxx . . $ `gtb-probe.c:281:9`!(xed) + 1))) |
| 1610 | capturer_a = xed + 1; |
| 1611 | /* try second possible ep capture */ |
| 1612 | if (0 == (0x88 & (map88cxx . . $ `gtb-probe.c:281:9`!(xed) - 1))) |
| 1613 | capturer_b = xed - 1; |
| 1614 | |
| 1615 | if (ys[j] == xed) { |
| 1616 | |
| 1617 | /* find capturers (i) */ |
| 1618 | for (i = 0; xs[i] != NOSQUAREcxx . . $ NOSQUARE. && okcall; i++) { |
| 1619 | |
| 1620 | if (xp[i]==PAWNcxx . . $ `gtb-probe.c:176:9`! && (xs[i]==capturer_a || xs[i]==capturer_b)) { |
| 1621 | dtm_tcxx . . $ dtm_t# epscore = iFORBIDcxx . . $ iFORBID.; |
| 1622 | |
| 1623 | /* execute capture */ |
| 1624 | xs[i] = epsq; |
| 1625 | removepiececxx . . $ removepiece(3c957a7575a3addf). (ys, yp, j); |
| 1626 | |
| 1627 | okcall = tb_probe_cxx . . $ tb_probe_(e48a79eb699917e9). (Oppcxx . . $ `gtb-probe.c:185:9`!(stm), NOSQUAREcxx . . $ NOSQUARE., ws, bs, wp, bp, probingtype, &inf, &plies); |
| 1628 | |
| 1629 | if (okcall) { |
| 1630 | epscore = packdistcxx . . $ packdist(c7f281617652c176). (inf, plies); |
| 1631 | epscore = adjust_upcxx . . $ adjust_up(a18c05e4017afb3d). (epscore); |
| 1632 | |
| 1633 | /* chooses to ep or not */ |
| 1634 | dtm = bestxcxx . . $ bestx(d78549ce86dea269). (stm, epscore, dtm); |
| 1635 | } |
| 1636 | |
| 1637 | /* restore position */ |
| 1638 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (tmp_wp, wp); |
| 1639 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (tmp_bp, bp); |
| 1640 | |
| 1641 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (tmp_ws, ws); |
| 1642 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (tmp_bs, bs); |
| 1643 | } |
| 1644 | } |
| 1645 | } |
| 1646 | } /* ep */ |
| 1647 | |
| 1648 | if (straight) { |
| 1649 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (dtm, res, ply); |
| 1650 | } else { |
| 1651 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (inv_dtmcxx . . $ inv_dtm(a18c05e4017afb3d). (dtm), res, ply); |
| 1652 | } |
| 1653 | } |
| 1654 | |
| 1655 | if (!okdtm || !okcall) { |
| 1656 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (iFORBIDcxx . . $ iFORBID., res, ply); |
| 1657 | } |
| 1658 | |
| 1659 | return okdtm && okcall; |
| 1660 | } |
| 1661 | |
| 1662 | #ifdef _MSC_VER |
| 1663 | /* to silence warning for sprintf usage */ |
| 1664 | #pragma warning(disable:4996) |
| 1665 | #endif |
| 1666 | |
| 1667 | static bool_tcxx . . $ bool_t# |
| 1668 | egtb_filepeekcxx . . $ egtb_filepeek(9d61391afa8ead84). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, dtm_tcxx . . $ dtm_t# *out_dtm) |
| 1669 | { |
| 1670 | FILEcxx . . $ FILE# *finp; |
| 1671 | |
| 1672 | #define USE_FDcxx . . $ `gtb-probe.c:1672:9`! |
| 1673 | |
| 1674 | #if !defined(USE_FDcxx . . $ `gtb-probe.c:1672:9`!) |
| 1675 | char buf[1024]; |
| 1676 | char *filename = buf; |
| 1677 | #endif |
| 1678 | |
| 1679 | bool_tcxx . . $ bool_t# ok; |
| 1680 | dtm_tcxx . . $ dtm_t# x=0; |
| 1681 | index_tcxx . . $ index_t# maxindex = egkeycxx . . $ egkey.[key].maxindexcxx . . $ endgamekey#maxindex.; |
| 1682 | |
| 1683 | |
| 1684 | |
| 1685 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (Uncompressed); |
| 1686 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (side == WH || side == BL); |
| 1687 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (out_dtm != NULL); |
| 1688 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx >= 0); |
| 1689 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (key < MAX_EGKEYS); |
| 1690 | |
| 1691 | |
| 1692 | #if defined(USE_FDcxx . . $ `gtb-probe.c:1672:9`!) |
| 1693 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == (finp = egkeycxx . . $ egkey.[key].fdcxx . . $ endgamekey#fd.) ) { |
| 1694 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == (finp = fd_openitcxx . . $ fd_openit(7b3974cd6a1399ce). (key))) { |
| 1695 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1696 | } |
| 1697 | } |
| 1698 | #else |
| 1699 | sprintf (buf, "%s.gtb", egkey[key].str); |
| 1700 | if (NULL == (finp = fopen (filename, "rb"))) { |
| 1701 | return FALSE; |
| 1702 | } |
| 1703 | #endif |
| 1704 | |
| 1705 | ok = fpark_entry_packedcxx . . $ fpark_entry_packed(c76b0cd2387b2e64). (finp, side, maxindex, idx); |
| 1706 | ok = ok && fread_entry_packedcxx . . $ fread_entry_packed(f6e02a26a69b6c6). (finp, side, &x); |
| 1707 | |
| 1708 | if (ok) { |
| 1709 | *out_dtm = x; |
| 1710 | } else |
| 1711 | *out_dtm = iFORBIDcxx . . $ iFORBID.; |
| 1712 | |
| 1713 | #if !defined(USE_FDcxx . . $ `gtb-probe.c:1672:9`!) |
| 1714 | fclose (finp); |
| 1715 | #endif |
| 1716 | |
| 1717 | return ok; |
| 1718 | } |
| 1719 | |
| 1720 | /* will get defined later */ |
| 1721 | static bool_tcxx . . $ bool_t# dtm_cache_is_oncxx . . $ dtm_cache_is_on(b126dc7c1de90089). (void); |
| 1722 | |
| 1723 | static bool_tcxx . . $ bool_t# |
| 1724 | egtb_get_dtmcxx . . $ egtb_get_dtm(4cca4191a582c26b). (tbkey_tcxx . . $ tbkey_t# k, unsigned stm, const SQUAREcxx . . $ SQUARE# *wS, const SQUAREcxx . . $ SQUARE# *bS, bool_tcxx . . $ bool_t# probe_hard_flag, dtm_tcxx . . $ dtm_t# *dtm) |
| 1725 | { |
| 1726 | bool_tcxx . . $ bool_t# idxavail; |
| 1727 | index_tcxx . . $ index_t# idx; |
| 1728 | dtm_tcxx . . $ dtm_t# *tab[2]; |
| 1729 | bool_tcxx . . $ bool_t# (*pc2idx) (const SQUAREcxx . . $ SQUARE# *, const SQUAREcxx . . $ SQUARE# *, index_tcxx . . $ index_t# *); |
| 1730 | |
| 1731 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("egtb_get_dtm --> starts") |
| 1732 | |
| 1733 | if (egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_MALLOCcxx . . $ STATUS_MALLOC. || egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_STATICRAMcxx . . $ STATUS_STATICRAM.) { |
| 1734 | |
| 1735 | tab[WHcxx . . $ `gtb-probe.c:183:9`!] = egkeycxx . . $ egkey.[k].egt_wcxx . . $ endgamekey#egt_w.; |
| 1736 | tab[BLcxx . . $ `gtb-probe.c:184:9`!] = egkeycxx . . $ egkey.[k].egt_bcxx . . $ endgamekey#egt_b.; |
| 1737 | pc2idx = egkeycxx . . $ egkey.[k].pctoicxx . . $ endgamekey#pctoi.; |
| 1738 | |
| 1739 | idxavail = pc2idx (wS, bS, &idx); |
| 1740 | |
| 1741 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("indexavail (RAM)",idxavail) |
| 1742 | |
| 1743 | if (idxavail) { |
| 1744 | *dtm = tab[stm][idx]; |
| 1745 | } else { |
| 1746 | *dtm = iFORBIDcxx . . $ iFORBID.; |
| 1747 | } |
| 1748 | |
| 1749 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1750 | |
| 1751 | } else if (egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_ABSENTcxx . . $ STATUS_ABSENT.) { |
| 1752 | |
| 1753 | pc2idx = egkeycxx . . $ egkey.[k].pctoicxx . . $ endgamekey#pctoi.; |
| 1754 | idxavail = pc2idx (wS, bS, &idx); |
| 1755 | |
| 1756 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("indexavail (HD)",idxavail) |
| 1757 | |
| 1758 | if (idxavail) { |
| 1759 | bool_tcxx . . $ bool_t# success; |
| 1760 | |
| 1761 | /* |
| 1762 | | LOCK |
| 1763 | *-------------------------------*/ |
| 1764 | mythread_mutex_lockcxx . . $ mythread_mutex_lock(4f83bfebf4bb9c8b). (&Egtb_lockcxx . . $ Egtb_lock.); |
| 1765 | |
| 1766 | if (dtm_cache_is_oncxx . . $ dtm_cache_is_on(b126dc7c1de90089).()) { |
| 1767 | |
| 1768 | success = get_dtmcxx . . $ get_dtm(cc2c15251078b5e5). (k, stm, idx, dtm, probe_hard_flag); |
| 1769 | |
| 1770 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("get_dtm (succ)",success) |
| 1771 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("get_dtm (dtm )",*dtm) |
| 1772 | |
| 1773 | #if defined(DEBUG) |
| 1774 | if (Uncompressed) { |
| 1775 | dtm_t dtm_temp; |
| 1776 | bool_t ok; |
| 1777 | bool_t success2; |
| 1778 | |
| 1779 | assert (decoding_scheme() == 0 && GTB_scheme == 0); |
| 1780 | |
| 1781 | success2 = egtb_filepeek (k, stm, idx, &dtm_temp); |
| 1782 | ok = (success == success2) && (!success || *dtm == dtm_temp); |
| 1783 | if (!ok) { |
| 1784 | printf ("\nERROR\nsuccess1=%d sucess2=%d\n" |
| 1785 | "k=%d stm=%u idx=%d dtm_peek=%d dtm_cache=%d\n", |
| 1786 | success, success2, k, stm, idx, dtm_temp, *dtm); |
| 1787 | fatal_error(); |
| 1788 | } |
| 1789 | } |
| 1790 | #endif |
| 1791 | |
| 1792 | } else { |
| 1793 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(Uncompressed); |
| 1794 | if (probe_hard_flag && Uncompressedcxx . . $ Uncompressed.) |
| 1795 | success = egtb_filepeekcxx . . $ egtb_filepeek(9d61391afa8ead84). (k, stm, idx, dtm); |
| 1796 | else |
| 1797 | success = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1798 | } |
| 1799 | |
| 1800 | mythread_mutex_unlockcxx . . $ mythread_mutex_unlock(4f83bfebf4bb9c8b). (&Egtb_lockcxx . . $ Egtb_lock.); |
| 1801 | /*------------------------------*\ |
| 1802 | | UNLOCK |
| 1803 | */ |
| 1804 | |
| 1805 | |
| 1806 | if (success) { |
| 1807 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1808 | } else { |
| 1809 | if (probe_hard_flag) /* after probing hard and failing, no chance to succeed later */ |
| 1810 | egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. = STATUS_REJECTcxx . . $ STATUS_REJECT.; |
| 1811 | *dtm = iUNKNOWNcxx . . $ iUNKNOWN.; |
| 1812 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1813 | } |
| 1814 | |
| 1815 | } else { |
| 1816 | *dtm = iFORBIDcxx . . $ iFORBID.; |
| 1817 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 1818 | } |
| 1819 | |
| 1820 | } else if (egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_REJECTcxx . . $ STATUS_REJECT.) { |
| 1821 | |
| 1822 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("STATUS_REJECT") |
| 1823 | |
| 1824 | *dtm = iFORBIDcxx . . $ iFORBID.; |
| 1825 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1826 | } else { |
| 1827 | |
| 1828 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("STATUS_WRONG!") |
| 1829 | |
| 1830 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(0); |
| 1831 | *dtm = iFORBIDcxx . . $ iFORBID.; |
| 1832 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 1833 | } |
| 1834 | |
| 1835 | } |
| 1836 | |
| 1837 | static void |
| 1838 | removepiececxx . . $ removepiece(3c957a7575a3addf). (SQUAREcxx . . $ SQUARE# *ys, SQ_CONTENTcxx . . $ SQ_CONTENT# *yp, int j) |
| 1839 | { |
| 1840 | int k; |
| 1841 | for (k = j; ys[k] != NOSQUAREcxx . . $ NOSQUARE.; k++) { |
| 1842 | ys[k] = ys[k+1]; |
| 1843 | yp[k] = yp[k+1]; |
| 1844 | } |
| 1845 | } |
| 1846 | |
| 1847 | /* |
| 1848 | | |
| 1849 | | mySHARED by probe and build |
| 1850 | | |
| 1851 | \*----------------------------------------------------*/ |
| 1852 | |
| 1853 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! /*@NULL@*/ FILEcxx . . $ FILE# * |
| 1854 | fd_openitcxx . . $ fd_openit(7b3974cd6a1399ce). (tbkey_tcxx . . $ tbkey_t# key) |
| 1855 | { |
| 1856 | int i; |
| 1857 | tbkey_tcxx . . $ tbkey_t# closingkey; |
| 1858 | FILEcxx . . $ FILE# * finp = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 1859 | char buf[4096]; |
| 1860 | char * filename = buf; |
| 1861 | int start; |
| 1862 | int end; |
| 1863 | int pth; |
| 1864 | const char * extension; |
| 1865 | |
| 1866 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 <= key && key < MAX_EGKEYS); |
| 1867 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 <= fd.n && fd.n <= GTB_MAXOPEN); |
| 1868 | |
| 1869 | /* test if I reach limit of files open */ |
| 1870 | if (fdcxx . . $ fd..ncxx . . $ filesopen#n. == GTB_MAXOPENcxx . . $ GTB_MAXOPEN.) { |
| 1871 | |
| 1872 | /* fclose the last accessed, first in the list */ |
| 1873 | closingkey = fdcxx . . $ fd..keycxx . . $ filesopen#key.[0]; |
| 1874 | finp = egkeycxx . . $ egkey. [closingkey].fdcxx . . $ endgamekey#fd.; |
| 1875 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (finp != NULL); |
| 1876 | fclosecxx . . $ fclose(89bc1efcdac0ca22). (finp); |
| 1877 | egkeycxx . . $ egkey.[closingkey].fdcxx . . $ endgamekey#fd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 1878 | finp = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 1879 | |
| 1880 | for (i = 1; i < fdcxx . . $ fd..ncxx . . $ filesopen#n.; i++) { |
| 1881 | fdcxx . . $ fd..keycxx . . $ filesopen#key.[i-1] = fdcxx . . $ fd..keycxx . . $ filesopen#key.[i]; |
| 1882 | } |
| 1883 | fdcxx . . $ fd..keycxx . . $ filesopen#key.[--fdcxx . . $ fd..ncxx . . $ filesopen#n.] = -1; |
| 1884 | } |
| 1885 | |
| 1886 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (fd.n < GTB_MAXOPEN); |
| 1887 | |
| 1888 | /* set proper extensions to the File */ |
| 1889 | if (Uncompressedcxx . . $ Uncompressed.) { |
| 1890 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (decoding_scheme() == 0 && GTB_scheme == 0); |
| 1891 | extension = ".gtb"; |
| 1892 | } else { |
| 1893 | extension = Extensioncxx . . $ Extension.[decoding_schemecxx . . $ decoding_scheme(b126dc7c1de90089).()]; |
| 1894 | } |
| 1895 | |
| 1896 | /* Scan folders to find the File*/ |
| 1897 | finp = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 1898 | |
| 1899 | start = egkeycxx . . $ egkey.[key].pathncxx . . $ endgamekey#pathn.; |
| 1900 | end = Gtbpath_end_indexcxx . . $ Gtbpath_end_index.; |
| 1901 | |
| 1902 | /*@@ |
| 1903 | printf ("start: %d\n",start); |
| 1904 | printf ("===================Gtbpath[0]=%s\n",Gtbpath[0]); |
| 1905 | */ |
| 1906 | for (pth = start; NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == finp && pth < end && Gtbpathcxx . . $ Gtbpath.[pth] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; pth++) { |
| 1907 | const char *path = Gtbpathcxx . . $ Gtbpath.[pth]; |
| 1908 | size_t pl = strlencxx . . $ strlen(751346f8406fd082).(path); |
| 1909 | /*@@ |
| 1910 | printf ("path: %s\n",path); |
| 1911 | */ |
| 1912 | if (pl == 0) { |
| 1913 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (buf, "%s%s%s", path, egkeycxx . . $ egkey.[key].strcxx . . $ endgamekey#str., extension); |
| 1914 | } else { |
| 1915 | if (isfoldersepcxx . . $ isfoldersep(7864480464b09eea).( path[pl-1] )) { |
| 1916 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (buf, "%s%s%s", path, egkeycxx . . $ egkey.[key].strcxx . . $ endgamekey#str., extension); |
| 1917 | } else { |
| 1918 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (buf, "%s%s%s%s", path, FOLDERSEPcxx . . $ `sysport/sysport.h:121:10`!, egkeycxx . . $ egkey.[key].strcxx . . $ endgamekey#str., extension); |
| 1919 | } |
| 1920 | } |
| 1921 | /*printf ("try to open %s --> ",filename);*/ |
| 1922 | /* Finally found the file? */ |
| 1923 | finp = fopencxx . . $ fopen(82ec0787cd37e0a3). (filename, "rb"); |
| 1924 | /*printf ("%d\n",finp != NULL);*/ |
| 1925 | } |
| 1926 | |
| 1927 | /* File was found and opened */ |
| 1928 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != finp) { |
| 1929 | fdcxx . . $ fd..keycxx . . $ filesopen#key. [fdcxx . . $ fd..ncxx . . $ filesopen#n.++] = key; |
| 1930 | egkeycxx . . $ egkey.[key].fdcxx . . $ endgamekey#fd. = finp; |
| 1931 | egkeycxx . . $ egkey.[key].pathncxx . . $ endgamekey#pathn. = pth; /* remember succesful path */ |
| 1932 | eg_was_opencxx . . $ eg_was_open.[key] = 1; |
| 1933 | return finp; |
| 1934 | } |
| 1935 | |
| 1936 | start = 0; |
| 1937 | end = egkeycxx . . $ egkey.[key].pathncxx . . $ endgamekey#pathn.; |
| 1938 | for (pth = start; NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == finp && pth < end && Gtbpathcxx . . $ Gtbpath.[pth] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; pth++) { |
| 1939 | const char *path = Gtbpathcxx . . $ Gtbpath.[pth]; |
| 1940 | size_t pl = strlencxx . . $ strlen(751346f8406fd082).(path); |
| 1941 | |
| 1942 | if (pl == 0) { |
| 1943 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (buf, "%s%s%s", path, egkeycxx . . $ egkey.[key].strcxx . . $ endgamekey#str., extension); |
| 1944 | } else { |
| 1945 | if (isfoldersepcxx . . $ isfoldersep(7864480464b09eea).( path[pl-1] )) { |
| 1946 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (buf, "%s%s%s", path, egkeycxx . . $ egkey.[key].strcxx . . $ endgamekey#str., extension); |
| 1947 | } else { |
| 1948 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (buf, "%s%s%s%s", path, FOLDERSEPcxx . . $ `sysport/sysport.h:121:10`!, egkeycxx . . $ egkey.[key].strcxx . . $ endgamekey#str., extension); |
| 1949 | } |
| 1950 | } |
| 1951 | /*printf ("try to open %s --> ",filename);*/ |
| 1952 | /* Finally found the file? */ |
| 1953 | finp = fopencxx . . $ fopen(82ec0787cd37e0a3). (filename, "rb"); |
| 1954 | /*printf ("%d\n",finp != NULL);*/ |
| 1955 | } |
| 1956 | |
| 1957 | |
| 1958 | /* File was found and opened */ |
| 1959 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != finp) { |
| 1960 | fdcxx . . $ fd..keycxx . . $ filesopen#key. [fdcxx . . $ fd..ncxx . . $ filesopen#n.++] = key; |
| 1961 | egkeycxx . . $ egkey.[key].fdcxx . . $ endgamekey#fd. = finp; |
| 1962 | egkeycxx . . $ egkey.[key].pathncxx . . $ endgamekey#pathn. = pth; /* remember succesful path */ |
| 1963 | eg_was_opencxx . . $ eg_was_open.[key] = 1; |
| 1964 | } |
| 1965 | |
| 1966 | return finp; |
| 1967 | } |
| 1968 | |
| 1969 | #ifdef _MSC_VER |
| 1970 | /* to silence warning for sprintf usage */ |
| 1971 | #pragma warning(default:4996) |
| 1972 | #endif |
| 1973 | |
| 1974 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void |
| 1975 | sortlistscxx . . $ sortlists(1294880c14e5fd1f). (SQUAREcxx . . $ SQUARE# *ws, SQ_CONTENTcxx . . $ SQ_CONTENT# *wp) |
| 1976 | { |
| 1977 | int i, j; |
| 1978 | SQUAREcxx . . $ SQUARE# ts; |
| 1979 | SQ_CONTENTcxx . . $ SQ_CONTENT# tp; |
| 1980 | /* input is sorted */ |
| 1981 | for (i = 0; wp[i] != NOPIECEcxx . . $ `gtb-probe.c:175:9`!; i++) { |
| 1982 | for (j = (i+1); wp[j] != NOPIECEcxx . . $ `gtb-probe.c:175:9`!; j++) { |
| 1983 | if (wp[j] > wp[i]) { |
| 1984 | tp = wp[i]; wp[i] = wp[j]; wp[j] = tp; |
| 1985 | ts = ws[i]; ws[i] = ws[j]; ws[j] = ts; |
| 1986 | } |
| 1987 | } |
| 1988 | } |
| 1989 | } |
| 1990 | |
| 1991 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void |
| 1992 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (const SQUAREcxx . . $ SQUARE# *a, SQUAREcxx . . $ SQUARE# *b) |
| 1993 | { |
| 1994 | while (NOSQUAREcxx . . $ NOSQUARE. != (*b++ = *a++)) |
| 1995 | ; |
| 1996 | } |
| 1997 | |
| 1998 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void |
| 1999 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (const SQ_CONTENTcxx . . $ SQ_CONTENT# *a, SQ_CONTENTcxx . . $ SQ_CONTENT# *b) |
| 2000 | { |
| 2001 | while (NOPIECEcxx . . $ `gtb-probe.c:175:9`! != (*b++ = *a++)) |
| 2002 | ; |
| 2003 | } |
| 2004 | |
| 2005 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# |
| 2006 | inv_dtmcxx . . $ inv_dtm(a18c05e4017afb3d). (dtm_tcxx . . $ dtm_t# x) |
| 2007 | { |
| 2008 | unsigned mat; |
| 2009 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! ( (x & iUNKNBIT) == 0); |
| 2010 | |
| 2011 | if (x == iDRAWcxx . . $ iDRAW. || x == iFORBIDcxx . . $ iFORBID.) |
| 2012 | return x; |
| 2013 | |
| 2014 | mat = (unsigned)x & 3u; |
| 2015 | if (mat == iWMATEcxx . . $ iWMATE.) |
| 2016 | mat = iBMATEcxx . . $ iBMATE.; |
| 2017 | else |
| 2018 | mat = iWMATEcxx . . $ iWMATE.; |
| 2019 | |
| 2020 | x = (dtm_tcxx . . $ dtm_t#) (((unsigned)x & ~3u) | mat); |
| 2021 | |
| 2022 | return x; |
| 2023 | } |
| 2024 | |
| 2025 | static const char pctochcxx . . $ pctoch.[] = {'-','p','n','b','r','q','k'}; |
| 2026 | |
| 2027 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# |
| 2028 | egtb_get_idcxx . . $ egtb_get_id(4bccf12db147e54e). (SQ_CONTENTcxx . . $ SQ_CONTENT# *w, SQ_CONTENTcxx . . $ SQ_CONTENT# *b, tbkey_tcxx . . $ tbkey_t# *id) |
| 2029 | { |
| 2030 | |
| 2031 | char pcstr[2*MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 2032 | SQ_CONTENTcxx . . $ SQ_CONTENT# *s; |
| 2033 | char *t; |
| 2034 | bool_tcxx . . $ bool_t# found; |
| 2035 | tbkey_tcxx . . $ tbkey_t# i; |
| 2036 | static tbkey_tcxx . . $ tbkey_t# cache_i = 0; |
| 2037 | |
| 2038 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (PAWN == 1 && KNIGHT == 2 && BISHOP == 3 && ROOK == 4 && QUEEN == 5 && KING == 6); |
| 2039 | |
| 2040 | t = pcstr; |
| 2041 | |
| 2042 | s = w; |
| 2043 | while (NOPIECEcxx . . $ `gtb-probe.c:175:9`! != *s) |
| 2044 | *t++ = pctochcxx . . $ pctoch.[*s++]; |
| 2045 | s = b; |
| 2046 | while (NOPIECEcxx . . $ `gtb-probe.c:175:9`! != *s) |
| 2047 | *t++ = pctochcxx . . $ pctoch.[*s++]; |
| 2048 | |
| 2049 | *t = '\0'; |
| 2050 | |
| 2051 | found = (0 == strcmpcxx . . $ strcmp(5ae29d726ae57f88).(pcstr, egkeycxx . . $ egkey.[cache_i].strcxx . . $ endgamekey#str.)); |
| 2052 | if (found) { |
| 2053 | *id = cache_i; |
| 2054 | return found; |
| 2055 | } |
| 2056 | |
| 2057 | for (i = 0, found = FALSEcxx . . $ `gtb-probe.c:101:9`!; !found && egkeycxx . . $ egkey.[i].strcxx . . $ endgamekey#str. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; i++) { |
| 2058 | found = (0 == strcmpcxx . . $ strcmp(5ae29d726ae57f88).(pcstr, egkeycxx . . $ egkey.[i].strcxx . . $ endgamekey#str.)); |
| 2059 | } |
| 2060 | if (found) { |
| 2061 | cache_i = *id = i - 1; |
| 2062 | } |
| 2063 | |
| 2064 | return found; |
| 2065 | } |
| 2066 | |
| 2067 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void |
| 2068 | list_sq_flipNScxx . . $ list_sq_flipNS(218b13e5e7cbf689). (SQUAREcxx . . $ SQUARE# *s) |
| 2069 | { |
| 2070 | while (*s != NOSQUAREcxx . . $ NOSQUARE.) { |
| 2071 | *s ^= 070; |
| 2072 | s++; |
| 2073 | } |
| 2074 | } |
| 2075 | |
| 2076 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void |
| 2077 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (dtm_tcxx . . $ dtm_t# d, unsigned int *res, unsigned int *ply) |
| 2078 | { |
| 2079 | *ply = (unsigned int)d >> PLYSHIFTcxx . . $ PLYSHIFT.; |
| 2080 | *res = d & INFOMASKcxx . . $ INFOMASK.; |
| 2081 | } |
| 2082 | |
| 2083 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# |
| 2084 | packdistcxx . . $ packdist(c7f281617652c176). (unsigned int inf, unsigned int ply) |
| 2085 | { |
| 2086 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (inf <= INFOMASK); |
| 2087 | return (dtm_tcxx . . $ dtm_t#) (inf | ply << PLYSHIFTcxx . . $ PLYSHIFT.); |
| 2088 | } |
| 2089 | |
| 2090 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# |
| 2091 | adjust_upcxx . . $ adjust_up(a18c05e4017afb3d). (dtm_tcxx . . $ dtm_t# dist) |
| 2092 | { |
| 2093 | #if 0 |
| 2094 | static const dtm_t adding[] = { |
| 2095 | 0, 1<<PLYSHIFT, 1<<PLYSHIFT, 0, |
| 2096 | 0, 1<<PLYSHIFT, 1<<PLYSHIFT, 0 |
| 2097 | }; |
| 2098 | dist += adding [dist&INFOMASK]; |
| 2099 | return dist; |
| 2100 | #else |
| 2101 | unsigned udist = (unsigned) dist; |
| 2102 | switch (udist & INFOMASKcxx . . $ INFOMASK.) { |
| 2103 | case iWMATEcxx . . $ iWMATE.: |
| 2104 | case iWMATEtcxx . . $ iWMATEt.: |
| 2105 | case iBMATEcxx . . $ iBMATE.: |
| 2106 | case iBMATEtcxx . . $ iBMATEt.: |
| 2107 | udist += (1u << PLYSHIFTcxx . . $ PLYSHIFT.); |
| 2108 | break; |
| 2109 | default: |
| 2110 | break; |
| 2111 | } |
| 2112 | return (dtm_tcxx . . $ dtm_t#) udist; |
| 2113 | #endif |
| 2114 | } |
| 2115 | |
| 2116 | |
| 2117 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# |
| 2118 | bestxcxx . . $ bestx(d78549ce86dea269). (unsigned stm, dtm_tcxx . . $ dtm_t# a, dtm_tcxx . . $ dtm_t# b) |
| 2119 | { |
| 2120 | unsigned int key; |
| 2121 | static const unsigned int |
| 2122 | comparison [4] [4] = { |
| 2123 | /*draw, wmate, bmate, forbid*/ |
| 2124 | /* draw */ {0, 3, 0, 0}, |
| 2125 | /* wmate */ {0, 1, 0, 0}, |
| 2126 | /* bmate */ {3, 3, 2, 0}, |
| 2127 | /* forbid*/ {3, 3, 3, 0} |
| 2128 | |
| 2129 | /* 0 = selectfirst */ |
| 2130 | /* 1 = selectlowest */ |
| 2131 | /* 2 = selecthighest */ |
| 2132 | /* 3 = selectsecond */ |
| 2133 | }; |
| 2134 | |
| 2135 | static const unsigned int xorkey [2] = {0, 3}; |
| 2136 | dtm_tcxx . . $ dtm_t# retu[4]; |
| 2137 | dtm_tcxx . . $ dtm_t# ret = iFORBIDcxx . . $ iFORBID.; |
| 2138 | |
| 2139 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (stm == WH || stm == BL); |
| 2140 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! ((a & iUNKNBIT) == 0 && (b & iUNKNBIT) == 0 ); |
| 2141 | |
| 2142 | if (a == iFORBIDcxx . . $ iFORBID.) |
| 2143 | return b; |
| 2144 | if (b == iFORBIDcxx . . $ iFORBID.) |
| 2145 | return a; |
| 2146 | |
| 2147 | retu[0] = a; /* first parameter */ |
| 2148 | retu[1] = a; /* the lowest by default */ |
| 2149 | retu[2] = b; /* highest by default */ |
| 2150 | retu[3] = b; /* second parameter */ |
| 2151 | if (b < a) { |
| 2152 | retu[1] = b; |
| 2153 | retu[2] = a; |
| 2154 | } |
| 2155 | |
| 2156 | key = comparison [a&3] [b&3] ^ xorkey[stm]; |
| 2157 | ret = retu [key]; |
| 2158 | |
| 2159 | return ret; |
| 2160 | } |
| 2161 | |
| 2162 | |
| 2163 | /*--------------------------------------------------------------------------*\ |
| 2164 | | PACKING ZONE |
| 2165 | *--------------------------------------------------------------------------*/ |
| 2166 | |
| 2167 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! dtm_tcxx . . $ dtm_t# |
| 2168 | dtm_unpackcxx . . $ dtm_unpack(ba651c7f63dc5456). (unsigned stm, unsigned char packed) |
| 2169 | { |
| 2170 | unsigned int info, plies, prefx, store, moves; |
| 2171 | dtm_tcxx . . $ dtm_t# ret; |
| 2172 | unsigned int p = packed; |
| 2173 | |
| 2174 | if (iDRAWcxx . . $ iDRAW. == p || iFORBIDcxx . . $ iFORBID. == p) { |
| 2175 | return (dtm_tcxx . . $ dtm_t#) p; |
| 2176 | } |
| 2177 | |
| 2178 | info = (unsigned int) p & 3; |
| 2179 | store = (unsigned int) p >> 2; |
| 2180 | |
| 2181 | if (WHcxx . . $ `gtb-probe.c:183:9`! == stm) { |
| 2182 | switch (info) { |
| 2183 | case iWMATEcxx . . $ iWMATE.: |
| 2184 | moves = store + 1; |
| 2185 | plies = moves * 2 - 1; |
| 2186 | prefx = info; |
| 2187 | break; |
| 2188 | |
| 2189 | case iBMATEcxx . . $ iBMATE.: |
| 2190 | moves = store; |
| 2191 | plies = moves * 2; |
| 2192 | prefx = info; |
| 2193 | break; |
| 2194 | |
| 2195 | case iDRAWcxx . . $ iDRAW.: |
| 2196 | moves = store + 1 + 63; |
| 2197 | plies = moves * 2 - 1; |
| 2198 | prefx = iWMATEcxx . . $ iWMATE.; |
| 2199 | break; |
| 2200 | |
| 2201 | case iFORBIDcxx . . $ iFORBID.: |
| 2202 | |
| 2203 | moves = store + 63; |
| 2204 | plies = moves * 2; |
| 2205 | prefx = iBMATEcxx . . $ iBMATE.; |
| 2206 | break; |
| 2207 | default: |
| 2208 | plies = 0; |
| 2209 | prefx = 0; |
| 2210 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(0); |
| 2211 | break; |
| 2212 | |
| 2213 | } |
| 2214 | ret = (dtm_tcxx . . $ dtm_t#) (prefx | (plies << 3)); |
| 2215 | } else { |
| 2216 | switch (info) { |
| 2217 | case iBMATEcxx . . $ iBMATE.: |
| 2218 | moves = store + 1; |
| 2219 | plies = moves * 2 - 1; |
| 2220 | prefx = info; |
| 2221 | break; |
| 2222 | |
| 2223 | case iWMATEcxx . . $ iWMATE.: |
| 2224 | moves = store; |
| 2225 | plies = moves * 2; |
| 2226 | prefx = info; |
| 2227 | break; |
| 2228 | |
| 2229 | case iDRAWcxx . . $ iDRAW.: |
| 2230 | |
| 2231 | if (store == 63) { |
| 2232 | /* exception: no position in the 5-man |
| 2233 | TBs needs to store 63 for iBMATE |
| 2234 | it is then used to indicate iWMATE |
| 2235 | when just overflows */ |
| 2236 | store++; |
| 2237 | |
| 2238 | moves = store + 63; |
| 2239 | plies = moves * 2; |
| 2240 | prefx = iWMATEcxx . . $ iWMATE.; |
| 2241 | |
| 2242 | break; |
| 2243 | } |
| 2244 | |
| 2245 | moves = store + 1 + 63; |
| 2246 | plies = moves * 2 - 1; |
| 2247 | prefx = iBMATEcxx . . $ iBMATE.; |
| 2248 | break; |
| 2249 | |
| 2250 | case iFORBIDcxx . . $ iFORBID.: |
| 2251 | |
| 2252 | moves = store + 63; |
| 2253 | plies = moves * 2; |
| 2254 | prefx = iWMATEcxx . . $ iWMATE.; |
| 2255 | break; |
| 2256 | default: |
| 2257 | plies = 0; |
| 2258 | prefx = 0; |
| 2259 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(0); |
| 2260 | break; |
| 2261 | |
| 2262 | } |
| 2263 | ret = (dtm_tcxx . . $ dtm_t#) (prefx | (plies << 3)); |
| 2264 | } |
| 2265 | return ret; |
| 2266 | } |
| 2267 | |
| 2268 | |
| 2269 | /* |
| 2270 | static bool_t fwrite_entry_packed (FILE *dest, unsigned side, dtm_t x); |
| 2271 | */ |
| 2272 | |
| 2273 | |
| 2274 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# |
| 2275 | fread_entry_packedcxx . . $ fread_entry_packed(f6e02a26a69b6c6). (FILEcxx . . $ FILE# *finp, unsigned side, dtm_tcxx . . $ dtm_t# *px) |
| 2276 | { |
| 2277 | unsigned char p[SLOTSIZEcxx . . $ `gtb-probe.c:109:9`!]; |
| 2278 | bool_tcxx . . $ bool_t# ok = (SLOTSIZEcxx . . $ `gtb-probe.c:109:9`! == freadcxx . . $ fread(738fc8ac1d711e58). (p, sizeof(unsigned char), SLOTSIZEcxx . . $ `gtb-probe.c:109:9`!, finp)); |
| 2279 | if (ok) { |
| 2280 | *px = dtm_unpackcxx . . $ dtm_unpack(ba651c7f63dc5456). (side, p[0]); |
| 2281 | } |
| 2282 | return ok; |
| 2283 | } |
| 2284 | |
| 2285 | |
| 2286 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# |
| 2287 | fpark_entry_packedcxx . . $ fpark_entry_packed(c76b0cd2387b2e64). (FILEcxx . . $ FILE# *finp, unsigned side, index_tcxx . . $ index_t# max, index_tcxx . . $ index_t# idx) |
| 2288 | { |
| 2289 | bool_tcxx . . $ bool_t# ok; |
| 2290 | index_tcxx . . $ index_t# i; |
| 2291 | long int fseek_i; |
| 2292 | index_tcxx . . $ index_t# sz = (index_tcxx . . $ index_t#) sizeof(unsigned char); |
| 2293 | |
| 2294 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (side == WH || side == BL); |
| 2295 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (finp != NULL); |
| 2296 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx >= 0); |
| 2297 | i = ((index_tcxx . . $ index_t#)side * max + idx) * sz; |
| 2298 | fseek_i = (long int) i; |
| 2299 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (fseek_i >= 0); |
| 2300 | ok = (0 == fseekcxx . . $ fseek(543fae30d249f6b1). (finp, fseek_i, SEEK_SETcxx . . $ `<external>/232824719582829767/stdio.h:114:9`!)); |
| 2301 | return ok; |
| 2302 | } |
| 2303 | |
| 2304 | /*----------------------------------------------------*\ |
| 2305 | | |
| 2306 | | shared by probe and build |
| 2307 | | |
| 2308 | \*/ |
| 2309 | |
| 2310 | |
| 2311 | /*---------------------------------------------------------------------*\ |
| 2312 | | WDL CACHE Implementation ZONE |
| 2313 | \*---------------------------------------------------------------------*/ |
| 2314 | |
| 2315 | #define WDL_entries_per_unitcxx . . $ `gtb-probe.c:2315:9`! 4 |
| 2316 | #define WDL_entry_maskcxx . . $ `gtb-probe.c:2316:9`! 3 |
| 2317 | static size_t WDL_units_per_blockcxx . . $ WDL_units_per_block. = 0; |
| 2318 | |
| 2319 | static bool_tcxx . . $ bool_t# WDL_CACHE_INITIALIZEDcxx . . $ WDL_CACHE_INITIALIZED. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 2320 | |
| 2321 | typedef unsigned char unit_tcxx . . $ unit_t#; /* block unit */ |
| 2322 | |
| 2323 | typedef struct wdl_blockcxx . . $ wdl_block# wdl_block_tcxx . . $ wdl_block_t#; |
| 2324 | |
| 2325 | struct wdl_blockcxx . . $ wdl_block# { |
| 2326 | tbkey_tcxx . . $ tbkey_t# keycxx . . $ wdl_block#key.; |
| 2327 | unsigned sidecxx . . $ wdl_block#side.; |
| 2328 | index_tcxx . . $ index_t# offsetcxx . . $ wdl_block#offset.; |
| 2329 | unit_tcxx . . $ unit_t# *p_arrcxx . . $ wdl_block#p_arr.; |
| 2330 | wdl_block_tcxx . . $ wdl_block_t# *prevcxx . . $ wdl_block#prev.; |
| 2331 | wdl_block_tcxx . . $ wdl_block_t# *nextcxx . . $ wdl_block#next.; |
| 2332 | }; |
| 2333 | |
| 2334 | struct WDL_CACHEcxx . . $ WDL_CACHE# { |
| 2335 | /* defined at init */ |
| 2336 | bool_tcxx . . $ bool_t# cachedcxx . . $ WDL_CACHE#cached.; |
| 2337 | size_t max_blockscxx . . $ WDL_CACHE#max_blocks.; |
| 2338 | size_t entries_per_blockcxx . . $ WDL_CACHE#entries_per_block.; |
| 2339 | unit_tcxx . . $ unit_t# * buffercxx . . $ WDL_CACHE#buffer.; |
| 2340 | |
| 2341 | /* flushables */ |
| 2342 | wdl_block_tcxx . . $ wdl_block_t# * topcxx . . $ WDL_CACHE#top.; |
| 2343 | wdl_block_tcxx . . $ wdl_block_t# * botcxx . . $ WDL_CACHE#bot.; |
| 2344 | size_t ncxx . . $ WDL_CACHE#n.; |
| 2345 | wdl_block_tcxx . . $ wdl_block_t# * blockscxx . . $ WDL_CACHE#blocks.; /* was entry */ |
| 2346 | |
| 2347 | /* counters */ |
| 2348 | uint64_tcxx . . $ uint64_t# hardcxx . . $ WDL_CACHE#hard.; |
| 2349 | uint64_tcxx . . $ uint64_t# softcxx . . $ WDL_CACHE#soft.; |
| 2350 | uint64_tcxx . . $ uint64_t# hardmissescxx . . $ WDL_CACHE#hardmisses.; |
| 2351 | uint64_tcxx . . $ uint64_t# hitscxx . . $ WDL_CACHE#hits.; |
| 2352 | uint64_tcxx . . $ uint64_t# softmissescxx . . $ WDL_CACHE#softmisses.; |
| 2353 | uint64_tcxx . . $ uint64_t# comparisonscxx . . $ WDL_CACHE#comparisons.; |
| 2354 | }; |
| 2355 | |
| 2356 | struct WDL_CACHEcxx . . $ WDL_CACHE# wdl_cachecxx . . $ wdl_cache. = {FALSEcxx . . $ `gtb-probe.c:101:9`!,0,0,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, |
| 2357 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,0,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, |
| 2358 | 0,0,0,0,0,0}; |
| 2359 | |
| 2360 | |
| 2361 | /*---------------------------------------------------------------------*\ |
| 2362 | | DTM CACHE Implementation ZONE |
| 2363 | \*---------------------------------------------------------------------*/ |
| 2364 | |
| 2365 | struct dtm_blockcxx . . $ dtm_block#; |
| 2366 | |
| 2367 | typedef struct dtm_blockcxx . . $ dtm_block# dtm_block_tcxx . . $ dtm_block_t#; |
| 2368 | |
| 2369 | struct dtm_blockcxx . . $ dtm_block# { |
| 2370 | tbkey_tcxx . . $ tbkey_t# keycxx . . $ dtm_block#key.; |
| 2371 | unsigned sidecxx . . $ dtm_block#side.; |
| 2372 | index_tcxx . . $ index_t# offsetcxx . . $ dtm_block#offset.; |
| 2373 | dtm_tcxx . . $ dtm_t# *p_arrcxx . . $ dtm_block#p_arr.; |
| 2374 | dtm_block_tcxx . . $ dtm_block_t# *prevcxx . . $ dtm_block#prev.; |
| 2375 | dtm_block_tcxx . . $ dtm_block_t# *nextcxx . . $ dtm_block#next.; |
| 2376 | }; |
| 2377 | |
| 2378 | struct cache_tablecxx . . $ cache_table# { |
| 2379 | /* defined at init */ |
| 2380 | bool_tcxx . . $ bool_t# cachedcxx . . $ cache_table#cached.; |
| 2381 | size_t max_blockscxx . . $ cache_table#max_blocks.; |
| 2382 | size_t entries_per_blockcxx . . $ cache_table#entries_per_block.; |
| 2383 | dtm_tcxx . . $ dtm_t# * buffercxx . . $ cache_table#buffer.; |
| 2384 | |
| 2385 | /* flushables */ |
| 2386 | dtm_block_tcxx . . $ dtm_block_t# * topcxx . . $ cache_table#top.; |
| 2387 | dtm_block_tcxx . . $ dtm_block_t# * botcxx . . $ cache_table#bot.; |
| 2388 | size_t ncxx . . $ cache_table#n.; |
| 2389 | dtm_block_tcxx . . $ dtm_block_t# * entrycxx . . $ cache_table#entry.; |
| 2390 | |
| 2391 | /* counters */ |
| 2392 | uint64_tcxx . . $ uint64_t# hardcxx . . $ cache_table#hard.; |
| 2393 | uint64_tcxx . . $ uint64_t# softcxx . . $ cache_table#soft.; |
| 2394 | uint64_tcxx . . $ uint64_t# hardmissescxx . . $ cache_table#hardmisses.; |
| 2395 | uint64_tcxx . . $ uint64_t# hitscxx . . $ cache_table#hits.; |
| 2396 | uint64_tcxx . . $ uint64_t# softmissescxx . . $ cache_table#softmisses.; |
| 2397 | unsigned long comparisonscxx . . $ cache_table#comparisons.; |
| 2398 | }; |
| 2399 | |
| 2400 | struct cache_tablecxx . . $ cache_table# dtm_cachecxx . . $ dtm_cache. = {FALSEcxx . . $ `gtb-probe.c:101:9`!,0,0,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, |
| 2401 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,0,NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, |
| 2402 | 0,0,0,0,0,0}; |
| 2403 | |
| 2404 | struct general_counterscxx . . $ general_counters# { |
| 2405 | /* counters */ |
| 2406 | uint64_tcxx . . $ uint64_t# hitscxx . . $ general_counters#hits.; |
| 2407 | uint64_tcxx . . $ uint64_t# misscxx . . $ general_counters#miss.; |
| 2408 | }; |
| 2409 | |
| 2410 | static struct general_counterscxx . . $ general_counters# Drivecxx . . $ Drive. = {0,0}; |
| 2411 | |
| 2412 | |
| 2413 | static void split_indexcxx . . $ split_index(a15de8426066f324). (size_t entries_per_block, index_tcxx . . $ index_t# i, index_tcxx . . $ index_t# *o, index_tcxx . . $ index_t# *r); |
| 2414 | static dtm_block_tcxx . . $ dtm_block_t# *point_block_to_replacecxx . . $ point_block_to_replace(370370592ac41292). (void); |
| 2415 | static bool_tcxx . . $ bool_t# preload_cachecxx . . $ preload_cache(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx); |
| 2416 | static void movetotopcxx . . $ movetotop(59d0be0dcb784255). (dtm_block_tcxx . . $ dtm_block_t# *t); |
| 2417 | |
| 2418 | /*--cache prototypes--------------------------------------------------------*/ |
| 2419 | |
| 2420 | /*- WDL --------------------------------------------------------------------*/ |
| 2421 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 2422 | static unsigned int wdl_extractcxx . . $ wdl_extract(3fae420892153308). (unit_tcxx . . $ unit_t# *uarr, index_tcxx . . $ index_t# x); |
| 2423 | static wdl_block_tcxx . . $ wdl_block_t# * wdl_point_block_to_replacecxx . . $ wdl_point_block_to_replace(e0bb2f31b3742ce1). (void); |
| 2424 | static void wdl_movetotopcxx . . $ wdl_movetotop(79585dfb8a48616e). (wdl_block_tcxx . . $ wdl_block_t# *t); |
| 2425 | |
| 2426 | #if 0 |
| 2427 | static bool_t wdl_cache_init (size_t cache_mem); |
| 2428 | static void wdl_cache_flush (void); |
| 2429 | static bool_t get_WDL (tbkey_t key, unsigned side, index_t idx, unsigned int *info_out, bool_t probe_hard_flag); |
| 2430 | #endif |
| 2431 | |
| 2432 | static bool_tcxx . . $ bool_t# wdl_cache_is_oncxx . . $ wdl_cache_is_on(b126dc7c1de90089). (void); |
| 2433 | static void wdl_cache_reset_counterscxx . . $ wdl_cache_reset_counters(49f6e7a06ebc5aa8). (void); |
| 2434 | static void wdl_cache_donecxx . . $ wdl_cache_done(49f6e7a06ebc5aa8). (void); |
| 2435 | |
| 2436 | static wdl_block_tcxx . . $ wdl_block_t# * wdl_point_block_to_replacecxx . . $ wdl_point_block_to_replace(e0bb2f31b3742ce1). (void); |
| 2437 | static bool_tcxx . . $ bool_t# get_WDL_from_cachecxx . . $ get_WDL_from_cache(5933a67032aa547c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, unsigned int *out); |
| 2438 | static void wdl_movetotopcxx . . $ wdl_movetotop(79585dfb8a48616e). (wdl_block_tcxx . . $ wdl_block_t# *t); |
| 2439 | static bool_tcxx . . $ bool_t# wdl_preload_cachecxx . . $ wdl_preload_cache(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx); |
| 2440 | #endif |
| 2441 | /*--------------------------------------------------------------------------*/ |
| 2442 | /*- DTM --------------------------------------------------------------------*/ |
| 2443 | static bool_tcxx . . $ bool_t# dtm_cache_is_oncxx . . $ dtm_cache_is_on(b126dc7c1de90089). (void); |
| 2444 | static void dtm_cache_reset_counterscxx . . $ dtm_cache_reset_counters(49f6e7a06ebc5aa8). (void); |
| 2445 | static void dtm_cache_donecxx . . $ dtm_cache_done(49f6e7a06ebc5aa8). (void); |
| 2446 | |
| 2447 | static size_t dtm_cache_initcxx . . $ dtm_cache_init(ecdaa1632f49f591). (size_t cache_mem); |
| 2448 | static void dtm_cache_flushcxx . . $ dtm_cache_flush(49f6e7a06ebc5aa8). (void); |
| 2449 | /*--------------------------------------------------------------------------*/ |
| 2450 | |
| 2451 | static bool_tcxx . . $ bool_t# |
| 2452 | dtm_cache_is_oncxx . . $ dtm_cache_is_on(b126dc7c1de90089). (void) |
| 2453 | { |
| 2454 | return dtm_cachecxx . . $ dtm_cache..cachedcxx . . $ cache_table#cached.; |
| 2455 | } |
| 2456 | |
| 2457 | static void |
| 2458 | dtm_cache_reset_counterscxx . . $ dtm_cache_reset_counters(49f6e7a06ebc5aa8). (void) |
| 2459 | { |
| 2460 | dtm_cachecxx . . $ dtm_cache..hardcxx . . $ cache_table#hard. = 0; |
| 2461 | dtm_cachecxx . . $ dtm_cache..softcxx . . $ cache_table#soft. = 0; |
| 2462 | dtm_cachecxx . . $ dtm_cache..hardmissescxx . . $ cache_table#hardmisses. = 0; |
| 2463 | dtm_cachecxx . . $ dtm_cache..hitscxx . . $ cache_table#hits. = 0; |
| 2464 | dtm_cachecxx . . $ dtm_cache..softmissescxx . . $ cache_table#softmisses. = 0; |
| 2465 | dtm_cachecxx . . $ dtm_cache..comparisonscxx . . $ cache_table#comparisons. = 0; |
| 2466 | return; |
| 2467 | } |
| 2468 | |
| 2469 | |
| 2470 | static size_t |
| 2471 | dtm_cache_initcxx . . $ dtm_cache_init(ecdaa1632f49f591). (size_t cache_mem) |
| 2472 | { |
| 2473 | unsigned int i; |
| 2474 | dtm_block_tcxx . . $ dtm_block_t# *p; |
| 2475 | size_t entries_per_block; |
| 2476 | size_t max_blocks; |
| 2477 | size_t block_mem; |
| 2478 | |
| 2479 | if (DTM_CACHE_INITIALIZEDcxx . . $ DTM_CACHE_INITIALIZED.) |
| 2480 | dtm_cache_donecxx . . $ dtm_cache_done(49f6e7a06ebc5aa8).(); |
| 2481 | |
| 2482 | entries_per_block = 16 * 1024; /* fixed, needed for the compression schemes */ |
| 2483 | |
| 2484 | block_mem = entries_per_block * sizeof(dtm_tcxx . . $ dtm_t#); |
| 2485 | |
| 2486 | max_blocks = cache_mem / block_mem; |
| 2487 | if (!Uncompressedcxx . . $ Uncompressed. && 1 > max_blocks) |
| 2488 | max_blocks = 1; |
| 2489 | cache_mem = max_blocks * block_mem; |
| 2490 | |
| 2491 | |
| 2492 | dtm_cache_reset_counterscxx . . $ dtm_cache_reset_counters(49f6e7a06ebc5aa8). (); |
| 2493 | |
| 2494 | dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block. = entries_per_block; |
| 2495 | dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks. = max_blocks; |
| 2496 | dtm_cachecxx . . $ dtm_cache..cachedcxx . . $ cache_table#cached. = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 2497 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2498 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2499 | dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n. = 0; |
| 2500 | |
| 2501 | if (0 == cache_mem || NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == (dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer. = (dtm_tcxx . . $ dtm_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (cache_mem))) { |
| 2502 | dtm_cachecxx . . $ dtm_cache..cachedcxx . . $ cache_table#cached. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 2503 | dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2504 | dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2505 | return 0; |
| 2506 | } |
| 2507 | |
| 2508 | if (0 == max_blocks|| NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == (dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry. = (dtm_block_tcxx . . $ dtm_block_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (max_blocks * sizeof(dtm_block_tcxx . . $ dtm_block_t#)))) { |
| 2509 | dtm_cachecxx . . $ dtm_cache..cachedcxx . . $ cache_table#cached. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 2510 | dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2511 | freecxx . . $ free(5d22bdacc48458e8). (dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer.); |
| 2512 | dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2513 | return 0; |
| 2514 | } |
| 2515 | |
| 2516 | for (i = 0; i < max_blocks; i++) { |
| 2517 | p = &dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry.[i]; |
| 2518 | p->keycxx . . $ dtm_block#key. = -1; |
| 2519 | p->sidecxx . . $ dtm_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 2520 | p->offsetcxx . . $ dtm_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 2521 | p->p_arrcxx . . $ dtm_block#p_arr. = dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer. + i * entries_per_block; |
| 2522 | p->prevcxx . . $ dtm_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2523 | p->nextcxx . . $ dtm_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2524 | } |
| 2525 | |
| 2526 | DTM_CACHE_INITIALIZEDcxx . . $ DTM_CACHE_INITIALIZED. = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 2527 | |
| 2528 | return cache_mem; |
| 2529 | } |
| 2530 | |
| 2531 | |
| 2532 | static void |
| 2533 | dtm_cache_donecxx . . $ dtm_cache_done(49f6e7a06ebc5aa8). (void) |
| 2534 | { |
| 2535 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(DTM_CACHE_INITIALIZED); |
| 2536 | |
| 2537 | dtm_cachecxx . . $ dtm_cache..cachedcxx . . $ cache_table#cached. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 2538 | dtm_cachecxx . . $ dtm_cache..hardcxx . . $ cache_table#hard. = 0; |
| 2539 | dtm_cachecxx . . $ dtm_cache..softcxx . . $ cache_table#soft. = 0; |
| 2540 | dtm_cachecxx . . $ dtm_cache..hardmissescxx . . $ cache_table#hardmisses. = 0; |
| 2541 | dtm_cachecxx . . $ dtm_cache..hitscxx . . $ cache_table#hits. = 0; |
| 2542 | dtm_cachecxx . . $ dtm_cache..softmissescxx . . $ cache_table#softmisses. = 0; |
| 2543 | dtm_cachecxx . . $ dtm_cache..comparisonscxx . . $ cache_table#comparisons. = 0; |
| 2544 | dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks. = 0; |
| 2545 | dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block. = 0; |
| 2546 | |
| 2547 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2548 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2549 | dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n. = 0; |
| 2550 | |
| 2551 | if (dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 2552 | freecxx . . $ free(5d22bdacc48458e8). (dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer.); |
| 2553 | dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2554 | |
| 2555 | if (dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 2556 | freecxx . . $ free(5d22bdacc48458e8). (dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry.); |
| 2557 | dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2558 | |
| 2559 | DTM_CACHE_INITIALIZEDcxx . . $ DTM_CACHE_INITIALIZED. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 2560 | |
| 2561 | return; |
| 2562 | } |
| 2563 | |
| 2564 | static void |
| 2565 | dtm_cache_flushcxx . . $ dtm_cache_flush(49f6e7a06ebc5aa8). (void) |
| 2566 | { |
| 2567 | unsigned int i; |
| 2568 | dtm_block_tcxx . . $ dtm_block_t# *p; |
| 2569 | size_t entries_per_block = dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block.; |
| 2570 | size_t max_blocks = dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks.; |
| 2571 | |
| 2572 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2573 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2574 | dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n. = 0; |
| 2575 | |
| 2576 | for (i = 0; i < max_blocks; i++) { |
| 2577 | p = &dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry.[i]; |
| 2578 | p->keycxx . . $ dtm_block#key. = -1; |
| 2579 | p->sidecxx . . $ dtm_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 2580 | p->offsetcxx . . $ dtm_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 2581 | p->p_arrcxx . . $ dtm_block#p_arr. = dtm_cachecxx . . $ dtm_cache..buffercxx . . $ cache_table#buffer. + i * entries_per_block; |
| 2582 | p->prevcxx . . $ dtm_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2583 | p->nextcxx . . $ dtm_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2584 | } |
| 2585 | dtm_cache_reset_counterscxx . . $ dtm_cache_reset_counters(49f6e7a06ebc5aa8). (); |
| 2586 | return; |
| 2587 | } |
| 2588 | |
| 2589 | |
| 2590 | /*---- end tbcache zone ----------------------------------------------------------------------*/ |
| 2591 | |
| 2592 | extern bool_tcxx . . $ bool_t# |
| 2593 | tbcache_is_oncxx . . $ tbcache_is_on(b126dc7c1de90089). (void) |
| 2594 | { |
| 2595 | return dtm_cache_is_oncxx . . $ dtm_cache_is_on(b126dc7c1de90089).() || wdl_cache_is_oncxx . . $ wdl_cache_is_on(b126dc7c1de90089).(); |
| 2596 | } |
| 2597 | |
| 2598 | |
| 2599 | /* STATISTICS OUTPUT */ |
| 2600 | |
| 2601 | extern void |
| 2602 | tbstats_getcxx . . $ tbstats_get(f5411b90d3b076c6). (struct TB_STATScxx . . $ TB_STATS# *x) |
| 2603 | { |
| 2604 | long unsigned mask = 0xfffffffflu; |
| 2605 | uint64_tcxx . . $ uint64_t# memory_hits, total_hits; |
| 2606 | |
| 2607 | |
| 2608 | /* |
| 2609 | | WDL CACHE |
| 2610 | \*---------------------------------------------------*/ |
| 2611 | |
| 2612 | x->wdl_easy_hitscxx . . $ TB_STATS#wdl_easy_hits.[0] = (long unsigned)(wdl_cachecxx . . $ wdl_cache..hitscxx . . $ WDL_CACHE#hits. & mask); |
| 2613 | x->wdl_easy_hitscxx . . $ TB_STATS#wdl_easy_hits.[1] = (long unsigned)(wdl_cachecxx . . $ wdl_cache..hitscxx . . $ WDL_CACHE#hits. >> 32); |
| 2614 | |
| 2615 | x->wdl_hard_probcxx . . $ TB_STATS#wdl_hard_prob.[0] = (long unsigned)(wdl_cachecxx . . $ wdl_cache..hardcxx . . $ WDL_CACHE#hard. & mask); |
| 2616 | x->wdl_hard_probcxx . . $ TB_STATS#wdl_hard_prob.[1] = (long unsigned)(wdl_cachecxx . . $ wdl_cache..hardcxx . . $ WDL_CACHE#hard. >> 32); |
| 2617 | |
| 2618 | x->wdl_soft_probcxx . . $ TB_STATS#wdl_soft_prob.[0] = (long unsigned)(wdl_cachecxx . . $ wdl_cache..softcxx . . $ WDL_CACHE#soft. & mask); |
| 2619 | x->wdl_soft_probcxx . . $ TB_STATS#wdl_soft_prob.[1] = (long unsigned)(wdl_cachecxx . . $ wdl_cache..softcxx . . $ WDL_CACHE#soft. >> 32); |
| 2620 | |
| 2621 | x->wdl_cachesizecxx . . $ TB_STATS#wdl_cachesize. = WDL_cache_sizecxx . . $ WDL_cache_size.; |
| 2622 | |
| 2623 | /* occupancy */ |
| 2624 | x->wdl_occupancycxx . . $ TB_STATS#wdl_occupancy. = wdl_cachecxx . . $ wdl_cache..max_blockscxx . . $ WDL_CACHE#max_blocks.==0? 0:(double)100.0*(double)wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n./(double)wdl_cachecxx . . $ wdl_cache..max_blockscxx . . $ WDL_CACHE#max_blocks.; |
| 2625 | |
| 2626 | /* |
| 2627 | | DTM CACHE |
| 2628 | \*---------------------------------------------------*/ |
| 2629 | |
| 2630 | x->dtm_easy_hitscxx . . $ TB_STATS#dtm_easy_hits.[0] = (long unsigned)(dtm_cachecxx . . $ dtm_cache..hitscxx . . $ cache_table#hits. & mask); |
| 2631 | x->dtm_easy_hitscxx . . $ TB_STATS#dtm_easy_hits.[1] = (long unsigned)(dtm_cachecxx . . $ dtm_cache..hitscxx . . $ cache_table#hits. >> 32); |
| 2632 | |
| 2633 | x->dtm_hard_probcxx . . $ TB_STATS#dtm_hard_prob.[0] = (long unsigned)(dtm_cachecxx . . $ dtm_cache..hardcxx . . $ cache_table#hard. & mask); |
| 2634 | x->dtm_hard_probcxx . . $ TB_STATS#dtm_hard_prob.[1] = (long unsigned)(dtm_cachecxx . . $ dtm_cache..hardcxx . . $ cache_table#hard. >> 32); |
| 2635 | |
| 2636 | x->dtm_soft_probcxx . . $ TB_STATS#dtm_soft_prob.[0] = (long unsigned)(dtm_cachecxx . . $ dtm_cache..softcxx . . $ cache_table#soft. & mask); |
| 2637 | x->dtm_soft_probcxx . . $ TB_STATS#dtm_soft_prob.[1] = (long unsigned)(dtm_cachecxx . . $ dtm_cache..softcxx . . $ cache_table#soft. >> 32); |
| 2638 | |
| 2639 | x->dtm_cachesizecxx . . $ TB_STATS#dtm_cachesize. = DTM_cache_sizecxx . . $ DTM_cache_size.; |
| 2640 | |
| 2641 | /* occupancy */ |
| 2642 | x->dtm_occupancycxx . . $ TB_STATS#dtm_occupancy. = dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks.==0? 0:(double)100.0*(double)dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n./(double)dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks.; |
| 2643 | |
| 2644 | /* |
| 2645 | | GENERAL |
| 2646 | \*---------------------------------------------------*/ |
| 2647 | |
| 2648 | /* memory */ |
| 2649 | memory_hits = wdl_cachecxx . . $ wdl_cache..hitscxx . . $ WDL_CACHE#hits. + dtm_cachecxx . . $ dtm_cache..hitscxx . . $ cache_table#hits.; |
| 2650 | x->memory_hitscxx . . $ TB_STATS#memory_hits.[0] = (long unsigned)(memory_hits & mask); |
| 2651 | x->memory_hitscxx . . $ TB_STATS#memory_hits.[1] = (long unsigned)(memory_hits >> 32); |
| 2652 | |
| 2653 | /* hard drive */ |
| 2654 | x->drive_hitscxx . . $ TB_STATS#drive_hits.[0] = (long unsigned)(Drivecxx . . $ Drive..hitscxx . . $ general_counters#hits. & mask); |
| 2655 | x->drive_hitscxx . . $ TB_STATS#drive_hits.[1] = (long unsigned)(Drivecxx . . $ Drive..hitscxx . . $ general_counters#hits. >> 32); |
| 2656 | |
| 2657 | x->drive_misscxx . . $ TB_STATS#drive_miss.[0] = (long unsigned)(Drivecxx . . $ Drive..misscxx . . $ general_counters#miss. & mask); |
| 2658 | x->drive_misscxx . . $ TB_STATS#drive_miss.[1] = (long unsigned)(Drivecxx . . $ Drive..misscxx . . $ general_counters#miss. >> 32); |
| 2659 | |
| 2660 | x->bytes_readcxx . . $ TB_STATS#bytes_read.[0] = (long unsigned)(Bytes_readcxx . . $ Bytes_read. & mask); |
| 2661 | x->bytes_readcxx . . $ TB_STATS#bytes_read.[1] = (long unsigned)(Bytes_readcxx . . $ Bytes_read. >> 32); |
| 2662 | |
| 2663 | x->files_openedcxx . . $ TB_STATS#files_opened. = eg_was_open_countcxx . . $ eg_was_open_count(f708dce9a8856c70).(); |
| 2664 | |
| 2665 | /* total */ |
| 2666 | total_hits = memory_hits + Drivecxx . . $ Drive..hitscxx . . $ general_counters#hits.; |
| 2667 | x->total_hitscxx . . $ TB_STATS#total_hits.[0] = (long unsigned)(total_hits & mask); |
| 2668 | x->total_hitscxx . . $ TB_STATS#total_hits.[1] = (long unsigned)(total_hits >> 32); |
| 2669 | |
| 2670 | /* efficiency */ |
| 2671 | { uint64_tcxx . . $ uint64_t# denominator = memory_hits + Drivecxx . . $ Drive..hitscxx . . $ general_counters#hits. + Drivecxx . . $ Drive..misscxx . . $ general_counters#miss.; |
| 2672 | x->memory_efficiencycxx . . $ TB_STATS#memory_efficiency. = 0==denominator? 0: 100.0 * (double)(memory_hits) / (double)(denominator); |
| 2673 | } |
| 2674 | } |
| 2675 | |
| 2676 | |
| 2677 | extern bool_tcxx . . $ bool_t# |
| 2678 | tbcache_initcxx . . $ tbcache_init(4292610292d2867f). (size_t cache_mem, int wdl_fraction) |
| 2679 | { |
| 2680 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (wdl_fraction <= WDL_FRACTION_MAX && wdl_fraction >= 0); |
| 2681 | |
| 2682 | /* defensive against input */ |
| 2683 | if (wdl_fraction > WDL_FRACTION_MAXcxx . . $ WDL_FRACTION_MAX.) wdl_fraction = WDL_FRACTION_MAXcxx . . $ WDL_FRACTION_MAX.; |
| 2684 | if (wdl_fraction < 0) wdl_fraction = 0; |
| 2685 | WDL_FRACTIONcxx . . $ WDL_FRACTION. = wdl_fraction; |
| 2686 | |
| 2687 | DTM_cache_sizecxx . . $ DTM_cache_size. = (cache_mem/(size_t)WDL_FRACTION_MAXcxx . . $ WDL_FRACTION_MAX.)*(size_t)(WDL_FRACTION_MAXcxx . . $ WDL_FRACTION_MAX.-WDL_FRACTIONcxx . . $ WDL_FRACTION.); |
| 2688 | WDL_cache_sizecxx . . $ WDL_cache_size. = (cache_mem/(size_t)WDL_FRACTION_MAXcxx . . $ WDL_FRACTION_MAX.)*(size_t) WDL_FRACTIONcxx . . $ WDL_FRACTION. ; |
| 2689 | |
| 2690 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 2691 | /* returns the actual memory allocated */ |
| 2692 | DTM_cache_sizecxx . . $ DTM_cache_size. = dtm_cache_initcxx . . $ dtm_cache_init(ecdaa1632f49f591). (DTM_cache_sizecxx . . $ DTM_cache_size.); |
| 2693 | WDL_cache_sizecxx . . $ WDL_cache_size. = wdl_cache_initcxx . . $ wdl_cache_init(ecdaa1632f49f591). (WDL_cache_sizecxx . . $ WDL_cache_size.); |
| 2694 | #else |
| 2695 | /* returns the actual memory allocated */ |
| 2696 | DTM_cache_size = dtm_cache_init (DTM_cache_size); |
| 2697 | #endif |
| 2698 | tbstats_resetcxx . . $ tbstats_reset(49f6e7a06ebc5aa8). (); |
| 2699 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 2700 | } |
| 2701 | |
| 2702 | extern bool_tcxx . . $ bool_t# |
| 2703 | tbcache_restartcxx . . $ tbcache_restart(4292610292d2867f). (size_t cache_mem, int wdl_fraction) |
| 2704 | { |
| 2705 | return tbcache_initcxx . . $ tbcache_init(4292610292d2867f). (cache_mem, wdl_fraction); |
| 2706 | } |
| 2707 | |
| 2708 | extern void |
| 2709 | tbcache_donecxx . . $ tbcache_done(49f6e7a06ebc5aa8). (void) |
| 2710 | { |
| 2711 | dtm_cache_donecxx . . $ dtm_cache_done(49f6e7a06ebc5aa8).(); |
| 2712 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 2713 | wdl_cache_donecxx . . $ wdl_cache_done(49f6e7a06ebc5aa8).(); |
| 2714 | #endif |
| 2715 | tbstats_resetcxx . . $ tbstats_reset(49f6e7a06ebc5aa8). (); |
| 2716 | return; |
| 2717 | } |
| 2718 | |
| 2719 | extern void |
| 2720 | tbcache_flushcxx . . $ tbcache_flush(49f6e7a06ebc5aa8). (void) |
| 2721 | { |
| 2722 | dtm_cache_flushcxx . . $ dtm_cache_flush(49f6e7a06ebc5aa8).(); |
| 2723 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 2724 | wdl_cache_flushcxx . . $ wdl_cache_flush(49f6e7a06ebc5aa8).(); |
| 2725 | #endif |
| 2726 | tbstats_resetcxx . . $ tbstats_reset(49f6e7a06ebc5aa8). (); |
| 2727 | return; |
| 2728 | } |
| 2729 | |
| 2730 | extern void |
| 2731 | tbstats_resetcxx . . $ tbstats_reset(49f6e7a06ebc5aa8). (void) |
| 2732 | { |
| 2733 | dtm_cache_reset_counterscxx . . $ dtm_cache_reset_counters(49f6e7a06ebc5aa8). (); |
| 2734 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 2735 | wdl_cache_reset_counterscxx . . $ wdl_cache_reset_counters(49f6e7a06ebc5aa8). (); |
| 2736 | #endif |
| 2737 | eg_was_open_resetcxx . . $ eg_was_open_reset(49f6e7a06ebc5aa8).(); |
| 2738 | Drivecxx . . $ Drive..hitscxx . . $ general_counters#hits. = 0; |
| 2739 | Drivecxx . . $ Drive..misscxx . . $ general_counters#miss. = 0; |
| 2740 | return; |
| 2741 | } |
| 2742 | |
| 2743 | static dtm_block_tcxx . . $ dtm_block_t# * |
| 2744 | dtm_cache_pointblockcxx . . $ dtm_cache_pointblock(f0740962f60935df). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx) |
| 2745 | { |
| 2746 | index_tcxx . . $ index_t# offset; |
| 2747 | index_tcxx . . $ index_t# remainder; |
| 2748 | dtm_block_tcxx . . $ dtm_block_t# * p; |
| 2749 | dtm_block_tcxx . . $ dtm_block_t# * ret; |
| 2750 | |
| 2751 | if (!dtm_cache_is_oncxx . . $ dtm_cache_is_on(b126dc7c1de90089).()) |
| 2752 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2753 | |
| 2754 | split_indexcxx . . $ split_index(a15de8426066f324). (dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block., idx, &offset, &remainder); |
| 2755 | |
| 2756 | ret = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2757 | |
| 2758 | for (p = dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.; p != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; p = p->prevcxx . . $ dtm_block#prev.) { |
| 2759 | |
| 2760 | dtm_cachecxx . . $ dtm_cache..comparisonscxx . . $ cache_table#comparisons.++; |
| 2761 | |
| 2762 | if (key == p->keycxx . . $ dtm_block#key. && side == p->sidecxx . . $ dtm_block#side. && offset == p->offsetcxx . . $ dtm_block#offset.) { |
| 2763 | ret = p; |
| 2764 | break; |
| 2765 | } |
| 2766 | } |
| 2767 | |
| 2768 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("point_to_dtm_block ok?",(ret!=NULL)) |
| 2769 | |
| 2770 | return ret; |
| 2771 | } |
| 2772 | |
| 2773 | /****************************************************************************\ |
| 2774 | | |
| 2775 | | |
| 2776 | | WRAPPERS for ENCODING/DECODING FUNCTIONS ZONE |
| 2777 | | |
| 2778 | | |
| 2779 | \****************************************************************************/ |
| 2780 | |
| 2781 | #include "gtb-dec.h"cxx . . $ `<file>/gtb-dec.h`/ |
| 2782 | |
| 2783 | /* |
| 2784 | | |
| 2785 | | PRE LOAD CACHE AND DEPENDENT FUNCTIONS |
| 2786 | | |
| 2787 | \*--------------------------------------------------------------------------*/ |
| 2788 | |
| 2789 | struct ZIPINFOcxx . . $ ZIPINFO# { |
| 2790 | index_tcxx . . $ index_t# extraoffsetcxx . . $ ZIPINFO#extraoffset.; |
| 2791 | index_tcxx . . $ index_t# totalblockscxx . . $ ZIPINFO#totalblocks.; |
| 2792 | index_tcxx . . $ index_t# * blockindexcxx . . $ ZIPINFO#blockindex.; |
| 2793 | }; |
| 2794 | |
| 2795 | struct ZIPINFOcxx . . $ ZIPINFO# Zipinfocxx . . $ Zipinfo.[MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!]; |
| 2796 | |
| 2797 | static index_tcxx . . $ index_t# egtb_block_getnumbercxx . . $ egtb_block_getnumber(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx); |
| 2798 | static index_tcxx . . $ index_t# egtb_block_getsizecxx . . $ egtb_block_getsize(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# idx); |
| 2799 | static index_tcxx . . $ index_t# egtb_block_getsize_zippedcxx . . $ egtb_block_getsize_zipped(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# block ); |
| 2800 | static bool_tcxx . . $ bool_t# egtb_block_parkcxx . . $ egtb_block_park(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# block); |
| 2801 | static bool_tcxx . . $ bool_t# egtb_block_readcxx . . $ egtb_block_read(6a3f9cd69c57a524). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# len, unsigned char *buffer); |
| 2802 | static bool_tcxx . . $ bool_t# egtb_block_decodecxx . . $ egtb_block_decode(33e6653e38f4e518). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# z, unsigned char *bz, index_tcxx . . $ index_t# n, unsigned char *bp); |
| 2803 | static bool_tcxx . . $ bool_t# egtb_block_unpackcxx . . $ egtb_block_unpack(e7312d8f792fcd4a). (unsigned side, index_tcxx . . $ index_t# n, const unsigned char *bp, dtm_tcxx . . $ dtm_t# *out); |
| 2804 | static bool_tcxx . . $ bool_t# egtb_file_bereadycxx . . $ egtb_file_beready(7864480464b09eea). (tbkey_tcxx . . $ tbkey_t# key); |
| 2805 | static bool_tcxx . . $ bool_t# egtb_loadindexescxx . . $ egtb_loadindexes(7864480464b09eea). (tbkey_tcxx . . $ tbkey_t# key); |
| 2806 | static index_tcxx . . $ index_t# egtb_block_uncompressed_to_indexcxx . . $ egtb_block_uncompressed_to_index(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# b); |
| 2807 | static bool_tcxx . . $ bool_t# fread32cxx . . $ fread32(b061a90dfd83996b). (FILEcxx . . $ FILE# *f, /*@out@*/ unsigned long int *y); |
| 2808 | |
| 2809 | |
| 2810 | static unsigned int |
| 2811 | zipinfo_initcxx . . $ zipinfo_init(db52760e79bf9054). (void) |
| 2812 | { |
| 2813 | int i, start, end; |
| 2814 | unsigned ret; |
| 2815 | bool_tcxx . . $ bool_t# ok, complet[8] = {0,0,0,0,0,0,0,0}; |
| 2816 | bool_tcxx . . $ bool_t# pa, partial[8] = {0,0,0,0,0,0,0,0}; |
| 2817 | unsigned int z; |
| 2818 | int x, j; |
| 2819 | |
| 2820 | /* reset all values */ |
| 2821 | for (i = 0; i < MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!; i++) { |
| 2822 | Zipinfocxx . . $ Zipinfo.[i].blockindexcxx . . $ ZIPINFO#blockindex. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2823 | Zipinfocxx . . $ Zipinfo.[i].extraoffsetcxx . . $ ZIPINFO#extraoffset. = 0; |
| 2824 | Zipinfocxx . . $ Zipinfo.[i].totalblockscxx . . $ ZIPINFO#totalblocks. = 0; |
| 2825 | } |
| 2826 | |
| 2827 | /* load all values */ |
| 2828 | start = 0; |
| 2829 | end = 5; |
| 2830 | x = 3; |
| 2831 | for (i = start, ok = TRUEcxx . . $ `gtb-probe.c:97:9`!, pa = FALSEcxx . . $ `gtb-probe.c:101:9`!; i < end; i++) { |
| 2832 | ok = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != fd_openitcxx . . $ fd_openit(7b3974cd6a1399ce).(i); |
| 2833 | pa = pa || ok; |
| 2834 | ok = ok && egtb_loadindexescxx . . $ egtb_loadindexes(7864480464b09eea). (i); |
| 2835 | } |
| 2836 | complet[x] = ok; |
| 2837 | partial[x] = pa; |
| 2838 | |
| 2839 | start = 5; |
| 2840 | end = 35; |
| 2841 | x = 4; |
| 2842 | for (i = start, ok = TRUEcxx . . $ `gtb-probe.c:97:9`!, pa = FALSEcxx . . $ `gtb-probe.c:101:9`!; i < end; i++) { |
| 2843 | ok = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != fd_openitcxx . . $ fd_openit(7b3974cd6a1399ce).(i); |
| 2844 | pa = pa || ok; |
| 2845 | ok = ok && egtb_loadindexescxx . . $ egtb_loadindexes(7864480464b09eea). (i); |
| 2846 | } |
| 2847 | complet[x] = ok; |
| 2848 | partial[x] = pa; |
| 2849 | |
| 2850 | start = 35; |
| 2851 | end = MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!; |
| 2852 | x = 5; |
| 2853 | for (i = start, ok = TRUEcxx . . $ `gtb-probe.c:97:9`!, pa = FALSEcxx . . $ `gtb-probe.c:101:9`!; i < end; i++) { |
| 2854 | ok = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != fd_openitcxx . . $ fd_openit(7b3974cd6a1399ce).(i); |
| 2855 | pa = pa || ok; |
| 2856 | ok = ok && egtb_loadindexescxx . . $ egtb_loadindexes(7864480464b09eea). (i); |
| 2857 | } |
| 2858 | complet[x] = ok; |
| 2859 | partial[x] = pa; |
| 2860 | |
| 2861 | |
| 2862 | for (j = 0, z = 0, x = 3; x < 8; x++) { |
| 2863 | if (partial[x]) z |= 1u << j; |
| 2864 | j++; |
| 2865 | if (complet[x]) z |= 1u << j; |
| 2866 | j++; |
| 2867 | } |
| 2868 | |
| 2869 | ret = z; |
| 2870 | |
| 2871 | return ret; |
| 2872 | } |
| 2873 | |
| 2874 | static void |
| 2875 | zipinfo_donecxx . . $ zipinfo_done(49f6e7a06ebc5aa8). (void) |
| 2876 | { |
| 2877 | int i; |
| 2878 | bool_tcxx . . $ bool_t# ok; |
| 2879 | for (i = 0, ok = TRUEcxx . . $ `gtb-probe.c:97:9`!; ok && i < MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!; i++) { |
| 2880 | if (Zipinfocxx . . $ Zipinfo.[i].blockindexcxx . . $ ZIPINFO#blockindex. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 2881 | freecxx . . $ free(5d22bdacc48458e8).(Zipinfocxx . . $ Zipinfo.[i].blockindexcxx . . $ ZIPINFO#blockindex.); |
| 2882 | Zipinfocxx . . $ Zipinfo.[i].blockindexcxx . . $ ZIPINFO#blockindex. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2883 | Zipinfocxx . . $ Zipinfo.[i].extraoffsetcxx . . $ ZIPINFO#extraoffset. = 0; |
| 2884 | Zipinfocxx . . $ Zipinfo.[i].totalblockscxx . . $ ZIPINFO#totalblocks. = 0; |
| 2885 | } |
| 2886 | } |
| 2887 | return; |
| 2888 | } |
| 2889 | |
| 2890 | static size_t |
| 2891 | zipinfo_memory_allocatedcxx . . $ zipinfo_memory_allocated(f708dce9a8856c70). (void) |
| 2892 | { |
| 2893 | int i; |
| 2894 | index_tcxx . . $ index_t# accum_blocks = 0; |
| 2895 | for (i = 0; i < MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!; i++) { |
| 2896 | if (Zipinfocxx . . $ Zipinfo.[i].blockindexcxx . . $ ZIPINFO#blockindex. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 2897 | accum_blocks += Zipinfocxx . . $ Zipinfo.[i].totalblockscxx . . $ ZIPINFO#totalblocks.; |
| 2898 | } |
| 2899 | } |
| 2900 | return (size_t)accum_blocks * sizeof(index_tcxx . . $ index_t#); |
| 2901 | } |
| 2902 | |
| 2903 | extern size_t |
| 2904 | tb_indexmemorycxx . . $ tb_indexmemory(f708dce9a8856c70). (void) |
| 2905 | { |
| 2906 | return zipinfo_memory_allocatedcxx . . $ zipinfo_memory_allocated(f708dce9a8856c70). (); |
| 2907 | } |
| 2908 | |
| 2909 | static bool_tcxx . . $ bool_t# |
| 2910 | fread32cxx . . $ fread32(b061a90dfd83996b). (FILEcxx . . $ FILE# *f, /*@out@*/ unsigned long int *y) |
| 2911 | { |
| 2912 | enum SIZEcxx . . $ fread32(b061a90dfd83996b).SIZE# {SZcxx . . $ fread32(b061a90dfd83996b).SZ. = 4}; |
| 2913 | int i; |
| 2914 | unsigned long int x; |
| 2915 | unsigned char p[SZcxx . . $ fread32(b061a90dfd83996b).SZ.]; |
| 2916 | bool_tcxx . . $ bool_t# ok; |
| 2917 | |
| 2918 | ok = (SZcxx . . $ fread32(b061a90dfd83996b).SZ. == freadcxx . . $ fread(738fc8ac1d711e58). (p, sizeof(unsigned char), SZcxx . . $ fread32(b061a90dfd83996b).SZ., f)); |
| 2919 | |
| 2920 | if (ok) { |
| 2921 | for (x = 0, i = 0; i < SZcxx . . $ fread32(b061a90dfd83996b).SZ.; i++) { |
| 2922 | x |= (unsigned long int)p[i] << (i*8); |
| 2923 | } |
| 2924 | *y = x; |
| 2925 | } |
| 2926 | return ok; |
| 2927 | } |
| 2928 | |
| 2929 | static bool_tcxx . . $ bool_t# |
| 2930 | egtb_loadindexescxx . . $ egtb_loadindexes(7864480464b09eea). (tbkey_tcxx . . $ tbkey_t# key) |
| 2931 | { |
| 2932 | |
| 2933 | unsigned long int blocksize = 1; |
| 2934 | unsigned long int tailblocksize1 = 0; |
| 2935 | unsigned long int tailblocksize2 = 0; |
| 2936 | unsigned long int offset = 0; |
| 2937 | unsigned long int dummy; |
| 2938 | unsigned long int i; |
| 2939 | unsigned long int blocks; |
| 2940 | unsigned long int n_idx; |
| 2941 | unsigned long int idx = 0; /* to silence warning "may be used uninitialized..." */ |
| 2942 | index_tcxx . . $ index_t# *p; |
| 2943 | |
| 2944 | bool_tcxx . . $ bool_t# ok; |
| 2945 | |
| 2946 | FILEcxx . . $ FILE# *f; |
| 2947 | |
| 2948 | if (Uncompressedcxx . . $ Uncompressed.) { |
| 2949 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (decoding_scheme() == 0 && GTB_scheme == 0); |
| 2950 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; /* no need to load indexes */ |
| 2951 | } |
| 2952 | if (Zipinfocxx . . $ Zipinfo.[key].blockindexcxx . . $ ZIPINFO#blockindex. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 2953 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; /* indexes must have been loaded already */ |
| 2954 | |
| 2955 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == (f = egkeycxx . . $ egkey.[key].fdcxx . . $ endgamekey#fd.)) |
| 2956 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; /* file was no open */ |
| 2957 | |
| 2958 | /* Get Reserved bytes, blocksize, offset */ |
| 2959 | ok = (0 == fseekcxx . . $ fseek(543fae30d249f6b1). (f, 0, SEEK_SETcxx . . $ `<external>/232824719582829767/stdio.h:114:9`!)) && |
| 2960 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &dummy) && |
| 2961 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &dummy) && |
| 2962 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &blocksize) && |
| 2963 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &dummy) && |
| 2964 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &tailblocksize1) && |
| 2965 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &dummy) && |
| 2966 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &tailblocksize2) && |
| 2967 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &dummy) && |
| 2968 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &offset) && |
| 2969 | fread32cxx . . $ fread32(b061a90dfd83996b). (f, &dummy); |
| 2970 | |
| 2971 | blocks = (offset - 40)/4 -1; |
| 2972 | n_idx = blocks + 1; |
| 2973 | |
| 2974 | p = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 2975 | |
| 2976 | ok = ok && NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != (p = (index_tcxx . . $ index_t# *)malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (n_idx * sizeof(index_tcxx . . $ index_t#))); |
| 2977 | |
| 2978 | /* Input of Indexes */ |
| 2979 | for (i = 0; ok && i < n_idx; i++) { |
| 2980 | ok = fread32cxx . . $ fread32(b061a90dfd83996b). (f, &idx); /* idx will be used if ok is true, otherwise, it is discarded */ |
| 2981 | p[i] = (index_tcxx . . $ index_t#)idx; /* reads a 32 bit int, and converts it to index_t */ assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (sizeof(index_t) >= 4); |
| 2982 | } |
| 2983 | |
| 2984 | if (ok) { |
| 2985 | Zipinfocxx . . $ Zipinfo.[key].extraoffsetcxx . . $ ZIPINFO#extraoffset. = 0; |
| 2986 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (n_idx <= MAXINDEX_T); |
| 2987 | Zipinfocxx . . $ Zipinfo.[key].totalblockscxx . . $ ZIPINFO#totalblocks. = (index_tcxx . . $ index_t#) n_idx; |
| 2988 | Zipinfocxx . . $ Zipinfo.[key].blockindexcxx . . $ ZIPINFO#blockindex. = p; |
| 2989 | } |
| 2990 | |
| 2991 | if (!ok && p != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 2992 | freecxx . . $ free(5d22bdacc48458e8).(p); |
| 2993 | } |
| 2994 | |
| 2995 | return ok; |
| 2996 | } |
| 2997 | |
| 2998 | static index_tcxx . . $ index_t# |
| 2999 | egtb_block_uncompressed_to_indexcxx . . $ egtb_block_uncompressed_to_index(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# b) |
| 3000 | { |
| 3001 | index_tcxx . . $ index_t# max; |
| 3002 | index_tcxx . . $ index_t# blocks_per_side; |
| 3003 | index_tcxx . . $ index_t# idx; |
| 3004 | |
| 3005 | max = egkeycxx . . $ egkey.[key].maxindexcxx . . $ endgamekey#maxindex.; |
| 3006 | blocks_per_side = 1 + (max-1) / (index_tcxx . . $ index_t#)dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block.; |
| 3007 | |
| 3008 | if (b < blocks_per_side) { |
| 3009 | idx = 0; |
| 3010 | } else { |
| 3011 | b -= blocks_per_side; |
| 3012 | idx = max; |
| 3013 | } |
| 3014 | idx += b * (index_tcxx . . $ index_t#)dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block.; |
| 3015 | return idx; |
| 3016 | } |
| 3017 | |
| 3018 | |
| 3019 | static index_tcxx . . $ index_t# |
| 3020 | egtb_block_getnumbercxx . . $ egtb_block_getnumber(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx) |
| 3021 | { |
| 3022 | index_tcxx . . $ index_t# blocks_per_side; |
| 3023 | index_tcxx . . $ index_t# block_in_side; |
| 3024 | index_tcxx . . $ index_t# max = egkeycxx . . $ egkey.[key].maxindexcxx . . $ endgamekey#maxindex.; |
| 3025 | |
| 3026 | blocks_per_side = 1 + (max-1) / (index_tcxx . . $ index_t#)dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block.; |
| 3027 | block_in_side = idx / (index_tcxx . . $ index_t#)dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block.; |
| 3028 | |
| 3029 | return (index_tcxx . . $ index_t#)side * blocks_per_side + block_in_side; /* block */ |
| 3030 | } |
| 3031 | |
| 3032 | |
| 3033 | static index_tcxx . . $ index_t# |
| 3034 | egtb_block_getsizecxx . . $ egtb_block_getsize(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# idx) |
| 3035 | { |
| 3036 | index_tcxx . . $ index_t# blocksz = (index_tcxx . . $ index_t#) dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block.; |
| 3037 | index_tcxx . . $ index_t# maxindex = egkeycxx . . $ egkey.[key].maxindexcxx . . $ endgamekey#maxindex.; |
| 3038 | index_tcxx . . $ index_t# block, offset, x; |
| 3039 | |
| 3040 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (dtm_cache.entries_per_block <= MAXINDEX_T); |
| 3041 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 <= idx && idx < maxindex); |
| 3042 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (key < MAX_EGKEYS); |
| 3043 | |
| 3044 | block = idx / blocksz; |
| 3045 | offset = block * blocksz; |
| 3046 | |
| 3047 | /* |
| 3048 | | adjust block size in case that this is the last block |
| 3049 | | and is shorter than "blocksz" |
| 3050 | */ |
| 3051 | if ( (offset + blocksz) > maxindex) |
| 3052 | x = maxindex - offset; /* last block size */ |
| 3053 | else |
| 3054 | x = blocksz; /* size of a normal block */ |
| 3055 | |
| 3056 | return x; |
| 3057 | } |
| 3058 | |
| 3059 | static index_tcxx . . $ index_t# |
| 3060 | egtb_block_getsize_zippedcxx . . $ egtb_block_getsize_zipped(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# block ) |
| 3061 | { |
| 3062 | index_tcxx . . $ index_t# i, j; |
| 3063 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (Zipinfo[key].blockindex != NULL); |
| 3064 | i = Zipinfocxx . . $ Zipinfo.[key].blockindexcxx . . $ ZIPINFO#blockindex.[block]; |
| 3065 | j = Zipinfocxx . . $ Zipinfo.[key].blockindexcxx . . $ ZIPINFO#blockindex.[block+1]; |
| 3066 | return j - i; |
| 3067 | } |
| 3068 | |
| 3069 | |
| 3070 | static bool_tcxx . . $ bool_t# |
| 3071 | egtb_file_bereadycxx . . $ egtb_file_beready(7864480464b09eea). (tbkey_tcxx . . $ tbkey_t# key) |
| 3072 | { |
| 3073 | bool_tcxx . . $ bool_t# success; |
| 3074 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (key < MAX_EGKEYS); |
| 3075 | success = (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != egkeycxx . . $ egkey.[key].fdcxx . . $ endgamekey#fd.) || |
| 3076 | (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != fd_openitcxx . . $ fd_openit(7b3974cd6a1399ce).(key) && egtb_loadindexescxx . . $ egtb_loadindexes(7864480464b09eea). (key)); |
| 3077 | return success; |
| 3078 | } |
| 3079 | |
| 3080 | |
| 3081 | static bool_tcxx . . $ bool_t# |
| 3082 | egtb_block_parkcxx . . $ egtb_block_park(9b79fb6aee4c0440). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# block) |
| 3083 | { |
| 3084 | index_tcxx . . $ index_t# i; |
| 3085 | long fseek_i; |
| 3086 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (egkey[key].fd != NULL); |
| 3087 | |
| 3088 | if (Uncompressedcxx . . $ Uncompressed.) { |
| 3089 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (decoding_scheme() == 0 && GTB_scheme == 0); |
| 3090 | i = egtb_block_uncompressed_to_indexcxx . . $ egtb_block_uncompressed_to_index(9b79fb6aee4c0440). (key, block); |
| 3091 | } else { |
| 3092 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (Zipinfo[key].blockindex != NULL); |
| 3093 | i = Zipinfocxx . . $ Zipinfo.[key].blockindexcxx . . $ ZIPINFO#blockindex.[block]; |
| 3094 | i += Zipinfocxx . . $ Zipinfo.[key].extraoffsetcxx . . $ ZIPINFO#extraoffset.; |
| 3095 | } |
| 3096 | |
| 3097 | fseek_i = (long) i; |
| 3098 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (fseek_i >= 0); |
| 3099 | return 0 == fseekcxx . . $ fseek(543fae30d249f6b1). (egkeycxx . . $ egkey.[key].fdcxx . . $ endgamekey#fd., fseek_i, SEEK_SETcxx . . $ `<external>/232824719582829767/stdio.h:114:9`!); |
| 3100 | } |
| 3101 | |
| 3102 | |
| 3103 | static bool_tcxx . . $ bool_t# |
| 3104 | egtb_block_readcxx . . $ egtb_block_read(6a3f9cd69c57a524). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# len, unsigned char *buffer) |
| 3105 | { |
| 3106 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (egkey[key].fd != NULL); |
| 3107 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (sizeof(size_t) >= sizeof(len)); |
| 3108 | return ((size_t)len == freadcxx . . $ fread(738fc8ac1d711e58). (buffer, sizeof (unsigned char), (size_t)len, egkeycxx . . $ egkey.[key].fdcxx . . $ endgamekey#fd.)); |
| 3109 | } |
| 3110 | |
| 3111 | tbkey_tcxx . . $ tbkey_t# TB_PROBE_indexing_dummycxx . . $ TB_PROBE_indexing_dummy.; |
| 3112 | |
| 3113 | static bool_tcxx . . $ bool_t# |
| 3114 | egtb_block_decodecxx . . $ egtb_block_decode(33e6653e38f4e518). (tbkey_tcxx . . $ tbkey_t# key, index_tcxx . . $ index_t# z, unsigned char *bz, index_tcxx . . $ index_t# n, unsigned char *bp) |
| 3115 | /* bz:buffer zipped to bp:buffer packed */ |
| 3116 | { |
| 3117 | size_t zz = (size_t) z; |
| 3118 | size_t nn = (size_t) n; |
| 3119 | TB_PROBE_indexing_dummycxx . . $ TB_PROBE_indexing_dummy. = key; /* to silence compiler */ |
| 3120 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (sizeof(size_t) >= sizeof(n)); |
| 3121 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (sizeof(size_t) >= sizeof(z)); |
| 3122 | return decodecxx . . $ decode(91b8b4e864c7541e). (zz-1, bz+1, nn, bp); |
| 3123 | } |
| 3124 | |
| 3125 | static bool_tcxx . . $ bool_t# |
| 3126 | egtb_block_unpackcxx . . $ egtb_block_unpack(e7312d8f792fcd4a). (unsigned side, index_tcxx . . $ index_t# n, const unsigned char *bp, dtm_tcxx . . $ dtm_t# *out) |
| 3127 | /* bp:buffer packed to out:distance to mate buffer */ |
| 3128 | { |
| 3129 | index_tcxx . . $ index_t# i; |
| 3130 | for (i = 0; i < n; i++) { |
| 3131 | *out++ = dtm_unpackcxx . . $ dtm_unpack(ba651c7f63dc5456). (side, bp[i]); |
| 3132 | } |
| 3133 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 3134 | } |
| 3135 | |
| 3136 | static bool_tcxx . . $ bool_t# |
| 3137 | preload_cachecxx . . $ preload_cache(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx) |
| 3138 | /* output to the least used block of the cache */ |
| 3139 | { |
| 3140 | dtm_block_tcxx . . $ dtm_block_t# *pblock; |
| 3141 | dtm_tcxx . . $ dtm_t# *p; |
| 3142 | bool_tcxx . . $ bool_t# ok; |
| 3143 | |
| 3144 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("preload_cache starts") |
| 3145 | |
| 3146 | if (idx >= egkeycxx . . $ egkey.[key].maxindexcxx . . $ endgamekey#maxindex.) { |
| 3147 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("Wrong index", __LINE__, idx) |
| 3148 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 3149 | } |
| 3150 | |
| 3151 | /* find aged blocked in cache */ |
| 3152 | pblock = point_block_to_replacecxx . . $ point_block_to_replace(370370592ac41292).(); |
| 3153 | |
| 3154 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == pblock) |
| 3155 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 3156 | |
| 3157 | p = pblock->p_arrcxx . . $ dtm_block#p_arr.; |
| 3158 | |
| 3159 | if (Uncompressedcxx . . $ Uncompressed.) { |
| 3160 | |
| 3161 | index_tcxx . . $ index_t# block = egtb_block_getnumbercxx . . $ egtb_block_getnumber(e14fe0a25aa2586c). (key, side, idx); |
| 3162 | index_tcxx . . $ index_t# n = egtb_block_getsizecxx . . $ egtb_block_getsize(9b79fb6aee4c0440). (key, idx); |
| 3163 | |
| 3164 | ok = egtb_file_bereadycxx . . $ egtb_file_beready(7864480464b09eea). (key) |
| 3165 | && egtb_block_parkcxx . . $ egtb_block_park(9b79fb6aee4c0440). (key, block) |
| 3166 | && egtb_block_readcxx . . $ egtb_block_read(6a3f9cd69c57a524). (key, n, Buffer_packedcxx . . $ Buffer_packed.) |
| 3167 | && egtb_block_unpackcxx . . $ egtb_block_unpack(e7312d8f792fcd4a). (side, n, Buffer_packedcxx . . $ Buffer_packed., p); |
| 3168 | |
| 3169 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("preload_cache", __LINE__, ok) |
| 3170 | |
| 3171 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (decoding_scheme() == 0 && GTB_scheme == 0); |
| 3172 | |
| 3173 | if (ok) { Bytes_readcxx . . $ Bytes_read. = Bytes_readcxx . . $ Bytes_read. + (uint64_tcxx . . $ uint64_t#) n; } |
| 3174 | |
| 3175 | } else { |
| 3176 | |
| 3177 | index_tcxx . . $ index_t# block = 0; |
| 3178 | index_tcxx . . $ index_t# n = 0; |
| 3179 | index_tcxx . . $ index_t# z = 0; |
| 3180 | |
| 3181 | ok = egtb_file_bereadycxx . . $ egtb_file_beready(7864480464b09eea). (key); |
| 3182 | |
| 3183 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("preload_cache", __LINE__, ok) |
| 3184 | |
| 3185 | if (ok) { |
| 3186 | block = egtb_block_getnumbercxx . . $ egtb_block_getnumber(e14fe0a25aa2586c). (key, side, idx); |
| 3187 | n = egtb_block_getsizecxx . . $ egtb_block_getsize(9b79fb6aee4c0440). (key, idx); |
| 3188 | z = egtb_block_getsize_zippedcxx . . $ egtb_block_getsize_zipped(9b79fb6aee4c0440). (key, block); |
| 3189 | } |
| 3190 | |
| 3191 | ok = ok |
| 3192 | && egtb_block_parkcxx . . $ egtb_block_park(9b79fb6aee4c0440). (key, block); |
| 3193 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("preload_cache", __LINE__, ok) |
| 3194 | |
| 3195 | ok = ok |
| 3196 | && egtb_block_readcxx . . $ egtb_block_read(6a3f9cd69c57a524). (key, z, Buffer_zippedcxx . . $ Buffer_zipped.); |
| 3197 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("preload_cache", __LINE__, ok) |
| 3198 | |
| 3199 | ok = ok |
| 3200 | && egtb_block_decodecxx . . $ egtb_block_decode(33e6653e38f4e518). (key, z, Buffer_zippedcxx . . $ Buffer_zipped., n, Buffer_packedcxx . . $ Buffer_packed.); |
| 3201 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("preload_cache", __LINE__, ok) |
| 3202 | |
| 3203 | ok = ok |
| 3204 | && egtb_block_unpackcxx . . $ egtb_block_unpack(e7312d8f792fcd4a). (side, n, Buffer_packedcxx . . $ Buffer_packed., p); |
| 3205 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("preload_cache", __LINE__, ok) |
| 3206 | |
| 3207 | if (ok) { Bytes_readcxx . . $ Bytes_read. = Bytes_readcxx . . $ Bytes_read. + (uint64_tcxx . . $ uint64_t#) z; } |
| 3208 | } |
| 3209 | |
| 3210 | if (ok) { |
| 3211 | |
| 3212 | index_tcxx . . $ index_t# offset; |
| 3213 | index_tcxx . . $ index_t# remainder; |
| 3214 | split_indexcxx . . $ split_index(a15de8426066f324). (dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block., idx, &offset, &remainder); |
| 3215 | |
| 3216 | pblock->keycxx . . $ dtm_block#key. = key; |
| 3217 | pblock->sidecxx . . $ dtm_block#side. = side; |
| 3218 | pblock->offsetcxx . . $ dtm_block#offset. = offset; |
| 3219 | } else { |
| 3220 | /* make it unusable */ |
| 3221 | pblock->keycxx . . $ dtm_block#key. = -1; |
| 3222 | pblock->sidecxx . . $ dtm_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 3223 | pblock->offsetcxx . . $ dtm_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 3224 | } |
| 3225 | |
| 3226 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("preload_cache?", ok) |
| 3227 | |
| 3228 | return ok; |
| 3229 | } |
| 3230 | |
| 3231 | /****************************************************************************\ |
| 3232 | | |
| 3233 | | |
| 3234 | | MEMORY ALLOCATION ZONE |
| 3235 | | |
| 3236 | | |
| 3237 | \****************************************************************************/ |
| 3238 | |
| 3239 | |
| 3240 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! void |
| 3241 | egtb_freememcxx . . $ egtb_freemem(d4f767463ce0a6b3). (int i) |
| 3242 | { |
| 3243 | if (egkeycxx . . $ egkey.[i].statuscxx . . $ endgamekey#status. == STATUS_MALLOCcxx . . $ STATUS_MALLOC.) { |
| 3244 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (egkey[i].egt_w != NULL); |
| 3245 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (egkey[i].egt_b != NULL); |
| 3246 | freecxx . . $ free(5d22bdacc48458e8). (egkeycxx . . $ egkey.[i].egt_wcxx . . $ endgamekey#egt_w.); |
| 3247 | freecxx . . $ free(5d22bdacc48458e8). (egkeycxx . . $ egkey.[i].egt_bcxx . . $ endgamekey#egt_b.); |
| 3248 | egkeycxx . . $ egkey.[i].egt_wcxx . . $ endgamekey#egt_w. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3249 | egkeycxx . . $ egkey.[i].egt_bcxx . . $ endgamekey#egt_b. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3250 | } |
| 3251 | egkeycxx . . $ egkey.[i].statuscxx . . $ endgamekey#status. = STATUS_ABSENTcxx . . $ STATUS_ABSENT.; |
| 3252 | } |
| 3253 | |
| 3254 | /***************************************************************************/ |
| 3255 | |
| 3256 | mySHAREDcxx . . $ `gtb-probe.c:55:10`! bool_tcxx . . $ bool_t# |
| 3257 | get_dtmcxx . . $ get_dtm(cc2c15251078b5e5). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, dtm_tcxx . . $ dtm_t# *out, bool_tcxx . . $ bool_t# probe_hard_flag) |
| 3258 | { |
| 3259 | bool_tcxx . . $ bool_t# found; |
| 3260 | |
| 3261 | if (probe_hard_flag) { |
| 3262 | dtm_cachecxx . . $ dtm_cache..hardcxx . . $ cache_table#hard.++; |
| 3263 | } else { |
| 3264 | dtm_cachecxx . . $ dtm_cache..softcxx . . $ cache_table#soft.++; |
| 3265 | } |
| 3266 | |
| 3267 | if (get_dtm_from_cachecxx . . $ get_dtm_from_cache(9d61391afa8ead84). (key, side, idx, out)) { |
| 3268 | dtm_cachecxx . . $ dtm_cache..hitscxx . . $ cache_table#hits.++; |
| 3269 | found = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 3270 | } else if (probe_hard_flag) { |
| 3271 | dtm_cachecxx . . $ dtm_cache..hardmissescxx . . $ cache_table#hardmisses.++; |
| 3272 | found = preload_cachecxx . . $ preload_cache(e14fe0a25aa2586c). (key, side, idx) && |
| 3273 | get_dtm_from_cachecxx . . $ get_dtm_from_cache(9d61391afa8ead84). (key, side, idx, out); |
| 3274 | |
| 3275 | if (found) { |
| 3276 | Drivecxx . . $ Drive..hitscxx . . $ general_counters#hits.++; |
| 3277 | } else { |
| 3278 | Drivecxx . . $ Drive..misscxx . . $ general_counters#miss.++; |
| 3279 | } |
| 3280 | |
| 3281 | |
| 3282 | } else { |
| 3283 | dtm_cachecxx . . $ dtm_cache..softmissescxx . . $ cache_table#softmisses.++; |
| 3284 | found = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 3285 | } |
| 3286 | return found; |
| 3287 | } |
| 3288 | |
| 3289 | |
| 3290 | static bool_tcxx . . $ bool_t# |
| 3291 | get_dtm_from_cachecxx . . $ get_dtm_from_cache(9d61391afa8ead84). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, dtm_tcxx . . $ dtm_t# *out) |
| 3292 | { |
| 3293 | index_tcxx . . $ index_t# offset; |
| 3294 | index_tcxx . . $ index_t# remainder; |
| 3295 | bool_tcxx . . $ bool_t# found; |
| 3296 | dtm_block_tcxx . . $ dtm_block_t# *p; |
| 3297 | |
| 3298 | if (!dtm_cache_is_oncxx . . $ dtm_cache_is_on(b126dc7c1de90089).()) |
| 3299 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 3300 | |
| 3301 | split_indexcxx . . $ split_index(a15de8426066f324). (dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block., idx, &offset, &remainder); |
| 3302 | |
| 3303 | found = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! != (p = dtm_cache_pointblockcxx . . $ dtm_cache_pointblock(f0740962f60935df). (key, side, idx)); |
| 3304 | |
| 3305 | if (found) { |
| 3306 | *out = p->p_arrcxx . . $ dtm_block#p_arr.[remainder]; |
| 3307 | movetotopcxx . . $ movetotop(59d0be0dcb784255).(p); |
| 3308 | } |
| 3309 | |
| 3310 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("get_dtm_from_cache ok?",found) |
| 3311 | |
| 3312 | return found; |
| 3313 | } |
| 3314 | |
| 3315 | |
| 3316 | static void |
| 3317 | split_indexcxx . . $ split_index(a15de8426066f324). (size_t entries_per_block, index_tcxx . . $ index_t# i, index_tcxx . . $ index_t# *o, index_tcxx . . $ index_t# *r) |
| 3318 | { |
| 3319 | index_tcxx . . $ index_t# n; |
| 3320 | n = i / (index_tcxx . . $ index_t#) entries_per_block; |
| 3321 | *o = n * (index_tcxx . . $ index_t#) entries_per_block; |
| 3322 | *r = i - *o; |
| 3323 | return; |
| 3324 | } |
| 3325 | |
| 3326 | |
| 3327 | static dtm_block_tcxx . . $ dtm_block_t# * |
| 3328 | point_block_to_replacecxx . . $ point_block_to_replace(370370592ac41292). (void) |
| 3329 | { |
| 3330 | dtm_block_tcxx . . $ dtm_block_t# *p, *t, *s; |
| 3331 | |
| 3332 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == dtm_cache.n || dtm_cache.top != NULL); |
| 3333 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == dtm_cache.n || dtm_cache.bot != NULL); |
| 3334 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == dtm_cache.n || dtm_cache.bot->prev == NULL); |
| 3335 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == dtm_cache.n || dtm_cache.top->next == NULL); |
| 3336 | |
| 3337 | /* no cache is being used */ |
| 3338 | if (dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks. == 0) |
| 3339 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3340 | |
| 3341 | if (dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n. > 0 && -1 == dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.->keycxx . . $ dtm_block#key.) { |
| 3342 | |
| 3343 | /* top entry is unusable, should be the one to replace*/ |
| 3344 | p = dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.; |
| 3345 | |
| 3346 | } else |
| 3347 | if (dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n. == 0) { |
| 3348 | |
| 3349 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (NULL != dtm_cache.entry); |
| 3350 | p = &dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry.[dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n.++]; |
| 3351 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = p; |
| 3352 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot. = p; |
| 3353 | |
| 3354 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (NULL != p); |
| 3355 | p->prevcxx . . $ dtm_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3356 | p->nextcxx . . $ dtm_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3357 | |
| 3358 | } else |
| 3359 | if (dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n. < dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks.) { /* add */ |
| 3360 | |
| 3361 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (NULL != dtm_cache.entry); |
| 3362 | s = dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.; |
| 3363 | p = &dtm_cachecxx . . $ dtm_cache..entrycxx . . $ cache_table#entry.[dtm_cachecxx . . $ dtm_cache..ncxx . . $ cache_table#n.++]; |
| 3364 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = p; |
| 3365 | |
| 3366 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (NULL != p && NULL != s); |
| 3367 | s->nextcxx . . $ dtm_block#next. = p; |
| 3368 | p->prevcxx . . $ dtm_block#prev. = s; |
| 3369 | p->nextcxx . . $ dtm_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3370 | |
| 3371 | } else if (1 < dtm_cachecxx . . $ dtm_cache..max_blockscxx . . $ cache_table#max_blocks.) { /* replace*/ |
| 3372 | |
| 3373 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (NULL != dtm_cache.bot && NULL != dtm_cache.top); |
| 3374 | t = dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot.; |
| 3375 | s = dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.; |
| 3376 | |
| 3377 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot. = t->nextcxx . . $ dtm_block#next.; |
| 3378 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = t; |
| 3379 | |
| 3380 | s->nextcxx . . $ dtm_block#next. = t; |
| 3381 | t->prevcxx . . $ dtm_block#prev. = s; |
| 3382 | |
| 3383 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (dtm_cache.top); |
| 3384 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.->nextcxx . . $ dtm_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3385 | |
| 3386 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (dtm_cache.bot); |
| 3387 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot.->prevcxx . . $ dtm_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3388 | |
| 3389 | p = t; |
| 3390 | |
| 3391 | } else { |
| 3392 | |
| 3393 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (1 == dtm_cache.max_blocks); |
| 3394 | p = dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.; |
| 3395 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (p == dtm_cache.bot && p == dtm_cache.entry); |
| 3396 | } |
| 3397 | |
| 3398 | /* make the information content unusable, it will be replaced */ |
| 3399 | p->keycxx . . $ dtm_block#key. = -1; |
| 3400 | p->sidecxx . . $ dtm_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 3401 | p->offsetcxx . . $ dtm_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 3402 | |
| 3403 | return p; |
| 3404 | } |
| 3405 | |
| 3406 | static void |
| 3407 | movetotopcxx . . $ movetotop(59d0be0dcb784255). (dtm_block_tcxx . . $ dtm_block_t# *t) |
| 3408 | { |
| 3409 | dtm_block_tcxx . . $ dtm_block_t# *s, *nx, *pv; |
| 3410 | |
| 3411 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (t != NULL); |
| 3412 | |
| 3413 | if (t->nextcxx . . $ dtm_block#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) /* at the top already */ |
| 3414 | return; |
| 3415 | |
| 3416 | /* detach */ |
| 3417 | pv = t->prevcxx . . $ dtm_block#prev.; |
| 3418 | nx = t->nextcxx . . $ dtm_block#next.; |
| 3419 | |
| 3420 | if (pv == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) /* at the bottom */ |
| 3421 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot. = nx; |
| 3422 | else |
| 3423 | pv->nextcxx . . $ dtm_block#next. = nx; |
| 3424 | |
| 3425 | if (nx == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) /* at the top */ |
| 3426 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = pv; |
| 3427 | else |
| 3428 | nx->prevcxx . . $ dtm_block#prev. = pv; |
| 3429 | |
| 3430 | /* relocate */ |
| 3431 | s = dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top.; |
| 3432 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (s != NULL); |
| 3433 | if (s == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 3434 | dtm_cachecxx . . $ dtm_cache..botcxx . . $ cache_table#bot. = t; |
| 3435 | else |
| 3436 | s->nextcxx . . $ dtm_block#next. = t; |
| 3437 | |
| 3438 | t->nextcxx . . $ dtm_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 3439 | t->prevcxx . . $ dtm_block#prev. = s; |
| 3440 | dtm_cachecxx . . $ dtm_cache..topcxx . . $ cache_table#top. = t; |
| 3441 | |
| 3442 | return; |
| 3443 | } |
| 3444 | |
| 3445 | /****************************************************************************\ |
| 3446 | * |
| 3447 | * |
| 3448 | * INDEXING ZONE |
| 3449 | * |
| 3450 | * |
| 3451 | ****************************************************************************/ |
| 3452 | |
| 3453 | static void |
| 3454 | init_indexingcxx . . $ init_indexing(d4f767463ce0a6b3). (int verbosity) |
| 3455 | { |
| 3456 | index_tcxx . . $ index_t# a,b,c,d,e,f; |
| 3457 | |
| 3458 | init_fliptcxx . . $ init_flipt(49f6e7a06ebc5aa8). (); |
| 3459 | |
| 3460 | a = init_kkidxcxx . . $ init_kkidx(b126dc7c1de90089). () ; |
| 3461 | b = init_ppidxcxx . . $ init_ppidx(b126dc7c1de90089). () ; |
| 3462 | c = init_aaidxcxx . . $ init_aaidx(b126dc7c1de90089). () ; |
| 3463 | d = init_aaacxx . . $ init_aaa(b126dc7c1de90089). () ; |
| 3464 | e = init_pp48_idxcxx . . $ init_pp48_idx(b126dc7c1de90089). () ; |
| 3465 | f = init_ppp48_idxcxx . . $ init_ppp48_idx(b126dc7c1de90089). () ; |
| 3466 | |
| 3467 | if (verbosity) { |
| 3468 | printfcxx . . $ printf(581fddd72a8db8fc). ("\nGTB supporting tables, Initialization\n"); |
| 3469 | printfcxx . . $ printf(581fddd72a8db8fc). (" Max kk idx: %8d\n", (int)a ); |
| 3470 | printfcxx . . $ printf(581fddd72a8db8fc). (" Max pp idx: %8d\n", (int)b ); |
| 3471 | printfcxx . . $ printf(581fddd72a8db8fc). (" Max aa idx: %8d\n", (int)c ); |
| 3472 | printfcxx . . $ printf(581fddd72a8db8fc). (" Max aaa idx: %8d\n", (int)d ); |
| 3473 | printfcxx . . $ printf(581fddd72a8db8fc). (" Max pp48 idx: %8d\n", (int)e ); |
| 3474 | printfcxx . . $ printf(581fddd72a8db8fc). (" Max ppp48 idx: %8d\n", (int)f ); |
| 3475 | } |
| 3476 | |
| 3477 | if (!reach_was_initializedcxx . . $ reach_was_initialized(b126dc7c1de90089).()) |
| 3478 | reach_initcxx . . $ reach_init(49f6e7a06ebc5aa8).(); |
| 3479 | |
| 3480 | /* testing used only in development stage */ |
| 3481 | |
| 3482 | #ifdef _MSC_VER |
| 3483 | #pragma warning(disable:4127) |
| 3484 | #endif |
| 3485 | |
| 3486 | if (0) { |
| 3487 | list_indexcxx . . $ list_index(49f6e7a06ebc5aa8). (); |
| 3488 | printfcxx . . $ printf(581fddd72a8db8fc). ("\nTEST indexing functions\n"); |
| 3489 | |
| 3490 | test_kaakbcxx . . $ test_kaakb(b126dc7c1de90089). (); |
| 3491 | test_kaabkcxx . . $ test_kaabk(b126dc7c1de90089). (); |
| 3492 | test_kaaakcxx . . $ test_kaaak(b126dc7c1de90089). (); |
| 3493 | test_kabbkcxx . . $ test_kabbk(b126dc7c1de90089). (); |
| 3494 | |
| 3495 | test_kapkbcxx . . $ test_kapkb(b126dc7c1de90089). (); |
| 3496 | test_kabkpcxx . . $ test_kabkp(b126dc7c1de90089). (); |
| 3497 | |
| 3498 | test_kppkacxx . . $ test_kppka(b126dc7c1de90089). (); |
| 3499 | |
| 3500 | test_kapkpcxx . . $ test_kapkp(b126dc7c1de90089). (); |
| 3501 | test_kabpkcxx . . $ test_kabpk(b126dc7c1de90089).(); |
| 3502 | test_kaapkcxx . . $ test_kaapk(b126dc7c1de90089). (); |
| 3503 | |
| 3504 | test_kappkcxx . . $ test_kappk(b126dc7c1de90089). (); |
| 3505 | test_kaakpcxx . . $ test_kaakp(b126dc7c1de90089). (); |
| 3506 | test_kppkcxx . . $ test_kppk(b126dc7c1de90089). (); |
| 3507 | test_kppkpcxx . . $ test_kppkp(b126dc7c1de90089). (); |
| 3508 | test_kpppkcxx . . $ test_kpppk(b126dc7c1de90089). (); |
| 3509 | } |
| 3510 | |
| 3511 | #ifdef _MSC_VER |
| 3512 | #pragma warning(default:4127) |
| 3513 | #endif |
| 3514 | |
| 3515 | return; |
| 3516 | } |
| 3517 | |
| 3518 | |
| 3519 | static index_tcxx . . $ index_t# |
| 3520 | init_kkidxcxx . . $ init_kkidx(b126dc7c1de90089). (void) |
| 3521 | /* modifies kkidx[][], wksq[], bksq[] */ |
| 3522 | { |
| 3523 | index_tcxx . . $ index_t# idx; |
| 3524 | SQUAREcxx . . $ SQUARE# x, y, i, j; |
| 3525 | |
| 3526 | /* default is noindex */ |
| 3527 | for (x = 0; x < 64; x++) { |
| 3528 | for (y = 0; y < 64; y++) { |
| 3529 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`!(kkidx [x][y]); |
| 3530 | } |
| 3531 | } |
| 3532 | |
| 3533 | idx = 0; |
| 3534 | for (x = 0; x < 64; x++) { |
| 3535 | for (y = 0; y < 64; y++) { |
| 3536 | |
| 3537 | /* is x,y illegal? continue */ |
| 3538 | if (possible_attackcxx . . $ possible_attack(64d4c609941711dd). (x, y, wKcxx . . $ `gtb-probe.c:186:9`!) || x == y) |
| 3539 | continue; |
| 3540 | |
| 3541 | /* normalize */ |
| 3542 | /*i <-- x; j <-- y */ |
| 3543 | norm_kkindexcxx . . $ norm_kkindex(174f9aab2dec3bcb). (x, y, &i, &j); |
| 3544 | |
| 3545 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(kkidx [i][j])) { /* still empty */ |
| 3546 | kkidxcxx . . $ kkidx. [i][j] = idx; |
| 3547 | kkidxcxx . . $ kkidx. [x][y] = idx; |
| 3548 | bksqcxx . . $ bksq. [idx] = i; |
| 3549 | wksqcxx . . $ wksq. [idx] = j; |
| 3550 | idx++; |
| 3551 | } |
| 3552 | } |
| 3553 | } |
| 3554 | |
| 3555 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx == MAX_KKINDEX); |
| 3556 | |
| 3557 | return idx; |
| 3558 | } |
| 3559 | |
| 3560 | |
| 3561 | static index_tcxx . . $ index_t# |
| 3562 | init_aaidxcxx . . $ init_aaidx(b126dc7c1de90089). (void) |
| 3563 | /* modifies aabase[], aaidx[][] */ |
| 3564 | { |
| 3565 | index_tcxx . . $ index_t# idx; |
| 3566 | SQUAREcxx . . $ SQUARE# x, y; |
| 3567 | |
| 3568 | /* default is noindex */ |
| 3569 | for (x = 0; x < 64; x++) { |
| 3570 | for (y = 0; y < 64; y++) { |
| 3571 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`!(aaidx [x][y]); |
| 3572 | } |
| 3573 | } |
| 3574 | |
| 3575 | for (idx = 0; idx < MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!; idx++) |
| 3576 | aabasecxx . . $ aabase. [idx] = 0; |
| 3577 | |
| 3578 | idx = 0; |
| 3579 | for (x = 0; x < 64; x++) { |
| 3580 | for (y = x + 1; y < 64; y++) { |
| 3581 | |
| 3582 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx == (int)((y - x) + x * (127-x)/2 - 1) ); |
| 3583 | |
| 3584 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(aaidx [x][y])) { /* still empty */ |
| 3585 | aaidxcxx . . $ aaidx. [x] [y] = idx; |
| 3586 | aaidxcxx . . $ aaidx. [y] [x] = idx; |
| 3587 | aabasecxx . . $ aabase. [idx] = (unsigned char) x; |
| 3588 | idx++; |
| 3589 | } else { |
| 3590 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (aaidx [x] [y] == idx); |
| 3591 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (aabase [idx] == x); |
| 3592 | } |
| 3593 | |
| 3594 | |
| 3595 | } |
| 3596 | } |
| 3597 | |
| 3598 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx == MAX_AAINDEX); |
| 3599 | |
| 3600 | return idx; |
| 3601 | } |
| 3602 | |
| 3603 | |
| 3604 | static index_tcxx . . $ index_t# |
| 3605 | init_ppidxcxx . . $ init_ppidx(b126dc7c1de90089). (void) |
| 3606 | /* modifies ppidx[][], pp_hi24[], pp_lo48[] */ |
| 3607 | { |
| 3608 | index_tcxx . . $ index_t# i, j; |
| 3609 | index_tcxx . . $ index_t# idx = 0; |
| 3610 | SQUAREcxx . . $ SQUARE# a, b; |
| 3611 | |
| 3612 | /* default is noindex */ |
| 3613 | for (i = 0; i < 24; i++) { |
| 3614 | for (j = 0; j < 48; j++) { |
| 3615 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`!(ppidx [i][j]); |
| 3616 | } |
| 3617 | } |
| 3618 | |
| 3619 | for (idx = 0; idx < MAX_PPINDEXcxx . . $ `gtb-probe.c:434:9`!; idx++) { |
| 3620 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`!(pp_hi24 [idx]); |
| 3621 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`!(pp_lo48 [idx]); |
| 3622 | } |
| 3623 | |
| 3624 | idx = 0; |
| 3625 | for (a = H7cxx . . $ H7.; a >= A2cxx . . $ A2.; a--) { |
| 3626 | |
| 3627 | if ((a & 07) < 4) /* square in the queen side */ |
| 3628 | continue; |
| 3629 | |
| 3630 | for (b = a - 1; b >= A2cxx . . $ A2.; b--) { |
| 3631 | |
| 3632 | SQUAREcxx . . $ SQUARE# anchor, loosen; |
| 3633 | |
| 3634 | pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (a, b, &anchor, &loosen); |
| 3635 | |
| 3636 | if ((anchor & 07) > 3) { /* square in the king side */ |
| 3637 | anchor = flipWEcxx . . $ flipWE(2141b656ce2cc063).(anchor); |
| 3638 | loosen = flipWEcxx . . $ flipWE(2141b656ce2cc063).(loosen); |
| 3639 | } |
| 3640 | |
| 3641 | i = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (anchor); |
| 3642 | j = wsq_to_pidx48cxx . . $ wsq_to_pidx48(4c679297bf94b9eb). (loosen); |
| 3643 | |
| 3644 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ppidx [i] [j])) { |
| 3645 | |
| 3646 | ppidxcxx . . $ ppidx. [i] [j] = idx; |
| 3647 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx < MAX_PPINDEX); |
| 3648 | pp_hi24cxx . . $ pp_hi24. [idx] = i; |
| 3649 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i < 24); |
| 3650 | pp_lo48cxx . . $ pp_lo48. [idx] = j; |
| 3651 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (j < 48); |
| 3652 | idx++; |
| 3653 | } |
| 3654 | |
| 3655 | } |
| 3656 | } |
| 3657 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx == MAX_PPINDEX); |
| 3658 | return idx; |
| 3659 | } |
| 3660 | |
| 3661 | static void |
| 3662 | init_fliptcxx . . $ init_flipt(49f6e7a06ebc5aa8). (void) |
| 3663 | { |
| 3664 | unsigned int i, j; |
| 3665 | for (i = 0; i < 64; i++) { |
| 3666 | for (j = 0; j < 64; j++) { |
| 3667 | fliptcxx . . $ flipt. [i] [j] = flip_typecxx . . $ flip_type(83f10ac8959d5577). (i, j); |
| 3668 | } |
| 3669 | } |
| 3670 | } |
| 3671 | |
| 3672 | /*--- NORMALIZE -------*/ |
| 3673 | |
| 3674 | static void |
| 3675 | norm_kkindexcxx . . $ norm_kkindex(174f9aab2dec3bcb). (SQUAREcxx . . $ SQUARE# x, SQUAREcxx . . $ SQUARE# y, /*@out@*/ SQUAREcxx . . $ SQUARE# *pi, /*@out@*/ SQUAREcxx . . $ SQUARE# *pj) |
| 3676 | { |
| 3677 | unsigned int rowx, rowy, colx, coly; |
| 3678 | |
| 3679 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (x < 64); |
| 3680 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (y < 64); |
| 3681 | |
| 3682 | if (getcolcxx . . $ getcol(2141b656ce2cc063).(x) > 3) { |
| 3683 | x = flipWEcxx . . $ flipWE(2141b656ce2cc063). (x); /* x = x ^ 07 */ |
| 3684 | y = flipWEcxx . . $ flipWE(2141b656ce2cc063). (y); |
| 3685 | } |
| 3686 | if (getrowcxx . . $ getrow(2141b656ce2cc063).(x) > 3) { |
| 3687 | x = flipNScxx . . $ flipNS(2141b656ce2cc063). (x); /* x = x ^ 070 */ |
| 3688 | y = flipNScxx . . $ flipNS(2141b656ce2cc063). (y); |
| 3689 | } |
| 3690 | rowx = getrowcxx . . $ getrow(2141b656ce2cc063).(x); |
| 3691 | colx = getcolcxx . . $ getcol(2141b656ce2cc063).(x); |
| 3692 | if ( rowx > colx ) { |
| 3693 | x = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (x); /* x = ((x&7)<<3) | (x>>3) */ |
| 3694 | y = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (y); |
| 3695 | } |
| 3696 | rowy = getrowcxx . . $ getrow(2141b656ce2cc063).(y); |
| 3697 | coly = getcolcxx . . $ getcol(2141b656ce2cc063).(y); |
| 3698 | if ( rowx == colx && rowy > coly) { |
| 3699 | x = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (x); |
| 3700 | y = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (y); |
| 3701 | } |
| 3702 | |
| 3703 | *pi = x; |
| 3704 | *pj = y; |
| 3705 | } |
| 3706 | |
| 3707 | static unsigned int |
| 3708 | flip_typecxx . . $ flip_type(83f10ac8959d5577). (SQUAREcxx . . $ SQUARE# x, SQUAREcxx . . $ SQUARE# y) |
| 3709 | { |
| 3710 | unsigned int rowx, rowy, colx, coly; |
| 3711 | unsigned int ret = 0; |
| 3712 | |
| 3713 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (x < 64); |
| 3714 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (y < 64); |
| 3715 | |
| 3716 | |
| 3717 | if (getcolcxx . . $ getcol(2141b656ce2cc063).(x) > 3) { |
| 3718 | x = flipWEcxx . . $ flipWE(2141b656ce2cc063). (x); /* x = x ^ 07 */ |
| 3719 | y = flipWEcxx . . $ flipWE(2141b656ce2cc063). (y); |
| 3720 | ret |= 1; |
| 3721 | } |
| 3722 | if (getrowcxx . . $ getrow(2141b656ce2cc063).(x) > 3) { |
| 3723 | x = flipNScxx . . $ flipNS(2141b656ce2cc063). (x); /* x = x ^ 070 */ |
| 3724 | y = flipNScxx . . $ flipNS(2141b656ce2cc063). (y); |
| 3725 | ret |= 2; |
| 3726 | } |
| 3727 | rowx = getrowcxx . . $ getrow(2141b656ce2cc063).(x); |
| 3728 | colx = getcolcxx . . $ getcol(2141b656ce2cc063).(x); |
| 3729 | if ( rowx > colx ) { |
| 3730 | x = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (x); /* x = ((x&7)<<3) | (x>>3) */ |
| 3731 | y = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (y); |
| 3732 | ret |= 4; |
| 3733 | } |
| 3734 | rowy = getrowcxx . . $ getrow(2141b656ce2cc063).(y); |
| 3735 | coly = getcolcxx . . $ getcol(2141b656ce2cc063).(y); |
| 3736 | if ( rowx == colx && rowy > coly) { |
| 3737 | x = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (x); |
| 3738 | y = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (y); |
| 3739 | ret |= 4; |
| 3740 | } |
| 3741 | return ret; |
| 3742 | } |
| 3743 | |
| 3744 | |
| 3745 | static void |
| 3746 | pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (SQUAREcxx . . $ SQUARE# a, SQUAREcxx . . $ SQUARE# b, /*@out@*/ SQUAREcxx . . $ SQUARE# *out_anchor, /*@out@*/ SQUAREcxx . . $ SQUARE# *out_loosen) |
| 3747 | { |
| 3748 | unsigned int anchor, loosen; |
| 3749 | |
| 3750 | unsigned int row_b, row_a; |
| 3751 | row_b = b & 070; |
| 3752 | row_a = a & 070; |
| 3753 | |
| 3754 | /* default */ |
| 3755 | anchor = a; |
| 3756 | loosen = b; |
| 3757 | if (row_b > row_a) { |
| 3758 | anchor = b; |
| 3759 | loosen = a; |
| 3760 | } |
| 3761 | else |
| 3762 | if (row_b == row_a) { |
| 3763 | unsigned int x, col, inv, hi_a, hi_b; |
| 3764 | x = a; |
| 3765 | col = x & 07; |
| 3766 | inv = col ^ 07; |
| 3767 | x = (1u<<col) | (1u<<inv); |
| 3768 | x &= (x-1); |
| 3769 | hi_a = x; |
| 3770 | |
| 3771 | x = b; |
| 3772 | col = x & 07; |
| 3773 | inv = col ^ 07; |
| 3774 | x = (1u<<col) | (1u<<inv); |
| 3775 | x &= (x-1); |
| 3776 | hi_b = x; |
| 3777 | |
| 3778 | if (hi_b > hi_a) { |
| 3779 | anchor = b; |
| 3780 | loosen = a; |
| 3781 | } |
| 3782 | |
| 3783 | if (hi_b < hi_a) { |
| 3784 | anchor = a; |
| 3785 | loosen = b; |
| 3786 | } |
| 3787 | |
| 3788 | if (hi_b == hi_a) { |
| 3789 | if (a < b) { |
| 3790 | anchor = a; |
| 3791 | loosen = b; |
| 3792 | } else { |
| 3793 | anchor = b; |
| 3794 | loosen = a; |
| 3795 | } |
| 3796 | } |
| 3797 | } |
| 3798 | |
| 3799 | *out_anchor = anchor; |
| 3800 | *out_loosen = loosen; |
| 3801 | return; |
| 3802 | } |
| 3803 | |
| 3804 | |
| 3805 | static index_tcxx . . $ index_t# |
| 3806 | wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (SQUAREcxx . . $ SQUARE# pawn) |
| 3807 | { |
| 3808 | unsigned int idx24; |
| 3809 | SQUAREcxx . . $ SQUARE# sq = pawn; |
| 3810 | |
| 3811 | /* input can be only queen side, pawn valid */ |
| 3812 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 3813 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! ((pawn & 07) < 4); |
| 3814 | |
| 3815 | sq ^= 070; /* flipNS*/ |
| 3816 | sq -= 8; /* down one row*/ |
| 3817 | idx24 = (sq+(sq&3)) >> 1; |
| 3818 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx24 < 24); |
| 3819 | return (index_tcxx . . $ index_t#) idx24; |
| 3820 | } |
| 3821 | |
| 3822 | static index_tcxx . . $ index_t# |
| 3823 | wsq_to_pidx48cxx . . $ wsq_to_pidx48(4c679297bf94b9eb). (SQUAREcxx . . $ SQUARE# pawn) |
| 3824 | { |
| 3825 | unsigned int idx48; |
| 3826 | SQUAREcxx . . $ SQUARE# sq = pawn; |
| 3827 | |
| 3828 | /* input can be both queen or king side, pawn valid square */ |
| 3829 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 3830 | |
| 3831 | sq ^= 070; /* flipNS*/ |
| 3832 | sq -= 8; /* down one row*/ |
| 3833 | idx48 = sq; |
| 3834 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx48 < 48); |
| 3835 | return (index_tcxx . . $ index_t#)idx48; |
| 3836 | } |
| 3837 | |
| 3838 | static SQUAREcxx . . $ SQUARE# |
| 3839 | pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427). (index_tcxx . . $ index_t# a) |
| 3840 | { |
| 3841 | enumcxx . . $ pidx24_to_wsq(46cc46841198e427).$anonymous_type_0# {B11100cxx . . $ pidx24_to_wsq(46cc46841198e427).B11100. = 7u << 2}; |
| 3842 | unsigned int x = (unsigned int) a; /* x is pslice */ |
| 3843 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (a < 24); |
| 3844 | |
| 3845 | x += x & B11100cxx . . $ pidx24_to_wsq(46cc46841198e427).B11100.; /* get upper part and double it */ |
| 3846 | x += 8; /* add extra row */ |
| 3847 | x ^= 070; /* flip NS */ |
| 3848 | return (SQUAREcxx . . $ SQUARE#) x; |
| 3849 | } |
| 3850 | |
| 3851 | static SQUAREcxx . . $ SQUARE# |
| 3852 | pidx48_to_wsqcxx . . $ pidx48_to_wsq(46cc46841198e427). (index_tcxx . . $ index_t# a) |
| 3853 | { |
| 3854 | unsigned int x; |
| 3855 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (a < 48); |
| 3856 | /* x is pslice */ |
| 3857 | x = (unsigned int)a; |
| 3858 | x += 8; /* add extra row */ |
| 3859 | x ^= 070; /* flip NS */ |
| 3860 | return x; |
| 3861 | } |
| 3862 | |
| 3863 | |
| 3864 | static void |
| 3865 | kxk_indextopccxx . . $ kxk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 3866 | { |
| 3867 | enumcxx . . $ kxk_indextopc(21a38811104ee146).$anonymous_type_1# {BLOCK_Acxx . . $ kxk_indextopc(21a38811104ee146).BLOCK_A. = 64}; |
| 3868 | |
| 3869 | index_tcxx . . $ index_t# a = i / BLOCK_Acxx . . $ kxk_indextopc(21a38811104ee146).BLOCK_A.; |
| 3870 | index_tcxx . . $ index_t# b = i - a * BLOCK_Acxx . . $ kxk_indextopc(21a38811104ee146).BLOCK_A.; |
| 3871 | |
| 3872 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 3873 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 3874 | pw[1] = (SQUAREcxx . . $ SQUARE#) b; |
| 3875 | pw[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3876 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3877 | |
| 3878 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kxk_pctoindex (pw, pb, &a) && a == i); |
| 3879 | |
| 3880 | return; |
| 3881 | } |
| 3882 | |
| 3883 | static bool_tcxx . . $ bool_t# |
| 3884 | kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out) |
| 3885 | { |
| 3886 | enumcxx . . $ kxk_pctoindex(9bb041263e557a58).$anonymous_type_2# {BLOCK_Acxx . . $ kxk_pctoindex(9bb041263e557a58).BLOCK_A. = 64}; |
| 3887 | SQUAREcxx . . $ SQUARE# *p; |
| 3888 | SQUAREcxx . . $ SQUARE# ws[32], bs[32]; |
| 3889 | index_tcxx . . $ index_t# ki; |
| 3890 | int i; |
| 3891 | |
| 3892 | unsigned int ft; |
| 3893 | |
| 3894 | ft = flip_typecxx . . $ flip_type(83f10ac8959d5577). (inp_pb[0],inp_pw[0]); |
| 3895 | |
| 3896 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 3897 | |
| 3898 | |
| 3899 | for (i = 0; inp_pw[i] != NOSQUAREcxx . . $ NOSQUARE.; i++) { |
| 3900 | ws[i] = inp_pw[i]; |
| 3901 | } |
| 3902 | ws[i] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3903 | for (i = 0; inp_pb[i] != NOSQUAREcxx . . $ NOSQUARE.; i++) { |
| 3904 | bs[i] = inp_pb[i]; |
| 3905 | } |
| 3906 | bs[i] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3907 | |
| 3908 | if ((ft & 1) != 0) { |
| 3909 | for (p = ws; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3910 | *p = flipWEcxx . . $ flipWE(2141b656ce2cc063). (*p); |
| 3911 | for (p = bs; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3912 | *p = flipWEcxx . . $ flipWE(2141b656ce2cc063). (*p); |
| 3913 | } |
| 3914 | |
| 3915 | if ((ft & 2) != 0) { |
| 3916 | for (p = ws; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3917 | *p = flipNScxx . . $ flipNS(2141b656ce2cc063). (*p); |
| 3918 | for (p = bs; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3919 | *p = flipNScxx . . $ flipNS(2141b656ce2cc063). (*p); |
| 3920 | } |
| 3921 | |
| 3922 | if ((ft & 4) != 0) { |
| 3923 | for (p = ws; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3924 | *p = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (*p); |
| 3925 | for (p = bs; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3926 | *p = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (*p); |
| 3927 | } |
| 3928 | |
| 3929 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 3930 | |
| 3931 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki)) { |
| 3932 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 3933 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 3934 | } |
| 3935 | *out = ki * BLOCK_Acxx . . $ kxk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#) ws[1]; |
| 3936 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 3937 | |
| 3938 | } |
| 3939 | |
| 3940 | |
| 3941 | static void |
| 3942 | kabk_indextopccxx . . $ kabk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 3943 | { |
| 3944 | enumcxx . . $ kabk_indextopc(21a38811104ee146).$anonymous_type_3# {BLOCK_Acxx . . $ kabk_indextopc(21a38811104ee146).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kabk_indextopc(21a38811104ee146).BLOCK_B. = 64}; |
| 3945 | index_tcxx . . $ index_t# a, b, c, r; |
| 3946 | |
| 3947 | r = i; |
| 3948 | a = r / BLOCK_Acxx . . $ kabk_indextopc(21a38811104ee146).BLOCK_A.; |
| 3949 | r -= a * BLOCK_Acxx . . $ kabk_indextopc(21a38811104ee146).BLOCK_A.; |
| 3950 | b = r / BLOCK_Bcxx . . $ kabk_indextopc(21a38811104ee146).BLOCK_B.; |
| 3951 | r -= b * BLOCK_Bcxx . . $ kabk_indextopc(21a38811104ee146).BLOCK_B.; |
| 3952 | c = r; |
| 3953 | |
| 3954 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 3955 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 3956 | |
| 3957 | pw[1] = (SQUAREcxx . . $ SQUARE#) b; |
| 3958 | pw[2] = (SQUAREcxx . . $ SQUARE#) c; |
| 3959 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3960 | |
| 3961 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3962 | |
| 3963 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kabk_pctoindex (pw, pb, &a) && a == i); |
| 3964 | |
| 3965 | return; |
| 3966 | } |
| 3967 | |
| 3968 | |
| 3969 | static bool_tcxx . . $ bool_t# |
| 3970 | kabk_pctoindexcxx . . $ kabk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out) |
| 3971 | { |
| 3972 | enumcxx . . $ kabk_pctoindex(9bb041263e557a58).$anonymous_type_4# {BLOCK_Acxx . . $ kabk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kabk_pctoindex(9bb041263e557a58).BLOCK_B. = 64}; |
| 3973 | SQUAREcxx . . $ SQUARE# *p; |
| 3974 | SQUAREcxx . . $ SQUARE# ws[32], bs[32]; |
| 3975 | index_tcxx . . $ index_t# ki; |
| 3976 | int i; |
| 3977 | |
| 3978 | unsigned int ft; |
| 3979 | |
| 3980 | ft = flip_typecxx . . $ flip_type(83f10ac8959d5577). (inp_pb[0],inp_pw[0]); |
| 3981 | |
| 3982 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 3983 | |
| 3984 | for (i = 0; inp_pw[i] != NOSQUAREcxx . . $ NOSQUARE.; i++) { |
| 3985 | ws[i] = inp_pw[i]; |
| 3986 | } |
| 3987 | ws[i] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3988 | for (i = 0; inp_pb[i] != NOSQUAREcxx . . $ NOSQUARE.; i++) { |
| 3989 | bs[i] = inp_pb[i]; |
| 3990 | } |
| 3991 | bs[i] = NOSQUAREcxx . . $ NOSQUARE.; |
| 3992 | |
| 3993 | if ((ft & 1) != 0) { |
| 3994 | for (p = ws; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3995 | *p = flipWEcxx . . $ flipWE(2141b656ce2cc063). (*p); |
| 3996 | for (p = bs; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 3997 | *p = flipWEcxx . . $ flipWE(2141b656ce2cc063). (*p); |
| 3998 | } |
| 3999 | |
| 4000 | if ((ft & 2) != 0) { |
| 4001 | for (p = ws; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 4002 | *p = flipNScxx . . $ flipNS(2141b656ce2cc063). (*p); |
| 4003 | for (p = bs; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 4004 | *p = flipNScxx . . $ flipNS(2141b656ce2cc063). (*p); |
| 4005 | } |
| 4006 | |
| 4007 | if ((ft & 4) != 0) { |
| 4008 | for (p = ws; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 4009 | *p = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (*p); |
| 4010 | for (p = bs; *p != NOSQUAREcxx . . $ NOSQUARE.; p++) |
| 4011 | *p = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (*p); |
| 4012 | } |
| 4013 | |
| 4014 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4015 | |
| 4016 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki)) { |
| 4017 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4018 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4019 | } |
| 4020 | *out = ki * BLOCK_Acxx . . $ kabk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)ws[1] * BLOCK_Bcxx . . $ kabk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)ws[2]; |
| 4021 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4022 | |
| 4023 | } |
| 4024 | |
| 4025 | |
| 4026 | static void |
| 4027 | kabkc_indextopccxx . . $ kabkc_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 4028 | { |
| 4029 | enumcxx . . $ kabkc_indextopc(21a38811104ee146).$anonymous_type_5# {BLOCK_Acxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 4030 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 4031 | |
| 4032 | r = i; |
| 4033 | a = r / BLOCK_Acxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_A.; |
| 4034 | r -= a * BLOCK_Acxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_A.; |
| 4035 | b = r / BLOCK_Bcxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_B.; |
| 4036 | r -= b * BLOCK_Bcxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_B.; |
| 4037 | c = r / BLOCK_Ccxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_C.; |
| 4038 | r -= c * BLOCK_Ccxx . . $ kabkc_indextopc(21a38811104ee146).BLOCK_C.; |
| 4039 | d = r; |
| 4040 | |
| 4041 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 4042 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 4043 | |
| 4044 | pw[1] = (SQUAREcxx . . $ SQUARE#) b; |
| 4045 | pw[2] = (SQUAREcxx . . $ SQUARE#) c; |
| 4046 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4047 | |
| 4048 | pb[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 4049 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4050 | |
| 4051 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kabkc_pctoindex (pw, pb, &a) && a == i); |
| 4052 | |
| 4053 | return; |
| 4054 | } |
| 4055 | |
| 4056 | |
| 4057 | static bool_tcxx . . $ bool_t# |
| 4058 | kabkc_pctoindexcxx . . $ kabkc_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out) |
| 4059 | { |
| 4060 | enumcxx . . $ kabkc_pctoindex(9bb041263e557a58).$anonymous_type_6# {N_WHITEcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_WHITE. = 3, N_BLACKcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_BLACK. = 2}; |
| 4061 | |
| 4062 | enumcxx . . $ kabkc_pctoindex(9bb041263e557a58).$anonymous_type_7# {BLOCK_Acxx . . $ kabkc_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kabkc_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kabkc_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 4063 | SQUAREcxx . . $ SQUARE# ws[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], bs[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 4064 | index_tcxx . . $ index_t# ki; |
| 4065 | int i; |
| 4066 | unsigned int ft; |
| 4067 | |
| 4068 | #if 0 |
| 4069 | ft = flip_type (inp_pb[0], inp_pw[0]); |
| 4070 | #else |
| 4071 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 4072 | #endif |
| 4073 | |
| 4074 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 4075 | |
| 4076 | for (i = 0; i < N_WHITEcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = inp_pw[i]; ws[N_WHITEcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_WHITE.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4077 | for (i = 0; i < N_BLACKcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = inp_pb[i]; bs[N_BLACKcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_BLACK.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4078 | |
| 4079 | if ((ft & WE_FLAGcxx . . $ WE_FLAG.) != 0) { |
| 4080 | for (i = 0; i < N_WHITEcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[i]); |
| 4081 | for (i = 0; i < N_BLACKcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[i]); |
| 4082 | } |
| 4083 | |
| 4084 | if ((ft & NS_FLAGcxx . . $ NS_FLAG.) != 0) { |
| 4085 | for (i = 0; i < N_WHITEcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[i]); |
| 4086 | for (i = 0; i < N_BLACKcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[i]); |
| 4087 | } |
| 4088 | |
| 4089 | if ((ft & NW_SE_FLAGcxx . . $ NW_SE_FLAG.) != 0) { |
| 4090 | for (i = 0; i < N_WHITEcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[i]); |
| 4091 | for (i = 0; i < N_BLACKcxx . . $ kabkc_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[i]); |
| 4092 | } |
| 4093 | |
| 4094 | |
| 4095 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4096 | |
| 4097 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki)) { |
| 4098 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4099 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4100 | } |
| 4101 | *out = ki * BLOCK_Acxx . . $ kabkc_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)ws[1] * BLOCK_Bcxx . . $ kabkc_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)ws[2] * BLOCK_Ccxx . . $ kabkc_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)bs[1]; |
| 4102 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4103 | |
| 4104 | } |
| 4105 | |
| 4106 | /* ABC/ ***/ |
| 4107 | |
| 4108 | extern void |
| 4109 | kabck_indextopccxx . . $ kabck_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 4110 | { |
| 4111 | enumcxx . . $ kabck_indextopc(21a38811104ee146).$anonymous_type_8# {BLOCK_Acxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 4112 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 4113 | |
| 4114 | r = i; |
| 4115 | a = r / BLOCK_Acxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_A.; |
| 4116 | r -= a * BLOCK_Acxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_A.; |
| 4117 | b = r / BLOCK_Bcxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_B.; |
| 4118 | r -= b * BLOCK_Bcxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_B.; |
| 4119 | c = r / BLOCK_Ccxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_C.; |
| 4120 | r -= c * BLOCK_Ccxx . . $ kabck_indextopc(21a38811104ee146).BLOCK_C.; |
| 4121 | d = r; |
| 4122 | |
| 4123 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 4124 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 4125 | |
| 4126 | pw[1] = (SQUAREcxx . . $ SQUARE#) b; |
| 4127 | pw[2] = (SQUAREcxx . . $ SQUARE#) c; |
| 4128 | pw[3] = (SQUAREcxx . . $ SQUARE#) d; |
| 4129 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4130 | |
| 4131 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4132 | |
| 4133 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kabck_pctoindex (pw, pb, &a) && a == i); |
| 4134 | |
| 4135 | return; |
| 4136 | } |
| 4137 | |
| 4138 | |
| 4139 | extern bool_tcxx . . $ bool_t# |
| 4140 | kabck_pctoindexcxx . . $ kabck_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out) |
| 4141 | { |
| 4142 | enumcxx . . $ kabck_pctoindex(9bb041263e557a58).$anonymous_type_9# {N_WHITEcxx . . $ kabck_pctoindex(9bb041263e557a58).N_WHITE. = 4, N_BLACKcxx . . $ kabck_pctoindex(9bb041263e557a58).N_BLACK. = 1}; |
| 4143 | enumcxx . . $ kabck_pctoindex(9bb041263e557a58).$anonymous_type_10# {BLOCK_Acxx . . $ kabck_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kabck_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kabck_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 4144 | |
| 4145 | SQUAREcxx . . $ SQUARE# ws[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], bs[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 4146 | index_tcxx . . $ index_t# ki; |
| 4147 | int i; |
| 4148 | unsigned int ft; |
| 4149 | |
| 4150 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 4151 | |
| 4152 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 4153 | |
| 4154 | for (i = 0; i < N_WHITEcxx . . $ kabck_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = inp_pw[i]; ws[N_WHITEcxx . . $ kabck_pctoindex(9bb041263e557a58).N_WHITE.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4155 | for (i = 0; i < N_BLACKcxx . . $ kabck_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = inp_pb[i]; bs[N_BLACKcxx . . $ kabck_pctoindex(9bb041263e557a58).N_BLACK.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4156 | |
| 4157 | if ((ft & WE_FLAGcxx . . $ WE_FLAG.) != 0) { |
| 4158 | for (i = 0; i < N_WHITEcxx . . $ kabck_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[i]); |
| 4159 | for (i = 0; i < N_BLACKcxx . . $ kabck_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[i]); |
| 4160 | } |
| 4161 | |
| 4162 | if ((ft & NS_FLAGcxx . . $ NS_FLAG.) != 0) { |
| 4163 | for (i = 0; i < N_WHITEcxx . . $ kabck_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[i]); |
| 4164 | for (i = 0; i < N_BLACKcxx . . $ kabck_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[i]); |
| 4165 | } |
| 4166 | |
| 4167 | if ((ft & NW_SE_FLAGcxx . . $ NW_SE_FLAG.) != 0) { |
| 4168 | for (i = 0; i < N_WHITEcxx . . $ kabck_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[i]); |
| 4169 | for (i = 0; i < N_BLACKcxx . . $ kabck_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[i]); |
| 4170 | } |
| 4171 | |
| 4172 | |
| 4173 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4174 | |
| 4175 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki)) { |
| 4176 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4177 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4178 | } |
| 4179 | *out = ki * BLOCK_Acxx . . $ kabck_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)ws[1] * BLOCK_Bcxx . . $ kabck_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)ws[2] * BLOCK_Ccxx . . $ kabck_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)ws[3]; |
| 4180 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4181 | |
| 4182 | } |
| 4183 | |
| 4184 | |
| 4185 | static void |
| 4186 | kakb_indextopccxx . . $ kakb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 4187 | { |
| 4188 | enumcxx . . $ kakb_indextopc(21a38811104ee146).$anonymous_type_11# {BLOCK_Acxx . . $ kakb_indextopc(21a38811104ee146).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kakb_indextopc(21a38811104ee146).BLOCK_B. = 64}; |
| 4189 | index_tcxx . . $ index_t# a, b, c, r; |
| 4190 | |
| 4191 | r = i; |
| 4192 | a = r / BLOCK_Acxx . . $ kakb_indextopc(21a38811104ee146).BLOCK_A.; |
| 4193 | r -= a * BLOCK_Acxx . . $ kakb_indextopc(21a38811104ee146).BLOCK_A.; |
| 4194 | b = r / BLOCK_Bcxx . . $ kakb_indextopc(21a38811104ee146).BLOCK_B.; |
| 4195 | r -= b * BLOCK_Bcxx . . $ kakb_indextopc(21a38811104ee146).BLOCK_B.; |
| 4196 | c = r; |
| 4197 | |
| 4198 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 4199 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 4200 | |
| 4201 | pw[1] = (SQUAREcxx . . $ SQUARE#) b; |
| 4202 | pw[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4203 | |
| 4204 | pb[1] = (SQUAREcxx . . $ SQUARE#) c; |
| 4205 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4206 | |
| 4207 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kakb_pctoindex (pw, pb, &a) && a == i); |
| 4208 | |
| 4209 | return; |
| 4210 | } |
| 4211 | |
| 4212 | |
| 4213 | static bool_tcxx . . $ bool_t# |
| 4214 | kakb_pctoindexcxx . . $ kakb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out) |
| 4215 | { |
| 4216 | enumcxx . . $ kakb_pctoindex(9bb041263e557a58).$anonymous_type_12# {BLOCK_Acxx . . $ kakb_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kakb_pctoindex(9bb041263e557a58).BLOCK_B. = 64}; |
| 4217 | SQUAREcxx . . $ SQUARE# ws[32], bs[32]; |
| 4218 | index_tcxx . . $ index_t# ki; |
| 4219 | unsigned int ft; |
| 4220 | |
| 4221 | #if 0 |
| 4222 | ft = flip_type (inp_pb[0], inp_pw[0]); |
| 4223 | #else |
| 4224 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 4225 | #endif |
| 4226 | |
| 4227 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 4228 | |
| 4229 | ws[0] = inp_pw[0]; |
| 4230 | ws[1] = inp_pw[1]; |
| 4231 | ws[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4232 | |
| 4233 | bs[0] = inp_pb[0]; |
| 4234 | bs[1] = inp_pb[1]; |
| 4235 | bs[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4236 | |
| 4237 | if ((ft & 1) != 0) { |
| 4238 | ws[0] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[0]); |
| 4239 | ws[1] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[1]); |
| 4240 | bs[0] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[0]); |
| 4241 | bs[1] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[1]); |
| 4242 | } |
| 4243 | |
| 4244 | if ((ft & 2) != 0) { |
| 4245 | ws[0] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[0]); |
| 4246 | ws[1] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[1]); |
| 4247 | bs[0] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[0]); |
| 4248 | bs[1] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[1]); |
| 4249 | } |
| 4250 | |
| 4251 | if ((ft & 4) != 0) { |
| 4252 | ws[0] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[0]); |
| 4253 | ws[1] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[1]); |
| 4254 | bs[0] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[0]); |
| 4255 | bs[1] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[1]); |
| 4256 | } |
| 4257 | |
| 4258 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4259 | |
| 4260 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki)) { |
| 4261 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4262 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4263 | } |
| 4264 | *out = ki * BLOCK_Acxx . . $ kakb_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)ws[1] * BLOCK_Bcxx . . $ kakb_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bs[1]; |
| 4265 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4266 | |
| 4267 | } |
| 4268 | |
| 4269 | /********************** KAAKB *************************************/ |
| 4270 | |
| 4271 | static bool_tcxx . . $ bool_t# test_kaakbcxx . . $ test_kaakb(b126dc7c1de90089). (void); |
| 4272 | static bool_tcxx . . $ bool_t# kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 4273 | static void kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 4274 | |
| 4275 | static bool_tcxx . . $ bool_t# |
| 4276 | test_kaakbcxx . . $ test_kaakb(b126dc7c1de90089). (void) |
| 4277 | { |
| 4278 | |
| 4279 | enumcxx . . $ test_kaakb(b126dc7c1de90089).$anonymous_type_13# {MAXPCcxx . . $ test_kaakb(b126dc7c1de90089).MAXPC. = 16+1}; |
| 4280 | char str[] = "kaakb"; |
| 4281 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 4282 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kaakb(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kaakb(b126dc7c1de90089).MAXPC.]; |
| 4283 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kaakb(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kaakb(b126dc7c1de90089).MAXPC.]; |
| 4284 | |
| 4285 | index_tcxx . . $ index_t# i, j; |
| 4286 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4287 | |
| 4288 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 4289 | |
| 4290 | for (a = 0; a < 64; a++) { |
| 4291 | for (b = 0; b < 64; b++) { |
| 4292 | for (c = 0; c < 64; c++) { |
| 4293 | for (d = 0; d < 64; d++) { |
| 4294 | for (e = 0; e < 64; e++) { |
| 4295 | |
| 4296 | pw[0] = a; |
| 4297 | pw[1] = b; |
| 4298 | pw[2] = c; |
| 4299 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4300 | |
| 4301 | pb[0] = d; |
| 4302 | pb[1] = e; |
| 4303 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4304 | |
| 4305 | if (kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 4306 | kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146). (i, px, py); |
| 4307 | kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58). (px, py, &j); |
| 4308 | if (i != j) { |
| 4309 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4310 | } |
| 4311 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 4312 | } |
| 4313 | |
| 4314 | } |
| 4315 | } |
| 4316 | } |
| 4317 | } |
| 4318 | |
| 4319 | if ((a&1)==0) { |
| 4320 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 4321 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 4322 | } |
| 4323 | } |
| 4324 | |
| 4325 | if (err) |
| 4326 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 4327 | else |
| 4328 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 4329 | return !err; |
| 4330 | } |
| 4331 | |
| 4332 | static void |
| 4333 | kaakb_indextopccxx . . $ kaakb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 4334 | { |
| 4335 | enumcxx . . $ kaakb_indextopc(21a38811104ee146).$anonymous_type_14# { |
| 4336 | BLOCK_Bcxx . . $ kaakb_indextopc(21a38811104ee146).BLOCK_B. = 64, |
| 4337 | BLOCK_Acxx . . $ kaakb_indextopc(21a38811104ee146).BLOCK_A. = BLOCK_Bcxx . . $ kaakb_indextopc(21a38811104ee146).BLOCK_B. * MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 4338 | }; |
| 4339 | index_tcxx . . $ index_t# a, b, c, r, x, y; |
| 4340 | |
| 4341 | r = i; |
| 4342 | a = r / BLOCK_Acxx . . $ kaakb_indextopc(21a38811104ee146).BLOCK_A.; |
| 4343 | r -= a * BLOCK_Acxx . . $ kaakb_indextopc(21a38811104ee146).BLOCK_A.; |
| 4344 | |
| 4345 | b = r / BLOCK_Bcxx . . $ kaakb_indextopc(21a38811104ee146).BLOCK_B.; |
| 4346 | r -= b * BLOCK_Bcxx . . $ kaakb_indextopc(21a38811104ee146).BLOCK_B.; |
| 4347 | |
| 4348 | c = r; |
| 4349 | |
| 4350 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == (a * BLOCK_A + b * BLOCK_B + c)); |
| 4351 | |
| 4352 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 4353 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 4354 | |
| 4355 | x = aabasecxx . . $ aabase. [b]; |
| 4356 | y = (b + 1) + x - (x * (127-x)/2); |
| 4357 | |
| 4358 | pw[1] = (SQUAREcxx . . $ SQUARE#) x; |
| 4359 | pw[2] = (SQUAREcxx . . $ SQUARE#) y; |
| 4360 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4361 | |
| 4362 | pb[1] = (SQUAREcxx . . $ SQUARE#) c; |
| 4363 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4364 | |
| 4365 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kaakb_pctoindex (pw, pb, &a) && a == i); |
| 4366 | |
| 4367 | return; |
| 4368 | } |
| 4369 | |
| 4370 | static bool_tcxx . . $ bool_t# |
| 4371 | kaakb_pctoindexcxx . . $ kaakb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out) |
| 4372 | { |
| 4373 | enumcxx . . $ kaakb_pctoindex(9bb041263e557a58).$anonymous_type_15# {N_WHITEcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_WHITE. = 3, N_BLACKcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_BLACK. = 2}; |
| 4374 | enumcxx . . $ kaakb_pctoindex(9bb041263e557a58).$anonymous_type_16# { |
| 4375 | BLOCK_Bcxx . . $ kaakb_pctoindex(9bb041263e557a58).BLOCK_B. = 64, |
| 4376 | BLOCK_Acxx . . $ kaakb_pctoindex(9bb041263e557a58).BLOCK_A. = BLOCK_Bcxx . . $ kaakb_pctoindex(9bb041263e557a58).BLOCK_B. * MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 4377 | }; |
| 4378 | SQUAREcxx . . $ SQUARE# ws[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], bs[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 4379 | index_tcxx . . $ index_t# ki, ai; |
| 4380 | unsigned int ft; |
| 4381 | int i; |
| 4382 | |
| 4383 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 4384 | |
| 4385 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 4386 | |
| 4387 | for (i = 0; i < N_WHITEcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = inp_pw[i]; ws[N_WHITEcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_WHITE.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4388 | for (i = 0; i < N_BLACKcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = inp_pb[i]; bs[N_BLACKcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_BLACK.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4389 | |
| 4390 | if ((ft & WE_FLAGcxx . . $ WE_FLAG.) != 0) { |
| 4391 | for (i = 0; i < N_WHITEcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[i]); |
| 4392 | for (i = 0; i < N_BLACKcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[i]); |
| 4393 | } |
| 4394 | |
| 4395 | if ((ft & NS_FLAGcxx . . $ NS_FLAG.) != 0) { |
| 4396 | for (i = 0; i < N_WHITEcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[i]); |
| 4397 | for (i = 0; i < N_BLACKcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[i]); |
| 4398 | } |
| 4399 | |
| 4400 | if ((ft & NW_SE_FLAGcxx . . $ NW_SE_FLAG.) != 0) { |
| 4401 | for (i = 0; i < N_WHITEcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[i]); |
| 4402 | for (i = 0; i < N_BLACKcxx . . $ kaakb_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[i]); |
| 4403 | } |
| 4404 | |
| 4405 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4406 | ai = aaidxcxx . . $ aaidx. [ws[1]] [ws[2]]; |
| 4407 | |
| 4408 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki) || IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ai)) { |
| 4409 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4410 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4411 | } |
| 4412 | *out = ki * BLOCK_Acxx . . $ kaakb_pctoindex(9bb041263e557a58).BLOCK_A. + ai * BLOCK_Bcxx . . $ kaakb_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bs[1]; |
| 4413 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4414 | } |
| 4415 | |
| 4416 | /****************** End KAAKB *************************************/ |
| 4417 | |
| 4418 | /********************** KAAB/K ************************************/ |
| 4419 | |
| 4420 | static bool_tcxx . . $ bool_t# test_kaabkcxx . . $ test_kaabk(b126dc7c1de90089). (void); |
| 4421 | static bool_tcxx . . $ bool_t# kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 4422 | static void kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 4423 | |
| 4424 | static bool_tcxx . . $ bool_t# |
| 4425 | test_kaabkcxx . . $ test_kaabk(b126dc7c1de90089). (void) |
| 4426 | { |
| 4427 | |
| 4428 | enumcxx . . $ test_kaabk(b126dc7c1de90089).$anonymous_type_17# {MAXPCcxx . . $ test_kaabk(b126dc7c1de90089).MAXPC. = 16+1}; |
| 4429 | char str[] = "kaabk"; |
| 4430 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 4431 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kaabk(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kaabk(b126dc7c1de90089).MAXPC.]; |
| 4432 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kaabk(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kaabk(b126dc7c1de90089).MAXPC.]; |
| 4433 | |
| 4434 | index_tcxx . . $ index_t# i, j; |
| 4435 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4436 | |
| 4437 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 4438 | |
| 4439 | for (a = 0; a < 64; a++) { |
| 4440 | for (b = 0; b < 64; b++) { |
| 4441 | for (c = 0; c < 64; c++) { |
| 4442 | for (d = 0; d < 64; d++) { |
| 4443 | for (e = 0; e < 64; e++) { |
| 4444 | |
| 4445 | pw[0] = a; |
| 4446 | pw[1] = b; |
| 4447 | pw[2] = c; |
| 4448 | pw[3] = d; |
| 4449 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4450 | |
| 4451 | pb[0] = e; |
| 4452 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4453 | |
| 4454 | if (kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 4455 | kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146). (i, px, py); |
| 4456 | kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58). (px, py, &j); |
| 4457 | if (i != j) { |
| 4458 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4459 | } |
| 4460 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 4461 | } |
| 4462 | |
| 4463 | } |
| 4464 | } |
| 4465 | } |
| 4466 | } |
| 4467 | |
| 4468 | if ((a&1)==0) { |
| 4469 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 4470 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 4471 | } |
| 4472 | } |
| 4473 | |
| 4474 | if (err) |
| 4475 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 4476 | else |
| 4477 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 4478 | return !err; |
| 4479 | } |
| 4480 | |
| 4481 | static void |
| 4482 | kaabk_indextopccxx . . $ kaabk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 4483 | { |
| 4484 | enumcxx . . $ kaabk_indextopc(21a38811104ee146).$anonymous_type_18# { |
| 4485 | BLOCK_Bcxx . . $ kaabk_indextopc(21a38811104ee146).BLOCK_B. = 64, |
| 4486 | BLOCK_Acxx . . $ kaabk_indextopc(21a38811104ee146).BLOCK_A. = BLOCK_Bcxx . . $ kaabk_indextopc(21a38811104ee146).BLOCK_B. * MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 4487 | }; |
| 4488 | index_tcxx . . $ index_t# a, b, c, r, x, y; |
| 4489 | |
| 4490 | r = i; |
| 4491 | a = r / BLOCK_Acxx . . $ kaabk_indextopc(21a38811104ee146).BLOCK_A.; |
| 4492 | r -= a * BLOCK_Acxx . . $ kaabk_indextopc(21a38811104ee146).BLOCK_A.; |
| 4493 | |
| 4494 | b = r / BLOCK_Bcxx . . $ kaabk_indextopc(21a38811104ee146).BLOCK_B.; |
| 4495 | r -= b * BLOCK_Bcxx . . $ kaabk_indextopc(21a38811104ee146).BLOCK_B.; |
| 4496 | |
| 4497 | c = r; |
| 4498 | |
| 4499 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == (a * BLOCK_A + b * BLOCK_B + c)); |
| 4500 | |
| 4501 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 4502 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 4503 | |
| 4504 | x = aabasecxx . . $ aabase. [b]; |
| 4505 | y = (b + 1) + x - (x * (127-x)/2); |
| 4506 | |
| 4507 | pw[1] = (SQUAREcxx . . $ SQUARE#) x; |
| 4508 | pw[2] = (SQUAREcxx . . $ SQUARE#) y; |
| 4509 | pw[3] = (SQUAREcxx . . $ SQUARE#) c; |
| 4510 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4511 | |
| 4512 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4513 | |
| 4514 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kaabk_pctoindex (pw, pb, &a) && a == i); |
| 4515 | |
| 4516 | return; |
| 4517 | } |
| 4518 | |
| 4519 | static bool_tcxx . . $ bool_t# |
| 4520 | kaabk_pctoindexcxx . . $ kaabk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out) |
| 4521 | { |
| 4522 | enumcxx . . $ kaabk_pctoindex(9bb041263e557a58).$anonymous_type_19# {N_WHITEcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_WHITE. = 4, N_BLACKcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_BLACK. = 1}; |
| 4523 | enumcxx . . $ kaabk_pctoindex(9bb041263e557a58).$anonymous_type_20# { |
| 4524 | BLOCK_Bcxx . . $ kaabk_pctoindex(9bb041263e557a58).BLOCK_B. = 64, |
| 4525 | BLOCK_Acxx . . $ kaabk_pctoindex(9bb041263e557a58).BLOCK_A. = BLOCK_Bcxx . . $ kaabk_pctoindex(9bb041263e557a58).BLOCK_B. * MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 4526 | }; |
| 4527 | SQUAREcxx . . $ SQUARE# ws[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], bs[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 4528 | index_tcxx . . $ index_t# ki, ai; |
| 4529 | unsigned int ft; |
| 4530 | int i; |
| 4531 | |
| 4532 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 4533 | |
| 4534 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 4535 | |
| 4536 | for (i = 0; i < N_WHITEcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = inp_pw[i]; ws[N_WHITEcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_WHITE.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4537 | for (i = 0; i < N_BLACKcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = inp_pb[i]; bs[N_BLACKcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_BLACK.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4538 | |
| 4539 | if ((ft & WE_FLAGcxx . . $ WE_FLAG.) != 0) { |
| 4540 | for (i = 0; i < N_WHITEcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[i]); |
| 4541 | for (i = 0; i < N_BLACKcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[i]); |
| 4542 | } |
| 4543 | |
| 4544 | if ((ft & NS_FLAGcxx . . $ NS_FLAG.) != 0) { |
| 4545 | for (i = 0; i < N_WHITEcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[i]); |
| 4546 | for (i = 0; i < N_BLACKcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[i]); |
| 4547 | } |
| 4548 | |
| 4549 | if ((ft & NW_SE_FLAGcxx . . $ NW_SE_FLAG.) != 0) { |
| 4550 | for (i = 0; i < N_WHITEcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[i]); |
| 4551 | for (i = 0; i < N_BLACKcxx . . $ kaabk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[i]); |
| 4552 | } |
| 4553 | |
| 4554 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4555 | ai = aaidxcxx . . $ aaidx. [ws[1]] [ws[2]]; |
| 4556 | |
| 4557 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki) || IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ai)) { |
| 4558 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4559 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4560 | } |
| 4561 | *out = ki * BLOCK_Acxx . . $ kaabk_pctoindex(9bb041263e557a58).BLOCK_A. + ai * BLOCK_Bcxx . . $ kaabk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)ws[3]; |
| 4562 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4563 | } |
| 4564 | |
| 4565 | /****************** End KAAB/K *************************************/ |
| 4566 | |
| 4567 | /********************** KABB/K ************************************/ |
| 4568 | |
| 4569 | static bool_tcxx . . $ bool_t# test_kabbkcxx . . $ test_kabbk(b126dc7c1de90089). (void); |
| 4570 | static bool_tcxx . . $ bool_t# kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 4571 | static void kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 4572 | |
| 4573 | static bool_tcxx . . $ bool_t# |
| 4574 | test_kabbkcxx . . $ test_kabbk(b126dc7c1de90089). (void) |
| 4575 | { |
| 4576 | |
| 4577 | enumcxx . . $ test_kabbk(b126dc7c1de90089).$anonymous_type_21# {MAXPCcxx . . $ test_kabbk(b126dc7c1de90089).MAXPC. = 16+1}; |
| 4578 | char str[] = "kabbk"; |
| 4579 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 4580 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kabbk(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kabbk(b126dc7c1de90089).MAXPC.]; |
| 4581 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kabbk(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kabbk(b126dc7c1de90089).MAXPC.]; |
| 4582 | |
| 4583 | index_tcxx . . $ index_t# i, j; |
| 4584 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4585 | |
| 4586 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 4587 | |
| 4588 | for (a = 0; a < 64; a++) { |
| 4589 | for (b = 0; b < 64; b++) { |
| 4590 | for (c = 0; c < 64; c++) { |
| 4591 | for (d = 0; d < 64; d++) { |
| 4592 | for (e = 0; e < 64; e++) { |
| 4593 | |
| 4594 | pw[0] = a; |
| 4595 | pw[1] = b; |
| 4596 | pw[2] = c; |
| 4597 | pw[3] = d; |
| 4598 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4599 | |
| 4600 | pb[0] = e; |
| 4601 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4602 | |
| 4603 | if (kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 4604 | kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146). (i, px, py); |
| 4605 | kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58). (px, py, &j); |
| 4606 | if (i != j) { |
| 4607 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4608 | } |
| 4609 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 4610 | } |
| 4611 | |
| 4612 | } |
| 4613 | } |
| 4614 | } |
| 4615 | } |
| 4616 | |
| 4617 | if ((a&1)==0) { |
| 4618 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 4619 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 4620 | } |
| 4621 | } |
| 4622 | |
| 4623 | if (err) |
| 4624 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 4625 | else |
| 4626 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 4627 | return !err; |
| 4628 | } |
| 4629 | |
| 4630 | static void |
| 4631 | kabbk_indextopccxx . . $ kabbk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 4632 | { |
| 4633 | enumcxx . . $ kabbk_indextopc(21a38811104ee146).$anonymous_type_22# { |
| 4634 | BLOCK_Bcxx . . $ kabbk_indextopc(21a38811104ee146).BLOCK_B. = 64, |
| 4635 | BLOCK_Acxx . . $ kabbk_indextopc(21a38811104ee146).BLOCK_A. = BLOCK_Bcxx . . $ kabbk_indextopc(21a38811104ee146).BLOCK_B. * MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 4636 | }; |
| 4637 | index_tcxx . . $ index_t# a, b, c, r, x, y; |
| 4638 | |
| 4639 | r = i; |
| 4640 | a = r / BLOCK_Acxx . . $ kabbk_indextopc(21a38811104ee146).BLOCK_A.; |
| 4641 | r -= a * BLOCK_Acxx . . $ kabbk_indextopc(21a38811104ee146).BLOCK_A.; |
| 4642 | |
| 4643 | b = r / BLOCK_Bcxx . . $ kabbk_indextopc(21a38811104ee146).BLOCK_B.; |
| 4644 | r -= b * BLOCK_Bcxx . . $ kabbk_indextopc(21a38811104ee146).BLOCK_B.; |
| 4645 | |
| 4646 | c = r; |
| 4647 | |
| 4648 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == (a * BLOCK_A + b * BLOCK_B + c)); |
| 4649 | |
| 4650 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 4651 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 4652 | |
| 4653 | x = aabasecxx . . $ aabase. [b]; |
| 4654 | y = (b + 1) + x - (x * (127-x)/2); |
| 4655 | |
| 4656 | pw[1] = (SQUAREcxx . . $ SQUARE#) c; |
| 4657 | pw[2] = (SQUAREcxx . . $ SQUARE#) x; |
| 4658 | pw[3] = (SQUAREcxx . . $ SQUARE#) y; |
| 4659 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4660 | |
| 4661 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4662 | |
| 4663 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kabbk_pctoindex (pw, pb, &a) && a == i); |
| 4664 | |
| 4665 | return; |
| 4666 | } |
| 4667 | |
| 4668 | static bool_tcxx . . $ bool_t# |
| 4669 | kabbk_pctoindexcxx . . $ kabbk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, /*@out@*/ index_tcxx . . $ index_t# *out) |
| 4670 | { |
| 4671 | enumcxx . . $ kabbk_pctoindex(9bb041263e557a58).$anonymous_type_23# {N_WHITEcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_WHITE. = 4, N_BLACKcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_BLACK. = 1}; |
| 4672 | enumcxx . . $ kabbk_pctoindex(9bb041263e557a58).$anonymous_type_24# { |
| 4673 | BLOCK_Bcxx . . $ kabbk_pctoindex(9bb041263e557a58).BLOCK_B. = 64, |
| 4674 | BLOCK_Acxx . . $ kabbk_pctoindex(9bb041263e557a58).BLOCK_A. = BLOCK_Bcxx . . $ kabbk_pctoindex(9bb041263e557a58).BLOCK_B. * MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 4675 | }; |
| 4676 | SQUAREcxx . . $ SQUARE# ws[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], bs[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 4677 | index_tcxx . . $ index_t# ki, ai; |
| 4678 | unsigned int ft; |
| 4679 | int i; |
| 4680 | |
| 4681 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 4682 | |
| 4683 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 4684 | |
| 4685 | for (i = 0; i < N_WHITEcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = inp_pw[i]; ws[N_WHITEcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_WHITE.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4686 | for (i = 0; i < N_BLACKcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = inp_pb[i]; bs[N_BLACKcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_BLACK.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4687 | |
| 4688 | if ((ft & WE_FLAGcxx . . $ WE_FLAG.) != 0) { |
| 4689 | for (i = 0; i < N_WHITEcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[i]); |
| 4690 | for (i = 0; i < N_BLACKcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[i]); |
| 4691 | } |
| 4692 | |
| 4693 | if ((ft & NS_FLAGcxx . . $ NS_FLAG.) != 0) { |
| 4694 | for (i = 0; i < N_WHITEcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[i]); |
| 4695 | for (i = 0; i < N_BLACKcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[i]); |
| 4696 | } |
| 4697 | |
| 4698 | if ((ft & NW_SE_FLAGcxx . . $ NW_SE_FLAG.) != 0) { |
| 4699 | for (i = 0; i < N_WHITEcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[i]); |
| 4700 | for (i = 0; i < N_BLACKcxx . . $ kabbk_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[i]); |
| 4701 | } |
| 4702 | |
| 4703 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4704 | ai = aaidxcxx . . $ aaidx. [ws[2]] [ws[3]]; |
| 4705 | |
| 4706 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki) || IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ai)) { |
| 4707 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4708 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4709 | } |
| 4710 | *out = ki * BLOCK_Acxx . . $ kabbk_pctoindex(9bb041263e557a58).BLOCK_A. + ai * BLOCK_Bcxx . . $ kabbk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)ws[1]; |
| 4711 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4712 | } |
| 4713 | |
| 4714 | /********************** End KABB/K *************************************/ |
| 4715 | |
| 4716 | /********************** init KAAA/K ************************************/ |
| 4717 | |
| 4718 | static index_tcxx . . $ index_t# |
| 4719 | aaa_getsubicxx . . $ aaa_getsubi(64d4c609941711dd). (sq_tcxx . . $ sq_t# x, sq_tcxx . . $ sq_t# y, sq_tcxx . . $ sq_t# z); |
| 4720 | |
| 4721 | static sq_tcxx . . $ sq_t# aaa_xyzcxx . . $ aaa_xyz. [MAX_AAAINDEXcxx . . $ `gtb-probe.c:438:9`!] [3]; |
| 4722 | static index_tcxx . . $ index_t# aaa_basecxx . . $ aaa_base. [64]; |
| 4723 | |
| 4724 | static index_tcxx . . $ index_t# |
| 4725 | init_aaacxx . . $ init_aaa(b126dc7c1de90089). (void) |
| 4726 | /* modifies aaa_base[], aaa_xyz[][] */ |
| 4727 | { |
| 4728 | index_tcxx . . $ index_t# comb [64]; |
| 4729 | index_tcxx . . $ index_t# accum; |
| 4730 | index_tcxx . . $ index_t# a; |
| 4731 | |
| 4732 | index_tcxx . . $ index_t# idx; |
| 4733 | SQUAREcxx . . $ SQUARE# x, y, z; |
| 4734 | |
| 4735 | /* getting aaa_base */ |
| 4736 | comb [0] = 0; |
| 4737 | for (a = 1; a < 64; a++) { |
| 4738 | comb [a] = a * (a-1) / 2; |
| 4739 | } |
| 4740 | |
| 4741 | accum = 0; |
| 4742 | aaa_basecxx . . $ aaa_base. [0] = accum; |
| 4743 | for (a = 0; a < (64-1); a++) { |
| 4744 | accum += comb[a]; |
| 4745 | aaa_basecxx . . $ aaa_base. [a+1] = accum; |
| 4746 | } |
| 4747 | |
| 4748 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! ((accum + comb[63]) == MAX_AAAINDEX); |
| 4749 | /* end getting aaa_base */ |
| 4750 | |
| 4751 | |
| 4752 | /* initialize aaa_xyz [][] */ |
| 4753 | for (idx = 0; idx < MAX_AAAINDEXcxx . . $ `gtb-probe.c:438:9`!; idx++) { |
| 4754 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`! (aaa_xyz[idx][0]); |
| 4755 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`! (aaa_xyz[idx][1]); |
| 4756 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`! (aaa_xyz[idx][2]); |
| 4757 | } |
| 4758 | |
| 4759 | idx = 0; |
| 4760 | for (z = 0; z < 64; z++) { |
| 4761 | for (y = 0; y < z; y++) { |
| 4762 | for (x = 0; x < y; x++) { |
| 4763 | |
| 4764 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx == aaa_getsubi (x, y, z)); |
| 4765 | |
| 4766 | aaa_xyzcxx . . $ aaa_xyz. [idx] [0] = x; |
| 4767 | aaa_xyzcxx . . $ aaa_xyz. [idx] [1] = y; |
| 4768 | aaa_xyzcxx . . $ aaa_xyz. [idx] [2] = z; |
| 4769 | |
| 4770 | idx++; |
| 4771 | } |
| 4772 | } |
| 4773 | } |
| 4774 | |
| 4775 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx == MAX_AAAINDEX); |
| 4776 | |
| 4777 | return idx; |
| 4778 | } |
| 4779 | |
| 4780 | |
| 4781 | static index_tcxx . . $ index_t# |
| 4782 | aaa_getsubicxx . . $ aaa_getsubi(64d4c609941711dd). (sq_tcxx . . $ sq_t# x, sq_tcxx . . $ sq_t# y, sq_tcxx . . $ sq_t# z) |
| 4783 | /* uses aaa_base */ |
| 4784 | { |
| 4785 | index_tcxx . . $ index_t# calc_idx, base; |
| 4786 | |
| 4787 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (x < 64 && y < 64 && z < 64); |
| 4788 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (x < y && y < z); |
| 4789 | |
| 4790 | base = aaa_basecxx . . $ aaa_base.[z]; |
| 4791 | calc_idx = (index_tcxx . . $ index_t#)x + ((index_tcxx . . $ index_t#)y - 1) * (index_tcxx . . $ index_t#)y / 2 + base; |
| 4792 | |
| 4793 | return calc_idx; |
| 4794 | } |
| 4795 | |
| 4796 | /********************** KAAA/K ************************************/ |
| 4797 | |
| 4798 | static bool_tcxx . . $ bool_t# test_kaaakcxx . . $ test_kaaak(b126dc7c1de90089). (void); |
| 4799 | static bool_tcxx . . $ bool_t# kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 4800 | static void kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 4801 | |
| 4802 | static bool_tcxx . . $ bool_t# |
| 4803 | test_kaaakcxx . . $ test_kaaak(b126dc7c1de90089). (void) |
| 4804 | { |
| 4805 | |
| 4806 | enumcxx . . $ test_kaaak(b126dc7c1de90089).$anonymous_type_25# {MAXPCcxx . . $ test_kaaak(b126dc7c1de90089).MAXPC. = 16+1}; |
| 4807 | char str[] = "kaaak"; |
| 4808 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 4809 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kaaak(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kaaak(b126dc7c1de90089).MAXPC.]; |
| 4810 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kaaak(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kaaak(b126dc7c1de90089).MAXPC.]; |
| 4811 | |
| 4812 | index_tcxx . . $ index_t# i, j; |
| 4813 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4814 | |
| 4815 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 4816 | |
| 4817 | for (a = 0; a < 64; a++) { |
| 4818 | for (b = 0; b < 64; b++) { |
| 4819 | for (c = 0; c < 64; c++) { |
| 4820 | for (d = 0; d < 64; d++) { |
| 4821 | for (e = 0; e < 64; e++) { |
| 4822 | |
| 4823 | pw[0] = a; |
| 4824 | pw[1] = b; |
| 4825 | pw[2] = c; |
| 4826 | pw[3] = d; |
| 4827 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4828 | |
| 4829 | pb[0] = e; |
| 4830 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4831 | |
| 4832 | if (kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 4833 | kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146). (i, px, py); |
| 4834 | kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58). (px, py, &j); |
| 4835 | if (i != j) { |
| 4836 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4837 | } |
| 4838 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 4839 | } |
| 4840 | |
| 4841 | } |
| 4842 | } |
| 4843 | } |
| 4844 | } |
| 4845 | |
| 4846 | if ((a&1)==0) { |
| 4847 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 4848 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 4849 | } |
| 4850 | } |
| 4851 | |
| 4852 | if (err) |
| 4853 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 4854 | else |
| 4855 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 4856 | return !err; |
| 4857 | } |
| 4858 | |
| 4859 | static void |
| 4860 | kaaak_indextopccxx . . $ kaaak_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 4861 | { |
| 4862 | enumcxx . . $ kaaak_indextopc(21a38811104ee146).$anonymous_type_26# { |
| 4863 | BLOCK_Acxx . . $ kaaak_indextopc(21a38811104ee146).BLOCK_A. = MAX_AAAINDEXcxx . . $ `gtb-probe.c:438:9`! |
| 4864 | }; |
| 4865 | index_tcxx . . $ index_t# a, b, r; |
| 4866 | |
| 4867 | r = i; |
| 4868 | a = r / BLOCK_Acxx . . $ kaaak_indextopc(21a38811104ee146).BLOCK_A.; |
| 4869 | r -= a * BLOCK_Acxx . . $ kaaak_indextopc(21a38811104ee146).BLOCK_A.; |
| 4870 | |
| 4871 | b = r; |
| 4872 | |
| 4873 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == (a * BLOCK_A + b)); |
| 4874 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (b < BLOCK_A); |
| 4875 | |
| 4876 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 4877 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 4878 | |
| 4879 | pw[1] = aaa_xyzcxx . . $ aaa_xyz. [b] [0]; |
| 4880 | pw[2] = aaa_xyzcxx . . $ aaa_xyz. [b] [1]; |
| 4881 | pw[3] = aaa_xyzcxx . . $ aaa_xyz. [b] [2]; |
| 4882 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4883 | |
| 4884 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4885 | |
| 4886 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kaaak_pctoindex (pw, pb, &a) && a == i); |
| 4887 | |
| 4888 | return; |
| 4889 | } |
| 4890 | |
| 4891 | static bool_tcxx . . $ bool_t# |
| 4892 | kaaak_pctoindexcxx . . $ kaaak_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out) |
| 4893 | { |
| 4894 | enumcxx . . $ kaaak_pctoindex(9bb041263e557a58).$anonymous_type_27# {N_WHITEcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_WHITE. = 4, N_BLACKcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_BLACK. = 1}; |
| 4895 | enumcxx . . $ kaaak_pctoindex(9bb041263e557a58).$anonymous_type_28# { |
| 4896 | BLOCK_Acxx . . $ kaaak_pctoindex(9bb041263e557a58).BLOCK_A. = MAX_AAAINDEXcxx . . $ `gtb-probe.c:438:9`! |
| 4897 | }; |
| 4898 | SQUAREcxx . . $ SQUARE# ws[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], bs[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 4899 | index_tcxx . . $ index_t# ki, ai; |
| 4900 | unsigned int ft; |
| 4901 | int i; |
| 4902 | |
| 4903 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 4904 | |
| 4905 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 4906 | |
| 4907 | for (i = 0; i < N_WHITEcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = inp_pw[i]; ws[N_WHITEcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_WHITE.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4908 | for (i = 0; i < N_BLACKcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = inp_pb[i]; bs[N_BLACKcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_BLACK.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 4909 | |
| 4910 | if ((ft & WE_FLAGcxx . . $ WE_FLAG.) != 0) { |
| 4911 | for (i = 0; i < N_WHITEcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[i]); |
| 4912 | for (i = 0; i < N_BLACKcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[i]); |
| 4913 | } |
| 4914 | |
| 4915 | if ((ft & NS_FLAGcxx . . $ NS_FLAG.) != 0) { |
| 4916 | for (i = 0; i < N_WHITEcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[i]); |
| 4917 | for (i = 0; i < N_BLACKcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[i]); |
| 4918 | } |
| 4919 | |
| 4920 | if ((ft & NW_SE_FLAGcxx . . $ NW_SE_FLAG.) != 0) { |
| 4921 | for (i = 0; i < N_WHITEcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[i]); |
| 4922 | for (i = 0; i < N_BLACKcxx . . $ kaaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[i]); |
| 4923 | } |
| 4924 | |
| 4925 | |
| 4926 | { |
| 4927 | SQUAREcxx . . $ SQUARE# tmp; |
| 4928 | if (ws[2] < ws[1]) { |
| 4929 | tmp = ws[1]; |
| 4930 | ws[1] = ws[2]; |
| 4931 | ws[2] = tmp; |
| 4932 | } |
| 4933 | if (ws[3] < ws[2]) { |
| 4934 | tmp = ws[2]; |
| 4935 | ws[2] = ws[3]; |
| 4936 | ws[3] = tmp; |
| 4937 | } |
| 4938 | if (ws[2] < ws[1]) { |
| 4939 | tmp = ws[1]; |
| 4940 | ws[1] = ws[2]; |
| 4941 | ws[2] = tmp; |
| 4942 | } |
| 4943 | } |
| 4944 | |
| 4945 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 4946 | |
| 4947 | /*128 == (128 & (((ws[1]^ws[2])-1) | ((ws[1]^ws[3])-1) | ((ws[2]^ws[3])-1)) */ |
| 4948 | |
| 4949 | if (ws[1] == ws[2] || ws[1] == ws[3] || ws[2] == ws[3]) { |
| 4950 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4951 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4952 | } |
| 4953 | |
| 4954 | ai = aaa_getsubicxx . . $ aaa_getsubi(64d4c609941711dd). ( ws[1], ws[2], ws[3] ); |
| 4955 | |
| 4956 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki) || IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ai)) { |
| 4957 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 4958 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4959 | } |
| 4960 | *out = ki * BLOCK_Acxx . . $ kaaak_pctoindex(9bb041263e557a58).BLOCK_A. + ai; |
| 4961 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 4962 | } |
| 4963 | |
| 4964 | /****************** End KAAB/K *************************************/ |
| 4965 | |
| 4966 | /********************** KAP/KB ************************************/ |
| 4967 | |
| 4968 | static bool_tcxx . . $ bool_t# test_kapkbcxx . . $ test_kapkb(b126dc7c1de90089). (void); |
| 4969 | static bool_tcxx . . $ bool_t# kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 4970 | static void kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 4971 | |
| 4972 | static bool_tcxx . . $ bool_t# |
| 4973 | test_kapkbcxx . . $ test_kapkb(b126dc7c1de90089). (void) |
| 4974 | { |
| 4975 | |
| 4976 | enumcxx . . $ test_kapkb(b126dc7c1de90089).$anonymous_type_29# {MAXPCcxx . . $ test_kapkb(b126dc7c1de90089).MAXPC. = 16+1}; |
| 4977 | char str[] = "kapkb"; |
| 4978 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 4979 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kapkb(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kapkb(b126dc7c1de90089).MAXPC.]; |
| 4980 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kapkb(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kapkb(b126dc7c1de90089).MAXPC.]; |
| 4981 | |
| 4982 | index_tcxx . . $ index_t# i, j; |
| 4983 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 4984 | |
| 4985 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 4986 | |
| 4987 | for (a = 0; a < 64; a++) { |
| 4988 | for (b = 0; b < 64; b++) { |
| 4989 | for (c = 0; c < 64; c++) { |
| 4990 | for (d = 0; d < 64; d++) { |
| 4991 | for (e = 0; e < 64; e++) { |
| 4992 | |
| 4993 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 4994 | continue; |
| 4995 | |
| 4996 | pw[0] = a; |
| 4997 | pw[1] = b; |
| 4998 | pw[2] = c; |
| 4999 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5000 | |
| 5001 | pb[0] = e; |
| 5002 | pb[1] = d; |
| 5003 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5004 | |
| 5005 | if (kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 5006 | kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146). (i, px, py); |
| 5007 | kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58). (px, py, &j); |
| 5008 | if (i != j) { |
| 5009 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5010 | } |
| 5011 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 5012 | } |
| 5013 | |
| 5014 | } |
| 5015 | } |
| 5016 | } |
| 5017 | } |
| 5018 | |
| 5019 | if ((a&1)==0) { |
| 5020 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 5021 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 5022 | } |
| 5023 | } |
| 5024 | |
| 5025 | if (err) |
| 5026 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 5027 | else |
| 5028 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 5029 | return !err; |
| 5030 | } |
| 5031 | |
| 5032 | static void |
| 5033 | kapkb_indextopccxx . . $ kapkb_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5034 | { |
| 5035 | /*---------------------------------------------------------* |
| 5036 | inverse work to make sure that the following is valid |
| 5037 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d * BLOCK_D + e; |
| 5038 | *----------------------------------------------------------*/ |
| 5039 | enumcxx . . $ kapkb_indextopc(21a38811104ee146).$anonymous_type_30# {B11100cxx . . $ kapkb_indextopc(21a38811104ee146).B11100. = 7u << 2}; |
| 5040 | enumcxx . . $ kapkb_indextopc(21a38811104ee146).$anonymous_type_31# {BLOCK_Acxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64*64, BLOCK_Bcxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_B. = 64*64*64, BLOCK_Ccxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_C. = 64*64, BLOCK_Dcxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_D. = 64}; |
| 5041 | index_tcxx . . $ index_t# a, b, c, d, e, r; |
| 5042 | index_tcxx . . $ index_t# x; |
| 5043 | |
| 5044 | r = i; |
| 5045 | a = r / BLOCK_Acxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_A.; |
| 5046 | r -= a * BLOCK_Acxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_A.; |
| 5047 | b = r / BLOCK_Bcxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_B.; |
| 5048 | r -= b * BLOCK_Bcxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_B.; |
| 5049 | c = r / BLOCK_Ccxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_C.; |
| 5050 | r -= c * BLOCK_Ccxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_C.; |
| 5051 | d = r / BLOCK_Dcxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_D.; |
| 5052 | r -= d * BLOCK_Dcxx . . $ kapkb_indextopc(21a38811104ee146).BLOCK_D.; |
| 5053 | e = r; |
| 5054 | |
| 5055 | /* x is pslice */ |
| 5056 | x = a; |
| 5057 | x += x & B11100cxx . . $ kapkb_indextopc(21a38811104ee146).B11100.; /* get upper part and double it */ |
| 5058 | x += 8; /* add extra row */ |
| 5059 | x ^= 070; /* flip NS */ |
| 5060 | |
| 5061 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 5062 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 5063 | pw[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 5064 | pw[2] = (SQUAREcxx . . $ SQUARE#) x; |
| 5065 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5066 | pb[1] = (SQUAREcxx . . $ SQUARE#) e; |
| 5067 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5068 | |
| 5069 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kapkb_pctoindex (pw, pb, &a) && a == i); |
| 5070 | |
| 5071 | return; |
| 5072 | } |
| 5073 | |
| 5074 | |
| 5075 | static bool_tcxx . . $ bool_t# |
| 5076 | kapkb_pctoindexcxx . . $ kapkb_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 5077 | { |
| 5078 | enumcxx . . $ kapkb_pctoindex(9bb041263e557a58).$anonymous_type_32# {BLOCK_Acxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64*64, BLOCK_Bcxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64*64, BLOCK_Ccxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_C. = 64*64, BLOCK_Dcxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_D. = 64}; |
| 5079 | index_tcxx . . $ index_t# pslice; |
| 5080 | SQUAREcxx . . $ SQUARE# sq; |
| 5081 | SQUAREcxx . . $ SQUARE# pawn = pw[2]; |
| 5082 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 5083 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 5084 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 5085 | SQUAREcxx . . $ SQUARE# ba = pb[1]; |
| 5086 | |
| 5087 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 5088 | |
| 5089 | if ( !(A2cxx . . $ A2. <= pawn && pawn < A8cxx . . $ A8.)) { |
| 5090 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5091 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5092 | } |
| 5093 | |
| 5094 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 5095 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 5096 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 5097 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 5098 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 5099 | ba = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ba); |
| 5100 | } |
| 5101 | |
| 5102 | sq = pawn; |
| 5103 | sq ^= 070; /* flipNS*/ |
| 5104 | sq -= 8; /* down one row*/ |
| 5105 | pslice = (index_tcxx . . $ index_t#) ((sq+(sq&3)) >> 1); |
| 5106 | |
| 5107 | *out = pslice * BLOCK_Acxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * BLOCK_Bcxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * BLOCK_Ccxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)wa * BLOCK_Dcxx . . $ kapkb_pctoindex(9bb041263e557a58).BLOCK_D. + (index_tcxx . . $ index_t#)ba; |
| 5108 | |
| 5109 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5110 | } |
| 5111 | /********************** end KAP/KB ************************************/ |
| 5112 | |
| 5113 | /************************* KAB/KP ************************************/ |
| 5114 | |
| 5115 | static bool_tcxx . . $ bool_t# test_kabkpcxx . . $ test_kabkp(b126dc7c1de90089). (void); |
| 5116 | static bool_tcxx . . $ bool_t# kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 5117 | static void kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 5118 | |
| 5119 | static bool_tcxx . . $ bool_t# |
| 5120 | test_kabkpcxx . . $ test_kabkp(b126dc7c1de90089). (void) |
| 5121 | { |
| 5122 | |
| 5123 | enumcxx . . $ test_kabkp(b126dc7c1de90089).$anonymous_type_33# {MAXPCcxx . . $ test_kabkp(b126dc7c1de90089).MAXPC. = 16+1}; |
| 5124 | char str[] = "kabkp"; |
| 5125 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 5126 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kabkp(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kabkp(b126dc7c1de90089).MAXPC.]; |
| 5127 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kabkp(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kabkp(b126dc7c1de90089).MAXPC.]; |
| 5128 | |
| 5129 | index_tcxx . . $ index_t# i, j; |
| 5130 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5131 | |
| 5132 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 5133 | |
| 5134 | for (a = 0; a < 64; a++) { |
| 5135 | for (b = 0; b < 64; b++) { |
| 5136 | for (c = 0; c < 64; c++) { |
| 5137 | for (d = 0; d < 64; d++) { |
| 5138 | for (e = 0; e < 64; e++) { |
| 5139 | |
| 5140 | if (d <= H1cxx . . $ H1. || d >= A8cxx . . $ A8.) |
| 5141 | continue; |
| 5142 | |
| 5143 | pw[0] = a; |
| 5144 | pw[1] = b; |
| 5145 | pw[2] = c; |
| 5146 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5147 | |
| 5148 | pb[0] = e; |
| 5149 | pb[1] = d; |
| 5150 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5151 | |
| 5152 | if (kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 5153 | kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146). (i, px, py); |
| 5154 | kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58). (px, py, &j); |
| 5155 | if (i != j) { |
| 5156 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5157 | } |
| 5158 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 5159 | } |
| 5160 | |
| 5161 | } |
| 5162 | } |
| 5163 | } |
| 5164 | } |
| 5165 | |
| 5166 | if ((a&1)==0) { |
| 5167 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 5168 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 5169 | } |
| 5170 | } |
| 5171 | |
| 5172 | if (err) |
| 5173 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 5174 | else |
| 5175 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 5176 | return !err; |
| 5177 | } |
| 5178 | |
| 5179 | static void |
| 5180 | kabkp_indextopccxx . . $ kabkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5181 | { |
| 5182 | /*---------------------------------------------------------* |
| 5183 | inverse work to make sure that the following is valid |
| 5184 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d * BLOCK_D + e; |
| 5185 | *----------------------------------------------------------*/ |
| 5186 | enumcxx . . $ kabkp_indextopc(21a38811104ee146).$anonymous_type_34# {B11100cxx . . $ kabkp_indextopc(21a38811104ee146).B11100. = 7u << 2}; |
| 5187 | enumcxx . . $ kabkp_indextopc(21a38811104ee146).$anonymous_type_35# {BLOCK_Acxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64*64, BLOCK_Bcxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_B. = 64*64*64, BLOCK_Ccxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_C. = 64*64, BLOCK_Dcxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_D. = 64}; |
| 5188 | index_tcxx . . $ index_t# a, b, c, d, e, r; |
| 5189 | index_tcxx . . $ index_t# x; |
| 5190 | |
| 5191 | r = i; |
| 5192 | a = r / BLOCK_Acxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 5193 | r -= a * BLOCK_Acxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 5194 | b = r / BLOCK_Bcxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 5195 | r -= b * BLOCK_Bcxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 5196 | c = r / BLOCK_Ccxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_C.; |
| 5197 | r -= c * BLOCK_Ccxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_C.; |
| 5198 | d = r / BLOCK_Dcxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_D.; |
| 5199 | r -= d * BLOCK_Dcxx . . $ kabkp_indextopc(21a38811104ee146).BLOCK_D.; |
| 5200 | e = r; |
| 5201 | |
| 5202 | /* x is pslice */ |
| 5203 | x = a; |
| 5204 | x += x & B11100cxx . . $ kabkp_indextopc(21a38811104ee146).B11100.; /* get upper part and double it */ |
| 5205 | x += 8; /* add extra row */ |
| 5206 | /*x ^= 070;*/ /* do not flip NS */ |
| 5207 | |
| 5208 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 5209 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 5210 | pw[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 5211 | pw[2] = (SQUAREcxx . . $ SQUARE#) e; |
| 5212 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5213 | pb[1] = (SQUAREcxx . . $ SQUARE#) x; |
| 5214 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5215 | |
| 5216 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kabkp_pctoindex (pw, pb, &a) && a == i); |
| 5217 | |
| 5218 | return; |
| 5219 | } |
| 5220 | |
| 5221 | |
| 5222 | static bool_tcxx . . $ bool_t# |
| 5223 | kabkp_pctoindexcxx . . $ kabkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 5224 | { |
| 5225 | enumcxx . . $ kabkp_pctoindex(9bb041263e557a58).$anonymous_type_36# {BLOCK_Acxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64*64, BLOCK_Bcxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64*64, BLOCK_Ccxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_C. = 64*64, BLOCK_Dcxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_D. = 64}; |
| 5226 | index_tcxx . . $ index_t# pslice; |
| 5227 | SQUAREcxx . . $ SQUARE# sq; |
| 5228 | SQUAREcxx . . $ SQUARE# pawn = pb[1]; |
| 5229 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 5230 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 5231 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 5232 | SQUAREcxx . . $ SQUARE# wb = pw[2]; |
| 5233 | |
| 5234 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 5235 | |
| 5236 | if ( !(A2cxx . . $ A2. <= pawn && pawn < A8cxx . . $ A8.)) { |
| 5237 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5238 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5239 | } |
| 5240 | |
| 5241 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 5242 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 5243 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 5244 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 5245 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 5246 | wb = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wb); |
| 5247 | } |
| 5248 | |
| 5249 | sq = pawn; |
| 5250 | /*sq ^= 070;*/ /* do not flipNS*/ |
| 5251 | sq -= 8; /* down one row*/ |
| 5252 | pslice = (index_tcxx . . $ index_t#) ((sq+(sq&3)) >> 1); |
| 5253 | |
| 5254 | *out = pslice * BLOCK_Acxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * BLOCK_Bcxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * BLOCK_Ccxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)wa * BLOCK_Dcxx . . $ kabkp_pctoindex(9bb041263e557a58).BLOCK_D. + (index_tcxx . . $ index_t#)wb; |
| 5255 | |
| 5256 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5257 | } |
| 5258 | /********************** end KAB/KP ************************************/ |
| 5259 | |
| 5260 | |
| 5261 | static void |
| 5262 | kpk_indextopccxx . . $ kpk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5263 | { |
| 5264 | /*---------------------------------------------------------* |
| 5265 | inverse work to make sure that the following is valid |
| 5266 | index = a * BLOCK_A + b * BLOCK_B + c; |
| 5267 | *----------------------------------------------------------*/ |
| 5268 | enumcxx . . $ kpk_indextopc(21a38811104ee146).$anonymous_type_37# {B11100cxx . . $ kpk_indextopc(21a38811104ee146).B11100. = 7u << 2}; |
| 5269 | enumcxx . . $ kpk_indextopc(21a38811104ee146).$anonymous_type_38# {BLOCK_Acxx . . $ kpk_indextopc(21a38811104ee146).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kpk_indextopc(21a38811104ee146).BLOCK_B. = 64}; |
| 5270 | index_tcxx . . $ index_t# a, b, c, r; |
| 5271 | index_tcxx . . $ index_t# x; |
| 5272 | |
| 5273 | r = i; |
| 5274 | a = r / BLOCK_Acxx . . $ kpk_indextopc(21a38811104ee146).BLOCK_A.; |
| 5275 | r -= a * BLOCK_Acxx . . $ kpk_indextopc(21a38811104ee146).BLOCK_A.; |
| 5276 | b = r / BLOCK_Bcxx . . $ kpk_indextopc(21a38811104ee146).BLOCK_B.; |
| 5277 | r -= b * BLOCK_Bcxx . . $ kpk_indextopc(21a38811104ee146).BLOCK_B.; |
| 5278 | c = r; |
| 5279 | |
| 5280 | /* x is pslice */ |
| 5281 | x = a; |
| 5282 | x += x & B11100cxx . . $ kpk_indextopc(21a38811104ee146).B11100.; /* get upper part and double it */ |
| 5283 | x += 8; /* add extra row */ |
| 5284 | x ^= 070; /* flip NS */ |
| 5285 | |
| 5286 | pw[1] = (SQUAREcxx . . $ SQUARE#) x; |
| 5287 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 5288 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 5289 | |
| 5290 | pw[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5291 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5292 | |
| 5293 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kpk_pctoindex (pw, pb, &a) && a == i); |
| 5294 | |
| 5295 | return; |
| 5296 | } |
| 5297 | |
| 5298 | |
| 5299 | static bool_tcxx . . $ bool_t# |
| 5300 | kpk_pctoindexcxx . . $ kpk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 5301 | { |
| 5302 | enumcxx . . $ kpk_pctoindex(9bb041263e557a58).$anonymous_type_39# {BLOCK_Acxx . . $ kpk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kpk_pctoindex(9bb041263e557a58).BLOCK_B. = 64}; |
| 5303 | index_tcxx . . $ index_t# pslice; |
| 5304 | SQUAREcxx . . $ SQUARE# sq; |
| 5305 | SQUAREcxx . . $ SQUARE# pawn = pw[1]; |
| 5306 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 5307 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 5308 | |
| 5309 | #ifdef DEBUG |
| 5310 | if ( !(A2 <= pawn && pawn < A8)) { |
| 5311 | SQ_CONTENT wp[MAX_LISTSIZE], bp[MAX_LISTSIZE]; |
| 5312 | bp [0] = wp[0] = KING; |
| 5313 | wp[1] = PAWN; |
| 5314 | wp[2] = bp[1] = NOPIECE; |
| 5315 | output_state (0, pw, pb, wp, bp); |
| 5316 | } |
| 5317 | #endif |
| 5318 | |
| 5319 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 5320 | |
| 5321 | if ( !(A2cxx . . $ A2. <= pawn && pawn < A8cxx . . $ A8.)) { |
| 5322 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5323 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5324 | } |
| 5325 | |
| 5326 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 5327 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 5328 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 5329 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 5330 | } |
| 5331 | |
| 5332 | sq = pawn; |
| 5333 | sq ^= 070; /* flipNS*/ |
| 5334 | sq -= 8; /* down one row*/ |
| 5335 | pslice = (index_tcxx . . $ index_t#) ((sq+(sq&3)) >> 1); |
| 5336 | |
| 5337 | *out = pslice * BLOCK_Acxx . . $ kpk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * BLOCK_Bcxx . . $ kpk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk; |
| 5338 | |
| 5339 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5340 | } |
| 5341 | |
| 5342 | |
| 5343 | /********************** KPP/K ************************************/ |
| 5344 | |
| 5345 | static bool_tcxx . . $ bool_t# test_kppkcxx . . $ test_kppk(b126dc7c1de90089). (void); |
| 5346 | static bool_tcxx . . $ bool_t# kppk_pctoindexcxx . . $ kppk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 5347 | static void kppk_indextopccxx . . $ kppk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 5348 | |
| 5349 | static bool_tcxx . . $ bool_t# |
| 5350 | test_kppkcxx . . $ test_kppk(b126dc7c1de90089). (void) |
| 5351 | { |
| 5352 | |
| 5353 | enumcxx . . $ test_kppk(b126dc7c1de90089).$anonymous_type_40# {MAXPCcxx . . $ test_kppk(b126dc7c1de90089).MAXPC. = 16+1}; |
| 5354 | char str[] = "kppk"; |
| 5355 | SQUAREcxx . . $ SQUARE# a, b, c, d; |
| 5356 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kppk(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kppk(b126dc7c1de90089).MAXPC.]; |
| 5357 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kppk(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kppk(b126dc7c1de90089).MAXPC.]; |
| 5358 | |
| 5359 | index_tcxx . . $ index_t# i, j; |
| 5360 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5361 | |
| 5362 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 5363 | |
| 5364 | for (b = 0; b < 64; b++) { |
| 5365 | for (c = 0; c < 64; c++) { |
| 5366 | sq_tcxx . . $ sq_t# anchor1, anchor2, loosen1, loosen2; |
| 5367 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 5368 | continue; |
| 5369 | if (b <= H1cxx . . $ H1. || b >= A8cxx . . $ A8.) |
| 5370 | continue; |
| 5371 | |
| 5372 | pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (b, c, &anchor1, &loosen1); |
| 5373 | pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (c, b, &anchor2, &loosen2); |
| 5374 | if (!(anchor1 == anchor2 && loosen1 == loosen2)) { |
| 5375 | printfcxx . . $ printf(581fddd72a8db8fc). ("Output depends on input in pp_outanchorfirst()\n input:%u, %u\n",(unsigned)b,(unsigned)c); |
| 5376 | fatal_errorcxx . . $ fatal_error(49f6e7a06ebc5aa8).(); |
| 5377 | } |
| 5378 | } |
| 5379 | } |
| 5380 | |
| 5381 | |
| 5382 | for (a = 0; a < 64; a++) { |
| 5383 | for (b = 0; b < 64; b++) { |
| 5384 | for (c = 0; c < 64; c++) { |
| 5385 | for (d = 0; d < 64; d++) { |
| 5386 | |
| 5387 | |
| 5388 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 5389 | continue; |
| 5390 | if (b <= H1cxx . . $ H1. || b >= A8cxx . . $ A8.) |
| 5391 | continue; |
| 5392 | |
| 5393 | |
| 5394 | pw[0] = a; |
| 5395 | pw[1] = b; |
| 5396 | pw[2] = c; |
| 5397 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5398 | |
| 5399 | pb[0] = d; |
| 5400 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5401 | |
| 5402 | if (kppk_pctoindexcxx . . $ kppk_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 5403 | kppk_indextopccxx . . $ kppk_indextopc(21a38811104ee146). (i, px, py); |
| 5404 | kppk_pctoindexcxx . . $ kppk_pctoindex(9bb041263e557a58). (px, py, &j); |
| 5405 | if (i != j) { |
| 5406 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5407 | } |
| 5408 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 5409 | } |
| 5410 | |
| 5411 | |
| 5412 | } |
| 5413 | } |
| 5414 | } |
| 5415 | |
| 5416 | if ((a&1)==0) { |
| 5417 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 5418 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 5419 | } |
| 5420 | } |
| 5421 | |
| 5422 | if (err) |
| 5423 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 5424 | else |
| 5425 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 5426 | return !err; |
| 5427 | } |
| 5428 | |
| 5429 | static void |
| 5430 | kppk_indextopccxx . . $ kppk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5431 | { |
| 5432 | /*---------------------------------------------------------* |
| 5433 | inverse work to make sure that the following is valid |
| 5434 | index = a * BLOCK_A + b * BLOCK_B + c; |
| 5435 | *----------------------------------------------------------*/ |
| 5436 | enumcxx . . $ kppk_indextopc(21a38811104ee146).$anonymous_type_41# {B11100cxx . . $ kppk_indextopc(21a38811104ee146).B11100. = 7u << 2}; |
| 5437 | enumcxx . . $ kppk_indextopc(21a38811104ee146).$anonymous_type_42# {BLOCK_Acxx . . $ kppk_indextopc(21a38811104ee146).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kppk_indextopc(21a38811104ee146).BLOCK_B. = 64}; |
| 5438 | index_tcxx . . $ index_t# a, b, c, r; |
| 5439 | index_tcxx . . $ index_t# m, n; |
| 5440 | |
| 5441 | r = i; |
| 5442 | a = r / BLOCK_Acxx . . $ kppk_indextopc(21a38811104ee146).BLOCK_A.; |
| 5443 | r -= a * BLOCK_Acxx . . $ kppk_indextopc(21a38811104ee146).BLOCK_A.; |
| 5444 | b = r / BLOCK_Bcxx . . $ kppk_indextopc(21a38811104ee146).BLOCK_B.; |
| 5445 | r -= b * BLOCK_Bcxx . . $ kppk_indextopc(21a38811104ee146).BLOCK_B.; |
| 5446 | c = r; |
| 5447 | |
| 5448 | m = pp_hi24cxx . . $ pp_hi24. [a]; |
| 5449 | n = pp_lo48cxx . . $ pp_lo48. [a]; |
| 5450 | |
| 5451 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 5452 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 5453 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5454 | |
| 5455 | pw[1] = pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427). (m); |
| 5456 | pw[2] = pidx48_to_wsqcxx . . $ pidx48_to_wsq(46cc46841198e427). (n); |
| 5457 | |
| 5458 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5459 | |
| 5460 | |
| 5461 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[1] && pw[1] < A8); |
| 5462 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[2] && pw[2] < A8); |
| 5463 | |
| 5464 | #ifdef DEBUG |
| 5465 | if (!(kppk_pctoindex (pw, pb, &a) && a == i)) { |
| 5466 | pc_t wp[] = {KING, PAWN, PAWN, NOPIECE}; |
| 5467 | pc_t bp[] = {KING, NOPIECE}; |
| 5468 | printf("Indexes not matching: input:%d, output:%d\n", i, a); |
| 5469 | print_pos (pw, pb, wp, bp); |
| 5470 | } |
| 5471 | #endif |
| 5472 | |
| 5473 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kppk_pctoindex (pw, pb, &a) && a == i); |
| 5474 | |
| 5475 | return; |
| 5476 | } |
| 5477 | |
| 5478 | |
| 5479 | static bool_tcxx . . $ bool_t# |
| 5480 | kppk_pctoindexcxx . . $ kppk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 5481 | { |
| 5482 | enumcxx . . $ kppk_pctoindex(9bb041263e557a58).$anonymous_type_43# {BLOCK_Acxx . . $ kppk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kppk_pctoindex(9bb041263e557a58).BLOCK_B. = 64}; |
| 5483 | index_tcxx . . $ index_t# pp_slice; |
| 5484 | SQUAREcxx . . $ SQUARE# anchor, loosen; |
| 5485 | |
| 5486 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 5487 | SQUAREcxx . . $ SQUARE# pawn_a = pw[1]; |
| 5488 | SQUAREcxx . . $ SQUARE# pawn_b = pw[2]; |
| 5489 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 5490 | index_tcxx . . $ index_t# i, j; |
| 5491 | |
| 5492 | #ifdef DEBUG |
| 5493 | if (!(A2 <= pawn_a && pawn_a < A8)) { |
| 5494 | printf ("\n\nsquare of pawn_a: %s\n", Square_str[pawn_a]); |
| 5495 | printf(" wk %s\n p1 %s\n p2 %s\n bk %s\n" |
| 5496 | , Square_str[wk] |
| 5497 | , Square_str[pawn_a] |
| 5498 | , Square_str[pawn_b] |
| 5499 | , Square_str[bk] |
| 5500 | ); |
| 5501 | } |
| 5502 | #endif |
| 5503 | |
| 5504 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_a && pawn_a < A8); |
| 5505 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_b && pawn_b < A8); |
| 5506 | |
| 5507 | pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (pawn_a, pawn_b, &anchor, &loosen); |
| 5508 | |
| 5509 | if ((anchor & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 5510 | anchor = flipWEcxx . . $ flipWE(2141b656ce2cc063). (anchor); |
| 5511 | loosen = flipWEcxx . . $ flipWE(2141b656ce2cc063). (loosen); |
| 5512 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 5513 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 5514 | } |
| 5515 | |
| 5516 | i = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (anchor); |
| 5517 | j = wsq_to_pidx48cxx . . $ wsq_to_pidx48(4c679297bf94b9eb). (loosen); |
| 5518 | |
| 5519 | pp_slice = ppidxcxx . . $ ppidx. [i] [j]; |
| 5520 | |
| 5521 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(pp_slice)) { |
| 5522 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5523 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5524 | } |
| 5525 | |
| 5526 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pp_slice < MAX_PPINDEX ); |
| 5527 | |
| 5528 | *out = pp_slice * BLOCK_Acxx . . $ kppk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * BLOCK_Bcxx . . $ kppk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk; |
| 5529 | |
| 5530 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5531 | } |
| 5532 | /****************** end KPP/K ************************************/ |
| 5533 | |
| 5534 | static void |
| 5535 | kakp_indextopccxx . . $ kakp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5536 | { |
| 5537 | /*---------------------------------------------------------* |
| 5538 | inverse work to make sure that the following is valid |
| 5539 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 5540 | *----------------------------------------------------------*/ |
| 5541 | enumcxx . . $ kakp_indextopc(21a38811104ee146).$anonymous_type_44# {B11100cxx . . $ kakp_indextopc(21a38811104ee146).B11100. = 7u << 2}; |
| 5542 | enumcxx . . $ kakp_indextopc(21a38811104ee146).$anonymous_type_45# {BLOCK_Acxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 5543 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 5544 | index_tcxx . . $ index_t# x; |
| 5545 | |
| 5546 | r = i; |
| 5547 | a = r / BLOCK_Acxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_A.; |
| 5548 | r -= a * BLOCK_Acxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_A.; |
| 5549 | b = r / BLOCK_Bcxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_B.; |
| 5550 | r -= b * BLOCK_Bcxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_B.; |
| 5551 | c = r / BLOCK_Ccxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_C.; |
| 5552 | r -= c * BLOCK_Ccxx . . $ kakp_indextopc(21a38811104ee146).BLOCK_C.; |
| 5553 | d = r; |
| 5554 | |
| 5555 | /* x is pslice */ |
| 5556 | x = a; |
| 5557 | x += x & B11100cxx . . $ kakp_indextopc(21a38811104ee146).B11100.; /* get upper part and double it */ |
| 5558 | x += 8; /* add extra row */ |
| 5559 | /* x ^= 070; */ /* flip NS */ |
| 5560 | |
| 5561 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 5562 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 5563 | pw[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 5564 | pb[1] = (SQUAREcxx . . $ SQUARE#) x; |
| 5565 | pw[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5566 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5567 | |
| 5568 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kakp_pctoindex (pw, pb, &a) && a == i); |
| 5569 | |
| 5570 | return; |
| 5571 | } |
| 5572 | |
| 5573 | |
| 5574 | static bool_tcxx . . $ bool_t# |
| 5575 | kakp_pctoindexcxx . . $ kakp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 5576 | { |
| 5577 | enumcxx . . $ kakp_pctoindex(9bb041263e557a58).$anonymous_type_46# {BLOCK_Acxx . . $ kakp_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kakp_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kakp_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 5578 | index_tcxx . . $ index_t# pslice; |
| 5579 | SQUAREcxx . . $ SQUARE# sq; |
| 5580 | SQUAREcxx . . $ SQUARE# pawn = pb[1]; |
| 5581 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 5582 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 5583 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 5584 | |
| 5585 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 5586 | |
| 5587 | if ( !(A2cxx . . $ A2. <= pawn && pawn < A8cxx . . $ A8.)) { |
| 5588 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5589 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5590 | } |
| 5591 | |
| 5592 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 5593 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 5594 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 5595 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 5596 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 5597 | } |
| 5598 | |
| 5599 | sq = pawn; |
| 5600 | /*sq ^= 070;*/ /* flipNS*/ |
| 5601 | sq -= 8; /* down one row*/ |
| 5602 | pslice = (index_tcxx . . $ index_t#) ((sq+(sq&3)) >> 1); |
| 5603 | |
| 5604 | *out = pslice * BLOCK_Acxx . . $ kakp_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * BLOCK_Bcxx . . $ kakp_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * BLOCK_Ccxx . . $ kakp_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)wa; |
| 5605 | |
| 5606 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5607 | } |
| 5608 | |
| 5609 | |
| 5610 | static void |
| 5611 | kapk_indextopccxx . . $ kapk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5612 | { |
| 5613 | /*---------------------------------------------------------* |
| 5614 | inverse work to make sure that the following is valid |
| 5615 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 5616 | *----------------------------------------------------------*/ |
| 5617 | enumcxx . . $ kapk_indextopc(21a38811104ee146).$anonymous_type_47# {B11100cxx . . $ kapk_indextopc(21a38811104ee146).B11100. = 7u << 2}; |
| 5618 | enumcxx . . $ kapk_indextopc(21a38811104ee146).$anonymous_type_48# {BLOCK_Acxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 5619 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 5620 | index_tcxx . . $ index_t# x; |
| 5621 | |
| 5622 | r = i; |
| 5623 | a = r / BLOCK_Acxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_A.; |
| 5624 | r -= a * BLOCK_Acxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_A.; |
| 5625 | b = r / BLOCK_Bcxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_B.; |
| 5626 | r -= b * BLOCK_Bcxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_B.; |
| 5627 | c = r / BLOCK_Ccxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_C.; |
| 5628 | r -= c * BLOCK_Ccxx . . $ kapk_indextopc(21a38811104ee146).BLOCK_C.; |
| 5629 | d = r; |
| 5630 | |
| 5631 | /* x is pslice */ |
| 5632 | x = a; |
| 5633 | x += x & B11100cxx . . $ kapk_indextopc(21a38811104ee146).B11100.; /* get upper part and double it */ |
| 5634 | x += 8; /* add extra row */ |
| 5635 | x ^= 070; /* flip NS */ |
| 5636 | |
| 5637 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 5638 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 5639 | pw[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 5640 | pw[2] = (SQUAREcxx . . $ SQUARE#) x; |
| 5641 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5642 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5643 | |
| 5644 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kapk_pctoindex (pw, pb, &a) && a == i); |
| 5645 | |
| 5646 | return; |
| 5647 | } |
| 5648 | |
| 5649 | |
| 5650 | static bool_tcxx . . $ bool_t# |
| 5651 | kapk_pctoindexcxx . . $ kapk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 5652 | { |
| 5653 | enumcxx . . $ kapk_pctoindex(9bb041263e557a58).$anonymous_type_49# {BLOCK_Acxx . . $ kapk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kapk_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kapk_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 5654 | index_tcxx . . $ index_t# pslice; |
| 5655 | SQUAREcxx . . $ SQUARE# sq; |
| 5656 | SQUAREcxx . . $ SQUARE# pawn = pw[2]; |
| 5657 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 5658 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 5659 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 5660 | |
| 5661 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 5662 | |
| 5663 | if ( !(A2cxx . . $ A2. <= pawn && pawn < A8cxx . . $ A8.)) { |
| 5664 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5665 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5666 | } |
| 5667 | |
| 5668 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 5669 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 5670 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 5671 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 5672 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 5673 | } |
| 5674 | |
| 5675 | sq = pawn; |
| 5676 | sq ^= 070; /* flipNS*/ |
| 5677 | sq -= 8; /* down one row*/ |
| 5678 | pslice = (index_tcxx . . $ index_t#) ((sq+(sq&3)) >> 1); |
| 5679 | |
| 5680 | *out = pslice * BLOCK_Acxx . . $ kapk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * BLOCK_Bcxx . . $ kapk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * BLOCK_Ccxx . . $ kapk_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)wa; |
| 5681 | |
| 5682 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5683 | } |
| 5684 | |
| 5685 | |
| 5686 | static void |
| 5687 | kaak_indextopccxx . . $ kaak_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5688 | { |
| 5689 | enumcxx . . $ kaak_indextopc(21a38811104ee146).$anonymous_type_50# {BLOCK_Acxx . . $ kaak_indextopc(21a38811104ee146).BLOCK_A. = MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!}; |
| 5690 | index_tcxx . . $ index_t# a, b, r, x, y; |
| 5691 | |
| 5692 | r = i; |
| 5693 | a = r / BLOCK_Acxx . . $ kaak_indextopc(21a38811104ee146).BLOCK_A.; |
| 5694 | r -= a * BLOCK_Acxx . . $ kaak_indextopc(21a38811104ee146).BLOCK_A.; |
| 5695 | b = r; |
| 5696 | |
| 5697 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == (a * BLOCK_A + b)); |
| 5698 | |
| 5699 | pw[0] = wksqcxx . . $ wksq. [a]; |
| 5700 | pb[0] = bksqcxx . . $ bksq. [a]; |
| 5701 | |
| 5702 | x = aabasecxx . . $ aabase. [b]; |
| 5703 | y = (b + 1) + x - (x * (127-x)/2); |
| 5704 | |
| 5705 | pw[1] = (SQUAREcxx . . $ SQUARE#) x; |
| 5706 | pw[2] = (SQUAREcxx . . $ SQUARE#) y; |
| 5707 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5708 | |
| 5709 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5710 | |
| 5711 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kaak_pctoindex (pw, pb, &a) && a == i); |
| 5712 | |
| 5713 | return; |
| 5714 | } |
| 5715 | |
| 5716 | |
| 5717 | static bool_tcxx . . $ bool_t# |
| 5718 | kaak_pctoindexcxx . . $ kaak_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out) |
| 5719 | { |
| 5720 | enumcxx . . $ kaak_pctoindex(9bb041263e557a58).$anonymous_type_51# {N_WHITEcxx . . $ kaak_pctoindex(9bb041263e557a58).N_WHITE. = 3, N_BLACKcxx . . $ kaak_pctoindex(9bb041263e557a58).N_BLACK. = 1}; |
| 5721 | enumcxx . . $ kaak_pctoindex(9bb041263e557a58).$anonymous_type_52# {BLOCK_Acxx . . $ kaak_pctoindex(9bb041263e557a58).BLOCK_A. = MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`!}; |
| 5722 | SQUAREcxx . . $ SQUARE# ws[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], bs[MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 5723 | index_tcxx . . $ index_t# ki, ai; |
| 5724 | unsigned int ft; |
| 5725 | SQUAREcxx . . $ SQUARE# i; |
| 5726 | |
| 5727 | ft = fliptcxx . . $ flipt. [inp_pb[0]] [inp_pw[0]]; |
| 5728 | |
| 5729 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ft < 8); |
| 5730 | |
| 5731 | for (i = 0; i < N_WHITEcxx . . $ kaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = inp_pw[i]; |
| 5732 | ws[N_WHITEcxx . . $ kaak_pctoindex(9bb041263e557a58).N_WHITE.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5733 | for (i = 0; i < N_BLACKcxx . . $ kaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = inp_pb[i]; |
| 5734 | bs[N_BLACKcxx . . $ kaak_pctoindex(9bb041263e557a58).N_BLACK.] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5735 | |
| 5736 | if ((ft & WE_FLAGcxx . . $ WE_FLAG.) != 0) { |
| 5737 | for (i = 0; i < N_WHITEcxx . . $ kaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ws[i]); |
| 5738 | for (i = 0; i < N_BLACKcxx . . $ kaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bs[i]); |
| 5739 | } |
| 5740 | |
| 5741 | if ((ft & NS_FLAGcxx . . $ NS_FLAG.) != 0) { |
| 5742 | for (i = 0; i < N_WHITEcxx . . $ kaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (ws[i]); |
| 5743 | for (i = 0; i < N_BLACKcxx . . $ kaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNScxx . . $ flipNS(2141b656ce2cc063). (bs[i]); |
| 5744 | } |
| 5745 | |
| 5746 | if ((ft & NW_SE_FLAGcxx . . $ NW_SE_FLAG.) != 0) { |
| 5747 | for (i = 0; i < N_WHITEcxx . . $ kaak_pctoindex(9bb041263e557a58).N_WHITE.; i++) ws[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (ws[i]); |
| 5748 | for (i = 0; i < N_BLACKcxx . . $ kaak_pctoindex(9bb041263e557a58).N_BLACK.; i++) bs[i] = flipNW_SEcxx . . $ flipNW_SE(2141b656ce2cc063). (bs[i]); |
| 5749 | } |
| 5750 | |
| 5751 | ki = kkidxcxx . . $ kkidx. [bs[0]] [ws[0]]; /* kkidx [black king] [white king] */ |
| 5752 | ai = (index_tcxx . . $ index_t#) aaidxcxx . . $ aaidx. [ws[1]] [ws[2]]; |
| 5753 | |
| 5754 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ki) || IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ai)) { |
| 5755 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5756 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5757 | } |
| 5758 | *out = ki * BLOCK_Acxx . . $ kaak_pctoindex(9bb041263e557a58).BLOCK_A. + ai; |
| 5759 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5760 | } |
| 5761 | |
| 5762 | /********************** KPP/KA ************************************/ |
| 5763 | |
| 5764 | static bool_tcxx . . $ bool_t# test_kppkacxx . . $ test_kppka(b126dc7c1de90089). (void); |
| 5765 | static bool_tcxx . . $ bool_t# kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 5766 | static void kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 5767 | |
| 5768 | static bool_tcxx . . $ bool_t# |
| 5769 | test_kppkacxx . . $ test_kppka(b126dc7c1de90089). (void) |
| 5770 | { |
| 5771 | |
| 5772 | enumcxx . . $ test_kppka(b126dc7c1de90089).$anonymous_type_53# {MAXPCcxx . . $ test_kppka(b126dc7c1de90089).MAXPC. = 16+1}; |
| 5773 | char str[] = "kppka"; |
| 5774 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 5775 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kppka(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kppka(b126dc7c1de90089).MAXPC.]; |
| 5776 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kppka(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kppka(b126dc7c1de90089).MAXPC.]; |
| 5777 | |
| 5778 | index_tcxx . . $ index_t# i, j; |
| 5779 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5780 | |
| 5781 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 5782 | |
| 5783 | for (a = 0; a < 64; a++) { |
| 5784 | for (b = 0; b < 64; b++) { |
| 5785 | for (c = 0; c < 64; c++) { |
| 5786 | for (d = 0; d < 64; d++) { |
| 5787 | for (e = 0; e < 64; e++) { |
| 5788 | |
| 5789 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 5790 | continue; |
| 5791 | if (b <= H1cxx . . $ H1. || b >= A8cxx . . $ A8.) |
| 5792 | continue; |
| 5793 | |
| 5794 | |
| 5795 | pw[0] = a; |
| 5796 | pw[1] = b; |
| 5797 | pw[2] = c; |
| 5798 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5799 | |
| 5800 | pb[0] = e; |
| 5801 | pb[1] = d; |
| 5802 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5803 | |
| 5804 | if (kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 5805 | kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146). (i, px, py); |
| 5806 | kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58). (px, py, &j); |
| 5807 | if (i != j) { |
| 5808 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5809 | } |
| 5810 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 5811 | } |
| 5812 | |
| 5813 | } |
| 5814 | } |
| 5815 | } |
| 5816 | } |
| 5817 | |
| 5818 | if ((a&1)==0) { |
| 5819 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 5820 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 5821 | } |
| 5822 | } |
| 5823 | |
| 5824 | if (err) |
| 5825 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 5826 | else |
| 5827 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 5828 | return !err; |
| 5829 | } |
| 5830 | |
| 5831 | |
| 5832 | static void |
| 5833 | kppka_indextopccxx . . $ kppka_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5834 | { |
| 5835 | /*---------------------------------------------------------* |
| 5836 | inverse work to make sure that the following is valid |
| 5837 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 5838 | *----------------------------------------------------------*/ |
| 5839 | |
| 5840 | enumcxx . . $ kppka_indextopc(21a38811104ee146).$anonymous_type_54# {BLOCK_Acxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 5841 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 5842 | index_tcxx . . $ index_t# m, n; |
| 5843 | |
| 5844 | r = i; |
| 5845 | a = r / BLOCK_Acxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_A.; |
| 5846 | r -= a * BLOCK_Acxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_A.; |
| 5847 | b = r / BLOCK_Bcxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_B.; |
| 5848 | r -= b * BLOCK_Bcxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_B.; |
| 5849 | c = r / BLOCK_Ccxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_C.; |
| 5850 | r -= c * BLOCK_Ccxx . . $ kppka_indextopc(21a38811104ee146).BLOCK_C.; |
| 5851 | d = r; |
| 5852 | |
| 5853 | m = pp_hi24cxx . . $ pp_hi24. [a]; |
| 5854 | n = pp_lo48cxx . . $ pp_lo48. [a]; |
| 5855 | |
| 5856 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 5857 | pw[1] = pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427). (m); |
| 5858 | pw[2] = pidx48_to_wsqcxx . . $ pidx48_to_wsq(46cc46841198e427). (n); |
| 5859 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5860 | |
| 5861 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 5862 | pb[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 5863 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5864 | |
| 5865 | |
| 5866 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[1] && pw[1] < A8); |
| 5867 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[2] && pw[2] < A8); |
| 5868 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kppka_pctoindex (pw, pb, &a) && a == i); |
| 5869 | |
| 5870 | return; |
| 5871 | } |
| 5872 | |
| 5873 | |
| 5874 | static bool_tcxx . . $ bool_t# |
| 5875 | kppka_pctoindexcxx . . $ kppka_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 5876 | { |
| 5877 | enumcxx . . $ kppka_pctoindex(9bb041263e557a58).$anonymous_type_55# {BLOCK_Acxx . . $ kppka_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kppka_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kppka_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 5878 | index_tcxx . . $ index_t# pp_slice; |
| 5879 | index_tcxx . . $ index_t# i, j; |
| 5880 | |
| 5881 | SQUAREcxx . . $ SQUARE# anchor, loosen; |
| 5882 | |
| 5883 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 5884 | SQUAREcxx . . $ SQUARE# pawn_a = pw[1]; |
| 5885 | SQUAREcxx . . $ SQUARE# pawn_b = pw[2]; |
| 5886 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 5887 | SQUAREcxx . . $ SQUARE# ba = pb[1]; |
| 5888 | |
| 5889 | |
| 5890 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_a && pawn_a < A8); |
| 5891 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_b && pawn_b < A8); |
| 5892 | |
| 5893 | pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (pawn_a, pawn_b, &anchor, &loosen); |
| 5894 | |
| 5895 | if ((anchor & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 5896 | anchor = flipWEcxx . . $ flipWE(2141b656ce2cc063). (anchor); |
| 5897 | loosen = flipWEcxx . . $ flipWE(2141b656ce2cc063). (loosen); |
| 5898 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 5899 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 5900 | ba = flipWEcxx . . $ flipWE(2141b656ce2cc063). (ba); |
| 5901 | } |
| 5902 | |
| 5903 | i = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (anchor); |
| 5904 | j = wsq_to_pidx48cxx . . $ wsq_to_pidx48(4c679297bf94b9eb). (loosen); |
| 5905 | |
| 5906 | pp_slice = ppidxcxx . . $ ppidx. [i] [j]; |
| 5907 | |
| 5908 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(pp_slice)) { |
| 5909 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 5910 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5911 | } |
| 5912 | |
| 5913 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pp_slice < MAX_PPINDEX ); |
| 5914 | |
| 5915 | *out = pp_slice * (index_tcxx . . $ index_t#)BLOCK_Acxx . . $ kppka_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * (index_tcxx . . $ index_t#)BLOCK_Bcxx . . $ kppka_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * (index_tcxx . . $ index_t#)BLOCK_Ccxx . . $ kppka_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)ba; |
| 5916 | |
| 5917 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5918 | } |
| 5919 | |
| 5920 | /********************** end KPP/KA ************************************/ |
| 5921 | |
| 5922 | /********************** KAPP/K ************************************/ |
| 5923 | |
| 5924 | static bool_tcxx . . $ bool_t# test_kappkcxx . . $ test_kappk(b126dc7c1de90089). (void); |
| 5925 | static bool_tcxx . . $ bool_t# kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 5926 | static void kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 5927 | |
| 5928 | static bool_tcxx . . $ bool_t# |
| 5929 | test_kappkcxx . . $ test_kappk(b126dc7c1de90089). (void) |
| 5930 | { |
| 5931 | |
| 5932 | enumcxx . . $ test_kappk(b126dc7c1de90089).$anonymous_type_56# {MAXPCcxx . . $ test_kappk(b126dc7c1de90089).MAXPC. = 16+1}; |
| 5933 | char str[] = "kappk"; |
| 5934 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 5935 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kappk(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kappk(b126dc7c1de90089).MAXPC.]; |
| 5936 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kappk(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kappk(b126dc7c1de90089).MAXPC.]; |
| 5937 | |
| 5938 | index_tcxx . . $ index_t# i, j; |
| 5939 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 5940 | |
| 5941 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 5942 | |
| 5943 | for (a = 0; a < 64; a++) { |
| 5944 | for (b = 0; b < 64; b++) { |
| 5945 | for (c = 0; c < 64; c++) { |
| 5946 | for (d = 0; d < 64; d++) { |
| 5947 | for (e = 0; e < 64; e++) { |
| 5948 | |
| 5949 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 5950 | continue; |
| 5951 | if (b <= H1cxx . . $ H1. || b >= A8cxx . . $ A8.) |
| 5952 | continue; |
| 5953 | |
| 5954 | |
| 5955 | pw[0] = a; |
| 5956 | pw[1] = d; |
| 5957 | pw[2] = b; |
| 5958 | pw[3] = c; |
| 5959 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5960 | |
| 5961 | pb[0] = e; |
| 5962 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 5963 | |
| 5964 | if (kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 5965 | kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146). (i, px, py); |
| 5966 | kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58). (px, py, &j); |
| 5967 | if (i != j) { |
| 5968 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 5969 | } |
| 5970 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 5971 | } |
| 5972 | |
| 5973 | } |
| 5974 | } |
| 5975 | } |
| 5976 | } |
| 5977 | |
| 5978 | if ((a&1)==0) { |
| 5979 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 5980 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 5981 | } |
| 5982 | } |
| 5983 | |
| 5984 | if (err) |
| 5985 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 5986 | else |
| 5987 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 5988 | return !err; |
| 5989 | } |
| 5990 | |
| 5991 | |
| 5992 | static void |
| 5993 | kappk_indextopccxx . . $ kappk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 5994 | { |
| 5995 | /*---------------------------------------------------------* |
| 5996 | inverse work to make sure that the following is valid |
| 5997 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 5998 | *----------------------------------------------------------*/ |
| 5999 | |
| 6000 | enumcxx . . $ kappk_indextopc(21a38811104ee146).$anonymous_type_57# {BLOCK_Acxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 6001 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 6002 | index_tcxx . . $ index_t# m, n; |
| 6003 | |
| 6004 | r = i; |
| 6005 | a = r / BLOCK_Acxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_A.; |
| 6006 | r -= a * BLOCK_Acxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_A.; |
| 6007 | b = r / BLOCK_Bcxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_B.; |
| 6008 | r -= b * BLOCK_Bcxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_B.; |
| 6009 | c = r / BLOCK_Ccxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_C.; |
| 6010 | r -= c * BLOCK_Ccxx . . $ kappk_indextopc(21a38811104ee146).BLOCK_C.; |
| 6011 | d = r; |
| 6012 | |
| 6013 | m = pp_hi24cxx . . $ pp_hi24. [a]; |
| 6014 | n = pp_lo48cxx . . $ pp_lo48. [a]; |
| 6015 | |
| 6016 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 6017 | pw[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 6018 | pw[2] = pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427). (m); |
| 6019 | pw[3] = pidx48_to_wsqcxx . . $ pidx48_to_wsq(46cc46841198e427). (n); |
| 6020 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6021 | |
| 6022 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 6023 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6024 | |
| 6025 | |
| 6026 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[3] && pw[3] < A8); |
| 6027 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[2] && pw[2] < A8); |
| 6028 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kappk_pctoindex (pw, pb, &a) && a == i); |
| 6029 | |
| 6030 | return; |
| 6031 | } |
| 6032 | |
| 6033 | |
| 6034 | static bool_tcxx . . $ bool_t# |
| 6035 | kappk_pctoindexcxx . . $ kappk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 6036 | { |
| 6037 | enumcxx . . $ kappk_pctoindex(9bb041263e557a58).$anonymous_type_58# {BLOCK_Acxx . . $ kappk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kappk_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kappk_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 6038 | index_tcxx . . $ index_t# pp_slice; |
| 6039 | SQUAREcxx . . $ SQUARE# anchor, loosen; |
| 6040 | |
| 6041 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 6042 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 6043 | SQUAREcxx . . $ SQUARE# pawn_a = pw[2]; |
| 6044 | SQUAREcxx . . $ SQUARE# pawn_b = pw[3]; |
| 6045 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 6046 | |
| 6047 | index_tcxx . . $ index_t# i, j; |
| 6048 | |
| 6049 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_a && pawn_a < A8); |
| 6050 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_b && pawn_b < A8); |
| 6051 | |
| 6052 | pp_putanchorfirstcxx . . $ pp_putanchorfirst(174f9aab2dec3bcb). (pawn_a, pawn_b, &anchor, &loosen); |
| 6053 | |
| 6054 | if ((anchor & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 6055 | anchor = flipWEcxx . . $ flipWE(2141b656ce2cc063). (anchor); |
| 6056 | loosen = flipWEcxx . . $ flipWE(2141b656ce2cc063). (loosen); |
| 6057 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 6058 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 6059 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 6060 | } |
| 6061 | |
| 6062 | i = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (anchor); |
| 6063 | j = wsq_to_pidx48cxx . . $ wsq_to_pidx48(4c679297bf94b9eb). (loosen); |
| 6064 | |
| 6065 | pp_slice = ppidxcxx . . $ ppidx. [i] [j]; |
| 6066 | |
| 6067 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(pp_slice)) { |
| 6068 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 6069 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6070 | } |
| 6071 | |
| 6072 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pp_slice < MAX_PPINDEX ); |
| 6073 | |
| 6074 | *out = pp_slice * (index_tcxx . . $ index_t#)BLOCK_Acxx . . $ kappk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * (index_tcxx . . $ index_t#)BLOCK_Bcxx . . $ kappk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * (index_tcxx . . $ index_t#)BLOCK_Ccxx . . $ kappk_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)wa; |
| 6075 | |
| 6076 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6077 | } |
| 6078 | |
| 6079 | /********************** end KAPP/K ************************************/ |
| 6080 | |
| 6081 | /********************** KAPP/K ************************************/ |
| 6082 | |
| 6083 | static bool_tcxx . . $ bool_t# test_kapkpcxx . . $ test_kapkp(b126dc7c1de90089). (void); |
| 6084 | static bool_tcxx . . $ bool_t# kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 6085 | static void kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 6086 | |
| 6087 | static bool_tcxx . . $ bool_t# |
| 6088 | test_kapkpcxx . . $ test_kapkp(b126dc7c1de90089). (void) |
| 6089 | { |
| 6090 | |
| 6091 | enumcxx . . $ test_kapkp(b126dc7c1de90089).$anonymous_type_59# {MAXPCcxx . . $ test_kapkp(b126dc7c1de90089).MAXPC. = 16+1}; |
| 6092 | char str[] = "kapkp"; |
| 6093 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 6094 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kapkp(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kapkp(b126dc7c1de90089).MAXPC.]; |
| 6095 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kapkp(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kapkp(b126dc7c1de90089).MAXPC.]; |
| 6096 | |
| 6097 | index_tcxx . . $ index_t# i, j; |
| 6098 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6099 | |
| 6100 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 6101 | |
| 6102 | for (a = 0; a < 64; a++) { |
| 6103 | for (b = 0; b < 64; b++) { |
| 6104 | for (c = 0; c < 64; c++) { |
| 6105 | for (d = 0; d < 64; d++) { |
| 6106 | for (e = 0; e < 64; e++) { |
| 6107 | |
| 6108 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 6109 | continue; |
| 6110 | if (b <= H1cxx . . $ H1. || b >= A8cxx . . $ A8.) |
| 6111 | continue; |
| 6112 | |
| 6113 | |
| 6114 | pw[0] = a; |
| 6115 | pw[1] = d; |
| 6116 | pw[2] = b; |
| 6117 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6118 | |
| 6119 | pb[0] = e; |
| 6120 | pb[1] = c; |
| 6121 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6122 | |
| 6123 | if (kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 6124 | kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146). (i, px, py); |
| 6125 | kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58). (px, py, &j); |
| 6126 | if (i != j) { |
| 6127 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6128 | } |
| 6129 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 6130 | } |
| 6131 | |
| 6132 | } |
| 6133 | } |
| 6134 | } |
| 6135 | } |
| 6136 | |
| 6137 | if ((a&1)==0) { |
| 6138 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 6139 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 6140 | } |
| 6141 | } |
| 6142 | |
| 6143 | if (err) |
| 6144 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 6145 | else |
| 6146 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 6147 | return !err; |
| 6148 | } |
| 6149 | |
| 6150 | |
| 6151 | static bool_tcxx . . $ bool_t# |
| 6152 | kapkp_pctoindexcxx . . $ kapkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 6153 | { |
| 6154 | enumcxx . . $ kapkp_pctoindex(9bb041263e557a58).$anonymous_type_60# {BLOCK_Acxx . . $ kapkp_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kapkp_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kapkp_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 6155 | index_tcxx . . $ index_t# pp_slice; |
| 6156 | SQUAREcxx . . $ SQUARE# anchor, loosen; |
| 6157 | |
| 6158 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 6159 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 6160 | SQUAREcxx . . $ SQUARE# pawn_a = pw[2]; |
| 6161 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 6162 | SQUAREcxx . . $ SQUARE# pawn_b = pb[1]; |
| 6163 | index_tcxx . . $ index_t# m, n; |
| 6164 | |
| 6165 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_a && pawn_a < A8); |
| 6166 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_b && pawn_b < A8); |
| 6167 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pw[3] == NOSQUARE && pb[2] == NOSQUARE); |
| 6168 | |
| 6169 | anchor = pawn_a; |
| 6170 | loosen = pawn_b; |
| 6171 | |
| 6172 | if ((anchor & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 6173 | anchor = flipWEcxx . . $ flipWE(2141b656ce2cc063). (anchor); |
| 6174 | loosen = flipWEcxx . . $ flipWE(2141b656ce2cc063). (loosen); |
| 6175 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 6176 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 6177 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 6178 | } |
| 6179 | |
| 6180 | m = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (anchor); |
| 6181 | n = (index_tcxx . . $ index_t#)loosen - 8; |
| 6182 | |
| 6183 | pp_slice = m * 48 + n; |
| 6184 | |
| 6185 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(pp_slice)) { |
| 6186 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 6187 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6188 | } |
| 6189 | |
| 6190 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pp_slice < (64*MAX_PpINDEX) ); |
| 6191 | |
| 6192 | *out = pp_slice * (index_tcxx . . $ index_t#)BLOCK_Acxx . . $ kapkp_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * (index_tcxx . . $ index_t#)BLOCK_Bcxx . . $ kapkp_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * (index_tcxx . . $ index_t#)BLOCK_Ccxx . . $ kapkp_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)wa; |
| 6193 | |
| 6194 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6195 | } |
| 6196 | |
| 6197 | static void |
| 6198 | kapkp_indextopccxx . . $ kapkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 6199 | { |
| 6200 | /*---------------------------------------------------------* |
| 6201 | inverse work to make sure that the following is valid |
| 6202 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 6203 | *----------------------------------------------------------*/ |
| 6204 | enumcxx . . $ kapkp_indextopc(21a38811104ee146).$anonymous_type_61# {BLOCK_Acxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64, BLOCK_Bcxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 6205 | enumcxx . . $ kapkp_indextopc(21a38811104ee146).$anonymous_type_62# {block_mcxx . . $ kapkp_indextopc(21a38811104ee146).block_m. = 48}; |
| 6206 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 6207 | index_tcxx . . $ index_t# m, n; |
| 6208 | SQUAREcxx . . $ SQUARE# sq_m, sq_n; |
| 6209 | |
| 6210 | r = i; |
| 6211 | a = r / BLOCK_Acxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 6212 | r -= a * BLOCK_Acxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 6213 | b = r / BLOCK_Bcxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 6214 | r -= b * BLOCK_Bcxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 6215 | c = r / BLOCK_Ccxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_C.; |
| 6216 | r -= c * BLOCK_Ccxx . . $ kapkp_indextopc(21a38811104ee146).BLOCK_C.; |
| 6217 | d = r; |
| 6218 | |
| 6219 | /* unpack a, which is pslice, into m and n */ |
| 6220 | r = a; |
| 6221 | m = r / block_mcxx . . $ kapkp_indextopc(21a38811104ee146).block_m.; |
| 6222 | r -= m * block_mcxx . . $ kapkp_indextopc(21a38811104ee146).block_m.; |
| 6223 | n = r ; |
| 6224 | |
| 6225 | sq_m = pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427). (m); |
| 6226 | sq_n = (SQUAREcxx . . $ SQUARE#) n + 8; |
| 6227 | |
| 6228 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 6229 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 6230 | pw[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 6231 | pw[2] = sq_m; |
| 6232 | pb[1] = sq_n; |
| 6233 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6234 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6235 | |
| 6236 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= sq_m && sq_m < A8); |
| 6237 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= sq_n && sq_n < A8); |
| 6238 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kapkp_pctoindex (pw, pb, &a) && a == i); |
| 6239 | |
| 6240 | return; |
| 6241 | } |
| 6242 | |
| 6243 | /********************** end KAP/KP ************************************/ |
| 6244 | |
| 6245 | /********************** KABP/K ************************************/ |
| 6246 | |
| 6247 | static bool_tcxx . . $ bool_t# test_kabpkcxx . . $ test_kabpk(b126dc7c1de90089). (void); |
| 6248 | static bool_tcxx . . $ bool_t# kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 6249 | static void kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 6250 | |
| 6251 | static bool_tcxx . . $ bool_t# |
| 6252 | test_kabpkcxx . . $ test_kabpk(b126dc7c1de90089). (void) |
| 6253 | { |
| 6254 | |
| 6255 | enumcxx . . $ test_kabpk(b126dc7c1de90089).$anonymous_type_63# {MAXPCcxx . . $ test_kabpk(b126dc7c1de90089).MAXPC. = 16+1}; |
| 6256 | char str[] = "kabpk"; |
| 6257 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 6258 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kabpk(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kabpk(b126dc7c1de90089).MAXPC.]; |
| 6259 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kabpk(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kabpk(b126dc7c1de90089).MAXPC.]; |
| 6260 | |
| 6261 | index_tcxx . . $ index_t# i, j; |
| 6262 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6263 | |
| 6264 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 6265 | |
| 6266 | for (a = 0; a < 64; a++) { |
| 6267 | for (b = 0; b < 64; b++) { |
| 6268 | for (c = 0; c < 64; c++) { |
| 6269 | for (d = 0; d < 64; d++) { |
| 6270 | for (e = 0; e < 64; e++) { |
| 6271 | |
| 6272 | if (d <= H1cxx . . $ H1. || d >= A8cxx . . $ A8.) |
| 6273 | continue; |
| 6274 | |
| 6275 | pw[0] = a; |
| 6276 | pw[1] = b; |
| 6277 | pw[2] = c; |
| 6278 | pw[3] = d; |
| 6279 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6280 | |
| 6281 | pb[0] = e; |
| 6282 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6283 | |
| 6284 | if (kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 6285 | kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146). (i, px, py); |
| 6286 | kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58). (px, py, &j); |
| 6287 | if (i != j) { |
| 6288 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6289 | } |
| 6290 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 6291 | } |
| 6292 | |
| 6293 | } |
| 6294 | } |
| 6295 | } |
| 6296 | } |
| 6297 | |
| 6298 | if ((a&1)==0) { |
| 6299 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 6300 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 6301 | } |
| 6302 | } |
| 6303 | |
| 6304 | if (err) |
| 6305 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 6306 | else |
| 6307 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 6308 | return !err; |
| 6309 | } |
| 6310 | |
| 6311 | |
| 6312 | static void |
| 6313 | kabpk_indextopccxx . . $ kabpk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 6314 | { |
| 6315 | |
| 6316 | /*---------------------------------------------------------* |
| 6317 | inverse work to make sure that the following is valid |
| 6318 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d * BLOCK_D + e; |
| 6319 | *----------------------------------------------------------*/ |
| 6320 | enumcxx . . $ kabpk_indextopc(21a38811104ee146).$anonymous_type_64# {BLOCK_Acxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_A. = 64*64*64*64, BLOCK_Bcxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_B. = 64*64*64, BLOCK_Ccxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_C. = 64*64, BLOCK_Dcxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_D. = 64}; |
| 6321 | index_tcxx . . $ index_t# a, b, c, d, e, r; |
| 6322 | SQUAREcxx . . $ SQUARE# x; |
| 6323 | |
| 6324 | r = i; |
| 6325 | a = r / BLOCK_Acxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_A.; |
| 6326 | r -= a * BLOCK_Acxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_A.; |
| 6327 | b = r / BLOCK_Bcxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_B.; |
| 6328 | r -= b * BLOCK_Bcxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_B.; |
| 6329 | c = r / BLOCK_Ccxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_C.; |
| 6330 | r -= c * BLOCK_Ccxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_C.; |
| 6331 | d = r / BLOCK_Dcxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_D.; |
| 6332 | r -= d * BLOCK_Dcxx . . $ kabpk_indextopc(21a38811104ee146).BLOCK_D.; |
| 6333 | e = r; |
| 6334 | |
| 6335 | x = pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427).(a); |
| 6336 | |
| 6337 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 6338 | pw[1] = (SQUAREcxx . . $ SQUARE#) d; |
| 6339 | pw[2] = (SQUAREcxx . . $ SQUARE#) e; |
| 6340 | pw[3] = x; |
| 6341 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6342 | |
| 6343 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 6344 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6345 | |
| 6346 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kabpk_pctoindex (pw, pb, &a) && a == i); |
| 6347 | |
| 6348 | return; |
| 6349 | } |
| 6350 | |
| 6351 | |
| 6352 | static bool_tcxx . . $ bool_t# |
| 6353 | kabpk_pctoindexcxx . . $ kabpk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 6354 | { |
| 6355 | enumcxx . . $ kabpk_pctoindex(9bb041263e557a58).$anonymous_type_65# {BLOCK_Acxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64*64*64, BLOCK_Bcxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64*64, BLOCK_Ccxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_C. = 64*64, BLOCK_Dcxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_D. = 64}; |
| 6356 | index_tcxx . . $ index_t# pslice; |
| 6357 | |
| 6358 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 6359 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 6360 | SQUAREcxx . . $ SQUARE# wb = pw[2]; |
| 6361 | SQUAREcxx . . $ SQUARE# pawn = pw[3]; |
| 6362 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 6363 | |
| 6364 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 6365 | |
| 6366 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 6367 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 6368 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 6369 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 6370 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 6371 | wb = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wb); |
| 6372 | } |
| 6373 | |
| 6374 | pslice = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (pawn); |
| 6375 | |
| 6376 | *out = pslice * (index_tcxx . . $ index_t#)BLOCK_Acxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * (index_tcxx . . $ index_t#)BLOCK_Bcxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * (index_tcxx . . $ index_t#)BLOCK_Ccxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)wa * (index_tcxx . . $ index_t#)BLOCK_Dcxx . . $ kabpk_pctoindex(9bb041263e557a58).BLOCK_D. + (index_tcxx . . $ index_t#)wb; |
| 6377 | |
| 6378 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6379 | } |
| 6380 | |
| 6381 | /********************** end KABP/K ************************************/ |
| 6382 | |
| 6383 | /********************** KAAP/K ************************************/ |
| 6384 | |
| 6385 | static bool_tcxx . . $ bool_t# test_kaapkcxx . . $ test_kaapk(b126dc7c1de90089). (void); |
| 6386 | static bool_tcxx . . $ bool_t# kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 6387 | static void kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 6388 | |
| 6389 | static bool_tcxx . . $ bool_t# |
| 6390 | test_kaapkcxx . . $ test_kaapk(b126dc7c1de90089). (void) |
| 6391 | { |
| 6392 | |
| 6393 | enumcxx . . $ test_kaapk(b126dc7c1de90089).$anonymous_type_66# {MAXPCcxx . . $ test_kaapk(b126dc7c1de90089).MAXPC. = 16+1}; |
| 6394 | char str[] = "kaapk"; |
| 6395 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 6396 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kaapk(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kaapk(b126dc7c1de90089).MAXPC.]; |
| 6397 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kaapk(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kaapk(b126dc7c1de90089).MAXPC.]; |
| 6398 | |
| 6399 | index_tcxx . . $ index_t# i, j; |
| 6400 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6401 | |
| 6402 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 6403 | |
| 6404 | for (a = 0; a < 64; a++) { |
| 6405 | for (b = 0; b < 64; b++) { |
| 6406 | for (c = 0; c < 64; c++) { |
| 6407 | for (d = 0; d < 64; d++) { |
| 6408 | for (e = 0; e < 64; e++) { |
| 6409 | |
| 6410 | if (d <= H1cxx . . $ H1. || d >= A8cxx . . $ A8.) |
| 6411 | continue; |
| 6412 | |
| 6413 | pw[0] = a; |
| 6414 | pw[1] = b; |
| 6415 | pw[2] = c; |
| 6416 | pw[3] = d; |
| 6417 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6418 | |
| 6419 | pb[0] = e; |
| 6420 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6421 | |
| 6422 | if (kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 6423 | kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146). (i, px, py); |
| 6424 | kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58). (px, py, &j); |
| 6425 | if (i != j) { |
| 6426 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6427 | } |
| 6428 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 6429 | } |
| 6430 | |
| 6431 | } |
| 6432 | } |
| 6433 | } |
| 6434 | } |
| 6435 | |
| 6436 | if ((a&1)==0) { |
| 6437 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 6438 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 6439 | } |
| 6440 | } |
| 6441 | |
| 6442 | if (err) |
| 6443 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 6444 | else |
| 6445 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 6446 | return !err; |
| 6447 | } |
| 6448 | |
| 6449 | |
| 6450 | static void |
| 6451 | kaapk_indextopccxx . . $ kaapk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 6452 | { |
| 6453 | /*---------------------------------------------------------* |
| 6454 | inverse work to make sure that the following is valid |
| 6455 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 6456 | *----------------------------------------------------------*/ |
| 6457 | enumcxx . . $ kaapk_indextopc(21a38811104ee146).$anonymous_type_67# {BLOCK_Ccxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_C. = MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 6458 | ,BLOCK_Bcxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_B. = 64*BLOCK_Ccxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_C. |
| 6459 | ,BLOCK_Acxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_A. = 64*BLOCK_Bcxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_B. |
| 6460 | }; |
| 6461 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 6462 | index_tcxx . . $ index_t# x, y, z; |
| 6463 | |
| 6464 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i >= 0); |
| 6465 | |
| 6466 | r = i; |
| 6467 | a = r / BLOCK_Acxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_A.; |
| 6468 | r -= a * BLOCK_Acxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_A.; |
| 6469 | b = r / BLOCK_Bcxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_B.; |
| 6470 | r -= b * BLOCK_Bcxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_B.; |
| 6471 | c = r / BLOCK_Ccxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_C.; |
| 6472 | r -= c * BLOCK_Ccxx . . $ kaapk_indextopc(21a38811104ee146).BLOCK_C.; |
| 6473 | d = r; |
| 6474 | |
| 6475 | z = (index_tcxx . . $ index_t#) pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427).(a); |
| 6476 | |
| 6477 | /* split d into x, y*/ |
| 6478 | x = aabasecxx . . $ aabase. [d]; |
| 6479 | y = (d + 1) + x - (x * (127-x)/2); |
| 6480 | |
| 6481 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (aaidx[x][y] == aaidx[y][x]); |
| 6482 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (aaidx[x][y] == d); |
| 6483 | |
| 6484 | |
| 6485 | pw[0] = (SQUAREcxx . . $ SQUARE#) b; |
| 6486 | pw[1] = (SQUAREcxx . . $ SQUARE#) x; |
| 6487 | pw[2] = (SQUAREcxx . . $ SQUARE#) y; |
| 6488 | pw[3] = (SQUAREcxx . . $ SQUARE#) z; |
| 6489 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6490 | |
| 6491 | pb[0] = (SQUAREcxx . . $ SQUARE#) c; |
| 6492 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6493 | |
| 6494 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kaapk_pctoindex (pw, pb, &a) && a == i); |
| 6495 | |
| 6496 | return; |
| 6497 | } |
| 6498 | |
| 6499 | |
| 6500 | static bool_tcxx . . $ bool_t# |
| 6501 | kaapk_pctoindexcxx . . $ kaapk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 6502 | { |
| 6503 | enumcxx . . $ kaapk_pctoindex(9bb041263e557a58).$anonymous_type_68# {BLOCK_Ccxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_C. = MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 6504 | ,BLOCK_Bcxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_B. = 64*BLOCK_Ccxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_C. |
| 6505 | ,BLOCK_Acxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*BLOCK_Bcxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_B. |
| 6506 | }; |
| 6507 | index_tcxx . . $ index_t# aa_combo, pslice; |
| 6508 | |
| 6509 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 6510 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 6511 | SQUAREcxx . . $ SQUARE# wa2 = pw[2]; |
| 6512 | SQUAREcxx . . $ SQUARE# pawn = pw[3]; |
| 6513 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 6514 | |
| 6515 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 6516 | |
| 6517 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 6518 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 6519 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 6520 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 6521 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 6522 | wa2 = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa2); |
| 6523 | } |
| 6524 | |
| 6525 | pslice = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (pawn); |
| 6526 | |
| 6527 | aa_combo = (index_tcxx . . $ index_t#) aaidxcxx . . $ aaidx. [wa] [wa2]; |
| 6528 | |
| 6529 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(aa_combo)) { |
| 6530 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 6531 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6532 | } |
| 6533 | |
| 6534 | *out = pslice * (index_tcxx . . $ index_t#)BLOCK_Acxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * (index_tcxx . . $ index_t#)BLOCK_Bcxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * (index_tcxx . . $ index_t#)BLOCK_Ccxx . . $ kaapk_pctoindex(9bb041263e557a58).BLOCK_C. + aa_combo; |
| 6535 | |
| 6536 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (*out >= 0); |
| 6537 | |
| 6538 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6539 | } |
| 6540 | |
| 6541 | /********************** end KAAP/K ************************************/ |
| 6542 | |
| 6543 | /********************** KAA/KP ************************************/ |
| 6544 | |
| 6545 | static bool_tcxx . . $ bool_t# test_kaakpcxx . . $ test_kaakp(b126dc7c1de90089). (void); |
| 6546 | static bool_tcxx . . $ bool_t# kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 6547 | static void kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 6548 | |
| 6549 | static bool_tcxx . . $ bool_t# |
| 6550 | test_kaakpcxx . . $ test_kaakp(b126dc7c1de90089). (void) |
| 6551 | { |
| 6552 | |
| 6553 | enumcxx . . $ test_kaakp(b126dc7c1de90089).$anonymous_type_69# {MAXPCcxx . . $ test_kaakp(b126dc7c1de90089).MAXPC. = 16+1}; |
| 6554 | char str[] = "kaakp"; |
| 6555 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 6556 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kaakp(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kaakp(b126dc7c1de90089).MAXPC.]; |
| 6557 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kaakp(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kaakp(b126dc7c1de90089).MAXPC.]; |
| 6558 | |
| 6559 | index_tcxx . . $ index_t# i, j; |
| 6560 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6561 | |
| 6562 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 6563 | |
| 6564 | for (a = 0; a < 64; a++) { |
| 6565 | for (b = 0; b < 64; b++) { |
| 6566 | for (c = 0; c < 64; c++) { |
| 6567 | for (d = 0; d < 64; d++) { |
| 6568 | for (e = 0; e < 64; e++) { |
| 6569 | |
| 6570 | if (d <= H1cxx . . $ H1. || d >= A8cxx . . $ A8.) |
| 6571 | continue; |
| 6572 | |
| 6573 | pw[0] = a; |
| 6574 | pw[1] = b; |
| 6575 | pw[2] = c; |
| 6576 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6577 | |
| 6578 | pb[0] = e; |
| 6579 | pb[1] = d; |
| 6580 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6581 | |
| 6582 | if (kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 6583 | kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146). (i, px, py); |
| 6584 | kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58). (px, py, &j); |
| 6585 | if (i != j) { |
| 6586 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6587 | } |
| 6588 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 6589 | } |
| 6590 | |
| 6591 | } |
| 6592 | } |
| 6593 | } |
| 6594 | } |
| 6595 | |
| 6596 | if ((a&1)==0) { |
| 6597 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 6598 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 6599 | } |
| 6600 | } |
| 6601 | |
| 6602 | if (err) |
| 6603 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 6604 | else |
| 6605 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 6606 | return !err; |
| 6607 | } |
| 6608 | |
| 6609 | |
| 6610 | static void |
| 6611 | kaakp_indextopccxx . . $ kaakp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 6612 | { |
| 6613 | /*---------------------------------------------------------* |
| 6614 | inverse work to make sure that the following is valid |
| 6615 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 6616 | *----------------------------------------------------------*/ |
| 6617 | enumcxx . . $ kaakp_indextopc(21a38811104ee146).$anonymous_type_70# {BLOCK_Ccxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_C. = MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 6618 | ,BLOCK_Bcxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_B. = 64*BLOCK_Ccxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_C. |
| 6619 | ,BLOCK_Acxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_A. = 64*BLOCK_Bcxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_B. |
| 6620 | }; |
| 6621 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 6622 | index_tcxx . . $ index_t# x, y, z; |
| 6623 | SQUAREcxx . . $ SQUARE# zq; |
| 6624 | |
| 6625 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i >= 0); |
| 6626 | |
| 6627 | r = i; |
| 6628 | a = r / BLOCK_Acxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_A.; |
| 6629 | r -= a * BLOCK_Acxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_A.; |
| 6630 | b = r / BLOCK_Bcxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_B.; |
| 6631 | r -= b * BLOCK_Bcxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_B.; |
| 6632 | c = r / BLOCK_Ccxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_C.; |
| 6633 | r -= c * BLOCK_Ccxx . . $ kaakp_indextopc(21a38811104ee146).BLOCK_C.; |
| 6634 | d = r; |
| 6635 | |
| 6636 | zq = pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427).(a); |
| 6637 | z = (index_tcxx . . $ index_t#)flipNScxx . . $ flipNS(2141b656ce2cc063).(zq); |
| 6638 | |
| 6639 | |
| 6640 | /* split d into x, y*/ |
| 6641 | x = aabasecxx . . $ aabase. [d]; |
| 6642 | y = (d + 1) + x - (x * (127-x)/2); |
| 6643 | |
| 6644 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (aaidx[x][y] == aaidx[y][x]); |
| 6645 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (aaidx[x][y] == d); |
| 6646 | |
| 6647 | |
| 6648 | pw[0] = (SQUAREcxx . . $ SQUARE#)b; |
| 6649 | pw[1] = (SQUAREcxx . . $ SQUARE#)x; |
| 6650 | pw[2] = (SQUAREcxx . . $ SQUARE#)y; |
| 6651 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6652 | |
| 6653 | pb[0] = (SQUAREcxx . . $ SQUARE#)c; |
| 6654 | pb[1] = (SQUAREcxx . . $ SQUARE#)z; |
| 6655 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6656 | |
| 6657 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kaakp_pctoindex (pw, pb, &a) && a == i); |
| 6658 | |
| 6659 | return; |
| 6660 | } |
| 6661 | |
| 6662 | |
| 6663 | static bool_tcxx . . $ bool_t# |
| 6664 | kaakp_pctoindexcxx . . $ kaakp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 6665 | { |
| 6666 | enumcxx . . $ kaakp_pctoindex(9bb041263e557a58).$anonymous_type_71# {BLOCK_Ccxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_C. = MAX_AAINDEXcxx . . $ `gtb-probe.c:437:9`! |
| 6667 | ,BLOCK_Bcxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_B. = 64*BLOCK_Ccxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_C. |
| 6668 | ,BLOCK_Acxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_A. = 64*BLOCK_Bcxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_B. |
| 6669 | }; |
| 6670 | index_tcxx . . $ index_t# aa_combo, pslice; |
| 6671 | |
| 6672 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 6673 | SQUAREcxx . . $ SQUARE# wa = pw[1]; |
| 6674 | SQUAREcxx . . $ SQUARE# wa2 = pw[2]; |
| 6675 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 6676 | SQUAREcxx . . $ SQUARE# pawn = pb[1]; |
| 6677 | |
| 6678 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn && pawn < A8); |
| 6679 | |
| 6680 | if ((pawn & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 6681 | pawn = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn); |
| 6682 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 6683 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 6684 | wa = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa); |
| 6685 | wa2 = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wa2); |
| 6686 | } |
| 6687 | |
| 6688 | pawn = flipNScxx . . $ flipNS(2141b656ce2cc063).(pawn); |
| 6689 | pslice = wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (pawn); |
| 6690 | |
| 6691 | aa_combo = (index_tcxx . . $ index_t#)aaidxcxx . . $ aaidx. [wa] [wa2]; |
| 6692 | |
| 6693 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(aa_combo)) { |
| 6694 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 6695 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6696 | } |
| 6697 | |
| 6698 | *out = pslice * (index_tcxx . . $ index_t#)BLOCK_Acxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * (index_tcxx . . $ index_t#)BLOCK_Bcxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk * (index_tcxx . . $ index_t#)BLOCK_Ccxx . . $ kaakp_pctoindex(9bb041263e557a58).BLOCK_C. + aa_combo; |
| 6699 | |
| 6700 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (*out >= 0); |
| 6701 | |
| 6702 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6703 | } |
| 6704 | |
| 6705 | /********************** end KAA/KP ************************************/ |
| 6706 | |
| 6707 | /********************** KPP/KP ************************************/ |
| 6708 | /* |
| 6709 | index_t pp48_idx[48][48]; |
| 6710 | sq_t pp48_sq_x[MAX_PP48_INDEX]; |
| 6711 | sq_t pp48_sq_y[MAX_PP48_INDEX]; |
| 6712 | */ |
| 6713 | static bool_tcxx . . $ bool_t# test_kppkpcxx . . $ test_kppkp(b126dc7c1de90089). (void); |
| 6714 | static bool_tcxx . . $ bool_t# kppkp_pctoindexcxx . . $ kppkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 6715 | static void kppkp_indextopccxx . . $ kppkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 6716 | |
| 6717 | static sq_tcxx . . $ sq_t# map24_bcxx . . $ map24_b(2141b656ce2cc063). (sq_tcxx . . $ sq_t# s); |
| 6718 | static sq_tcxx . . $ sq_t# unmap24_bcxx . . $ unmap24_b(46cc46841198e427). (index_tcxx . . $ index_t# i); |
| 6719 | |
| 6720 | static index_tcxx . . $ index_t# |
| 6721 | init_pp48_idxcxx . . $ init_pp48_idx(b126dc7c1de90089). (void) |
| 6722 | /* modifies pp48_idx[][], pp48_sq_x[], pp48_sq_y[] */ |
| 6723 | { |
| 6724 | enumcxx . . $ init_pp48_idx(b126dc7c1de90089).$anonymous_type_72# {MAX_Icxx . . $ init_pp48_idx(b126dc7c1de90089).MAX_I. = 48, MAX_Jcxx . . $ init_pp48_idx(b126dc7c1de90089).MAX_J. = 48}; |
| 6725 | SQUAREcxx . . $ SQUARE# i, j; |
| 6726 | index_tcxx . . $ index_t# idx = 0; |
| 6727 | SQUAREcxx . . $ SQUARE# a, b; |
| 6728 | |
| 6729 | /* default is noindex */ |
| 6730 | for (i = 0; i < MAX_Icxx . . $ init_pp48_idx(b126dc7c1de90089).MAX_I.; i++) { |
| 6731 | for (j = 0; j < MAX_Jcxx . . $ init_pp48_idx(b126dc7c1de90089).MAX_J.; j++) { |
| 6732 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`! (pp48_idx [i][j]); |
| 6733 | } |
| 6734 | } |
| 6735 | |
| 6736 | for (idx = 0; idx < MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`!; idx++) { |
| 6737 | pp48_sq_xcxx . . $ pp48_sq_x. [idx] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6738 | pp48_sq_ycxx . . $ pp48_sq_y. [idx] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6739 | } |
| 6740 | |
| 6741 | idx = 0; |
| 6742 | for (a = H7cxx . . $ H7.; a >= A2cxx . . $ A2.; a--) { |
| 6743 | |
| 6744 | for (b = a - 1; b >= A2cxx . . $ A2.; b--) { |
| 6745 | |
| 6746 | i = flipWEcxx . . $ flipWE(2141b656ce2cc063).( flipNScxx . . $ flipNS(2141b656ce2cc063). (a) ) - 8; |
| 6747 | j = flipWEcxx . . $ flipWE(2141b656ce2cc063).( flipNScxx . . $ flipNS(2141b656ce2cc063). (b) ) - 8; |
| 6748 | |
| 6749 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(pp48_idx [i] [j])) { |
| 6750 | |
| 6751 | pp48_idxcxx . . $ pp48_idx. [i][j]= idx; assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx < MAX_PP48_INDEX); |
| 6752 | pp48_idxcxx . . $ pp48_idx. [j][i]= idx; |
| 6753 | pp48_sq_xcxx . . $ pp48_sq_x. [idx] = i; assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i < MAX_I); |
| 6754 | pp48_sq_ycxx . . $ pp48_sq_y. [idx] = j; assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (j < MAX_J); |
| 6755 | idx++; |
| 6756 | } |
| 6757 | } |
| 6758 | } |
| 6759 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (idx == MAX_PP48_INDEX); |
| 6760 | return idx; |
| 6761 | } |
| 6762 | |
| 6763 | |
| 6764 | |
| 6765 | static bool_tcxx . . $ bool_t# |
| 6766 | test_kppkpcxx . . $ test_kppkp(b126dc7c1de90089). (void) |
| 6767 | { |
| 6768 | |
| 6769 | enumcxx . . $ test_kppkp(b126dc7c1de90089).$anonymous_type_73# {MAXPCcxx . . $ test_kppkp(b126dc7c1de90089).MAXPC. = 16+1}; |
| 6770 | char str[] = "kppkp"; |
| 6771 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 6772 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kppkp(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kppkp(b126dc7c1de90089).MAXPC.]; |
| 6773 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kppkp(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kppkp(b126dc7c1de90089).MAXPC.]; |
| 6774 | |
| 6775 | index_tcxx . . $ index_t# i, j; |
| 6776 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6777 | |
| 6778 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 6779 | |
| 6780 | for (a = 0; a < 64; a++) { |
| 6781 | for (b = 0; b < 64; b++) { |
| 6782 | for (c = 0; c < 64; c++) { |
| 6783 | for (d = 0; d < 64; d++) { |
| 6784 | for (e = 0; e < 64; e++) { |
| 6785 | |
| 6786 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 6787 | continue; |
| 6788 | if (b <= H1cxx . . $ H1. || b >= A8cxx . . $ A8.) |
| 6789 | continue; |
| 6790 | if (d <= H1cxx . . $ H1. || d >= A8cxx . . $ A8.) |
| 6791 | continue; |
| 6792 | |
| 6793 | pw[0] = a; |
| 6794 | pw[1] = b; |
| 6795 | pw[2] = c; |
| 6796 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6797 | |
| 6798 | pb[0] = e; |
| 6799 | pb[1] = d; |
| 6800 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6801 | |
| 6802 | if (kppkp_pctoindexcxx . . $ kppkp_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 6803 | kppkp_indextopccxx . . $ kppkp_indextopc(21a38811104ee146). (i, px, py); |
| 6804 | kppkp_pctoindexcxx . . $ kppkp_pctoindex(9bb041263e557a58). (px, py, &j); |
| 6805 | if (i != j) { |
| 6806 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6807 | } |
| 6808 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 6809 | } |
| 6810 | |
| 6811 | } |
| 6812 | } |
| 6813 | } |
| 6814 | } |
| 6815 | |
| 6816 | if ((a&1)==0) { |
| 6817 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 6818 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 6819 | } |
| 6820 | } |
| 6821 | |
| 6822 | if (err) |
| 6823 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 6824 | else |
| 6825 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 6826 | return !err; |
| 6827 | } |
| 6828 | |
| 6829 | |
| 6830 | static void |
| 6831 | kppkp_indextopccxx . . $ kppkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 6832 | { |
| 6833 | /*---------------------------------------------------------* |
| 6834 | inverse work to make sure that the following is valid |
| 6835 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 6836 | *----------------------------------------------------------*/ |
| 6837 | |
| 6838 | enumcxx . . $ kppkp_indextopc(21a38811104ee146).$anonymous_type_74# {BLOCK_Acxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_A. = MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`!*64*64, BLOCK_Bcxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_C. = 64}; |
| 6839 | index_tcxx . . $ index_t# a, b, c, d, r; |
| 6840 | SQUAREcxx . . $ SQUARE# m, n; |
| 6841 | |
| 6842 | r = i; |
| 6843 | a = r / BLOCK_Acxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 6844 | r -= a * BLOCK_Acxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 6845 | b = r / BLOCK_Bcxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 6846 | r -= b * BLOCK_Bcxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 6847 | c = r / BLOCK_Ccxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_C.; |
| 6848 | r -= c * BLOCK_Ccxx . . $ kppkp_indextopc(21a38811104ee146).BLOCK_C.; |
| 6849 | d = r; |
| 6850 | |
| 6851 | m = pp48_sq_xcxx . . $ pp48_sq_x. [b]; |
| 6852 | n = pp48_sq_ycxx . . $ pp48_sq_y. [b]; |
| 6853 | |
| 6854 | pw[0] = (SQUAREcxx . . $ SQUARE#)c; |
| 6855 | pw[1] = flipWEcxx . . $ flipWE(2141b656ce2cc063).(flipNScxx . . $ flipNS(2141b656ce2cc063).(m+8)); |
| 6856 | pw[2] = flipWEcxx . . $ flipWE(2141b656ce2cc063).(flipNScxx . . $ flipNS(2141b656ce2cc063).(n+8)); |
| 6857 | pw[3] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6858 | |
| 6859 | pb[0] = (SQUAREcxx . . $ SQUARE#)d; |
| 6860 | pb[1] = (SQUAREcxx . . $ SQUARE#)unmap24_bcxx . . $ unmap24_b(46cc46841198e427). (a); |
| 6861 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 6862 | |
| 6863 | |
| 6864 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[1] && pw[1] < A8); |
| 6865 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[2] && pw[2] < A8); |
| 6866 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pb[1] && pb[1] < A8); |
| 6867 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kppkp_pctoindex (pw, pb, &a) && a == i); |
| 6868 | |
| 6869 | return; |
| 6870 | } |
| 6871 | |
| 6872 | |
| 6873 | static bool_tcxx . . $ bool_t# |
| 6874 | kppkp_pctoindexcxx . . $ kppkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 6875 | { |
| 6876 | enumcxx . . $ kppkp_pctoindex(9bb041263e557a58).$anonymous_type_75# {BLOCK_Acxx . . $ kppkp_pctoindex(9bb041263e557a58).BLOCK_A. = MAX_PP48_INDEXcxx . . $ `gtb-probe.c:439:9`!*64*64, BLOCK_Bcxx . . $ kppkp_pctoindex(9bb041263e557a58).BLOCK_B. = 64*64, BLOCK_Ccxx . . $ kppkp_pctoindex(9bb041263e557a58).BLOCK_C. = 64}; |
| 6877 | index_tcxx . . $ index_t# pp48_slice; |
| 6878 | |
| 6879 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 6880 | SQUAREcxx . . $ SQUARE# pawn_a = pw[1]; |
| 6881 | SQUAREcxx . . $ SQUARE# pawn_b = pw[2]; |
| 6882 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 6883 | SQUAREcxx . . $ SQUARE# pawn_c = pb[1]; |
| 6884 | SQUAREcxx . . $ SQUARE# i, j, k; |
| 6885 | |
| 6886 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_a && pawn_a < A8); |
| 6887 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_b && pawn_b < A8); |
| 6888 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_c && pawn_c < A8); |
| 6889 | |
| 6890 | if ((pawn_c & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 6891 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 6892 | pawn_a = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn_a); |
| 6893 | pawn_b = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn_b); |
| 6894 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 6895 | pawn_c = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn_c); |
| 6896 | } |
| 6897 | |
| 6898 | i = flipWEcxx . . $ flipWE(2141b656ce2cc063).( flipNScxx . . $ flipNS(2141b656ce2cc063). (pawn_a) ) - 8; |
| 6899 | j = flipWEcxx . . $ flipWE(2141b656ce2cc063).( flipNScxx . . $ flipNS(2141b656ce2cc063). (pawn_b) ) - 8; |
| 6900 | k = map24_bcxx . . $ map24_b(2141b656ce2cc063). (pawn_c); /* black pawn, so low indexes mean more advanced 0 == A2 */ |
| 6901 | |
| 6902 | pp48_slice = pp48_idxcxx . . $ pp48_idx. [i] [j]; |
| 6903 | |
| 6904 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(pp48_slice)) { |
| 6905 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 6906 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 6907 | } |
| 6908 | |
| 6909 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pp48_slice < MAX_PP48_INDEX ); |
| 6910 | |
| 6911 | *out = (index_tcxx . . $ index_t#)k * (index_tcxx . . $ index_t#)BLOCK_Acxx . . $ kppkp_pctoindex(9bb041263e557a58).BLOCK_A. + pp48_slice * (index_tcxx . . $ index_t#)BLOCK_Bcxx . . $ kppkp_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)wk * (index_tcxx . . $ index_t#)BLOCK_Ccxx . . $ kppkp_pctoindex(9bb041263e557a58).BLOCK_C. + (index_tcxx . . $ index_t#)bk; |
| 6912 | |
| 6913 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 6914 | } |
| 6915 | |
| 6916 | static sq_tcxx . . $ sq_t# |
| 6917 | map24_bcxx . . $ map24_b(2141b656ce2cc063). (sq_tcxx . . $ sq_t# s) |
| 6918 | { |
| 6919 | s -= 8; |
| 6920 | return ((s&3)+s)>>1; |
| 6921 | } |
| 6922 | |
| 6923 | static sq_tcxx . . $ sq_t# |
| 6924 | unmap24_bcxx . . $ unmap24_b(46cc46841198e427). (index_tcxx . . $ index_t# i) |
| 6925 | { |
| 6926 | return (sq_tcxx . . $ sq_t#) ((i&(4+8+16)) + i + 8); |
| 6927 | } |
| 6928 | |
| 6929 | /********************** end KPP/KP ************************************/ |
| 6930 | |
| 6931 | /********************** KPPP/K ************************************/ |
| 6932 | |
| 6933 | static const sq_tcxx . . $ sq_t# itosqcxx . . $ itosq.[48] = { |
| 6934 | H7cxx . . $ H7.,G7cxx . . $ G7.,F7cxx . . $ F7.,E7cxx . . $ E7., |
| 6935 | H6cxx . . $ H6.,G6cxx . . $ G6.,F6cxx . . $ F6.,E6cxx . . $ E6., |
| 6936 | H5cxx . . $ H5.,G5cxx . . $ G5.,F5cxx . . $ F5.,E5cxx . . $ E5., |
| 6937 | H4cxx . . $ H4.,G4cxx . . $ G4.,F4cxx . . $ F4.,E4cxx . . $ E4., |
| 6938 | H3cxx . . $ H3.,G3cxx . . $ G3.,F3cxx . . $ F3.,E3cxx . . $ E3., |
| 6939 | H2cxx . . $ H2.,G2cxx . . $ G2.,F2cxx . . $ F2.,E2cxx . . $ E2., |
| 6940 | D7cxx . . $ D7.,C7cxx . . $ C7.,B7cxx . . $ B7.,A7cxx . . $ A7., |
| 6941 | D6cxx . . $ D6.,C6cxx . . $ C6.,B6cxx . . $ B6.,A6cxx . . $ A6., |
| 6942 | D5cxx . . $ D5.,C5cxx . . $ C5.,B5cxx . . $ B5.,A5cxx . . $ A5., |
| 6943 | D4cxx . . $ D4.,C4cxx . . $ C4.,B4cxx . . $ B4.,A4cxx . . $ A4., |
| 6944 | D3cxx . . $ D3.,C3cxx . . $ C3.,B3cxx . . $ B3.,A3cxx . . $ A3., |
| 6945 | D2cxx . . $ D2.,C2cxx . . $ C2.,B2cxx . . $ B2.,A2cxx . . $ A2. |
| 6946 | }; |
| 6947 | |
| 6948 | static bool_tcxx . . $ bool_t# test_kpppkcxx . . $ test_kpppk(b126dc7c1de90089). (void); |
| 6949 | static bool_tcxx . . $ bool_t# kpppk_pctoindexcxx . . $ kpppk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *inp_pw, const SQUAREcxx . . $ SQUARE# *inp_pb, index_tcxx . . $ index_t# *out); |
| 6950 | static void kpppk_indextopccxx . . $ kpppk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb); |
| 6951 | |
| 6952 | static index_tcxx . . $ index_t# |
| 6953 | init_ppp48_idxcxx . . $ init_ppp48_idx(b126dc7c1de90089). (void) |
| 6954 | /* modifies ppp48_idx[][], ppp48_sq_x[], ppp48_sq_y[], ppp48_sq_z[] */ |
| 6955 | { |
| 6956 | enumcxx . . $ init_ppp48_idx(b126dc7c1de90089).$anonymous_type_76# {MAX_Icxx . . $ init_ppp48_idx(b126dc7c1de90089).MAX_I. = 48, MAX_Jcxx . . $ init_ppp48_idx(b126dc7c1de90089).MAX_J. = 48, MAX_Kcxx . . $ init_ppp48_idx(b126dc7c1de90089).MAX_K. = 48}; |
| 6957 | SQUAREcxx . . $ SQUARE# i, j, k; |
| 6958 | index_tcxx . . $ index_t# idx = 0; |
| 6959 | SQUAREcxx . . $ SQUARE# a, b, c; |
| 6960 | int x, y, z; |
| 6961 | |
| 6962 | /* default is noindex */ |
| 6963 | for (i = 0; i < MAX_Icxx . . $ init_ppp48_idx(b126dc7c1de90089).MAX_I.; i++) { |
| 6964 | for (j = 0; j < MAX_Jcxx . . $ init_ppp48_idx(b126dc7c1de90089).MAX_J.; j++) { |
| 6965 | for (k = 0; k < MAX_Kcxx . . $ init_ppp48_idx(b126dc7c1de90089).MAX_K.; k++) { |
| 6966 | IDX_set_emptycxx . . $ `gtb-probe.c:429:9`!(ppp48_idx [i][j][k]); |
| 6967 | } |
| 6968 | } |
| 6969 | } |
| 6970 | |
| 6971 | for (idx = 0; idx < MAX_PPP48_INDEXcxx . . $ `gtb-probe.c:441:9`!; idx++) { |
| 6972 | ppp48_sq_xcxx . . $ ppp48_sq_x. [idx] = (uint8_tcxx . . $ uint8_t#)NOSQUAREcxx . . $ NOSQUARE.; |
| 6973 | ppp48_sq_ycxx . . $ ppp48_sq_y. [idx] = (uint8_tcxx . . $ uint8_t#)NOSQUAREcxx . . $ NOSQUARE.; |
| 6974 | ppp48_sq_zcxx . . $ ppp48_sq_z. [idx] = (uint8_tcxx . . $ uint8_t#)NOSQUAREcxx . . $ NOSQUARE.; |
| 6975 | } |
| 6976 | |
| 6977 | idx = 0; |
| 6978 | for (x = 0; x < 48; x++) { |
| 6979 | for (y = x+1; y < 48; y++) { |
| 6980 | for (z = y+1; z < 48; z++) { |
| 6981 | |
| 6982 | a = itosqcxx . . $ itosq. [x]; |
| 6983 | b = itosqcxx . . $ itosq. [y]; |
| 6984 | c = itosqcxx . . $ itosq. [z]; |
| 6985 | |
| 6986 | if (!in_queensidecxx . . $ in_queenside(4c679297bf94b9eb).(b) || !in_queensidecxx . . $ in_queenside(4c679297bf94b9eb).(c)) |
| 6987 | continue; |
| 6988 | |
| 6989 | i = a - 8; |
| 6990 | j = b - 8; |
| 6991 | k = c - 8; |
| 6992 | |
| 6993 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ppp48_idx [i] [j] [k])) { |
| 6994 | |
| 6995 | ppp48_idxcxx . . $ ppp48_idx. [i][j][k] = idx; |
| 6996 | ppp48_idxcxx . . $ ppp48_idx. [i][k][j] = idx; |
| 6997 | ppp48_idxcxx . . $ ppp48_idx. [j][i][k] = idx; |
| 6998 | ppp48_idxcxx . . $ ppp48_idx. [j][k][i] = idx; |
| 6999 | ppp48_idxcxx . . $ ppp48_idx. [k][i][j] = idx; |
| 7000 | ppp48_idxcxx . . $ ppp48_idx. [k][j][i] = idx; |
| 7001 | ppp48_sq_xcxx . . $ ppp48_sq_x. [idx] = (uint8_tcxx . . $ uint8_t#) i; assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i < MAX_I); |
| 7002 | ppp48_sq_ycxx . . $ ppp48_sq_y. [idx] = (uint8_tcxx . . $ uint8_t#) j; assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (j < MAX_J); |
| 7003 | ppp48_sq_zcxx . . $ ppp48_sq_z. [idx] = (uint8_tcxx . . $ uint8_t#) k; assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (k < MAX_K); |
| 7004 | idx++; |
| 7005 | } |
| 7006 | } |
| 7007 | } |
| 7008 | } |
| 7009 | |
| 7010 | /* assert (idx == MAX_PPP48_INDEX);*/ |
| 7011 | return idx; |
| 7012 | } |
| 7013 | |
| 7014 | static bool_tcxx . . $ bool_t# |
| 7015 | test_kpppkcxx . . $ test_kpppk(b126dc7c1de90089). (void) |
| 7016 | { |
| 7017 | |
| 7018 | enumcxx . . $ test_kpppk(b126dc7c1de90089).$anonymous_type_77# {MAXPCcxx . . $ test_kpppk(b126dc7c1de90089).MAXPC. = 16+1}; |
| 7019 | char str[] = "kpppk"; |
| 7020 | SQUAREcxx . . $ SQUARE# a, b, c, d, e; |
| 7021 | SQUAREcxx . . $ SQUARE# pw[MAXPCcxx . . $ test_kpppk(b126dc7c1de90089).MAXPC.], pb[MAXPCcxx . . $ test_kpppk(b126dc7c1de90089).MAXPC.]; |
| 7022 | SQUAREcxx . . $ SQUARE# px[MAXPCcxx . . $ test_kpppk(b126dc7c1de90089).MAXPC.], py[MAXPCcxx . . $ test_kpppk(b126dc7c1de90089).MAXPC.]; |
| 7023 | |
| 7024 | index_tcxx . . $ index_t# i, j; |
| 7025 | bool_tcxx . . $ bool_t# err = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7026 | |
| 7027 | printfcxx . . $ printf(581fddd72a8db8fc). ("%8s ", str); |
| 7028 | |
| 7029 | for (a = 0; a < 64; a++) { |
| 7030 | for (b = 0; b < 64; b++) { |
| 7031 | for (c = 0; c < 64; c++) { |
| 7032 | for (d = 0; d < 64; d++) { |
| 7033 | for (e = 0; e < 64; e++) { |
| 7034 | |
| 7035 | if (c <= H1cxx . . $ H1. || c >= A8cxx . . $ A8.) |
| 7036 | continue; |
| 7037 | if (b <= H1cxx . . $ H1. || b >= A8cxx . . $ A8.) |
| 7038 | continue; |
| 7039 | if (d <= H1cxx . . $ H1. || d >= A8cxx . . $ A8.) |
| 7040 | continue; |
| 7041 | |
| 7042 | pw[0] = a; |
| 7043 | pw[1] = b; |
| 7044 | pw[2] = c; |
| 7045 | pw[3] = d; |
| 7046 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 7047 | |
| 7048 | pb[0] = e; |
| 7049 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 7050 | |
| 7051 | if (kpppk_pctoindexcxx . . $ kpppk_pctoindex(9bb041263e557a58). (pw, pb, &i)) { |
| 7052 | kpppk_indextopccxx . . $ kpppk_indextopc(21a38811104ee146). (i, px, py); |
| 7053 | kpppk_pctoindexcxx . . $ kpppk_pctoindex(9bb041263e557a58). (px, py, &j); |
| 7054 | if (i != j) { |
| 7055 | err = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7056 | } |
| 7057 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (i == j); |
| 7058 | } |
| 7059 | |
| 7060 | } |
| 7061 | } |
| 7062 | } |
| 7063 | } |
| 7064 | |
| 7065 | if ((a&1)==0) { |
| 7066 | printfcxx . . $ printf(581fddd72a8db8fc).("."); |
| 7067 | fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!); |
| 7068 | } |
| 7069 | } |
| 7070 | |
| 7071 | if (err) |
| 7072 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s NOT passed\n", str); |
| 7073 | else |
| 7074 | printfcxx . . $ printf(581fddd72a8db8fc). ("> %s PASSED\n", str); |
| 7075 | return !err; |
| 7076 | } |
| 7077 | |
| 7078 | |
| 7079 | static void |
| 7080 | kpppk_indextopccxx . . $ kpppk_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 7081 | { |
| 7082 | /*---------------------------------------------------------* |
| 7083 | inverse work to make sure that the following is valid |
| 7084 | index = a * BLOCK_A + b * BLOCK_B + c * BLOCK_C + d; |
| 7085 | *----------------------------------------------------------*/ |
| 7086 | |
| 7087 | enumcxx . . $ kpppk_indextopc(21a38811104ee146).$anonymous_type_78# {BLOCK_Acxx . . $ kpppk_indextopc(21a38811104ee146).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kpppk_indextopc(21a38811104ee146).BLOCK_B. = 64}; |
| 7088 | index_tcxx . . $ index_t# a, b, c, r; |
| 7089 | SQUAREcxx . . $ SQUARE# m, n, o; |
| 7090 | |
| 7091 | r = i; |
| 7092 | a = r / BLOCK_Acxx . . $ kpppk_indextopc(21a38811104ee146).BLOCK_A.; |
| 7093 | r -= a * BLOCK_Acxx . . $ kpppk_indextopc(21a38811104ee146).BLOCK_A.; |
| 7094 | b = r / BLOCK_Bcxx . . $ kpppk_indextopc(21a38811104ee146).BLOCK_B.; |
| 7095 | r -= b * BLOCK_Bcxx . . $ kpppk_indextopc(21a38811104ee146).BLOCK_B.; |
| 7096 | c = r; |
| 7097 | |
| 7098 | m = ppp48_sq_xcxx . . $ ppp48_sq_x. [a]; |
| 7099 | n = ppp48_sq_ycxx . . $ ppp48_sq_y. [a]; |
| 7100 | o = ppp48_sq_zcxx . . $ ppp48_sq_z. [a]; |
| 7101 | |
| 7102 | |
| 7103 | pw[0] = (SQUAREcxx . . $ SQUARE#)b; |
| 7104 | pw[1] = m + 8; |
| 7105 | pw[2] = n + 8; |
| 7106 | pw[3] = o + 8; |
| 7107 | pw[4] = NOSQUAREcxx . . $ NOSQUARE.; |
| 7108 | |
| 7109 | pb[0] = (SQUAREcxx . . $ SQUARE#)c; |
| 7110 | pb[1] = NOSQUAREcxx . . $ NOSQUARE.; |
| 7111 | |
| 7112 | |
| 7113 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[1] && pw[1] < A8); |
| 7114 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[2] && pw[2] < A8); |
| 7115 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[3] && pw[3] < A8); |
| 7116 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (kpppk_pctoindex (pw, pb, &a) && a == i); |
| 7117 | |
| 7118 | return; |
| 7119 | } |
| 7120 | |
| 7121 | |
| 7122 | static bool_tcxx . . $ bool_t# |
| 7123 | kpppk_pctoindexcxx . . $ kpppk_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 7124 | { |
| 7125 | enumcxx . . $ kpppk_pctoindex(9bb041263e557a58).$anonymous_type_79# {BLOCK_Acxx . . $ kpppk_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kpppk_pctoindex(9bb041263e557a58).BLOCK_B. = 64}; |
| 7126 | index_tcxx . . $ index_t# ppp48_slice; |
| 7127 | |
| 7128 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 7129 | SQUAREcxx . . $ SQUARE# pawn_a = pw[1]; |
| 7130 | SQUAREcxx . . $ SQUARE# pawn_b = pw[2]; |
| 7131 | SQUAREcxx . . $ SQUARE# pawn_c = pw[3]; |
| 7132 | |
| 7133 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 7134 | |
| 7135 | SQUAREcxx . . $ SQUARE# i, j, k; |
| 7136 | |
| 7137 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_a && pawn_a < A8); |
| 7138 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_b && pawn_b < A8); |
| 7139 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_c && pawn_c < A8); |
| 7140 | |
| 7141 | i = pawn_a - 8; |
| 7142 | j = pawn_b - 8; |
| 7143 | k = pawn_c - 8; |
| 7144 | |
| 7145 | ppp48_slice = ppp48_idxcxx . . $ ppp48_idx. [i] [j] [k]; |
| 7146 | |
| 7147 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ppp48_slice)) { |
| 7148 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 7149 | pawn_a = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn_a); |
| 7150 | pawn_b = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn_b); |
| 7151 | pawn_c = flipWEcxx . . $ flipWE(2141b656ce2cc063). (pawn_c); |
| 7152 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 7153 | } |
| 7154 | |
| 7155 | i = pawn_a - 8; |
| 7156 | j = pawn_b - 8; |
| 7157 | k = pawn_c - 8; |
| 7158 | |
| 7159 | ppp48_slice = ppp48_idxcxx . . $ ppp48_idx. [i] [j] [k]; |
| 7160 | |
| 7161 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(ppp48_slice)) { |
| 7162 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 7163 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7164 | } |
| 7165 | |
| 7166 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (ppp48_slice < MAX_PPP48_INDEX ); |
| 7167 | |
| 7168 | *out = (index_tcxx . . $ index_t#)ppp48_slice * BLOCK_Acxx . . $ kpppk_pctoindex(9bb041263e557a58).BLOCK_A. + (index_tcxx . . $ index_t#)wk * BLOCK_Bcxx . . $ kpppk_pctoindex(9bb041263e557a58).BLOCK_B. + (index_tcxx . . $ index_t#)bk; |
| 7169 | |
| 7170 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7171 | } |
| 7172 | |
| 7173 | |
| 7174 | /********************** end KPPP/K ************************************/ |
| 7175 | |
| 7176 | |
| 7177 | static bool_tcxx . . $ bool_t# |
| 7178 | kpkp_pctoindexcxx . . $ kpkp_pctoindex(9bb041263e557a58). (const SQUAREcxx . . $ SQUARE# *pw, const SQUAREcxx . . $ SQUARE# *pb, index_tcxx . . $ index_t# *out) |
| 7179 | { |
| 7180 | enumcxx . . $ kpkp_pctoindex(9bb041263e557a58).$anonymous_type_80# {BLOCK_Acxx . . $ kpkp_pctoindex(9bb041263e557a58).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kpkp_pctoindex(9bb041263e557a58).BLOCK_B. = 64}; |
| 7181 | SQUAREcxx . . $ SQUARE# pp_slice; |
| 7182 | SQUAREcxx . . $ SQUARE# anchor, loosen; |
| 7183 | |
| 7184 | SQUAREcxx . . $ SQUARE# wk = pw[0]; |
| 7185 | SQUAREcxx . . $ SQUARE# bk = pb[0]; |
| 7186 | SQUAREcxx . . $ SQUARE# pawn_a = pw[1]; |
| 7187 | SQUAREcxx . . $ SQUARE# pawn_b = pb[1]; |
| 7188 | |
| 7189 | SQUAREcxx . . $ SQUARE# m, n; |
| 7190 | |
| 7191 | #ifdef DEBUG |
| 7192 | if (!(A2 <= pawn_a && pawn_a < A8)) { |
| 7193 | printf ("\n\nsquare of pawn_a: %s\n", Square_str[pawn_a]); |
| 7194 | printf(" wk %s\n p1 %s\n p2 %s\n bk %s\n" |
| 7195 | , Square_str[wk] |
| 7196 | , Square_str[pawn_a] |
| 7197 | , Square_str[pawn_b] |
| 7198 | , Square_str[bk] |
| 7199 | ); |
| 7200 | } |
| 7201 | #endif |
| 7202 | |
| 7203 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_a && pawn_a < A8); |
| 7204 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pawn_b && pawn_b < A8); |
| 7205 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pw[2] == NOSQUARE && pb[2] == NOSQUARE); |
| 7206 | |
| 7207 | /*pp_putanchorfirst (pawn_a, pawn_b, &anchor, &loosen);*/ |
| 7208 | anchor = pawn_a; |
| 7209 | loosen = pawn_b; |
| 7210 | |
| 7211 | if ((anchor & 07) > 3) { /* column is more than 3. e.g. = e,f,g, or h */ |
| 7212 | anchor = flipWEcxx . . $ flipWE(2141b656ce2cc063). (anchor); |
| 7213 | loosen = flipWEcxx . . $ flipWE(2141b656ce2cc063). (loosen); |
| 7214 | wk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (wk); |
| 7215 | bk = flipWEcxx . . $ flipWE(2141b656ce2cc063). (bk); |
| 7216 | } |
| 7217 | |
| 7218 | m = (SQUAREcxx . . $ SQUARE#)wsq_to_pidx24cxx . . $ wsq_to_pidx24(4c679297bf94b9eb). (anchor); |
| 7219 | n = loosen - 8; |
| 7220 | |
| 7221 | pp_slice = m * 48 + n; |
| 7222 | |
| 7223 | if (IDX_is_emptycxx . . $ `gtb-probe.c:430:9`!(pp_slice)) { |
| 7224 | *out = NOINDEXcxx . . $ `gtb-probe.c:110:9`!; |
| 7225 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7226 | } |
| 7227 | |
| 7228 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (pp_slice < MAX_PpINDEX ); |
| 7229 | |
| 7230 | *out = (index_tcxx . . $ index_t#) (pp_slice * BLOCK_Acxx . . $ kpkp_pctoindex(9bb041263e557a58).BLOCK_A. + wk * BLOCK_Bcxx . . $ kpkp_pctoindex(9bb041263e557a58).BLOCK_B. + bk); |
| 7231 | |
| 7232 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7233 | } |
| 7234 | |
| 7235 | |
| 7236 | static void |
| 7237 | kpkp_indextopccxx . . $ kpkp_indextopc(21a38811104ee146). (index_tcxx . . $ index_t# i, SQUAREcxx . . $ SQUARE# *pw, SQUAREcxx . . $ SQUARE# *pb) |
| 7238 | { |
| 7239 | /*---------------------------------------------------------* |
| 7240 | inverse work to make sure that the following is valid |
| 7241 | index = a * BLOCK_A + b * BLOCK_B + c; |
| 7242 | *----------------------------------------------------------*/ |
| 7243 | enumcxx . . $ kpkp_indextopc(21a38811104ee146).$anonymous_type_81# {B11100cxx . . $ kpkp_indextopc(21a38811104ee146).B11100. = 7u << 2}; |
| 7244 | enumcxx . . $ kpkp_indextopc(21a38811104ee146).$anonymous_type_82# {BLOCK_Acxx . . $ kpkp_indextopc(21a38811104ee146).BLOCK_A. = 64*64, BLOCK_Bcxx . . $ kpkp_indextopc(21a38811104ee146).BLOCK_B. = 64}; |
| 7245 | enumcxx . . $ kpkp_indextopc(21a38811104ee146).$anonymous_type_83# {block_mcxx . . $ kpkp_indextopc(21a38811104ee146).block_m. = 48}; |
| 7246 | index_tcxx . . $ index_t# a, b, c, r; |
| 7247 | index_tcxx . . $ index_t# m, n; |
| 7248 | SQUAREcxx . . $ SQUARE# sq_m, sq_n; |
| 7249 | |
| 7250 | r = i; |
| 7251 | a = r / BLOCK_Acxx . . $ kpkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 7252 | r -= a * BLOCK_Acxx . . $ kpkp_indextopc(21a38811104ee146).BLOCK_A.; |
| 7253 | b = r / BLOCK_Bcxx . . $ kpkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 7254 | r -= b * BLOCK_Bcxx . . $ kpkp_indextopc(21a38811104ee146).BLOCK_B.; |
| 7255 | c = r; |
| 7256 | |
| 7257 | /* unpack a, which is pslice, into m and n */ |
| 7258 | r = a; |
| 7259 | m = r / block_mcxx . . $ kpkp_indextopc(21a38811104ee146).block_m.; |
| 7260 | r -= m * block_mcxx . . $ kpkp_indextopc(21a38811104ee146).block_m.; |
| 7261 | n = r ; |
| 7262 | |
| 7263 | sq_m = pidx24_to_wsqcxx . . $ pidx24_to_wsq(46cc46841198e427). (m); |
| 7264 | sq_n = (SQUAREcxx . . $ SQUARE#)n + 8; |
| 7265 | |
| 7266 | pw[0] = (SQUAREcxx . . $ SQUARE#)b; |
| 7267 | pb[0] = (SQUAREcxx . . $ SQUARE#)c; |
| 7268 | pw[1] = sq_m; |
| 7269 | pb[1] = sq_n; |
| 7270 | pw[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 7271 | pb[2] = NOSQUAREcxx . . $ NOSQUARE.; |
| 7272 | |
| 7273 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pw[1] && pw[1] < A8); |
| 7274 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (A2 <= pb[1] && pb[1] < A8); |
| 7275 | |
| 7276 | return; |
| 7277 | } |
| 7278 | |
| 7279 | |
| 7280 | /****************************************************************************\ |
| 7281 | * |
| 7282 | * |
| 7283 | * DEBUG ZONE |
| 7284 | * |
| 7285 | * |
| 7286 | ****************************************************************************/ |
| 7287 | |
| 7288 | #if defined(DEBUG) |
| 7289 | static void |
| 7290 | print_pos (const sq_t *ws, const sq_t *bs, const pc_t *wp, const pc_t *bp) |
| 7291 | { |
| 7292 | int i; |
| 7293 | printf ("White: "); |
| 7294 | for (i = 0; ws[i] != NOSQUARE; i++) { |
| 7295 | printf ("%s%s ", P_str[wp[i]], Square_str[ws[i]]); |
| 7296 | } |
| 7297 | printf ("\nBlack: "); |
| 7298 | for (i = 0; bs[i] != NOSQUARE; i++) { |
| 7299 | printf ("%s%s ", P_str[bp[i]], Square_str[bs[i]]); |
| 7300 | } |
| 7301 | printf ("\n"); |
| 7302 | } |
| 7303 | #endif |
| 7304 | |
| 7305 | #if defined(DEBUG) || defined(FOLLOW_EGTB) |
| 7306 | static void |
| 7307 | output_state (unsigned stm, const SQUARE *wSQ, const SQUARE *bSQ, |
| 7308 | const SQ_CONTENT *wPC, const SQ_CONTENT *bPC) |
| 7309 | { |
| 7310 | int i; |
| 7311 | assert (stm == WH || stm == BL); |
| 7312 | |
| 7313 | printf("\n%s to move\n", stm==WH?"White":"Black"); |
| 7314 | printf("W: "); |
| 7315 | for (i = 0; wSQ[i] != NOSQUARE; i++) { |
| 7316 | printf("%s%s ", P_str[wPC[i]], Square_str[wSQ[i]]); |
| 7317 | } |
| 7318 | printf("\n"); |
| 7319 | printf("B: "); |
| 7320 | for (i = 0; bSQ[i] != NOSQUARE; i++) { |
| 7321 | printf("%s%s ", P_str[bPC[i]], Square_str[bSQ[i]]); |
| 7322 | } |
| 7323 | printf("\n\n"); |
| 7324 | } |
| 7325 | #endif |
| 7326 | |
| 7327 | static void |
| 7328 | list_indexcxx . . $ list_index(49f6e7a06ebc5aa8). (void) |
| 7329 | { |
| 7330 | enumcxx . . $ list_index(49f6e7a06ebc5aa8).$anonymous_type_84# {START_GTBcxx . . $ list_index(49f6e7a06ebc5aa8).START_GTB. = 0, END_GTBcxx . . $ list_index(49f6e7a06ebc5aa8).END_GTB. = (MAX_EGKEYScxx . . $ `gtb-probe.c:108:9`!)}; |
| 7331 | int i; |
| 7332 | index_tcxx . . $ index_t# accum = 0; |
| 7333 | printfcxx . . $ printf(581fddd72a8db8fc). ("\nIndex for each GTB\n"); |
| 7334 | printfcxx . . $ printf(581fddd72a8db8fc). ("%3s: %7s %7s %7s %7s\n" , "i", "TB", "RAM-slice", "RAM-max", "HD-cumulative"); |
| 7335 | for (i = START_GTBcxx . . $ list_index(49f6e7a06ebc5aa8).START_GTB.; i < END_GTBcxx . . $ list_index(49f6e7a06ebc5aa8).END_GTB.; i++) { |
| 7336 | index_tcxx . . $ index_t# indiv_k = egkeycxx . . $ egkey.[i].maxindexcxx . . $ endgamekey#maxindex. * (index_tcxx . . $ index_t#)sizeof(dtm_tcxx . . $ dtm_t#) * 2/1024; |
| 7337 | accum += indiv_k; |
| 7338 | printfcxx . . $ printf(581fddd72a8db8fc). ("%3d: %7s %8luk %8luk %8luM\n", i, egkeycxx . . $ egkey.[i].strcxx . . $ endgamekey#str., (long unsigned)(indiv_k/egkeycxx . . $ egkey.[i].slice_ncxx . . $ endgamekey#slice_n.), |
| 7339 | (long unsigned)indiv_k, (long unsigned)accum/1024/2); |
| 7340 | } |
| 7341 | printfcxx . . $ printf(581fddd72a8db8fc). ("\n"); |
| 7342 | return; |
| 7343 | } |
| 7344 | |
| 7345 | /************************************************************************************************************** |
| 7346 | |
| 7347 | NEW_WDL |
| 7348 | |
| 7349 | **************************************************************************************************************/ |
| 7350 | |
| 7351 | /*---------------------------------------------------------------------*\ |
| 7352 | | WDL CACHE Implementation ZONE |
| 7353 | \*---------------------------------------------------------------------*/ |
| 7354 | |
| 7355 | /* |
| 7356 | | WDL CACHE Statics |
| 7357 | \*---------------------------------------------------------------------*/ |
| 7358 | |
| 7359 | /*--------------------------------------------------------------------------*/ |
| 7360 | static unsigned int wdl_extractcxx . . $ wdl_extract(3fae420892153308). (unit_tcxx . . $ unit_t# *uarr, index_tcxx . . $ index_t# x); |
| 7361 | static wdl_block_tcxx . . $ wdl_block_t# * wdl_point_block_to_replacecxx . . $ wdl_point_block_to_replace(e0bb2f31b3742ce1). (void); |
| 7362 | static void wdl_movetotopcxx . . $ wdl_movetotop(79585dfb8a48616e). (wdl_block_tcxx . . $ wdl_block_t# *t); |
| 7363 | |
| 7364 | #if 0 |
| 7365 | static bool_t wdl_cache_init (size_t cache_mem); |
| 7366 | static void wdl_cache_flush (void); |
| 7367 | static bool_t get_WDL (tbkey_t key, unsigned side, index_t idx, unsigned int *info_out, bool_t probe_hard_flag); |
| 7368 | #endif |
| 7369 | |
| 7370 | static bool_tcxx . . $ bool_t# wdl_cache_is_oncxx . . $ wdl_cache_is_on(b126dc7c1de90089). (void); |
| 7371 | static void wdl_cache_reset_counterscxx . . $ wdl_cache_reset_counters(49f6e7a06ebc5aa8). (void); |
| 7372 | static void wdl_cache_donecxx . . $ wdl_cache_done(49f6e7a06ebc5aa8). (void); |
| 7373 | |
| 7374 | static wdl_block_tcxx . . $ wdl_block_t# * wdl_point_block_to_replacecxx . . $ wdl_point_block_to_replace(e0bb2f31b3742ce1). (void); |
| 7375 | static bool_tcxx . . $ bool_t# get_WDL_from_cachecxx . . $ get_WDL_from_cache(5933a67032aa547c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, unsigned int *out); |
| 7376 | static void wdl_movetotopcxx . . $ wdl_movetotop(79585dfb8a48616e). (wdl_block_tcxx . . $ wdl_block_t# *t); |
| 7377 | static bool_tcxx . . $ bool_t# wdl_preload_cachecxx . . $ wdl_preload_cache(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx); |
| 7378 | |
| 7379 | /*--------------------------------------------------------------------------*/ |
| 7380 | |
| 7381 | /*---------------------------------------------------------------------*\ |
| 7382 | | WDL CACHE Maintainance |
| 7383 | \*---------------------------------------------------------------------*/ |
| 7384 | |
| 7385 | |
| 7386 | static size_t |
| 7387 | wdl_cache_initcxx . . $ wdl_cache_init(ecdaa1632f49f591). (size_t cache_mem) |
| 7388 | { |
| 7389 | unsigned int i; |
| 7390 | wdl_block_tcxx . . $ wdl_block_t# *p; |
| 7391 | size_t entries_per_block; |
| 7392 | size_t max_blocks; |
| 7393 | size_t block_mem; |
| 7394 | |
| 7395 | if (WDL_CACHE_INITIALIZEDcxx . . $ WDL_CACHE_INITIALIZED.) |
| 7396 | wdl_cache_donecxx . . $ wdl_cache_done(49f6e7a06ebc5aa8).(); |
| 7397 | |
| 7398 | entries_per_block = 16 * 1024; /* fixed, needed for the compression schemes */ |
| 7399 | |
| 7400 | WDL_units_per_blockcxx . . $ WDL_units_per_block. = entries_per_block / WDL_entries_per_unitcxx . . $ `gtb-probe.c:2315:9`!; |
| 7401 | block_mem = WDL_units_per_blockcxx . . $ WDL_units_per_block. * sizeof(unit_tcxx . . $ unit_t#); |
| 7402 | |
| 7403 | max_blocks = cache_mem / block_mem; |
| 7404 | cache_mem = max_blocks * block_mem; |
| 7405 | |
| 7406 | |
| 7407 | wdl_cache_reset_counterscxx . . $ wdl_cache_reset_counters(49f6e7a06ebc5aa8). (); |
| 7408 | |
| 7409 | wdl_cachecxx . . $ wdl_cache..entries_per_blockcxx . . $ WDL_CACHE#entries_per_block. = entries_per_block; |
| 7410 | wdl_cachecxx . . $ wdl_cache..max_blockscxx . . $ WDL_CACHE#max_blocks. = max_blocks; |
| 7411 | wdl_cachecxx . . $ wdl_cache..cachedcxx . . $ WDL_CACHE#cached. = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7412 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7413 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7414 | wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n. = 0; |
| 7415 | |
| 7416 | if (0 == cache_mem || NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == (wdl_cachecxx . . $ wdl_cache..buffercxx . . $ WDL_CACHE#buffer. = (unit_tcxx . . $ unit_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (cache_mem))) { |
| 7417 | wdl_cachecxx . . $ wdl_cache..cachedcxx . . $ WDL_CACHE#cached. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7418 | return 0; |
| 7419 | } |
| 7420 | |
| 7421 | if (0 == max_blocks|| NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == (wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks. = (wdl_block_tcxx . . $ wdl_block_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (max_blocks * sizeof(wdl_block_tcxx . . $ wdl_block_t#)))) { |
| 7422 | wdl_cachecxx . . $ wdl_cache..cachedcxx . . $ WDL_CACHE#cached. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7423 | freecxx . . $ free(5d22bdacc48458e8). (wdl_cachecxx . . $ wdl_cache..buffercxx . . $ WDL_CACHE#buffer.); |
| 7424 | return 0; |
| 7425 | } |
| 7426 | |
| 7427 | for (i = 0; i < max_blocks; i++) { |
| 7428 | p = &wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks.[i]; |
| 7429 | p->keycxx . . $ wdl_block#key. = -1; |
| 7430 | p->sidecxx . . $ wdl_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 7431 | p->offsetcxx . . $ wdl_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 7432 | p->p_arrcxx . . $ wdl_block#p_arr. = wdl_cachecxx . . $ wdl_cache..buffercxx . . $ WDL_CACHE#buffer. + i * WDL_units_per_blockcxx . . $ WDL_units_per_block.; |
| 7433 | p->prevcxx . . $ wdl_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7434 | p->nextcxx . . $ wdl_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7435 | } |
| 7436 | |
| 7437 | WDL_CACHE_INITIALIZEDcxx . . $ WDL_CACHE_INITIALIZED. = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7438 | |
| 7439 | return cache_mem; |
| 7440 | } |
| 7441 | |
| 7442 | |
| 7443 | static void |
| 7444 | wdl_cache_donecxx . . $ wdl_cache_done(49f6e7a06ebc5aa8). (void) |
| 7445 | { |
| 7446 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(WDL_CACHE_INITIALIZED); |
| 7447 | |
| 7448 | wdl_cachecxx . . $ wdl_cache..cachedcxx . . $ WDL_CACHE#cached. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7449 | wdl_cachecxx . . $ wdl_cache..hardcxx . . $ WDL_CACHE#hard. = 0; |
| 7450 | wdl_cachecxx . . $ wdl_cache..softcxx . . $ WDL_CACHE#soft. = 0; |
| 7451 | wdl_cachecxx . . $ wdl_cache..hardmissescxx . . $ WDL_CACHE#hardmisses. = 0; |
| 7452 | wdl_cachecxx . . $ wdl_cache..hitscxx . . $ WDL_CACHE#hits. = 0; |
| 7453 | wdl_cachecxx . . $ wdl_cache..softmissescxx . . $ WDL_CACHE#softmisses. = 0; |
| 7454 | wdl_cachecxx . . $ wdl_cache..comparisonscxx . . $ WDL_CACHE#comparisons. = 0; |
| 7455 | wdl_cachecxx . . $ wdl_cache..max_blockscxx . . $ WDL_CACHE#max_blocks. = 0; |
| 7456 | wdl_cachecxx . . $ wdl_cache..entries_per_blockcxx . . $ WDL_CACHE#entries_per_block. = 0; |
| 7457 | |
| 7458 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7459 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7460 | wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n. = 0; |
| 7461 | |
| 7462 | if (wdl_cachecxx . . $ wdl_cache..buffercxx . . $ WDL_CACHE#buffer. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 7463 | freecxx . . $ free(5d22bdacc48458e8). (wdl_cachecxx . . $ wdl_cache..buffercxx . . $ WDL_CACHE#buffer.); |
| 7464 | wdl_cachecxx . . $ wdl_cache..buffercxx . . $ WDL_CACHE#buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7465 | |
| 7466 | if (wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 7467 | freecxx . . $ free(5d22bdacc48458e8). (wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks.); |
| 7468 | wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7469 | |
| 7470 | WDL_CACHE_INITIALIZEDcxx . . $ WDL_CACHE_INITIALIZED. = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7471 | return; |
| 7472 | } |
| 7473 | |
| 7474 | |
| 7475 | static void |
| 7476 | wdl_cache_flushcxx . . $ wdl_cache_flush(49f6e7a06ebc5aa8). (void) |
| 7477 | { |
| 7478 | unsigned int i; |
| 7479 | wdl_block_tcxx . . $ wdl_block_t# *p; |
| 7480 | size_t max_blocks = wdl_cachecxx . . $ wdl_cache..max_blockscxx . . $ WDL_CACHE#max_blocks.; |
| 7481 | |
| 7482 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7483 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7484 | wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n. = 0; |
| 7485 | |
| 7486 | for (i = 0; i < max_blocks; i++) { |
| 7487 | p = &wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks.[i]; |
| 7488 | p->keycxx . . $ wdl_block#key. = -1; |
| 7489 | p->sidecxx . . $ wdl_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 7490 | p->offsetcxx . . $ wdl_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 7491 | p->p_arrcxx . . $ wdl_block#p_arr. = wdl_cachecxx . . $ wdl_cache..buffercxx . . $ WDL_CACHE#buffer. + i * WDL_units_per_blockcxx . . $ WDL_units_per_block.; |
| 7492 | p->prevcxx . . $ wdl_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7493 | p->nextcxx . . $ wdl_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7494 | } |
| 7495 | |
| 7496 | wdl_cache_reset_counterscxx . . $ wdl_cache_reset_counters(49f6e7a06ebc5aa8). (); |
| 7497 | |
| 7498 | return; |
| 7499 | } |
| 7500 | |
| 7501 | |
| 7502 | static void |
| 7503 | wdl_cache_reset_counterscxx . . $ wdl_cache_reset_counters(49f6e7a06ebc5aa8). (void) |
| 7504 | { |
| 7505 | wdl_cachecxx . . $ wdl_cache..hardcxx . . $ WDL_CACHE#hard. = 0; |
| 7506 | wdl_cachecxx . . $ wdl_cache..softcxx . . $ WDL_CACHE#soft. = 0; |
| 7507 | wdl_cachecxx . . $ wdl_cache..hardmissescxx . . $ WDL_CACHE#hardmisses. = 0; |
| 7508 | wdl_cachecxx . . $ wdl_cache..hitscxx . . $ WDL_CACHE#hits. = 0; |
| 7509 | wdl_cachecxx . . $ wdl_cache..softmissescxx . . $ WDL_CACHE#softmisses. = 0; |
| 7510 | wdl_cachecxx . . $ wdl_cache..comparisonscxx . . $ WDL_CACHE#comparisons. = 0; |
| 7511 | return; |
| 7512 | } |
| 7513 | |
| 7514 | |
| 7515 | static bool_tcxx . . $ bool_t# |
| 7516 | wdl_cache_is_oncxx . . $ wdl_cache_is_on(b126dc7c1de90089). (void) |
| 7517 | { |
| 7518 | return wdl_cachecxx . . $ wdl_cache..cachedcxx . . $ WDL_CACHE#cached.; |
| 7519 | } |
| 7520 | |
| 7521 | /****************************************************************************\ |
| 7522 | | Replacement |
| 7523 | \****************************************************************************/ |
| 7524 | |
| 7525 | static wdl_block_tcxx . . $ wdl_block_t# * |
| 7526 | wdl_point_block_to_replacecxx . . $ wdl_point_block_to_replace(e0bb2f31b3742ce1). (void) |
| 7527 | { |
| 7528 | wdl_block_tcxx . . $ wdl_block_t# *p, *t, *s; |
| 7529 | |
| 7530 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == wdl_cache.n || wdl_cache.top != NULL); |
| 7531 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == wdl_cache.n || wdl_cache.bot != NULL); |
| 7532 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == wdl_cache.n || wdl_cache.bot->prev == NULL); |
| 7533 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (0 == wdl_cache.n || wdl_cache.top->next == NULL); |
| 7534 | |
| 7535 | if (wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n. > 0 && -1 == wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top.->keycxx . . $ wdl_block#key.) { |
| 7536 | |
| 7537 | /* top blocks is unusable, should be the one to replace*/ |
| 7538 | p = wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top.; |
| 7539 | |
| 7540 | } else |
| 7541 | if (wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n. == 0) { |
| 7542 | |
| 7543 | p = &wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks.[wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n.++]; |
| 7544 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = p; |
| 7545 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot. = p; |
| 7546 | |
| 7547 | p->prevcxx . . $ wdl_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7548 | p->nextcxx . . $ wdl_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7549 | |
| 7550 | } else |
| 7551 | if (wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n. < wdl_cachecxx . . $ wdl_cache..max_blockscxx . . $ WDL_CACHE#max_blocks.) { /* add */ |
| 7552 | |
| 7553 | s = wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top.; |
| 7554 | p = &wdl_cachecxx . . $ wdl_cache..blockscxx . . $ WDL_CACHE#blocks.[wdl_cachecxx . . $ wdl_cache..ncxx . . $ WDL_CACHE#n.++]; |
| 7555 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = p; |
| 7556 | |
| 7557 | s->nextcxx . . $ wdl_block#next. = p; |
| 7558 | p->prevcxx . . $ wdl_block#prev. = s; |
| 7559 | p->nextcxx . . $ wdl_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7560 | |
| 7561 | } else { /* replace*/ |
| 7562 | |
| 7563 | t = wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot.; |
| 7564 | s = wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top.; |
| 7565 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot. = t->nextcxx . . $ wdl_block#next.; |
| 7566 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = t; |
| 7567 | |
| 7568 | s->nextcxx . . $ wdl_block#next. = t; |
| 7569 | t->prevcxx . . $ wdl_block#prev. = s; |
| 7570 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top.->nextcxx . . $ wdl_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7571 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot.->prevcxx . . $ wdl_block#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7572 | |
| 7573 | p = t; |
| 7574 | } |
| 7575 | |
| 7576 | /* make the information content unusable, it will be replaced */ |
| 7577 | p->keycxx . . $ wdl_block#key. = -1; |
| 7578 | p->sidecxx . . $ wdl_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 7579 | p->offsetcxx . . $ wdl_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 7580 | |
| 7581 | return p; |
| 7582 | } |
| 7583 | |
| 7584 | /****************************************************************************\ |
| 7585 | | |
| 7586 | | NEW PROBING ZONE |
| 7587 | | |
| 7588 | \****************************************************************************/ |
| 7589 | |
| 7590 | static unsigned int wdl_extractcxx . . $ wdl_extract(3fae420892153308). (unit_tcxx . . $ unit_t# *uarr, index_tcxx . . $ index_t# x); |
| 7591 | static bool_tcxx . . $ bool_t# get_WDL_from_cachecxx . . $ get_WDL_from_cache(5933a67032aa547c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, unsigned int *info_out); |
| 7592 | static unsigned dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(dtm_tcxx . . $ dtm_t# dtm); |
| 7593 | static void wdl_movetotopcxx . . $ wdl_movetotop(79585dfb8a48616e). (wdl_block_tcxx . . $ wdl_block_t# *t); |
| 7594 | static bool_tcxx . . $ bool_t# wdl_preload_cachecxx . . $ wdl_preload_cache(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx); |
| 7595 | static void dtm_block_2_wdl_blockcxx . . $ dtm_block_2_wdl_block(b52da10b814976ab).(dtm_block_tcxx . . $ dtm_block_t# *g, wdl_block_tcxx . . $ wdl_block_t# *w, size_t n); |
| 7596 | |
| 7597 | static bool_tcxx . . $ bool_t# |
| 7598 | get_WDLcxx . . $ get_WDL(fc2bb21961b34247). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, unsigned int *info_out, bool_tcxx . . $ bool_t# probe_hard_flag) |
| 7599 | { |
| 7600 | dtm_tcxx . . $ dtm_t# dtm; |
| 7601 | bool_tcxx . . $ bool_t# found; |
| 7602 | |
| 7603 | found = get_WDL_from_cachecxx . . $ get_WDL_from_cache(5933a67032aa547c). (key, side, idx, info_out); |
| 7604 | |
| 7605 | if (found) { |
| 7606 | wdl_cachecxx . . $ wdl_cache..hitscxx . . $ WDL_CACHE#hits.++; |
| 7607 | } else { |
| 7608 | /* may probe soft */ |
| 7609 | found = get_dtmcxx . . $ get_dtm(cc2c15251078b5e5). (key, side, idx, &dtm, probe_hard_flag); |
| 7610 | if (found) { |
| 7611 | *info_out = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(dtm); |
| 7612 | /* move cache info from dtm_cache to WDL_cache */ |
| 7613 | if (wdl_cache_is_oncxx . . $ wdl_cache_is_on(b126dc7c1de90089).()) |
| 7614 | wdl_preload_cachecxx . . $ wdl_preload_cache(e14fe0a25aa2586c). (key, side, idx); |
| 7615 | } |
| 7616 | } |
| 7617 | |
| 7618 | if (probe_hard_flag) { |
| 7619 | wdl_cachecxx . . $ wdl_cache..hardcxx . . $ WDL_CACHE#hard.++; |
| 7620 | if (!found) { |
| 7621 | wdl_cachecxx . . $ wdl_cache..hardmissescxx . . $ WDL_CACHE#hardmisses.++; |
| 7622 | } |
| 7623 | } else { |
| 7624 | wdl_cachecxx . . $ wdl_cache..softcxx . . $ WDL_CACHE#soft.++; |
| 7625 | if (!found) { |
| 7626 | wdl_cachecxx . . $ wdl_cache..softmissescxx . . $ WDL_CACHE#softmisses.++; |
| 7627 | } |
| 7628 | } |
| 7629 | |
| 7630 | return found; |
| 7631 | } |
| 7632 | |
| 7633 | static bool_tcxx . . $ bool_t# |
| 7634 | get_WDL_from_cachecxx . . $ get_WDL_from_cache(5933a67032aa547c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx, unsigned int *out) |
| 7635 | { |
| 7636 | index_tcxx . . $ index_t# offset; |
| 7637 | index_tcxx . . $ index_t# remainder; |
| 7638 | wdl_block_tcxx . . $ wdl_block_t# *p; |
| 7639 | wdl_block_tcxx . . $ wdl_block_t# *ret; |
| 7640 | |
| 7641 | if (!wdl_cache_is_oncxx . . $ wdl_cache_is_on(b126dc7c1de90089).()) |
| 7642 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7643 | |
| 7644 | split_indexcxx . . $ split_index(a15de8426066f324). (wdl_cachecxx . . $ wdl_cache..entries_per_blockcxx . . $ WDL_CACHE#entries_per_block., idx, &offset, &remainder); |
| 7645 | |
| 7646 | ret = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7647 | for (p = wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top.; p != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; p = p->prevcxx . . $ wdl_block#prev.) { |
| 7648 | |
| 7649 | wdl_cachecxx . . $ wdl_cache..comparisonscxx . . $ WDL_CACHE#comparisons.++; |
| 7650 | |
| 7651 | if (key == p->keycxx . . $ wdl_block#key. && side == p->sidecxx . . $ wdl_block#side. && offset == p->offsetcxx . . $ wdl_block#offset.) { |
| 7652 | ret = p; |
| 7653 | break; |
| 7654 | } |
| 7655 | } |
| 7656 | |
| 7657 | if (ret != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) { |
| 7658 | *out = wdl_extractcxx . . $ wdl_extract(3fae420892153308). (ret->p_arrcxx . . $ wdl_block#p_arr., remainder); |
| 7659 | wdl_movetotopcxx . . $ wdl_movetotop(79585dfb8a48616e).(ret); |
| 7660 | } |
| 7661 | |
| 7662 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("get_wdl_from_cache ok?",(ret != NULL)) |
| 7663 | |
| 7664 | return ret != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7665 | } |
| 7666 | |
| 7667 | static unsigned int |
| 7668 | wdl_extractcxx . . $ wdl_extract(3fae420892153308). (unit_tcxx . . $ unit_t# *uarr, index_tcxx . . $ index_t# x) |
| 7669 | { |
| 7670 | index_tcxx . . $ index_t# width = 2; |
| 7671 | index_tcxx . . $ index_t# nu = x/WDL_entries_per_unitcxx . . $ `gtb-probe.c:2315:9`!; |
| 7672 | index_tcxx . . $ index_t# y = x - (nu * WDL_entries_per_unitcxx . . $ `gtb-probe.c:2315:9`!); |
| 7673 | return (uarr[nu] >> (y*width)) & WDL_entry_maskcxx . . $ `gtb-probe.c:2316:9`!; |
| 7674 | } |
| 7675 | |
| 7676 | static void |
| 7677 | wdl_movetotopcxx . . $ wdl_movetotop(79585dfb8a48616e). (wdl_block_tcxx . . $ wdl_block_t# *t) |
| 7678 | { |
| 7679 | wdl_block_tcxx . . $ wdl_block_t# *s, *nx, *pv; |
| 7680 | |
| 7681 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (t != NULL); |
| 7682 | |
| 7683 | if (t->nextcxx . . $ wdl_block#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) /* at the top already */ |
| 7684 | return; |
| 7685 | |
| 7686 | /* detach */ |
| 7687 | pv = t->prevcxx . . $ wdl_block#prev.; |
| 7688 | nx = t->nextcxx . . $ wdl_block#next.; |
| 7689 | |
| 7690 | if (pv == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) /* at the bottom */ |
| 7691 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot. = nx; |
| 7692 | else |
| 7693 | pv->nextcxx . . $ wdl_block#next. = nx; |
| 7694 | |
| 7695 | if (nx == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) /* at the top */ |
| 7696 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = pv; |
| 7697 | else |
| 7698 | nx->prevcxx . . $ wdl_block#prev. = pv; |
| 7699 | |
| 7700 | /* relocate */ |
| 7701 | s = wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top.; |
| 7702 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (s != NULL); |
| 7703 | if (s == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) |
| 7704 | wdl_cachecxx . . $ wdl_cache..botcxx . . $ WDL_CACHE#bot. = t; |
| 7705 | else |
| 7706 | s->nextcxx . . $ wdl_block#next. = t; |
| 7707 | |
| 7708 | t->nextcxx . . $ wdl_block#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 7709 | t->prevcxx . . $ wdl_block#prev. = s; |
| 7710 | wdl_cachecxx . . $ wdl_cache..topcxx . . $ WDL_CACHE#top. = t; |
| 7711 | |
| 7712 | return; |
| 7713 | } |
| 7714 | |
| 7715 | /****************************************************************************************************/ |
| 7716 | |
| 7717 | static bool_tcxx . . $ bool_t# |
| 7718 | wdl_preload_cachecxx . . $ wdl_preload_cache(e14fe0a25aa2586c). (tbkey_tcxx . . $ tbkey_t# key, unsigned side, index_tcxx . . $ index_t# idx) |
| 7719 | /* output to the least used block of the cache */ |
| 7720 | { |
| 7721 | dtm_block_tcxx . . $ dtm_block_t# *dtm_block; |
| 7722 | wdl_block_tcxx . . $ wdl_block_t# *to_modify; |
| 7723 | bool_tcxx . . $ bool_t# ok; |
| 7724 | |
| 7725 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("wdl preload_cache starts") |
| 7726 | |
| 7727 | if (idx >= egkeycxx . . $ egkey.[key].maxindexcxx . . $ endgamekey#maxindex.) { |
| 7728 | FOLLOW_LULUcxx . . $ `gtb-probe.c:403:10`!("Wrong index", __LINE__, idx) |
| 7729 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7730 | } |
| 7731 | |
| 7732 | /* find fresh block in dtm cache */ |
| 7733 | dtm_block = dtm_cache_pointblockcxx . . $ dtm_cache_pointblock(f0740962f60935df). (key, side, idx); |
| 7734 | |
| 7735 | /* find aged blocked in wdl cache */ |
| 7736 | to_modify = wdl_point_block_to_replacecxx . . $ wdl_point_block_to_replace(e0bb2f31b3742ce1). (); |
| 7737 | |
| 7738 | ok = !(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == dtm_block || NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`! == to_modify); |
| 7739 | |
| 7740 | if (!ok) |
| 7741 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7742 | |
| 7743 | /* transform and move a block */ |
| 7744 | dtm_block_2_wdl_blockcxx . . $ dtm_block_2_wdl_block(b52da10b814976ab).(dtm_block, to_modify, dtm_cachecxx . . $ dtm_cache..entries_per_blockcxx . . $ cache_table#entries_per_block.); |
| 7745 | |
| 7746 | if (ok) { |
| 7747 | index_tcxx . . $ index_t# offset; |
| 7748 | index_tcxx . . $ index_t# remainder; |
| 7749 | split_indexcxx . . $ split_index(a15de8426066f324). (wdl_cachecxx . . $ wdl_cache..entries_per_blockcxx . . $ WDL_CACHE#entries_per_block., idx, &offset, &remainder); |
| 7750 | |
| 7751 | to_modify->keycxx . . $ wdl_block#key. = key; |
| 7752 | to_modify->sidecxx . . $ wdl_block#side. = side; |
| 7753 | to_modify->offsetcxx . . $ wdl_block#offset. = offset; |
| 7754 | } else { |
| 7755 | /* make it unusable */ |
| 7756 | to_modify->keycxx . . $ wdl_block#key. = -1; |
| 7757 | to_modify->sidecxx . . $ wdl_block#side. = gtbNOSIDEcxx . . $ `gtb-probe.c:220:9`!; |
| 7758 | to_modify->offsetcxx . . $ wdl_block#offset. = gtbNOINDEXcxx . . $ `gtb-probe.c:221:9`!; |
| 7759 | } |
| 7760 | |
| 7761 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("wdl preload_cache?", ok) |
| 7762 | |
| 7763 | return ok; |
| 7764 | } |
| 7765 | |
| 7766 | /****************************************************************************************************/ |
| 7767 | |
| 7768 | static void |
| 7769 | dtm_block_2_wdl_blockcxx . . $ dtm_block_2_wdl_block(b52da10b814976ab).(dtm_block_tcxx . . $ dtm_block_t# *g, wdl_block_tcxx . . $ wdl_block_t# *w, size_t n) |
| 7770 | { |
| 7771 | int width = 2; |
| 7772 | int shifting; |
| 7773 | size_t i; |
| 7774 | int j; |
| 7775 | unsigned int x ,y; |
| 7776 | dtm_tcxx . . $ dtm_t# *s = g->p_arrcxx . . $ dtm_block#p_arr.; |
| 7777 | unit_tcxx . . $ unit_t# *d = w->p_arrcxx . . $ wdl_block#p_arr.; |
| 7778 | |
| 7779 | for (i = 0, y = 0; i < n; i++) { |
| 7780 | j = i & 3; /* modulo WDL_entries_per_unit */ |
| 7781 | x = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(s[i]); |
| 7782 | shifting = j * width; |
| 7783 | y |= (x << shifting); |
| 7784 | |
| 7785 | if (j == 3) { |
| 7786 | d[i/WDL_entries_per_unitcxx . . $ `gtb-probe.c:2315:9`!] = (unit_tcxx . . $ unit_t#) y; |
| 7787 | y = 0; |
| 7788 | } |
| 7789 | } |
| 7790 | |
| 7791 | if (0 != (n & 3)) { /* not multiple of 4 */ |
| 7792 | d[(n-1)/WDL_entries_per_unitcxx . . $ `gtb-probe.c:2315:9`!] = (unit_tcxx . . $ unit_t#) y; /* save the rest */ |
| 7793 | y = 0; |
| 7794 | } |
| 7795 | |
| 7796 | return; |
| 7797 | } |
| 7798 | |
| 7799 | static unsigned |
| 7800 | dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(dtm_tcxx . . $ dtm_t# dtm) |
| 7801 | { |
| 7802 | return (unsigned) dtm & 3; |
| 7803 | } |
| 7804 | |
| 7805 | |
| 7806 | /**************************/ |
| 7807 | #ifdef WDL_PROBEcxx . . $ `gtb-probe.c:36:10`! |
| 7808 | |
| 7809 | static unsigned int inv_wdlcxx . . $ inv_wdl(2141b656ce2cc063).(unsigned w); |
| 7810 | static bool_tcxx . . $ bool_t# egtb_get_wdlcxx . . $ egtb_get_wdl(c350d14022cb1c43). (tbkey_tcxx . . $ tbkey_t# k, unsigned stm, const SQUAREcxx . . $ SQUARE# *wS, const SQUAREcxx . . $ SQUARE# *bS, bool_tcxx . . $ bool_t# probe_hard_flag, unsigned int *wdl); |
| 7811 | |
| 7812 | static bool_tcxx . . $ bool_t# |
| 7813 | tb_probe_wdlcxx . . $ tb_probe_wdl(53d0cf497971429f). |
| 7814 | (unsigned stm, |
| 7815 | const SQUAREcxx . . $ SQUARE# *inp_wSQ, |
| 7816 | const SQUAREcxx . . $ SQUARE# *inp_bSQ, |
| 7817 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_wPC, |
| 7818 | const SQ_CONTENTcxx . . $ SQ_CONTENT# *inp_bPC, |
| 7819 | bool_tcxx . . $ bool_t# probingtype, |
| 7820 | /*@out@*/ unsigned *res) |
| 7821 | { |
| 7822 | tbkey_tcxx . . $ tbkey_t# id = -1; |
| 7823 | unsigned int wdl = iUNKNOWNcxx . . $ iUNKNOWN.; |
| 7824 | |
| 7825 | SQUAREcxx . . $ SQUARE# storage_ws [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], storage_bs [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 7826 | SQ_CONTENTcxx . . $ SQ_CONTENT# storage_wp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], storage_bp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 7827 | |
| 7828 | SQUAREcxx . . $ SQUARE# *ws = storage_ws; |
| 7829 | SQUAREcxx . . $ SQUARE# *bs = storage_bs; |
| 7830 | SQ_CONTENTcxx . . $ SQ_CONTENT# *wp = storage_wp; |
| 7831 | SQ_CONTENTcxx . . $ SQ_CONTENT# *bp = storage_bp; |
| 7832 | SQUAREcxx . . $ SQUARE# tmp_ws [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], tmp_bs [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 7833 | SQ_CONTENTcxx . . $ SQ_CONTENT# tmp_wp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!], tmp_bp [MAX_LISTSIZEcxx . . $ `gtb-probe.c:67:9`!]; |
| 7834 | |
| 7835 | SQUAREcxx . . $ SQUARE# *temps; |
| 7836 | bool_tcxx . . $ bool_t# straight = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7837 | |
| 7838 | bool_tcxx . . $ bool_t# okcall = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7839 | unsigned ply_; |
| 7840 | unsigned *ply = &ply_; |
| 7841 | |
| 7842 | /************************************/ |
| 7843 | |
| 7844 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`! (stm == WH || stm == BL); |
| 7845 | |
| 7846 | /* VALID ONLY FOR KK!! */ |
| 7847 | if (inp_wPC[1] == NOPIECEcxx . . $ `gtb-probe.c:175:9`! && inp_bPC[1] == NOPIECEcxx . . $ `gtb-probe.c:175:9`!) { |
| 7848 | index_tcxx . . $ index_t# dummy_i; |
| 7849 | bool_tcxx . . $ bool_t# b = kxk_pctoindexcxx . . $ kxk_pctoindex(9bb041263e557a58). (inp_wSQ, inp_bSQ, &dummy_i); |
| 7850 | *res = b? iDRAWcxx . . $ iDRAW.: iFORBIDcxx . . $ iFORBID.; |
| 7851 | *ply = 0; |
| 7852 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7853 | } |
| 7854 | |
| 7855 | /* copy input */ |
| 7856 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (inp_wPC, wp); |
| 7857 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (inp_bPC, bp); |
| 7858 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (inp_wSQ, ws); |
| 7859 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (inp_bSQ, bs); |
| 7860 | |
| 7861 | sortlistscxx . . $ sortlists(1294880c14e5fd1f). (ws, wp); |
| 7862 | sortlistscxx . . $ sortlists(1294880c14e5fd1f). (bs, bp); |
| 7863 | |
| 7864 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("EGTB_PROBE") |
| 7865 | |
| 7866 | if (egtb_get_idcxx . . $ egtb_get_id(4bccf12db147e54e). (wp, bp, &id)) { |
| 7867 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("got ID",id) |
| 7868 | straight = TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 7869 | } else if (egtb_get_idcxx . . $ egtb_get_id(4bccf12db147e54e). (bp, wp, &id)) { |
| 7870 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("rev ID",id) |
| 7871 | straight = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7872 | list_sq_flipNScxx . . $ list_sq_flipNS(218b13e5e7cbf689). (ws); |
| 7873 | list_sq_flipNScxx . . $ list_sq_flipNS(218b13e5e7cbf689). (bs); |
| 7874 | temps = ws; |
| 7875 | ws = bs; |
| 7876 | bs = temps; |
| 7877 | stm = Oppcxx . . $ `gtb-probe.c:185:9`!(stm); |
| 7878 | /* no enpassant in this fuction, so no adjustment */ |
| 7879 | {SQ_CONTENTcxx . . $ SQ_CONTENT# *tempp = wp; wp = bp; bp = tempp;} /* added */ |
| 7880 | } else { |
| 7881 | #if defined(DEBUG) |
| 7882 | printf("did not get id...\n"); |
| 7883 | output_state (stm, ws, bs, wp, bp); |
| 7884 | #endif |
| 7885 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (iFORBIDcxx . . $ iFORBID., res, ply); |
| 7886 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7887 | } |
| 7888 | |
| 7889 | /* store position... */ |
| 7890 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (wp, tmp_wp); |
| 7891 | list_pc_copycxx . . $ list_pc_copy(b1fdb6ced7ea43e9). (bp, tmp_bp); |
| 7892 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (ws, tmp_ws); |
| 7893 | list_sq_copycxx . . $ list_sq_copy(400e083a04eff154). (bs, tmp_bs); |
| 7894 | |
| 7895 | /* x will be stm and y will be stw */ |
| 7896 | /* |
| 7897 | if (stm == WH) { |
| 7898 | xs = ws; |
| 7899 | xp = wp; |
| 7900 | ys = bs; |
| 7901 | yp = bp; |
| 7902 | } else { |
| 7903 | xs = bs; |
| 7904 | xp = bp; |
| 7905 | ys = ws; |
| 7906 | yp = wp; |
| 7907 | } |
| 7908 | */ |
| 7909 | okcall = egtb_get_wdlcxx . . $ egtb_get_wdl(c350d14022cb1c43). (id, stm, ws, bs, probingtype, &wdl); |
| 7910 | |
| 7911 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("dtmok?",okcall) |
| 7912 | FOLLOW_DTMcxx . . $ `gtb-probe.c:417:10`!("wdl", wdl) |
| 7913 | |
| 7914 | if (okcall) { |
| 7915 | |
| 7916 | /*assert(epsq == NOSQUARE); */ |
| 7917 | |
| 7918 | if (straight) { |
| 7919 | *res = wdl; |
| 7920 | } else { |
| 7921 | *res = inv_wdlcxx . . $ inv_wdl(2141b656ce2cc063). (wdl); |
| 7922 | } |
| 7923 | } else { |
| 7924 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (iFORBIDcxx . . $ iFORBID., res, ply); |
| 7925 | } |
| 7926 | |
| 7927 | return okcall; |
| 7928 | } |
| 7929 | |
| 7930 | static unsigned int |
| 7931 | inv_wdlcxx . . $ inv_wdl(2141b656ce2cc063).(unsigned w) |
| 7932 | { |
| 7933 | unsigned r = tb_UNKNOWNcxx . . $ tb_UNKNOWN.; |
| 7934 | switch (w) { |
| 7935 | case tb_DRAWcxx . . $ tb_DRAW.: r = tb_DRAWcxx . . $ tb_DRAW.; break; |
| 7936 | case tb_WMATEcxx . . $ tb_WMATE.: r = tb_BMATEcxx . . $ tb_BMATE.; break; |
| 7937 | case tb_BMATEcxx . . $ tb_BMATE.: r = tb_WMATEcxx . . $ tb_WMATE.; break; |
| 7938 | case tb_FORBIDcxx . . $ tb_FORBID.: r = tb_FORBIDcxx . . $ tb_FORBID.; break; |
| 7939 | case tb_UNKNOWNcxx . . $ tb_UNKNOWN.: r = tb_UNKNOWNcxx . . $ tb_UNKNOWN.; break; |
| 7940 | default: r = tb_UNKNOWNcxx . . $ tb_UNKNOWN.; break; |
| 7941 | } |
| 7942 | return r; |
| 7943 | } |
| 7944 | |
| 7945 | static bool_tcxx . . $ bool_t# |
| 7946 | egtb_get_wdlcxx . . $ egtb_get_wdl(c350d14022cb1c43). (tbkey_tcxx . . $ tbkey_t# k, unsigned stm, const SQUAREcxx . . $ SQUARE# *wS, const SQUAREcxx . . $ SQUARE# *bS, bool_tcxx . . $ bool_t# probe_hard_flag, unsigned int *wdl) |
| 7947 | { |
| 7948 | bool_tcxx . . $ bool_t# idxavail; |
| 7949 | index_tcxx . . $ index_t# idx; |
| 7950 | dtm_tcxx . . $ dtm_t# *tab[2]; |
| 7951 | bool_tcxx . . $ bool_t# (*pc2idx) (const SQUAREcxx . . $ SQUARE# *, const SQUAREcxx . . $ SQUARE# *, index_tcxx . . $ index_t# *); |
| 7952 | |
| 7953 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("egtb_get_wdl --> starts") |
| 7954 | |
| 7955 | if (egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_MALLOCcxx . . $ STATUS_MALLOC. || egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_STATICRAMcxx . . $ STATUS_STATICRAM.) { |
| 7956 | |
| 7957 | tab[WHcxx . . $ `gtb-probe.c:183:9`!] = egkeycxx . . $ egkey.[k].egt_wcxx . . $ endgamekey#egt_w.; |
| 7958 | tab[BLcxx . . $ `gtb-probe.c:184:9`!] = egkeycxx . . $ egkey.[k].egt_bcxx . . $ endgamekey#egt_b.; |
| 7959 | pc2idx = egkeycxx . . $ egkey.[k].pctoicxx . . $ endgamekey#pctoi.; |
| 7960 | |
| 7961 | idxavail = pc2idx (wS, bS, &idx); |
| 7962 | |
| 7963 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("indexavail (RAM)",idxavail) |
| 7964 | |
| 7965 | if (idxavail) { |
| 7966 | *wdl = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(tab[stm][idx]); |
| 7967 | } else { |
| 7968 | *wdl = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(iFORBIDcxx . . $ iFORBID.); |
| 7969 | } |
| 7970 | |
| 7971 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 7972 | |
| 7973 | } else if (egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_ABSENTcxx . . $ STATUS_ABSENT.) { |
| 7974 | |
| 7975 | pc2idx = egkeycxx . . $ egkey.[k].pctoicxx . . $ endgamekey#pctoi.; |
| 7976 | idxavail = pc2idx (wS, bS, &idx); |
| 7977 | |
| 7978 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("indexavail (HD)",idxavail) |
| 7979 | |
| 7980 | if (idxavail) { |
| 7981 | bool_tcxx . . $ bool_t# success; |
| 7982 | |
| 7983 | /* |
| 7984 | | LOCK |
| 7985 | *-------------------------------*/ |
| 7986 | mythread_mutex_lockcxx . . $ mythread_mutex_lock(4f83bfebf4bb9c8b). (&Egtb_lockcxx . . $ Egtb_lock.); |
| 7987 | |
| 7988 | success = get_WDLcxx . . $ get_WDL(fc2bb21961b34247). (k, stm, idx, wdl, probe_hard_flag); |
| 7989 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("get_wld (succ)",success) |
| 7990 | FOLLOW_LUcxx . . $ `gtb-probe.c:397:10`!("get_wld (wdl )",*wdl) |
| 7991 | |
| 7992 | /* this may not be needed */ |
| 7993 | if (!success) { |
| 7994 | dtm_tcxx . . $ dtm_t# dtm; |
| 7995 | unsigned res, ply; |
| 7996 | if (probe_hard_flag && Uncompressedcxx . . $ Uncompressed.) { |
| 7997 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(Uncompressed); |
| 7998 | success = egtb_filepeekcxx . . $ egtb_filepeek(9d61391afa8ead84). (k, stm, idx, &dtm); |
| 7999 | unpackdistcxx . . $ unpackdist(8e4a5b68d8e5e0d2). (dtm, &res, &ply); |
| 8000 | *wdl = res; |
| 8001 | } |
| 8002 | else |
| 8003 | success = FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 8004 | } |
| 8005 | |
| 8006 | mythread_mutex_unlockcxx . . $ mythread_mutex_unlock(4f83bfebf4bb9c8b). (&Egtb_lockcxx . . $ Egtb_lock.); |
| 8007 | /*------------------------------*\ |
| 8008 | | UNLOCK |
| 8009 | */ |
| 8010 | |
| 8011 | if (success) { |
| 8012 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 8013 | } else { |
| 8014 | if (probe_hard_flag) /* after probing hard and failing, no chance to succeed later */ |
| 8015 | egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. = STATUS_REJECTcxx . . $ STATUS_REJECT.; |
| 8016 | *wdl = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(iUNKNOWNcxx . . $ iUNKNOWN.); |
| 8017 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 8018 | } |
| 8019 | |
| 8020 | } else { |
| 8021 | *wdl = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(iFORBIDcxx . . $ iFORBID.); |
| 8022 | return TRUEcxx . . $ `gtb-probe.c:97:9`!; |
| 8023 | } |
| 8024 | } else if (egkeycxx . . $ egkey.[k].statuscxx . . $ endgamekey#status. == STATUS_REJECTcxx . . $ STATUS_REJECT.) { |
| 8025 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("STATUS_REJECT") |
| 8026 | *wdl = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(iFORBIDcxx . . $ iFORBID.); |
| 8027 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 8028 | } else { |
| 8029 | FOLLOW_labelcxx . . $ `gtb-probe.c:409:10`!("STATUS_WRONG!") |
| 8030 | assertcxx . . $ `<external>/4398592474888995393/assert.h:77:11`!(0); |
| 8031 | *wdl = dtm2WDLcxx . . $ dtm2WDL(909d59720f161188).(iFORBIDcxx . . $ iFORBID.); |
| 8032 | return FALSEcxx . . $ `gtb-probe.c:101:9`!; |
| 8033 | } |
| 8034 | |
| 8035 | } |
| 8036 | #endif |
| 8037 | |
| 8038 | |
| 8039 |