MCPcopy Index your code
hub / github.com/sql-js/sql.js / _sqlite3DecOrHexToI64

Function _sqlite3DecOrHexToI64

js/sql-debug.js:235355–235444  ·  view source on GitHub ↗
($0,$1)

Source from the content-addressed store, hash-verified

235353 STACKTOP = sp;return ($$067$lcssa|0);
235354}
235355function _sqlite3DecOrHexToI64($0,$1) {
235356 $0 = $0|0;
235357 $1 = $1|0;
235358 var $$0$lcssa = 0, $$025 = 0, $$030 = 0, $$lcssa = 0, $$mask = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
235359 var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
235360 var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp$ = 0, label = 0, sp = 0;
235361 sp = STACKTOP;
235362 $2 = HEAP8[$0>>0]|0;
235363 $3 = ($2<<24>>24)==(48);
235364 if (!($3)) {
235365 $46 = (_strlen($0)|0);
235366 $47 = $46 & 1073741823;
235367 $48 = (_sqlite3Atoi64($0,$1,$47,1)|0);
235368 return ($48|0);
235369 }
235370 $4 = ((($0)) + 1|0);
235371 $5 = HEAP8[$4>>0]|0;
235372 switch ($5<<24>>24) {
235373 case 88: case 120: {
235374 $$025 = 2;
235375 break;
235376 }
235377 default: {
235378 $46 = (_strlen($0)|0);
235379 $47 = $46 & 1073741823;
235380 $48 = (_sqlite3Atoi64($0,$1,$47,1)|0);
235381 return ($48|0);
235382 }
235383 }
235384 while(1) {
235385 $6 = (($0) + ($$025)|0);
235386 $7 = HEAP8[$6>>0]|0;
235387 $8 = ($7<<24>>24)==(48);
235388 $9 = (($$025) + 1)|0;
235389 if ($8) {
235390 $$025 = $9;
235391 } else {
235392 break;
235393 }
235394 }
235395 $10 = $7&255;
235396 $11 = (18220 + ($10)|0);
235397 $12 = HEAP8[$11>>0]|0;
235398 $13 = $12 & 8;
235399 $14 = ($13<<24>>24)==(0);
235400 if ($14) {
235401 $$0$lcssa = $$025;$$lcssa = $6;$37 = 0;$40 = 0;
235402 } else {
235403 $$030 = $$025;$15 = 0;$16 = 0;$20 = $7;
235404 while(1) {
235405 $17 = (_bitshift64Shl(($15|0),($16|0),4)|0);
235406 $18 = tempRet0;
235407 $19 = $20 << 24 >> 24;
235408 $21 = $19 >>> 6;
235409 $22 = $21 & 1;
235410 $23 = (0 - ($22))|0;
235411 $24 = $23 & 9;
235412 $25 = (($24) + ($19))|0;

Callers 2

_sqlite3PragmaFunction · 0.85
_codeIntegerFunction · 0.85

Calls 3

_strlenFunction · 0.85
_sqlite3Atoi64Function · 0.85
_bitshift64ShlFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…