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

Function _unixRead

js/sql-debug.js:16992–17086  ·  view source on GitHub ↗
($0,$1,$2,$3,$4)

Source from the content-addressed store, hash-verified

16990 return (0)|0;
16991}
16992function _unixRead($0,$1,$2,$3,$4) {
16993 $0 = $0|0;
16994 $1 = $1|0;
16995 $2 = $2|0;
16996 $3 = $3|0;
16997 $4 = $4|0;
16998 var $$0 = 0, $$0$i = 0, $$028$ph$i = 0, $$031$ph$i = 0, $$033$ph$i = 0, $$130$i = 0, $$2$i = 0, $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;
16999 var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
17000 var $9 = 0, label = 0, sp = 0;
17001 sp = STACKTOP;
17002 $5 = ((($0)) + 12|0);
17003 $$028$ph$i = 0;$$031$ph$i = $2;$$033$ph$i = $1;$28 = $4;$7 = $3;
17004 L1: while(1) {
17005 while(1) {
17006 $6 = HEAP32[$5>>2]|0;
17007 $8 = (_lseek($6,$7,0)|0);
17008 $9 = ($8|0)<(0);
17009 if ($9) {
17010 label = 4;
17011 break L1;
17012 }
17013 $13 = HEAP32[(3520)>>2]|0;
17014 $14 = HEAP32[$5>>2]|0;
17015 $15 = (FUNCTION_TABLE_iiii[$13 & 255]($14,$$033$ph$i,$$031$ph$i)|0);
17016 $16 = ($$031$ph$i|0)==($15|0);
17017 if ($16) {
17018 $$130$i = $$031$ph$i;$$2$i = $$028$ph$i;
17019 label = 10;
17020 break L1;
17021 }
17022 $17 = ($15|0)<(0);
17023 if (!($17)) {
17024 break;
17025 }
17026 $18 = (___errno_location()|0);
17027 $19 = HEAP32[$18>>2]|0;
17028 $20 = ($19|0)==(4);
17029 if (!($20)) {
17030 label = 8;
17031 break L1;
17032 }
17033 }
17034 $24 = ($15|0)==(0);
17035 $25 = (($$031$ph$i) - ($15))|0;
17036 $26 = ($15|0)<(0);
17037 $27 = $26 << 31 >> 31;
17038 $29 = (_i64Add(($15|0),($27|0),($7|0),($28|0))|0);
17039 $30 = tempRet0;
17040 $31 = (($15) + ($$028$ph$i))|0;
17041 $32 = (($$033$ph$i) + ($15)|0);
17042 if ($24) {
17043 $$130$i = 0;$$2$i = $$028$ph$i;
17044 label = 10;
17045 break;
17046 } else {
17047 $$028$ph$i = $31;$$031$ph$i = $25;$$033$ph$i = $32;$28 = $30;$7 = $29;
17048 }
17049 }

Callers

nothing calls this directly

Calls 4

_lseekFunction · 0.85
___errno_locationFunction · 0.85
_i64AddFunction · 0.85
_memsetFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…