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

Function _avgFinalize

js/sql-debug.js:29031–29097  ·  view source on GitHub ↗
($0)

Source from the content-addressed store, hash-verified

29029 STACKTOP = sp;return;
29030}
29031function _avgFinalize($0) {
29032 $0 = $0|0;
29033 var $$0$$0$$0$$0$$0$$i$i$i = 0.0, $$0$$0$$0$$0$$0$2$i$i$i = 0.0, $$0$$0$$0$$0$$0$3$i$i$i = 0.0, $$0$i = 0, $1 = 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;
29034 var $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
29035 sp = STACKTOP;
29036 STACKTOP = STACKTOP + 16|0;
29037 $1 = sp + 8|0;
29038 $2 = sp;
29039 $3 = ((($0)) + 8|0);
29040 $4 = HEAP32[$3>>2]|0;
29041 $5 = ((($4)) + 8|0);
29042 $6 = HEAP16[$5>>1]|0;
29043 $7 = $6 & 8192;
29044 $8 = ($7<<16>>16)==(0);
29045 if ($8) {
29046 $9 = (_createAggContext($0,0)|0);
29047 $$0$i = $9;
29048 } else {
29049 $10 = ((($4)) + 16|0);
29050 $11 = HEAP32[$10>>2]|0;
29051 $$0$i = $11;
29052 }
29053 $12 = ($$0$i|0)==(0|0);
29054 if ($12) {
29055 STACKTOP = sp;return;
29056 }
29057 $13 = ((($$0$i)) + 16|0);
29058 $14 = $13;
29059 $15 = $14;
29060 $16 = HEAP32[$15>>2]|0;
29061 $17 = (($14) + 4)|0;
29062 $18 = $17;
29063 $19 = HEAP32[$18>>2]|0;
29064 $20 = ($19|0)>(0);
29065 $21 = ($16>>>0)>(0);
29066 $22 = ($19|0)==(0);
29067 $23 = $22 & $21;
29068 $24 = $20 | $23;
29069 if (!($24)) {
29070 STACKTOP = sp;return;
29071 }
29072 $25 = +HEAPF64[$$0$i>>3];
29073 $26 = (+($16>>>0)) + (4294967296.0*(+($19|0)));
29074 $27 = $25 / $26;
29075 $28 = HEAP32[$0>>2]|0;
29076 $29 = ((($28)) + 8|0);
29077 $30 = HEAP16[$29>>1]|0;
29078 $31 = $30 & 9312;
29079 $32 = ($31<<16>>16)==(0);
29080 if ($32) {
29081 HEAP16[$29>>1] = 1;
29082 } else {
29083 _vdbeMemClearExternAndSetNull($28);
29084 }
29085 HEAPF64[$1>>3] = $27;
29086 $$0$$0$$0$$0$$0$2$i$i$i = +HEAPF64[$1>>3];
29087 HEAPF64[$2>>3] = $$0$$0$$0$$0$$0$2$i$i$i;
29088 $$0$$0$$0$$0$$0$3$i$i$i = +HEAPF64[$1>>3];

Callers

nothing calls this directly

Calls 2

_createAggContextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…