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

Function _leftFunc

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

Source from the content-addressed store, hash-verified

7922 return;
7923}
7924function _leftFunc($0,$1,$2) {
7925 $0 = $0|0;
7926 $1 = $1|0;
7927 $2 = $2|0;
7928 var $$0 = 0, $$0$i = 0, $$018$i = 0, $$036 = 0, $$1 = 0, $$1$i = 0, $$119$i = 0, $$pre = 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;
7929 var $22 = 0, $23 = 0, $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;
7930 var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
7931 var $59 = 0, $6 = 0, $60 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond$i = 0, $or$cond22$i = 0, label = 0, sp = 0;
7932 sp = STACKTOP;
7933 $3 = ($1|0)==(2);
7934 if (!($3)) {
7935 ___assert_fail((16208|0),(16157|0),1073,(16880|0));
7936 // unreachable;
7937 }
7938 $4 = HEAP32[$2>>2]|0;
7939 $5 = (_sqlite3_value_type($4)|0);
7940 $6 = ($5|0)==(5);
7941 if (!($6)) {
7942 $7 = ((($2)) + 4|0);
7943 $8 = HEAP32[$7>>2]|0;
7944 $9 = (_sqlite3_value_type($8)|0);
7945 $10 = ($9|0)==(5);
7946 if (!($10)) {
7947 $11 = HEAP32[$2>>2]|0;
7948 $12 = (_sqlite3_value_text($11)|0);
7949 $13 = HEAP32[$7>>2]|0;
7950 $14 = (_sqlite3_value_int($13)|0);
7951 $$pre = HEAP8[$12>>0]|0;
7952 $$0 = 0;$$036 = $12;$17 = $$pre;
7953 L7: while(1) {
7954 $15 = ((($$036)) + 1|0);
7955 $16 = $17&255;
7956 $18 = (16403 + ($16)|0);
7957 $19 = HEAP8[$18>>0]|0;
7958 $20 = $19&255;
7959 switch ($19<<24>>24) {
7960 case 4: {
7961 break;
7962 }
7963 case 3: {
7964 $21 = $16 << 6;
7965 $22 = ((($$036)) + 2|0);
7966 $23 = HEAP8[$15>>0]|0;
7967 $24 = $23&255;
7968 $25 = (($24) + ($21))|0;
7969 $$0$i = $22;$$018$i = $25;
7970 label = 9;
7971 break;
7972 }
7973 case 2: {
7974 $$0$i = $15;$$018$i = $16;
7975 label = 9;
7976 break;
7977 }
7978 case 1: {
7979 $$1$i = $15;$$119$i = $16;
7980 label = 10;
7981 break;

Callers

nothing calls this directly

Calls 10

_sqlite3_value_typeFunction · 0.85
_sqlite3_value_textFunction · 0.85
_sqlite3_value_intFunction · 0.85
_sqlite3_mallocFunction · 0.85
_strncpyFunction · 0.85
_sqlite3_result_textFunction · 0.85
_sqlite3_freeFunction · 0.85
_sqlite3_result_nullFunction · 0.85
___assert_failFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…