MCPcopy
hub / github.com/sql-js/sql.js / _randomFunc

Function _randomFunc

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

Source from the content-addressed store, hash-verified

26710 return;
26711}
26712function _randomFunc($0,$1,$2) {
26713 $0 = $0|0;
26714 $1 = $1|0;
26715 $2 = $2|0;
26716 var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $3 = 0;
26717 var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
26718 sp = STACKTOP;
26719 STACKTOP = STACKTOP + 16|0;
26720 $3 = sp;
26721 _sqlite3_randomness(8,$3);
26722 $4 = $3;
26723 $5 = $4;
26724 $6 = HEAP32[$5>>2]|0;
26725 $7 = (($4) + 4)|0;
26726 $8 = $7;
26727 $9 = HEAP32[$8>>2]|0;
26728 $10 = ($9|0)<(0);
26729 if ($10) {
26730 $11 = $9 & 2147483647;
26731 $12 = (_i64Subtract(0,0,($6|0),($11|0))|0);
26732 $13 = tempRet0;
26733 $14 = $3;
26734 $15 = $14;
26735 HEAP32[$15>>2] = $12;
26736 $16 = (($14) + 4)|0;
26737 $17 = $16;
26738 HEAP32[$17>>2] = $13;
26739 $23 = $12;$24 = $13;
26740 } else {
26741 $23 = $6;$24 = $9;
26742 }
26743 $18 = HEAP32[$0>>2]|0;
26744 $19 = ((($18)) + 8|0);
26745 $20 = HEAP16[$19>>1]|0;
26746 $21 = $20 & 9312;
26747 $22 = ($21<<16>>16)==(0);
26748 if ($22) {
26749 $25 = $18;
26750 $26 = $25;
26751 HEAP32[$26>>2] = $23;
26752 $27 = (($25) + 4)|0;
26753 $28 = $27;
26754 HEAP32[$28>>2] = $24;
26755 HEAP16[$19>>1] = 4;
26756 STACKTOP = sp;return;
26757 } else {
26758 _vdbeReleaseAndSetInt64($18,$23,$24);
26759 STACKTOP = sp;return;
26760 }
26761}
26762function _randomBlob($0,$1,$2) {
26763 $0 = $0|0;
26764 $1 = $1|0;

Callers

nothing calls this directly

Calls 3

_sqlite3_randomnessFunction · 0.85
_i64SubtractFunction · 0.85
_vdbeReleaseAndSetInt64Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…