diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index 82daa793c..6f2925910 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -25,8 +25,6 @@ #include "be_constobj.h" #include "be_mapping.h" -#include "be_matter_qrcode_min_js.h" - // Matter logo static const uint8_t MATTER_LOGO[] = "" @@ -40,6 +38,7 @@ static const uint8_t MATTER_LOGO[] = extern const bclass be_class_Matter_Counter; extern const bclass be_class_Matter_Verhoeff; +extern const bclass be_class_Matter_QRCode; #include "solidify/solidified_Matter_Module.h" @@ -133,6 +132,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_TLV.h" #include "solidify/solidified_Matter_IM_Data.h" #include "solidify/solidified_Matter_UDPServer.h" +#include "solidify/solidified_Matter_Expirable.h" #include "solidify/solidified_Matter_Session.h" #include "solidify/solidified_Matter_Commissioning_Data.h" #include "solidify/solidified_Matter_Commissioning.h" @@ -177,7 +177,6 @@ static int matter_CD_FFF1_8000(bvm *vm) { return matter_return_static_bytes(vm, module matter (scope: global, strings: weak) { _LOGO, comptr(MATTER_LOGO) - _QRCODE_MINJS, comptr(QRCODE_MINJS) MATTER_OPTION, int(151) // SetOption151 enables Matter Verhoeff, class(be_class_Matter_Verhoeff) @@ -270,7 +269,12 @@ module matter (scope: global, strings: weak) { UDPPacket_sent, class(be_class_Matter_UDPPacket_sent) UDPServer, class(be_class_Matter_UDPServer) + // Expirable + Expirable, class(be_class_Matter_Expirable) + Expirable_list, class(be_class_Matter_Expirable_list) + // Sessions + Fabric, class(be_class_Matter_Fabric) Session, class(be_class_Matter_Session) Session_Store, class(be_class_Matter_Session_Store) @@ -291,6 +295,9 @@ module matter (scope: global, strings: weak) { IM, class(be_class_Matter_IM) UI, class(be_class_Matter_UI) + // QR Code + QRCode, class(be_class_Matter_QRCode) + // Base38 for QR Code Base38, class(be_class_Matter_Base38) diff --git a/lib/libesp32/berry_matter/src/be_matter_qrcode.c b/lib/libesp32/berry_matter/src/be_matter_qrcode.c new file mode 100644 index 000000000..5bcddef86 --- /dev/null +++ b/lib/libesp32/berry_matter/src/be_matter_qrcode.c @@ -0,0 +1,107 @@ +/* + be_matter_qrcode.cpp - implements Matter QRCode encoder as UTF8 + + Copyright (C) 2023 Stephan Hadinger & Theo Arends + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include "be_constobj.h" +#include "be_mapping.h" +#include "be_mem.h" +#include "be_exec.h" +#include "qrcodegen.h" + +/******************************************************************************************************\ + * + * + * +\******************************************************************************************************/ + +// `matter.QRCode.encode_str(content:string) -> map` +// +int32_t qr_encode_str(bvm *vm) { + int32_t argc = be_top(vm); + if (argc >= 1 && be_isstring(vm, 1)) { + const char * data_str = be_tostring(vm, 1); + size_t data_len = strlen(data_str); + + int32_t qr_version = qrcodegen_getMinFitVersion(qrcodegen_Ecc_MEDIUM, data_len); + if (qr_version <= 0) { be_return_nil(vm); } + int32_t qr_size = qrcodegen_version2size(qr_version); + if (qr_size <= 0) { be_return_nil(vm); } + + uint8_t * qr0 = (uint8_t *) be_os_malloc(qrcodegen_BUFFER_LEN_FOR_VERSION(qr_version)); + if (!qr0) { be_throw(vm, BE_MALLOC_FAIL); } + uint8_t * data_tmp = (uint8_t *) be_os_malloc(qrcodegen_BUFFER_LEN_FOR_VERSION(qr_version)); + if (!qr0) { be_os_free(qr0); be_throw(vm, BE_MALLOC_FAIL); } + + bool ok = qrcodegen_encodeText(data_str, data_tmp, qr0, qrcodegen_Ecc_MEDIUM, qr_version, qr_version, qrcodegen_Mask_AUTO, true); + + if(!ok) { + be_os_free(qr0); + be_os_free(data_tmp); + be_return_nil(vm); + } + + qr_size = qrcodegen_getSize(qr0); + size_t len = qr_size * qr_size; + + be_newobject(vm, "map"); + be_map_insert_int(vm, "size", qr_size); + be_map_insert_int(vm, "version", qr_version); + + be_pushstring(vm, "bitmap"); + be_newobject(vm, "list"); + + for (uint32_t i = 0; i < qr_size; i++) { + char line[qr_size]; + + for (uint32_t j = 0; j < qr_size; j++) { + line[j] = qrcodegen_getModule(qr0, i, j) ? '*' : ' '; + } + + be_pushnstring(vm, line, qr_size); + be_data_push(vm, -2); + be_pop(vm, 1); + } + + be_pop(vm, 1); + be_data_insert(vm, -3); + be_pop(vm, 2); + + be_pop(vm, 1); + + be_os_free(qr0); + be_os_free(data_tmp); + + be_return(vm); + } + be_raise(vm, "type_error", NULL); +} + +#include "be_fixed_be_class_Matter_QRCode.h" + +/* @const_object_info_begin +class be_class_Matter_QRCode (scope: global, name: Matter_QRCode, strings: weak) { + encode_str, static_func(qr_encode_str) + + // UTF8 basic blocs for QR Codes + // empty, str(" ") + // lowhalf, str("\342\226\204") + // uphalf, str("\342\226\200") + // full, str("\342\226\210") +} +@const_object_info_end */ diff --git a/lib/libesp32/berry_matter/src/be_matter_qrcode_min_js.h b/lib/libesp32/berry_matter/src/be_matter_qrcode_min_js.h deleted file mode 100644 index ee97215d0..000000000 --- a/lib/libesp32/berry_matter/src/be_matter_qrcode_min_js.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - be_matter_qrcode_min_js.h - solidify in Flash `qrcode.min.js` for browser-side QRCode generation in Javascript - - Copyright (C) 2023 Stephan Hadinger & Theo Arends - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -// Lib JS from -// from https://github.com/davidshimjs/qrcodejs -// file qrcode.min.js - -// Converter: https://tomeko.net/online_tools/cpp_text_escape.php?lang=en - -/* -The MIT License (MIT) ---------------------- -Copyright (c) 2012 davidshimjs - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -static const uint8_t QRCODE_MINJS[] = -"var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+\"/\"+b);for(var c=0;c=f;f++){var h=0;switch(b){case d.L:h=l[f][0];break;case d.M:h=l[f][1];break;case d.Q:h=l[f][2];break;case d.H:h=l[f][3]}if(h>=e)break;c++}if(c>l.length)throw new Error(\"Too long data\");return c}function s(a){var b=encodeURI(a).toString().replace(/\\%[0-9a-fA-F]{2}/g,\"a\");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+\",\"+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(this.modules[a+c][b+d]=c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?!0:!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=f.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f=g;g++)for(var h=-2;2>=h;h++)this.modules[d+g][e+h]=-2==g||2==g||-2==h||2==h||0==g&&0==h?!0:!1}},setupTypeNumber:function(a){for(var b=f.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=f.getBCHTypeInfo(c),e=0;15>e;e++){var g=!a&&1==(1&d>>e);6>e?this.modules[e][8]=g:8>e?this.modules[e+1][8]=g:this.modules[this.moduleCount-15+e][8]=g}for(var e=0;15>e;e++){var g=!a&&1==(1&d>>e);8>e?this.modules[8][this.moduleCount-e-1]=g:9>e?this.modules[8][15-e-1+1]=g:this.modules[8][15-e-1]=g}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,g=0,h=this.moduleCount-1;h>0;h-=2)for(6==h&&h--;;){for(var i=0;2>i;i++)if(null==this.modules[d][h-i]){var j=!1;g>>e));var k=f.getMask(b,d,h-i);k&&(j=!j),this.modules[d][h-i]=j,e--,-1==e&&(g++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,d){for(var e=j.getRSBlocks(a,c),g=new k,h=0;h8*l)throw new Error(\"code length overflow. (\"+g.getLengthInBits()+\">\"+8*l+\")\");for(g.getLengthInBits()+4<=8*l&&g.put(0,4);0!=g.getLengthInBits()%8;)g.putBit(!1);for(;;){if(g.getLengthInBits()>=8*l)break;if(g.put(b.PAD0,8),g.getLengthInBits()>=8*l)break;g.put(b.PAD1,8)}return b.createBytes(g,e)},b.createBytes=function(a,b){for(var c=0,d=0,e=0,g=new Array(b.length),h=new Array(b.length),j=0;j=0?p.get(q):0}}for(var r=0,m=0;mm;m++)for(var j=0;jm;m++)for(var j=0;j=0;)b^=f.G15<=0;)b^=f.G18<>>=1;return b},getPatternPosition:function(a){return f.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case e.PATTERN000:return 0==(b+c)%2;case e.PATTERN001:return 0==b%2;case e.PATTERN010:return 0==c%3;case e.PATTERN011:return 0==(b+c)%3;case e.PATTERN100:return 0==(Math.floor(b/2)+Math.floor(c/3))%2;case e.PATTERN101:return 0==b*c%2+b*c%3;case e.PATTERN110:return 0==(b*c%2+b*c%3)%2;case e.PATTERN111:return 0==(b*c%3+(b+c)%2)%2;default:throw new Error(\"bad maskPattern:\"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new i([1],0),c=0;a>c;c++)b=b.multiply(new i([1,g.gexp(c)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case c.MODE_NUMBER:return 10;case c.MODE_ALPHA_NUM:return 9;case c.MODE_8BIT_BYTE:return 8;case c.MODE_KANJI:return 8;default:throw new Error(\"mode:\"+a)}else if(27>b)switch(a){case c.MODE_NUMBER:return 12;case c.MODE_ALPHA_NUM:return 11;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 10;default:throw new Error(\"mode:\"+a)}else{if(!(41>b))throw new Error(\"type:\"+b);switch(a){case c.MODE_NUMBER:return 14;case c.MODE_ALPHA_NUM:return 13;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 12;default:throw new Error(\"mode:\"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||(0!=h||0!=i)&&g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0==j||4==j)&&(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},g={glog:function(a){if(1>a)throw new Error(\"glog(\"+a+\")\");return g.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return g.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;8>h;h++)g.EXP_TABLE[h]=1<h;h++)g.EXP_TABLE[h]=g.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8];for(var h=0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=h;i.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),c=0;cf;f++)for(var g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],k=0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlockTable=function(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_TABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},k.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(1&a>>>b-c-1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],o=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function g(a,b){var c=document.createElementNS(\"http://www.w3.org/2000/svg\",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var b=this._htOption,c=this._el,d=a.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),this.clear();var h=g(\"svg\",{viewBox:\"0 0 \"+String(d)+\" \"+String(d),width:\"100%\",height:\"100%\",fill:b.colorLight});h.setAttributeNS(\"http://www.w3.org/2000/xmlns/\",\"xmlns:xlink\",\"http://www.w3.org/1999/xlink\"),c.appendChild(h),h.appendChild(g(\"rect\",{fill:b.colorDark,width:\"1\",height:\"1\",id:\"template\"}));for(var i=0;d>i;i++)for(var j=0;d>j;j++)if(a.isDark(i,j)){var k=g(\"use\",{x:String(i),y:String(j)});k.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\",\"#template\"),h.appendChild(k)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),p=\"svg\"===document.documentElement.tagName.toLowerCase(),q=p?o:m()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL(\"image/png\"),this._elImage.style.display=\"block\",this._elCanvas.style.display=\"none\"}function d(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement(\"img\"),e=function(){c._bSupportDataURI=!1,c._fFail&&_fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,d.src=\"data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\",void 0}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var b=1/window.devicePixelRatio,c=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,d,e,f,g,h,i,j){if(\"nodeName\"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*b;else\"undefined\"==typeof j&&(arguments[1]*=b,arguments[2]*=b,arguments[3]*=b,arguments[4]*=b);c.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=n(),this._htOption=b,this._elCanvas=document.createElement(\"canvas\"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext(\"2d\"),this._bIsPainted=!1,this._elImage=document.createElement(\"img\"),this._elImage.style.display=\"none\",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display=\"none\",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){for(var b=this._htOption,c=this._el,d=a.getModuleCount(),e=Math.floor(b.width/d),f=Math.floor(b.height/d),g=[''],h=0;d>h;h++){g.push(\"\");for(var i=0;d>i;i++)g.push('');g.push(\"\")}g.push(\"
\"),c.innerHTML=g.join(\"\");var j=c.childNodes[0],k=(b.width-j.offsetWidth)/2,l=(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.margin=l+\"px \"+k+\"px\")},a.prototype.clear=function(){this._el.innerHTML=\"\"},a}();QRCode=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:\"#000000\",colorLight:\"#ffffff\",correctLevel:d.H},\"string\"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];\"string\"==typeof a&&(a=document.getElementById(a)),this._android=n(),this._el=a,this._oQRCode=null,this._oDrawing=new q(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(a){this._oQRCode=new b(r(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){\"function\"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}();" -; diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be index e5915023b..6e39b8ff0 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be @@ -48,10 +48,8 @@ class Matter_Commisioning_Context var ResponderEph_priv, ResponderEph_pub var initiatorEph_pub # Session data - var session_timestamp + var created var I2RKey, R2IKey, AttestationChallenge - # is commissioning window open - var window_open def init(responder) import crypto @@ -59,13 +57,11 @@ class Matter_Commisioning_Context self.device = responder.device # generate y once self.y = crypto.random(32) - - self.window_open = true # auto-commissioning for now end def process_incoming(msg) # - if !self.window_open + if !self.device.is_commissioning_open() && msg.opcode >= 0x20 && msg.opcode <= 0x24 tasmota.log("MTR: commissioning not open", 2) return false end @@ -93,7 +89,7 @@ class Matter_Commisioning_Context raise "protocol_error", "invalid PBKDFParamRequest message" end var pbkdfparamreq = matter.PBKDFParamRequest().parse(msg.raw, msg.app_payload_idx) - msg.session.set_mode(matter.Session.__PASE) + msg.session.set_mode_PASE() self.PBKDFParamRequest = msg.raw[msg.app_payload_idx..] @@ -217,7 +213,7 @@ class Matter_Commisioning_Context if self.cA != self.spake.cA raise "protocol_error", "invalid cA received" end # send PakeFinished and compute session key - self.session_timestamp = tasmota.rtc()['utc'] + self.created = tasmota.rtc()['utc'] var session_keys = crypto.HKDF_SHA256().derive(self.Ke, bytes(), bytes().fromstring(self.SEKeys_Info), 48) self.I2RKey = session_keys[0..15] self.R2IKey = session_keys[16..31] @@ -241,19 +237,19 @@ class Matter_Commisioning_Context var raw = resp.encode(status_raw) self.responder.send_response(raw, msg.remote_ip, msg.remote_port, nil) - self.responder.add_session(self.future_local_session_id, self.future_initiator_session_id, self.I2RKey, self.R2IKey, self.AttestationChallenge, self.session_timestamp) + self.responder.add_session(self.future_local_session_id, self.future_initiator_session_id, self.I2RKey, self.R2IKey, self.AttestationChallenge, self.created) end - def find_session_by_destination_id(destinationId, initiatorRandom) + def find_fabric_by_destination_id(destinationId, initiatorRandom) import crypto # Validate Sigma1 Destination ID, p.162 - # traverse all existing sessions + # traverse all existing fabrics tasmota.log("MTR: SEARCHING: destinationId=" + destinationId.tohex(), 3) - for session:self.device.sessions.sessions - if session.noc == nil || session.fabric == nil || session.deviceid == nil continue end + for fabric : self.device.sessions.fabrics + if fabric.noc == nil || fabric.fabric_id == nil || fabric.device_id == nil continue end # compute candidateDestinationId, Section 4.13.2.4.1, “Destination Identifier” - var destinationMessage = initiatorRandom + session.get_ca_pub() + session.get_fabric() + session.get_deviceid() - var key = session.get_ipk_group_key() + var destinationMessage = initiatorRandom + fabric.get_ca_pub() + fabric.fabric_id + fabric.device_id + var key = fabric.get_ipk_group_key() tasmota.log("MTR: SIGMA1: destinationMessage=" + destinationMessage.tohex(), 3) tasmota.log("MTR: SIGMA1: key_ipk=" + key.tohex(), 4) var h = crypto.HMAC_SHA256(key) @@ -261,7 +257,7 @@ class Matter_Commisioning_Context var candidateDestinationId = h.out() tasmota.log("MTR: SIGMA1: candidateDestinationId=" + candidateDestinationId.tohex(), 3) if candidateDestinationId == destinationId - return session + return fabric end end return nil @@ -281,27 +277,29 @@ class Matter_Commisioning_Context var is_resumption = (sigma1.resumptionID != nil && sigma1.initiatorResumeMIC != nil) # Check that it's a resumption - var session + var session = msg.session if is_resumption session = self.device.sessions.find_session_by_resumption_id(sigma1.resumptionID) else - session = self.find_session_by_destination_id(sigma1.destinationId, sigma1.initiatorRandom) + # new CASE session, assign to existing fabric + var fabric = self.find_fabric_by_destination_id(sigma1.destinationId, sigma1.initiatorRandom) + session._fabric = fabric end - if session == nil raise "valuer_error", "StatusReport(GeneralCode: FAILURE, ProtocolId: SECURE_CHANNEL, ProtocolCode: NO_SHARED_TRUST_ROOTS)" end + if session == nil || session._fabric == nil raise "valuer_error", "StatusReport(GeneralCode: FAILURE, ProtocolId: SECURE_CHANNEL, ProtocolCode: NO_SHARED_TRUST_ROOTS)" end session.source_node_id = msg.source_node_id - session.set_mode(matter.Session.__CASE) + session.set_mode_CASE() - if msg.session + if msg.session != session self.device.sessions.remove_session(msg.session) # drop the temporary session that was created end msg.session = session - session._future_initiator_session_id = sigma1.initiator_session_id # update initiator_session_id - session._future_local_session_id = self.device.sessions.gen_local_session_id() - self.future_local_session_id = session._future_local_session_id + session.__future_initiator_session_id = sigma1.initiator_session_id # update initiator_session_id + session.__future_local_session_id = self.device.sessions.gen_local_session_id() + self.future_local_session_id = session.__future_local_session_id tasmota.log("MTR: Loc_session=" + str(self.future_local_session_id)) # Check that it's a resumption - if is_resumption && session.shared_secret != nil + if is_resumption # Resumption p.169 var s1rk_salt = sigma1.initiatorRandom + sigma1.resumptionID var s1rk_info = bytes().fromstring("Sigma1_Resume") @@ -335,7 +333,7 @@ class Matter_Commisioning_Context var sigma2resume = matter.Sigma2Resume() sigma2resume.resumptionID = session.resumption_id - sigma2resume.responderSessionID = session._future_local_session_id + sigma2resume.responderSessionID = session.__future_local_session_id sigma2resume.sigma2ResumeMIC = Resume2MIC # # compute session key, p.178 @@ -346,7 +344,7 @@ class Matter_Commisioning_Context var i2r = session_keys[0..15] var r2i = session_keys[16..31] var ac = session_keys[32..47] - var session_timestamp = tasmota.rtc()['utc'] + var created = tasmota.rtc()['utc'] tasmota.log("MTR: ******************************", 4) tasmota.log("MTR: I2RKey =" + i2r.tohex(), 4) @@ -355,7 +353,7 @@ class Matter_Commisioning_Context tasmota.log("MTR: ******************************", 4) var sigma2resume_raw = sigma2resume.encode() - session._Msg1 = nil + session.__Msg1 = nil tasmota.log("MTR: sigma2resume_raw: " + sigma2resume_raw.tohex(), 4) # now package the response message @@ -365,10 +363,7 @@ class Matter_Commisioning_Context self.responder.send_response(raw, msg.remote_ip, msg.remote_port, resp.message_counter) # session.close() - session.set_keys(i2r, r2i, ac, session_timestamp) - session.set_persist(true) # keep session on flash - session.set_no_expiration() # never expire - session.save() + session.set_keys(i2r, r2i, ac, created) return true else @@ -402,9 +397,9 @@ class Matter_Commisioning_Context # compute TranscriptHash = Crypto_Hash(message = Msg1) tasmota.log("****************************************", 4) - session._Msg1 = sigma1.Msg1 - tasmota.log("MTR: * MSG1 = " + session._Msg1.tohex(), 4) - var TranscriptHash = crypto.SHA256().update(session._Msg1).out() + session.__Msg1 = sigma1.Msg1 + tasmota.log("MTR: * MSG1 = " + session.__Msg1.tohex(), 4) + var TranscriptHash = crypto.SHA256().update(session.__Msg1).out() # Compute S2K, p.175 var s2k_info = bytes().fromstring(self.S2K_Info) @@ -430,7 +425,7 @@ class Matter_Commisioning_Context sigma2.encrypted2 = TBEData2Encrypted tasmota.log("MTR: sigma2: " + matter.inspect(sigma2), 4) var sigma2_raw = sigma2.encode() - session._Msg2 = sigma2_raw + session.__Msg2 = sigma2_raw tasmota.log("MTR: sigma2_raw: " + sigma2_raw.tohex(), 4) # now package the response message @@ -455,10 +450,10 @@ class Matter_Commisioning_Context tasmota.log("****************************************", 4) # compute TranscriptHash = Crypto_Hash(message = Msg1 || Msg2) - var TranscriptHash = crypto.SHA256().update(session._Msg1).update(session._Msg2).out() + var TranscriptHash = crypto.SHA256().update(session.__Msg1).update(session.__Msg2).out() tasmota.log("MTR: * session = " + str(session), 4) - tasmota.log("MTR: session.ipk_epoch_key " + str(session.ipk_epoch_key), 4) - tasmota.log("MTR: session.fabric_compressed " + str(session.fabric_compressed), 4) + tasmota.log("MTR: session.ipk_epoch_key " + str(session.get_ipk_epoch_key()), 4) + tasmota.log("MTR: session.fabric_compressed " + str(session.get_fabric_compressed()), 4) tasmota.log("MTR: * ipk_group_key = " + session.get_ipk_group_key().tohex(), 4) tasmota.log("MTR: * TranscriptHash= " + TranscriptHash.tohex(), 4) @@ -466,7 +461,6 @@ class Matter_Commisioning_Context var s3k = crypto.HKDF_SHA256().derive(session.shared_secret, session.get_ipk_group_key() + TranscriptHash, s3k_info, 16) tasmota.log("****************************************", 4) - # self.ipk_epoch_key == nil || self.fabric_compressed") tasmota.log("MTR: * s3k_salt = " + (session.get_ipk_group_key() + TranscriptHash).tohex(), 4) tasmota.log("MTR: * s3k = " + s3k.tohex(), 4) tasmota.log("****************************************", 4) @@ -518,10 +512,10 @@ class Matter_Commisioning_Context # All good, compute new keys tasmota.log("MTR: Sigma3 verified, computing new keys", 3) - TranscriptHash = crypto.SHA256().update(session._Msg1).update(session._Msg2).update(sigma3.Msg3).out() - # we can now free _Msg1 and _Msg2 - session._Msg1 = nil - session._Msg2 = nil + TranscriptHash = crypto.SHA256().update(session.__Msg1).update(session.__Msg2).update(sigma3.Msg3).out() + # we can now free __Msg1 and __Msg2 + session.__Msg1 = nil + session.__Msg2 = nil tasmota.log("MTR: ******************************", 4) tasmota.log("MTR: shared_secret =" + session.shared_secret.tohex(), 4) @@ -534,7 +528,7 @@ class Matter_Commisioning_Context var i2r = session_keys[0..15] var r2i = session_keys[16..31] var ac = session_keys[32..47] - var session_timestamp = tasmota.rtc()['utc'] + var created = tasmota.rtc()['utc'] tasmota.log("MTR: ******************************", 4) tasmota.log("MTR: I2RKey =" + i2r.tohex(), 4) @@ -555,9 +549,12 @@ class Matter_Commisioning_Context self.responder.send_response(raw, msg.remote_ip, msg.remote_port, resp.message_counter) session.close() - session.set_keys(i2r, r2i, ac, session_timestamp) + session.set_keys(i2r, r2i, ac, created) + + # CASE Session completed, persist it session.set_persist(true) # keep session on flash session.set_no_expiration() # never expire + session.persist_to_fabric() session.save() return true diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be index 79c35541d..a909a7ccc 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be @@ -31,6 +31,8 @@ class Matter_Device var message_handler # `matter.MessageHandler()` object var sessions # `matter.Session_Store()` objet var ui + # Commissioning open + var commissioning_open # timestamp for timeout of commissioning (millis()) or `nil` if closed # information about the device var commissioning_instance_wifi # random instance name for commissioning var commissioning_instance_eth # random instance name for commissioning @@ -67,7 +69,7 @@ class Matter_Device self.commissioning_instance_eth = crypto.random(8).tohex() # 16 characters random hostname self.sessions = matter.Session_Store() - self.sessions.load() + self.sessions.load_fabrics() self.message_handler = matter.MessageHandler(self) self.ui = matter.UI(self) @@ -96,18 +98,35 @@ class Matter_Device end, self) end - self.start_basic_commissioning() + self.init_basic_commissioning() tasmota.add_driver(self) end ############################################################# # Start Basic Commissioning Window - def start_basic_commissioning() + def init_basic_commissioning() # compute PBKDF self.compute_pbkdf(self.passcode) + + # if no fabric is configured, automatically open commissioning at restart + if size(self.sessions.fabrics) == 0 + self.start_basic_commissioning() + end end + ############################################################# + # Start Basic Commissioning Window + def start_basic_commissioning() + self.commissioning_open = tasmota.millis() + 5 * 60 * 1000 + end + + def stop_basic_commissioning() + self.commissioning_open = nil + end + def is_commissioning_open() + return self.commissioning_open != nil + end def finish_commissioning() end @@ -176,6 +195,9 @@ class Matter_Device def every_second() self.sessions.every_second() self.message_handler.every_second() + if self.commissioning_open != nil && tasmota.time_reached(self.commissioning_open) # timeout reached, close provisioning + self.commissioning_open = nil + end end ############################################################# @@ -214,12 +236,12 @@ class Matter_Device end ############################################################# - # start_operational_dicovery + # start_operational_discovery # # Pass control to `device` - def start_operational_dicovery_deferred(session) + def start_operational_discovery_deferred(session) # defer to next click - tasmota.set_timer(0, /-> self.start_operational_dicovery(session)) + tasmota.set_timer(0, /-> self.start_operational_discovery(session)) end ############################################################# @@ -230,7 +252,7 @@ class Matter_Device ############################################################# # Start Operational Discovery - def start_operational_dicovery(session) + def start_operational_discovery(session) import crypto import mdns import string @@ -241,14 +263,10 @@ class Matter_Device self.w1 = nil self.L = nil - # save session as persistant - session.set_no_expiration() - session.set_persist(true) - # close the PASE session, it will be re-opened with a CASE session - session.close() - self.sessions.save() + # we keep the PASE session for 1 minute + session.set_expire_in_seconds(60) - self.mdns_announce_op_discovery(session) + self.mdns_announce_op_discovery(session.get_fabric()) end ############################################################# @@ -611,27 +629,27 @@ class Matter_Device tasmota.log("MTR: Exception" + str(e) + "|" + str(m), 2) end - self.mdns_announce_op_discovery_all_sessions() + self.mdns_announce_op_discovery_all_fabrics() end ############################################################# # Start UDP mDNS announcements for commissioning for all persisted sessions - def mdns_announce_op_discovery_all_sessions() - for session: self.sessions.sessions - if session.get_deviceid() && session.get_fabric() - self.mdns_announce_op_discovery(session) + def mdns_announce_op_discovery_all_fabrics() + for fabric: self.sessions.fabrics + if fabric.get_device_id() && fabric.get_fabric_id() + self.mdns_announce_op_discovery(fabric) end end end ############################################################# # Start UDP mDNS announcements for commissioning - def mdns_announce_op_discovery(session) + def mdns_announce_op_discovery(fabric) import mdns import string try - var device_id = session.get_deviceid().copy().reverse() - var k_fabric = session.get_fabric_compressed() + var device_id = fabric.get_device_id().copy().reverse() + var k_fabric = fabric.get_fabric_compressed() var op_node = k_fabric.tohex() + "-" + device_id.tohex() tasmota.log("MTR: Operational Discovery node = " + op_node, 2) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Expirable.be b/lib/libesp32/berry_matter/src/embedded/Matter_Expirable.be new file mode 100644 index 000000000..6ced61193 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Expirable.be @@ -0,0 +1,208 @@ +# +# Matter_Expirable.be - Support for Matter Expirable and Persistable objects and lists +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +#@ solidify:Matter_Expirable,weak +#@ solidify:Matter_Expirable_list,weak + +################################################################################# +# Matter_Expirable class +# +# Object that can expire after a certain timestamp or +# that does not expire and can be persisted +# +# There are only 3 valid states: +# - not expirable and not persistable +# - expirable and not persistable +# - not expirable and persistable +# - (both expirable and persistable is normally not valid but still supported) +# +################################################################################# +class Matter_Expirable + var _list # the Expirable_list it belongs to (if any) + var _persist # do we persist this sessions or is it remporary (bool) + var _expiration # if not `nil` the entry is removed after this timestamp + + ############################################################# + def init() + self._persist = false + end + + ############################################################# + def set_parent_list(l) + self._list = l + end + def get_parent_list() + return self._list + end + + ############################################################# + def set_persist(p) + self._persist = bool(p) + end + def does_persist() + return self._persist + end + + ############################################################# + # pre and post process when persist + def persist_pre() + end + def persist_post() + end + + ############################################################# + # post process after the object was loaded + def hydrate_post() + end + + ############################################################# + # set absolute time for expiration + def set_no_expiration() + self._expiration = nil + end + + ############################################################# + # set absolute time for expiration + def set_expire_time(t) + self._expiration = int(t) + end + + ############################################################# + # set relative time in the future for expiration (in seconds) + def set_expire_in_seconds(s, now) + if s == nil return end + if now == nil now = tasmota.rtc()['utc'] end + self.set_expire_time(now + s) + end + + ############################################################# + # set relative time in the future for expiration (in seconds) + # returns `true` if expiration date has been reached + def has_expired(now) + if now == nil now = tasmota.rtc()['utc'] end + if self._expiration != nil + return now >= self._expiration + end + return false + end + +end +matter.Expirable = Matter_Expirable + + +################################################################################# +# Matter_Expirable_list class +# +# Subclass of list handling Expirable(s) +# +################################################################################# +class Matter_Expirable_list : list + # no specific attributes + # no specific init() + + ############################################################# + # Accessors with control of arguments classes + def push(o) + if !isinstance(o, matter.Expirable) raise "type_error", "argument must be of class 'Expirable'" end + o.set_parent_list(self) + return super(self).push(o) + end + def setitem(i, o) + if !isinstance(o, matter.Expirable) raise "type_error", "argument must be of class 'Expirable'" end + o.set_parent_list(self) + return super(self).setitem(i, o) + end + + + ############################################################# + # remove_expired + # + # Check is any object has expired + # + # returns `true` if persistable objects were actually removed (i.e. needs to persist again), `false` instead + def remove_expired() + var dirty = false + var i = 0 + while i < size(self) + if self[i].has_expired() + if self[i]._persist dirty = true end # do we need to save + self.remove(i) + else + i += 1 + end + end + return dirty + end + + ############################################################# + # iterator over persistable instances + # + def persistables() + var iterator = self.iter() + var f = def () + while true + var o = iterator() + if o._persist return o end + end + # ends with an exception + end + + return f + end + + ############################################################# + # every_second + def every_second() + self.remove_expired() + end + +end +matter.Expirable_list = Matter_Expirable_list + +#- + +# tests + +a = matter.Expirable() +a.set_persist(true) +b = matter.Expirable() +c = matter.Expirable() +c.set_persist(true) +l = matter.Expirable_list() + + +l.push(a) +l.push(b) +l.push(c) + +print('---') +for e:l print(e) end +print('---') +for e:l.persistables() print(e) end +print('---') + +l.every_second() +print(size(l)) +l[1].set_expire_time(10) +l.every_second() +print(size(l)) + +-# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_IM.be b/lib/libesp32/berry_matter/src/embedded/Matter_IM.be index a7f1bfd99..75972787e 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_IM.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_IM.be @@ -583,8 +583,8 @@ class Matter_IM ret.suppress_response = (size(fake_read.attributes_requests) == 0) # ret is of class `ReportDataMessage` ret.subscription_id = sub.subscription_id - self.send_queue.push(matter.IM_ReportDataSubscribed(session.__message_handler, session, ret, sub)) - self.send_enqueued(session.__message_handler) + self.send_queue.push(matter.IM_ReportDataSubscribed(session._message_handler, session, ret, sub)) + self.send_enqueued(session._message_handler) end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Subscription.be b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Subscription.be index f44f232e1..5809d380d 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Subscription.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Subscription.be @@ -57,6 +57,7 @@ class Matter_IM_Subscription var max_interval = req.max_interval_ceiling if max_interval < 60 max_interval = 60 end if max_interval > 3600 max_interval = 3600 end + max_interval = 60 self.max_interval = max_interval self.fabric_filtered = req.fabric_filtered diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be index a71b2090d..5728f192e 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be @@ -287,7 +287,7 @@ class Matter_Frame resp.message_counter = self.session.counter_snd.next() resp.local_session_id = self.session.initiator_session_id else - resp.message_counter = self.session._counter_insecure_snd.next() + resp.message_counter = self.session.__counter_insecure_snd.next() resp.local_session_id = 0 end @@ -320,8 +320,8 @@ class Matter_Frame resp = matter.Frame(message_handler) end - resp.remote_ip = session.__ip - resp.remote_port = session.__port + resp.remote_ip = session._ip + resp.remote_port = session._port resp.flag_dsiz = 0x00 resp.session = session # also copy the session object @@ -330,14 +330,14 @@ class Matter_Frame resp.message_counter = session.counter_snd.next() resp.local_session_id = session.initiator_session_id else - resp.message_counter = session._counter_insecure_snd.next() + resp.message_counter = session.__counter_insecure_snd.next() resp.local_session_id = 0 end resp.x_flag_i = 1 # we are the initiator resp.opcode = opcode - session.__exchange_id += 1 # move to next exchange_id - resp.exchange_id = session.__exchange_id | 0x10000 # special encoding for local exchange_id + session._exchange_id += 1 # move to next exchange_id + resp.exchange_id = session._exchange_id | 0x10000 # special encoding for local exchange_id resp.protocol_id = 0x0001 # PROTOCOL_ID_INTERACTION_MODEL resp.x_flag_r = reliable ? 1 : 0 @@ -428,8 +428,8 @@ class Matter_Frame var n = bytes() n.add(self.flags, 1) n.add(self.message_counter, 4) - if session.get_mode() == session.__CASE && session.deviceid - n .. session.deviceid + if session.is_CASE() && session.get_device_id() + n .. session.get_device_id() end n.resize(13) # add zeros diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be index b10596445..2f21cba6a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be @@ -62,9 +62,9 @@ class Matter_MessageHandler ### unencrypted session, handled by commissioning var session = self.device.sessions.find_session_source_id_unsecure(frame.source_node_id, 90) # 90 seconds max tasmota.log("MTR: find session by source_node_id = " + str(frame.source_node_id) + "session_id = " + str(session.local_session_id), 3) - if addr session.__ip = addr end - if port session.__port = port end - session.__message_handler = self + if addr session._ip = addr end + if port session._port = port end + session._message_handler = self frame.session = session # check if it's a duplicate @@ -93,9 +93,9 @@ class Matter_MessageHandler tasmota.log("MTR: frame="+matter.inspect(frame), 3) return false end - if addr session.__ip = addr end - if port session.__port = port end - session.__message_handler = self + if addr session._ip = addr end + if port session._port = port end + session._message_handler = self frame.session = session # keep a pointer of the session in the message # check if it's a duplicate @@ -174,13 +174,13 @@ class Matter_MessageHandler end ############################################################# - def add_session(local_session_id, initiator_session_id, i2r, r2i, ac, session_timestamp) + def add_session(local_session_id, initiator_session_id, i2r, r2i, ac, created) import string # create session object tasmota.log(string.format("MTR: add_session local_session_id=%i initiator_session_id=%i", local_session_id, initiator_session_id), 3) var session = self.device.sessions.create_session(local_session_id, initiator_session_id) - session.set_keys(i2r, r2i, ac, session_timestamp) + session.set_keys(i2r, r2i, ac, created) end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be index a2efa33c8..994343ffa 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be @@ -65,7 +65,7 @@ class Matter_Plugin_Root : Matter_Plugin if cluster == 0x0030 # ========== GeneralCommissioning cluster 11.9 p.627 ========== if attribute == 0x0000 # ---------- Breadcrumb ---------- - return TLV.create_TLV(TLV.U8, session.__breadcrumb) + return TLV.create_TLV(TLV.U8, session._breadcrumb) elif attribute == 0x0001 # ---------- BasicCommissioningInfo / BasicCommissioningInfo---------- var bci = TLV.Matter_TLV_struct() bci.add_TLV(0, TLV.U2, 60) # FailSafeExpiryLengthSeconds @@ -123,9 +123,9 @@ class Matter_Plugin_Root : Matter_Plugin end return nwi elif attribute == 0x0001 # ---------- RebootCount u16 ---------- - return TLV.create_TLV(TLV.U2, tasmota.cmd("Status 1")['StatusPRM']['BootCount']) + return TLV.create_TLV(TLV.U2, tasmota.cmd("Status 1", true)['StatusPRM']['BootCount']) elif attribute == 0x0002 # ---------- UpTime u16 ---------- - return TLV.create_TLV(TLV.U4, tasmota.cmd("Status 11")['StatusSTS']['UptimeSec']) + return TLV.create_TLV(TLV.U4, tasmota.cmd("Status 11", true)['StatusSTS']['UptimeSec']) # TODO add later other attributes elif attribute == 0x0008 # ---------- TestEventTriggersEnabled bool ---------- return TLV.create_TLV(TLV.BOOL, false) # false - maybe can set to true @@ -155,8 +155,8 @@ class Matter_Plugin_Root : Matter_Plugin var nocl = TLV.Matter_TLV_array() # NOCs, p.711 for loc_session: self.device.sessions.sessions_active() var nocs = nocl.add_struct(nil) - nocs.add_TLV(1, TLV.B2, loc_session.noc) # NOC - nocs.add_TLV(2, TLV.B2, loc_session.icac) # ICAC + nocs.add_TLV(1, TLV.B2, loc_session.get_noc()) # NOC + nocs.add_TLV(2, TLV.B2, loc_session.get_icac()) # ICAC end return nocl elif attribute == 0x0001 # ---------- Fabrics / list[FabricDescriptorStruct] ---------- @@ -165,14 +165,14 @@ class Matter_Plugin_Root : Matter_Plugin var root_ca_tlv = TLV.parse(loc_session.get_ca()) var fab = fabrics.add_struct(nil) # encoding see p.303 fab.add_TLV(1, TLV.B2, root_ca_tlv.findsubval(9)) # RootPublicKey - fab.add_TLV(2, TLV.U2, loc_session.admin_vendor) # VendorID - fab.add_TLV(3, TLV.U8, loc_session.fabric) # FabricID - fab.add_TLV(4, TLV.U8, loc_session.deviceid) # NodeID - fab.add_TLV(5, TLV.UTF1, loc_session.fabric_label) # Label + fab.add_TLV(2, TLV.U2, loc_session.get_admin_vendor()) # VendorID + fab.add_TLV(3, TLV.U8, loc_session.get_fabric_compressed()) # FabricID + fab.add_TLV(4, TLV.U8, loc_session.get_device_id()) # NodeID + fab.add_TLV(5, TLV.UTF1, loc_session.get_fabric_label()) # Label end return fabrics elif attribute == 0x0002 # ---------- SupportedFabrics / u1 ---------- - return TLV.create_TLV(TLV.U1, 5) # Max 5 fabrics + return TLV.create_TLV(TLV.U1, matter.Fabric._MAX_CASE) # Max 5 fabrics elif attribute == 0x0003 # ---------- CommissionedFabrics / u1 ---------- var sessions_active = self.device.sessions.sessions_active() return TLV.create_TLV(TLV.U1, size(sessions_active)) # number of active sessions @@ -199,21 +199,21 @@ class Matter_Plugin_Root : Matter_Plugin elif attribute == 0x0002 # ---------- VendorID / vendor-id ---------- return TLV.create_TLV(TLV.U2, self.device.vendorid) # Vendor ID reserved for development elif attribute == 0x0003 # ---------- ProductName / string ---------- - return TLV.create_TLV(TLV.UTF1, tasmota.cmd("DeviceName")['DeviceName']) + return TLV.create_TLV(TLV.UTF1, tasmota.cmd("DeviceName", true)['DeviceName']) elif attribute == 0x0004 # ---------- ProductID / u16 (opt) ---------- return TLV.create_TLV(TLV.U2, 32768) # taken from esp-matter example elif attribute == 0x0005 # ---------- NodeLabel / string ---------- - return TLV.create_TLV(TLV.UTF1, tasmota.cmd("FriendlyName")['FriendlyName1']) + return TLV.create_TLV(TLV.UTF1, tasmota.cmd("FriendlyName", true)['FriendlyName1']) elif attribute == 0x0006 # ---------- Location / string ---------- return TLV.create_TLV(TLV.UTF1, "XX") # no location elif attribute == 0x0007 # ---------- HardwareVersion / u16 ---------- return TLV.create_TLV(TLV.U2, 0) elif attribute == 0x0008 # ---------- HardwareVersionString / string ---------- - return TLV.create_TLV(TLV.UTF1, tasmota.cmd("Status 2")['StatusFWR']['Hardware']) + return TLV.create_TLV(TLV.UTF1, tasmota.cmd("Status 2", true)['StatusFWR']['Hardware']) elif attribute == 0x0009 # ---------- SoftwareVersion / u32 ---------- return TLV.create_TLV(TLV.U2, 1) elif attribute == 0x000A # ---------- SoftwareVersionString / string ---------- - return TLV.create_TLV(TLV.UTF1, tasmota.cmd("Status 2")['StatusFWR']['Version']) + return TLV.create_TLV(TLV.UTF1, tasmota.cmd("Status 2", true)['StatusFWR']['Version']) elif attribute == 0x0012 # ---------- UniqueID / string 32 max ---------- return TLV.create_TLV(TLV.UTF1, tasmota.wifi().find("mac", "")) elif attribute == 0x0013 # ---------- CapabilityMinima / CapabilityMinimaStruct ---------- @@ -326,7 +326,7 @@ class Matter_Plugin_Root : Matter_Plugin # 1=DebugText var ExpiryLengthSeconds = val.findsubval(0, 900) var Breadcrumb = val.findsubval(1, 0) - session.__breadcrumb = Breadcrumb + session._breadcrumb = Breadcrumb var afsr = TLV.Matter_TLV_struct() afsr.add_TLV(0, TLV.U1, 0) # ErrorCode = OK @@ -338,7 +338,7 @@ class Matter_Plugin_Root : Matter_Plugin var NewRegulatoryConfig = val.findsubval(0) # RegulatoryLocationType Enum var CountryCode = val.findsubval(1, "XX") var Breadcrumb = val.findsubval(2, 0) - session.__breadcrumb = Breadcrumb + session._breadcrumb = Breadcrumb # create SetRegulatoryConfigResponse # ID=1 # 0=ErrorCode (OK=0) @@ -351,8 +351,10 @@ class Matter_Plugin_Root : Matter_Plugin elif command == 0x0004 # ---------- CommissioningComplete p.636 ---------- # no data - session.__breadcrumb = 0 # clear breadcrumb + session._breadcrumb = 0 # clear breadcrumb + session.fabric_completed() # fabric information is complete, persist session.set_no_expiration() + session.save() # create CommissioningCompleteResponse # ID=1 @@ -456,32 +458,39 @@ class Matter_Plugin_Root : Matter_Plugin session.set_noc(NOCValue, ICACValue) session.set_ipk_epoch_key(IpkValue) - session.admin_subject = CaseAdminSubject - session.admin_vendor = AdminVendorId + session.set_admin_subject_vendor(CaseAdminSubject, AdminVendorId) # extract important information from NOC var noc_cert = matter.TLV.parse(NOCValue) var dnlist = noc_cert.findsub(6) - var fabric = dnlist.findsubval(21) + var fabric_id = dnlist.findsubval(21) var deviceid = dnlist.findsubval(17) - if !fabric || !deviceid + if !fabric_id || !deviceid tasmota.log("MTR: Error: no fabricid nor deviceid in NOC certificate", 2) return false end # convert fo bytes(8) - if type(fabric) == 'int' fabric = int64(fabric).tobytes() else fabric = fabric.tobytes() end + if type(fabric_id) == 'int' fabric_id = int64(fabric_id).tobytes() else fabric_id = fabric_id.tobytes() end if type(deviceid) == 'int' deviceid = int64(deviceid).tobytes() else deviceid = deviceid.tobytes() end var root_ca = matter.TLV.parse(session.get_ca()).findsubval(9) # extract public key from ca root_ca = root_ca[1..] # remove first byte as per Matter specification var info = bytes().fromstring("CompressedFabric") # as per spec, 4.3.2.2 p.99 var hk = crypto.HKDF_SHA256() - var fabric_rev = fabric.copy().reverse() + var fabric_rev = fabric_id.copy().reverse() var k_fabric = hk.derive(root_ca, fabric_rev, info, 8) - session.set_fabric_device(fabric, deviceid, k_fabric) + session.set_fabric_device(fabric_id, deviceid, k_fabric) + + # We have a candidate fabric, add it as expirable for 2 minutes + session.persist_to_fabric() # fabric object is completed, persist it + session.fabric_candidate() # move to next step - self.device.start_operational_dicovery_deferred(session) + self.device.start_operational_discovery_deferred(session) + # session.fabric_completed() + tasmota.log("MTR: ------------------------------------------", 3) + tasmota.log("MTR: fabric=" + matter.inspect(session._fabric), 3) + tasmota.log("MTR: ------------------------------------------", 3) # create NOCResponse # 0=StatusCode # 1=FabricIndex (1-254) (opt) @@ -503,9 +512,9 @@ class Matter_Plugin_Root : Matter_Plugin var sessions_act = self.device.sessions.sessions_active() if index >= 1 && index <= size(sessions_act) var session_deleted = sessions_act[index - 1] - tasmota.log("MTR: removing fabric " + session.fabric.copy().reverse().tohex()) + tasmota.log("MTR: removing fabric " + session.get_fabric_id().copy().reverse().tohex()) self.device.sessions.remove_session() - self.device.sessions.save() + self.device.sessions.save_fabrics() else # TODO return error 11 InvalidFabricIndex end @@ -545,7 +554,7 @@ class Matter_Plugin_Root : Matter_Plugin if attribute == 0x0000 # ---------- Breadcrumb ---------- if type(write_data) == 'int' || isinstance(write_data, int64) - session.__breadcrumb = write_data + session._breadcrumb = write_data self.attribute_updated(ctx.endpoint, ctx.cluster, ctx.attribute) # TODO should we have a more generalized way each time a write_attribute is triggered, declare the attribute as changed? return true else diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Session.be b/lib/libesp32/berry_matter/src/embedded/Matter_Session.be index 76f722410..77fed188a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Session.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Session.be @@ -19,9 +19,196 @@ import matter +#@ solidify:Matter_Fabric,weak #@ solidify:Matter_Session,weak #@ solidify:Matter_Session_Store,weak +# for compilation +class Matter_Expirable end + +################################################################################# +# Matter_Fabric class +# +# Record all information for a fabric that has provisioned +# +# By convetion: +# attributes with a normal name are persisted (unless they are instances) +# attributes starting with '_' are not persisted +# attributes starting with '__' are cleared when a new session is created +################################################################################# +class Matter_Fabric : Matter_Expirable + static var _MAX_CASE = 5 # maximum number of concurrent CASE sessions per fabric + # Group Key Derivation + static var _GROUP_KEY = "GroupKey v1.0" # starting with double `_` means it's not writable + + + var _store # reference back to session store + # timestamp + var created + # list of active sessions + var _sessions # only active CASE sessions that need to be persisted + # our own private key + var no_private_key # private key of the device certificate (generated at commissioning) + # NOC information + var root_ca_certificate # root certificate of the initiator + var noc # Node Operational Certificate in TLV Matter Certificate + var icac # Initiator CA Certificate in TLV Matter Certificate + var ipk_epoch_key # timestamp + # Information extracted from `noc` + var fabric_id # fabric identifier as bytes(8) little endian + var fabric_compressed # comrpessed fabric_id identifier, hashed with root_ca public key + var device_id # our own device id bytes(8) little endian + var fabric_label # set by UpdateFabricLabel + # Admin info extracted from NOC/ICAC + var admin_subject + var admin_vendor + + ############################################################# + def init(store) + import crypto + self._store = store + self._sessions = matter.Expirable_list() + self.fabric_label = "" + self.created = tasmota.rtc()['utc'] + end + + def get_noc() return self.noc end + def get_icac() return self.icac end + def get_ipk_epoch_key() return self.ipk_epoch_key end + def get_fabric_id() return self.fabric_id end + def get_device_id() return self.device_id end + def get_fabric_compressed() return self.fabric_compressed end + def get_fabric_label() return self.fabric_label end + def get_admin_subject() return self.admin_subject end + def get_admin_vendor() return self.admin_vendor end + + ############################################################# + # Operational Group Key Derivation, 4.15.2, p.182 + def get_ipk_group_key() + if self.ipk_epoch_key == nil || self.fabric_compressed == nil return nil end + import crypto + var hk = crypto.HKDF_SHA256() + var info = bytes().fromstring(self._GROUP_KEY) + var hash = hk.derive(self.ipk_epoch_key, self.fabric_compressed, info, 16) + return hash + end + + def get_ca_pub() + var ca = self.root_ca_certificate + if ca + var m = matter.TLV.parse(ca) + return m.findsubval(9) + end + end + + ############################################################# + # add session to list of persisted sessions + # check for duplicates + def add_session(s) + if self._sessions.find(s) == nil + while size(self._sessions) >= self._MAX_CASE + self._sessions.remove(self._sessions.find(self.get_oldest_session())) + end + self._sessions.push(s) + end + end + + def get_oldest_session() return self.get_old_recent_session(true) end + def get_newest_session() return self.get_old_recent_session(false) end + + # get the oldest or most recent session (oldest indicates direction) + def get_old_recent_session(oldest) + if size(self._sessions) == 0 return nil end + var session = self._sessions[0] + var timestamp = session.last_used + + var idx = 1 + while idx < size(self._sessions) + var time2 = self._sessions[idx].last_used + if (oldest ? time2 < timestamp : time2 > timestamp) + session = self._sessions[idx] + timestamp = time2 + end + idx += 1 + end + return session + end + + ############################################################# + # Fabric::to_json() + # + # convert a single entry as json + # returns a JSON string + ############################################################# + def tojson() + import json + import string + import introspect + + var keys = [] + for k : introspect.members(self) + var v = introspect.get(self, k) + if type(v) != 'function' && k[0] != '_' keys.push(k) end + end + keys = matter.sort(keys) + + var r = [] + for k : keys + var v = introspect.get(self, k) + if v == nil continue end + if isinstance(v, bytes) v = "$$" + v.tob64() end # bytes + r.push(string.format("%s:%s", json.dump(str(k)), json.dump(v))) + end + + # add sessions + var s = [] + for sess : self._sessions.persistables() + s.push(sess.tojson()) + end + if size(s) > 0 + var s_list = "[" + s.concat(",") + "]" + r.push('"_sessions":' + s_list) + end + + return "{" + r.concat(",") + "}" + end + + ############################################################# + # fromjson() + # + # reads a map and load arguments + # returns an new instance of fabric + # don't load embedded session, this is done by store + # i.e. ignore any key starting with '_' + ############################################################# + static def fromjson(store, values) + import string + import introspect + var self = matter.Fabric(store) + + for k : values.keys() + if k[0] == '_' continue end # ignore if key starts with '_' + var v = values[k] + # standard values + if type(v) == 'string' + if string.find(v, "0x") == 0 # treat as bytes + introspect.set(self, k, bytes().fromhex(v[2..])) + elif string.find(v, "$$") == 0 # treat as bytes + introspect.set(self, k, bytes().fromb64(v[2..])) + else + introspect.set(self, k, v) + end + else + introspect.set(self, k, v) + end + end + + return self + end + +end +matter.Fabric = Matter_Fabric + ################################################################################# # Matter_Session class # @@ -30,82 +217,103 @@ import matter # # By convention, names starting with `_` are not persisted ################################################################################# -class Matter_Session - static var __PASE = 1 # PASE authentication in progress - static var __CASE = 2 # CASE authentication in progress - var __store # reference back to session store +class Matter_Session : Matter_Expirable + static var _PASE = 1 # PASE authentication in progress + static var _CASE = 2 # CASE authentication in progress + var _store # reference back to session store # mode for Session. Can be PASE=1, CASE=2, Established=10 none=0 var mode + # link to a fabric object, temporary and in construction for PASE, persistent for CASE + var _fabric # sesions var local_session_id # id for the current local session, starts with 1 var initiator_session_id # id used to respond to the initiator - var session_timestamp # timestamp (UTC) when the session was created + var created # timestamp (UTC) when the session was created + var last_used # timestamp (UTC) when the session was last used var source_node_id # source node if bytes(8) (opt, used only when session is not established) # session_ids when the session will be active - var _future_initiator_session_id - var _future_local_session_id + var __future_initiator_session_id + var __future_local_session_id # counters var counter_rcv # counter for incoming messages var counter_snd # counter for outgoing messages - var __exchange_id # exchange id for locally initiated transaction, non-persistent + var _exchange_id # exchange id for locally initiated transaction, non-persistent # keep track of last known IP/Port of the fabric - var __ip # IP of the last received packet - var __port # port of the last received packet - var __message_handler # pointer to the message handler for this session + var _ip # IP of the last received packet + var _port # port of the last received packet + var _message_handler # pointer to the message handler for this session # non-session counters - var _counter_insecure_rcv # counter for incoming messages - var _counter_insecure_snd # counter for outgoing messages + var __counter_insecure_rcv # counter for incoming messages + var __counter_insecure_snd # counter for outgoing messages # encryption keys and challenges var i2rkey # key initiator to receiver (incoming) var r2ikey # key receiver to initiator (outgoing) var _i2r_privacy # cache for the i2r privacy key - var attestation_challenge # Attestation challenge + var attestation_challenge # Attestation challenge var peer_node_id # breadcrumb - var __breadcrumb # breadcrumb attribute for this session, prefix `__` so that it is not persisted and untouched - # our own private key - var no_private_key # private key of the device certificate (generated at commissioning) - # NOC information - var root_ca_certificate # root certificate of the initiator - var noc # Node Operational Certificate in TLV Matter Certificate - var icac # Initiator CA Certificate in TLV Matter Certificate - var ipk_epoch_key # timestamp + var _breadcrumb # breadcrumb attribute for this session, prefix `__` so that it is not persisted and untouched # CASE var resumption_id # bytes(16) - var shared_secret # ECDH shared secret used in CASE - # Information extracted from `noc` - var fabric # fabric identifier as bytes(8) little endian - var fabric_compressed # comrpessed fabric identifier, hashed with root_ca public key - var deviceid # our own device id bytes(8) little endian - var fabric_label # set by UpdateFabricLabel - # Admin info extracted from NOC/ICAC - var admin_subject - var admin_vendor + var shared_secret # ECDH shared secret used in CASE # Previous CASE messages for Transcript hash - var _Msg1, _Msg2 - # Expiration - var _persist # do we persist this sessions or is it remporary - var expiration # if not `nil` the entry is removed after this timestamp + var __Msg1, __Msg2 # below are placeholders for ongoing transactions or chunked responses - var _chunked_attr_reports # if not `nil` holds a container for the current _chuked_attr_reports + var __chunked_attr_reports # if not `nil` holds a container for the current _chuked_attr_reports # Group Key Derivation - static var __GROUP_KEY = "GroupKey v1.0" # starting with double `_` means it's not writable + static var _GROUP_KEY = "GroupKey v1.0" # starting with double `_` means it's not writable ############################################################# - def init(store, local_session_id, initiator_session_id) + def init(store, local_session_id, initiator_session_id, fabric) import crypto - self.__store = store + self._store = store self.mode = 0 self.local_session_id = local_session_id self.initiator_session_id = initiator_session_id self.counter_rcv = matter.Counter() self.counter_snd = matter.Counter() - self._counter_insecure_rcv = matter.Counter() - self._counter_insecure_snd = matter.Counter() - self.__breadcrumb = 0 - self.__exchange_id = crypto.random(2).get(0,2) # generate a random 16 bits number, then increment with rollover + self.__counter_insecure_rcv = matter.Counter() + self.__counter_insecure_snd = matter.Counter() + self._breadcrumb = 0 + self._exchange_id = crypto.random(2).get(0,2) # generate a random 16 bits number, then increment with rollover + + self._fabric = fabric ? fabric : self._store.create_fabric() + self.update() + end + + ############################################################# + # Update the timestamp or any other information + def update() + self.last_used = tasmota.rtc()['utc'] + end + + def set_mode_PASE() self.set_mode(self._PASE) end + def set_mode_CASE() self.set_mode(self._CASE) end + def is_PASE() return self.mode == self._PASE end + def is_CASE() return self.mode == self._CASE end + + ############################################################# + # Register the frabric as complete (end of commissioning) + def fabric_completed() + self._fabric.set_no_expiration() + self._fabric.set_persist(true) + self._store.add_fabric(self._fabric) + end + + ############################################################# + # Register the frabric as complete (end of commissioning) + def fabric_candidate() + self._fabric.set_expire_in_seconds(120) # expire in 2 minutes + self._store.add_fabric(self._fabric) + end + + ############################################################# + # Persist to fabric + # Add self session to the persisted established CASE session of the fabric + def persist_to_fabric() + self._fabric.add_session(self) end ############################################################# @@ -113,9 +321,8 @@ class Matter_Session # def close() # close the PASE session, it will be re-opened with a CASE session - var persist_save = self._persist - self.local_session_id = self._future_local_session_id - self.initiator_session_id = self._future_initiator_session_id + self.local_session_id = self.__future_local_session_id + self.initiator_session_id = self.__future_initiator_session_id self.source_node_id = nil self.counter_rcv.reset() self.counter_snd.reset() @@ -123,18 +330,14 @@ class Matter_Session self._i2r_privacy = nil self.r2ikey = nil self.attestation_challenge = nil - self.fabric_label = "" - # clear any attribute starting with `_` + # clear any attribute starting with `__` import introspect for k : introspect.members(self) var v = introspect.get(self, k) - if type(v) != 'function' && type(v) != 'instance' && k[0] == '_' && k[1] != '_' + if type(v) != 'function' && type(v) != 'instance' && k[0] == '_' && k[1] == '_' self.(k) = nil end end - self._persist = persist_save - # self._future_initiator_session_id = nil - # self._future_local_session_id = nil end ############################################################# @@ -146,30 +349,31 @@ class Matter_Session self._i2r_privacy = nil # clear cache self.r2ikey = r2i self.attestation_challenge = ac - self.session_timestamp = st + self.created = st end def set_ca(ca) - self.root_ca_certificate = ca + self._fabric.root_ca_certificate = ca end def set_noc(noc, icac) - self.noc = noc - self.icac = icac + self._fabric.noc = noc + self._fabric.icac = icac end def set_ipk_epoch_key(ipk_epoch_key) - self.ipk_epoch_key = ipk_epoch_key + self._fabric.ipk_epoch_key = ipk_epoch_key end - def set_fabric_device(fabric, deviceid, fc) - self.fabric = fabric - self.deviceid = deviceid - self.fabric_compressed = fc - self.__store.remove_redundant_session(self) + def set_admin_subject_vendor(admin_subject, admin_vendor) + self._fabric.admin_subject = admin_subject + self._fabric.admin_vendor = admin_vendor end - def set_persist(p) - self._persist = bool(p) + + def set_fabric_device(fabric_id, device_id, fc) + self._fabric.fabric_id = fabric_id + self._fabric.device_id = device_id + self._fabric.fabric_compressed = fc end def set_fabric_label(s) if type(s) == 'string' - self.fabric_label = s + self._fabric.fabric_label = s end end @@ -195,75 +399,45 @@ class Matter_Session return self.attestation_challenge end def get_ca() - return self.root_ca_certificate + return self._fabric.root_ca_certificate end def get_ca_pub() - if self.root_ca_certificate - var m = matter.TLV.parse(self.root_ca_certificate) - return m.findsubval(9) - end + return self._fabric.get_ca_pub() end - def get_noc() return self.noc end - def get_icac() return self.icac end - def get_ipk_epoch_key() return self.ipk_epoch_key end - def get_fabric() return self.fabric end - def get_deviceid() return self.deviceid end - def get_fabric_compressed() return self.fabric_compressed end + def get_fabric() return self._fabric end + def get_noc() return self._fabric.noc end + def get_icac() return self._fabric.icac end + def get_ipk_epoch_key() return self._fabric.ipk_epoch_key end + def get_fabric_id() return self._fabric.fabric_id end + def get_device_id() return self._fabric.device_id end + def get_fabric_compressed() return self._fabric.fabric_compressed end + def get_fabric_label() return self._fabric.fabric_label end + def get_admin_subject() return self._fabric.admin_subject end + def get_admin_vendor() return self._fabric.admin_vendor end ############################################################# # Generate a private key (or retrieve it) def get_pk() - if !self.no_private_key + if !self._fabric.no_private_key import crypto - self.no_private_key = crypto.random(32) + self._fabric.no_private_key = crypto.random(32) end - return self.no_private_key + return self._fabric.no_private_key end ############################################################# # Operational Group Key Derivation, 4.15.2, p.182 def get_ipk_group_key() - if self.ipk_epoch_key == nil || self.fabric_compressed == nil return nil end + if self.get_ipk_epoch_key() == nil || self.get_fabric_compressed() == nil return nil end import crypto var hk = crypto.HKDF_SHA256() - var info = bytes().fromstring(self.__GROUP_KEY) - var hash = hk.derive(self.ipk_epoch_key, self.fabric_compressed, info, 16) + var info = bytes().fromstring(self._GROUP_KEY) + var hash = hk.derive(self.get_ipk_epoch_key(), self.get_fabric_compressed(), info, 16) return hash end ############################################################# - # set absolute time for expiration - def set_no_expiration() - self.expiration = nil - end - - ############################################################# - # set absolute time for expiration - def set_expire_time(t) - self.expiration = int(t) - end - - ############################################################# - # set relative time in the future for expiration (in seconds) - def set_expire_in_seconds(s, now) - if s == nil return end - if now == nil now = tasmota.rtc()['utc'] end - self.set_expire_time(now + s) - end - - ############################################################# - # set relative time in the future for expiration (in seconds) - # returns `true` if expiration date has been reached - def has_expired(now) - if now == nil now = tasmota.rtc()['utc'] end - if self.expiration != nil - return now >= self.expiration - end - return false - end - - ############################################################# - # to_json() + # Session::to_json() # # convert a single entry as json # returns a JSON string @@ -285,29 +459,27 @@ class Matter_Session var v = introspect.get(self, k) if v == nil continue end - if k == "counter_rcv" v = v.val() - elif k == "counter_snd" v = v.val() + 256 # take a margin to avoid reusing the same counter + if k == "counter_rcv" v = v.val() + elif k == "counter_snd" v = v.next() + 256 # take a margin to avoid reusing the same counter + elif isinstance(v, bytes) v = "$$" + v.tob64() # bytes + elif type(v) == 'instance' continue # skip any other instance end - - if isinstance(v, bytes) v = "$$" + v.tob64() end # bytes - # if isinstance(v, bytes) v = "0x" + v.tohex() end - # if type(v) == 'string' v = string.escape(v, true) end r.push(string.format("%s:%s", json.dump(str(k)), json.dump(v))) end return "{" + r.concat(",") + "}" end ############################################################# - # fromjson() + # Session::fromjson() # # reads a map and load arguments # returns an new instance of session ############################################################# - static def fromjson(store, values) + static def fromjson(store, values, fabric) import string import introspect - var self = matter.Session(store) + var self = matter.Session(store, nil, nil, fabric) for k:values.keys() var v = values[k] @@ -335,7 +507,7 @@ class Matter_Session ############################################################# # Callback to Session store def save() - self.__store.save() + self._store.save_fabrics() end ############################################################# @@ -384,16 +556,49 @@ end matter.Session = Matter_Session +################################################################################# +################################################################################# ################################################################################# # Matter_Session_Store class ################################################################################# +################################################################################# +################################################################################# class Matter_Session_Store var sessions - static var FILENAME = "_matter_sessions.json" + var fabrics # list of provisioned fabrics + static var _FABRICS = "_matter_fabrics.json" ############################################################# def init() - self.sessions = [] + self.sessions = matter.Expirable_list() + self.fabrics = matter.Expirable_list() + end + + ############################################################# + # add provisioned fabric + def add_fabric(fabric) + if !isinstance(fabric, matter.Fabric) raise "value_error", "must be of class matter.Fabric" end + if self.fabrics.find(fabric) == nil + self.remove_redundant_fabric(fabric) + self.fabrics.push(fabric) + end + end + + ############################################################# + # Remove redudant fabric + # + # remove all other fabrics that have the same: + # fabric_id / device_id + def remove_redundant_fabric(f) + var i = 0 + while i < size(self.fabrics) + var fabric = self.fabrics[i] + if fabric != f && fabric.fabric_id == f.fabric_id && fabric.device_id == f.device_id + self.fabrics.remove(i) + else + i += 1 + end + end end ############################################################# @@ -422,7 +627,11 @@ class Matter_Session_Store var i = 0 var sessions = self.sessions while i < sz - if sessions[i].local_session_id == id return sessions[i] end + var session = sessions[i] + if session.local_session_id == id + session.update() + return session + end i += 1 end end @@ -434,7 +643,11 @@ class Matter_Session_Store var i = 0 var sessions = self.sessions while i < sz - if sessions[i].source_node_id == nodeid return sessions[i] end + var session = sessions[i] + if session.source_node_id == nodeid + session.update() + return session + end i += 1 end end @@ -454,24 +667,6 @@ class Matter_Session_Store end end - ############################################################# - # Remove session by reference - # - # remove all other sessions that have the same: - # fabric / deviceid / fc - def remove_redundant_session(s) - var i = 0 - var sessions = self.sessions - while i < size(self.sessions) - var session = sessions[i] - if session != s && session.fabric == s.fabric && session.deviceid == s.deviceid #- && session.fabric_compressed == s.fabric_compressed -# - sessions.remove(i) - else - i += 1 - end - end - end - ############################################################# # Generate a new local_session_id def gen_local_session_id() @@ -489,21 +684,14 @@ class Matter_Session_Store ############################################################# # remove_expired # - # Check is any session has expired def remove_expired() - var dirty = false - var i = 0 - var sessions = self.sessions - while i < size(self.sessions) - if sessions[i].has_expired() - if sessions[i]._persist dirty = true end # do we need to save - sessions.remove(i) - else - i += 1 - end - end - if dirty self.save() end + self.sessions.every_second() + self.fabrics.every_second() end + + ############################################################# + # call remove_expired every second + # def every_second() self.remove_expired() end @@ -519,6 +707,7 @@ class Matter_Session_Store self.sessions.push(session) end session.set_expire_in_seconds(expire) + session.update() return session end @@ -529,8 +718,10 @@ class Matter_Session_Store var i = 0 var sessions = self.sessions while i < size(sessions) - if sessions[i].resumption_id == resumption_id - return sessions[i] + var session = sessions[i] + if session.resumption_id == resumption_id && session.shared_secret != nil + session.update() + return session end i += 1 end @@ -545,7 +736,7 @@ class Matter_Session_Store var idx = 0 while idx < size(self.sessions) var session = self.sessions[idx] - if session.get_deviceid() && session.get_fabric() + if session.get_device_id() && session.get_fabric_id() ret.push(session) end idx += 1 @@ -554,61 +745,85 @@ class Matter_Session_Store end ############################################################# - def save() + def save_fabrics() import json self.remove_expired() # clean before saving + var sessions_saved = 0 - var j = [] - for v:self.sessions - if v._persist - j.push(v.tojson()) - end + var fabs = [] + for f : self.fabrics.persistables() + for _ : f._sessions.persistables() sessions_saved += 1 end # count persitable sessions + fabs.push(f.tojson()) end - var j_size = size(j) - j = "[" + j.concat(",") + "]" + var fabs_size = size(fabs) + fabs = "[" + fabs.concat(",") + "]" try import string - var f = open(self.FILENAME, "w") - f.write(j) + + var f = open(self._FABRICS, "w") + f.write(fabs) f.close() - tasmota.log(string.format("MTR: Saved %i session(s)", j_size), 2) - return j + tasmota.log(string.format("MTR: Saved %i fabric(s) and %i session(s)", fabs_size, sessions_saved), 2) except .. as e, m tasmota.log("MTR: Session_Store::save Exception:" + str(e) + "|" + str(m), 2) - return j end end ############################################################# - def load() + # load fabrics and associated sessions + def load_fabrics() import string try - self.sessions = [] # remove any left-over - var f = open(self.FILENAME) - var s = f.read() + self.sessions = matter.Expirable_list() # remove any left-over + self.fabrics = matter.Expirable_list() # remove any left-over + var f = open(self._FABRICS) + var file_content = f.read() f.close() import json - var j = json.load(s) - s = nil + var file_json = json.load(file_content) + file_content = nil tasmota.gc() # clean-up a potential long string - for v:j # iterate on values - var session = matter.Session.fromjson(self, v) - session._persist = true - if session != nil - self.add_session(session) + for v : file_json # iterate on values + # read fabric + var fabric = matter.Fabric.fromjson(self, v) + fabric.set_no_expiration() + fabric.set_persist(true) + + # iterate on sessions + var sessions_json = v.find("_sessions", []) + + for sess_json : sessions_json + var session = matter.Session.fromjson(self, sess_json, fabric) + if session != nil + session.set_no_expiration() + session.set_persist(true) + self.add_session(session) + fabric.add_session(session) + end end + + self.fabrics.push(fabric) end - tasmota.log(string.format("MTR: Loaded %i session(s)", size(self.sessions)), 2) + tasmota.log(string.format("MTR: Loaded %i fabric(s)", size(self.fabrics)), 2) except .. as e, m if e != "io_error" tasmota.log("MTR: Session_Store::load Exception:" + str(e) + "|" + str(m), 2) end end - self.remove_expired() # clean after load + # persistables are normally not expiring + # if self.remove_expired() # clean after load + # self.save_fabrics() + # end + end + + ############################################################# + def create_fabric() + var fabric = matter.Fabric(self) + return fabric end end matter.Session_Store = Matter_Session_Store diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be b/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be index da324f0fa..5bb974818 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be @@ -92,14 +92,14 @@ class Matter_UDPServer var listening # true if active var udp_socket var dispatch_cb # callback to call when a message is received - var packets_sent # map of packets sent to be acknowledged + var packets_sent # list map of packets sent to be acknowledged ############################################################# def init(address, port) self.address = address ? address : "" self.port = port ? port : 5540 self.listening = false - self.packets_sent = {} + self.packets_sent = [] end ############################################################# @@ -157,18 +157,23 @@ class Matter_UDPServer ############################################################# def resend_packets() - for packet:self.packets_sent + var idx = 0 + while idx < size(self.packets_sent) + var packet = self.packets_sent[idx] if tasmota.time_reached(packet.next_try) if packet.retries <= self.RETRIES tasmota.log("MTR: resending packet id=" + str(packet.msg_id), 3) packet.send(self.udp_socket) # resend packet.next_try = tasmota.millis() + packet.backoff_time(packet.retries) packet.retries += 1 + idx += 1 else import string - self.packets_sent.remove(packet.msg_id) + self.packets_sent.remove(idx) tasmota.log(string.format("MTR: target unreachable '[%s]:%i' msg_id=%i", packet.addr, packet.port, packet.msg_id), 2) end + else + idx += 1 end end end @@ -177,9 +182,14 @@ class Matter_UDPServer # just received acknowledgment, remove packet from sender def packet_ack(id) if id == nil return end - if self.packets_sent.contains(id) - self.packets_sent.remove(id) - tasmota.log("MTR: removed packet from sending list id=" + str(id), 4) + var idx = 0 + while idx < size(self.packets_sent) + if self.packets_sent[idx].msg_id == id + self.packets_sent.remove(idx) + tasmota.log("MTR: removed packet from sending list id=" + str(id), 4) + else + idx += 1 + end end end @@ -188,7 +198,7 @@ class Matter_UDPServer var packet = matter.UDPPacket_sent(raw, addr, port, id) packet.send(self.udp_socket) # send if id - self.packets_sent[id] = packet + self.packets_sent.push(packet) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index 54152f38b..7fc9329a0 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -76,6 +76,54 @@ class Matter_UI return matter_enabled end + #- ---------------------------------------------------------------------- -# + #- Show QR Code + #- ---------------------------------------------------------------------- -# + def show_qrcode(qr_text) + import webserver + # QRCode via UTF8 + var empty = " " + var lowhalf = "\342\226\204" + var uphalf = "\342\226\200" + var full = "\342\226\210" + + var qr = matter.QRCode.encode_str(qr_text) + var bitmap = qr['bitmap'] + var sz = qr['size'] + + webserver.content_send('') + + + webserver.content_send("
") + + var s = "
" + webserver.content_send(s) + s = "" + for i: 0 .. sz + 1 s += lowhalf end + s += "
" + webserver.content_send(s) + for i: 0 .. (sz+1)/2 - 1 + s = "
" + full + for j: 0 .. sz - 1 + var high = (bitmap[i*2][j] == " ") + var low = (i*2+1 < sz) ? (bitmap[i*2+1][j] == " ") : true # default to true for bottom margin if size is odd + s += high ? (low ? full : uphalf) : (low ? lowhalf : empty) + end + s += full + s += "
" + webserver.content_send(s) + end + # webserver.content_send("
") + if sz % 2 == 0 + s = "
" + for i: 0 .. sz + 1 s += uphalf end + s += "/
" + webserver.content_send(s) + end + + webserver.content_send("
") + end + #- ---------------------------------------------------------------------- -# #- Show commissioning information and QR Code #- ---------------------------------------------------------------------- -# @@ -83,16 +131,31 @@ class Matter_UI import webserver import string - webserver.content_send("
 Matter Passcode 

") + var seconds_left = (self.device.commissioning_open - tasmota.millis()) / 1000 + if seconds_left < 0 seconds_left = 0 end + var min_left = (seconds_left + 30) / 60 + + webserver.content_send(string.format("
 [ Commissioning open for %i min ] 

", min_left)) var pairing_code = self.device.compute_manual_pairing_code() webserver.content_send(string.format("

Manual pairing code:
%s-%s-%s


", pairing_code[0..3], pairing_code[4..6], pairing_code[7..])) var qr_text = self.device.compute_qrcode_content() - webserver.content_send('
') - webserver.content_send(string.format('', qr_text)) - webserver.content_send(string.format("

%s


", qr_text)) + self.show_qrcode(qr_text) + webserver.content_send(string.format("

%s

", qr_text)) + webserver.content_send("

") + + end + + #- ---------------------------------------------------------------------- -# + #- Show Passcode / discriminator form + #- ---------------------------------------------------------------------- -# + def show_passcode_form() + import webserver + import string + + webserver.content_send("
 Matter Passcode 

") webserver.content_send("
") webserver.content_send("

Passcode:

") webserver.content_send(string.format("", self.device.passcode)) @@ -100,8 +163,6 @@ class Matter_UI webserver.content_send(string.format("", self.device.discriminator)) webserver.content_send(string.format("

IPv4 only

", self.device.ipv4only ? " checked" : "")) webserver.content_send("

") - - webserver.content_send("

") end @@ -109,36 +170,34 @@ class Matter_UI #- ---------------------------------------------------------------------- -# #- Show commissioning information and QR Code #- ---------------------------------------------------------------------- -# - def show_session_info(p) + def show_fabric_info(p) import webserver import string - webserver.content_send("
 Sessions 

") - webserver.content_send("

Existing sessions:

") + webserver.content_send("
 Fabrics 

") + webserver.content_send("

Existing fabrics:

") if size(self.device.sessions.sessions) == 0 webserver.content_send("

None

") else - var i = 0 - var sz = size(self.device.sessions.sessions) - while i < sz - var s = self.device.sessions.sessions[i] - if s.fabric - webserver.content_send(string.format("
 Session %i 

", s.local_session_id)) - if i != 0 webserver.content_send("
") end - var fabric_rev = s.fabric.copy().reverse() - var deviceid_rev = s.deviceid.copy().reverse() - webserver.content_send(string.format("Fabric: %s
", fabric_rev.tohex())) - webserver.content_send(string.format("Device: %s
 ", deviceid_rev.tohex())) + var first = true + for f : self.device.sessions.fabrics.persistables() + if !first webserver.content_send("
") end + first = false - webserver.content_send("
") - webserver.content_send(string.format("", s.local_session_id)) - webserver.content_send("

") - - webserver.content_send("

") - end - i += 1 + webserver.content_send(string.format("
 %s 

", "<No label>")) + + var fabric_rev = f.get_fabric_id().copy().reverse() + var deviceid_rev = f.get_device_id().copy().reverse() + webserver.content_send(string.format("Fabric: %s
", fabric_rev.tohex())) + webserver.content_send(string.format("Device: %s
 ", deviceid_rev.tohex())) + + webserver.content_send("
") + webserver.content_send(string.format("", fabric_rev.tohex())) + webserver.content_send("

") + + webserver.content_send("

") end end @@ -146,17 +205,6 @@ class Matter_UI end - - ####################################################################### - # Serve qrcode.min.js static file - ####################################################################### - def page_qrcode_min_js() - import webserver - - webserver.content_open(200, "text/javascript") - webserver.content_send(matter._QRCODE_MINJS) - end - ####################################################################### # Display the complete page ####################################################################### @@ -169,11 +217,9 @@ class Matter_UI webserver.content_start("Matter") #- title of the web page -# webserver.content_send_style() #- send standard Tasmota styles -# - webserver.content_send('') - if self.show_enable() - self.show_commissioning_info() - self.show_session_info() + self.show_passcode_form() + self.show_fabric_info() end webserver.content_button(webserver.BUTTON_CONFIGURATION) webserver.content_stop() #- end of web page -# @@ -222,12 +268,21 @@ class Matter_UI #- and force restart -# webserver.redirect("/?rst=") - elif webserver.has_arg("del_session") - var session = self.device.sessions.get_session_by_local_session_id(int(webserver.arg("del_session"))) - if session != nil - self.device.sessions.remove_session(session) - self.device.sessions.save() + elif webserver.has_arg("del_fabric") + var del_fabric = webserver.arg("del_fabric") + var idx = 0 + var fabrics = self.device.sessions.fabrics + var dirty = false + while idx < size(fabrics) + var fabric_hex = fabrics[idx].get_fabric_id().copy().reverse().tohex() + if fabric_hex == del_fabric + fabrics.remove(idx) + dirty = true + else + idx += 1 + end end + if dirty self.device.sessions.save_fabrics() end #- and force restart -# webserver.redirect("/?rst=") @@ -246,6 +301,38 @@ class Matter_UI end end + #- display sensor value in the web UI -# + def web_sensor() + import webserver + import string + + var matter_enabled = tasmota.get_option(matter.MATTER_OPTION) + + if matter_enabled + if self.device.commissioning_open + self.show_commissioning_info() + end + + # mtc0 = close, mtc1 = open commissioning + webserver.content_send(string.format("") + else + webserver.content_send(" Close Commissioning") + end + end + end + + def web_get_arg() + import webserver + if webserver.has_arg("mtc0") # Close Commissioning + self.device.stop_basic_commissioning() + elif webserver.has_arg("mtc1") # Open Commissioning + self.device.start_basic_commissioning() + end + end + #- ---------------------------------------------------------------------- -# # respond to web_add_handler() event to register web listeners #- ---------------------------------------------------------------------- -# @@ -255,7 +342,6 @@ class Matter_UI #- we need to register a closure, not just a function, that captures the current instance -# webserver.on("/matterc", / -> self.page_part_mgr(), webserver.HTTP_GET) webserver.on("/matterc", / -> self.page_part_ctl(), webserver.HTTP_POST) - webserver.on("/qrcode.min.js", / -> self.page_qrcode_min_js(), webserver.HTTP_GET) end end matter.UI = Matter_UI diff --git a/lib/libesp32/berry_matter/src/qrcodegen.c b/lib/libesp32/berry_matter/src/qrcodegen.c new file mode 100644 index 000000000..37ee74233 --- /dev/null +++ b/lib/libesp32/berry_matter/src/qrcodegen.c @@ -0,0 +1,1035 @@ +/* + * QR Code generator library (C) + * + * Copyright (c) Project Nayuki. (MIT License) + * https://www.nayuki.io/page/qr-code-generator-library + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * - The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * - The Software is provided "as is", without warranty of any kind, express or + * implied, including but not limited to the warranties of merchantability, + * fitness for a particular purpose and noninfringement. In no event shall the + * authors or copyright holders be liable for any claim, damages or other + * liability, whether in an action of contract, tort or otherwise, arising from, + * out of or in connection with the Software or the use or other dealings in the + * Software. + */ + +#include +#include +#include +#include +#include "qrcodegen.h" + +#ifndef QRCODEGEN_TEST + #define testable static // Keep functions private +#else + #define testable // Expose private functions +#endif + + +/*---- Forward declarations for private functions ----*/ + +// Regarding all public and private functions defined in this source file: +// - They require all pointer/array arguments to be not null unless the array length is zero. +// - They only read input scalar/array arguments, write to output pointer/array +// arguments, and return scalar values; they are "pure" functions. +// - They don't read mutable global variables or write to any global variables. +// - They don't perform I/O, read the clock, print to console, etc. +// - They allocate a small and constant amount of stack memory. +// - They don't allocate or free any memory on the heap. +// - They don't recurse or mutually recurse. All the code +// could be inlined into the top-level public functions. +// - They run in at most quadratic time with respect to input arguments. +// Most functions run in linear time, and some in constant time. +// There are no unbounded loops or non-obvious termination conditions. +// - They are completely thread-safe if the caller does not give the +// same writable buffer to concurrent calls to these functions. + +testable void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen); + +testable void addEccAndInterleave(uint8_t data[], int version, enum qrcodegen_Ecc ecl, uint8_t result[]); +testable int getNumDataCodewords(int version, enum qrcodegen_Ecc ecl); +testable int getNumRawDataModules(int ver); + +testable void calcReedSolomonGenerator(int degree, uint8_t result[]); +testable void calcReedSolomonRemainder(const uint8_t data[], int dataLen, + const uint8_t generator[], int degree, uint8_t result[]); +testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y); + +testable void initializeFunctionModules(int version, uint8_t qrcode[]); +static void drawWhiteFunctionModules(uint8_t qrcode[], int version); +static void drawFormatBits(enum qrcodegen_Ecc ecl, enum qrcodegen_Mask mask, uint8_t qrcode[]); +testable int getAlignmentPatternPositions(int version, uint8_t result[7]); +static void fillRectangle(int left, int top, int width, int height, uint8_t qrcode[]); + +static void drawCodewords(const uint8_t data[], int dataLen, uint8_t qrcode[]); +static void applyMask(const uint8_t functionModules[], uint8_t qrcode[], enum qrcodegen_Mask mask); +static long getPenaltyScore(const uint8_t qrcode[]); +static void addRunToHistory(unsigned char run, unsigned char history[7]); +static bool hasFinderLikePattern(const unsigned char runHistory[7]); + +testable bool getModule(const uint8_t qrcode[], int x, int y); +testable void setModule(uint8_t qrcode[], int x, int y, bool isBlack); +testable void setModuleBounded(uint8_t qrcode[], int x, int y, bool isBlack); +static bool getBit(int x, int i); + +testable int calcSegmentBitLength(enum qrcodegen_Mode mode, size_t numChars); +testable int getTotalBits(const struct qrcodegen_Segment segs[], size_t len, int version); +static int numCharCountBits(enum qrcodegen_Mode mode, int version); + + + +/*---- Private tables of constants ----*/ + +// The set of all legal characters in alphanumeric mode, where each character +// value maps to the index in the string. For checking text and encoding segments. +static const char *ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; + +// For generating error correction codes. +testable const int8_t ECC_CODEWORDS_PER_BLOCK[4][41] = { + // Version: (note that index 0 is for padding, and is set to an illegal value) + //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level + {-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, // Low + {-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28}, // Medium + {-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, // Quartile + {-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, // High +}; + +#define qrcodegen_REED_SOLOMON_DEGREE_MAX 30 // Based on the table above + +// For generating error correction codes. +testable const int8_t NUM_ERROR_CORRECTION_BLOCKS[4][41] = { + // Version: (note that index 0 is for padding, and is set to an illegal value) + //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level + {-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25}, // Low + {-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49}, // Medium + {-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68}, // Quartile + {-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81}, // High +}; + +// For automatic mask pattern selection. +static const int PENALTY_N1 = 3; +static const int PENALTY_N2 = 3; +static const int PENALTY_N3 = 40; +static const int PENALTY_N4 = 10; + + + +/*---- High-level QR Code encoding functions ----*/ + +// Public function - see documentation comment in header file. +bool qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode[], + enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl) { + + size_t textLen = strlen(text); + if (textLen == 0) + return qrcodegen_encodeSegmentsAdvanced(NULL, 0, ecl, minVersion, maxVersion, mask, boostEcl, tempBuffer, qrcode); + size_t bufLen = qrcodegen_BUFFER_LEN_FOR_VERSION(maxVersion); + + struct qrcodegen_Segment seg; + if (qrcodegen_isNumeric(text)) { + if (qrcodegen_calcSegmentBufferSize(qrcodegen_Mode_NUMERIC, textLen) > bufLen) + goto fail; + seg = qrcodegen_makeNumeric(text, tempBuffer); + } else if (qrcodegen_isAlphanumeric(text)) { + if (qrcodegen_calcSegmentBufferSize(qrcodegen_Mode_ALPHANUMERIC, textLen) > bufLen) + goto fail; + seg = qrcodegen_makeAlphanumeric(text, tempBuffer); + } else { + if (textLen > bufLen) + goto fail; + for (size_t i = 0; i < textLen; i++) + tempBuffer[i] = (uint8_t)text[i]; + seg.mode = qrcodegen_Mode_BYTE; + seg.bitLength = calcSegmentBitLength(seg.mode, textLen); + if (seg.bitLength == -1) + goto fail; + seg.numChars = (int)textLen; + seg.data = tempBuffer; + } + return qrcodegen_encodeSegmentsAdvanced(&seg, 1, ecl, minVersion, maxVersion, mask, boostEcl, tempBuffer, qrcode); + +fail: + qrcode[0] = 0; // Set size to invalid value for safety + return false; +} + + +// Public function - see documentation comment in header file. +bool qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcode[], + enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl) { + + struct qrcodegen_Segment seg; + seg.mode = qrcodegen_Mode_BYTE; + seg.bitLength = calcSegmentBitLength(seg.mode, dataLen); + if (seg.bitLength == -1) { + qrcode[0] = 0; // Set size to invalid value for safety + return false; + } + seg.numChars = (int)dataLen; + seg.data = dataAndTemp; + return qrcodegen_encodeSegmentsAdvanced(&seg, 1, ecl, minVersion, maxVersion, mask, boostEcl, dataAndTemp, qrcode); +} + + +// Appends the given number of low-order bits of the given value to the given byte-based +// bit buffer, increasing the bit length. Requires 0 <= numBits <= 16 and val < 2^numBits. +testable void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen) { + assert(0 <= numBits && numBits <= 16 && (unsigned long)val >> numBits == 0); + for (int i = numBits - 1; i >= 0; i--, (*bitLen)++) + buffer[*bitLen >> 3] |= ((val >> i) & 1) << (7 - (*bitLen & 7)); +} + + + +/*---- Low-level QR Code encoding functions ----*/ + +// Public function - see documentation comment in header file. +bool qrcodegen_encodeSegments(const struct qrcodegen_Segment segs[], size_t len, + enum qrcodegen_Ecc ecl, uint8_t tempBuffer[], uint8_t qrcode[]) { + return qrcodegen_encodeSegmentsAdvanced(segs, len, ecl, + qrcodegen_VERSION_MIN, qrcodegen_VERSION_MAX, -1, true, tempBuffer, qrcode); +} + + +// Public function - see documentation comment in header file. +bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], size_t len, enum qrcodegen_Ecc ecl, + int minVersion, int maxVersion, int mask, bool boostEcl, uint8_t tempBuffer[], uint8_t qrcode[]) { + assert(segs != NULL || len == 0); + assert(qrcodegen_VERSION_MIN <= minVersion && minVersion <= maxVersion && maxVersion <= qrcodegen_VERSION_MAX); + assert(0 <= (int)ecl && (int)ecl <= 3 && -1 <= (int)mask && (int)mask <= 7); + + // Find the minimal version number to use + int version, dataUsedBits; + for (version = minVersion; ; version++) { + int dataCapacityBits = getNumDataCodewords(version, ecl) * 8; // Number of data bits available + dataUsedBits = getTotalBits(segs, len, version); + if (dataUsedBits != -1 && dataUsedBits <= dataCapacityBits) + break; // This version number is found to be suitable + if (version >= maxVersion) { // All versions in the range could not fit the given data + qrcode[0] = 0; // Set size to invalid value for safety + return false; + } + } + assert(dataUsedBits != -1); + + // Increase the error correction level while the data still fits in the current version number + for (int i = (int)qrcodegen_Ecc_MEDIUM; i <= (int)qrcodegen_Ecc_HIGH; i++) { // From low to high + if (boostEcl && dataUsedBits <= getNumDataCodewords(version, (enum qrcodegen_Ecc)i) * 8) + ecl = (enum qrcodegen_Ecc)i; + } + + // Concatenate all segments to create the data bit string + memset(qrcode, 0, qrcodegen_BUFFER_LEN_FOR_VERSION(version) * sizeof(qrcode[0])); + int bitLen = 0; + for (size_t i = 0; i < len; i++) { + const struct qrcodegen_Segment *seg = &segs[i]; + appendBitsToBuffer((int)seg->mode, 4, qrcode, &bitLen); + appendBitsToBuffer(seg->numChars, numCharCountBits(seg->mode, version), qrcode, &bitLen); + for (int j = 0; j < seg->bitLength; j++) + appendBitsToBuffer((seg->data[j >> 3] >> (7 - (j & 7))) & 1, 1, qrcode, &bitLen); + } + assert(bitLen == dataUsedBits); + + // Add terminator and pad up to a byte if applicable + int dataCapacityBits = getNumDataCodewords(version, ecl) * 8; + assert(bitLen <= dataCapacityBits); + int terminatorBits = dataCapacityBits - bitLen; + if (terminatorBits > 4) + terminatorBits = 4; + appendBitsToBuffer(0, terminatorBits, qrcode, &bitLen); + appendBitsToBuffer(0, (8 - bitLen % 8) % 8, qrcode, &bitLen); + assert(bitLen % 8 == 0); + + // Pad with alternating bytes until data capacity is reached + for (uint8_t padByte = 0xEC; bitLen < dataCapacityBits; padByte ^= 0xEC ^ 0x11) + appendBitsToBuffer(padByte, 8, qrcode, &bitLen); + + // Draw function and data codeword modules + addEccAndInterleave(qrcode, version, ecl, tempBuffer); + initializeFunctionModules(version, qrcode); + drawCodewords(tempBuffer, getNumRawDataModules(version) / 8, qrcode); + drawWhiteFunctionModules(qrcode, version); + initializeFunctionModules(version, tempBuffer); + + // Handle masking + if (mask == qrcodegen_Mask_AUTO) { // Automatically choose best mask + long minPenalty = LONG_MAX; + for (int i = 0; i < 8; i++) { + enum qrcodegen_Mask msk = (enum qrcodegen_Mask)i; + applyMask(tempBuffer, qrcode, msk); + drawFormatBits(ecl, msk, qrcode); + long penalty = getPenaltyScore(qrcode); + if (penalty < minPenalty) { + mask = msk; + minPenalty = penalty; + } + applyMask(tempBuffer, qrcode, msk); // Undoes the mask due to XOR + } + } + assert(0 <= (int)mask && (int)mask <= 7); + applyMask(tempBuffer, qrcode, mask); + drawFormatBits(ecl, mask, qrcode); + return true; +} + + + +/*---- Error correction code generation functions ----*/ + +// Appends error correction bytes to each block of the given data array, then interleaves +// bytes from the blocks and stores them in the result array. data[0 : dataLen] contains +// the input data. data[dataLen : rawCodewords] is used as a temporary work area and will +// be clobbered by this function. The final answer is stored in result[0 : rawCodewords]. +testable void addEccAndInterleave(uint8_t data[], int version, enum qrcodegen_Ecc ecl, uint8_t result[]) { + // Calculate parameter numbers + assert(0 <= (int)ecl && (int)ecl < 4 && qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX); + int numBlocks = NUM_ERROR_CORRECTION_BLOCKS[(int)ecl][version]; + int blockEccLen = ECC_CODEWORDS_PER_BLOCK [(int)ecl][version]; + int rawCodewords = getNumRawDataModules(version) / 8; + int dataLen = getNumDataCodewords(version, ecl); + int numShortBlocks = numBlocks - rawCodewords % numBlocks; + int shortBlockDataLen = rawCodewords / numBlocks - blockEccLen; + + // Split data into blocks, calculate ECC, and interleave + // (not concatenate) the bytes into a single sequence + uint8_t generator[qrcodegen_REED_SOLOMON_DEGREE_MAX]; + calcReedSolomonGenerator(blockEccLen, generator); + const uint8_t *dat = data; + for (int i = 0; i < numBlocks; i++) { + int datLen = shortBlockDataLen + (i < numShortBlocks ? 0 : 1); + uint8_t *ecc = &data[dataLen]; // Temporary storage + calcReedSolomonRemainder(dat, datLen, generator, blockEccLen, ecc); + for (int j = 0, k = i; j < datLen; j++, k += numBlocks) { // Copy data + if (j == shortBlockDataLen) + k -= numShortBlocks; + result[k] = dat[j]; + } + for (int j = 0, k = dataLen + i; j < blockEccLen; j++, k += numBlocks) // Copy ECC + result[k] = ecc[j]; + dat += datLen; + } +} + + +// Returns the number of 8-bit codewords that can be used for storing data (not ECC), +// for the given version number and error correction level. The result is in the range [9, 2956]. +testable int getNumDataCodewords(int version, enum qrcodegen_Ecc ecl) { + int v = version, e = (int)ecl; + assert(0 <= e && e < 4); + return getNumRawDataModules(v) / 8 + - ECC_CODEWORDS_PER_BLOCK [e][v] + * NUM_ERROR_CORRECTION_BLOCKS[e][v]; +} + + +// Returns the number of data bits that can be stored in a QR Code of the given version number, after +// all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8. +// The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table. +testable int getNumRawDataModules(int ver) { + assert(qrcodegen_VERSION_MIN <= ver && ver <= qrcodegen_VERSION_MAX); + int result = (16 * ver + 128) * ver + 64; + if (ver >= 2) { + int numAlign = ver / 7 + 2; + result -= (25 * numAlign - 10) * numAlign - 55; + if (ver >= 7) + result -= 36; + } + return result; +} + + + +/*---- Reed-Solomon ECC generator functions ----*/ + +// Calculates the Reed-Solomon generator polynomial of the given degree, storing in result[0 : degree]. +testable void calcReedSolomonGenerator(int degree, uint8_t result[]) { + // Start with the monomial x^0 + assert(1 <= degree && degree <= qrcodegen_REED_SOLOMON_DEGREE_MAX); + memset(result, 0, degree * sizeof(result[0])); + result[degree - 1] = 1; + + // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}), + // drop the highest term, and store the rest of the coefficients in order of descending powers. + // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D). + uint8_t root = 1; + for (int i = 0; i < degree; i++) { + // Multiply the current product by (x - r^i) + for (int j = 0; j < degree; j++) { + result[j] = finiteFieldMultiply(result[j], root); + if (j + 1 < degree) + result[j] ^= result[j + 1]; + } + root = finiteFieldMultiply(root, 0x02); + } +} + + +// Calculates the remainder of the polynomial data[0 : dataLen] when divided by the generator[0 : degree], where all +// polynomials are in big endian and the generator has an implicit leading 1 term, storing the result in result[0 : degree]. +testable void calcReedSolomonRemainder(const uint8_t data[], int dataLen, + const uint8_t generator[], int degree, uint8_t result[]) { + + // Perform polynomial division + assert(1 <= degree && degree <= qrcodegen_REED_SOLOMON_DEGREE_MAX); + memset(result, 0, degree * sizeof(result[0])); + for (int i = 0; i < dataLen; i++) { + uint8_t factor = data[i] ^ result[0]; + memmove(&result[0], &result[1], (degree - 1) * sizeof(result[0])); + result[degree - 1] = 0; + for (int j = 0; j < degree; j++) + result[j] ^= finiteFieldMultiply(generator[j], factor); + } +} + +#undef qrcodegen_REED_SOLOMON_DEGREE_MAX + + +// Returns the product of the two given field elements modulo GF(2^8/0x11D). +// All inputs are valid. This could be implemented as a 256*256 lookup table. +testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y) { + // Russian peasant multiplication + uint8_t z = 0; + for (int i = 7; i >= 0; i--) { + z = (z << 1) ^ ((z >> 7) * 0x11D); + z ^= ((y >> i) & 1) * x; + } + return z; +} + + + +/*---- Drawing function modules ----*/ + +// Clears the given QR Code grid with white modules for the given +// version's size, then marks every function module as black. +testable void initializeFunctionModules(int version, uint8_t qrcode[]) { + // Initialize QR Code + int qrsize = version * 4 + 17; + memset(qrcode, 0, ((qrsize * qrsize + 7) / 8 + 1) * sizeof(qrcode[0])); + qrcode[0] = (uint8_t)qrsize; + + // Fill horizontal and vertical timing patterns + fillRectangle(6, 0, 1, qrsize, qrcode); + fillRectangle(0, 6, qrsize, 1, qrcode); + + // Fill 3 finder patterns (all corners except bottom right) and format bits + fillRectangle(0, 0, 9, 9, qrcode); + fillRectangle(qrsize - 8, 0, 8, 9, qrcode); + fillRectangle(0, qrsize - 8, 9, 8, qrcode); + + // Fill numerous alignment patterns + uint8_t alignPatPos[7]; + int numAlign = getAlignmentPatternPositions(version, alignPatPos); + for (int i = 0; i < numAlign; i++) { + for (int j = 0; j < numAlign; j++) { + // Don't draw on the three finder corners + if (!((i == 0 && j == 0) || (i == 0 && j == numAlign - 1) || (i == numAlign - 1 && j == 0))) + fillRectangle(alignPatPos[i] - 2, alignPatPos[j] - 2, 5, 5, qrcode); + } + } + + // Fill version blocks + if (version >= 7) { + fillRectangle(qrsize - 11, 0, 3, 6, qrcode); + fillRectangle(0, qrsize - 11, 6, 3, qrcode); + } +} + + +// Draws white function modules and possibly some black modules onto the given QR Code, without changing +// non-function modules. This does not draw the format bits. This requires all function modules to be previously +// marked black (namely by initializeFunctionModules()), because this may skip redrawing black function modules. +static void drawWhiteFunctionModules(uint8_t qrcode[], int version) { + // Draw horizontal and vertical timing patterns + int qrsize = qrcodegen_getSize(qrcode); + for (int i = 7; i < qrsize - 7; i += 2) { + setModule(qrcode, 6, i, false); + setModule(qrcode, i, 6, false); + } + + // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules) + for (int dy = -4; dy <= 4; dy++) { + for (int dx = -4; dx <= 4; dx++) { + int dist = abs(dx); + if (abs(dy) > dist) + dist = abs(dy); + if (dist == 2 || dist == 4) { + setModuleBounded(qrcode, 3 + dx, 3 + dy, false); + setModuleBounded(qrcode, qrsize - 4 + dx, 3 + dy, false); + setModuleBounded(qrcode, 3 + dx, qrsize - 4 + dy, false); + } + } + } + + // Draw numerous alignment patterns + uint8_t alignPatPos[7]; + int numAlign = getAlignmentPatternPositions(version, alignPatPos); + for (int i = 0; i < numAlign; i++) { + for (int j = 0; j < numAlign; j++) { + if ((i == 0 && j == 0) || (i == 0 && j == numAlign - 1) || (i == numAlign - 1 && j == 0)) + continue; // Don't draw on the three finder corners + for (int dy = -1; dy <= 1; dy++) { + for (int dx = -1; dx <= 1; dx++) + setModule(qrcode, alignPatPos[i] + dx, alignPatPos[j] + dy, dx == 0 && dy == 0); + } + } + } + + // Draw version blocks + if (version >= 7) { + // Calculate error correction code and pack bits + int rem = version; // version is uint6, in the range [7, 40] + for (int i = 0; i < 12; i++) + rem = (rem << 1) ^ ((rem >> 11) * 0x1F25); + long bits = (long)version << 12 | rem; // uint18 + assert(bits >> 18 == 0); + + // Draw two copies + for (int i = 0; i < 6; i++) { + for (int j = 0; j < 3; j++) { + int k = qrsize - 11 + j; + setModule(qrcode, k, i, (bits & 1) != 0); + setModule(qrcode, i, k, (bits & 1) != 0); + bits >>= 1; + } + } + } +} + + +// Draws two copies of the format bits (with its own error correction code) based +// on the given mask and error correction level. This always draws all modules of +// the format bits, unlike drawWhiteFunctionModules() which might skip black modules. +static void drawFormatBits(enum qrcodegen_Ecc ecl, enum qrcodegen_Mask mask, uint8_t qrcode[]) { + // Calculate error correction code and pack bits + assert(0 <= (int)mask && (int)mask <= 7); + static const int table[] = {1, 0, 3, 2}; + int data = table[(int)ecl] << 3 | (int)mask; // errCorrLvl is uint2, mask is uint3 + int rem = data; + for (int i = 0; i < 10; i++) + rem = (rem << 1) ^ ((rem >> 9) * 0x537); + int bits = (data << 10 | rem) ^ 0x5412; // uint15 + assert(bits >> 15 == 0); + + // Draw first copy + for (int i = 0; i <= 5; i++) + setModule(qrcode, 8, i, getBit(bits, i)); + setModule(qrcode, 8, 7, getBit(bits, 6)); + setModule(qrcode, 8, 8, getBit(bits, 7)); + setModule(qrcode, 7, 8, getBit(bits, 8)); + for (int i = 9; i < 15; i++) + setModule(qrcode, 14 - i, 8, getBit(bits, i)); + + // Draw second copy + int qrsize = qrcodegen_getSize(qrcode); + for (int i = 0; i < 8; i++) + setModule(qrcode, qrsize - 1 - i, 8, getBit(bits, i)); + for (int i = 8; i < 15; i++) + setModule(qrcode, 8, qrsize - 15 + i, getBit(bits, i)); + setModule(qrcode, 8, qrsize - 8, true); // Always black +} + + +// Calculates and stores an ascending list of positions of alignment patterns +// for this version number, returning the length of the list (in the range [0,7]). +// Each position is in the range [0,177), and are used on both the x and y axes. +// This could be implemented as lookup table of 40 variable-length lists of unsigned bytes. +testable int getAlignmentPatternPositions(int version, uint8_t result[7]) { + if (version == 1) + return 0; + int numAlign = version / 7 + 2; + int step = (version == 32) ? 26 : + (version*4 + numAlign*2 + 1) / (numAlign*2 - 2) * 2; + for (int i = numAlign - 1, pos = version * 4 + 10; i >= 1; i--, pos -= step) + result[i] = pos; + result[0] = 6; + return numAlign; +} + + +// Sets every pixel in the range [left : left + width] * [top : top + height] to black. +static void fillRectangle(int left, int top, int width, int height, uint8_t qrcode[]) { + for (int dy = 0; dy < height; dy++) { + for (int dx = 0; dx < width; dx++) + setModule(qrcode, left + dx, top + dy, true); + } +} + + + +/*---- Drawing data modules and masking ----*/ + +// Draws the raw codewords (including data and ECC) onto the given QR Code. This requires the initial state of +// the QR Code to be black at function modules and white at codeword modules (including unused remainder bits). +static void drawCodewords(const uint8_t data[], int dataLen, uint8_t qrcode[]) { + int qrsize = qrcodegen_getSize(qrcode); + int i = 0; // Bit index into the data + // Do the funny zigzag scan + for (int right = qrsize - 1; right >= 1; right -= 2) { // Index of right column in each column pair + if (right == 6) + right = 5; + for (int vert = 0; vert < qrsize; vert++) { // Vertical counter + for (int j = 0; j < 2; j++) { + int x = right - j; // Actual x coordinate + bool upward = ((right + 1) & 2) == 0; + int y = upward ? qrsize - 1 - vert : vert; // Actual y coordinate + if (!getModule(qrcode, x, y) && i < dataLen * 8) { + bool black = getBit(data[i >> 3], 7 - (i & 7)); + setModule(qrcode, x, y, black); + i++; + } + // If this QR Code has any remainder bits (0 to 7), they were assigned as + // 0/false/white by the constructor and are left unchanged by this method + } + } + } + assert(i == dataLen * 8); +} + + +// XORs the codeword modules in this QR Code with the given mask pattern. +// The function modules must be marked and the codeword bits must be drawn +// before masking. Due to the arithmetic of XOR, calling applyMask() with +// the same mask value a second time will undo the mask. A final well-formed +// QR Code needs exactly one (not zero, two, etc.) mask applied. +static void applyMask(const uint8_t functionModules[], uint8_t qrcode[], enum qrcodegen_Mask mask) { + assert(0 <= (int)mask && (int)mask <= 7); // Disallows qrcodegen_Mask_AUTO + int qrsize = qrcodegen_getSize(qrcode); + for (int y = 0; y < qrsize; y++) { + for (int x = 0; x < qrsize; x++) { + if (getModule(functionModules, x, y)) + continue; + bool invert; + switch ((int)mask) { + case 0: invert = (x + y) % 2 == 0; break; + case 1: invert = y % 2 == 0; break; + case 2: invert = x % 3 == 0; break; + case 3: invert = (x + y) % 3 == 0; break; + case 4: invert = (x / 3 + y / 2) % 2 == 0; break; + case 5: invert = x * y % 2 + x * y % 3 == 0; break; + case 6: invert = (x * y % 2 + x * y % 3) % 2 == 0; break; + case 7: invert = ((x + y) % 2 + x * y % 3) % 2 == 0; break; + default: assert(false); return; + } + bool val = getModule(qrcode, x, y); + setModule(qrcode, x, y, val ^ invert); + } + } +} + + +// Calculates and returns the penalty score based on state of the given QR Code's current modules. +// This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score. +static long getPenaltyScore(const uint8_t qrcode[]) { + int qrsize = qrcodegen_getSize(qrcode); + long result = 0; + + // Adjacent modules in row having same color, and finder-like patterns + for (int y = 0; y < qrsize; y++) { + unsigned char runHistory[7] = {0}; + bool color = false; + unsigned char runX = 0; + for (int x = 0; x < qrsize; x++) { + if (getModule(qrcode, x, y) == color) { + runX++; + if (runX == 5) + result += PENALTY_N1; + else if (runX > 5) + result++; + } else { + addRunToHistory(runX, runHistory); + if (!color && hasFinderLikePattern(runHistory)) + result += PENALTY_N3; + color = getModule(qrcode, x, y); + runX = 1; + } + } + addRunToHistory(runX, runHistory); + if (color) + addRunToHistory(0, runHistory); // Dummy run of white + if (hasFinderLikePattern(runHistory)) + result += PENALTY_N3; + } + // Adjacent modules in column having same color, and finder-like patterns + for (int x = 0; x < qrsize; x++) { + unsigned char runHistory[7] = {0}; + bool color = false; + unsigned char runY = 0; + for (int y = 0; y < qrsize; y++) { + if (getModule(qrcode, x, y) == color) { + runY++; + if (runY == 5) + result += PENALTY_N1; + else if (runY > 5) + result++; + } else { + addRunToHistory(runY, runHistory); + if (!color && hasFinderLikePattern(runHistory)) + result += PENALTY_N3; + color = getModule(qrcode, x, y); + runY = 1; + } + } + addRunToHistory(runY, runHistory); + if (color) + addRunToHistory(0, runHistory); // Dummy run of white + if (hasFinderLikePattern(runHistory)) + result += PENALTY_N3; + } + + // 2*2 blocks of modules having same color + for (int y = 0; y < qrsize - 1; y++) { + for (int x = 0; x < qrsize - 1; x++) { + bool color = getModule(qrcode, x, y); + if ( color == getModule(qrcode, x + 1, y) && + color == getModule(qrcode, x, y + 1) && + color == getModule(qrcode, x + 1, y + 1)) + result += PENALTY_N2; + } + } + + // Balance of black and white modules + int black = 0; + for (int y = 0; y < qrsize; y++) { + for (int x = 0; x < qrsize; x++) { + if (getModule(qrcode, x, y)) + black++; + } + } + int total = qrsize * qrsize; // Note that size is odd, so black/total != 1/2 + // Compute the smallest integer k >= 0 such that (45-5k)% <= black/total <= (55+5k)% + int k = (int)((labs(black * 20L - total * 10L) + total - 1) / total) - 1; + result += k * PENALTY_N4; + return result; +} + + +// Inserts the given value to the front of the given array, which shifts over the +// existing values and deletes the last value. A helper function for getPenaltyScore(). +static void addRunToHistory(unsigned char run, unsigned char history[7]) { + memmove(&history[1], &history[0], 6 * sizeof(history[0])); + history[0] = run; +} + + +// Tests whether the given run history has the pattern of ratio 1:1:3:1:1 in the middle, and +// surrounded by at least 4 on either or both ends. A helper function for getPenaltyScore(). +// Must only be called immediately after a run of white modules has ended. +static bool hasFinderLikePattern(const unsigned char runHistory[7]) { + unsigned char n = runHistory[1]; + // The maximum QR Code size is 177, hence the run length n <= 177. + // Arithmetic is promoted to int, so n*4 will not overflow. + return n > 0 && runHistory[2] == n && runHistory[4] == n && runHistory[5] == n + && runHistory[3] == n * 3 && (runHistory[0] >= n * 4 || runHistory[6] >= n * 4); +} + + + +/*---- Basic QR Code information ----*/ + +// Public function - see documentation comment in header file. +int qrcodegen_getSize(const uint8_t qrcode[]) { + assert(qrcode != NULL); + int result = qrcode[0]; + assert((qrcodegen_VERSION_MIN * 4 + 17) <= result + && result <= (qrcodegen_VERSION_MAX * 4 + 17)); + return result; +} + + +// Public function - see documentation comment in header file. +bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y) { + assert(qrcode != NULL); + int qrsize = qrcode[0]; + return (0 <= x && x < qrsize && 0 <= y && y < qrsize) && getModule(qrcode, x, y); +} + + +// Gets the module at the given coordinates, which must be in bounds. +testable bool getModule(const uint8_t qrcode[], int x, int y) { + int qrsize = qrcode[0]; + assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize); + int index = y * qrsize + x; + return getBit(qrcode[(index >> 3) + 1], index & 7); +} + + +// Sets the module at the given coordinates, which must be in bounds. +testable void setModule(uint8_t qrcode[], int x, int y, bool isBlack) { + int qrsize = qrcode[0]; + assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize); + int index = y * qrsize + x; + int bitIndex = index & 7; + int byteIndex = (index >> 3) + 1; + if (isBlack) + qrcode[byteIndex] |= 1 << bitIndex; + else + qrcode[byteIndex] &= (1 << bitIndex) ^ 0xFF; +} + + +// Sets the module at the given coordinates, doing nothing if out of bounds. +testable void setModuleBounded(uint8_t qrcode[], int x, int y, bool isBlack) { + int qrsize = qrcode[0]; + if (0 <= x && x < qrsize && 0 <= y && y < qrsize) + setModule(qrcode, x, y, isBlack); +} + + +// Returns true iff the i'th bit of x is set to 1. Requires x >= 0 and 0 <= i <= 14. +static bool getBit(int x, int i) { + return ((x >> i) & 1) != 0; +} + + + +/*---- Segment handling ----*/ + +// Public function - see documentation comment in header file. +bool qrcodegen_isAlphanumeric(const char *text) { + assert(text != NULL); + for (; *text != '\0'; text++) { + if (strchr(ALPHANUMERIC_CHARSET, *text) == NULL) + return false; + } + return true; +} + + +// Public function - see documentation comment in header file. +bool qrcodegen_isNumeric(const char *text) { + assert(text != NULL); + for (; *text != '\0'; text++) { + if (*text < '0' || *text > '9') + return false; + } + return true; +} + + +// Public function - see documentation comment in header file. +size_t qrcodegen_calcSegmentBufferSize(enum qrcodegen_Mode mode, size_t numChars) { + int temp = calcSegmentBitLength(mode, numChars); + if (temp == -1) + return SIZE_MAX; + assert(0 <= temp && temp <= INT16_MAX); + return ((size_t)temp + 7) / 8; +} + + +// Returns the number of data bits needed to represent a segment +// containing the given number of characters using the given mode. Notes: +// - Returns -1 on failure, i.e. numChars > INT16_MAX or +// the number of needed bits exceeds INT16_MAX (i.e. 32767). +// - Otherwise, all valid results are in the range [0, INT16_MAX]. +// - For byte mode, numChars measures the number of bytes, not Unicode code points. +// - For ECI mode, numChars must be 0, and the worst-case number of bits is returned. +// An actual ECI segment can have shorter data. For non-ECI modes, the result is exact. +testable int calcSegmentBitLength(enum qrcodegen_Mode mode, size_t numChars) { + // All calculations are designed to avoid overflow on all platforms + if (numChars > (unsigned int)INT16_MAX) + return -1; + long result = (long)numChars; + if (mode == qrcodegen_Mode_NUMERIC) + result = (result * 10 + 2) / 3; // ceil(10/3 * n) + else if (mode == qrcodegen_Mode_ALPHANUMERIC) + result = (result * 11 + 1) / 2; // ceil(11/2 * n) + else if (mode == qrcodegen_Mode_BYTE) + result *= 8; + else if (mode == qrcodegen_Mode_KANJI) + result *= 13; + else if (mode == qrcodegen_Mode_ECI && numChars == 0) + result = 3 * 8; + else { // Invalid argument + assert(false); + return -1; + } + assert(result >= 0); + if ((unsigned int)result > (unsigned int)INT16_MAX) + return -1; + return (int)result; +} + + +// Public function - see documentation comment in header file. +struct qrcodegen_Segment qrcodegen_makeBytes(const uint8_t data[], size_t len, uint8_t buf[]) { + assert(data != NULL || len == 0); + struct qrcodegen_Segment result; + result.mode = qrcodegen_Mode_BYTE; + result.bitLength = calcSegmentBitLength(result.mode, len); + assert(result.bitLength != -1); + result.numChars = (int)len; + if (len > 0) + memcpy(buf, data, len * sizeof(buf[0])); + result.data = buf; + return result; +} + + +// Public function - see documentation comment in header file. +struct qrcodegen_Segment qrcodegen_makeNumeric(const char *digits, uint8_t buf[]) { + assert(digits != NULL); + struct qrcodegen_Segment result; + size_t len = strlen(digits); + result.mode = qrcodegen_Mode_NUMERIC; + int bitLen = calcSegmentBitLength(result.mode, len); + assert(bitLen != -1); + result.numChars = (int)len; + if (bitLen > 0) + memset(buf, 0, ((size_t)bitLen + 7) / 8 * sizeof(buf[0])); + result.bitLength = 0; + + unsigned int accumData = 0; + int accumCount = 0; + for (; *digits != '\0'; digits++) { + char c = *digits; + assert('0' <= c && c <= '9'); + accumData = accumData * 10 + (unsigned int)(c - '0'); + accumCount++; + if (accumCount == 3) { + appendBitsToBuffer(accumData, 10, buf, &result.bitLength); + accumData = 0; + accumCount = 0; + } + } + if (accumCount > 0) // 1 or 2 digits remaining + appendBitsToBuffer(accumData, accumCount * 3 + 1, buf, &result.bitLength); + assert(result.bitLength == bitLen); + result.data = buf; + return result; +} + + +// Public function - see documentation comment in header file. +struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char *text, uint8_t buf[]) { + assert(text != NULL); + struct qrcodegen_Segment result; + size_t len = strlen(text); + result.mode = qrcodegen_Mode_ALPHANUMERIC; + int bitLen = calcSegmentBitLength(result.mode, len); + assert(bitLen != -1); + result.numChars = (int)len; + if (bitLen > 0) + memset(buf, 0, ((size_t)bitLen + 7) / 8 * sizeof(buf[0])); + result.bitLength = 0; + + unsigned int accumData = 0; + int accumCount = 0; + for (; *text != '\0'; text++) { + const char *temp = strchr(ALPHANUMERIC_CHARSET, *text); + assert(temp != NULL); + accumData = accumData * 45 + (unsigned int)(temp - ALPHANUMERIC_CHARSET); + accumCount++; + if (accumCount == 2) { + appendBitsToBuffer(accumData, 11, buf, &result.bitLength); + accumData = 0; + accumCount = 0; + } + } + if (accumCount > 0) // 1 character remaining + appendBitsToBuffer(accumData, 6, buf, &result.bitLength); + assert(result.bitLength == bitLen); + result.data = buf; + return result; +} + + +// Public function - see documentation comment in header file. +struct qrcodegen_Segment qrcodegen_makeEci(long assignVal, uint8_t buf[]) { + struct qrcodegen_Segment result; + result.mode = qrcodegen_Mode_ECI; + result.numChars = 0; + result.bitLength = 0; + if (assignVal < 0) { + assert(false); + } else if (assignVal < (1 << 7)) { + memset(buf, 0, 1 * sizeof(buf[0])); + appendBitsToBuffer(assignVal, 8, buf, &result.bitLength); + } else if (assignVal < (1 << 14)) { + memset(buf, 0, 2 * sizeof(buf[0])); + appendBitsToBuffer(2, 2, buf, &result.bitLength); + appendBitsToBuffer(assignVal, 14, buf, &result.bitLength); + } else if (assignVal < 1000000L) { + memset(buf, 0, 3 * sizeof(buf[0])); + appendBitsToBuffer(6, 3, buf, &result.bitLength); + appendBitsToBuffer(assignVal >> 10, 11, buf, &result.bitLength); + appendBitsToBuffer(assignVal & 0x3FF, 10, buf, &result.bitLength); + } else { + assert(false); + } + result.data = buf; + return result; +} + + +// Calculates the number of bits needed to encode the given segments at the given version. +// Returns a non-negative number if successful. Otherwise returns -1 if a segment has too +// many characters to fit its length field, or the total bits exceeds INT16_MAX. +testable int getTotalBits(const struct qrcodegen_Segment segs[], size_t len, int version) { + assert(segs != NULL || len == 0); + long result = 0; + for (size_t i = 0; i < len; i++) { + int numChars = segs[i].numChars; + int bitLength = segs[i].bitLength; + assert(0 <= numChars && numChars <= INT16_MAX); + assert(0 <= bitLength && bitLength <= INT16_MAX); + int ccbits = numCharCountBits(segs[i].mode, version); + assert(0 <= ccbits && ccbits <= 16); + if (numChars >= (1L << ccbits)) + return -1; // The segment's length doesn't fit the field's bit width + result += 4L + ccbits + bitLength; + if (result > INT16_MAX) + return -1; // The sum might overflow an int type + } + assert(0 <= result && result <= INT16_MAX); + return (int)result; +} + + +// Returns the bit width of the character count field for a segment in the given mode +// in a QR Code at the given version number. The result is in the range [0, 16]. +static int numCharCountBits(enum qrcodegen_Mode mode, int version) { + assert(qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX); + int i = (version + 7) / 17; + switch (mode) { + case qrcodegen_Mode_NUMERIC : { static const int temp[] = {10, 12, 14}; return temp[i]; } + case qrcodegen_Mode_ALPHANUMERIC: { static const int temp[] = { 9, 11, 13}; return temp[i]; } + case qrcodegen_Mode_BYTE : { static const int temp[] = { 8, 16, 16}; return temp[i]; } + case qrcodegen_Mode_KANJI : { static const int temp[] = { 8, 10, 12}; return temp[i]; } + case qrcodegen_Mode_ECI : return 0; + default: assert(false); return -1; // Dummy value + } +} + +int qrcodegen_getMinFitVersion(enum qrcodegen_Ecc ecl, size_t dataLen) +{ + struct qrcodegen_Segment seg; + seg.mode = qrcodegen_Mode_BYTE; + seg.bitLength = calcSegmentBitLength(seg.mode, dataLen); + seg.numChars = (int)dataLen; + + for (int version = qrcodegen_VERSION_MIN; version <= qrcodegen_VERSION_MAX; version++) { + int dataCapacityBits = getNumDataCodewords(version, ecl) * 8; // Number of data bits available + int dataUsedBits = getTotalBits(&seg, 1, version); + if (dataUsedBits != -1 && dataUsedBits <= dataCapacityBits) + return version; + } + return -1; +} + +int qrcodegen_version2size(int version) +{ + if (version < qrcodegen_VERSION_MIN || version > qrcodegen_VERSION_MAX) { + return -1; + } + + return ((version - 1)*4 + 21); +} diff --git a/lib/libesp32/berry_matter/src/qrcodegen.h b/lib/libesp32/berry_matter/src/qrcodegen.h new file mode 100644 index 000000000..b484e9175 --- /dev/null +++ b/lib/libesp32/berry_matter/src/qrcodegen.h @@ -0,0 +1,319 @@ +/* + * QR Code generator library (C) + * + * Copyright (c) Project Nayuki. (MIT License) + * https://www.nayuki.io/page/qr-code-generator-library + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * - The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * - The Software is provided "as is", without warranty of any kind, express or + * implied, including but not limited to the warranties of merchantability, + * fitness for a particular purpose and noninfringement. In no event shall the + * authors or copyright holders be liable for any claim, damages or other + * liability, whether in an action of contract, tort or otherwise, arising from, + * out of or in connection with the Software or the use or other dealings in the + * Software. + */ + +#pragma once + +#include +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* + * This library creates QR Code symbols, which is a type of two-dimension barcode. + * Invented by Denso Wave and described in the ISO/IEC 18004 standard. + * A QR Code structure is an immutable square grid of black and white cells. + * The library provides functions to create a QR Code from text or binary data. + * The library covers the QR Code Model 2 specification, supporting all versions (sizes) + * from 1 to 40, all 4 error correction levels, and 4 character encoding modes. + * + * Ways to create a QR Code object: + * - High level: Take the payload data and call qrcodegen_encodeText() or qrcodegen_encodeBinary(). + * - Low level: Custom-make the list of segments and call + * qrcodegen_encodeSegments() or qrcodegen_encodeSegmentsAdvanced(). + * (Note that all ways require supplying the desired error correction level and various byte buffers.) + */ + + +/*---- Enum and struct types----*/ + +/* + * The error correction level in a QR Code symbol. + */ +enum qrcodegen_Ecc { + // Must be declared in ascending order of error protection + // so that an internal qrcodegen function works properly + qrcodegen_Ecc_LOW = 0 , // The QR Code can tolerate about 7% erroneous codewords + qrcodegen_Ecc_MEDIUM , // The QR Code can tolerate about 15% erroneous codewords + qrcodegen_Ecc_QUARTILE, // The QR Code can tolerate about 25% erroneous codewords + qrcodegen_Ecc_HIGH , // The QR Code can tolerate about 30% erroneous codewords +}; + + +/* + * The mask pattern used in a QR Code symbol. + */ +enum qrcodegen_Mask { + // A special value to tell the QR Code encoder to + // automatically select an appropriate mask pattern + qrcodegen_Mask_AUTO = -1, + // The eight actual mask patterns + qrcodegen_Mask_0 = 0, + qrcodegen_Mask_1, + qrcodegen_Mask_2, + qrcodegen_Mask_3, + qrcodegen_Mask_4, + qrcodegen_Mask_5, + qrcodegen_Mask_6, + qrcodegen_Mask_7, +}; + + +/* + * Describes how a segment's data bits are interpreted. + */ +enum qrcodegen_Mode { + qrcodegen_Mode_NUMERIC = 0x1, + qrcodegen_Mode_ALPHANUMERIC = 0x2, + qrcodegen_Mode_BYTE = 0x4, + qrcodegen_Mode_KANJI = 0x8, + qrcodegen_Mode_ECI = 0x7, +}; + + +/* + * A segment of character/binary/control data in a QR Code symbol. + * The mid-level way to create a segment is to take the payload data + * and call a factory function such as qrcodegen_makeNumeric(). + * The low-level way to create a segment is to custom-make the bit buffer + * and initialize a qrcodegen_Segment struct with appropriate values. + * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data. + * Any segment longer than this is meaningless for the purpose of generating QR Codes. + * Moreover, the maximum allowed bit length is 32767 because + * the largest QR Code (version 40) has 31329 modules. + */ +struct qrcodegen_Segment { + // The mode indicator of this segment. + enum qrcodegen_Mode mode; + + // The length of this segment's unencoded data. Measured in characters for + // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode. + // Always zero or positive. Not the same as the data's bit length. + int numChars; + + // The data bits of this segment, packed in bitwise big endian. + // Can be null if the bit length is zero. + uint8_t *data; + + // The number of valid data bits used in the buffer. Requires + // 0 <= bitLength <= 32767, and bitLength <= (capacity of data array) * 8. + // The character count (numChars) must agree with the mode and the bit buffer length. + int bitLength; +}; + + + +/*---- Macro constants and functions ----*/ + +#define qrcodegen_VERSION_MIN 1 // The minimum version number supported in the QR Code Model 2 standard +#define qrcodegen_VERSION_MAX 40 // The maximum version number supported in the QR Code Model 2 standard + +// Calculates the number of bytes needed to store any QR Code up to and including the given version number, +// as a compile-time constant. For example, 'uint8_t buffer[qrcodegen_BUFFER_LEN_FOR_VERSION(25)];' +// can store any single QR Code from version 1 to 25 (inclusive). The result fits in an int (or int16). +// Requires qrcodegen_VERSION_MIN <= n <= qrcodegen_VERSION_MAX. +#define qrcodegen_BUFFER_LEN_FOR_VERSION(n) ((((n) * 4 + 17) * ((n) * 4 + 17) + 7) / 8 + 1) + +// The worst-case number of bytes needed to store one QR Code, up to and including +// version 40. This value equals 3918, which is just under 4 kilobytes. +// Use this more convenient value to avoid calculating tighter memory bounds for buffers. +#define qrcodegen_BUFFER_LEN_MAX qrcodegen_BUFFER_LEN_FOR_VERSION(qrcodegen_VERSION_MAX) + + + +/*---- Functions (high level) to generate QR Codes ----*/ + +/* + * Encodes the given text string to a QR Code, returning true if encoding succeeded. + * If the data is too long to fit in any version in the given range + * at the given ECC level, then false is returned. + * - The input text must be encoded in UTF-8 and contain no NULs. + * - The variables ecl and mask must correspond to enum constant values. + * - Requires 1 <= minVersion <= maxVersion <= 40. + * - The arrays tempBuffer and qrcode must each have a length + * of at least qrcodegen_BUFFER_LEN_FOR_VERSION(maxVersion). + * - After the function returns, tempBuffer contains no useful data. + * - If successful, the resulting QR Code may use numeric, + * alphanumeric, or byte mode to encode the text. + * - In the most optimistic case, a QR Code at version 40 with low ECC + * can hold any UTF-8 string up to 2953 bytes, or any alphanumeric string + * up to 4296 characters, or any digit string up to 7089 characters. + * These numbers represent the hard upper limit of the QR Code standard. + * - Please consult the QR Code specification for information on + * data capacities per version, ECC level, and text encoding mode. + */ +bool qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode[], + enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl); + + +/* + * Encodes the given binary data to a QR Code, returning true if encoding succeeded. + * If the data is too long to fit in any version in the given range + * at the given ECC level, then false is returned. + * - The input array range dataAndTemp[0 : dataLen] should normally be + * valid UTF-8 text, but is not required by the QR Code standard. + * - The variables ecl and mask must correspond to enum constant values. + * - Requires 1 <= minVersion <= maxVersion <= 40. + * - The arrays dataAndTemp and qrcode must each have a length + * of at least qrcodegen_BUFFER_LEN_FOR_VERSION(maxVersion). + * - After the function returns, the contents of dataAndTemp may have changed, + * and does not represent useful data anymore. + * - If successful, the resulting QR Code will use byte mode to encode the data. + * - In the most optimistic case, a QR Code at version 40 with low ECC can hold any byte + * sequence up to length 2953. This is the hard upper limit of the QR Code standard. + * - Please consult the QR Code specification for information on + * data capacities per version, ECC level, and text encoding mode. + */ +bool qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcode[], + enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl); + + +/*---- Functions (low level) to generate QR Codes ----*/ + +/* + * Renders a QR Code representing the given segments at the given error correction level. + * The smallest possible QR Code version is automatically chosen for the output. Returns true if + * QR Code creation succeeded, or false if the data is too long to fit in any version. The ECC level + * of the result may be higher than the ecl argument if it can be done without increasing the version. + * This function allows the user to create a custom sequence of segments that switches + * between modes (such as alphanumeric and byte) to encode text in less space. + * This is a low-level API; the high-level API is qrcodegen_encodeText() and qrcodegen_encodeBinary(). + * To save memory, the segments' data buffers can alias/overlap tempBuffer, and will + * result in them being clobbered, but the QR Code output will still be correct. + * But the qrcode array must not overlap tempBuffer or any segment's data buffer. + */ +bool qrcodegen_encodeSegments(const struct qrcodegen_Segment segs[], size_t len, + enum qrcodegen_Ecc ecl, uint8_t tempBuffer[], uint8_t qrcode[]); + + +/* + * Renders a QR Code representing the given segments with the given encoding parameters. + * Returns true if QR Code creation succeeded, or false if the data is too long to fit in the range of versions. + * The smallest possible QR Code version within the given range is automatically + * chosen for the output. Iff boostEcl is true, then the ECC level of the result + * may be higher than the ecl argument if it can be done without increasing the + * version. The mask number is either between 0 to 7 (inclusive) to force that + * mask, or -1 to automatically choose an appropriate mask (which may be slow). + * This function allows the user to create a custom sequence of segments that switches + * between modes (such as alphanumeric and byte) to encode text in less space. + * This is a low-level API; the high-level API is qrcodegen_encodeText() and qrcodegen_encodeBinary(). + * To save memory, the segments' data buffers can alias/overlap tempBuffer, and will + * result in them being clobbered, but the QR Code output will still be correct. + * But the qrcode array must not overlap tempBuffer or any segment's data buffer. + */ +bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], size_t len, enum qrcodegen_Ecc ecl, + int minVersion, int maxVersion, int mask, bool boostEcl, uint8_t tempBuffer[], uint8_t qrcode[]); + + +/* + * Tests whether the given string can be encoded as a segment in alphanumeric mode. + * A string is encodable iff each character is in the following set: 0 to 9, A to Z + * (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon. + */ +bool qrcodegen_isAlphanumeric(const char *text); + + +/* + * Tests whether the given string can be encoded as a segment in numeric mode. + * A string is encodable iff each character is in the range 0 to 9. + */ +bool qrcodegen_isNumeric(const char *text); + + +/* + * Returns the number of bytes (uint8_t) needed for the data buffer of a segment + * containing the given number of characters using the given mode. Notes: + * - Returns SIZE_MAX on failure, i.e. numChars > INT16_MAX or + * the number of needed bits exceeds INT16_MAX (i.e. 32767). + * - Otherwise, all valid results are in the range [0, ceil(INT16_MAX / 8)], i.e. at most 4096. + * - It is okay for the user to allocate more bytes for the buffer than needed. + * - For byte mode, numChars measures the number of bytes, not Unicode code points. + * - For ECI mode, numChars must be 0, and the worst-case number of bytes is returned. + * An actual ECI segment can have shorter data. For non-ECI modes, the result is exact. + */ +size_t qrcodegen_calcSegmentBufferSize(enum qrcodegen_Mode mode, size_t numChars); + + +/* + * Returns a segment representing the given binary data encoded in + * byte mode. All input byte arrays are acceptable. Any text string + * can be converted to UTF-8 bytes and encoded as a byte mode segment. + */ +struct qrcodegen_Segment qrcodegen_makeBytes(const uint8_t data[], size_t len, uint8_t buf[]); + + +/* + * Returns a segment representing the given string of decimal digits encoded in numeric mode. + */ +struct qrcodegen_Segment qrcodegen_makeNumeric(const char *digits, uint8_t buf[]); + + +/* + * Returns a segment representing the given text string encoded in alphanumeric mode. + * The characters allowed are: 0 to 9, A to Z (uppercase only), space, + * dollar, percent, asterisk, plus, hyphen, period, slash, colon. + */ +struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char *text, uint8_t buf[]); + + +/* + * Returns a segment representing an Extended Channel Interpretation + * (ECI) designator with the given assignment value. + */ +struct qrcodegen_Segment qrcodegen_makeEci(long assignVal, uint8_t buf[]); + + +/*---- Functions to extract raw data from QR Codes ----*/ + +/* + * Returns the side length of the given QR Code, assuming that encoding succeeded. + * The result is in the range [21, 177]. Note that the length of the array buffer + * is related to the side length - every 'uint8_t qrcode[]' must have length at least + * qrcodegen_BUFFER_LEN_FOR_VERSION(version), which equals ceil(size^2 / 8 + 1). + */ +int qrcodegen_getSize(const uint8_t qrcode[]); + + +/* + * Returns the color of the module (pixel) at the given coordinates, which is false + * for white or true for black. The top left corner has the coordinates (x=0, y=0). + * If the given coordinates are out of bounds, then false (white) is returned. + */ +bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y); + +/* + * Returns the qrcode size of the specified version. Returns -1 on failure + */ +int qrcodegen_version2size(int version); +/* + * Returns the min version of the data that can be stored. Returns -1 on failure + */ +int qrcodegen_getMinFitVersion(enum qrcodegen_Ecc ecl, size_t dataLen); + +#ifdef __cplusplus +} +#endif diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h index df79d9084..7c87b3cfd 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h @@ -7,11 +7,11 @@ extern const bclass be_class_Matter_Commisioning_Context; /******************************************************************** -** Solidified function: parse_PBKDFParamRequest +** Solidified function: parse_Pake3 ********************************************************************/ -be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name */ +be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ be_nested_proto( - 14, /* nstack */ + 16, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -19,62 +19,60 @@ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[48]) { /* constants */ + ( &(const bvalue[46]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(opcode), /* K2 */ be_nested_str_weak(local_session_id), /* K3 */ be_const_int(0), /* K4 */ be_nested_str_weak(protocol_id), /* K5 */ be_nested_str_weak(protocol_error), - /* K6 */ be_nested_str_weak(invalid_X20PBKDFParamRequest_X20message), + /* K6 */ be_nested_str_weak(invalid_X20Pake3_X20message), /* K7 */ be_nested_str_weak(matter), - /* K8 */ be_nested_str_weak(PBKDFParamRequest), + /* K8 */ be_nested_str_weak(Pake3), /* K9 */ be_nested_str_weak(parse), /* K10 */ be_nested_str_weak(raw), /* K11 */ be_nested_str_weak(app_payload_idx), - /* K12 */ be_nested_str_weak(session), - /* K13 */ be_nested_str_weak(set_mode), - /* K14 */ be_nested_str_weak(Session), - /* K15 */ be_nested_str_weak(__PASE), - /* K16 */ be_const_int(2147483647), - /* K17 */ be_nested_str_weak(passcodeId), - /* K18 */ be_nested_str_weak(non_X2Dzero_X20passcode_X20id), - /* K19 */ be_nested_str_weak(future_initiator_session_id), - /* K20 */ be_nested_str_weak(initiator_session_id), - /* K21 */ be_nested_str_weak(future_local_session_id), - /* K22 */ be_nested_str_weak(device), - /* K23 */ be_nested_str_weak(sessions), - /* K24 */ be_nested_str_weak(gen_local_session_id), - /* K25 */ be_nested_str_weak(tasmota), - /* K26 */ be_nested_str_weak(log), - /* K27 */ be_nested_str_weak(MTR_X3A_X20Loc_session_X3D), - /* K28 */ be_nested_str_weak(PBKDFParamResponse), - /* K29 */ be_nested_str_weak(initiatorRandom), - /* K30 */ be_nested_str_weak(responderRandom), - /* K31 */ be_nested_str_weak(random), - /* K32 */ be_nested_str_weak(responderSessionId), - /* K33 */ be_nested_str_weak(pbkdf_parameters_salt), - /* K34 */ be_nested_str_weak(salt), - /* K35 */ be_nested_str_weak(pbkdf_parameters_iterations), - /* K36 */ be_nested_str_weak(iterations), - /* K37 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_X3A_X20), - /* K38 */ be_nested_str_weak(inspect), - /* K39 */ be_nested_str_weak(encode), - /* K40 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_raw_X3A_X20), - /* K41 */ be_nested_str_weak(tohex), - /* K42 */ be_nested_str_weak(build_response), - /* K43 */ be_nested_str_weak(responder), - /* K44 */ be_nested_str_weak(send_response), - /* K45 */ be_nested_str_weak(remote_ip), - /* K46 */ be_nested_str_weak(remote_port), - /* K47 */ be_nested_str_weak(message_counter), + /* K12 */ be_nested_str_weak(cA), + /* K13 */ be_nested_str_weak(tasmota), + /* K14 */ be_nested_str_weak(log), + /* K15 */ be_nested_str_weak(MTR_X3A_X20received_X20cA_X3D), + /* K16 */ be_nested_str_weak(tohex), + /* K17 */ be_nested_str_weak(spake), + /* K18 */ be_nested_str_weak(invalid_X20cA_X20received), + /* K19 */ be_nested_str_weak(created), + /* K20 */ be_nested_str_weak(rtc), + /* K21 */ be_nested_str_weak(utc), + /* K22 */ be_nested_str_weak(HKDF_SHA256), + /* K23 */ be_nested_str_weak(derive), + /* K24 */ be_nested_str_weak(Ke), + /* K25 */ be_nested_str_weak(fromstring), + /* K26 */ be_nested_str_weak(SEKeys_Info), + /* K27 */ be_nested_str_weak(I2RKey), + /* K28 */ be_nested_str_weak(R2IKey), + /* K29 */ be_nested_str_weak(AttestationChallenge), + /* K30 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), + /* K31 */ be_nested_str_weak(MTR_X3A_X20session_keys_X3D), + /* K32 */ be_nested_str_weak(MTR_X3A_X20I2RKey_X20_X20_X20_X20_X20_X20_X3D), + /* K33 */ be_nested_str_weak(MTR_X3A_X20R2IKey_X20_X20_X20_X20_X20_X20_X3D), + /* K34 */ be_nested_str_weak(MTR_X3A_X20AC_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K35 */ be_nested_str_weak(build_response), + /* K36 */ be_nested_str_weak(add), + /* K37 */ be_const_int(2), + /* K38 */ be_nested_str_weak(encode), + /* K39 */ be_nested_str_weak(responder), + /* K40 */ be_nested_str_weak(send_response), + /* K41 */ be_nested_str_weak(remote_ip), + /* K42 */ be_nested_str_weak(remote_port), + /* K43 */ be_nested_str_weak(add_session), + /* K44 */ be_nested_str_weak(future_local_session_id), + /* K45 */ be_nested_str_weak(future_initiator_session_id), }), - be_str_weak(parse_PBKDFParamRequest), + be_str_weak(parse_Pake3), &be_const_str_solidified, - ( &(const binstruction[101]) { /* code */ + ( &(const binstruction[146]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0x880C0301, // 0001 GETMBR R3 R1 K1 - 0x5412001F, // 0002 LDINT R4 32 + 0x54120023, // 0002 LDINT R4 36 0x200C0604, // 0003 NE R3 R3 R4 0x740E0005, // 0004 JMPT R3 #000B 0x880C0302, // 0005 GETMBR R3 R1 K2 @@ -91,129 +89,133 @@ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name 0x8814030A, // 0010 GETMBR R5 R1 K10 0x8818030B, // 0011 GETMBR R6 R1 K11 0x7C0C0600, // 0012 CALL R3 3 - 0x8810030C, // 0013 GETMBR R4 R1 K12 - 0x8C10090D, // 0014 GETMET R4 R4 K13 - 0xB81A0E00, // 0015 GETNGBL R6 K7 - 0x88180D0E, // 0016 GETMBR R6 R6 K14 - 0x88180D0F, // 0017 GETMBR R6 R6 K15 - 0x7C100400, // 0018 CALL R4 2 - 0x8810030B, // 0019 GETMBR R4 R1 K11 - 0x40100910, // 001A CONNECT R4 R4 K16 - 0x8814030A, // 001B GETMBR R5 R1 K10 - 0x94100A04, // 001C GETIDX R4 R5 R4 - 0x90021004, // 001D SETMBR R0 K8 R4 - 0x88100711, // 001E GETMBR R4 R3 K17 - 0x20100903, // 001F NE R4 R4 K3 - 0x78120000, // 0020 JMPF R4 #0022 - 0xB0060B12, // 0021 RAISE 1 K5 K18 - 0x88100714, // 0022 GETMBR R4 R3 K20 - 0x90022604, // 0023 SETMBR R0 K19 R4 - 0x88100116, // 0024 GETMBR R4 R0 K22 - 0x88100917, // 0025 GETMBR R4 R4 K23 - 0x8C100918, // 0026 GETMET R4 R4 K24 - 0x7C100200, // 0027 CALL R4 1 - 0x90022A04, // 0028 SETMBR R0 K21 R4 - 0xB8123200, // 0029 GETNGBL R4 K25 - 0x8C10091A, // 002A GETMET R4 R4 K26 - 0x60180008, // 002B GETGBL R6 G8 - 0x881C0115, // 002C GETMBR R7 R0 K21 - 0x7C180200, // 002D CALL R6 1 - 0x001A3606, // 002E ADD R6 K27 R6 - 0x7C100400, // 002F CALL R4 2 - 0xB8120E00, // 0030 GETNGBL R4 K7 - 0x8C10091C, // 0031 GETMET R4 R4 K28 - 0x7C100200, // 0032 CALL R4 1 - 0x8814071D, // 0033 GETMBR R5 R3 K29 - 0x90123A05, // 0034 SETMBR R4 K29 R5 - 0x8C14051F, // 0035 GETMET R5 R2 K31 - 0x541E001F, // 0036 LDINT R7 32 - 0x7C140400, // 0037 CALL R5 2 - 0x90123C05, // 0038 SETMBR R4 K30 R5 - 0x88140115, // 0039 GETMBR R5 R0 K21 - 0x90124005, // 003A SETMBR R4 K32 R5 - 0x88140116, // 003B GETMBR R5 R0 K22 - 0x88140B22, // 003C GETMBR R5 R5 K34 - 0x90124205, // 003D SETMBR R4 K33 R5 - 0x88140116, // 003E GETMBR R5 R0 K22 - 0x88140B24, // 003F GETMBR R5 R5 K36 - 0x90124605, // 0040 SETMBR R4 K35 R5 - 0xB8163200, // 0041 GETNGBL R5 K25 - 0x8C140B1A, // 0042 GETMET R5 R5 K26 - 0x601C0008, // 0043 GETGBL R7 G8 - 0xB8220E00, // 0044 GETNGBL R8 K7 - 0x8C201126, // 0045 GETMET R8 R8 K38 - 0x5C280800, // 0046 MOVE R10 R4 - 0x7C200400, // 0047 CALL R8 2 - 0x7C1C0200, // 0048 CALL R7 1 - 0x001E4A07, // 0049 ADD R7 K37 R7 - 0x54220003, // 004A LDINT R8 4 - 0x7C140600, // 004B CALL R5 3 - 0x8C140927, // 004C GETMET R5 R4 K39 - 0x7C140200, // 004D CALL R5 1 - 0xB81A3200, // 004E GETNGBL R6 K25 - 0x8C180D1A, // 004F GETMET R6 R6 K26 - 0x8C200B29, // 0050 GETMET R8 R5 K41 - 0x7C200200, // 0051 CALL R8 1 - 0x00225008, // 0052 ADD R8 K40 R8 - 0x54260003, // 0053 LDINT R9 4 - 0x7C180600, // 0054 CALL R6 3 - 0x90023805, // 0055 SETMBR R0 K28 R5 - 0x8C18032A, // 0056 GETMET R6 R1 K42 - 0x54220020, // 0057 LDINT R8 33 - 0x50240200, // 0058 LDBOOL R9 1 0 - 0x7C180600, // 0059 CALL R6 3 - 0x8C1C0D27, // 005A GETMET R7 R6 K39 - 0x5C240A00, // 005B MOVE R9 R5 - 0x7C1C0400, // 005C CALL R7 2 - 0x8820012B, // 005D GETMBR R8 R0 K43 - 0x8C20112C, // 005E GETMET R8 R8 K44 - 0x5C280E00, // 005F MOVE R10 R7 - 0x882C032D, // 0060 GETMBR R11 R1 K45 - 0x8830032E, // 0061 GETMBR R12 R1 K46 - 0x88340D2F, // 0062 GETMBR R13 R6 K47 - 0x7C200A00, // 0063 CALL R8 5 - 0x80000000, // 0064 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Commisioning_Context_init, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(responder), - /* K2 */ be_nested_str_weak(device), - /* K3 */ be_nested_str_weak(y), - /* K4 */ be_nested_str_weak(random), - /* K5 */ be_nested_str_weak(window_open), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x90020201, // 0001 SETMBR R0 K1 R1 - 0x880C0302, // 0002 GETMBR R3 R1 K2 - 0x90020403, // 0003 SETMBR R0 K2 R3 - 0x8C0C0504, // 0004 GETMET R3 R2 K4 - 0x5416001F, // 0005 LDINT R5 32 - 0x7C0C0400, // 0006 CALL R3 2 - 0x90020603, // 0007 SETMBR R0 K3 R3 - 0x500C0200, // 0008 LDBOOL R3 1 0 - 0x90020A03, // 0009 SETMBR R0 K5 R3 - 0x80000000, // 000A RET 0 + 0x8810070C, // 0013 GETMBR R4 R3 K12 + 0x90021804, // 0014 SETMBR R0 K12 R4 + 0xB8121A00, // 0015 GETNGBL R4 K13 + 0x8C10090E, // 0016 GETMET R4 R4 K14 + 0x8818010C, // 0017 GETMBR R6 R0 K12 + 0x8C180D10, // 0018 GETMET R6 R6 K16 + 0x7C180200, // 0019 CALL R6 1 + 0x001A1E06, // 001A ADD R6 K15 R6 + 0x541E0003, // 001B LDINT R7 4 + 0x7C100600, // 001C CALL R4 3 + 0x8810010C, // 001D GETMBR R4 R0 K12 + 0x88140111, // 001E GETMBR R5 R0 K17 + 0x88140B0C, // 001F GETMBR R5 R5 K12 + 0x20100805, // 0020 NE R4 R4 R5 + 0x78120000, // 0021 JMPF R4 #0023 + 0xB0060B12, // 0022 RAISE 1 K5 K18 + 0xB8121A00, // 0023 GETNGBL R4 K13 + 0x8C100914, // 0024 GETMET R4 R4 K20 + 0x7C100200, // 0025 CALL R4 1 + 0x94100915, // 0026 GETIDX R4 R4 K21 + 0x90022604, // 0027 SETMBR R0 K19 R4 + 0x8C100516, // 0028 GETMET R4 R2 K22 + 0x7C100200, // 0029 CALL R4 1 + 0x8C100917, // 002A GETMET R4 R4 K23 + 0x88180118, // 002B GETMBR R6 R0 K24 + 0x601C0015, // 002C GETGBL R7 G21 + 0x7C1C0000, // 002D CALL R7 0 + 0x60200015, // 002E GETGBL R8 G21 + 0x7C200000, // 002F CALL R8 0 + 0x8C201119, // 0030 GETMET R8 R8 K25 + 0x8828011A, // 0031 GETMBR R10 R0 K26 + 0x7C200400, // 0032 CALL R8 2 + 0x5426002F, // 0033 LDINT R9 48 + 0x7C100A00, // 0034 CALL R4 5 + 0x5416000E, // 0035 LDINT R5 15 + 0x40160605, // 0036 CONNECT R5 K3 R5 + 0x94140805, // 0037 GETIDX R5 R4 R5 + 0x90023605, // 0038 SETMBR R0 K27 R5 + 0x5416000F, // 0039 LDINT R5 16 + 0x541A001E, // 003A LDINT R6 31 + 0x40140A06, // 003B CONNECT R5 R5 R6 + 0x94140805, // 003C GETIDX R5 R4 R5 + 0x90023805, // 003D SETMBR R0 K28 R5 + 0x5416001F, // 003E LDINT R5 32 + 0x541A002E, // 003F LDINT R6 47 + 0x40140A06, // 0040 CONNECT R5 R5 R6 + 0x94140805, // 0041 GETIDX R5 R4 R5 + 0x90023A05, // 0042 SETMBR R0 K29 R5 + 0xB8161A00, // 0043 GETNGBL R5 K13 + 0x8C140B0E, // 0044 GETMET R5 R5 K14 + 0x581C001E, // 0045 LDCONST R7 K30 + 0x54220003, // 0046 LDINT R8 4 + 0x7C140600, // 0047 CALL R5 3 + 0xB8161A00, // 0048 GETNGBL R5 K13 + 0x8C140B0E, // 0049 GETMET R5 R5 K14 + 0x8C1C0910, // 004A GETMET R7 R4 K16 + 0x7C1C0200, // 004B CALL R7 1 + 0x001E3E07, // 004C ADD R7 K31 R7 + 0x54220003, // 004D LDINT R8 4 + 0x7C140600, // 004E CALL R5 3 + 0xB8161A00, // 004F GETNGBL R5 K13 + 0x8C140B0E, // 0050 GETMET R5 R5 K14 + 0x881C011B, // 0051 GETMBR R7 R0 K27 + 0x8C1C0F10, // 0052 GETMET R7 R7 K16 + 0x7C1C0200, // 0053 CALL R7 1 + 0x001E4007, // 0054 ADD R7 K32 R7 + 0x54220003, // 0055 LDINT R8 4 + 0x7C140600, // 0056 CALL R5 3 + 0xB8161A00, // 0057 GETNGBL R5 K13 + 0x8C140B0E, // 0058 GETMET R5 R5 K14 + 0x881C011C, // 0059 GETMBR R7 R0 K28 + 0x8C1C0F10, // 005A GETMET R7 R7 K16 + 0x7C1C0200, // 005B CALL R7 1 + 0x001E4207, // 005C ADD R7 K33 R7 + 0x54220003, // 005D LDINT R8 4 + 0x7C140600, // 005E CALL R5 3 + 0xB8161A00, // 005F GETNGBL R5 K13 + 0x8C140B0E, // 0060 GETMET R5 R5 K14 + 0x881C011D, // 0061 GETMBR R7 R0 K29 + 0x8C1C0F10, // 0062 GETMET R7 R7 K16 + 0x7C1C0200, // 0063 CALL R7 1 + 0x001E4407, // 0064 ADD R7 K34 R7 + 0x54220003, // 0065 LDINT R8 4 + 0x7C140600, // 0066 CALL R5 3 + 0xB8161A00, // 0067 GETNGBL R5 K13 + 0x8C140B0E, // 0068 GETMET R5 R5 K14 + 0x581C001E, // 0069 LDCONST R7 K30 + 0x54220003, // 006A LDINT R8 4 + 0x7C140600, // 006B CALL R5 3 + 0x8C140323, // 006C GETMET R5 R1 K35 + 0x541E003F, // 006D LDINT R7 64 + 0x50200000, // 006E LDBOOL R8 0 0 + 0x7C140600, // 006F CALL R5 3 + 0x60180015, // 0070 GETGBL R6 G21 + 0x7C180000, // 0071 CALL R6 0 + 0x8C1C0D24, // 0072 GETMET R7 R6 K36 + 0x58240003, // 0073 LDCONST R9 K3 + 0x58280025, // 0074 LDCONST R10 K37 + 0x7C1C0600, // 0075 CALL R7 3 + 0x8C1C0D24, // 0076 GETMET R7 R6 K36 + 0x58240003, // 0077 LDCONST R9 K3 + 0x542A0003, // 0078 LDINT R10 4 + 0x7C1C0600, // 0079 CALL R7 3 + 0x8C1C0D24, // 007A GETMET R7 R6 K36 + 0x58240003, // 007B LDCONST R9 K3 + 0x542A0003, // 007C LDINT R10 4 + 0x7C1C0600, // 007D CALL R7 3 + 0x8C1C0B26, // 007E GETMET R7 R5 K38 + 0x5C240C00, // 007F MOVE R9 R6 + 0x7C1C0400, // 0080 CALL R7 2 + 0x88200127, // 0081 GETMBR R8 R0 K39 + 0x8C201128, // 0082 GETMET R8 R8 K40 + 0x5C280E00, // 0083 MOVE R10 R7 + 0x882C0329, // 0084 GETMBR R11 R1 K41 + 0x8830032A, // 0085 GETMBR R12 R1 K42 + 0x4C340000, // 0086 LDNIL R13 + 0x7C200A00, // 0087 CALL R8 5 + 0x88200127, // 0088 GETMBR R8 R0 K39 + 0x8C20112B, // 0089 GETMET R8 R8 K43 + 0x8828012C, // 008A GETMBR R10 R0 K44 + 0x882C012D, // 008B GETMBR R11 R0 K45 + 0x8830011B, // 008C GETMBR R12 R0 K27 + 0x8834011C, // 008D GETMBR R13 R0 K28 + 0x8838011D, // 008E GETMBR R14 R0 K29 + 0x883C0113, // 008F GETMBR R15 R0 K19 + 0x7C200E00, // 0090 CALL R8 7 + 0x80000000, // 0091 RET 0 }) ) ); @@ -631,131 +633,6 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake1, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: find_session_by_destination_id -********************************************************************/ -be_local_closure(Matter_Commisioning_Context_find_session_by_destination_id, /* name */ - be_nested_proto( - 14, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[22]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20SEARCHING_X3A_X20destinationId_X3D), - /* K4 */ be_nested_str_weak(tohex), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str_weak(device), - /* K7 */ be_nested_str_weak(sessions), - /* K8 */ be_nested_str_weak(noc), - /* K9 */ be_nested_str_weak(fabric), - /* K10 */ be_nested_str_weak(deviceid), - /* K11 */ be_nested_str_weak(get_ca_pub), - /* K12 */ be_nested_str_weak(get_fabric), - /* K13 */ be_nested_str_weak(get_deviceid), - /* K14 */ be_nested_str_weak(get_ipk_group_key), - /* K15 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20destinationMessage_X3D), - /* K16 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20key_ipk_X3D), - /* K17 */ be_nested_str_weak(HMAC_SHA256), - /* K18 */ be_nested_str_weak(update), - /* K19 */ be_nested_str_weak(out), - /* K20 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20candidateDestinationId_X3D), - /* K21 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(find_session_by_destination_id), - &be_const_str_solidified, - ( &(const binstruction[79]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xB8120200, // 0001 GETNGBL R4 K1 - 0x8C100902, // 0002 GETMET R4 R4 K2 - 0x8C180304, // 0003 GETMET R6 R1 K4 - 0x7C180200, // 0004 CALL R6 1 - 0x001A0606, // 0005 ADD R6 K3 R6 - 0x581C0005, // 0006 LDCONST R7 K5 - 0x7C100600, // 0007 CALL R4 3 - 0x60100010, // 0008 GETGBL R4 G16 - 0x88140106, // 0009 GETMBR R5 R0 K6 - 0x88140B07, // 000A GETMBR R5 R5 K7 - 0x88140B07, // 000B GETMBR R5 R5 K7 - 0x7C100200, // 000C CALL R4 1 - 0xA802003B, // 000D EXBLK 0 #004A - 0x5C140800, // 000E MOVE R5 R4 - 0x7C140000, // 000F CALL R5 0 - 0x88180B08, // 0010 GETMBR R6 R5 K8 - 0x4C1C0000, // 0011 LDNIL R7 - 0x1C180C07, // 0012 EQ R6 R6 R7 - 0x741A0007, // 0013 JMPT R6 #001C - 0x88180B09, // 0014 GETMBR R6 R5 K9 - 0x4C1C0000, // 0015 LDNIL R7 - 0x1C180C07, // 0016 EQ R6 R6 R7 - 0x741A0003, // 0017 JMPT R6 #001C - 0x88180B0A, // 0018 GETMBR R6 R5 K10 - 0x4C1C0000, // 0019 LDNIL R7 - 0x1C180C07, // 001A EQ R6 R6 R7 - 0x781A0000, // 001B JMPF R6 #001D - 0x7001FFF0, // 001C JMP #000E - 0x8C180B0B, // 001D GETMET R6 R5 K11 - 0x7C180200, // 001E CALL R6 1 - 0x00180406, // 001F ADD R6 R2 R6 - 0x8C1C0B0C, // 0020 GETMET R7 R5 K12 - 0x7C1C0200, // 0021 CALL R7 1 - 0x00180C07, // 0022 ADD R6 R6 R7 - 0x8C1C0B0D, // 0023 GETMET R7 R5 K13 - 0x7C1C0200, // 0024 CALL R7 1 - 0x00180C07, // 0025 ADD R6 R6 R7 - 0x8C1C0B0E, // 0026 GETMET R7 R5 K14 - 0x7C1C0200, // 0027 CALL R7 1 - 0xB8220200, // 0028 GETNGBL R8 K1 - 0x8C201102, // 0029 GETMET R8 R8 K2 - 0x8C280D04, // 002A GETMET R10 R6 K4 - 0x7C280200, // 002B CALL R10 1 - 0x002A1E0A, // 002C ADD R10 K15 R10 - 0x582C0005, // 002D LDCONST R11 K5 - 0x7C200600, // 002E CALL R8 3 - 0xB8220200, // 002F GETNGBL R8 K1 - 0x8C201102, // 0030 GETMET R8 R8 K2 - 0x8C280F04, // 0031 GETMET R10 R7 K4 - 0x7C280200, // 0032 CALL R10 1 - 0x002A200A, // 0033 ADD R10 K16 R10 - 0x542E0003, // 0034 LDINT R11 4 - 0x7C200600, // 0035 CALL R8 3 - 0x8C200711, // 0036 GETMET R8 R3 K17 - 0x5C280E00, // 0037 MOVE R10 R7 - 0x7C200400, // 0038 CALL R8 2 - 0x8C241112, // 0039 GETMET R9 R8 K18 - 0x5C2C0C00, // 003A MOVE R11 R6 - 0x7C240400, // 003B CALL R9 2 - 0x8C241113, // 003C GETMET R9 R8 K19 - 0x7C240200, // 003D CALL R9 1 - 0xB82A0200, // 003E GETNGBL R10 K1 - 0x8C281502, // 003F GETMET R10 R10 K2 - 0x8C301304, // 0040 GETMET R12 R9 K4 - 0x7C300200, // 0041 CALL R12 1 - 0x0032280C, // 0042 ADD R12 K20 R12 - 0x58340005, // 0043 LDCONST R13 K5 - 0x7C280600, // 0044 CALL R10 3 - 0x1C281201, // 0045 EQ R10 R9 R1 - 0x782A0001, // 0046 JMPF R10 #0049 - 0xA8040001, // 0047 EXBLK 1 1 - 0x80040A00, // 0048 RET 1 R5 - 0x7001FFC3, // 0049 JMP #000E - 0x58100015, // 004A LDCONST R4 K21 - 0xAC100200, // 004B CATCH R4 1 0 - 0xB0080000, // 004C RAISE 2 R0 R0 - 0x4C100000, // 004D LDNIL R4 - 0x80040800, // 004E RET 1 R4 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: every_second ********************************************************************/ @@ -780,6 +657,857 @@ be_local_closure(Matter_Commisioning_Context_every_second, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: process_incoming +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(is_commissioning_open), + /* K2 */ be_nested_str_weak(opcode), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(log), + /* K5 */ be_nested_str_weak(MTR_X3A_X20commissioning_X20not_X20open), + /* K6 */ be_const_int(2), + /* K7 */ be_nested_str_weak(MTR_X3A_X20received_X20message_X20), + /* K8 */ be_nested_str_weak(matter), + /* K9 */ be_nested_str_weak(inspect), + /* K10 */ be_const_int(3), + /* K11 */ be_nested_str_weak(parse_PBKDFParamRequest), + /* K12 */ be_nested_str_weak(parse_Pake1), + /* K13 */ be_nested_str_weak(parse_Pake3), + /* K14 */ be_nested_str_weak(parse_Sigma1), + /* K15 */ be_nested_str_weak(parse_Sigma3), + }), + be_str_weak(process_incoming), + &be_const_str_solidified, + ( &(const binstruction[74]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x740A000E, // 0003 JMPT R2 #0013 + 0x88080302, // 0004 GETMBR R2 R1 K2 + 0x540E001F, // 0005 LDINT R3 32 + 0x28080403, // 0006 GE R2 R2 R3 + 0x780A000A, // 0007 JMPF R2 #0013 + 0x88080302, // 0008 GETMBR R2 R1 K2 + 0x540E0023, // 0009 LDINT R3 36 + 0x18080403, // 000A LE R2 R2 R3 + 0x780A0006, // 000B JMPF R2 #0013 + 0xB80A0600, // 000C GETNGBL R2 K3 + 0x8C080504, // 000D GETMET R2 R2 K4 + 0x58100005, // 000E LDCONST R4 K5 + 0x58140006, // 000F LDCONST R5 K6 + 0x7C080600, // 0010 CALL R2 3 + 0x50080000, // 0011 LDBOOL R2 0 0 + 0x80040400, // 0012 RET 1 R2 + 0xB80A0600, // 0013 GETNGBL R2 K3 + 0x8C080504, // 0014 GETMET R2 R2 K4 + 0xB8121000, // 0015 GETNGBL R4 K8 + 0x8C100909, // 0016 GETMET R4 R4 K9 + 0x5C180200, // 0017 MOVE R6 R1 + 0x7C100400, // 0018 CALL R4 2 + 0x00120E04, // 0019 ADD R4 K7 R4 + 0x5814000A, // 001A LDCONST R5 K10 + 0x7C080600, // 001B CALL R2 3 + 0x88080302, // 001C GETMBR R2 R1 K2 + 0x540E001F, // 001D LDINT R3 32 + 0x1C080403, // 001E EQ R2 R2 R3 + 0x780A0004, // 001F JMPF R2 #0025 + 0x8C08010B, // 0020 GETMET R2 R0 K11 + 0x5C100200, // 0021 MOVE R4 R1 + 0x7C080400, // 0022 CALL R2 2 + 0x80040400, // 0023 RET 1 R2 + 0x70020022, // 0024 JMP #0048 + 0x88080302, // 0025 GETMBR R2 R1 K2 + 0x540E0021, // 0026 LDINT R3 34 + 0x1C080403, // 0027 EQ R2 R2 R3 + 0x780A0004, // 0028 JMPF R2 #002E + 0x8C08010C, // 0029 GETMET R2 R0 K12 + 0x5C100200, // 002A MOVE R4 R1 + 0x7C080400, // 002B CALL R2 2 + 0x80040400, // 002C RET 1 R2 + 0x70020019, // 002D JMP #0048 + 0x88080302, // 002E GETMBR R2 R1 K2 + 0x540E0023, // 002F LDINT R3 36 + 0x1C080403, // 0030 EQ R2 R2 R3 + 0x780A0004, // 0031 JMPF R2 #0037 + 0x8C08010D, // 0032 GETMET R2 R0 K13 + 0x5C100200, // 0033 MOVE R4 R1 + 0x7C080400, // 0034 CALL R2 2 + 0x80040400, // 0035 RET 1 R2 + 0x70020010, // 0036 JMP #0048 + 0x88080302, // 0037 GETMBR R2 R1 K2 + 0x540E002F, // 0038 LDINT R3 48 + 0x1C080403, // 0039 EQ R2 R2 R3 + 0x780A0004, // 003A JMPF R2 #0040 + 0x8C08010E, // 003B GETMET R2 R0 K14 + 0x5C100200, // 003C MOVE R4 R1 + 0x7C080400, // 003D CALL R2 2 + 0x80040400, // 003E RET 1 R2 + 0x70020007, // 003F JMP #0048 + 0x88080302, // 0040 GETMBR R2 R1 K2 + 0x540E0031, // 0041 LDINT R3 50 + 0x1C080403, // 0042 EQ R2 R2 R3 + 0x780A0003, // 0043 JMPF R2 #0048 + 0x8C08010F, // 0044 GETMET R2 R0 K15 + 0x5C100200, // 0045 MOVE R4 R1 + 0x7C080400, // 0046 CALL R2 2 + 0x80040400, // 0047 RET 1 R2 + 0x50080000, // 0048 LDBOOL R2 0 0 + 0x80040400, // 0049 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_init, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(responder), + /* K2 */ be_nested_str_weak(device), + /* K3 */ be_nested_str_weak(y), + /* K4 */ be_nested_str_weak(random), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x90020201, // 0001 SETMBR R0 K1 R1 + 0x880C0302, // 0002 GETMBR R3 R1 K2 + 0x90020403, // 0003 SETMBR R0 K2 R3 + 0x8C0C0504, // 0004 GETMET R3 R2 K4 + 0x5416001F, // 0005 LDINT R5 32 + 0x7C0C0400, // 0006 CALL R3 2 + 0x90020603, // 0007 SETMBR R0 K3 R3 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_Sigma1 +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ + be_nested_proto( + 35, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[115]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(opcode), + /* K2 */ be_nested_str_weak(local_session_id), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(protocol_id), + /* K5 */ be_nested_str_weak(protocol_error), + /* K6 */ be_nested_str_weak(invalid_X20Pake1_X20message), + /* K7 */ be_nested_str_weak(matter), + /* K8 */ be_nested_str_weak(Sigma1), + /* K9 */ be_nested_str_weak(parse), + /* K10 */ be_nested_str_weak(raw), + /* K11 */ be_nested_str_weak(app_payload_idx), + /* K12 */ be_nested_str_weak(initiatorEph_pub), + /* K13 */ be_nested_str_weak(initiatorEphPubKey), + /* K14 */ be_nested_str_weak(resumptionID), + /* K15 */ be_nested_str_weak(initiatorResumeMIC), + /* K16 */ be_nested_str_weak(session), + /* K17 */ be_nested_str_weak(device), + /* K18 */ be_nested_str_weak(sessions), + /* K19 */ be_nested_str_weak(find_session_by_resumption_id), + /* K20 */ be_nested_str_weak(find_fabric_by_destination_id), + /* K21 */ be_nested_str_weak(destinationId), + /* K22 */ be_nested_str_weak(initiatorRandom), + /* K23 */ be_nested_str_weak(_fabric), + /* K24 */ be_nested_str_weak(valuer_error), + /* K25 */ be_nested_str_weak(StatusReport_X28GeneralCode_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20NO_SHARED_TRUST_ROOTS_X29), + /* K26 */ be_nested_str_weak(source_node_id), + /* K27 */ be_nested_str_weak(set_mode_CASE), + /* K28 */ be_nested_str_weak(remove_session), + /* K29 */ be_nested_str_weak(__future_initiator_session_id), + /* K30 */ be_nested_str_weak(initiator_session_id), + /* K31 */ be_nested_str_weak(__future_local_session_id), + /* K32 */ be_nested_str_weak(gen_local_session_id), + /* K33 */ be_nested_str_weak(future_local_session_id), + /* K34 */ be_nested_str_weak(tasmota), + /* K35 */ be_nested_str_weak(log), + /* K36 */ be_nested_str_weak(MTR_X3A_X20Loc_session_X3D), + /* K37 */ be_nested_str_weak(fromstring), + /* K38 */ be_nested_str_weak(Sigma1_Resume), + /* K39 */ be_nested_str_weak(HKDF_SHA256), + /* K40 */ be_nested_str_weak(derive), + /* K41 */ be_nested_str_weak(shared_secret), + /* K42 */ be_nested_str_weak(NCASE_SigmaR1), + /* K43 */ be_const_int(2147483647), + /* K44 */ be_nested_str_weak(AES_CCM), + /* K45 */ be_nested_str_weak(decrypt), + /* K46 */ be_nested_str_weak(tag), + /* K47 */ be_nested_str_weak(_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), + /* K48 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s1rk_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K49 */ be_nested_str_weak(tohex), + /* K50 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20tag_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K51 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20Resume1MICPayload_X20_X3D_X20), + /* K52 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20decrypted_tag_X20_X20_X20_X20_X20_X3D_X20), + /* K53 */ be_nested_str_weak(resumption_id), + /* K54 */ be_nested_str_weak(random), + /* K55 */ be_nested_str_weak(Sigma2_Resume), + /* K56 */ be_nested_str_weak(NCASE_SigmaR2), + /* K57 */ be_nested_str_weak(Sigma2Resume), + /* K58 */ be_nested_str_weak(responderSessionID), + /* K59 */ be_nested_str_weak(sigma2ResumeMIC), + /* K60 */ be_nested_str_weak(SessionResumptionKeys), + /* K61 */ be_nested_str_weak(rtc), + /* K62 */ be_nested_str_weak(utc), + /* K63 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), + /* K64 */ be_nested_str_weak(MTR_X3A_X20I2RKey_X20_X20_X20_X20_X20_X20_X3D), + /* K65 */ be_nested_str_weak(MTR_X3A_X20R2IKey_X20_X20_X20_X20_X20_X20_X3D), + /* K66 */ be_nested_str_weak(MTR_X3A_X20AC_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K67 */ be_nested_str_weak(encode), + /* K68 */ be_nested_str_weak(__Msg1), + /* K69 */ be_nested_str_weak(MTR_X3A_X20sigma2resume_raw_X3A_X20), + /* K70 */ be_nested_str_weak(build_response), + /* K71 */ be_nested_str_weak(responder), + /* K72 */ be_nested_str_weak(send_response), + /* K73 */ be_nested_str_weak(remote_ip), + /* K74 */ be_nested_str_weak(remote_port), + /* K75 */ be_nested_str_weak(message_counter), + /* K76 */ be_nested_str_weak(set_keys), + /* K77 */ be_nested_str_weak(ResponderEph_priv), + /* K78 */ be_nested_str_weak(ResponderEph_pub), + /* K79 */ be_nested_str_weak(EC_P256), + /* K80 */ be_nested_str_weak(public_key), + /* K81 */ be_nested_str_weak(shared_key), + /* K82 */ be_nested_str_weak(TLV), + /* K83 */ be_nested_str_weak(Matter_TLV_struct), + /* K84 */ be_nested_str_weak(add_TLV), + /* K85 */ be_const_int(1), + /* K86 */ be_nested_str_weak(B2), + /* K87 */ be_nested_str_weak(get_noc), + /* K88 */ be_const_int(2), + /* K89 */ be_nested_str_weak(get_icac), + /* K90 */ be_const_int(3), + /* K91 */ be_nested_str_weak(ecdsa_sign_sha256), + /* K92 */ be_nested_str_weak(get_pk), + /* K93 */ be_nested_str_weak(Msg1), + /* K94 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20MSG1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K95 */ be_nested_str_weak(SHA256), + /* K96 */ be_nested_str_weak(update), + /* K97 */ be_nested_str_weak(out), + /* K98 */ be_nested_str_weak(S2K_Info), + /* K99 */ be_nested_str_weak(get_ipk_group_key), + /* K100 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20SharedSecret_X20_X20_X3D_X20), + /* K101 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_salt_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K102 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K103 */ be_nested_str_weak(TBEData2_Nonce), + /* K104 */ be_nested_str_weak(encrypt), + /* K105 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Enc_X20_X20_X20_X3D_X20), + /* K106 */ be_nested_str_weak(Sigma2), + /* K107 */ be_nested_str_weak(responderRandom), + /* K108 */ be_nested_str_weak(responderSessionId), + /* K109 */ be_nested_str_weak(responderEphPubKey), + /* K110 */ be_nested_str_weak(encrypted2), + /* K111 */ be_nested_str_weak(MTR_X3A_X20sigma2_X3A_X20), + /* K112 */ be_nested_str_weak(inspect), + /* K113 */ be_nested_str_weak(__Msg2), + /* K114 */ be_nested_str_weak(MTR_X3A_X20sigma2_raw_X3A_X20), + }), + be_str_weak(parse_Sigma1), + &be_const_str_solidified, + ( &(const binstruction[560]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x880C0301, // 0001 GETMBR R3 R1 K1 + 0x5412002F, // 0002 LDINT R4 48 + 0x200C0604, // 0003 NE R3 R3 R4 + 0x740E0005, // 0004 JMPT R3 #000B + 0x880C0302, // 0005 GETMBR R3 R1 K2 + 0x200C0703, // 0006 NE R3 R3 K3 + 0x740E0002, // 0007 JMPT R3 #000B + 0x880C0304, // 0008 GETMBR R3 R1 K4 + 0x200C0703, // 0009 NE R3 R3 K3 + 0x780E0000, // 000A JMPF R3 #000C + 0xB0060B06, // 000B RAISE 1 K5 K6 + 0xB80E0E00, // 000C GETNGBL R3 K7 + 0x8C0C0708, // 000D GETMET R3 R3 K8 + 0x7C0C0200, // 000E CALL R3 1 + 0x8C0C0709, // 000F GETMET R3 R3 K9 + 0x8814030A, // 0010 GETMBR R5 R1 K10 + 0x8818030B, // 0011 GETMBR R6 R1 K11 + 0x7C0C0600, // 0012 CALL R3 3 + 0x8810070D, // 0013 GETMBR R4 R3 K13 + 0x90021804, // 0014 SETMBR R0 K12 R4 + 0x8810070E, // 0015 GETMBR R4 R3 K14 + 0x4C140000, // 0016 LDNIL R5 + 0x20100805, // 0017 NE R4 R4 R5 + 0x78120003, // 0018 JMPF R4 #001D + 0x8810070F, // 0019 GETMBR R4 R3 K15 + 0x4C140000, // 001A LDNIL R5 + 0x20100805, // 001B NE R4 R4 R5 + 0x74120000, // 001C JMPT R4 #001E + 0x50100001, // 001D LDBOOL R4 0 1 + 0x50100200, // 001E LDBOOL R4 1 0 + 0x88140310, // 001F GETMBR R5 R1 K16 + 0x78120006, // 0020 JMPF R4 #0028 + 0x88180111, // 0021 GETMBR R6 R0 K17 + 0x88180D12, // 0022 GETMBR R6 R6 K18 + 0x8C180D13, // 0023 GETMET R6 R6 K19 + 0x8820070E, // 0024 GETMBR R8 R3 K14 + 0x7C180400, // 0025 CALL R6 2 + 0x5C140C00, // 0026 MOVE R5 R6 + 0x70020004, // 0027 JMP #002D + 0x8C180114, // 0028 GETMET R6 R0 K20 + 0x88200715, // 0029 GETMBR R8 R3 K21 + 0x88240716, // 002A GETMBR R9 R3 K22 + 0x7C180600, // 002B CALL R6 3 + 0x90162E06, // 002C SETMBR R5 K23 R6 + 0x4C180000, // 002D LDNIL R6 + 0x1C180A06, // 002E EQ R6 R5 R6 + 0x741A0003, // 002F JMPT R6 #0034 + 0x88180B17, // 0030 GETMBR R6 R5 K23 + 0x4C1C0000, // 0031 LDNIL R7 + 0x1C180C07, // 0032 EQ R6 R6 R7 + 0x781A0000, // 0033 JMPF R6 #0035 + 0xB0063119, // 0034 RAISE 1 K24 K25 + 0x8818031A, // 0035 GETMBR R6 R1 K26 + 0x90163406, // 0036 SETMBR R5 K26 R6 + 0x8C180B1B, // 0037 GETMET R6 R5 K27 + 0x7C180200, // 0038 CALL R6 1 + 0x88180310, // 0039 GETMBR R6 R1 K16 + 0x20180C05, // 003A NE R6 R6 R5 + 0x781A0004, // 003B JMPF R6 #0041 + 0x88180111, // 003C GETMBR R6 R0 K17 + 0x88180D12, // 003D GETMBR R6 R6 K18 + 0x8C180D1C, // 003E GETMET R6 R6 K28 + 0x88200310, // 003F GETMBR R8 R1 K16 + 0x7C180400, // 0040 CALL R6 2 + 0x90062005, // 0041 SETMBR R1 K16 R5 + 0x8818071E, // 0042 GETMBR R6 R3 K30 + 0x90163A06, // 0043 SETMBR R5 K29 R6 + 0x88180111, // 0044 GETMBR R6 R0 K17 + 0x88180D12, // 0045 GETMBR R6 R6 K18 + 0x8C180D20, // 0046 GETMET R6 R6 K32 + 0x7C180200, // 0047 CALL R6 1 + 0x90163E06, // 0048 SETMBR R5 K31 R6 + 0x88180B1F, // 0049 GETMBR R6 R5 K31 + 0x90024206, // 004A SETMBR R0 K33 R6 + 0xB81A4400, // 004B GETNGBL R6 K34 + 0x8C180D23, // 004C GETMET R6 R6 K35 + 0x60200008, // 004D GETGBL R8 G8 + 0x88240121, // 004E GETMBR R9 R0 K33 + 0x7C200200, // 004F CALL R8 1 + 0x00224808, // 0050 ADD R8 K36 R8 + 0x7C180400, // 0051 CALL R6 2 + 0x781200E1, // 0052 JMPF R4 #0135 + 0x88180716, // 0053 GETMBR R6 R3 K22 + 0x881C070E, // 0054 GETMBR R7 R3 K14 + 0x00180C07, // 0055 ADD R6 R6 R7 + 0x601C0015, // 0056 GETGBL R7 G21 + 0x7C1C0000, // 0057 CALL R7 0 + 0x8C1C0F25, // 0058 GETMET R7 R7 K37 + 0x58240026, // 0059 LDCONST R9 K38 + 0x7C1C0400, // 005A CALL R7 2 + 0x8C200527, // 005B GETMET R8 R2 K39 + 0x7C200200, // 005C CALL R8 1 + 0x8C201128, // 005D GETMET R8 R8 K40 + 0x88280B29, // 005E GETMBR R10 R5 K41 + 0x5C2C0C00, // 005F MOVE R11 R6 + 0x5C300E00, // 0060 MOVE R12 R7 + 0x5436000F, // 0061 LDINT R13 16 + 0x7C200A00, // 0062 CALL R8 5 + 0x60240015, // 0063 GETGBL R9 G21 + 0x7C240000, // 0064 CALL R9 0 + 0x8C241325, // 0065 GETMET R9 R9 K37 + 0x582C002A, // 0066 LDCONST R11 K42 + 0x7C240400, // 0067 CALL R9 2 + 0x5429FFEE, // 0068 LDINT R10 -17 + 0x402A060A, // 0069 CONNECT R10 K3 R10 + 0x882C070F, // 006A GETMBR R11 R3 K15 + 0x9428160A, // 006B GETIDX R10 R11 R10 + 0x5431FFEF, // 006C LDINT R12 -16 + 0x4030192B, // 006D CONNECT R12 R12 K43 + 0x8834070F, // 006E GETMBR R13 R3 K15 + 0x942C1A0C, // 006F GETIDX R11 R13 R12 + 0x8C38052C, // 0070 GETMET R14 R2 K44 + 0x5C401000, // 0071 MOVE R16 R8 + 0x5C441200, // 0072 MOVE R17 R9 + 0x60480015, // 0073 GETGBL R18 G21 + 0x7C480000, // 0074 CALL R18 0 + 0x604C000C, // 0075 GETGBL R19 G12 + 0x5C501400, // 0076 MOVE R20 R10 + 0x7C4C0200, // 0077 CALL R19 1 + 0x5452000F, // 0078 LDINT R20 16 + 0x7C380C00, // 0079 CALL R14 6 + 0x5C301C00, // 007A MOVE R12 R14 + 0x8C38192D, // 007B GETMET R14 R12 K45 + 0x5C401400, // 007C MOVE R16 R10 + 0x7C380400, // 007D CALL R14 2 + 0x5C341C00, // 007E MOVE R13 R14 + 0x8C38192E, // 007F GETMET R14 R12 K46 + 0x7C380200, // 0080 CALL R14 1 + 0xB83E4400, // 0081 GETNGBL R15 K34 + 0x8C3C1F23, // 0082 GETMET R15 R15 K35 + 0x5844002F, // 0083 LDCONST R17 K47 + 0x544A0003, // 0084 LDINT R18 4 + 0x7C3C0600, // 0085 CALL R15 3 + 0xB83E4400, // 0086 GETNGBL R15 K34 + 0x8C3C1F23, // 0087 GETMET R15 R15 K35 + 0x8C441131, // 0088 GETMET R17 R8 K49 + 0x7C440200, // 0089 CALL R17 1 + 0x00466011, // 008A ADD R17 K48 R17 + 0x544A0003, // 008B LDINT R18 4 + 0x7C3C0600, // 008C CALL R15 3 + 0xB83E4400, // 008D GETNGBL R15 K34 + 0x8C3C1F23, // 008E GETMET R15 R15 K35 + 0x8C441731, // 008F GETMET R17 R11 K49 + 0x7C440200, // 0090 CALL R17 1 + 0x00466411, // 0091 ADD R17 K50 R17 + 0x544A0003, // 0092 LDINT R18 4 + 0x7C3C0600, // 0093 CALL R15 3 + 0xB83E4400, // 0094 GETNGBL R15 K34 + 0x8C3C1F23, // 0095 GETMET R15 R15 K35 + 0x8C441B31, // 0096 GETMET R17 R13 K49 + 0x7C440200, // 0097 CALL R17 1 + 0x00466611, // 0098 ADD R17 K51 R17 + 0x544A0003, // 0099 LDINT R18 4 + 0x7C3C0600, // 009A CALL R15 3 + 0xB83E4400, // 009B GETNGBL R15 K34 + 0x8C3C1F23, // 009C GETMET R15 R15 K35 + 0x8C441D31, // 009D GETMET R17 R14 K49 + 0x7C440200, // 009E CALL R17 1 + 0x00466811, // 009F ADD R17 K52 R17 + 0x544A0003, // 00A0 LDINT R18 4 + 0x7C3C0600, // 00A1 CALL R15 3 + 0xB83E4400, // 00A2 GETNGBL R15 K34 + 0x8C3C1F23, // 00A3 GETMET R15 R15 K35 + 0x5844002F, // 00A4 LDCONST R17 K47 + 0x544A0003, // 00A5 LDINT R18 4 + 0x7C3C0600, // 00A6 CALL R15 3 + 0x1C3C160E, // 00A7 EQ R15 R11 R14 + 0x783E0089, // 00A8 JMPF R15 #0133 + 0x8C3C0536, // 00A9 GETMET R15 R2 K54 + 0x5446000F, // 00AA LDINT R17 16 + 0x7C3C0400, // 00AB CALL R15 2 + 0x90166A0F, // 00AC SETMBR R5 K53 R15 + 0x603C0015, // 00AD GETGBL R15 G21 + 0x7C3C0000, // 00AE CALL R15 0 + 0x8C3C1F25, // 00AF GETMET R15 R15 K37 + 0x58440037, // 00B0 LDCONST R17 K55 + 0x7C3C0400, // 00B1 CALL R15 2 + 0x88400B35, // 00B2 GETMBR R16 R5 K53 + 0x003C1E10, // 00B3 ADD R15 R15 R16 + 0x88400716, // 00B4 GETMBR R16 R3 K22 + 0x8844070E, // 00B5 GETMBR R17 R3 K14 + 0x00402011, // 00B6 ADD R16 R16 R17 + 0x8C440527, // 00B7 GETMET R17 R2 K39 + 0x7C440200, // 00B8 CALL R17 1 + 0x8C442328, // 00B9 GETMET R17 R17 K40 + 0x884C0B29, // 00BA GETMBR R19 R5 K41 + 0x5C502000, // 00BB MOVE R20 R16 + 0x5C541E00, // 00BC MOVE R21 R15 + 0x545A000F, // 00BD LDINT R22 16 + 0x7C440A00, // 00BE CALL R17 5 + 0x8C48052C, // 00BF GETMET R18 R2 K44 + 0x5C502200, // 00C0 MOVE R20 R17 + 0x60540015, // 00C1 GETGBL R21 G21 + 0x7C540000, // 00C2 CALL R21 0 + 0x8C542B25, // 00C3 GETMET R21 R21 K37 + 0x585C0038, // 00C4 LDCONST R23 K56 + 0x7C540400, // 00C5 CALL R21 2 + 0x60580015, // 00C6 GETGBL R22 G21 + 0x7C580000, // 00C7 CALL R22 0 + 0x585C0003, // 00C8 LDCONST R23 K3 + 0x5462000F, // 00C9 LDINT R24 16 + 0x7C480C00, // 00CA CALL R18 6 + 0x8C4C252E, // 00CB GETMET R19 R18 K46 + 0x7C4C0200, // 00CC CALL R19 1 + 0xB8520E00, // 00CD GETNGBL R20 K7 + 0x8C502939, // 00CE GETMET R20 R20 K57 + 0x7C500200, // 00CF CALL R20 1 + 0x88540B35, // 00D0 GETMBR R21 R5 K53 + 0x90521C15, // 00D1 SETMBR R20 K14 R21 + 0x88540B1F, // 00D2 GETMBR R21 R5 K31 + 0x90527415, // 00D3 SETMBR R20 K58 R21 + 0x90527613, // 00D4 SETMBR R20 K59 R19 + 0x8C540527, // 00D5 GETMET R21 R2 K39 + 0x7C540200, // 00D6 CALL R21 1 + 0x8C542B28, // 00D7 GETMET R21 R21 K40 + 0x885C0B29, // 00D8 GETMBR R23 R5 K41 + 0x88600716, // 00D9 GETMBR R24 R3 K22 + 0x8864070E, // 00DA GETMBR R25 R3 K14 + 0x00603019, // 00DB ADD R24 R24 R25 + 0x60640015, // 00DC GETGBL R25 G21 + 0x7C640000, // 00DD CALL R25 0 + 0x8C643325, // 00DE GETMET R25 R25 K37 + 0x586C003C, // 00DF LDCONST R27 K60 + 0x7C640400, // 00E0 CALL R25 2 + 0x546A002F, // 00E1 LDINT R26 48 + 0x7C540A00, // 00E2 CALL R21 5 + 0x545A000E, // 00E3 LDINT R22 15 + 0x405A0616, // 00E4 CONNECT R22 K3 R22 + 0x94582A16, // 00E5 GETIDX R22 R21 R22 + 0x545E000F, // 00E6 LDINT R23 16 + 0x5462001E, // 00E7 LDINT R24 31 + 0x405C2E18, // 00E8 CONNECT R23 R23 R24 + 0x945C2A17, // 00E9 GETIDX R23 R21 R23 + 0x5462001F, // 00EA LDINT R24 32 + 0x5466002E, // 00EB LDINT R25 47 + 0x40603019, // 00EC CONNECT R24 R24 R25 + 0x94602A18, // 00ED GETIDX R24 R21 R24 + 0xB8664400, // 00EE GETNGBL R25 K34 + 0x8C64333D, // 00EF GETMET R25 R25 K61 + 0x7C640200, // 00F0 CALL R25 1 + 0x9464333E, // 00F1 GETIDX R25 R25 K62 + 0xB86A4400, // 00F2 GETNGBL R26 K34 + 0x8C683523, // 00F3 GETMET R26 R26 K35 + 0x5870003F, // 00F4 LDCONST R28 K63 + 0x54760003, // 00F5 LDINT R29 4 + 0x7C680600, // 00F6 CALL R26 3 + 0xB86A4400, // 00F7 GETNGBL R26 K34 + 0x8C683523, // 00F8 GETMET R26 R26 K35 + 0x8C702D31, // 00F9 GETMET R28 R22 K49 + 0x7C700200, // 00FA CALL R28 1 + 0x0072801C, // 00FB ADD R28 K64 R28 + 0x54760003, // 00FC LDINT R29 4 + 0x7C680600, // 00FD CALL R26 3 + 0xB86A4400, // 00FE GETNGBL R26 K34 + 0x8C683523, // 00FF GETMET R26 R26 K35 + 0x8C702F31, // 0100 GETMET R28 R23 K49 + 0x7C700200, // 0101 CALL R28 1 + 0x0072821C, // 0102 ADD R28 K65 R28 + 0x54760003, // 0103 LDINT R29 4 + 0x7C680600, // 0104 CALL R26 3 + 0xB86A4400, // 0105 GETNGBL R26 K34 + 0x8C683523, // 0106 GETMET R26 R26 K35 + 0x8C703131, // 0107 GETMET R28 R24 K49 + 0x7C700200, // 0108 CALL R28 1 + 0x0072841C, // 0109 ADD R28 K66 R28 + 0x54760003, // 010A LDINT R29 4 + 0x7C680600, // 010B CALL R26 3 + 0xB86A4400, // 010C GETNGBL R26 K34 + 0x8C683523, // 010D GETMET R26 R26 K35 + 0x5870003F, // 010E LDCONST R28 K63 + 0x54760003, // 010F LDINT R29 4 + 0x7C680600, // 0110 CALL R26 3 + 0x8C682943, // 0111 GETMET R26 R20 K67 + 0x7C680200, // 0112 CALL R26 1 + 0x4C6C0000, // 0113 LDNIL R27 + 0x9016881B, // 0114 SETMBR R5 K68 R27 + 0xB86E4400, // 0115 GETNGBL R27 K34 + 0x8C6C3723, // 0116 GETMET R27 R27 K35 + 0x8C743531, // 0117 GETMET R29 R26 K49 + 0x7C740200, // 0118 CALL R29 1 + 0x00768A1D, // 0119 ADD R29 K69 R29 + 0x547A0003, // 011A LDINT R30 4 + 0x7C6C0600, // 011B CALL R27 3 + 0x8C6C0346, // 011C GETMET R27 R1 K70 + 0x54760032, // 011D LDINT R29 51 + 0x50780200, // 011E LDBOOL R30 1 0 + 0x7C6C0600, // 011F CALL R27 3 + 0x8C703743, // 0120 GETMET R28 R27 K67 + 0x5C783400, // 0121 MOVE R30 R26 + 0x7C700400, // 0122 CALL R28 2 + 0x88740147, // 0123 GETMBR R29 R0 K71 + 0x8C743B48, // 0124 GETMET R29 R29 K72 + 0x5C7C3800, // 0125 MOVE R31 R28 + 0x88800349, // 0126 GETMBR R32 R1 K73 + 0x8884034A, // 0127 GETMBR R33 R1 K74 + 0x8888374B, // 0128 GETMBR R34 R27 K75 + 0x7C740A00, // 0129 CALL R29 5 + 0x8C740B4C, // 012A GETMET R29 R5 K76 + 0x5C7C2C00, // 012B MOVE R31 R22 + 0x5C802E00, // 012C MOVE R32 R23 + 0x5C843000, // 012D MOVE R33 R24 + 0x5C883200, // 012E MOVE R34 R25 + 0x7C740A00, // 012F CALL R29 5 + 0x50740200, // 0130 LDBOOL R29 1 0 + 0x80043A00, // 0131 RET 1 R29 + 0x70020001, // 0132 JMP #0135 + 0x4C3C0000, // 0133 LDNIL R15 + 0x900E1C0F, // 0134 SETMBR R3 K14 R15 + 0x8818070E, // 0135 GETMBR R6 R3 K14 + 0x4C1C0000, // 0136 LDNIL R7 + 0x1C180C07, // 0137 EQ R6 R6 R7 + 0x741A0003, // 0138 JMPT R6 #013D + 0x8818070F, // 0139 GETMBR R6 R3 K15 + 0x4C1C0000, // 013A LDNIL R7 + 0x1C180C07, // 013B EQ R6 R6 R7 + 0x781A00F0, // 013C JMPF R6 #022E + 0x8C180536, // 013D GETMET R6 R2 K54 + 0x5422000F, // 013E LDINT R8 16 + 0x7C180400, // 013F CALL R6 2 + 0x90166A06, // 0140 SETMBR R5 K53 R6 + 0x8C180536, // 0141 GETMET R6 R2 K54 + 0x5422001F, // 0142 LDINT R8 32 + 0x7C180400, // 0143 CALL R6 2 + 0x90029A06, // 0144 SETMBR R0 K77 R6 + 0x8C18054F, // 0145 GETMET R6 R2 K79 + 0x7C180200, // 0146 CALL R6 1 + 0x8C180D50, // 0147 GETMET R6 R6 K80 + 0x8820014D, // 0148 GETMBR R8 R0 K77 + 0x7C180400, // 0149 CALL R6 2 + 0x90029C06, // 014A SETMBR R0 K78 R6 + 0x8C180536, // 014B GETMET R6 R2 K54 + 0x5422001F, // 014C LDINT R8 32 + 0x7C180400, // 014D CALL R6 2 + 0x8C1C054F, // 014E GETMET R7 R2 K79 + 0x7C1C0200, // 014F CALL R7 1 + 0x8C1C0F51, // 0150 GETMET R7 R7 K81 + 0x8824014D, // 0151 GETMBR R9 R0 K77 + 0x8828070D, // 0152 GETMBR R10 R3 K13 + 0x7C1C0600, // 0153 CALL R7 3 + 0x90165207, // 0154 SETMBR R5 K41 R7 + 0xB81E0E00, // 0155 GETNGBL R7 K7 + 0x881C0F52, // 0156 GETMBR R7 R7 K82 + 0x8C1C0F53, // 0157 GETMET R7 R7 K83 + 0x7C1C0200, // 0158 CALL R7 1 + 0x8C200F54, // 0159 GETMET R8 R7 K84 + 0x58280055, // 015A LDCONST R10 K85 + 0xB82E0E00, // 015B GETNGBL R11 K7 + 0x882C1752, // 015C GETMBR R11 R11 K82 + 0x882C1756, // 015D GETMBR R11 R11 K86 + 0x8C300B57, // 015E GETMET R12 R5 K87 + 0x7C300200, // 015F CALL R12 1 + 0x7C200800, // 0160 CALL R8 4 + 0x8C200F54, // 0161 GETMET R8 R7 K84 + 0x58280058, // 0162 LDCONST R10 K88 + 0xB82E0E00, // 0163 GETNGBL R11 K7 + 0x882C1752, // 0164 GETMBR R11 R11 K82 + 0x882C1756, // 0165 GETMBR R11 R11 K86 + 0x8C300B59, // 0166 GETMET R12 R5 K89 + 0x7C300200, // 0167 CALL R12 1 + 0x7C200800, // 0168 CALL R8 4 + 0x8C200F54, // 0169 GETMET R8 R7 K84 + 0x5828005A, // 016A LDCONST R10 K90 + 0xB82E0E00, // 016B GETNGBL R11 K7 + 0x882C1752, // 016C GETMBR R11 R11 K82 + 0x882C1756, // 016D GETMBR R11 R11 K86 + 0x8830014E, // 016E GETMBR R12 R0 K78 + 0x7C200800, // 016F CALL R8 4 + 0x8C200F54, // 0170 GETMET R8 R7 K84 + 0x542A0003, // 0171 LDINT R10 4 + 0xB82E0E00, // 0172 GETNGBL R11 K7 + 0x882C1752, // 0173 GETMBR R11 R11 K82 + 0x882C1756, // 0174 GETMBR R11 R11 K86 + 0x8830070D, // 0175 GETMBR R12 R3 K13 + 0x7C200800, // 0176 CALL R8 4 + 0x8C20054F, // 0177 GETMET R8 R2 K79 + 0x7C200200, // 0178 CALL R8 1 + 0x8C20115B, // 0179 GETMET R8 R8 K91 + 0x8C280B5C, // 017A GETMET R10 R5 K92 + 0x7C280200, // 017B CALL R10 1 + 0x8C2C0F43, // 017C GETMET R11 R7 K67 + 0x7C2C0200, // 017D CALL R11 1 + 0x7C200600, // 017E CALL R8 3 + 0xB8260E00, // 017F GETNGBL R9 K7 + 0x88241352, // 0180 GETMBR R9 R9 K82 + 0x8C241353, // 0181 GETMET R9 R9 K83 + 0x7C240200, // 0182 CALL R9 1 + 0x8C281354, // 0183 GETMET R10 R9 K84 + 0x58300055, // 0184 LDCONST R12 K85 + 0xB8360E00, // 0185 GETNGBL R13 K7 + 0x88341B52, // 0186 GETMBR R13 R13 K82 + 0x88341B56, // 0187 GETMBR R13 R13 K86 + 0x8C380B57, // 0188 GETMET R14 R5 K87 + 0x7C380200, // 0189 CALL R14 1 + 0x7C280800, // 018A CALL R10 4 + 0x8C281354, // 018B GETMET R10 R9 K84 + 0x58300058, // 018C LDCONST R12 K88 + 0xB8360E00, // 018D GETNGBL R13 K7 + 0x88341B52, // 018E GETMBR R13 R13 K82 + 0x88341B56, // 018F GETMBR R13 R13 K86 + 0x8C380B59, // 0190 GETMET R14 R5 K89 + 0x7C380200, // 0191 CALL R14 1 + 0x7C280800, // 0192 CALL R10 4 + 0x8C281354, // 0193 GETMET R10 R9 K84 + 0x5830005A, // 0194 LDCONST R12 K90 + 0xB8360E00, // 0195 GETNGBL R13 K7 + 0x88341B52, // 0196 GETMBR R13 R13 K82 + 0x88341B56, // 0197 GETMBR R13 R13 K86 + 0x5C381000, // 0198 MOVE R14 R8 + 0x7C280800, // 0199 CALL R10 4 + 0x8C281354, // 019A GETMET R10 R9 K84 + 0x54320003, // 019B LDINT R12 4 + 0xB8360E00, // 019C GETNGBL R13 K7 + 0x88341B52, // 019D GETMBR R13 R13 K82 + 0x88341B56, // 019E GETMBR R13 R13 K86 + 0x88380B35, // 019F GETMBR R14 R5 K53 + 0x7C280800, // 01A0 CALL R10 4 + 0xB82A4400, // 01A1 GETNGBL R10 K34 + 0x8C281523, // 01A2 GETMET R10 R10 K35 + 0x5830002F, // 01A3 LDCONST R12 K47 + 0x54360003, // 01A4 LDINT R13 4 + 0x7C280600, // 01A5 CALL R10 3 + 0x8828075D, // 01A6 GETMBR R10 R3 K93 + 0x9016880A, // 01A7 SETMBR R5 K68 R10 + 0xB82A4400, // 01A8 GETNGBL R10 K34 + 0x8C281523, // 01A9 GETMET R10 R10 K35 + 0x88300B44, // 01AA GETMBR R12 R5 K68 + 0x8C301931, // 01AB GETMET R12 R12 K49 + 0x7C300200, // 01AC CALL R12 1 + 0x0032BC0C, // 01AD ADD R12 K94 R12 + 0x54360003, // 01AE LDINT R13 4 + 0x7C280600, // 01AF CALL R10 3 + 0x8C28055F, // 01B0 GETMET R10 R2 K95 + 0x7C280200, // 01B1 CALL R10 1 + 0x8C281560, // 01B2 GETMET R10 R10 K96 + 0x88300B44, // 01B3 GETMBR R12 R5 K68 + 0x7C280400, // 01B4 CALL R10 2 + 0x8C281561, // 01B5 GETMET R10 R10 K97 + 0x7C280200, // 01B6 CALL R10 1 + 0x602C0015, // 01B7 GETGBL R11 G21 + 0x7C2C0000, // 01B8 CALL R11 0 + 0x8C2C1725, // 01B9 GETMET R11 R11 K37 + 0x88340162, // 01BA GETMBR R13 R0 K98 + 0x7C2C0400, // 01BB CALL R11 2 + 0x8C300B63, // 01BC GETMET R12 R5 K99 + 0x7C300200, // 01BD CALL R12 1 + 0x00301806, // 01BE ADD R12 R12 R6 + 0x8834014E, // 01BF GETMBR R13 R0 K78 + 0x0030180D, // 01C0 ADD R12 R12 R13 + 0x0030180A, // 01C1 ADD R12 R12 R10 + 0x8C340527, // 01C2 GETMET R13 R2 K39 + 0x7C340200, // 01C3 CALL R13 1 + 0x8C341B28, // 01C4 GETMET R13 R13 K40 + 0x883C0B29, // 01C5 GETMBR R15 R5 K41 + 0x5C401800, // 01C6 MOVE R16 R12 + 0x5C441600, // 01C7 MOVE R17 R11 + 0x544A000F, // 01C8 LDINT R18 16 + 0x7C340A00, // 01C9 CALL R13 5 + 0xB83A4400, // 01CA GETNGBL R14 K34 + 0x8C381D23, // 01CB GETMET R14 R14 K35 + 0x88400B29, // 01CC GETMBR R16 R5 K41 + 0x8C402131, // 01CD GETMET R16 R16 K49 + 0x7C400200, // 01CE CALL R16 1 + 0x0042C810, // 01CF ADD R16 K100 R16 + 0x54460003, // 01D0 LDINT R17 4 + 0x7C380600, // 01D1 CALL R14 3 + 0xB83A4400, // 01D2 GETNGBL R14 K34 + 0x8C381D23, // 01D3 GETMET R14 R14 K35 + 0x8C401931, // 01D4 GETMET R16 R12 K49 + 0x7C400200, // 01D5 CALL R16 1 + 0x0042CA10, // 01D6 ADD R16 K101 R16 + 0x54460003, // 01D7 LDINT R17 4 + 0x7C380600, // 01D8 CALL R14 3 + 0xB83A4400, // 01D9 GETNGBL R14 K34 + 0x8C381D23, // 01DA GETMET R14 R14 K35 + 0x8C401B31, // 01DB GETMET R16 R13 K49 + 0x7C400200, // 01DC CALL R16 1 + 0x0042CC10, // 01DD ADD R16 K102 R16 + 0x54460003, // 01DE LDINT R17 4 + 0x7C380600, // 01DF CALL R14 3 + 0x8C381343, // 01E0 GETMET R14 R9 K67 + 0x7C380200, // 01E1 CALL R14 1 + 0x8C3C052C, // 01E2 GETMET R15 R2 K44 + 0x5C441A00, // 01E3 MOVE R17 R13 + 0x60480015, // 01E4 GETGBL R18 G21 + 0x7C480000, // 01E5 CALL R18 0 + 0x8C482525, // 01E6 GETMET R18 R18 K37 + 0x88500167, // 01E7 GETMBR R20 R0 K103 + 0x7C480400, // 01E8 CALL R18 2 + 0x604C0015, // 01E9 GETGBL R19 G21 + 0x7C4C0000, // 01EA CALL R19 0 + 0x6050000C, // 01EB GETGBL R20 G12 + 0x5C541C00, // 01EC MOVE R21 R14 + 0x7C500200, // 01ED CALL R20 1 + 0x5456000F, // 01EE LDINT R21 16 + 0x7C3C0C00, // 01EF CALL R15 6 + 0x8C401F68, // 01F0 GETMET R16 R15 K104 + 0x5C481C00, // 01F1 MOVE R18 R14 + 0x7C400400, // 01F2 CALL R16 2 + 0x8C441F2E, // 01F3 GETMET R17 R15 K46 + 0x7C440200, // 01F4 CALL R17 1 + 0x00402011, // 01F5 ADD R16 R16 R17 + 0xB8464400, // 01F6 GETNGBL R17 K34 + 0x8C442323, // 01F7 GETMET R17 R17 K35 + 0x8C4C2131, // 01F8 GETMET R19 R16 K49 + 0x7C4C0200, // 01F9 CALL R19 1 + 0x004ED213, // 01FA ADD R19 K105 R19 + 0x54520003, // 01FB LDINT R20 4 + 0x7C440600, // 01FC CALL R17 3 + 0xB8464400, // 01FD GETNGBL R17 K34 + 0x8C442323, // 01FE GETMET R17 R17 K35 + 0x584C002F, // 01FF LDCONST R19 K47 + 0x54520003, // 0200 LDINT R20 4 + 0x7C440600, // 0201 CALL R17 3 + 0xB8460E00, // 0202 GETNGBL R17 K7 + 0x8C44236A, // 0203 GETMET R17 R17 K106 + 0x7C440200, // 0204 CALL R17 1 + 0x9046D606, // 0205 SETMBR R17 K107 R6 + 0x88480121, // 0206 GETMBR R18 R0 K33 + 0x9046D812, // 0207 SETMBR R17 K108 R18 + 0x8848014E, // 0208 GETMBR R18 R0 K78 + 0x9046DA12, // 0209 SETMBR R17 K109 R18 + 0x9046DC10, // 020A SETMBR R17 K110 R16 + 0xB84A4400, // 020B GETNGBL R18 K34 + 0x8C482523, // 020C GETMET R18 R18 K35 + 0xB8520E00, // 020D GETNGBL R20 K7 + 0x8C502970, // 020E GETMET R20 R20 K112 + 0x5C582200, // 020F MOVE R22 R17 + 0x7C500400, // 0210 CALL R20 2 + 0x0052DE14, // 0211 ADD R20 K111 R20 + 0x54560003, // 0212 LDINT R21 4 + 0x7C480600, // 0213 CALL R18 3 + 0x8C482343, // 0214 GETMET R18 R17 K67 + 0x7C480200, // 0215 CALL R18 1 + 0x9016E212, // 0216 SETMBR R5 K113 R18 + 0xB84E4400, // 0217 GETNGBL R19 K34 + 0x8C4C2723, // 0218 GETMET R19 R19 K35 + 0x8C542531, // 0219 GETMET R21 R18 K49 + 0x7C540200, // 021A CALL R21 1 + 0x0056E415, // 021B ADD R21 K114 R21 + 0x545A0003, // 021C LDINT R22 4 + 0x7C4C0600, // 021D CALL R19 3 + 0x8C4C0346, // 021E GETMET R19 R1 K70 + 0x54560030, // 021F LDINT R21 49 + 0x50580200, // 0220 LDBOOL R22 1 0 + 0x7C4C0600, // 0221 CALL R19 3 + 0x8C502743, // 0222 GETMET R20 R19 K67 + 0x5C582400, // 0223 MOVE R22 R18 + 0x7C500400, // 0224 CALL R20 2 + 0x88540147, // 0225 GETMBR R21 R0 K71 + 0x8C542B48, // 0226 GETMET R21 R21 K72 + 0x5C5C2800, // 0227 MOVE R23 R20 + 0x88600349, // 0228 GETMBR R24 R1 K73 + 0x8864034A, // 0229 GETMBR R25 R1 K74 + 0x8868274B, // 022A GETMBR R26 R19 K75 + 0x7C540A00, // 022B CALL R21 5 + 0x50540200, // 022C LDBOOL R21 1 0 + 0x80042A00, // 022D RET 1 R21 + 0x50180200, // 022E LDBOOL R6 1 0 + 0x80040C00, // 022F RET 1 R6 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: parse_Sigma3 ********************************************************************/ @@ -793,7 +1521,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[94]) { /* constants */ + ( &(const bvalue[95]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(opcode), /* K2 */ be_nested_str_weak(local_session_id), @@ -812,14 +1540,14 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */ /* K15 */ be_nested_str_weak(_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), /* K16 */ be_nested_str_weak(SHA256), /* K17 */ be_nested_str_weak(update), - /* K18 */ be_nested_str_weak(_Msg1), - /* K19 */ be_nested_str_weak(_Msg2), + /* K18 */ be_nested_str_weak(__Msg1), + /* K19 */ be_nested_str_weak(__Msg2), /* K20 */ be_nested_str_weak(out), /* K21 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20session_X20_X20_X20_X20_X20_X20_X20_X3D_X20), /* K22 */ be_nested_str_weak(MTR_X3A_X20session_X2Eipk_epoch_key_X20), - /* K23 */ be_nested_str_weak(ipk_epoch_key), + /* K23 */ be_nested_str_weak(get_ipk_epoch_key), /* K24 */ be_nested_str_weak(MTR_X3A_X20session_X2Efabric_compressed_X20), - /* K25 */ be_nested_str_weak(fabric_compressed), + /* K25 */ be_nested_str_weak(get_fabric_compressed), /* K26 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20ipk_group_key_X20_X3D_X20), /* K27 */ be_nested_str_weak(get_ipk_group_key), /* K28 */ be_nested_str_weak(tohex), @@ -887,11 +1615,12 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */ /* K90 */ be_nested_str_weak(set_keys), /* K91 */ be_nested_str_weak(set_persist), /* K92 */ be_nested_str_weak(set_no_expiration), - /* K93 */ be_nested_str_weak(save), + /* K93 */ be_nested_str_weak(persist_to_fabric), + /* K94 */ be_nested_str_weak(save), }), be_str_weak(parse_Sigma3), &be_const_str_solidified, - ( &(const binstruction[445]) { /* code */ + ( &(const binstruction[449]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0x880C0301, // 0001 GETMBR R3 R1 K1 0x54120031, // 0002 LDINT R4 50 @@ -938,405 +1667,409 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */ 0xB81A1A00, // 002B GETNGBL R6 K13 0x8C180D0E, // 002C GETMET R6 R6 K14 0x60200008, // 002D GETGBL R8 G8 - 0x88240717, // 002E GETMBR R9 R3 K23 - 0x7C200200, // 002F CALL R8 1 - 0x00222C08, // 0030 ADD R8 K22 R8 - 0x54260003, // 0031 LDINT R9 4 - 0x7C180600, // 0032 CALL R6 3 - 0xB81A1A00, // 0033 GETNGBL R6 K13 - 0x8C180D0E, // 0034 GETMET R6 R6 K14 - 0x60200008, // 0035 GETGBL R8 G8 - 0x88240719, // 0036 GETMBR R9 R3 K25 - 0x7C200200, // 0037 CALL R8 1 - 0x00223008, // 0038 ADD R8 K24 R8 - 0x54260003, // 0039 LDINT R9 4 - 0x7C180600, // 003A CALL R6 3 - 0xB81A1A00, // 003B GETNGBL R6 K13 - 0x8C180D0E, // 003C GETMET R6 R6 K14 - 0x8C20071B, // 003D GETMET R8 R3 K27 - 0x7C200200, // 003E CALL R8 1 - 0x8C20111C, // 003F GETMET R8 R8 K28 + 0x8C240717, // 002E GETMET R9 R3 K23 + 0x7C240200, // 002F CALL R9 1 + 0x7C200200, // 0030 CALL R8 1 + 0x00222C08, // 0031 ADD R8 K22 R8 + 0x54260003, // 0032 LDINT R9 4 + 0x7C180600, // 0033 CALL R6 3 + 0xB81A1A00, // 0034 GETNGBL R6 K13 + 0x8C180D0E, // 0035 GETMET R6 R6 K14 + 0x60200008, // 0036 GETGBL R8 G8 + 0x8C240719, // 0037 GETMET R9 R3 K25 + 0x7C240200, // 0038 CALL R9 1 + 0x7C200200, // 0039 CALL R8 1 + 0x00223008, // 003A ADD R8 K24 R8 + 0x54260003, // 003B LDINT R9 4 + 0x7C180600, // 003C CALL R6 3 + 0xB81A1A00, // 003D GETNGBL R6 K13 + 0x8C180D0E, // 003E GETMET R6 R6 K14 + 0x8C20071B, // 003F GETMET R8 R3 K27 0x7C200200, // 0040 CALL R8 1 - 0x00223408, // 0041 ADD R8 K26 R8 - 0x54260003, // 0042 LDINT R9 4 - 0x7C180600, // 0043 CALL R6 3 - 0xB81A1A00, // 0044 GETNGBL R6 K13 - 0x8C180D0E, // 0045 GETMET R6 R6 K14 - 0x8C200B1C, // 0046 GETMET R8 R5 K28 - 0x7C200200, // 0047 CALL R8 1 - 0x00223A08, // 0048 ADD R8 K29 R8 - 0x54260003, // 0049 LDINT R9 4 - 0x7C180600, // 004A CALL R6 3 - 0x60180015, // 004B GETGBL R6 G21 - 0x7C180000, // 004C CALL R6 0 - 0x8C180D1E, // 004D GETMET R6 R6 K30 - 0x8820011F, // 004E GETMBR R8 R0 K31 - 0x7C180400, // 004F CALL R6 2 - 0x8C1C0520, // 0050 GETMET R7 R2 K32 - 0x7C1C0200, // 0051 CALL R7 1 - 0x8C1C0F21, // 0052 GETMET R7 R7 K33 - 0x88240722, // 0053 GETMBR R9 R3 K34 - 0x8C28071B, // 0054 GETMET R10 R3 K27 - 0x7C280200, // 0055 CALL R10 1 - 0x00281405, // 0056 ADD R10 R10 R5 - 0x5C2C0C00, // 0057 MOVE R11 R6 - 0x5432000F, // 0058 LDINT R12 16 - 0x7C1C0A00, // 0059 CALL R7 5 - 0xB8221A00, // 005A GETNGBL R8 K13 - 0x8C20110E, // 005B GETMET R8 R8 K14 - 0x5828000F, // 005C LDCONST R10 K15 - 0x542E0003, // 005D LDINT R11 4 - 0x7C200600, // 005E CALL R8 3 - 0xB8221A00, // 005F GETNGBL R8 K13 - 0x8C20110E, // 0060 GETMET R8 R8 K14 - 0x8C28071B, // 0061 GETMET R10 R3 K27 - 0x7C280200, // 0062 CALL R10 1 - 0x00281405, // 0063 ADD R10 R10 R5 - 0x8C28151C, // 0064 GETMET R10 R10 K28 - 0x7C280200, // 0065 CALL R10 1 - 0x002A460A, // 0066 ADD R10 K35 R10 - 0x542E0003, // 0067 LDINT R11 4 - 0x7C200600, // 0068 CALL R8 3 - 0xB8221A00, // 0069 GETNGBL R8 K13 - 0x8C20110E, // 006A GETMET R8 R8 K14 - 0x8C280F1C, // 006B GETMET R10 R7 K28 - 0x7C280200, // 006C CALL R10 1 - 0x002A480A, // 006D ADD R10 K36 R10 - 0x542E0003, // 006E LDINT R11 4 - 0x7C200600, // 006F CALL R8 3 - 0xB8221A00, // 0070 GETNGBL R8 K13 - 0x8C20110E, // 0071 GETMET R8 R8 K14 - 0x5828000F, // 0072 LDCONST R10 K15 - 0x542E0003, // 0073 LDINT R11 4 - 0x7C200600, // 0074 CALL R8 3 - 0x5421FFEE, // 0075 LDINT R8 -17 - 0x40220608, // 0076 CONNECT R8 K3 R8 - 0x88240925, // 0077 GETMBR R9 R4 K37 - 0x94201208, // 0078 GETIDX R8 R9 R8 - 0x5429FFEF, // 0079 LDINT R10 -16 - 0x40281526, // 007A CONNECT R10 R10 K38 - 0x882C0925, // 007B GETMBR R11 R4 K37 - 0x9424160A, // 007C GETIDX R9 R11 R10 - 0x8C300527, // 007D GETMET R12 R2 K39 - 0x5C380E00, // 007E MOVE R14 R7 - 0x603C0015, // 007F GETGBL R15 G21 - 0x7C3C0000, // 0080 CALL R15 0 - 0x8C3C1F1E, // 0081 GETMET R15 R15 K30 - 0x88440128, // 0082 GETMBR R17 R0 K40 - 0x7C3C0400, // 0083 CALL R15 2 - 0x60400015, // 0084 GETGBL R16 G21 - 0x7C400000, // 0085 CALL R16 0 - 0x6044000C, // 0086 GETGBL R17 G12 - 0x5C481000, // 0087 MOVE R18 R8 - 0x7C440200, // 0088 CALL R17 1 - 0x544A000F, // 0089 LDINT R18 16 - 0x7C300C00, // 008A CALL R12 6 - 0x5C281800, // 008B MOVE R10 R12 - 0x8C301529, // 008C GETMET R12 R10 K41 - 0x5C381000, // 008D MOVE R14 R8 - 0x7C300400, // 008E CALL R12 2 - 0x5C2C1800, // 008F MOVE R11 R12 - 0x8C30152A, // 0090 GETMET R12 R10 K42 - 0x7C300200, // 0091 CALL R12 1 - 0xB8361A00, // 0092 GETNGBL R13 K13 - 0x8C341B0E, // 0093 GETMET R13 R13 K14 - 0x8C3C171C, // 0094 GETMET R15 R11 K28 - 0x7C3C0200, // 0095 CALL R15 1 - 0x003E560F, // 0096 ADD R15 K43 R15 - 0x54420003, // 0097 LDINT R16 4 - 0x7C340600, // 0098 CALL R13 3 - 0xB8361A00, // 0099 GETNGBL R13 K13 - 0x8C341B0E, // 009A GETMET R13 R13 K14 - 0x8C3C191C, // 009B GETMET R15 R12 K28 - 0x7C3C0200, // 009C CALL R15 1 - 0x003E580F, // 009D ADD R15 K44 R15 - 0x54420003, // 009E LDINT R16 4 - 0x7C340600, // 009F CALL R13 3 - 0xB8361A00, // 00A0 GETNGBL R13 K13 - 0x8C341B0E, // 00A1 GETMET R13 R13 K14 - 0x8C3C131C, // 00A2 GETMET R15 R9 K28 - 0x7C3C0200, // 00A3 CALL R15 1 - 0x003E5A0F, // 00A4 ADD R15 K45 R15 - 0x54420003, // 00A5 LDINT R16 4 - 0x7C340600, // 00A6 CALL R13 3 - 0xB8361A00, // 00A7 GETNGBL R13 K13 - 0x8C341B0E, // 00A8 GETMET R13 R13 K14 - 0x583C000F, // 00A9 LDCONST R15 K15 - 0x54420003, // 00AA LDINT R16 4 - 0x7C340600, // 00AB CALL R13 3 - 0x20341809, // 00AC NE R13 R12 R9 - 0x78360000, // 00AD JMPF R13 #00AF - 0xB0065D2F, // 00AE RAISE 1 K46 K47 - 0xB8361000, // 00AF GETNGBL R13 K8 - 0x88341B30, // 00B0 GETMBR R13 R13 K48 - 0x8C341B0A, // 00B1 GETMET R13 R13 K10 - 0x5C3C1600, // 00B2 MOVE R15 R11 - 0x7C340400, // 00B3 CALL R13 2 - 0x8C381B31, // 00B4 GETMET R14 R13 K49 - 0x58400032, // 00B5 LDCONST R16 K50 - 0x7C380400, // 00B6 CALL R14 2 - 0x8C3C1B31, // 00B7 GETMET R15 R13 K49 - 0x58440033, // 00B8 LDCONST R17 K51 - 0x7C3C0400, // 00B9 CALL R15 2 - 0x8C401B31, // 00BA GETMET R16 R13 K49 - 0x58480034, // 00BB LDCONST R18 K52 - 0x7C400400, // 00BC CALL R16 2 - 0xB8461000, // 00BD GETNGBL R17 K8 - 0x88442330, // 00BE GETMBR R17 R17 K48 - 0x8C44230A, // 00BF GETMET R17 R17 K10 - 0x5C4C1C00, // 00C0 MOVE R19 R14 - 0x7C440400, // 00C1 CALL R17 2 - 0xB84A1A00, // 00C2 GETNGBL R18 K13 - 0x8C48250E, // 00C3 GETMET R18 R18 K14 - 0x60500008, // 00C4 GETGBL R20 G8 - 0x5C542200, // 00C5 MOVE R21 R17 - 0x7C500200, // 00C6 CALL R20 1 - 0x00526A14, // 00C7 ADD R20 K53 R20 - 0x58540034, // 00C8 LDCONST R21 K52 - 0x7C480600, // 00C9 CALL R18 3 - 0x8C482331, // 00CA GETMET R18 R17 K49 - 0x54520008, // 00CB LDINT R20 9 - 0x7C480400, // 00CC CALL R18 2 - 0x8C4C2336, // 00CD GETMET R19 R17 K54 - 0x54560005, // 00CE LDINT R21 6 - 0x7C4C0400, // 00CF CALL R19 2 - 0x8C502731, // 00D0 GETMET R20 R19 K49 - 0x545A0010, // 00D1 LDINT R22 17 - 0x7C500400, // 00D2 CALL R20 2 - 0x60540004, // 00D3 GETGBL R21 G4 - 0x5C582800, // 00D4 MOVE R22 R20 - 0x7C540200, // 00D5 CALL R21 1 - 0x1C542B37, // 00D6 EQ R21 R21 K55 - 0x78560003, // 00D7 JMPF R21 #00DC - 0xB8567000, // 00D8 GETNGBL R21 K56 - 0x5C582800, // 00D9 MOVE R22 R20 - 0x7C540200, // 00DA CALL R21 1 - 0x5C502A00, // 00DB MOVE R20 R21 - 0x8C54293A, // 00DC GETMET R21 R20 K58 - 0x7C540200, // 00DD CALL R21 1 - 0x900E7215, // 00DE SETMBR R3 K57 R21 - 0xB8561A00, // 00DF GETNGBL R21 K13 - 0x8C542B0E, // 00E0 GETMET R21 R21 K14 - 0x605C0008, // 00E1 GETGBL R23 G8 - 0x88600739, // 00E2 GETMBR R24 R3 K57 - 0x7C5C0200, // 00E3 CALL R23 1 - 0x005E7617, // 00E4 ADD R23 K59 R23 - 0x58600034, // 00E5 LDCONST R24 K52 - 0x7C540600, // 00E6 CALL R21 3 - 0xB8561000, // 00E7 GETNGBL R21 K8 - 0x88542B30, // 00E8 GETMBR R21 R21 K48 - 0x8C542B3C, // 00E9 GETMET R21 R21 K60 - 0x7C540200, // 00EA CALL R21 1 - 0x8C582B3D, // 00EB GETMET R22 R21 K61 - 0x58600032, // 00EC LDCONST R24 K50 - 0xB8661000, // 00ED GETNGBL R25 K8 - 0x88643330, // 00EE GETMBR R25 R25 K48 - 0x8864333E, // 00EF GETMBR R25 R25 K62 - 0x5C681C00, // 00F0 MOVE R26 R14 - 0x7C580800, // 00F1 CALL R22 4 - 0x8C582B3D, // 00F2 GETMET R22 R21 K61 - 0x58600033, // 00F3 LDCONST R24 K51 - 0xB8661000, // 00F4 GETNGBL R25 K8 - 0x88643330, // 00F5 GETMBR R25 R25 K48 - 0x8864333E, // 00F6 GETMBR R25 R25 K62 - 0x5C681E00, // 00F7 MOVE R26 R15 - 0x7C580800, // 00F8 CALL R22 4 - 0x8C582B3D, // 00F9 GETMET R22 R21 K61 - 0x58600034, // 00FA LDCONST R24 K52 - 0xB8661000, // 00FB GETNGBL R25 K8 - 0x88643330, // 00FC GETMBR R25 R25 K48 - 0x8864333E, // 00FD GETMBR R25 R25 K62 - 0x8868013F, // 00FE GETMBR R26 R0 K63 - 0x7C580800, // 00FF CALL R22 4 - 0x8C582B3D, // 0100 GETMET R22 R21 K61 - 0x54620003, // 0101 LDINT R24 4 - 0xB8661000, // 0102 GETNGBL R25 K8 - 0x88643330, // 0103 GETMBR R25 R25 K48 - 0x8864333E, // 0104 GETMBR R25 R25 K62 - 0x88680140, // 0105 GETMBR R26 R0 K64 - 0x7C580800, // 0106 CALL R22 4 - 0x8C582B41, // 0107 GETMET R22 R21 K65 - 0x7C580200, // 0108 CALL R22 1 - 0xB85E1A00, // 0109 GETNGBL R23 K13 - 0x8C5C2F0E, // 010A GETMET R23 R23 K14 - 0x8C64251C, // 010B GETMET R25 R18 K28 - 0x7C640200, // 010C CALL R25 1 - 0x00668419, // 010D ADD R25 K66 R25 - 0x546A0003, // 010E LDINT R26 4 - 0x7C5C0600, // 010F CALL R23 3 - 0xB85E1A00, // 0110 GETNGBL R23 K13 - 0x8C5C2F0E, // 0111 GETMET R23 R23 K14 - 0x8C64211C, // 0112 GETMET R25 R16 K28 - 0x7C640200, // 0113 CALL R25 1 - 0x00668619, // 0114 ADD R25 K67 R25 - 0x546A0003, // 0115 LDINT R26 4 - 0x7C5C0600, // 0116 CALL R23 3 - 0xB85E1A00, // 0117 GETNGBL R23 K13 - 0x8C5C2F0E, // 0118 GETMET R23 R23 K14 - 0x5864000F, // 0119 LDCONST R25 K15 - 0x546A0003, // 011A LDINT R26 4 - 0x7C5C0600, // 011B CALL R23 3 - 0x8C5C0544, // 011C GETMET R23 R2 K68 - 0x7C5C0200, // 011D CALL R23 1 - 0x8C5C2F45, // 011E GETMET R23 R23 K69 - 0x5C642400, // 011F MOVE R25 R18 - 0x5C682C00, // 0120 MOVE R26 R22 - 0x5C6C2000, // 0121 MOVE R27 R16 - 0x7C5C0800, // 0122 CALL R23 4 - 0x5C602E00, // 0123 MOVE R24 R23 - 0x74620000, // 0124 JMPT R24 #0126 - 0xB0065D46, // 0125 RAISE 1 K46 K70 - 0xB8621A00, // 0126 GETNGBL R24 K13 - 0x8C60310E, // 0127 GETMET R24 R24 K14 - 0x58680047, // 0128 LDCONST R26 K71 - 0x586C0034, // 0129 LDCONST R27 K52 - 0x7C600600, // 012A CALL R24 3 - 0x8C600510, // 012B GETMET R24 R2 K16 - 0x7C600200, // 012C CALL R24 1 - 0x8C603111, // 012D GETMET R24 R24 K17 - 0x88680712, // 012E GETMBR R26 R3 K18 - 0x7C600400, // 012F CALL R24 2 - 0x8C603111, // 0130 GETMET R24 R24 K17 - 0x88680713, // 0131 GETMBR R26 R3 K19 - 0x7C600400, // 0132 CALL R24 2 - 0x8C603111, // 0133 GETMET R24 R24 K17 - 0x88680948, // 0134 GETMBR R26 R4 K72 - 0x7C600400, // 0135 CALL R24 2 - 0x8C603114, // 0136 GETMET R24 R24 K20 - 0x7C600200, // 0137 CALL R24 1 - 0x5C143000, // 0138 MOVE R5 R24 - 0x4C600000, // 0139 LDNIL R24 - 0x900E2418, // 013A SETMBR R3 K18 R24 + 0x8C20111C, // 0041 GETMET R8 R8 K28 + 0x7C200200, // 0042 CALL R8 1 + 0x00223408, // 0043 ADD R8 K26 R8 + 0x54260003, // 0044 LDINT R9 4 + 0x7C180600, // 0045 CALL R6 3 + 0xB81A1A00, // 0046 GETNGBL R6 K13 + 0x8C180D0E, // 0047 GETMET R6 R6 K14 + 0x8C200B1C, // 0048 GETMET R8 R5 K28 + 0x7C200200, // 0049 CALL R8 1 + 0x00223A08, // 004A ADD R8 K29 R8 + 0x54260003, // 004B LDINT R9 4 + 0x7C180600, // 004C CALL R6 3 + 0x60180015, // 004D GETGBL R6 G21 + 0x7C180000, // 004E CALL R6 0 + 0x8C180D1E, // 004F GETMET R6 R6 K30 + 0x8820011F, // 0050 GETMBR R8 R0 K31 + 0x7C180400, // 0051 CALL R6 2 + 0x8C1C0520, // 0052 GETMET R7 R2 K32 + 0x7C1C0200, // 0053 CALL R7 1 + 0x8C1C0F21, // 0054 GETMET R7 R7 K33 + 0x88240722, // 0055 GETMBR R9 R3 K34 + 0x8C28071B, // 0056 GETMET R10 R3 K27 + 0x7C280200, // 0057 CALL R10 1 + 0x00281405, // 0058 ADD R10 R10 R5 + 0x5C2C0C00, // 0059 MOVE R11 R6 + 0x5432000F, // 005A LDINT R12 16 + 0x7C1C0A00, // 005B CALL R7 5 + 0xB8221A00, // 005C GETNGBL R8 K13 + 0x8C20110E, // 005D GETMET R8 R8 K14 + 0x5828000F, // 005E LDCONST R10 K15 + 0x542E0003, // 005F LDINT R11 4 + 0x7C200600, // 0060 CALL R8 3 + 0xB8221A00, // 0061 GETNGBL R8 K13 + 0x8C20110E, // 0062 GETMET R8 R8 K14 + 0x8C28071B, // 0063 GETMET R10 R3 K27 + 0x7C280200, // 0064 CALL R10 1 + 0x00281405, // 0065 ADD R10 R10 R5 + 0x8C28151C, // 0066 GETMET R10 R10 K28 + 0x7C280200, // 0067 CALL R10 1 + 0x002A460A, // 0068 ADD R10 K35 R10 + 0x542E0003, // 0069 LDINT R11 4 + 0x7C200600, // 006A CALL R8 3 + 0xB8221A00, // 006B GETNGBL R8 K13 + 0x8C20110E, // 006C GETMET R8 R8 K14 + 0x8C280F1C, // 006D GETMET R10 R7 K28 + 0x7C280200, // 006E CALL R10 1 + 0x002A480A, // 006F ADD R10 K36 R10 + 0x542E0003, // 0070 LDINT R11 4 + 0x7C200600, // 0071 CALL R8 3 + 0xB8221A00, // 0072 GETNGBL R8 K13 + 0x8C20110E, // 0073 GETMET R8 R8 K14 + 0x5828000F, // 0074 LDCONST R10 K15 + 0x542E0003, // 0075 LDINT R11 4 + 0x7C200600, // 0076 CALL R8 3 + 0x5421FFEE, // 0077 LDINT R8 -17 + 0x40220608, // 0078 CONNECT R8 K3 R8 + 0x88240925, // 0079 GETMBR R9 R4 K37 + 0x94201208, // 007A GETIDX R8 R9 R8 + 0x5429FFEF, // 007B LDINT R10 -16 + 0x40281526, // 007C CONNECT R10 R10 K38 + 0x882C0925, // 007D GETMBR R11 R4 K37 + 0x9424160A, // 007E GETIDX R9 R11 R10 + 0x8C300527, // 007F GETMET R12 R2 K39 + 0x5C380E00, // 0080 MOVE R14 R7 + 0x603C0015, // 0081 GETGBL R15 G21 + 0x7C3C0000, // 0082 CALL R15 0 + 0x8C3C1F1E, // 0083 GETMET R15 R15 K30 + 0x88440128, // 0084 GETMBR R17 R0 K40 + 0x7C3C0400, // 0085 CALL R15 2 + 0x60400015, // 0086 GETGBL R16 G21 + 0x7C400000, // 0087 CALL R16 0 + 0x6044000C, // 0088 GETGBL R17 G12 + 0x5C481000, // 0089 MOVE R18 R8 + 0x7C440200, // 008A CALL R17 1 + 0x544A000F, // 008B LDINT R18 16 + 0x7C300C00, // 008C CALL R12 6 + 0x5C281800, // 008D MOVE R10 R12 + 0x8C301529, // 008E GETMET R12 R10 K41 + 0x5C381000, // 008F MOVE R14 R8 + 0x7C300400, // 0090 CALL R12 2 + 0x5C2C1800, // 0091 MOVE R11 R12 + 0x8C30152A, // 0092 GETMET R12 R10 K42 + 0x7C300200, // 0093 CALL R12 1 + 0xB8361A00, // 0094 GETNGBL R13 K13 + 0x8C341B0E, // 0095 GETMET R13 R13 K14 + 0x8C3C171C, // 0096 GETMET R15 R11 K28 + 0x7C3C0200, // 0097 CALL R15 1 + 0x003E560F, // 0098 ADD R15 K43 R15 + 0x54420003, // 0099 LDINT R16 4 + 0x7C340600, // 009A CALL R13 3 + 0xB8361A00, // 009B GETNGBL R13 K13 + 0x8C341B0E, // 009C GETMET R13 R13 K14 + 0x8C3C191C, // 009D GETMET R15 R12 K28 + 0x7C3C0200, // 009E CALL R15 1 + 0x003E580F, // 009F ADD R15 K44 R15 + 0x54420003, // 00A0 LDINT R16 4 + 0x7C340600, // 00A1 CALL R13 3 + 0xB8361A00, // 00A2 GETNGBL R13 K13 + 0x8C341B0E, // 00A3 GETMET R13 R13 K14 + 0x8C3C131C, // 00A4 GETMET R15 R9 K28 + 0x7C3C0200, // 00A5 CALL R15 1 + 0x003E5A0F, // 00A6 ADD R15 K45 R15 + 0x54420003, // 00A7 LDINT R16 4 + 0x7C340600, // 00A8 CALL R13 3 + 0xB8361A00, // 00A9 GETNGBL R13 K13 + 0x8C341B0E, // 00AA GETMET R13 R13 K14 + 0x583C000F, // 00AB LDCONST R15 K15 + 0x54420003, // 00AC LDINT R16 4 + 0x7C340600, // 00AD CALL R13 3 + 0x20341809, // 00AE NE R13 R12 R9 + 0x78360000, // 00AF JMPF R13 #00B1 + 0xB0065D2F, // 00B0 RAISE 1 K46 K47 + 0xB8361000, // 00B1 GETNGBL R13 K8 + 0x88341B30, // 00B2 GETMBR R13 R13 K48 + 0x8C341B0A, // 00B3 GETMET R13 R13 K10 + 0x5C3C1600, // 00B4 MOVE R15 R11 + 0x7C340400, // 00B5 CALL R13 2 + 0x8C381B31, // 00B6 GETMET R14 R13 K49 + 0x58400032, // 00B7 LDCONST R16 K50 + 0x7C380400, // 00B8 CALL R14 2 + 0x8C3C1B31, // 00B9 GETMET R15 R13 K49 + 0x58440033, // 00BA LDCONST R17 K51 + 0x7C3C0400, // 00BB CALL R15 2 + 0x8C401B31, // 00BC GETMET R16 R13 K49 + 0x58480034, // 00BD LDCONST R18 K52 + 0x7C400400, // 00BE CALL R16 2 + 0xB8461000, // 00BF GETNGBL R17 K8 + 0x88442330, // 00C0 GETMBR R17 R17 K48 + 0x8C44230A, // 00C1 GETMET R17 R17 K10 + 0x5C4C1C00, // 00C2 MOVE R19 R14 + 0x7C440400, // 00C3 CALL R17 2 + 0xB84A1A00, // 00C4 GETNGBL R18 K13 + 0x8C48250E, // 00C5 GETMET R18 R18 K14 + 0x60500008, // 00C6 GETGBL R20 G8 + 0x5C542200, // 00C7 MOVE R21 R17 + 0x7C500200, // 00C8 CALL R20 1 + 0x00526A14, // 00C9 ADD R20 K53 R20 + 0x58540034, // 00CA LDCONST R21 K52 + 0x7C480600, // 00CB CALL R18 3 + 0x8C482331, // 00CC GETMET R18 R17 K49 + 0x54520008, // 00CD LDINT R20 9 + 0x7C480400, // 00CE CALL R18 2 + 0x8C4C2336, // 00CF GETMET R19 R17 K54 + 0x54560005, // 00D0 LDINT R21 6 + 0x7C4C0400, // 00D1 CALL R19 2 + 0x8C502731, // 00D2 GETMET R20 R19 K49 + 0x545A0010, // 00D3 LDINT R22 17 + 0x7C500400, // 00D4 CALL R20 2 + 0x60540004, // 00D5 GETGBL R21 G4 + 0x5C582800, // 00D6 MOVE R22 R20 + 0x7C540200, // 00D7 CALL R21 1 + 0x1C542B37, // 00D8 EQ R21 R21 K55 + 0x78560003, // 00D9 JMPF R21 #00DE + 0xB8567000, // 00DA GETNGBL R21 K56 + 0x5C582800, // 00DB MOVE R22 R20 + 0x7C540200, // 00DC CALL R21 1 + 0x5C502A00, // 00DD MOVE R20 R21 + 0x8C54293A, // 00DE GETMET R21 R20 K58 + 0x7C540200, // 00DF CALL R21 1 + 0x900E7215, // 00E0 SETMBR R3 K57 R21 + 0xB8561A00, // 00E1 GETNGBL R21 K13 + 0x8C542B0E, // 00E2 GETMET R21 R21 K14 + 0x605C0008, // 00E3 GETGBL R23 G8 + 0x88600739, // 00E4 GETMBR R24 R3 K57 + 0x7C5C0200, // 00E5 CALL R23 1 + 0x005E7617, // 00E6 ADD R23 K59 R23 + 0x58600034, // 00E7 LDCONST R24 K52 + 0x7C540600, // 00E8 CALL R21 3 + 0xB8561000, // 00E9 GETNGBL R21 K8 + 0x88542B30, // 00EA GETMBR R21 R21 K48 + 0x8C542B3C, // 00EB GETMET R21 R21 K60 + 0x7C540200, // 00EC CALL R21 1 + 0x8C582B3D, // 00ED GETMET R22 R21 K61 + 0x58600032, // 00EE LDCONST R24 K50 + 0xB8661000, // 00EF GETNGBL R25 K8 + 0x88643330, // 00F0 GETMBR R25 R25 K48 + 0x8864333E, // 00F1 GETMBR R25 R25 K62 + 0x5C681C00, // 00F2 MOVE R26 R14 + 0x7C580800, // 00F3 CALL R22 4 + 0x8C582B3D, // 00F4 GETMET R22 R21 K61 + 0x58600033, // 00F5 LDCONST R24 K51 + 0xB8661000, // 00F6 GETNGBL R25 K8 + 0x88643330, // 00F7 GETMBR R25 R25 K48 + 0x8864333E, // 00F8 GETMBR R25 R25 K62 + 0x5C681E00, // 00F9 MOVE R26 R15 + 0x7C580800, // 00FA CALL R22 4 + 0x8C582B3D, // 00FB GETMET R22 R21 K61 + 0x58600034, // 00FC LDCONST R24 K52 + 0xB8661000, // 00FD GETNGBL R25 K8 + 0x88643330, // 00FE GETMBR R25 R25 K48 + 0x8864333E, // 00FF GETMBR R25 R25 K62 + 0x8868013F, // 0100 GETMBR R26 R0 K63 + 0x7C580800, // 0101 CALL R22 4 + 0x8C582B3D, // 0102 GETMET R22 R21 K61 + 0x54620003, // 0103 LDINT R24 4 + 0xB8661000, // 0104 GETNGBL R25 K8 + 0x88643330, // 0105 GETMBR R25 R25 K48 + 0x8864333E, // 0106 GETMBR R25 R25 K62 + 0x88680140, // 0107 GETMBR R26 R0 K64 + 0x7C580800, // 0108 CALL R22 4 + 0x8C582B41, // 0109 GETMET R22 R21 K65 + 0x7C580200, // 010A CALL R22 1 + 0xB85E1A00, // 010B GETNGBL R23 K13 + 0x8C5C2F0E, // 010C GETMET R23 R23 K14 + 0x8C64251C, // 010D GETMET R25 R18 K28 + 0x7C640200, // 010E CALL R25 1 + 0x00668419, // 010F ADD R25 K66 R25 + 0x546A0003, // 0110 LDINT R26 4 + 0x7C5C0600, // 0111 CALL R23 3 + 0xB85E1A00, // 0112 GETNGBL R23 K13 + 0x8C5C2F0E, // 0113 GETMET R23 R23 K14 + 0x8C64211C, // 0114 GETMET R25 R16 K28 + 0x7C640200, // 0115 CALL R25 1 + 0x00668619, // 0116 ADD R25 K67 R25 + 0x546A0003, // 0117 LDINT R26 4 + 0x7C5C0600, // 0118 CALL R23 3 + 0xB85E1A00, // 0119 GETNGBL R23 K13 + 0x8C5C2F0E, // 011A GETMET R23 R23 K14 + 0x5864000F, // 011B LDCONST R25 K15 + 0x546A0003, // 011C LDINT R26 4 + 0x7C5C0600, // 011D CALL R23 3 + 0x8C5C0544, // 011E GETMET R23 R2 K68 + 0x7C5C0200, // 011F CALL R23 1 + 0x8C5C2F45, // 0120 GETMET R23 R23 K69 + 0x5C642400, // 0121 MOVE R25 R18 + 0x5C682C00, // 0122 MOVE R26 R22 + 0x5C6C2000, // 0123 MOVE R27 R16 + 0x7C5C0800, // 0124 CALL R23 4 + 0x5C602E00, // 0125 MOVE R24 R23 + 0x74620000, // 0126 JMPT R24 #0128 + 0xB0065D46, // 0127 RAISE 1 K46 K70 + 0xB8621A00, // 0128 GETNGBL R24 K13 + 0x8C60310E, // 0129 GETMET R24 R24 K14 + 0x58680047, // 012A LDCONST R26 K71 + 0x586C0034, // 012B LDCONST R27 K52 + 0x7C600600, // 012C CALL R24 3 + 0x8C600510, // 012D GETMET R24 R2 K16 + 0x7C600200, // 012E CALL R24 1 + 0x8C603111, // 012F GETMET R24 R24 K17 + 0x88680712, // 0130 GETMBR R26 R3 K18 + 0x7C600400, // 0131 CALL R24 2 + 0x8C603111, // 0132 GETMET R24 R24 K17 + 0x88680713, // 0133 GETMBR R26 R3 K19 + 0x7C600400, // 0134 CALL R24 2 + 0x8C603111, // 0135 GETMET R24 R24 K17 + 0x88680948, // 0136 GETMBR R26 R4 K72 + 0x7C600400, // 0137 CALL R24 2 + 0x8C603114, // 0138 GETMET R24 R24 K20 + 0x7C600200, // 0139 CALL R24 1 + 0x5C143000, // 013A MOVE R5 R24 0x4C600000, // 013B LDNIL R24 - 0x900E2618, // 013C SETMBR R3 K19 R24 - 0xB8621A00, // 013D GETNGBL R24 K13 - 0x8C60310E, // 013E GETMET R24 R24 K14 - 0x58680049, // 013F LDCONST R26 K73 - 0x546E0003, // 0140 LDINT R27 4 - 0x7C600600, // 0141 CALL R24 3 - 0xB8621A00, // 0142 GETNGBL R24 K13 - 0x8C60310E, // 0143 GETMET R24 R24 K14 - 0x88680722, // 0144 GETMBR R26 R3 K34 - 0x8C68351C, // 0145 GETMET R26 R26 K28 - 0x7C680200, // 0146 CALL R26 1 - 0x006A941A, // 0147 ADD R26 K74 R26 - 0x546E0003, // 0148 LDINT R27 4 - 0x7C600600, // 0149 CALL R24 3 - 0xB8621A00, // 014A GETNGBL R24 K13 - 0x8C60310E, // 014B GETMET R24 R24 K14 - 0x8C68071B, // 014C GETMET R26 R3 K27 - 0x7C680200, // 014D CALL R26 1 - 0x00683405, // 014E ADD R26 R26 R5 - 0x8C68351C, // 014F GETMET R26 R26 K28 - 0x7C680200, // 0150 CALL R26 1 - 0x006A961A, // 0151 ADD R26 K75 R26 - 0x546E0003, // 0152 LDINT R27 4 - 0x7C600600, // 0153 CALL R24 3 - 0x8C600520, // 0154 GETMET R24 R2 K32 - 0x7C600200, // 0155 CALL R24 1 - 0x8C603121, // 0156 GETMET R24 R24 K33 - 0x88680722, // 0157 GETMBR R26 R3 K34 - 0x8C6C071B, // 0158 GETMET R27 R3 K27 - 0x7C6C0200, // 0159 CALL R27 1 - 0x006C3605, // 015A ADD R27 R27 R5 - 0x60700015, // 015B GETGBL R28 G21 - 0x7C700000, // 015C CALL R28 0 - 0x8C70391E, // 015D GETMET R28 R28 K30 - 0x8878014C, // 015E GETMBR R30 R0 K76 - 0x7C700400, // 015F CALL R28 2 - 0x5476002F, // 0160 LDINT R29 48 - 0x7C600A00, // 0161 CALL R24 5 - 0x5466000E, // 0162 LDINT R25 15 - 0x40660619, // 0163 CONNECT R25 K3 R25 - 0x94643019, // 0164 GETIDX R25 R24 R25 - 0x546A000F, // 0165 LDINT R26 16 - 0x546E001E, // 0166 LDINT R27 31 - 0x4068341B, // 0167 CONNECT R26 R26 R27 - 0x9468301A, // 0168 GETIDX R26 R24 R26 - 0x546E001F, // 0169 LDINT R27 32 - 0x5472002E, // 016A LDINT R28 47 - 0x406C361C, // 016B CONNECT R27 R27 R28 - 0x946C301B, // 016C GETIDX R27 R24 R27 - 0xB8721A00, // 016D GETNGBL R28 K13 - 0x8C70394D, // 016E GETMET R28 R28 K77 - 0x7C700200, // 016F CALL R28 1 - 0x9470394E, // 0170 GETIDX R28 R28 K78 - 0xB8761A00, // 0171 GETNGBL R29 K13 - 0x8C743B0E, // 0172 GETMET R29 R29 K14 - 0x587C0049, // 0173 LDCONST R31 K73 - 0x54820003, // 0174 LDINT R32 4 - 0x7C740600, // 0175 CALL R29 3 - 0xB8761A00, // 0176 GETNGBL R29 K13 - 0x8C743B0E, // 0177 GETMET R29 R29 K14 - 0x8C7C331C, // 0178 GETMET R31 R25 K28 - 0x7C7C0200, // 0179 CALL R31 1 - 0x007E9E1F, // 017A ADD R31 K79 R31 - 0x54820003, // 017B LDINT R32 4 - 0x7C740600, // 017C CALL R29 3 - 0xB8761A00, // 017D GETNGBL R29 K13 - 0x8C743B0E, // 017E GETMET R29 R29 K14 - 0x8C7C351C, // 017F GETMET R31 R26 K28 - 0x7C7C0200, // 0180 CALL R31 1 - 0x007EA01F, // 0181 ADD R31 K80 R31 - 0x54820003, // 0182 LDINT R32 4 - 0x7C740600, // 0183 CALL R29 3 - 0xB8761A00, // 0184 GETNGBL R29 K13 - 0x8C743B0E, // 0185 GETMET R29 R29 K14 - 0x8C7C371C, // 0186 GETMET R31 R27 K28 - 0x7C7C0200, // 0187 CALL R31 1 - 0x007EA21F, // 0188 ADD R31 K81 R31 - 0x54820003, // 0189 LDINT R32 4 - 0x7C740600, // 018A CALL R29 3 - 0xB8761A00, // 018B GETNGBL R29 K13 - 0x8C743B0E, // 018C GETMET R29 R29 K14 - 0x587C0049, // 018D LDCONST R31 K73 - 0x54820003, // 018E LDINT R32 4 - 0x7C740600, // 018F CALL R29 3 - 0x8C740352, // 0190 GETMET R29 R1 K82 - 0x547E003F, // 0191 LDINT R31 64 - 0x50800200, // 0192 LDBOOL R32 1 0 - 0x7C740600, // 0193 CALL R29 3 - 0x60780015, // 0194 GETGBL R30 G21 - 0x7C780000, // 0195 CALL R30 0 - 0x8C7C3D53, // 0196 GETMET R31 R30 K83 - 0x58840003, // 0197 LDCONST R33 K3 - 0x58880033, // 0198 LDCONST R34 K51 - 0x7C7C0600, // 0199 CALL R31 3 - 0x8C7C3D53, // 019A GETMET R31 R30 K83 - 0x58840003, // 019B LDCONST R33 K3 - 0x548A0003, // 019C LDINT R34 4 - 0x7C7C0600, // 019D CALL R31 3 - 0x8C7C3D53, // 019E GETMET R31 R30 K83 - 0x58840003, // 019F LDCONST R33 K3 - 0x548A0003, // 01A0 LDINT R34 4 - 0x7C7C0600, // 01A1 CALL R31 3 - 0x8C7C3B41, // 01A2 GETMET R31 R29 K65 - 0x5C843C00, // 01A3 MOVE R33 R30 - 0x7C7C0400, // 01A4 CALL R31 2 - 0x88800154, // 01A5 GETMBR R32 R0 K84 - 0x8C804155, // 01A6 GETMET R32 R32 K85 - 0x5C883E00, // 01A7 MOVE R34 R31 - 0x888C0356, // 01A8 GETMBR R35 R1 K86 - 0x88900357, // 01A9 GETMBR R36 R1 K87 - 0x88943B58, // 01AA GETMBR R37 R29 K88 - 0x7C800A00, // 01AB CALL R32 5 - 0x8C800759, // 01AC GETMET R32 R3 K89 - 0x7C800200, // 01AD CALL R32 1 - 0x8C80075A, // 01AE GETMET R32 R3 K90 - 0x5C883200, // 01AF MOVE R34 R25 - 0x5C8C3400, // 01B0 MOVE R35 R26 - 0x5C903600, // 01B1 MOVE R36 R27 - 0x5C943800, // 01B2 MOVE R37 R28 - 0x7C800A00, // 01B3 CALL R32 5 - 0x8C80075B, // 01B4 GETMET R32 R3 K91 - 0x50880200, // 01B5 LDBOOL R34 1 0 - 0x7C800400, // 01B6 CALL R32 2 - 0x8C80075C, // 01B7 GETMET R32 R3 K92 - 0x7C800200, // 01B8 CALL R32 1 - 0x8C80075D, // 01B9 GETMET R32 R3 K93 + 0x900E2418, // 013C SETMBR R3 K18 R24 + 0x4C600000, // 013D LDNIL R24 + 0x900E2618, // 013E SETMBR R3 K19 R24 + 0xB8621A00, // 013F GETNGBL R24 K13 + 0x8C60310E, // 0140 GETMET R24 R24 K14 + 0x58680049, // 0141 LDCONST R26 K73 + 0x546E0003, // 0142 LDINT R27 4 + 0x7C600600, // 0143 CALL R24 3 + 0xB8621A00, // 0144 GETNGBL R24 K13 + 0x8C60310E, // 0145 GETMET R24 R24 K14 + 0x88680722, // 0146 GETMBR R26 R3 K34 + 0x8C68351C, // 0147 GETMET R26 R26 K28 + 0x7C680200, // 0148 CALL R26 1 + 0x006A941A, // 0149 ADD R26 K74 R26 + 0x546E0003, // 014A LDINT R27 4 + 0x7C600600, // 014B CALL R24 3 + 0xB8621A00, // 014C GETNGBL R24 K13 + 0x8C60310E, // 014D GETMET R24 R24 K14 + 0x8C68071B, // 014E GETMET R26 R3 K27 + 0x7C680200, // 014F CALL R26 1 + 0x00683405, // 0150 ADD R26 R26 R5 + 0x8C68351C, // 0151 GETMET R26 R26 K28 + 0x7C680200, // 0152 CALL R26 1 + 0x006A961A, // 0153 ADD R26 K75 R26 + 0x546E0003, // 0154 LDINT R27 4 + 0x7C600600, // 0155 CALL R24 3 + 0x8C600520, // 0156 GETMET R24 R2 K32 + 0x7C600200, // 0157 CALL R24 1 + 0x8C603121, // 0158 GETMET R24 R24 K33 + 0x88680722, // 0159 GETMBR R26 R3 K34 + 0x8C6C071B, // 015A GETMET R27 R3 K27 + 0x7C6C0200, // 015B CALL R27 1 + 0x006C3605, // 015C ADD R27 R27 R5 + 0x60700015, // 015D GETGBL R28 G21 + 0x7C700000, // 015E CALL R28 0 + 0x8C70391E, // 015F GETMET R28 R28 K30 + 0x8878014C, // 0160 GETMBR R30 R0 K76 + 0x7C700400, // 0161 CALL R28 2 + 0x5476002F, // 0162 LDINT R29 48 + 0x7C600A00, // 0163 CALL R24 5 + 0x5466000E, // 0164 LDINT R25 15 + 0x40660619, // 0165 CONNECT R25 K3 R25 + 0x94643019, // 0166 GETIDX R25 R24 R25 + 0x546A000F, // 0167 LDINT R26 16 + 0x546E001E, // 0168 LDINT R27 31 + 0x4068341B, // 0169 CONNECT R26 R26 R27 + 0x9468301A, // 016A GETIDX R26 R24 R26 + 0x546E001F, // 016B LDINT R27 32 + 0x5472002E, // 016C LDINT R28 47 + 0x406C361C, // 016D CONNECT R27 R27 R28 + 0x946C301B, // 016E GETIDX R27 R24 R27 + 0xB8721A00, // 016F GETNGBL R28 K13 + 0x8C70394D, // 0170 GETMET R28 R28 K77 + 0x7C700200, // 0171 CALL R28 1 + 0x9470394E, // 0172 GETIDX R28 R28 K78 + 0xB8761A00, // 0173 GETNGBL R29 K13 + 0x8C743B0E, // 0174 GETMET R29 R29 K14 + 0x587C0049, // 0175 LDCONST R31 K73 + 0x54820003, // 0176 LDINT R32 4 + 0x7C740600, // 0177 CALL R29 3 + 0xB8761A00, // 0178 GETNGBL R29 K13 + 0x8C743B0E, // 0179 GETMET R29 R29 K14 + 0x8C7C331C, // 017A GETMET R31 R25 K28 + 0x7C7C0200, // 017B CALL R31 1 + 0x007E9E1F, // 017C ADD R31 K79 R31 + 0x54820003, // 017D LDINT R32 4 + 0x7C740600, // 017E CALL R29 3 + 0xB8761A00, // 017F GETNGBL R29 K13 + 0x8C743B0E, // 0180 GETMET R29 R29 K14 + 0x8C7C351C, // 0181 GETMET R31 R26 K28 + 0x7C7C0200, // 0182 CALL R31 1 + 0x007EA01F, // 0183 ADD R31 K80 R31 + 0x54820003, // 0184 LDINT R32 4 + 0x7C740600, // 0185 CALL R29 3 + 0xB8761A00, // 0186 GETNGBL R29 K13 + 0x8C743B0E, // 0187 GETMET R29 R29 K14 + 0x8C7C371C, // 0188 GETMET R31 R27 K28 + 0x7C7C0200, // 0189 CALL R31 1 + 0x007EA21F, // 018A ADD R31 K81 R31 + 0x54820003, // 018B LDINT R32 4 + 0x7C740600, // 018C CALL R29 3 + 0xB8761A00, // 018D GETNGBL R29 K13 + 0x8C743B0E, // 018E GETMET R29 R29 K14 + 0x587C0049, // 018F LDCONST R31 K73 + 0x54820003, // 0190 LDINT R32 4 + 0x7C740600, // 0191 CALL R29 3 + 0x8C740352, // 0192 GETMET R29 R1 K82 + 0x547E003F, // 0193 LDINT R31 64 + 0x50800200, // 0194 LDBOOL R32 1 0 + 0x7C740600, // 0195 CALL R29 3 + 0x60780015, // 0196 GETGBL R30 G21 + 0x7C780000, // 0197 CALL R30 0 + 0x8C7C3D53, // 0198 GETMET R31 R30 K83 + 0x58840003, // 0199 LDCONST R33 K3 + 0x58880033, // 019A LDCONST R34 K51 + 0x7C7C0600, // 019B CALL R31 3 + 0x8C7C3D53, // 019C GETMET R31 R30 K83 + 0x58840003, // 019D LDCONST R33 K3 + 0x548A0003, // 019E LDINT R34 4 + 0x7C7C0600, // 019F CALL R31 3 + 0x8C7C3D53, // 01A0 GETMET R31 R30 K83 + 0x58840003, // 01A1 LDCONST R33 K3 + 0x548A0003, // 01A2 LDINT R34 4 + 0x7C7C0600, // 01A3 CALL R31 3 + 0x8C7C3B41, // 01A4 GETMET R31 R29 K65 + 0x5C843C00, // 01A5 MOVE R33 R30 + 0x7C7C0400, // 01A6 CALL R31 2 + 0x88800154, // 01A7 GETMBR R32 R0 K84 + 0x8C804155, // 01A8 GETMET R32 R32 K85 + 0x5C883E00, // 01A9 MOVE R34 R31 + 0x888C0356, // 01AA GETMBR R35 R1 K86 + 0x88900357, // 01AB GETMBR R36 R1 K87 + 0x88943B58, // 01AC GETMBR R37 R29 K88 + 0x7C800A00, // 01AD CALL R32 5 + 0x8C800759, // 01AE GETMET R32 R3 K89 + 0x7C800200, // 01AF CALL R32 1 + 0x8C80075A, // 01B0 GETMET R32 R3 K90 + 0x5C883200, // 01B1 MOVE R34 R25 + 0x5C8C3400, // 01B2 MOVE R35 R26 + 0x5C903600, // 01B3 MOVE R36 R27 + 0x5C943800, // 01B4 MOVE R37 R28 + 0x7C800A00, // 01B5 CALL R32 5 + 0x8C80075B, // 01B6 GETMET R32 R3 K91 + 0x50880200, // 01B7 LDBOOL R34 1 0 + 0x7C800400, // 01B8 CALL R32 2 + 0x8C80075C, // 01B9 GETMET R32 R3 K92 0x7C800200, // 01BA CALL R32 1 - 0x50800200, // 01BB LDBOOL R32 1 0 - 0x80044000, // 01BC RET 1 R32 + 0x8C80075D, // 01BB GETMET R32 R3 K93 + 0x7C800200, // 01BC CALL R32 1 + 0x8C80075E, // 01BD GETMET R32 R3 K94 + 0x7C800200, // 01BE CALL R32 1 + 0x50800200, // 01BF LDBOOL R32 1 0 + 0x80044000, // 01C0 RET 1 R32 }) ) ); @@ -1344,723 +2077,11 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */ /******************************************************************** -** Solidified function: parse_Sigma1 +** Solidified function: parse_PBKDFParamRequest ********************************************************************/ -be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ +be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name */ be_nested_proto( - 35, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[119]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(opcode), - /* K2 */ be_nested_str_weak(local_session_id), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(protocol_id), - /* K5 */ be_nested_str_weak(protocol_error), - /* K6 */ be_nested_str_weak(invalid_X20Pake1_X20message), - /* K7 */ be_nested_str_weak(matter), - /* K8 */ be_nested_str_weak(Sigma1), - /* K9 */ be_nested_str_weak(parse), - /* K10 */ be_nested_str_weak(raw), - /* K11 */ be_nested_str_weak(app_payload_idx), - /* K12 */ be_nested_str_weak(initiatorEph_pub), - /* K13 */ be_nested_str_weak(initiatorEphPubKey), - /* K14 */ be_nested_str_weak(resumptionID), - /* K15 */ be_nested_str_weak(initiatorResumeMIC), - /* K16 */ be_nested_str_weak(device), - /* K17 */ be_nested_str_weak(sessions), - /* K18 */ be_nested_str_weak(find_session_by_resumption_id), - /* K19 */ be_nested_str_weak(find_session_by_destination_id), - /* K20 */ be_nested_str_weak(destinationId), - /* K21 */ be_nested_str_weak(initiatorRandom), - /* K22 */ be_nested_str_weak(valuer_error), - /* K23 */ be_nested_str_weak(StatusReport_X28GeneralCode_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20NO_SHARED_TRUST_ROOTS_X29), - /* K24 */ be_nested_str_weak(source_node_id), - /* K25 */ be_nested_str_weak(set_mode), - /* K26 */ be_nested_str_weak(Session), - /* K27 */ be_nested_str_weak(__CASE), - /* K28 */ be_nested_str_weak(session), - /* K29 */ be_nested_str_weak(remove_session), - /* K30 */ be_nested_str_weak(_future_initiator_session_id), - /* K31 */ be_nested_str_weak(initiator_session_id), - /* K32 */ be_nested_str_weak(_future_local_session_id), - /* K33 */ be_nested_str_weak(gen_local_session_id), - /* K34 */ be_nested_str_weak(future_local_session_id), - /* K35 */ be_nested_str_weak(tasmota), - /* K36 */ be_nested_str_weak(log), - /* K37 */ be_nested_str_weak(MTR_X3A_X20Loc_session_X3D), - /* K38 */ be_nested_str_weak(shared_secret), - /* K39 */ be_nested_str_weak(fromstring), - /* K40 */ be_nested_str_weak(Sigma1_Resume), - /* K41 */ be_nested_str_weak(HKDF_SHA256), - /* K42 */ be_nested_str_weak(derive), - /* K43 */ be_nested_str_weak(NCASE_SigmaR1), - /* K44 */ be_const_int(2147483647), - /* K45 */ be_nested_str_weak(AES_CCM), - /* K46 */ be_nested_str_weak(decrypt), - /* K47 */ be_nested_str_weak(tag), - /* K48 */ be_nested_str_weak(_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), - /* K49 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s1rk_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K50 */ be_nested_str_weak(tohex), - /* K51 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20tag_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K52 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20Resume1MICPayload_X20_X3D_X20), - /* K53 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20decrypted_tag_X20_X20_X20_X20_X20_X3D_X20), - /* K54 */ be_nested_str_weak(resumption_id), - /* K55 */ be_nested_str_weak(random), - /* K56 */ be_nested_str_weak(Sigma2_Resume), - /* K57 */ be_nested_str_weak(NCASE_SigmaR2), - /* K58 */ be_nested_str_weak(Sigma2Resume), - /* K59 */ be_nested_str_weak(responderSessionID), - /* K60 */ be_nested_str_weak(sigma2ResumeMIC), - /* K61 */ be_nested_str_weak(SessionResumptionKeys), - /* K62 */ be_nested_str_weak(rtc), - /* K63 */ be_nested_str_weak(utc), - /* K64 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), - /* K65 */ be_nested_str_weak(MTR_X3A_X20I2RKey_X20_X20_X20_X20_X20_X20_X3D), - /* K66 */ be_nested_str_weak(MTR_X3A_X20R2IKey_X20_X20_X20_X20_X20_X20_X3D), - /* K67 */ be_nested_str_weak(MTR_X3A_X20AC_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K68 */ be_nested_str_weak(encode), - /* K69 */ be_nested_str_weak(_Msg1), - /* K70 */ be_nested_str_weak(MTR_X3A_X20sigma2resume_raw_X3A_X20), - /* K71 */ be_nested_str_weak(build_response), - /* K72 */ be_nested_str_weak(responder), - /* K73 */ be_nested_str_weak(send_response), - /* K74 */ be_nested_str_weak(remote_ip), - /* K75 */ be_nested_str_weak(remote_port), - /* K76 */ be_nested_str_weak(message_counter), - /* K77 */ be_nested_str_weak(set_keys), - /* K78 */ be_nested_str_weak(set_persist), - /* K79 */ be_nested_str_weak(set_no_expiration), - /* K80 */ be_nested_str_weak(save), - /* K81 */ be_nested_str_weak(ResponderEph_priv), - /* K82 */ be_nested_str_weak(ResponderEph_pub), - /* K83 */ be_nested_str_weak(EC_P256), - /* K84 */ be_nested_str_weak(public_key), - /* K85 */ be_nested_str_weak(shared_key), - /* K86 */ be_nested_str_weak(TLV), - /* K87 */ be_nested_str_weak(Matter_TLV_struct), - /* K88 */ be_nested_str_weak(add_TLV), - /* K89 */ be_const_int(1), - /* K90 */ be_nested_str_weak(B2), - /* K91 */ be_nested_str_weak(get_noc), - /* K92 */ be_const_int(2), - /* K93 */ be_nested_str_weak(get_icac), - /* K94 */ be_const_int(3), - /* K95 */ be_nested_str_weak(ecdsa_sign_sha256), - /* K96 */ be_nested_str_weak(get_pk), - /* K97 */ be_nested_str_weak(Msg1), - /* K98 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20MSG1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K99 */ be_nested_str_weak(SHA256), - /* K100 */ be_nested_str_weak(update), - /* K101 */ be_nested_str_weak(out), - /* K102 */ be_nested_str_weak(S2K_Info), - /* K103 */ be_nested_str_weak(get_ipk_group_key), - /* K104 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20SharedSecret_X20_X20_X3D_X20), - /* K105 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_salt_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K106 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K107 */ be_nested_str_weak(TBEData2_Nonce), - /* K108 */ be_nested_str_weak(encrypt), - /* K109 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Enc_X20_X20_X20_X3D_X20), - /* K110 */ be_nested_str_weak(Sigma2), - /* K111 */ be_nested_str_weak(responderRandom), - /* K112 */ be_nested_str_weak(responderSessionId), - /* K113 */ be_nested_str_weak(responderEphPubKey), - /* K114 */ be_nested_str_weak(encrypted2), - /* K115 */ be_nested_str_weak(MTR_X3A_X20sigma2_X3A_X20), - /* K116 */ be_nested_str_weak(inspect), - /* K117 */ be_nested_str_weak(_Msg2), - /* K118 */ be_nested_str_weak(MTR_X3A_X20sigma2_raw_X3A_X20), - }), - be_str_weak(parse_Sigma1), - &be_const_str_solidified, - ( &(const binstruction[569]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x880C0301, // 0001 GETMBR R3 R1 K1 - 0x5412002F, // 0002 LDINT R4 48 - 0x200C0604, // 0003 NE R3 R3 R4 - 0x740E0005, // 0004 JMPT R3 #000B - 0x880C0302, // 0005 GETMBR R3 R1 K2 - 0x200C0703, // 0006 NE R3 R3 K3 - 0x740E0002, // 0007 JMPT R3 #000B - 0x880C0304, // 0008 GETMBR R3 R1 K4 - 0x200C0703, // 0009 NE R3 R3 K3 - 0x780E0000, // 000A JMPF R3 #000C - 0xB0060B06, // 000B RAISE 1 K5 K6 - 0xB80E0E00, // 000C GETNGBL R3 K7 - 0x8C0C0708, // 000D GETMET R3 R3 K8 - 0x7C0C0200, // 000E CALL R3 1 - 0x8C0C0709, // 000F GETMET R3 R3 K9 - 0x8814030A, // 0010 GETMBR R5 R1 K10 - 0x8818030B, // 0011 GETMBR R6 R1 K11 - 0x7C0C0600, // 0012 CALL R3 3 - 0x8810070D, // 0013 GETMBR R4 R3 K13 - 0x90021804, // 0014 SETMBR R0 K12 R4 - 0x8810070E, // 0015 GETMBR R4 R3 K14 - 0x4C140000, // 0016 LDNIL R5 - 0x20100805, // 0017 NE R4 R4 R5 - 0x78120003, // 0018 JMPF R4 #001D - 0x8810070F, // 0019 GETMBR R4 R3 K15 - 0x4C140000, // 001A LDNIL R5 - 0x20100805, // 001B NE R4 R4 R5 - 0x74120000, // 001C JMPT R4 #001E - 0x50100001, // 001D LDBOOL R4 0 1 - 0x50100200, // 001E LDBOOL R4 1 0 - 0x4C140000, // 001F LDNIL R5 - 0x78120006, // 0020 JMPF R4 #0028 - 0x88180110, // 0021 GETMBR R6 R0 K16 - 0x88180D11, // 0022 GETMBR R6 R6 K17 - 0x8C180D12, // 0023 GETMET R6 R6 K18 - 0x8820070E, // 0024 GETMBR R8 R3 K14 - 0x7C180400, // 0025 CALL R6 2 - 0x5C140C00, // 0026 MOVE R5 R6 - 0x70020004, // 0027 JMP #002D - 0x8C180113, // 0028 GETMET R6 R0 K19 - 0x88200714, // 0029 GETMBR R8 R3 K20 - 0x88240715, // 002A GETMBR R9 R3 K21 - 0x7C180600, // 002B CALL R6 3 - 0x5C140C00, // 002C MOVE R5 R6 - 0x4C180000, // 002D LDNIL R6 - 0x1C180A06, // 002E EQ R6 R5 R6 - 0x781A0000, // 002F JMPF R6 #0031 - 0xB0062D17, // 0030 RAISE 1 K22 K23 - 0x88180318, // 0031 GETMBR R6 R1 K24 - 0x90163006, // 0032 SETMBR R5 K24 R6 - 0x8C180B19, // 0033 GETMET R6 R5 K25 - 0xB8220E00, // 0034 GETNGBL R8 K7 - 0x8820111A, // 0035 GETMBR R8 R8 K26 - 0x8820111B, // 0036 GETMBR R8 R8 K27 - 0x7C180400, // 0037 CALL R6 2 - 0x8818031C, // 0038 GETMBR R6 R1 K28 - 0x781A0004, // 0039 JMPF R6 #003F - 0x88180110, // 003A GETMBR R6 R0 K16 - 0x88180D11, // 003B GETMBR R6 R6 K17 - 0x8C180D1D, // 003C GETMET R6 R6 K29 - 0x8820031C, // 003D GETMBR R8 R1 K28 - 0x7C180400, // 003E CALL R6 2 - 0x90063805, // 003F SETMBR R1 K28 R5 - 0x8818071F, // 0040 GETMBR R6 R3 K31 - 0x90163C06, // 0041 SETMBR R5 K30 R6 - 0x88180110, // 0042 GETMBR R6 R0 K16 - 0x88180D11, // 0043 GETMBR R6 R6 K17 - 0x8C180D21, // 0044 GETMET R6 R6 K33 - 0x7C180200, // 0045 CALL R6 1 - 0x90164006, // 0046 SETMBR R5 K32 R6 - 0x88180B20, // 0047 GETMBR R6 R5 K32 - 0x90024406, // 0048 SETMBR R0 K34 R6 - 0xB81A4600, // 0049 GETNGBL R6 K35 - 0x8C180D24, // 004A GETMET R6 R6 K36 - 0x60200008, // 004B GETGBL R8 G8 - 0x88240122, // 004C GETMBR R9 R0 K34 - 0x7C200200, // 004D CALL R8 1 - 0x00224A08, // 004E ADD R8 K37 R8 - 0x7C180400, // 004F CALL R6 2 - 0x781200EC, // 0050 JMPF R4 #013E - 0x88180B26, // 0051 GETMBR R6 R5 K38 - 0x4C1C0000, // 0052 LDNIL R7 - 0x20180C07, // 0053 NE R6 R6 R7 - 0x781A00E8, // 0054 JMPF R6 #013E - 0x88180715, // 0055 GETMBR R6 R3 K21 - 0x881C070E, // 0056 GETMBR R7 R3 K14 - 0x00180C07, // 0057 ADD R6 R6 R7 - 0x601C0015, // 0058 GETGBL R7 G21 - 0x7C1C0000, // 0059 CALL R7 0 - 0x8C1C0F27, // 005A GETMET R7 R7 K39 - 0x58240028, // 005B LDCONST R9 K40 - 0x7C1C0400, // 005C CALL R7 2 - 0x8C200529, // 005D GETMET R8 R2 K41 - 0x7C200200, // 005E CALL R8 1 - 0x8C20112A, // 005F GETMET R8 R8 K42 - 0x88280B26, // 0060 GETMBR R10 R5 K38 - 0x5C2C0C00, // 0061 MOVE R11 R6 - 0x5C300E00, // 0062 MOVE R12 R7 - 0x5436000F, // 0063 LDINT R13 16 - 0x7C200A00, // 0064 CALL R8 5 - 0x60240015, // 0065 GETGBL R9 G21 - 0x7C240000, // 0066 CALL R9 0 - 0x8C241327, // 0067 GETMET R9 R9 K39 - 0x582C002B, // 0068 LDCONST R11 K43 - 0x7C240400, // 0069 CALL R9 2 - 0x5429FFEE, // 006A LDINT R10 -17 - 0x402A060A, // 006B CONNECT R10 K3 R10 - 0x882C070F, // 006C GETMBR R11 R3 K15 - 0x9428160A, // 006D GETIDX R10 R11 R10 - 0x5431FFEF, // 006E LDINT R12 -16 - 0x4030192C, // 006F CONNECT R12 R12 K44 - 0x8834070F, // 0070 GETMBR R13 R3 K15 - 0x942C1A0C, // 0071 GETIDX R11 R13 R12 - 0x8C38052D, // 0072 GETMET R14 R2 K45 - 0x5C401000, // 0073 MOVE R16 R8 - 0x5C441200, // 0074 MOVE R17 R9 - 0x60480015, // 0075 GETGBL R18 G21 - 0x7C480000, // 0076 CALL R18 0 - 0x604C000C, // 0077 GETGBL R19 G12 - 0x5C501400, // 0078 MOVE R20 R10 - 0x7C4C0200, // 0079 CALL R19 1 - 0x5452000F, // 007A LDINT R20 16 - 0x7C380C00, // 007B CALL R14 6 - 0x5C301C00, // 007C MOVE R12 R14 - 0x8C38192E, // 007D GETMET R14 R12 K46 - 0x5C401400, // 007E MOVE R16 R10 - 0x7C380400, // 007F CALL R14 2 - 0x5C341C00, // 0080 MOVE R13 R14 - 0x8C38192F, // 0081 GETMET R14 R12 K47 - 0x7C380200, // 0082 CALL R14 1 - 0xB83E4600, // 0083 GETNGBL R15 K35 - 0x8C3C1F24, // 0084 GETMET R15 R15 K36 - 0x58440030, // 0085 LDCONST R17 K48 - 0x544A0003, // 0086 LDINT R18 4 - 0x7C3C0600, // 0087 CALL R15 3 - 0xB83E4600, // 0088 GETNGBL R15 K35 - 0x8C3C1F24, // 0089 GETMET R15 R15 K36 - 0x8C441132, // 008A GETMET R17 R8 K50 - 0x7C440200, // 008B CALL R17 1 - 0x00466211, // 008C ADD R17 K49 R17 - 0x544A0003, // 008D LDINT R18 4 - 0x7C3C0600, // 008E CALL R15 3 - 0xB83E4600, // 008F GETNGBL R15 K35 - 0x8C3C1F24, // 0090 GETMET R15 R15 K36 - 0x8C441732, // 0091 GETMET R17 R11 K50 - 0x7C440200, // 0092 CALL R17 1 - 0x00466611, // 0093 ADD R17 K51 R17 - 0x544A0003, // 0094 LDINT R18 4 - 0x7C3C0600, // 0095 CALL R15 3 - 0xB83E4600, // 0096 GETNGBL R15 K35 - 0x8C3C1F24, // 0097 GETMET R15 R15 K36 - 0x8C441B32, // 0098 GETMET R17 R13 K50 - 0x7C440200, // 0099 CALL R17 1 - 0x00466811, // 009A ADD R17 K52 R17 - 0x544A0003, // 009B LDINT R18 4 - 0x7C3C0600, // 009C CALL R15 3 - 0xB83E4600, // 009D GETNGBL R15 K35 - 0x8C3C1F24, // 009E GETMET R15 R15 K36 - 0x8C441D32, // 009F GETMET R17 R14 K50 - 0x7C440200, // 00A0 CALL R17 1 - 0x00466A11, // 00A1 ADD R17 K53 R17 - 0x544A0003, // 00A2 LDINT R18 4 - 0x7C3C0600, // 00A3 CALL R15 3 - 0xB83E4600, // 00A4 GETNGBL R15 K35 - 0x8C3C1F24, // 00A5 GETMET R15 R15 K36 - 0x58440030, // 00A6 LDCONST R17 K48 - 0x544A0003, // 00A7 LDINT R18 4 - 0x7C3C0600, // 00A8 CALL R15 3 - 0x1C3C160E, // 00A9 EQ R15 R11 R14 - 0x783E0090, // 00AA JMPF R15 #013C - 0x8C3C0537, // 00AB GETMET R15 R2 K55 - 0x5446000F, // 00AC LDINT R17 16 - 0x7C3C0400, // 00AD CALL R15 2 - 0x90166C0F, // 00AE SETMBR R5 K54 R15 - 0x603C0015, // 00AF GETGBL R15 G21 - 0x7C3C0000, // 00B0 CALL R15 0 - 0x8C3C1F27, // 00B1 GETMET R15 R15 K39 - 0x58440038, // 00B2 LDCONST R17 K56 - 0x7C3C0400, // 00B3 CALL R15 2 - 0x88400B36, // 00B4 GETMBR R16 R5 K54 - 0x003C1E10, // 00B5 ADD R15 R15 R16 - 0x88400715, // 00B6 GETMBR R16 R3 K21 - 0x8844070E, // 00B7 GETMBR R17 R3 K14 - 0x00402011, // 00B8 ADD R16 R16 R17 - 0x8C440529, // 00B9 GETMET R17 R2 K41 - 0x7C440200, // 00BA CALL R17 1 - 0x8C44232A, // 00BB GETMET R17 R17 K42 - 0x884C0B26, // 00BC GETMBR R19 R5 K38 - 0x5C502000, // 00BD MOVE R20 R16 - 0x5C541E00, // 00BE MOVE R21 R15 - 0x545A000F, // 00BF LDINT R22 16 - 0x7C440A00, // 00C0 CALL R17 5 - 0x8C48052D, // 00C1 GETMET R18 R2 K45 - 0x5C502200, // 00C2 MOVE R20 R17 - 0x60540015, // 00C3 GETGBL R21 G21 - 0x7C540000, // 00C4 CALL R21 0 - 0x8C542B27, // 00C5 GETMET R21 R21 K39 - 0x585C0039, // 00C6 LDCONST R23 K57 - 0x7C540400, // 00C7 CALL R21 2 - 0x60580015, // 00C8 GETGBL R22 G21 - 0x7C580000, // 00C9 CALL R22 0 - 0x585C0003, // 00CA LDCONST R23 K3 - 0x5462000F, // 00CB LDINT R24 16 - 0x7C480C00, // 00CC CALL R18 6 - 0x8C4C252F, // 00CD GETMET R19 R18 K47 - 0x7C4C0200, // 00CE CALL R19 1 - 0xB8520E00, // 00CF GETNGBL R20 K7 - 0x8C50293A, // 00D0 GETMET R20 R20 K58 - 0x7C500200, // 00D1 CALL R20 1 - 0x88540B36, // 00D2 GETMBR R21 R5 K54 - 0x90521C15, // 00D3 SETMBR R20 K14 R21 - 0x88540B20, // 00D4 GETMBR R21 R5 K32 - 0x90527615, // 00D5 SETMBR R20 K59 R21 - 0x90527813, // 00D6 SETMBR R20 K60 R19 - 0x8C540529, // 00D7 GETMET R21 R2 K41 - 0x7C540200, // 00D8 CALL R21 1 - 0x8C542B2A, // 00D9 GETMET R21 R21 K42 - 0x885C0B26, // 00DA GETMBR R23 R5 K38 - 0x88600715, // 00DB GETMBR R24 R3 K21 - 0x8864070E, // 00DC GETMBR R25 R3 K14 - 0x00603019, // 00DD ADD R24 R24 R25 - 0x60640015, // 00DE GETGBL R25 G21 - 0x7C640000, // 00DF CALL R25 0 - 0x8C643327, // 00E0 GETMET R25 R25 K39 - 0x586C003D, // 00E1 LDCONST R27 K61 - 0x7C640400, // 00E2 CALL R25 2 - 0x546A002F, // 00E3 LDINT R26 48 - 0x7C540A00, // 00E4 CALL R21 5 - 0x545A000E, // 00E5 LDINT R22 15 - 0x405A0616, // 00E6 CONNECT R22 K3 R22 - 0x94582A16, // 00E7 GETIDX R22 R21 R22 - 0x545E000F, // 00E8 LDINT R23 16 - 0x5462001E, // 00E9 LDINT R24 31 - 0x405C2E18, // 00EA CONNECT R23 R23 R24 - 0x945C2A17, // 00EB GETIDX R23 R21 R23 - 0x5462001F, // 00EC LDINT R24 32 - 0x5466002E, // 00ED LDINT R25 47 - 0x40603019, // 00EE CONNECT R24 R24 R25 - 0x94602A18, // 00EF GETIDX R24 R21 R24 - 0xB8664600, // 00F0 GETNGBL R25 K35 - 0x8C64333E, // 00F1 GETMET R25 R25 K62 - 0x7C640200, // 00F2 CALL R25 1 - 0x9464333F, // 00F3 GETIDX R25 R25 K63 - 0xB86A4600, // 00F4 GETNGBL R26 K35 - 0x8C683524, // 00F5 GETMET R26 R26 K36 - 0x58700040, // 00F6 LDCONST R28 K64 - 0x54760003, // 00F7 LDINT R29 4 - 0x7C680600, // 00F8 CALL R26 3 - 0xB86A4600, // 00F9 GETNGBL R26 K35 - 0x8C683524, // 00FA GETMET R26 R26 K36 - 0x8C702D32, // 00FB GETMET R28 R22 K50 - 0x7C700200, // 00FC CALL R28 1 - 0x0072821C, // 00FD ADD R28 K65 R28 - 0x54760003, // 00FE LDINT R29 4 - 0x7C680600, // 00FF CALL R26 3 - 0xB86A4600, // 0100 GETNGBL R26 K35 - 0x8C683524, // 0101 GETMET R26 R26 K36 - 0x8C702F32, // 0102 GETMET R28 R23 K50 - 0x7C700200, // 0103 CALL R28 1 - 0x0072841C, // 0104 ADD R28 K66 R28 - 0x54760003, // 0105 LDINT R29 4 - 0x7C680600, // 0106 CALL R26 3 - 0xB86A4600, // 0107 GETNGBL R26 K35 - 0x8C683524, // 0108 GETMET R26 R26 K36 - 0x8C703132, // 0109 GETMET R28 R24 K50 - 0x7C700200, // 010A CALL R28 1 - 0x0072861C, // 010B ADD R28 K67 R28 - 0x54760003, // 010C LDINT R29 4 - 0x7C680600, // 010D CALL R26 3 - 0xB86A4600, // 010E GETNGBL R26 K35 - 0x8C683524, // 010F GETMET R26 R26 K36 - 0x58700040, // 0110 LDCONST R28 K64 - 0x54760003, // 0111 LDINT R29 4 - 0x7C680600, // 0112 CALL R26 3 - 0x8C682944, // 0113 GETMET R26 R20 K68 - 0x7C680200, // 0114 CALL R26 1 - 0x4C6C0000, // 0115 LDNIL R27 - 0x90168A1B, // 0116 SETMBR R5 K69 R27 - 0xB86E4600, // 0117 GETNGBL R27 K35 - 0x8C6C3724, // 0118 GETMET R27 R27 K36 - 0x8C743532, // 0119 GETMET R29 R26 K50 - 0x7C740200, // 011A CALL R29 1 - 0x00768C1D, // 011B ADD R29 K70 R29 - 0x547A0003, // 011C LDINT R30 4 - 0x7C6C0600, // 011D CALL R27 3 - 0x8C6C0347, // 011E GETMET R27 R1 K71 - 0x54760032, // 011F LDINT R29 51 - 0x50780200, // 0120 LDBOOL R30 1 0 - 0x7C6C0600, // 0121 CALL R27 3 - 0x8C703744, // 0122 GETMET R28 R27 K68 - 0x5C783400, // 0123 MOVE R30 R26 - 0x7C700400, // 0124 CALL R28 2 - 0x88740148, // 0125 GETMBR R29 R0 K72 - 0x8C743B49, // 0126 GETMET R29 R29 K73 - 0x5C7C3800, // 0127 MOVE R31 R28 - 0x8880034A, // 0128 GETMBR R32 R1 K74 - 0x8884034B, // 0129 GETMBR R33 R1 K75 - 0x8888374C, // 012A GETMBR R34 R27 K76 - 0x7C740A00, // 012B CALL R29 5 - 0x8C740B4D, // 012C GETMET R29 R5 K77 - 0x5C7C2C00, // 012D MOVE R31 R22 - 0x5C802E00, // 012E MOVE R32 R23 - 0x5C843000, // 012F MOVE R33 R24 - 0x5C883200, // 0130 MOVE R34 R25 - 0x7C740A00, // 0131 CALL R29 5 - 0x8C740B4E, // 0132 GETMET R29 R5 K78 - 0x507C0200, // 0133 LDBOOL R31 1 0 - 0x7C740400, // 0134 CALL R29 2 - 0x8C740B4F, // 0135 GETMET R29 R5 K79 - 0x7C740200, // 0136 CALL R29 1 - 0x8C740B50, // 0137 GETMET R29 R5 K80 - 0x7C740200, // 0138 CALL R29 1 - 0x50740200, // 0139 LDBOOL R29 1 0 - 0x80043A00, // 013A RET 1 R29 - 0x70020001, // 013B JMP #013E - 0x4C3C0000, // 013C LDNIL R15 - 0x900E1C0F, // 013D SETMBR R3 K14 R15 - 0x8818070E, // 013E GETMBR R6 R3 K14 - 0x4C1C0000, // 013F LDNIL R7 - 0x1C180C07, // 0140 EQ R6 R6 R7 - 0x741A0003, // 0141 JMPT R6 #0146 - 0x8818070F, // 0142 GETMBR R6 R3 K15 - 0x4C1C0000, // 0143 LDNIL R7 - 0x1C180C07, // 0144 EQ R6 R6 R7 - 0x781A00F0, // 0145 JMPF R6 #0237 - 0x8C180537, // 0146 GETMET R6 R2 K55 - 0x5422000F, // 0147 LDINT R8 16 - 0x7C180400, // 0148 CALL R6 2 - 0x90166C06, // 0149 SETMBR R5 K54 R6 - 0x8C180537, // 014A GETMET R6 R2 K55 - 0x5422001F, // 014B LDINT R8 32 - 0x7C180400, // 014C CALL R6 2 - 0x9002A206, // 014D SETMBR R0 K81 R6 - 0x8C180553, // 014E GETMET R6 R2 K83 - 0x7C180200, // 014F CALL R6 1 - 0x8C180D54, // 0150 GETMET R6 R6 K84 - 0x88200151, // 0151 GETMBR R8 R0 K81 - 0x7C180400, // 0152 CALL R6 2 - 0x9002A406, // 0153 SETMBR R0 K82 R6 - 0x8C180537, // 0154 GETMET R6 R2 K55 - 0x5422001F, // 0155 LDINT R8 32 - 0x7C180400, // 0156 CALL R6 2 - 0x8C1C0553, // 0157 GETMET R7 R2 K83 - 0x7C1C0200, // 0158 CALL R7 1 - 0x8C1C0F55, // 0159 GETMET R7 R7 K85 - 0x88240151, // 015A GETMBR R9 R0 K81 - 0x8828070D, // 015B GETMBR R10 R3 K13 - 0x7C1C0600, // 015C CALL R7 3 - 0x90164C07, // 015D SETMBR R5 K38 R7 - 0xB81E0E00, // 015E GETNGBL R7 K7 - 0x881C0F56, // 015F GETMBR R7 R7 K86 - 0x8C1C0F57, // 0160 GETMET R7 R7 K87 - 0x7C1C0200, // 0161 CALL R7 1 - 0x8C200F58, // 0162 GETMET R8 R7 K88 - 0x58280059, // 0163 LDCONST R10 K89 - 0xB82E0E00, // 0164 GETNGBL R11 K7 - 0x882C1756, // 0165 GETMBR R11 R11 K86 - 0x882C175A, // 0166 GETMBR R11 R11 K90 - 0x8C300B5B, // 0167 GETMET R12 R5 K91 - 0x7C300200, // 0168 CALL R12 1 - 0x7C200800, // 0169 CALL R8 4 - 0x8C200F58, // 016A GETMET R8 R7 K88 - 0x5828005C, // 016B LDCONST R10 K92 - 0xB82E0E00, // 016C GETNGBL R11 K7 - 0x882C1756, // 016D GETMBR R11 R11 K86 - 0x882C175A, // 016E GETMBR R11 R11 K90 - 0x8C300B5D, // 016F GETMET R12 R5 K93 - 0x7C300200, // 0170 CALL R12 1 - 0x7C200800, // 0171 CALL R8 4 - 0x8C200F58, // 0172 GETMET R8 R7 K88 - 0x5828005E, // 0173 LDCONST R10 K94 - 0xB82E0E00, // 0174 GETNGBL R11 K7 - 0x882C1756, // 0175 GETMBR R11 R11 K86 - 0x882C175A, // 0176 GETMBR R11 R11 K90 - 0x88300152, // 0177 GETMBR R12 R0 K82 - 0x7C200800, // 0178 CALL R8 4 - 0x8C200F58, // 0179 GETMET R8 R7 K88 - 0x542A0003, // 017A LDINT R10 4 - 0xB82E0E00, // 017B GETNGBL R11 K7 - 0x882C1756, // 017C GETMBR R11 R11 K86 - 0x882C175A, // 017D GETMBR R11 R11 K90 - 0x8830070D, // 017E GETMBR R12 R3 K13 - 0x7C200800, // 017F CALL R8 4 - 0x8C200553, // 0180 GETMET R8 R2 K83 - 0x7C200200, // 0181 CALL R8 1 - 0x8C20115F, // 0182 GETMET R8 R8 K95 - 0x8C280B60, // 0183 GETMET R10 R5 K96 - 0x7C280200, // 0184 CALL R10 1 - 0x8C2C0F44, // 0185 GETMET R11 R7 K68 - 0x7C2C0200, // 0186 CALL R11 1 - 0x7C200600, // 0187 CALL R8 3 - 0xB8260E00, // 0188 GETNGBL R9 K7 - 0x88241356, // 0189 GETMBR R9 R9 K86 - 0x8C241357, // 018A GETMET R9 R9 K87 - 0x7C240200, // 018B CALL R9 1 - 0x8C281358, // 018C GETMET R10 R9 K88 - 0x58300059, // 018D LDCONST R12 K89 - 0xB8360E00, // 018E GETNGBL R13 K7 - 0x88341B56, // 018F GETMBR R13 R13 K86 - 0x88341B5A, // 0190 GETMBR R13 R13 K90 - 0x8C380B5B, // 0191 GETMET R14 R5 K91 - 0x7C380200, // 0192 CALL R14 1 - 0x7C280800, // 0193 CALL R10 4 - 0x8C281358, // 0194 GETMET R10 R9 K88 - 0x5830005C, // 0195 LDCONST R12 K92 - 0xB8360E00, // 0196 GETNGBL R13 K7 - 0x88341B56, // 0197 GETMBR R13 R13 K86 - 0x88341B5A, // 0198 GETMBR R13 R13 K90 - 0x8C380B5D, // 0199 GETMET R14 R5 K93 - 0x7C380200, // 019A CALL R14 1 - 0x7C280800, // 019B CALL R10 4 - 0x8C281358, // 019C GETMET R10 R9 K88 - 0x5830005E, // 019D LDCONST R12 K94 - 0xB8360E00, // 019E GETNGBL R13 K7 - 0x88341B56, // 019F GETMBR R13 R13 K86 - 0x88341B5A, // 01A0 GETMBR R13 R13 K90 - 0x5C381000, // 01A1 MOVE R14 R8 - 0x7C280800, // 01A2 CALL R10 4 - 0x8C281358, // 01A3 GETMET R10 R9 K88 - 0x54320003, // 01A4 LDINT R12 4 - 0xB8360E00, // 01A5 GETNGBL R13 K7 - 0x88341B56, // 01A6 GETMBR R13 R13 K86 - 0x88341B5A, // 01A7 GETMBR R13 R13 K90 - 0x88380B36, // 01A8 GETMBR R14 R5 K54 - 0x7C280800, // 01A9 CALL R10 4 - 0xB82A4600, // 01AA GETNGBL R10 K35 - 0x8C281524, // 01AB GETMET R10 R10 K36 - 0x58300030, // 01AC LDCONST R12 K48 - 0x54360003, // 01AD LDINT R13 4 - 0x7C280600, // 01AE CALL R10 3 - 0x88280761, // 01AF GETMBR R10 R3 K97 - 0x90168A0A, // 01B0 SETMBR R5 K69 R10 - 0xB82A4600, // 01B1 GETNGBL R10 K35 - 0x8C281524, // 01B2 GETMET R10 R10 K36 - 0x88300B45, // 01B3 GETMBR R12 R5 K69 - 0x8C301932, // 01B4 GETMET R12 R12 K50 - 0x7C300200, // 01B5 CALL R12 1 - 0x0032C40C, // 01B6 ADD R12 K98 R12 - 0x54360003, // 01B7 LDINT R13 4 - 0x7C280600, // 01B8 CALL R10 3 - 0x8C280563, // 01B9 GETMET R10 R2 K99 - 0x7C280200, // 01BA CALL R10 1 - 0x8C281564, // 01BB GETMET R10 R10 K100 - 0x88300B45, // 01BC GETMBR R12 R5 K69 - 0x7C280400, // 01BD CALL R10 2 - 0x8C281565, // 01BE GETMET R10 R10 K101 - 0x7C280200, // 01BF CALL R10 1 - 0x602C0015, // 01C0 GETGBL R11 G21 - 0x7C2C0000, // 01C1 CALL R11 0 - 0x8C2C1727, // 01C2 GETMET R11 R11 K39 - 0x88340166, // 01C3 GETMBR R13 R0 K102 - 0x7C2C0400, // 01C4 CALL R11 2 - 0x8C300B67, // 01C5 GETMET R12 R5 K103 - 0x7C300200, // 01C6 CALL R12 1 - 0x00301806, // 01C7 ADD R12 R12 R6 - 0x88340152, // 01C8 GETMBR R13 R0 K82 - 0x0030180D, // 01C9 ADD R12 R12 R13 - 0x0030180A, // 01CA ADD R12 R12 R10 - 0x8C340529, // 01CB GETMET R13 R2 K41 - 0x7C340200, // 01CC CALL R13 1 - 0x8C341B2A, // 01CD GETMET R13 R13 K42 - 0x883C0B26, // 01CE GETMBR R15 R5 K38 - 0x5C401800, // 01CF MOVE R16 R12 - 0x5C441600, // 01D0 MOVE R17 R11 - 0x544A000F, // 01D1 LDINT R18 16 - 0x7C340A00, // 01D2 CALL R13 5 - 0xB83A4600, // 01D3 GETNGBL R14 K35 - 0x8C381D24, // 01D4 GETMET R14 R14 K36 - 0x88400B26, // 01D5 GETMBR R16 R5 K38 - 0x8C402132, // 01D6 GETMET R16 R16 K50 - 0x7C400200, // 01D7 CALL R16 1 - 0x0042D010, // 01D8 ADD R16 K104 R16 - 0x54460003, // 01D9 LDINT R17 4 - 0x7C380600, // 01DA CALL R14 3 - 0xB83A4600, // 01DB GETNGBL R14 K35 - 0x8C381D24, // 01DC GETMET R14 R14 K36 - 0x8C401932, // 01DD GETMET R16 R12 K50 - 0x7C400200, // 01DE CALL R16 1 - 0x0042D210, // 01DF ADD R16 K105 R16 - 0x54460003, // 01E0 LDINT R17 4 - 0x7C380600, // 01E1 CALL R14 3 - 0xB83A4600, // 01E2 GETNGBL R14 K35 - 0x8C381D24, // 01E3 GETMET R14 R14 K36 - 0x8C401B32, // 01E4 GETMET R16 R13 K50 - 0x7C400200, // 01E5 CALL R16 1 - 0x0042D410, // 01E6 ADD R16 K106 R16 - 0x54460003, // 01E7 LDINT R17 4 - 0x7C380600, // 01E8 CALL R14 3 - 0x8C381344, // 01E9 GETMET R14 R9 K68 - 0x7C380200, // 01EA CALL R14 1 - 0x8C3C052D, // 01EB GETMET R15 R2 K45 - 0x5C441A00, // 01EC MOVE R17 R13 - 0x60480015, // 01ED GETGBL R18 G21 - 0x7C480000, // 01EE CALL R18 0 - 0x8C482527, // 01EF GETMET R18 R18 K39 - 0x8850016B, // 01F0 GETMBR R20 R0 K107 - 0x7C480400, // 01F1 CALL R18 2 - 0x604C0015, // 01F2 GETGBL R19 G21 - 0x7C4C0000, // 01F3 CALL R19 0 - 0x6050000C, // 01F4 GETGBL R20 G12 - 0x5C541C00, // 01F5 MOVE R21 R14 - 0x7C500200, // 01F6 CALL R20 1 - 0x5456000F, // 01F7 LDINT R21 16 - 0x7C3C0C00, // 01F8 CALL R15 6 - 0x8C401F6C, // 01F9 GETMET R16 R15 K108 - 0x5C481C00, // 01FA MOVE R18 R14 - 0x7C400400, // 01FB CALL R16 2 - 0x8C441F2F, // 01FC GETMET R17 R15 K47 - 0x7C440200, // 01FD CALL R17 1 - 0x00402011, // 01FE ADD R16 R16 R17 - 0xB8464600, // 01FF GETNGBL R17 K35 - 0x8C442324, // 0200 GETMET R17 R17 K36 - 0x8C4C2132, // 0201 GETMET R19 R16 K50 - 0x7C4C0200, // 0202 CALL R19 1 - 0x004EDA13, // 0203 ADD R19 K109 R19 - 0x54520003, // 0204 LDINT R20 4 - 0x7C440600, // 0205 CALL R17 3 - 0xB8464600, // 0206 GETNGBL R17 K35 - 0x8C442324, // 0207 GETMET R17 R17 K36 - 0x584C0030, // 0208 LDCONST R19 K48 - 0x54520003, // 0209 LDINT R20 4 - 0x7C440600, // 020A CALL R17 3 - 0xB8460E00, // 020B GETNGBL R17 K7 - 0x8C44236E, // 020C GETMET R17 R17 K110 - 0x7C440200, // 020D CALL R17 1 - 0x9046DE06, // 020E SETMBR R17 K111 R6 - 0x88480122, // 020F GETMBR R18 R0 K34 - 0x9046E012, // 0210 SETMBR R17 K112 R18 - 0x88480152, // 0211 GETMBR R18 R0 K82 - 0x9046E212, // 0212 SETMBR R17 K113 R18 - 0x9046E410, // 0213 SETMBR R17 K114 R16 - 0xB84A4600, // 0214 GETNGBL R18 K35 - 0x8C482524, // 0215 GETMET R18 R18 K36 - 0xB8520E00, // 0216 GETNGBL R20 K7 - 0x8C502974, // 0217 GETMET R20 R20 K116 - 0x5C582200, // 0218 MOVE R22 R17 - 0x7C500400, // 0219 CALL R20 2 - 0x0052E614, // 021A ADD R20 K115 R20 - 0x54560003, // 021B LDINT R21 4 - 0x7C480600, // 021C CALL R18 3 - 0x8C482344, // 021D GETMET R18 R17 K68 - 0x7C480200, // 021E CALL R18 1 - 0x9016EA12, // 021F SETMBR R5 K117 R18 - 0xB84E4600, // 0220 GETNGBL R19 K35 - 0x8C4C2724, // 0221 GETMET R19 R19 K36 - 0x8C542532, // 0222 GETMET R21 R18 K50 - 0x7C540200, // 0223 CALL R21 1 - 0x0056EC15, // 0224 ADD R21 K118 R21 - 0x545A0003, // 0225 LDINT R22 4 - 0x7C4C0600, // 0226 CALL R19 3 - 0x8C4C0347, // 0227 GETMET R19 R1 K71 - 0x54560030, // 0228 LDINT R21 49 - 0x50580200, // 0229 LDBOOL R22 1 0 - 0x7C4C0600, // 022A CALL R19 3 - 0x8C502744, // 022B GETMET R20 R19 K68 - 0x5C582400, // 022C MOVE R22 R18 - 0x7C500400, // 022D CALL R20 2 - 0x88540148, // 022E GETMBR R21 R0 K72 - 0x8C542B49, // 022F GETMET R21 R21 K73 - 0x5C5C2800, // 0230 MOVE R23 R20 - 0x8860034A, // 0231 GETMBR R24 R1 K74 - 0x8864034B, // 0232 GETMBR R25 R1 K75 - 0x8868274C, // 0233 GETMBR R26 R19 K76 - 0x7C540A00, // 0234 CALL R21 5 - 0x50540200, // 0235 LDBOOL R21 1 0 - 0x80042A00, // 0236 RET 1 R21 - 0x50180200, // 0237 LDBOOL R6 1 0 - 0x80040C00, // 0238 RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_Pake3 -********************************************************************/ -be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ - be_nested_proto( - 16, /* nstack */ + 14, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2075,53 +2096,53 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ /* K3 */ be_const_int(0), /* K4 */ be_nested_str_weak(protocol_id), /* K5 */ be_nested_str_weak(protocol_error), - /* K6 */ be_nested_str_weak(invalid_X20Pake3_X20message), + /* K6 */ be_nested_str_weak(invalid_X20PBKDFParamRequest_X20message), /* K7 */ be_nested_str_weak(matter), - /* K8 */ be_nested_str_weak(Pake3), + /* K8 */ be_nested_str_weak(PBKDFParamRequest), /* K9 */ be_nested_str_weak(parse), /* K10 */ be_nested_str_weak(raw), /* K11 */ be_nested_str_weak(app_payload_idx), - /* K12 */ be_nested_str_weak(cA), - /* K13 */ be_nested_str_weak(tasmota), - /* K14 */ be_nested_str_weak(log), - /* K15 */ be_nested_str_weak(MTR_X3A_X20received_X20cA_X3D), - /* K16 */ be_nested_str_weak(tohex), - /* K17 */ be_nested_str_weak(spake), - /* K18 */ be_nested_str_weak(invalid_X20cA_X20received), - /* K19 */ be_nested_str_weak(session_timestamp), - /* K20 */ be_nested_str_weak(rtc), - /* K21 */ be_nested_str_weak(utc), - /* K22 */ be_nested_str_weak(HKDF_SHA256), - /* K23 */ be_nested_str_weak(derive), - /* K24 */ be_nested_str_weak(Ke), - /* K25 */ be_nested_str_weak(fromstring), - /* K26 */ be_nested_str_weak(SEKeys_Info), - /* K27 */ be_nested_str_weak(I2RKey), - /* K28 */ be_nested_str_weak(R2IKey), - /* K29 */ be_nested_str_weak(AttestationChallenge), - /* K30 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), - /* K31 */ be_nested_str_weak(MTR_X3A_X20session_keys_X3D), - /* K32 */ be_nested_str_weak(MTR_X3A_X20I2RKey_X20_X20_X20_X20_X20_X20_X3D), - /* K33 */ be_nested_str_weak(MTR_X3A_X20R2IKey_X20_X20_X20_X20_X20_X20_X3D), - /* K34 */ be_nested_str_weak(MTR_X3A_X20AC_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K35 */ be_nested_str_weak(build_response), - /* K36 */ be_nested_str_weak(add), - /* K37 */ be_const_int(2), - /* K38 */ be_nested_str_weak(encode), - /* K39 */ be_nested_str_weak(responder), - /* K40 */ be_nested_str_weak(send_response), - /* K41 */ be_nested_str_weak(remote_ip), - /* K42 */ be_nested_str_weak(remote_port), - /* K43 */ be_nested_str_weak(add_session), - /* K44 */ be_nested_str_weak(future_local_session_id), - /* K45 */ be_nested_str_weak(future_initiator_session_id), + /* K12 */ be_nested_str_weak(session), + /* K13 */ be_nested_str_weak(set_mode_PASE), + /* K14 */ be_const_int(2147483647), + /* K15 */ be_nested_str_weak(passcodeId), + /* K16 */ be_nested_str_weak(non_X2Dzero_X20passcode_X20id), + /* K17 */ be_nested_str_weak(future_initiator_session_id), + /* K18 */ be_nested_str_weak(initiator_session_id), + /* K19 */ be_nested_str_weak(future_local_session_id), + /* K20 */ be_nested_str_weak(device), + /* K21 */ be_nested_str_weak(sessions), + /* K22 */ be_nested_str_weak(gen_local_session_id), + /* K23 */ be_nested_str_weak(tasmota), + /* K24 */ be_nested_str_weak(log), + /* K25 */ be_nested_str_weak(MTR_X3A_X20Loc_session_X3D), + /* K26 */ be_nested_str_weak(PBKDFParamResponse), + /* K27 */ be_nested_str_weak(initiatorRandom), + /* K28 */ be_nested_str_weak(responderRandom), + /* K29 */ be_nested_str_weak(random), + /* K30 */ be_nested_str_weak(responderSessionId), + /* K31 */ be_nested_str_weak(pbkdf_parameters_salt), + /* K32 */ be_nested_str_weak(salt), + /* K33 */ be_nested_str_weak(pbkdf_parameters_iterations), + /* K34 */ be_nested_str_weak(iterations), + /* K35 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_X3A_X20), + /* K36 */ be_nested_str_weak(inspect), + /* K37 */ be_nested_str_weak(encode), + /* K38 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_raw_X3A_X20), + /* K39 */ be_nested_str_weak(tohex), + /* K40 */ be_nested_str_weak(build_response), + /* K41 */ be_nested_str_weak(responder), + /* K42 */ be_nested_str_weak(send_response), + /* K43 */ be_nested_str_weak(remote_ip), + /* K44 */ be_nested_str_weak(remote_port), + /* K45 */ be_nested_str_weak(message_counter), }), - be_str_weak(parse_Pake3), + be_str_weak(parse_PBKDFParamRequest), &be_const_str_solidified, - ( &(const binstruction[146]) { /* code */ + ( &(const binstruction[98]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0x880C0301, // 0001 GETMBR R3 R1 K1 - 0x54120023, // 0002 LDINT R4 36 + 0x5412001F, // 0002 LDINT R4 32 0x200C0604, // 0003 NE R3 R3 R4 0x740E0005, // 0004 JMPT R3 #000B 0x880C0302, // 0005 GETMBR R3 R1 K2 @@ -2138,133 +2159,85 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ 0x8814030A, // 0010 GETMBR R5 R1 K10 0x8818030B, // 0011 GETMBR R6 R1 K11 0x7C0C0600, // 0012 CALL R3 3 - 0x8810070C, // 0013 GETMBR R4 R3 K12 - 0x90021804, // 0014 SETMBR R0 K12 R4 - 0xB8121A00, // 0015 GETNGBL R4 K13 - 0x8C10090E, // 0016 GETMET R4 R4 K14 - 0x8818010C, // 0017 GETMBR R6 R0 K12 - 0x8C180D10, // 0018 GETMET R6 R6 K16 - 0x7C180200, // 0019 CALL R6 1 - 0x001A1E06, // 001A ADD R6 K15 R6 - 0x541E0003, // 001B LDINT R7 4 - 0x7C100600, // 001C CALL R4 3 - 0x8810010C, // 001D GETMBR R4 R0 K12 - 0x88140111, // 001E GETMBR R5 R0 K17 - 0x88140B0C, // 001F GETMBR R5 R5 K12 - 0x20100805, // 0020 NE R4 R4 R5 - 0x78120000, // 0021 JMPF R4 #0023 - 0xB0060B12, // 0022 RAISE 1 K5 K18 - 0xB8121A00, // 0023 GETNGBL R4 K13 - 0x8C100914, // 0024 GETMET R4 R4 K20 - 0x7C100200, // 0025 CALL R4 1 - 0x94100915, // 0026 GETIDX R4 R4 K21 - 0x90022604, // 0027 SETMBR R0 K19 R4 - 0x8C100516, // 0028 GETMET R4 R2 K22 - 0x7C100200, // 0029 CALL R4 1 - 0x8C100917, // 002A GETMET R4 R4 K23 - 0x88180118, // 002B GETMBR R6 R0 K24 - 0x601C0015, // 002C GETGBL R7 G21 - 0x7C1C0000, // 002D CALL R7 0 - 0x60200015, // 002E GETGBL R8 G21 - 0x7C200000, // 002F CALL R8 0 - 0x8C201119, // 0030 GETMET R8 R8 K25 - 0x8828011A, // 0031 GETMBR R10 R0 K26 - 0x7C200400, // 0032 CALL R8 2 - 0x5426002F, // 0033 LDINT R9 48 - 0x7C100A00, // 0034 CALL R4 5 - 0x5416000E, // 0035 LDINT R5 15 - 0x40160605, // 0036 CONNECT R5 K3 R5 - 0x94140805, // 0037 GETIDX R5 R4 R5 - 0x90023605, // 0038 SETMBR R0 K27 R5 - 0x5416000F, // 0039 LDINT R5 16 - 0x541A001E, // 003A LDINT R6 31 - 0x40140A06, // 003B CONNECT R5 R5 R6 - 0x94140805, // 003C GETIDX R5 R4 R5 - 0x90023805, // 003D SETMBR R0 K28 R5 - 0x5416001F, // 003E LDINT R5 32 - 0x541A002E, // 003F LDINT R6 47 - 0x40140A06, // 0040 CONNECT R5 R5 R6 - 0x94140805, // 0041 GETIDX R5 R4 R5 - 0x90023A05, // 0042 SETMBR R0 K29 R5 - 0xB8161A00, // 0043 GETNGBL R5 K13 - 0x8C140B0E, // 0044 GETMET R5 R5 K14 - 0x581C001E, // 0045 LDCONST R7 K30 - 0x54220003, // 0046 LDINT R8 4 - 0x7C140600, // 0047 CALL R5 3 - 0xB8161A00, // 0048 GETNGBL R5 K13 - 0x8C140B0E, // 0049 GETMET R5 R5 K14 - 0x8C1C0910, // 004A GETMET R7 R4 K16 - 0x7C1C0200, // 004B CALL R7 1 - 0x001E3E07, // 004C ADD R7 K31 R7 - 0x54220003, // 004D LDINT R8 4 - 0x7C140600, // 004E CALL R5 3 - 0xB8161A00, // 004F GETNGBL R5 K13 - 0x8C140B0E, // 0050 GETMET R5 R5 K14 - 0x881C011B, // 0051 GETMBR R7 R0 K27 - 0x8C1C0F10, // 0052 GETMET R7 R7 K16 - 0x7C1C0200, // 0053 CALL R7 1 - 0x001E4007, // 0054 ADD R7 K32 R7 - 0x54220003, // 0055 LDINT R8 4 - 0x7C140600, // 0056 CALL R5 3 - 0xB8161A00, // 0057 GETNGBL R5 K13 - 0x8C140B0E, // 0058 GETMET R5 R5 K14 - 0x881C011C, // 0059 GETMBR R7 R0 K28 - 0x8C1C0F10, // 005A GETMET R7 R7 K16 - 0x7C1C0200, // 005B CALL R7 1 - 0x001E4207, // 005C ADD R7 K33 R7 - 0x54220003, // 005D LDINT R8 4 - 0x7C140600, // 005E CALL R5 3 - 0xB8161A00, // 005F GETNGBL R5 K13 - 0x8C140B0E, // 0060 GETMET R5 R5 K14 - 0x881C011D, // 0061 GETMBR R7 R0 K29 - 0x8C1C0F10, // 0062 GETMET R7 R7 K16 - 0x7C1C0200, // 0063 CALL R7 1 - 0x001E4407, // 0064 ADD R7 K34 R7 - 0x54220003, // 0065 LDINT R8 4 - 0x7C140600, // 0066 CALL R5 3 - 0xB8161A00, // 0067 GETNGBL R5 K13 - 0x8C140B0E, // 0068 GETMET R5 R5 K14 - 0x581C001E, // 0069 LDCONST R7 K30 - 0x54220003, // 006A LDINT R8 4 - 0x7C140600, // 006B CALL R5 3 - 0x8C140323, // 006C GETMET R5 R1 K35 - 0x541E003F, // 006D LDINT R7 64 - 0x50200000, // 006E LDBOOL R8 0 0 - 0x7C140600, // 006F CALL R5 3 - 0x60180015, // 0070 GETGBL R6 G21 - 0x7C180000, // 0071 CALL R6 0 - 0x8C1C0D24, // 0072 GETMET R7 R6 K36 - 0x58240003, // 0073 LDCONST R9 K3 - 0x58280025, // 0074 LDCONST R10 K37 - 0x7C1C0600, // 0075 CALL R7 3 - 0x8C1C0D24, // 0076 GETMET R7 R6 K36 - 0x58240003, // 0077 LDCONST R9 K3 - 0x542A0003, // 0078 LDINT R10 4 - 0x7C1C0600, // 0079 CALL R7 3 - 0x8C1C0D24, // 007A GETMET R7 R6 K36 - 0x58240003, // 007B LDCONST R9 K3 - 0x542A0003, // 007C LDINT R10 4 - 0x7C1C0600, // 007D CALL R7 3 - 0x8C1C0B26, // 007E GETMET R7 R5 K38 - 0x5C240C00, // 007F MOVE R9 R6 - 0x7C1C0400, // 0080 CALL R7 2 - 0x88200127, // 0081 GETMBR R8 R0 K39 - 0x8C201128, // 0082 GETMET R8 R8 K40 - 0x5C280E00, // 0083 MOVE R10 R7 - 0x882C0329, // 0084 GETMBR R11 R1 K41 - 0x8830032A, // 0085 GETMBR R12 R1 K42 - 0x4C340000, // 0086 LDNIL R13 - 0x7C200A00, // 0087 CALL R8 5 - 0x88200127, // 0088 GETMBR R8 R0 K39 - 0x8C20112B, // 0089 GETMET R8 R8 K43 - 0x8828012C, // 008A GETMBR R10 R0 K44 - 0x882C012D, // 008B GETMBR R11 R0 K45 - 0x8830011B, // 008C GETMBR R12 R0 K27 - 0x8834011C, // 008D GETMBR R13 R0 K28 - 0x8838011D, // 008E GETMBR R14 R0 K29 - 0x883C0113, // 008F GETMBR R15 R0 K19 - 0x7C200E00, // 0090 CALL R8 7 - 0x80000000, // 0091 RET 0 + 0x8810030C, // 0013 GETMBR R4 R1 K12 + 0x8C10090D, // 0014 GETMET R4 R4 K13 + 0x7C100200, // 0015 CALL R4 1 + 0x8810030B, // 0016 GETMBR R4 R1 K11 + 0x4010090E, // 0017 CONNECT R4 R4 K14 + 0x8814030A, // 0018 GETMBR R5 R1 K10 + 0x94100A04, // 0019 GETIDX R4 R5 R4 + 0x90021004, // 001A SETMBR R0 K8 R4 + 0x8810070F, // 001B GETMBR R4 R3 K15 + 0x20100903, // 001C NE R4 R4 K3 + 0x78120000, // 001D JMPF R4 #001F + 0xB0060B10, // 001E RAISE 1 K5 K16 + 0x88100712, // 001F GETMBR R4 R3 K18 + 0x90022204, // 0020 SETMBR R0 K17 R4 + 0x88100114, // 0021 GETMBR R4 R0 K20 + 0x88100915, // 0022 GETMBR R4 R4 K21 + 0x8C100916, // 0023 GETMET R4 R4 K22 + 0x7C100200, // 0024 CALL R4 1 + 0x90022604, // 0025 SETMBR R0 K19 R4 + 0xB8122E00, // 0026 GETNGBL R4 K23 + 0x8C100918, // 0027 GETMET R4 R4 K24 + 0x60180008, // 0028 GETGBL R6 G8 + 0x881C0113, // 0029 GETMBR R7 R0 K19 + 0x7C180200, // 002A CALL R6 1 + 0x001A3206, // 002B ADD R6 K25 R6 + 0x7C100400, // 002C CALL R4 2 + 0xB8120E00, // 002D GETNGBL R4 K7 + 0x8C10091A, // 002E GETMET R4 R4 K26 + 0x7C100200, // 002F CALL R4 1 + 0x8814071B, // 0030 GETMBR R5 R3 K27 + 0x90123605, // 0031 SETMBR R4 K27 R5 + 0x8C14051D, // 0032 GETMET R5 R2 K29 + 0x541E001F, // 0033 LDINT R7 32 + 0x7C140400, // 0034 CALL R5 2 + 0x90123805, // 0035 SETMBR R4 K28 R5 + 0x88140113, // 0036 GETMBR R5 R0 K19 + 0x90123C05, // 0037 SETMBR R4 K30 R5 + 0x88140114, // 0038 GETMBR R5 R0 K20 + 0x88140B20, // 0039 GETMBR R5 R5 K32 + 0x90123E05, // 003A SETMBR R4 K31 R5 + 0x88140114, // 003B GETMBR R5 R0 K20 + 0x88140B22, // 003C GETMBR R5 R5 K34 + 0x90124205, // 003D SETMBR R4 K33 R5 + 0xB8162E00, // 003E GETNGBL R5 K23 + 0x8C140B18, // 003F GETMET R5 R5 K24 + 0x601C0008, // 0040 GETGBL R7 G8 + 0xB8220E00, // 0041 GETNGBL R8 K7 + 0x8C201124, // 0042 GETMET R8 R8 K36 + 0x5C280800, // 0043 MOVE R10 R4 + 0x7C200400, // 0044 CALL R8 2 + 0x7C1C0200, // 0045 CALL R7 1 + 0x001E4607, // 0046 ADD R7 K35 R7 + 0x54220003, // 0047 LDINT R8 4 + 0x7C140600, // 0048 CALL R5 3 + 0x8C140925, // 0049 GETMET R5 R4 K37 + 0x7C140200, // 004A CALL R5 1 + 0xB81A2E00, // 004B GETNGBL R6 K23 + 0x8C180D18, // 004C GETMET R6 R6 K24 + 0x8C200B27, // 004D GETMET R8 R5 K39 + 0x7C200200, // 004E CALL R8 1 + 0x00224C08, // 004F ADD R8 K38 R8 + 0x54260003, // 0050 LDINT R9 4 + 0x7C180600, // 0051 CALL R6 3 + 0x90023405, // 0052 SETMBR R0 K26 R5 + 0x8C180328, // 0053 GETMET R6 R1 K40 + 0x54220020, // 0054 LDINT R8 33 + 0x50240200, // 0055 LDBOOL R9 1 0 + 0x7C180600, // 0056 CALL R6 3 + 0x8C1C0D25, // 0057 GETMET R7 R6 K37 + 0x5C240A00, // 0058 MOVE R9 R5 + 0x7C1C0400, // 0059 CALL R7 2 + 0x88200129, // 005A GETMBR R8 R0 K41 + 0x8C20112A, // 005B GETMET R8 R8 K42 + 0x5C280E00, // 005C MOVE R10 R7 + 0x882C032B, // 005D GETMBR R11 R1 K43 + 0x8830032C, // 005E GETMBR R12 R1 K44 + 0x88340D2D, // 005F GETMBR R13 R6 K45 + 0x7C200A00, // 0060 CALL R8 5 + 0x80000000, // 0061 RET 0 }) ) ); @@ -2272,102 +2245,121 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ /******************************************************************** -** Solidified function: process_incoming +** Solidified function: find_fabric_by_destination_id ********************************************************************/ -be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ +be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /* name */ be_nested_proto( - 7, /* nstack */ - 2, /* argc */ + 14, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_str_weak(window_open), + ( &(const bvalue[21]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20commissioning_X20not_X20open), - /* K4 */ be_const_int(2), - /* K5 */ be_nested_str_weak(MTR_X3A_X20received_X20message_X20), - /* K6 */ be_nested_str_weak(matter), - /* K7 */ be_nested_str_weak(inspect), - /* K8 */ be_const_int(3), - /* K9 */ be_nested_str_weak(opcode), - /* K10 */ be_nested_str_weak(parse_PBKDFParamRequest), - /* K11 */ be_nested_str_weak(parse_Pake1), - /* K12 */ be_nested_str_weak(parse_Pake3), - /* K13 */ be_nested_str_weak(parse_Sigma1), - /* K14 */ be_nested_str_weak(parse_Sigma3), + /* K3 */ be_nested_str_weak(MTR_X3A_X20SEARCHING_X3A_X20destinationId_X3D), + /* K4 */ be_nested_str_weak(tohex), + /* K5 */ be_const_int(3), + /* K6 */ be_nested_str_weak(device), + /* K7 */ be_nested_str_weak(sessions), + /* K8 */ be_nested_str_weak(fabrics), + /* K9 */ be_nested_str_weak(noc), + /* K10 */ be_nested_str_weak(fabric_id), + /* K11 */ be_nested_str_weak(device_id), + /* K12 */ be_nested_str_weak(get_ca_pub), + /* K13 */ be_nested_str_weak(get_ipk_group_key), + /* K14 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20destinationMessage_X3D), + /* K15 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20key_ipk_X3D), + /* K16 */ be_nested_str_weak(HMAC_SHA256), + /* K17 */ be_nested_str_weak(update), + /* K18 */ be_nested_str_weak(out), + /* K19 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20candidateDestinationId_X3D), + /* K20 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(process_incoming), + be_str_weak(find_fabric_by_destination_id), &be_const_str_solidified, - ( &(const binstruction[64]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A0006, // 0001 JMPT R2 #0009 - 0xB80A0200, // 0002 GETNGBL R2 K1 - 0x8C080502, // 0003 GETMET R2 R2 K2 - 0x58100003, // 0004 LDCONST R4 K3 - 0x58140004, // 0005 LDCONST R5 K4 - 0x7C080600, // 0006 CALL R2 3 - 0x50080000, // 0007 LDBOOL R2 0 0 - 0x80040400, // 0008 RET 1 R2 - 0xB80A0200, // 0009 GETNGBL R2 K1 - 0x8C080502, // 000A GETMET R2 R2 K2 - 0xB8120C00, // 000B GETNGBL R4 K6 - 0x8C100907, // 000C GETMET R4 R4 K7 - 0x5C180200, // 000D MOVE R6 R1 - 0x7C100400, // 000E CALL R4 2 - 0x00120A04, // 000F ADD R4 K5 R4 - 0x58140008, // 0010 LDCONST R5 K8 - 0x7C080600, // 0011 CALL R2 3 - 0x88080309, // 0012 GETMBR R2 R1 K9 - 0x540E001F, // 0013 LDINT R3 32 - 0x1C080403, // 0014 EQ R2 R2 R3 - 0x780A0004, // 0015 JMPF R2 #001B - 0x8C08010A, // 0016 GETMET R2 R0 K10 - 0x5C100200, // 0017 MOVE R4 R1 - 0x7C080400, // 0018 CALL R2 2 - 0x80040400, // 0019 RET 1 R2 - 0x70020022, // 001A JMP #003E - 0x88080309, // 001B GETMBR R2 R1 K9 - 0x540E0021, // 001C LDINT R3 34 - 0x1C080403, // 001D EQ R2 R2 R3 - 0x780A0004, // 001E JMPF R2 #0024 - 0x8C08010B, // 001F GETMET R2 R0 K11 - 0x5C100200, // 0020 MOVE R4 R1 - 0x7C080400, // 0021 CALL R2 2 - 0x80040400, // 0022 RET 1 R2 - 0x70020019, // 0023 JMP #003E - 0x88080309, // 0024 GETMBR R2 R1 K9 - 0x540E0023, // 0025 LDINT R3 36 - 0x1C080403, // 0026 EQ R2 R2 R3 - 0x780A0004, // 0027 JMPF R2 #002D - 0x8C08010C, // 0028 GETMET R2 R0 K12 - 0x5C100200, // 0029 MOVE R4 R1 - 0x7C080400, // 002A CALL R2 2 - 0x80040400, // 002B RET 1 R2 - 0x70020010, // 002C JMP #003E - 0x88080309, // 002D GETMBR R2 R1 K9 - 0x540E002F, // 002E LDINT R3 48 - 0x1C080403, // 002F EQ R2 R2 R3 - 0x780A0004, // 0030 JMPF R2 #0036 - 0x8C08010D, // 0031 GETMET R2 R0 K13 - 0x5C100200, // 0032 MOVE R4 R1 - 0x7C080400, // 0033 CALL R2 2 - 0x80040400, // 0034 RET 1 R2 - 0x70020007, // 0035 JMP #003E - 0x88080309, // 0036 GETMBR R2 R1 K9 - 0x540E0031, // 0037 LDINT R3 50 - 0x1C080403, // 0038 EQ R2 R2 R3 - 0x780A0003, // 0039 JMPF R2 #003E - 0x8C08010E, // 003A GETMET R2 R0 K14 - 0x5C100200, // 003B MOVE R4 R1 - 0x7C080400, // 003C CALL R2 2 - 0x80040400, // 003D RET 1 R2 - 0x50080000, // 003E LDBOOL R2 0 0 - 0x80040400, // 003F RET 1 R2 + ( &(const binstruction[77]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x8C100902, // 0002 GETMET R4 R4 K2 + 0x8C180304, // 0003 GETMET R6 R1 K4 + 0x7C180200, // 0004 CALL R6 1 + 0x001A0606, // 0005 ADD R6 K3 R6 + 0x581C0005, // 0006 LDCONST R7 K5 + 0x7C100600, // 0007 CALL R4 3 + 0x60100010, // 0008 GETGBL R4 G16 + 0x88140106, // 0009 GETMBR R5 R0 K6 + 0x88140B07, // 000A GETMBR R5 R5 K7 + 0x88140B08, // 000B GETMBR R5 R5 K8 + 0x7C100200, // 000C CALL R4 1 + 0xA8020039, // 000D EXBLK 0 #0048 + 0x5C140800, // 000E MOVE R5 R4 + 0x7C140000, // 000F CALL R5 0 + 0x88180B09, // 0010 GETMBR R6 R5 K9 + 0x4C1C0000, // 0011 LDNIL R7 + 0x1C180C07, // 0012 EQ R6 R6 R7 + 0x741A0007, // 0013 JMPT R6 #001C + 0x88180B0A, // 0014 GETMBR R6 R5 K10 + 0x4C1C0000, // 0015 LDNIL R7 + 0x1C180C07, // 0016 EQ R6 R6 R7 + 0x741A0003, // 0017 JMPT R6 #001C + 0x88180B0B, // 0018 GETMBR R6 R5 K11 + 0x4C1C0000, // 0019 LDNIL R7 + 0x1C180C07, // 001A EQ R6 R6 R7 + 0x781A0000, // 001B JMPF R6 #001D + 0x7001FFF0, // 001C JMP #000E + 0x8C180B0C, // 001D GETMET R6 R5 K12 + 0x7C180200, // 001E CALL R6 1 + 0x00180406, // 001F ADD R6 R2 R6 + 0x881C0B0A, // 0020 GETMBR R7 R5 K10 + 0x00180C07, // 0021 ADD R6 R6 R7 + 0x881C0B0B, // 0022 GETMBR R7 R5 K11 + 0x00180C07, // 0023 ADD R6 R6 R7 + 0x8C1C0B0D, // 0024 GETMET R7 R5 K13 + 0x7C1C0200, // 0025 CALL R7 1 + 0xB8220200, // 0026 GETNGBL R8 K1 + 0x8C201102, // 0027 GETMET R8 R8 K2 + 0x8C280D04, // 0028 GETMET R10 R6 K4 + 0x7C280200, // 0029 CALL R10 1 + 0x002A1C0A, // 002A ADD R10 K14 R10 + 0x582C0005, // 002B LDCONST R11 K5 + 0x7C200600, // 002C CALL R8 3 + 0xB8220200, // 002D GETNGBL R8 K1 + 0x8C201102, // 002E GETMET R8 R8 K2 + 0x8C280F04, // 002F GETMET R10 R7 K4 + 0x7C280200, // 0030 CALL R10 1 + 0x002A1E0A, // 0031 ADD R10 K15 R10 + 0x542E0003, // 0032 LDINT R11 4 + 0x7C200600, // 0033 CALL R8 3 + 0x8C200710, // 0034 GETMET R8 R3 K16 + 0x5C280E00, // 0035 MOVE R10 R7 + 0x7C200400, // 0036 CALL R8 2 + 0x8C241111, // 0037 GETMET R9 R8 K17 + 0x5C2C0C00, // 0038 MOVE R11 R6 + 0x7C240400, // 0039 CALL R9 2 + 0x8C241112, // 003A GETMET R9 R8 K18 + 0x7C240200, // 003B CALL R9 1 + 0xB82A0200, // 003C GETNGBL R10 K1 + 0x8C281502, // 003D GETMET R10 R10 K2 + 0x8C301304, // 003E GETMET R12 R9 K4 + 0x7C300200, // 003F CALL R12 1 + 0x0032260C, // 0040 ADD R12 K19 R12 + 0x58340005, // 0041 LDCONST R13 K5 + 0x7C280600, // 0042 CALL R10 3 + 0x1C281201, // 0043 EQ R10 R9 R1 + 0x782A0001, // 0044 JMPF R10 #0047 + 0xA8040001, // 0045 EXBLK 1 1 + 0x80040A00, // 0046 RET 1 R5 + 0x7001FFC5, // 0047 JMP #000E + 0x58100014, // 0048 LDCONST R4 K20 + 0xAC100200, // 0049 CATCH R4 1 0 + 0xB0080000, // 004A RAISE 2 R0 R0 + 0x4C100000, // 004B LDNIL R4 + 0x80040800, // 004C RET 1 R4 }) ) ); @@ -2378,46 +2370,45 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ ** Solidified class: Matter_Commisioning_Context ********************************************************************/ be_local_class(Matter_Commisioning_Context, - 21, + 20, NULL, - be_nested_map(36, + be_nested_map(35, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(parse_PBKDFParamRequest, -1), be_const_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest_closure) }, - { be_const_key_weak(cA, 32), be_const_var(10) }, - { be_const_key_weak(PBKDFParamRequest, -1), be_const_var(5) }, - { be_const_key_weak(parse_Pake3, 20), be_const_closure(Matter_Commisioning_Context_parse_Pake3_closure) }, - { be_const_key_weak(cB, -1), be_const_var(11) }, - { be_const_key_weak(spake, -1), be_const_var(2) }, - { be_const_key_weak(find_session_by_destination_id, 2), be_const_closure(Matter_Commisioning_Context_find_session_by_destination_id_closure) }, - { be_const_key_weak(R2IKey, -1), be_const_var(18) }, - { be_const_key_weak(Ke, -1), be_const_var(12) }, - { be_const_key_weak(parse_Sigma1, -1), be_const_closure(Matter_Commisioning_Context_parse_Sigma1_closure) }, - { be_const_key_weak(SEKeys_Info, -1), be_nested_str_weak(SessionKeys) }, - { be_const_key_weak(I2RKey, -1), be_const_var(17) }, - { be_const_key_weak(ResponderEph_priv, -1), be_const_var(13) }, - { be_const_key_weak(parse_Pake1, -1), be_const_closure(Matter_Commisioning_Context_parse_Pake1_closure) }, + { be_const_key_weak(parse_Pake3, -1), be_const_closure(Matter_Commisioning_Context_parse_Pake3_closure) }, + { be_const_key_weak(I2RKey, 9), be_const_var(17) }, { be_const_key_weak(AttestationChallenge, -1), be_const_var(19) }, - { be_const_key_weak(init, 3), be_const_closure(Matter_Commisioning_Context_init_closure) }, - { be_const_key_weak(ResponderEph_pub, 6), be_const_var(14) }, - { be_const_key_weak(initiatorEph_pub, -1), be_const_var(15) }, - { be_const_key_weak(window_open, -1), be_const_var(20) }, - { be_const_key_weak(session_timestamp, 26), be_const_var(16) }, - { be_const_key_weak(future_local_session_id, 34), be_const_var(4) }, - { be_const_key_weak(Matter_Context_Prefix, 27), be_nested_str_weak(CHIP_X20PAKE_X20V1_X20Commissioning) }, - { be_const_key_weak(pA, 30), be_const_var(8) }, - { be_const_key_weak(pB, -1), be_const_var(9) }, - { be_const_key_weak(TBEData2_Nonce, -1), be_nested_str_weak(NCASE_Sigma2N) }, - { be_const_key_weak(future_initiator_session_id, -1), be_const_var(3) }, - { be_const_key_weak(PBKDFParamResponse, -1), be_const_var(6) }, - { be_const_key_weak(every_second, -1), be_const_closure(Matter_Commisioning_Context_every_second_closure) }, - { be_const_key_weak(y, 19), be_const_var(7) }, - { be_const_key_weak(parse_Sigma3, 8), be_const_closure(Matter_Commisioning_Context_parse_Sigma3_closure) }, - { be_const_key_weak(S2K_Info, -1), be_nested_str_weak(Sigma2) }, - { be_const_key_weak(TBEData3_Nonce, 9), be_nested_str_weak(NCASE_Sigma3N) }, - { be_const_key_weak(responder, -1), be_const_var(0) }, + { be_const_key_weak(parse_Pake1, -1), be_const_closure(Matter_Commisioning_Context_parse_Pake1_closure) }, + { be_const_key_weak(PBKDFParamRequest, -1), be_const_var(5) }, + { be_const_key_weak(Matter_Context_Prefix, 14), be_nested_str_weak(CHIP_X20PAKE_X20V1_X20Commissioning) }, + { be_const_key_weak(device, 34), be_const_var(1) }, { be_const_key_weak(S3K_Info, -1), be_nested_str_weak(Sigma3) }, - { be_const_key_weak(device, -1), be_const_var(1) }, - { be_const_key_weak(process_incoming, -1), be_const_closure(Matter_Commisioning_Context_process_incoming_closure) }, + { be_const_key_weak(R2IKey, 21), be_const_var(18) }, + { be_const_key_weak(S2K_Info, 27), be_nested_str_weak(Sigma2) }, + { be_const_key_weak(every_second, -1), be_const_closure(Matter_Commisioning_Context_every_second_closure) }, + { be_const_key_weak(future_local_session_id, -1), be_const_var(4) }, + { be_const_key_weak(process_incoming, 29), be_const_closure(Matter_Commisioning_Context_process_incoming_closure) }, + { be_const_key_weak(pB, -1), be_const_var(9) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Commisioning_Context_init_closure) }, + { be_const_key_weak(ResponderEph_pub, -1), be_const_var(14) }, + { be_const_key_weak(cA, -1), be_const_var(10) }, + { be_const_key_weak(future_initiator_session_id, 16), be_const_var(3) }, + { be_const_key_weak(responder, -1), be_const_var(0) }, + { be_const_key_weak(parse_Sigma1, 24), be_const_closure(Matter_Commisioning_Context_parse_Sigma1_closure) }, + { be_const_key_weak(PBKDFParamResponse, -1), be_const_var(6) }, + { be_const_key_weak(Ke, 26), be_const_var(12) }, + { be_const_key_weak(parse_Sigma3, -1), be_const_closure(Matter_Commisioning_Context_parse_Sigma3_closure) }, + { be_const_key_weak(parse_PBKDFParamRequest, -1), be_const_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest_closure) }, + { be_const_key_weak(created, -1), be_const_var(16) }, + { be_const_key_weak(spake, -1), be_const_var(2) }, + { be_const_key_weak(find_fabric_by_destination_id, -1), be_const_closure(Matter_Commisioning_Context_find_fabric_by_destination_id_closure) }, + { be_const_key_weak(TBEData3_Nonce, -1), be_nested_str_weak(NCASE_Sigma3N) }, + { be_const_key_weak(ResponderEph_priv, -1), be_const_var(13) }, + { be_const_key_weak(TBEData2_Nonce, -1), be_nested_str_weak(NCASE_Sigma2N) }, + { be_const_key_weak(cB, -1), be_const_var(11) }, + { be_const_key_weak(SEKeys_Info, -1), be_nested_str_weak(SessionKeys) }, + { be_const_key_weak(pA, 1), be_const_var(8) }, + { be_const_key_weak(initiatorEph_pub, 4), be_const_var(15) }, + { be_const_key_weak(y, -1), be_const_var(7) }, })), be_str_weak(Matter_Commisioning_Context) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h index 25646e8fe..c6efc6bb9 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h @@ -7,131 +7,178 @@ extern const bclass be_class_Matter_Device; /******************************************************************** -** Solidified function: msg_received +** Solidified function: compute_pbkdf ********************************************************************/ -be_local_closure(Matter_Device_msg_received, /* name */ +be_local_closure(Matter_Device_compute_pbkdf, /* name */ + be_nested_proto( + 17, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[30]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(salt), + /* K3 */ be_nested_str_weak(random), + /* K4 */ be_nested_str_weak(add), + /* K5 */ be_nested_str_weak(PBKDF2_HMAC_SHA256), + /* K6 */ be_nested_str_weak(derive), + /* K7 */ be_nested_str_weak(iterations), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(w0), + /* K10 */ be_nested_str_weak(EC_P256), + /* K11 */ be_nested_str_weak(mod), + /* K12 */ be_nested_str_weak(w1), + /* K13 */ be_nested_str_weak(L), + /* K14 */ be_nested_str_weak(public_key), + /* K15 */ be_nested_str_weak(tasmota), + /* K16 */ be_nested_str_weak(log), + /* K17 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), + /* K18 */ be_nested_str_weak(MTR_X3A_X20salt_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K19 */ be_nested_str_weak(tohex), + /* K20 */ be_nested_str_weak(MTR_X3A_X20passcode_hex_X20_X20_X3D_X20), + /* K21 */ be_nested_str_weak(MTR_X3A_X20w0_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K22 */ be_nested_str_weak(MTR_X3A_X20w1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K23 */ be_nested_str_weak(MTR_X3A_X20L_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K24 */ be_nested_str_weak(compute_manual_pairing_code), + /* K25 */ be_nested_str_weak(format), + /* K26 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s), + /* K27 */ be_const_int(3), + /* K28 */ be_const_int(2147483647), + /* K29 */ be_const_int(2), + }), + be_str_weak(compute_pbkdf), + &be_const_str_solidified, + ( &(const binstruction[113]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0x8C100503, // 0002 GETMET R4 R2 K3 + 0x541A000F, // 0003 LDINT R6 16 + 0x7C100400, // 0004 CALL R4 2 + 0x90020404, // 0005 SETMBR R0 K2 R4 + 0x60100015, // 0006 GETGBL R4 G21 + 0x7C100000, // 0007 CALL R4 0 + 0x8C100904, // 0008 GETMET R4 R4 K4 + 0x5C180200, // 0009 MOVE R6 R1 + 0x541E0003, // 000A LDINT R7 4 + 0x7C100600, // 000B CALL R4 3 + 0x8C140505, // 000C GETMET R5 R2 K5 + 0x7C140200, // 000D CALL R5 1 + 0x8C140B06, // 000E GETMET R5 R5 K6 + 0x5C1C0800, // 000F MOVE R7 R4 + 0x88200102, // 0010 GETMBR R8 R0 K2 + 0x88240107, // 0011 GETMBR R9 R0 K7 + 0x542A004F, // 0012 LDINT R10 80 + 0x7C140A00, // 0013 CALL R5 5 + 0x541A0026, // 0014 LDINT R6 39 + 0x401A1006, // 0015 CONNECT R6 K8 R6 + 0x94180A06, // 0016 GETIDX R6 R5 R6 + 0x541E0027, // 0017 LDINT R7 40 + 0x5422004E, // 0018 LDINT R8 79 + 0x401C0E08, // 0019 CONNECT R7 R7 R8 + 0x941C0A07, // 001A GETIDX R7 R5 R7 + 0x8C20050A, // 001B GETMET R8 R2 K10 + 0x7C200200, // 001C CALL R8 1 + 0x8C20110B, // 001D GETMET R8 R8 K11 + 0x5C280C00, // 001E MOVE R10 R6 + 0x7C200400, // 001F CALL R8 2 + 0x90021208, // 0020 SETMBR R0 K9 R8 + 0x8C20050A, // 0021 GETMET R8 R2 K10 + 0x7C200200, // 0022 CALL R8 1 + 0x8C20110B, // 0023 GETMET R8 R8 K11 + 0x5C280E00, // 0024 MOVE R10 R7 + 0x7C200400, // 0025 CALL R8 2 + 0x90021808, // 0026 SETMBR R0 K12 R8 + 0x8C20050A, // 0027 GETMET R8 R2 K10 + 0x7C200200, // 0028 CALL R8 1 + 0x8C20110E, // 0029 GETMET R8 R8 K14 + 0x8828010C, // 002A GETMBR R10 R0 K12 + 0x7C200400, // 002B CALL R8 2 + 0x90021A08, // 002C SETMBR R0 K13 R8 + 0xB8221E00, // 002D GETNGBL R8 K15 + 0x8C201110, // 002E GETMET R8 R8 K16 + 0x58280011, // 002F LDCONST R10 K17 + 0x542E0003, // 0030 LDINT R11 4 + 0x7C200600, // 0031 CALL R8 3 + 0xB8221E00, // 0032 GETNGBL R8 K15 + 0x8C201110, // 0033 GETMET R8 R8 K16 + 0x88280102, // 0034 GETMBR R10 R0 K2 + 0x8C281513, // 0035 GETMET R10 R10 K19 + 0x7C280200, // 0036 CALL R10 1 + 0x002A240A, // 0037 ADD R10 K18 R10 + 0x542E0003, // 0038 LDINT R11 4 + 0x7C200600, // 0039 CALL R8 3 + 0xB8221E00, // 003A GETNGBL R8 K15 + 0x8C201110, // 003B GETMET R8 R8 K16 + 0x8C280913, // 003C GETMET R10 R4 K19 + 0x7C280200, // 003D CALL R10 1 + 0x002A280A, // 003E ADD R10 K20 R10 + 0x542E0003, // 003F LDINT R11 4 + 0x7C200600, // 0040 CALL R8 3 + 0xB8221E00, // 0041 GETNGBL R8 K15 + 0x8C201110, // 0042 GETMET R8 R8 K16 + 0x88280109, // 0043 GETMBR R10 R0 K9 + 0x8C281513, // 0044 GETMET R10 R10 K19 + 0x7C280200, // 0045 CALL R10 1 + 0x002A2A0A, // 0046 ADD R10 K21 R10 + 0x542E0003, // 0047 LDINT R11 4 + 0x7C200600, // 0048 CALL R8 3 + 0xB8221E00, // 0049 GETNGBL R8 K15 + 0x8C201110, // 004A GETMET R8 R8 K16 + 0x8828010C, // 004B GETMBR R10 R0 K12 + 0x8C281513, // 004C GETMET R10 R10 K19 + 0x7C280200, // 004D CALL R10 1 + 0x002A2C0A, // 004E ADD R10 K22 R10 + 0x542E0003, // 004F LDINT R11 4 + 0x7C200600, // 0050 CALL R8 3 + 0xB8221E00, // 0051 GETNGBL R8 K15 + 0x8C201110, // 0052 GETMET R8 R8 K16 + 0x8828010D, // 0053 GETMBR R10 R0 K13 + 0x8C281513, // 0054 GETMET R10 R10 K19 + 0x7C280200, // 0055 CALL R10 1 + 0x002A2E0A, // 0056 ADD R10 K23 R10 + 0x542E0003, // 0057 LDINT R11 4 + 0x7C200600, // 0058 CALL R8 3 + 0xB8221E00, // 0059 GETNGBL R8 K15 + 0x8C201110, // 005A GETMET R8 R8 K16 + 0x58280011, // 005B LDCONST R10 K17 + 0x542E0003, // 005C LDINT R11 4 + 0x7C200600, // 005D CALL R8 3 + 0x8C200118, // 005E GETMET R8 R0 K24 + 0x7C200200, // 005F CALL R8 1 + 0xB8261E00, // 0060 GETNGBL R9 K15 + 0x8C241310, // 0061 GETMET R9 R9 K16 + 0x8C2C0719, // 0062 GETMET R11 R3 K25 + 0x5834001A, // 0063 LDCONST R13 K26 + 0x403A111B, // 0064 CONNECT R14 K8 K27 + 0x9438100E, // 0065 GETIDX R14 R8 R14 + 0x543E0003, // 0066 LDINT R15 4 + 0x54420005, // 0067 LDINT R16 6 + 0x403C1E10, // 0068 CONNECT R15 R15 R16 + 0x943C100F, // 0069 GETIDX R15 R8 R15 + 0x54420006, // 006A LDINT R16 7 + 0x4040211C, // 006B CONNECT R16 R16 K28 + 0x94401010, // 006C GETIDX R16 R8 R16 + 0x7C2C0A00, // 006D CALL R11 5 + 0x5830001D, // 006E LDCONST R12 K29 + 0x7C240600, // 006F CALL R9 3 + 0x80000000, // 0070 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_operational_discovery +********************************************************************/ +be_local_closure(Matter_Device_start_operational_discovery, /* name */ be_nested_proto( 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(message_handler), - /* K1 */ be_nested_str_weak(msg_received), - }), - be_str_weak(msg_received), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x8C100901, // 0001 GETMET R4 R4 K1 - 0x5C180200, // 0002 MOVE R6 R1 - 0x5C1C0400, // 0003 MOVE R7 R2 - 0x5C200600, // 0004 MOVE R8 R3 - 0x7C100800, // 0005 CALL R4 4 - 0x80040800, // 0006 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_udp -********************************************************************/ -be_local_closure(Matter_Device_start_udp, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(msg_received), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x680C0000, // 0000 GETUPV R3 U0 - 0x8C0C0700, // 0001 GETMET R3 R3 K0 - 0x5C140000, // 0002 MOVE R5 R0 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x7C0C0800, // 0005 CALL R3 4 - 0x80040600, // 0006 RET 1 R3 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20), - /* K4 */ be_const_int(2), - /* K5 */ be_nested_str_weak(matter), - /* K6 */ be_nested_str_weak(UDPServer), - /* K7 */ be_nested_str_weak(), - /* K8 */ be_nested_str_weak(start), - }), - be_str_weak(start_udp), - &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0000, // 0001 JMPF R2 #0003 - 0x80000400, // 0002 RET 0 - 0x4C080000, // 0003 LDNIL R2 - 0x1C080202, // 0004 EQ R2 R1 R2 - 0x780A0000, // 0005 JMPF R2 #0007 - 0x540615A3, // 0006 LDINT R1 5540 - 0xB80A0200, // 0007 GETNGBL R2 K1 - 0x8C080502, // 0008 GETMET R2 R2 K2 - 0x60100008, // 0009 GETGBL R4 G8 - 0x5C140200, // 000A MOVE R5 R1 - 0x7C100200, // 000B CALL R4 1 - 0x00120604, // 000C ADD R4 K3 R4 - 0x58140004, // 000D LDCONST R5 K4 - 0x7C080600, // 000E CALL R2 3 - 0xB80A0A00, // 000F GETNGBL R2 K5 - 0x8C080506, // 0010 GETMET R2 R2 K6 - 0x58100007, // 0011 LDCONST R4 K7 - 0x5C140200, // 0012 MOVE R5 R1 - 0x7C080600, // 0013 CALL R2 3 - 0x90020002, // 0014 SETMBR R0 K0 R2 - 0x88080100, // 0015 GETMBR R2 R0 K0 - 0x8C080508, // 0016 GETMET R2 R2 K8 - 0x84100000, // 0017 CLOSURE R4 P0 - 0x7C080400, // 0018 CALL R2 2 - 0xA0000000, // 0019 CLOSE R0 - 0x80000000, // 001A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: packet_ack -********************************************************************/ -be_local_closure(Matter_Device_packet_ack, /* name */ - be_nested_proto( - 5, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -139,74 +186,40 @@ be_local_closure(Matter_Device_packet_ack, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(packet_ack), + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(mdns), + /* K2 */ be_nested_str_weak(string), + /* K3 */ be_nested_str_weak(salt), + /* K4 */ be_nested_str_weak(w0), + /* K5 */ be_nested_str_weak(w1), + /* K6 */ be_nested_str_weak(L), + /* K7 */ be_nested_str_weak(set_expire_in_seconds), + /* K8 */ be_nested_str_weak(mdns_announce_op_discovery), + /* K9 */ be_nested_str_weak(get_fabric), }), - be_str_weak(packet_ack), + be_str_weak(start_operational_discovery), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -be_local_closure(Matter_Device_invoke_request, /* name */ - be_nested_proto( - 11, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(plugins), - /* K2 */ be_nested_str_weak(invoke_request), - /* K3 */ be_nested_str_weak(status), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(UNSUPPORTED_COMMAND), - /* K6 */ be_const_int(1), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x58100000, // 0000 LDCONST R4 K0 - 0x6014000C, // 0001 GETGBL R5 G12 - 0x88180101, // 0002 GETMBR R6 R0 K1 - 0x7C140200, // 0003 CALL R5 1 - 0x14140805, // 0004 LT R5 R4 R5 - 0x78160011, // 0005 JMPF R5 #0018 - 0x88140101, // 0006 GETMBR R5 R0 K1 - 0x94140A04, // 0007 GETIDX R5 R5 R4 - 0x8C180B02, // 0008 GETMET R6 R5 K2 - 0x5C200200, // 0009 MOVE R8 R1 - 0x5C240400, // 000A MOVE R9 R2 - 0x5C280600, // 000B MOVE R10 R3 - 0x7C180800, // 000C CALL R6 4 - 0x4C1C0000, // 000D LDNIL R7 - 0x201C0C07, // 000E NE R7 R6 R7 - 0x741E0004, // 000F JMPT R7 #0015 - 0x881C0703, // 0010 GETMBR R7 R3 K3 - 0xB8220800, // 0011 GETNGBL R8 K4 - 0x88201105, // 0012 GETMBR R8 R8 K5 - 0x201C0E08, // 0013 NE R7 R7 R8 - 0x781E0000, // 0014 JMPF R7 #0016 - 0x80040C00, // 0015 RET 1 R6 - 0x00100906, // 0016 ADD R4 R4 K6 - 0x7001FFE8, // 0017 JMP #0001 - 0x80000000, // 0018 RET 0 + ( &(const binstruction[19]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0xA4120400, // 0002 IMPORT R4 K2 + 0x4C140000, // 0003 LDNIL R5 + 0x90020605, // 0004 SETMBR R0 K3 R5 + 0x4C140000, // 0005 LDNIL R5 + 0x90020805, // 0006 SETMBR R0 K4 R5 + 0x4C140000, // 0007 LDNIL R5 + 0x90020A05, // 0008 SETMBR R0 K5 R5 + 0x4C140000, // 0009 LDNIL R5 + 0x90020C05, // 000A SETMBR R0 K6 R5 + 0x8C140307, // 000B GETMET R5 R1 K7 + 0x541E003B, // 000C LDINT R7 60 + 0x7C140400, // 000D CALL R5 2 + 0x8C140108, // 000E GETMET R5 R0 K8 + 0x8C1C0309, // 000F GETMET R7 R1 K9 + 0x7C1C0200, // 0010 CALL R7 1 + 0x7C140400, // 0011 CALL R5 2 + 0x80000000, // 0012 RET 0 }) ) ); @@ -275,7 +288,7 @@ be_local_closure(Matter_Device__start_mdns_announce, /* name */ /* K45 */ be_nested_str_weak(_CM1), /* K46 */ be_nested_str_weak(MTR_X3A_X20Exception), /* K47 */ be_nested_str_weak(_X7C), - /* K48 */ be_nested_str_weak(mdns_announce_op_discovery_all_sessions), + /* K48 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics), }), be_str_weak(_start_mdns_announce), &be_const_str_solidified, @@ -599,364 +612,11 @@ be_local_closure(Matter_Device__start_mdns_announce, /* name */ /******************************************************************** -** Solidified function: init +** Solidified function: packet_ack ********************************************************************/ -be_local_closure(Matter_Device_init, /* name */ +be_local_closure(Matter_Device_packet_ack, /* name */ be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(start_udp), - /* K1 */ be_nested_str_weak(UDP_PORT), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(remove_rule), - /* K4 */ be_nested_str_weak(Wifi_X23Connected), - /* K5 */ be_nested_str_weak(matter_device_udp), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x68080000, // 0002 GETUPV R2 U0 - 0x88080501, // 0003 GETMBR R2 R2 K1 - 0x7C000400, // 0004 CALL R0 2 - 0xB8020400, // 0005 GETNGBL R0 K2 - 0x8C000103, // 0006 GETMET R0 R0 K3 - 0x58080004, // 0007 LDCONST R2 K4 - 0x580C0005, // 0008 LDCONST R3 K5 - 0x7C000600, // 0009 CALL R0 3 - 0x80000000, // 000A RET 0 - }) - ), - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(start_udp), - /* K1 */ be_nested_str_weak(UDP_PORT), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(remove_rule), - /* K4 */ be_nested_str_weak(Eth_X23Connected), - /* K5 */ be_nested_str_weak(matter_device_udp), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x68080000, // 0002 GETUPV R2 U0 - 0x88080501, // 0003 GETMBR R2 R2 K1 - 0x7C000400, // 0004 CALL R0 2 - 0xB8020400, // 0005 GETNGBL R0 K2 - 0x8C000103, // 0006 GETMET R0 R0 K3 - 0x58080004, // 0007 LDCONST R2 K4 - 0x580C0005, // 0008 LDCONST R3 K5 - 0x7C000600, // 0009 CALL R0 3 - 0x80000000, // 000A RET 0 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[40]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(get_option), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(MATTER_OPTION), - /* K6 */ be_nested_str_weak(UI), - /* K7 */ be_nested_str_weak(plugins), - /* K8 */ be_nested_str_weak(vendorid), - /* K9 */ be_nested_str_weak(VENDOR_ID), - /* K10 */ be_nested_str_weak(productid), - /* K11 */ be_nested_str_weak(PRODUCT_ID), - /* K12 */ be_nested_str_weak(iterations), - /* K13 */ be_nested_str_weak(PBKDF_ITERATIONS), - /* K14 */ be_nested_str_weak(ipv4only), - /* K15 */ be_nested_str_weak(load_param), - /* K16 */ be_nested_str_weak(commissioning_instance_wifi), - /* K17 */ be_nested_str_weak(random), - /* K18 */ be_nested_str_weak(tohex), - /* K19 */ be_nested_str_weak(commissioning_instance_eth), - /* K20 */ be_nested_str_weak(sessions), - /* K21 */ be_nested_str_weak(Session_Store), - /* K22 */ be_nested_str_weak(load), - /* K23 */ be_nested_str_weak(message_handler), - /* K24 */ be_nested_str_weak(MessageHandler), - /* K25 */ be_nested_str_weak(ui), - /* K26 */ be_nested_str_weak(push), - /* K27 */ be_nested_str_weak(Plugin_Root), - /* K28 */ be_nested_str_weak(Plugin_OnOff), - /* K29 */ be_nested_str_weak(start_mdns_announce_hostnames), - /* K30 */ be_nested_str_weak(wifi), - /* K31 */ be_nested_str_weak(up), - /* K32 */ be_nested_str_weak(start_udp), - /* K33 */ be_nested_str_weak(UDP_PORT), - /* K34 */ be_nested_str_weak(add_rule), - /* K35 */ be_nested_str_weak(Wifi_X23Connected), - /* K36 */ be_nested_str_weak(eth), - /* K37 */ be_nested_str_weak(Eth_X23Connected), - /* K38 */ be_nested_str_weak(start_basic_commissioning), - /* K39 */ be_nested_str_weak(add_driver), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[109]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0xB80E0400, // 0002 GETNGBL R3 K2 - 0x8C0C0703, // 0003 GETMET R3 R3 K3 - 0xB8160800, // 0004 GETNGBL R5 K4 - 0x88140B05, // 0005 GETMBR R5 R5 K5 - 0x7C0C0400, // 0006 CALL R3 2 - 0x740E0004, // 0007 JMPT R3 #000D - 0xB80E0800, // 0008 GETNGBL R3 K4 - 0x8C0C0706, // 0009 GETMET R3 R3 K6 - 0x5C140000, // 000A MOVE R5 R0 - 0x7C0C0400, // 000B CALL R3 2 - 0x80000600, // 000C RET 0 - 0x600C0012, // 000D GETGBL R3 G18 - 0x7C0C0000, // 000E CALL R3 0 - 0x90020E03, // 000F SETMBR R0 K7 R3 - 0x880C0109, // 0010 GETMBR R3 R0 K9 - 0x90021003, // 0011 SETMBR R0 K8 R3 - 0x880C010B, // 0012 GETMBR R3 R0 K11 - 0x90021403, // 0013 SETMBR R0 K10 R3 - 0x880C010D, // 0014 GETMBR R3 R0 K13 - 0x90021803, // 0015 SETMBR R0 K12 R3 - 0x500C0000, // 0016 LDBOOL R3 0 0 - 0x90021C03, // 0017 SETMBR R0 K14 R3 - 0x8C0C010F, // 0018 GETMET R3 R0 K15 - 0x7C0C0200, // 0019 CALL R3 1 - 0x8C0C0311, // 001A GETMET R3 R1 K17 - 0x54160007, // 001B LDINT R5 8 - 0x7C0C0400, // 001C CALL R3 2 - 0x8C0C0712, // 001D GETMET R3 R3 K18 - 0x7C0C0200, // 001E CALL R3 1 - 0x90022003, // 001F SETMBR R0 K16 R3 - 0x8C0C0311, // 0020 GETMET R3 R1 K17 - 0x54160007, // 0021 LDINT R5 8 - 0x7C0C0400, // 0022 CALL R3 2 - 0x8C0C0712, // 0023 GETMET R3 R3 K18 - 0x7C0C0200, // 0024 CALL R3 1 - 0x90022603, // 0025 SETMBR R0 K19 R3 - 0xB80E0800, // 0026 GETNGBL R3 K4 - 0x8C0C0715, // 0027 GETMET R3 R3 K21 - 0x7C0C0200, // 0028 CALL R3 1 - 0x90022803, // 0029 SETMBR R0 K20 R3 - 0x880C0114, // 002A GETMBR R3 R0 K20 - 0x8C0C0716, // 002B GETMET R3 R3 K22 - 0x7C0C0200, // 002C CALL R3 1 - 0xB80E0800, // 002D GETNGBL R3 K4 - 0x8C0C0718, // 002E GETMET R3 R3 K24 - 0x5C140000, // 002F MOVE R5 R0 - 0x7C0C0400, // 0030 CALL R3 2 - 0x90022E03, // 0031 SETMBR R0 K23 R3 - 0xB80E0800, // 0032 GETNGBL R3 K4 - 0x8C0C0706, // 0033 GETMET R3 R3 K6 - 0x5C140000, // 0034 MOVE R5 R0 - 0x7C0C0400, // 0035 CALL R3 2 - 0x90023203, // 0036 SETMBR R0 K25 R3 - 0x880C0107, // 0037 GETMBR R3 R0 K7 - 0x8C0C071A, // 0038 GETMET R3 R3 K26 - 0xB8160800, // 0039 GETNGBL R5 K4 - 0x8C140B1B, // 003A GETMET R5 R5 K27 - 0x5C1C0000, // 003B MOVE R7 R0 - 0x7C140400, // 003C CALL R5 2 - 0x7C0C0400, // 003D CALL R3 2 - 0x880C0107, // 003E GETMBR R3 R0 K7 - 0x8C0C071A, // 003F GETMET R3 R3 K26 - 0xB8160800, // 0040 GETNGBL R5 K4 - 0x8C140B1C, // 0041 GETMET R5 R5 K28 - 0x5C1C0000, // 0042 MOVE R7 R0 - 0x7C140400, // 0043 CALL R5 2 - 0x7C0C0400, // 0044 CALL R3 2 - 0x8C0C011D, // 0045 GETMET R3 R0 K29 - 0x7C0C0200, // 0046 CALL R3 1 - 0xB80E0400, // 0047 GETNGBL R3 K2 - 0x8C0C071E, // 0048 GETMET R3 R3 K30 - 0x7C0C0200, // 0049 CALL R3 1 - 0x940C071F, // 004A GETIDX R3 R3 K31 - 0x780E0003, // 004B JMPF R3 #0050 - 0x8C0C0120, // 004C GETMET R3 R0 K32 - 0x88140121, // 004D GETMBR R5 R0 K33 - 0x7C0C0400, // 004E CALL R3 2 - 0x70020005, // 004F JMP #0056 - 0xB80E0400, // 0050 GETNGBL R3 K2 - 0x8C0C0722, // 0051 GETMET R3 R3 K34 - 0x58140023, // 0052 LDCONST R5 K35 - 0x84180000, // 0053 CLOSURE R6 P0 - 0x5C1C0000, // 0054 MOVE R7 R0 - 0x7C0C0800, // 0055 CALL R3 4 - 0xB80E0400, // 0056 GETNGBL R3 K2 - 0x8C0C0724, // 0057 GETMET R3 R3 K36 - 0x7C0C0200, // 0058 CALL R3 1 - 0x940C071F, // 0059 GETIDX R3 R3 K31 - 0x780E0003, // 005A JMPF R3 #005F - 0x8C0C0120, // 005B GETMET R3 R0 K32 - 0x88140121, // 005C GETMBR R5 R0 K33 - 0x7C0C0400, // 005D CALL R3 2 - 0x70020005, // 005E JMP #0065 - 0xB80E0400, // 005F GETNGBL R3 K2 - 0x8C0C0722, // 0060 GETMET R3 R3 K34 - 0x58140025, // 0061 LDCONST R5 K37 - 0x84180001, // 0062 CLOSURE R6 P1 - 0x5C1C0000, // 0063 MOVE R7 R0 - 0x7C0C0800, // 0064 CALL R3 4 - 0x8C0C0126, // 0065 GETMET R3 R0 K38 - 0x7C0C0200, // 0066 CALL R3 1 - 0xB80E0400, // 0067 GETNGBL R3 K2 - 0x8C0C0727, // 0068 GETMET R3 R3 K39 - 0x5C140000, // 0069 MOVE R5 R0 - 0x7C0C0400, // 006A CALL R3 2 - 0xA0000000, // 006B CLOSE R0 - 0x80000000, // 006C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: finish_commissioning -********************************************************************/ -be_local_closure(Matter_Device_finish_commissioning, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(finish_commissioning), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: save_param -********************************************************************/ -be_local_closure(Matter_Device_save_param, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(dump), - /* K2 */ be_nested_str_weak(distinguish), - /* K3 */ be_nested_str_weak(discriminator), - /* K4 */ be_nested_str_weak(passcode), - /* K5 */ be_nested_str_weak(ipv4only), - /* K6 */ be_nested_str_weak(string), - /* K7 */ be_nested_str_weak(FILENAME), - /* K8 */ be_nested_str_weak(w), - /* K9 */ be_nested_str_weak(write), - /* K10 */ be_nested_str_weak(close), - /* K11 */ be_nested_str_weak(tasmota), - /* K12 */ be_nested_str_weak(log), - /* K13 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), - /* K14 */ be_nested_str_weak(_X7C), - /* K15 */ be_const_int(2), - }), - be_str_weak(save_param), - &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x60100013, // 0002 GETGBL R4 G19 - 0x7C100000, // 0003 CALL R4 0 - 0x88140103, // 0004 GETMBR R5 R0 K3 - 0x98120405, // 0005 SETIDX R4 K2 R5 - 0x88140104, // 0006 GETMBR R5 R0 K4 - 0x98120805, // 0007 SETIDX R4 K4 R5 - 0x88140105, // 0008 GETMBR R5 R0 K5 - 0x98120A05, // 0009 SETIDX R4 K5 R5 - 0x7C080400, // 000A CALL R2 2 - 0xA802000D, // 000B EXBLK 0 #001A - 0xA40E0C00, // 000C IMPORT R3 K6 - 0x60100011, // 000D GETGBL R4 G17 - 0x88140107, // 000E GETMBR R5 R0 K7 - 0x58180008, // 000F LDCONST R6 K8 - 0x7C100400, // 0010 CALL R4 2 - 0x8C140909, // 0011 GETMET R5 R4 K9 - 0x5C1C0400, // 0012 MOVE R7 R2 - 0x7C140400, // 0013 CALL R5 2 - 0x8C14090A, // 0014 GETMET R5 R4 K10 - 0x7C140200, // 0015 CALL R5 1 - 0xA8040001, // 0016 EXBLK 1 1 - 0x80040400, // 0017 RET 1 R2 - 0xA8040001, // 0018 EXBLK 1 1 - 0x70020011, // 0019 JMP #002C - 0xAC0C0002, // 001A CATCH R3 0 2 - 0x7002000E, // 001B JMP #002B - 0xB8161600, // 001C GETNGBL R5 K11 - 0x8C140B0C, // 001D GETMET R5 R5 K12 - 0x601C0008, // 001E GETGBL R7 G8 - 0x5C200600, // 001F MOVE R8 R3 - 0x7C1C0200, // 0020 CALL R7 1 - 0x001E1A07, // 0021 ADD R7 K13 R7 - 0x001C0F0E, // 0022 ADD R7 R7 K14 - 0x60200008, // 0023 GETGBL R8 G8 - 0x5C240800, // 0024 MOVE R9 R4 - 0x7C200200, // 0025 CALL R8 1 - 0x001C0E08, // 0026 ADD R7 R7 R8 - 0x5820000F, // 0027 LDCONST R8 K15 - 0x7C140600, // 0028 CALL R5 3 - 0x80040400, // 0029 RET 1 R2 - 0x70020000, // 002A JMP #002C - 0xB0080000, // 002B RAISE 2 R0 R0 - 0x80000000, // 002C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: mdns_announce_op_discovery -********************************************************************/ -be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ - be_nested_proto( - 15, /* nstack */ + 5, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -964,162 +624,18 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[29]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(get_deviceid), - /* K3 */ be_nested_str_weak(copy), - /* K4 */ be_nested_str_weak(reverse), - /* K5 */ be_nested_str_weak(get_fabric_compressed), - /* K6 */ be_nested_str_weak(tohex), - /* K7 */ be_nested_str_weak(_X2D), - /* K8 */ be_nested_str_weak(tasmota), - /* K9 */ be_nested_str_weak(log), - /* K10 */ be_nested_str_weak(MTR_X3A_X20Operational_X20Discovery_X20node_X20_X3D_X20), - /* K11 */ be_const_int(2), - /* K12 */ be_nested_str_weak(eth), - /* K13 */ be_nested_str_weak(find), - /* K14 */ be_nested_str_weak(up), - /* K15 */ be_nested_str_weak(format), - /* K16 */ be_nested_str_weak(MTR_X3A_X20adding_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), - /* K17 */ be_nested_str_weak(hostname_eth), - /* K18 */ be_const_int(3), - /* K19 */ be_nested_str_weak(add_service), - /* K20 */ be_nested_str_weak(_matter), - /* K21 */ be_nested_str_weak(_tcp), - /* K22 */ be_nested_str_weak(_I), - /* K23 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), - /* K24 */ be_nested_str_weak(add_subtype), - /* K25 */ be_nested_str_weak(wifi), - /* K26 */ be_nested_str_weak(hostname_wifi), - /* K27 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K28 */ be_nested_str_weak(_X7C), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(udp_server), + /* K1 */ be_nested_str_weak(packet_ack), }), - be_str_weak(mdns_announce_op_discovery), + be_str_weak(packet_ack), &be_const_str_solidified, - ( &(const binstruction[122]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0xA8020064, // 0002 EXBLK 0 #0068 - 0x8C100302, // 0003 GETMET R4 R1 K2 - 0x7C100200, // 0004 CALL R4 1 - 0x8C100903, // 0005 GETMET R4 R4 K3 - 0x7C100200, // 0006 CALL R4 1 - 0x8C100904, // 0007 GETMET R4 R4 K4 - 0x7C100200, // 0008 CALL R4 1 - 0x8C140305, // 0009 GETMET R5 R1 K5 - 0x7C140200, // 000A CALL R5 1 - 0x8C180B06, // 000B GETMET R6 R5 K6 - 0x7C180200, // 000C CALL R6 1 - 0x00180D07, // 000D ADD R6 R6 K7 - 0x8C1C0906, // 000E GETMET R7 R4 K6 - 0x7C1C0200, // 000F CALL R7 1 - 0x00180C07, // 0010 ADD R6 R6 R7 - 0xB81E1000, // 0011 GETNGBL R7 K8 - 0x8C1C0F09, // 0012 GETMET R7 R7 K9 - 0x00261406, // 0013 ADD R9 K10 R6 - 0x5828000B, // 0014 LDCONST R10 K11 - 0x7C1C0600, // 0015 CALL R7 3 - 0xB81E1000, // 0016 GETNGBL R7 K8 - 0x8C1C0F0C, // 0017 GETMET R7 R7 K12 - 0x7C1C0200, // 0018 CALL R7 1 - 0x8C1C0F0D, // 0019 GETMET R7 R7 K13 - 0x5824000E, // 001A LDCONST R9 K14 - 0x7C1C0400, // 001B CALL R7 2 - 0x781E0020, // 001C JMPF R7 #003E - 0xB81E1000, // 001D GETNGBL R7 K8 - 0x8C1C0F09, // 001E GETMET R7 R7 K9 - 0x8C24070F, // 001F GETMET R9 R3 K15 - 0x582C0010, // 0020 LDCONST R11 K16 - 0x5830000C, // 0021 LDCONST R12 K12 - 0x5C340C00, // 0022 MOVE R13 R6 - 0x88380111, // 0023 GETMBR R14 R0 K17 - 0x7C240A00, // 0024 CALL R9 5 - 0x58280012, // 0025 LDCONST R10 K18 - 0x7C1C0600, // 0026 CALL R7 3 - 0x8C1C0513, // 0027 GETMET R7 R2 K19 - 0x58240014, // 0028 LDCONST R9 K20 - 0x58280015, // 0029 LDCONST R10 K21 - 0x542E15A3, // 002A LDINT R11 5540 - 0x4C300000, // 002B LDNIL R12 - 0x5C340C00, // 002C MOVE R13 R6 - 0x88380111, // 002D GETMBR R14 R0 K17 - 0x7C1C0E00, // 002E CALL R7 7 - 0x8C1C0B06, // 002F GETMET R7 R5 K6 - 0x7C1C0200, // 0030 CALL R7 1 - 0x001E2C07, // 0031 ADD R7 K22 R7 - 0xB8221000, // 0032 GETNGBL R8 K8 - 0x8C201109, // 0033 GETMET R8 R8 K9 - 0x002A2E07, // 0034 ADD R10 K23 R7 - 0x582C0012, // 0035 LDCONST R11 K18 - 0x7C200600, // 0036 CALL R8 3 - 0x8C200518, // 0037 GETMET R8 R2 K24 - 0x58280014, // 0038 LDCONST R10 K20 - 0x582C0015, // 0039 LDCONST R11 K21 - 0x5C300C00, // 003A MOVE R12 R6 - 0x88340111, // 003B GETMBR R13 R0 K17 - 0x5C380E00, // 003C MOVE R14 R7 - 0x7C200C00, // 003D CALL R8 6 - 0xB81E1000, // 003E GETNGBL R7 K8 - 0x8C1C0F19, // 003F GETMET R7 R7 K25 - 0x7C1C0200, // 0040 CALL R7 1 - 0x8C1C0F0D, // 0041 GETMET R7 R7 K13 - 0x5824000E, // 0042 LDCONST R9 K14 - 0x7C1C0400, // 0043 CALL R7 2 - 0x781E0020, // 0044 JMPF R7 #0066 - 0xB81E1000, // 0045 GETNGBL R7 K8 - 0x8C1C0F09, // 0046 GETMET R7 R7 K9 - 0x8C24070F, // 0047 GETMET R9 R3 K15 - 0x582C0010, // 0048 LDCONST R11 K16 - 0x58300019, // 0049 LDCONST R12 K25 - 0x5C340C00, // 004A MOVE R13 R6 - 0x8838011A, // 004B GETMBR R14 R0 K26 - 0x7C240A00, // 004C CALL R9 5 - 0x58280012, // 004D LDCONST R10 K18 - 0x7C1C0600, // 004E CALL R7 3 - 0x8C1C0513, // 004F GETMET R7 R2 K19 - 0x58240014, // 0050 LDCONST R9 K20 - 0x58280015, // 0051 LDCONST R10 K21 - 0x542E15A3, // 0052 LDINT R11 5540 - 0x4C300000, // 0053 LDNIL R12 - 0x5C340C00, // 0054 MOVE R13 R6 - 0x8838011A, // 0055 GETMBR R14 R0 K26 - 0x7C1C0E00, // 0056 CALL R7 7 - 0x8C1C0B06, // 0057 GETMET R7 R5 K6 - 0x7C1C0200, // 0058 CALL R7 1 - 0x001E2C07, // 0059 ADD R7 K22 R7 - 0xB8221000, // 005A GETNGBL R8 K8 - 0x8C201109, // 005B GETMET R8 R8 K9 - 0x002A2E07, // 005C ADD R10 K23 R7 - 0x582C0012, // 005D LDCONST R11 K18 - 0x7C200600, // 005E CALL R8 3 - 0x8C200518, // 005F GETMET R8 R2 K24 - 0x58280014, // 0060 LDCONST R10 K20 - 0x582C0015, // 0061 LDCONST R11 K21 - 0x5C300C00, // 0062 MOVE R12 R6 - 0x8834011A, // 0063 GETMBR R13 R0 K26 - 0x5C380E00, // 0064 MOVE R14 R7 - 0x7C200C00, // 0065 CALL R8 6 - 0xA8040001, // 0066 EXBLK 1 1 - 0x70020010, // 0067 JMP #0079 - 0xAC100002, // 0068 CATCH R4 0 2 - 0x7002000D, // 0069 JMP #0078 - 0xB81A1000, // 006A GETNGBL R6 K8 - 0x8C180D09, // 006B GETMET R6 R6 K9 - 0x60200008, // 006C GETGBL R8 G8 - 0x5C240800, // 006D MOVE R9 R4 - 0x7C200200, // 006E CALL R8 1 - 0x00223608, // 006F ADD R8 K27 R8 - 0x0020111C, // 0070 ADD R8 R8 K28 - 0x60240008, // 0071 GETGBL R9 G8 - 0x5C280A00, // 0072 MOVE R10 R5 - 0x7C240200, // 0073 CALL R9 1 - 0x00201009, // 0074 ADD R8 R8 R9 - 0x5824000B, // 0075 LDCONST R9 K11 - 0x7C180600, // 0076 CALL R6 3 - 0x70020000, // 0077 JMP #0079 - 0xB0080000, // 0078 RAISE 2 R0 R0 - 0x80000000, // 0079 RET 0 + ( &(const binstruction[ 5]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 }) ) ); @@ -1127,9 +643,41 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ /******************************************************************** -** Solidified function: start_basic_commissioning +** Solidified function: stop ********************************************************************/ -be_local_closure(Matter_Device_start_basic_commissioning, /* name */ +be_local_closure(Matter_Device_stop, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(udp_server), + /* K1 */ be_nested_str_weak(stop), + }), + be_str_weak(stop), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060002, // 0001 JMPF R1 #0005 + 0x88040100, // 0002 GETMBR R1 R0 K0 + 0x8C040301, // 0003 GETMET R1 R1 K1 + 0x7C040200, // 0004 CALL R1 1 + 0x80000000, // 0005 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_Device_every_second, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -1139,519 +687,35 @@ be_local_closure(Matter_Device_start_basic_commissioning, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(compute_pbkdf), - /* K1 */ be_nested_str_weak(passcode), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(every_second), + /* K2 */ be_nested_str_weak(message_handler), + /* K3 */ be_nested_str_weak(commissioning_open), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(time_reached), }), - be_str_weak(start_basic_commissioning), + be_str_weak(every_second), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x7C040400, // 0002 CALL R1 2 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: compute_pbkdf -********************************************************************/ -be_local_closure(Matter_Device_compute_pbkdf, /* name */ - be_nested_proto( - 17, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[30]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(salt), - /* K3 */ be_nested_str_weak(random), - /* K4 */ be_nested_str_weak(add), - /* K5 */ be_nested_str_weak(PBKDF2_HMAC_SHA256), - /* K6 */ be_nested_str_weak(derive), - /* K7 */ be_nested_str_weak(iterations), - /* K8 */ be_const_int(0), - /* K9 */ be_nested_str_weak(w0), - /* K10 */ be_nested_str_weak(EC_P256), - /* K11 */ be_nested_str_weak(mod), - /* K12 */ be_nested_str_weak(w1), - /* K13 */ be_nested_str_weak(L), - /* K14 */ be_nested_str_weak(public_key), - /* K15 */ be_nested_str_weak(tasmota), - /* K16 */ be_nested_str_weak(log), - /* K17 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), - /* K18 */ be_nested_str_weak(MTR_X3A_X20salt_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K19 */ be_nested_str_weak(tohex), - /* K20 */ be_nested_str_weak(MTR_X3A_X20passcode_hex_X20_X20_X3D_X20), - /* K21 */ be_nested_str_weak(MTR_X3A_X20w0_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K22 */ be_nested_str_weak(MTR_X3A_X20w1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K23 */ be_nested_str_weak(MTR_X3A_X20L_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K24 */ be_nested_str_weak(compute_manual_pairing_code), - /* K25 */ be_nested_str_weak(format), - /* K26 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s), - /* K27 */ be_const_int(3), - /* K28 */ be_const_int(2147483647), - /* K29 */ be_const_int(2), - }), - be_str_weak(compute_pbkdf), - &be_const_str_solidified, - ( &(const binstruction[113]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0x8C100503, // 0002 GETMET R4 R2 K3 - 0x541A000F, // 0003 LDINT R6 16 - 0x7C100400, // 0004 CALL R4 2 - 0x90020404, // 0005 SETMBR R0 K2 R4 - 0x60100015, // 0006 GETGBL R4 G21 - 0x7C100000, // 0007 CALL R4 0 - 0x8C100904, // 0008 GETMET R4 R4 K4 - 0x5C180200, // 0009 MOVE R6 R1 - 0x541E0003, // 000A LDINT R7 4 - 0x7C100600, // 000B CALL R4 3 - 0x8C140505, // 000C GETMET R5 R2 K5 - 0x7C140200, // 000D CALL R5 1 - 0x8C140B06, // 000E GETMET R5 R5 K6 - 0x5C1C0800, // 000F MOVE R7 R4 - 0x88200102, // 0010 GETMBR R8 R0 K2 - 0x88240107, // 0011 GETMBR R9 R0 K7 - 0x542A004F, // 0012 LDINT R10 80 - 0x7C140A00, // 0013 CALL R5 5 - 0x541A0026, // 0014 LDINT R6 39 - 0x401A1006, // 0015 CONNECT R6 K8 R6 - 0x94180A06, // 0016 GETIDX R6 R5 R6 - 0x541E0027, // 0017 LDINT R7 40 - 0x5422004E, // 0018 LDINT R8 79 - 0x401C0E08, // 0019 CONNECT R7 R7 R8 - 0x941C0A07, // 001A GETIDX R7 R5 R7 - 0x8C20050A, // 001B GETMET R8 R2 K10 - 0x7C200200, // 001C CALL R8 1 - 0x8C20110B, // 001D GETMET R8 R8 K11 - 0x5C280C00, // 001E MOVE R10 R6 - 0x7C200400, // 001F CALL R8 2 - 0x90021208, // 0020 SETMBR R0 K9 R8 - 0x8C20050A, // 0021 GETMET R8 R2 K10 - 0x7C200200, // 0022 CALL R8 1 - 0x8C20110B, // 0023 GETMET R8 R8 K11 - 0x5C280E00, // 0024 MOVE R10 R7 - 0x7C200400, // 0025 CALL R8 2 - 0x90021808, // 0026 SETMBR R0 K12 R8 - 0x8C20050A, // 0027 GETMET R8 R2 K10 - 0x7C200200, // 0028 CALL R8 1 - 0x8C20110E, // 0029 GETMET R8 R8 K14 - 0x8828010C, // 002A GETMBR R10 R0 K12 - 0x7C200400, // 002B CALL R8 2 - 0x90021A08, // 002C SETMBR R0 K13 R8 - 0xB8221E00, // 002D GETNGBL R8 K15 - 0x8C201110, // 002E GETMET R8 R8 K16 - 0x58280011, // 002F LDCONST R10 K17 - 0x542E0003, // 0030 LDINT R11 4 - 0x7C200600, // 0031 CALL R8 3 - 0xB8221E00, // 0032 GETNGBL R8 K15 - 0x8C201110, // 0033 GETMET R8 R8 K16 - 0x88280102, // 0034 GETMBR R10 R0 K2 - 0x8C281513, // 0035 GETMET R10 R10 K19 - 0x7C280200, // 0036 CALL R10 1 - 0x002A240A, // 0037 ADD R10 K18 R10 - 0x542E0003, // 0038 LDINT R11 4 - 0x7C200600, // 0039 CALL R8 3 - 0xB8221E00, // 003A GETNGBL R8 K15 - 0x8C201110, // 003B GETMET R8 R8 K16 - 0x8C280913, // 003C GETMET R10 R4 K19 - 0x7C280200, // 003D CALL R10 1 - 0x002A280A, // 003E ADD R10 K20 R10 - 0x542E0003, // 003F LDINT R11 4 - 0x7C200600, // 0040 CALL R8 3 - 0xB8221E00, // 0041 GETNGBL R8 K15 - 0x8C201110, // 0042 GETMET R8 R8 K16 - 0x88280109, // 0043 GETMBR R10 R0 K9 - 0x8C281513, // 0044 GETMET R10 R10 K19 - 0x7C280200, // 0045 CALL R10 1 - 0x002A2A0A, // 0046 ADD R10 K21 R10 - 0x542E0003, // 0047 LDINT R11 4 - 0x7C200600, // 0048 CALL R8 3 - 0xB8221E00, // 0049 GETNGBL R8 K15 - 0x8C201110, // 004A GETMET R8 R8 K16 - 0x8828010C, // 004B GETMBR R10 R0 K12 - 0x8C281513, // 004C GETMET R10 R10 K19 - 0x7C280200, // 004D CALL R10 1 - 0x002A2C0A, // 004E ADD R10 K22 R10 - 0x542E0003, // 004F LDINT R11 4 - 0x7C200600, // 0050 CALL R8 3 - 0xB8221E00, // 0051 GETNGBL R8 K15 - 0x8C201110, // 0052 GETMET R8 R8 K16 - 0x8828010D, // 0053 GETMBR R10 R0 K13 - 0x8C281513, // 0054 GETMET R10 R10 K19 - 0x7C280200, // 0055 CALL R10 1 - 0x002A2E0A, // 0056 ADD R10 K23 R10 - 0x542E0003, // 0057 LDINT R11 4 - 0x7C200600, // 0058 CALL R8 3 - 0xB8221E00, // 0059 GETNGBL R8 K15 - 0x8C201110, // 005A GETMET R8 R8 K16 - 0x58280011, // 005B LDCONST R10 K17 - 0x542E0003, // 005C LDINT R11 4 - 0x7C200600, // 005D CALL R8 3 - 0x8C200118, // 005E GETMET R8 R0 K24 - 0x7C200200, // 005F CALL R8 1 - 0xB8261E00, // 0060 GETNGBL R9 K15 - 0x8C241310, // 0061 GETMET R9 R9 K16 - 0x8C2C0719, // 0062 GETMET R11 R3 K25 - 0x5834001A, // 0063 LDCONST R13 K26 - 0x403A111B, // 0064 CONNECT R14 K8 K27 - 0x9438100E, // 0065 GETIDX R14 R8 R14 - 0x543E0003, // 0066 LDINT R15 4 - 0x54420005, // 0067 LDINT R16 6 - 0x403C1E10, // 0068 CONNECT R15 R15 R16 - 0x943C100F, // 0069 GETIDX R15 R8 R15 - 0x54420006, // 006A LDINT R16 7 - 0x4040211C, // 006B CONNECT R16 R16 K28 - 0x94401010, // 006C GETIDX R16 R8 R16 - 0x7C2C0A00, // 006D CALL R11 5 - 0x5830001D, // 006E LDCONST R12 K29 - 0x7C240600, // 006F CALL R9 3 - 0x80000000, // 0070 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: sort_distinct -********************************************************************/ -be_local_closure(Matter_Device_sort_distinct, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Device), - /* K1 */ be_const_int(1), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(stop_iteration), - /* K4 */ be_nested_str_weak(remove), - }), - be_str_weak(sort_distinct), - &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x60080010, // 0001 GETGBL R2 G16 - 0x600C000C, // 0002 GETGBL R3 G12 - 0x5C100000, // 0003 MOVE R4 R0 - 0x7C0C0200, // 0004 CALL R3 1 - 0x040C0701, // 0005 SUB R3 R3 K1 - 0x400E0203, // 0006 CONNECT R3 K1 R3 - 0x7C080200, // 0007 CALL R2 1 - 0xA8020010, // 0008 EXBLK 0 #001A - 0x5C0C0400, // 0009 MOVE R3 R2 - 0x7C0C0000, // 000A CALL R3 0 - 0x94100003, // 000B GETIDX R4 R0 R3 - 0x5C140600, // 000C MOVE R5 R3 - 0x24180B02, // 000D GT R6 R5 K2 - 0x781A0008, // 000E JMPF R6 #0018 - 0x04180B01, // 000F SUB R6 R5 K1 - 0x94180006, // 0010 GETIDX R6 R0 R6 - 0x24180C04, // 0011 GT R6 R6 R4 - 0x781A0004, // 0012 JMPF R6 #0018 - 0x04180B01, // 0013 SUB R6 R5 K1 - 0x94180006, // 0014 GETIDX R6 R0 R6 - 0x98000A06, // 0015 SETIDX R0 R5 R6 - 0x04140B01, // 0016 SUB R5 R5 K1 - 0x7001FFF4, // 0017 JMP #000D - 0x98000A04, // 0018 SETIDX R0 R5 R4 - 0x7001FFEE, // 0019 JMP #0009 - 0x58080003, // 001A LDCONST R2 K3 - 0xAC080200, // 001B CATCH R2 1 0 - 0xB0080000, // 001C RAISE 2 R0 R0 - 0x58080001, // 001D LDCONST R2 K1 - 0x600C000C, // 001E GETGBL R3 G12 - 0x5C100000, // 001F MOVE R4 R0 - 0x7C0C0200, // 0020 CALL R3 1 - 0x180C0701, // 0021 LE R3 R3 K1 - 0x780E0000, // 0022 JMPF R3 #0024 - 0x80040000, // 0023 RET 1 R0 - 0x940C0102, // 0024 GETIDX R3 R0 K2 - 0x6010000C, // 0025 GETGBL R4 G12 - 0x5C140000, // 0026 MOVE R5 R0 - 0x7C100200, // 0027 CALL R4 1 - 0x14100404, // 0028 LT R4 R2 R4 - 0x78120009, // 0029 JMPF R4 #0034 - 0x94100002, // 002A GETIDX R4 R0 R2 - 0x1C100803, // 002B EQ R4 R4 R3 - 0x78120003, // 002C JMPF R4 #0031 - 0x8C100104, // 002D GETMET R4 R0 K4 - 0x5C180400, // 002E MOVE R6 R2 - 0x7C100400, // 002F CALL R4 2 - 0x70020001, // 0030 JMP #0033 - 0x940C0002, // 0031 GETIDX R3 R0 R2 - 0x00080501, // 0032 ADD R2 R2 K1 - 0x7001FFF0, // 0033 JMP #0025 - 0x80040000, // 0034 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_mdns_announce_hostnames -********************************************************************/ -be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(_start_mdns_announce), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Wifi_X23Connected), - /* K4 */ be_nested_str_weak(matter_device_mdns), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x50080000, // 0002 LDBOOL R2 0 0 - 0x7C000400, // 0003 CALL R0 2 - 0xB8020200, // 0004 GETNGBL R0 K1 - 0x8C000102, // 0005 GETMET R0 R0 K2 - 0x58080003, // 0006 LDCONST R2 K3 - 0x580C0004, // 0007 LDCONST R3 K4 - 0x7C000600, // 0008 CALL R0 3 - 0x80000000, // 0009 RET 0 - }) - ), - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(_start_mdns_announce), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Eth_X23Connected), - /* K4 */ be_nested_str_weak(matter_device_mdns), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x50080200, // 0002 LDBOOL R2 1 0 - 0x7C000400, // 0003 CALL R0 2 - 0xB8020200, // 0004 GETNGBL R0 K1 - 0x8C000102, // 0005 GETMET R0 R0 K2 - 0x58080003, // 0006 LDCONST R2 K3 - 0x580C0004, // 0007 LDCONST R3 K4 - 0x7C000600, // 0008 CALL R0 3 - 0x80000000, // 0009 RET 0 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(wifi), - /* K2 */ be_nested_str_weak(up), - /* K3 */ be_nested_str_weak(_start_mdns_announce), - /* K4 */ be_nested_str_weak(add_rule), - /* K5 */ be_nested_str_weak(Wifi_X23Connected), - /* K6 */ be_nested_str_weak(eth), - /* K7 */ be_nested_str_weak(Eth_X23Connected), - }), - be_str_weak(start_mdns_announce_hostnames), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 + ( &(const binstruction[18]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x7C040200, // 0002 CALL R1 1 - 0x94040302, // 0003 GETIDX R1 R1 K2 - 0x78060003, // 0004 JMPF R1 #0009 - 0x8C040103, // 0005 GETMET R1 R0 K3 - 0x500C0000, // 0006 LDBOOL R3 0 0 - 0x7C040400, // 0007 CALL R1 2 - 0x70020005, // 0008 JMP #000F - 0xB8060000, // 0009 GETNGBL R1 K0 - 0x8C040304, // 000A GETMET R1 R1 K4 - 0x580C0005, // 000B LDCONST R3 K5 - 0x84100000, // 000C CLOSURE R4 P0 - 0x5C140000, // 000D MOVE R5 R0 - 0x7C040800, // 000E CALL R1 4 - 0xB8060000, // 000F GETNGBL R1 K0 - 0x8C040306, // 0010 GETMET R1 R1 K6 - 0x7C040200, // 0011 CALL R1 1 - 0x94040302, // 0012 GETIDX R1 R1 K2 - 0x78060003, // 0013 JMPF R1 #0018 - 0x8C040103, // 0014 GETMET R1 R0 K3 - 0x500C0200, // 0015 LDBOOL R3 1 0 - 0x7C040400, // 0016 CALL R1 2 - 0x70020005, // 0017 JMP #001E - 0xB8060000, // 0018 GETNGBL R1 K0 - 0x8C040304, // 0019 GETMET R1 R1 K4 - 0x580C0007, // 001A LDCONST R3 K7 - 0x84100001, // 001B CLOSURE R4 P1 - 0x5C140000, // 001C MOVE R5 R0 - 0x7C040800, // 001D CALL R1 4 - 0xA0000000, // 001E CLOSE R0 - 0x80000000, // 001F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_commissioning_complete_deferred -********************************************************************/ -be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 3, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 2]) { /* upvals */ - be_local_const_upval(1, 0), - be_local_const_upval(1, 1), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(start_commissioning_complete), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x68080001, // 0002 GETUPV R2 U1 - 0x7C000400, // 0003 CALL R0 2 - 0x80040000, // 0004 RET 1 R0 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(set_timer), - /* K2 */ be_const_int(0), - }), - be_str_weak(start_commissioning_complete_deferred), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x84140000, // 0003 CLOSURE R5 P0 - 0x7C080600, // 0004 CALL R2 3 - 0xA0000000, // 0005 CLOSE R0 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_operational_dicovery -********************************************************************/ -be_local_closure(Matter_Device_start_operational_dicovery, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(mdns), - /* K2 */ be_nested_str_weak(string), - /* K3 */ be_nested_str_weak(salt), - /* K4 */ be_nested_str_weak(w0), - /* K5 */ be_nested_str_weak(w1), - /* K6 */ be_nested_str_weak(L), - /* K7 */ be_nested_str_weak(set_no_expiration), - /* K8 */ be_nested_str_weak(set_persist), - /* K9 */ be_nested_str_weak(close), - /* K10 */ be_nested_str_weak(sessions), - /* K11 */ be_nested_str_weak(save), - /* K12 */ be_nested_str_weak(mdns_announce_op_discovery), - }), - be_str_weak(start_operational_dicovery), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0xA4120400, // 0002 IMPORT R4 K2 - 0x4C140000, // 0003 LDNIL R5 - 0x90020605, // 0004 SETMBR R0 K3 R5 - 0x4C140000, // 0005 LDNIL R5 - 0x90020805, // 0006 SETMBR R0 K4 R5 - 0x4C140000, // 0007 LDNIL R5 - 0x90020A05, // 0008 SETMBR R0 K5 R5 - 0x4C140000, // 0009 LDNIL R5 - 0x90020C05, // 000A SETMBR R0 K6 R5 - 0x8C140307, // 000B GETMET R5 R1 K7 - 0x7C140200, // 000C CALL R5 1 - 0x8C140308, // 000D GETMET R5 R1 K8 - 0x501C0200, // 000E LDBOOL R7 1 0 - 0x7C140400, // 000F CALL R5 2 - 0x8C140309, // 0010 GETMET R5 R1 K9 - 0x7C140200, // 0011 CALL R5 1 - 0x8814010A, // 0012 GETMBR R5 R0 K10 - 0x8C140B0B, // 0013 GETMET R5 R5 K11 - 0x7C140200, // 0014 CALL R5 1 - 0x8C14010C, // 0015 GETMET R5 R0 K12 - 0x5C1C0200, // 0016 MOVE R7 R1 - 0x7C140400, // 0017 CALL R5 2 - 0x80000000, // 0018 RET 0 + 0x88040102, // 0003 GETMBR R1 R0 K2 + 0x8C040301, // 0004 GETMET R1 R1 K1 + 0x7C040200, // 0005 CALL R1 1 + 0x88040103, // 0006 GETMBR R1 R0 K3 + 0x4C080000, // 0007 LDNIL R2 + 0x20040202, // 0008 NE R1 R1 R2 + 0x78060006, // 0009 JMPF R1 #0011 + 0xB8060800, // 000A GETNGBL R1 K4 + 0x8C040305, // 000B GETMET R1 R1 K5 + 0x880C0103, // 000C GETMBR R3 R0 K3 + 0x7C040400, // 000D CALL R1 2 + 0x78060001, // 000E JMPF R1 #0011 + 0x4C040000, // 000F LDNIL R1 + 0x90020601, // 0010 SETMBR R0 K3 R1 + 0x80000000, // 0011 RET 0 }) ) ); @@ -2071,60 +1135,9 @@ be_local_closure(Matter_Device_process_attribute_expansion, /* name */ /******************************************************************** -** Solidified function: attribute_updated +** Solidified function: is_commissioning_open ********************************************************************/ -be_local_closure(Matter_Device_attribute_updated, /* name */ - be_nested_proto( - 10, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(Path), - /* K2 */ be_nested_str_weak(endpoint), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(attribute), - /* K5 */ be_nested_str_weak(message_handler), - /* K6 */ be_nested_str_weak(im), - /* K7 */ be_nested_str_weak(subs), - /* K8 */ be_nested_str_weak(attribute_updated_ctx), - }), - be_str_weak(attribute_updated), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x1C140805, // 0001 EQ R5 R4 R5 - 0x78160000, // 0002 JMPF R5 #0004 - 0x50100000, // 0003 LDBOOL R4 0 0 - 0xB8160000, // 0004 GETNGBL R5 K0 - 0x8C140B01, // 0005 GETMET R5 R5 K1 - 0x7C140200, // 0006 CALL R5 1 - 0x90160401, // 0007 SETMBR R5 K2 R1 - 0x90160602, // 0008 SETMBR R5 K3 R2 - 0x90160803, // 0009 SETMBR R5 K4 R3 - 0x88180105, // 000A GETMBR R6 R0 K5 - 0x88180D06, // 000B GETMBR R6 R6 K6 - 0x88180D07, // 000C GETMBR R6 R6 K7 - 0x8C180D08, // 000D GETMET R6 R6 K8 - 0x5C200A00, // 000E MOVE R8 R5 - 0x5C240800, // 000F MOVE R9 R4 - 0x7C180600, // 0010 CALL R6 3 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Device_every_second, /* name */ +be_local_closure(Matter_Device_is_commissioning_open, /* name */ be_nested_proto( 3, /* nstack */ 1, /* argc */ @@ -2134,51 +1147,16 @@ be_local_closure(Matter_Device_every_second, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_nested_str_weak(every_second), - /* K2 */ be_nested_str_weak(message_handler), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(commissioning_open), }), - be_str_weak(every_second), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x88040102, // 0003 GETMBR R1 R0 K2 - 0x8C040301, // 0004 GETMET R1 R1 K1 - 0x7C040200, // 0005 CALL R1 1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_250ms -********************************************************************/ -be_local_closure(Matter_Device_every_250ms, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(message_handler), - /* K1 */ be_nested_str_weak(every_250ms), - }), - be_str_weak(every_250ms), + be_str_weak(is_commissioning_open), &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80000000, // 0003 RET 0 + 0x4C080000, // 0001 LDNIL R2 + 0x20040202, // 0002 NE R1 R1 R2 + 0x80040200, // 0003 RET 1 R1 }) ) ); @@ -2186,9 +1164,9 @@ be_local_closure(Matter_Device_every_250ms, /* name */ /******************************************************************** -** Solidified function: start_operational_dicovery_deferred +** Solidified function: start_commissioning_complete_deferred ********************************************************************/ -be_local_closure(Matter_Device_start_operational_dicovery_deferred, /* name */ +be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */ be_nested_proto( 6, /* nstack */ 2, /* argc */ @@ -2210,7 +1188,7 @@ be_local_closure(Matter_Device_start_operational_dicovery_deferred, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(start_operational_dicovery), + /* K0 */ be_nested_str_weak(start_commissioning_complete), }), be_str_weak(_X3Clambda_X3E), &be_const_str_solidified, @@ -2229,7 +1207,7 @@ be_local_closure(Matter_Device_start_operational_dicovery_deferred, /* name */ /* K1 */ be_nested_str_weak(set_timer), /* K2 */ be_const_int(0), }), - be_str_weak(start_operational_dicovery_deferred), + be_str_weak(start_commissioning_complete_deferred), &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0xB80A0000, // 0000 GETNGBL R2 K0 @@ -2245,211 +1223,6 @@ be_local_closure(Matter_Device_start_operational_dicovery_deferred, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: start_commissioning_complete -********************************************************************/ -be_local_closure(Matter_Device_start_commissioning_complete, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A), - /* K3 */ be_const_int(2), - }), - be_str_weak(start_commissioning_complete), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x58140003, // 0003 LDCONST R5 K3 - 0x7C080600, // 0004 CALL R2 3 - 0x80000000, // 0005 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: compute_manual_pairing_code -********************************************************************/ -be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */ - be_nested_proto( - 11, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(discriminator), - /* K2 */ be_nested_str_weak(passcode), - /* K3 */ be_nested_str_weak(format), - /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i), - /* K5 */ be_nested_str_weak(matter), - /* K6 */ be_nested_str_weak(Verhoeff), - /* K7 */ be_nested_str_weak(checksum), - }), - be_str_weak(compute_manual_pairing_code), - &be_const_str_solidified, - ( &(const binstruction[31]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x540E0FFE, // 0002 LDINT R3 4095 - 0x2C080403, // 0003 AND R2 R2 R3 - 0x540E0009, // 0004 LDINT R3 10 - 0x3C080403, // 0005 SHR R2 R2 R3 - 0x880C0101, // 0006 GETMBR R3 R0 K1 - 0x541202FF, // 0007 LDINT R4 768 - 0x2C0C0604, // 0008 AND R3 R3 R4 - 0x54120005, // 0009 LDINT R4 6 - 0x380C0604, // 000A SHL R3 R3 R4 - 0x88100102, // 000B GETMBR R4 R0 K2 - 0x54163FFE, // 000C LDINT R5 16383 - 0x2C100805, // 000D AND R4 R4 R5 - 0x300C0604, // 000E OR R3 R3 R4 - 0x88100102, // 000F GETMBR R4 R0 K2 - 0x5416000D, // 0010 LDINT R5 14 - 0x3C100805, // 0011 SHR R4 R4 R5 - 0x8C140303, // 0012 GETMET R5 R1 K3 - 0x581C0004, // 0013 LDCONST R7 K4 - 0x5C200400, // 0014 MOVE R8 R2 - 0x5C240600, // 0015 MOVE R9 R3 - 0x5C280800, // 0016 MOVE R10 R4 - 0x7C140A00, // 0017 CALL R5 5 - 0xB81A0A00, // 0018 GETNGBL R6 K5 - 0x88180D06, // 0019 GETMBR R6 R6 K6 - 0x8C180D07, // 001A GETMET R6 R6 K7 - 0x5C200A00, // 001B MOVE R8 R5 - 0x7C180400, // 001C CALL R6 2 - 0x00140A06, // 001D ADD R5 R5 R6 - 0x80040A00, // 001E RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: stop -********************************************************************/ -be_local_closure(Matter_Device_stop, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(stop), - }), - be_str_weak(stop), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060002, // 0001 JMPF R1 #0005 - 0x88040100, // 0002 GETMBR R1 R0 K0 - 0x8C040301, // 0003 GETMET R1 R1 K1 - 0x7C040200, // 0004 CALL R1 1 - 0x80000000, // 0005 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: compute_qrcode_content -********************************************************************/ -be_local_closure(Matter_Device_compute_qrcode_content, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(resize), - /* K1 */ be_nested_str_weak(setbits), - /* K2 */ be_const_int(3), - /* K3 */ be_nested_str_weak(vendorid), - /* K4 */ be_nested_str_weak(productid), - /* K5 */ be_nested_str_weak(discriminator), - /* K6 */ be_nested_str_weak(passcode), - /* K7 */ be_const_int(134217727), - /* K8 */ be_nested_str_weak(MT_X3A), - /* K9 */ be_nested_str_weak(matter), - /* K10 */ be_nested_str_weak(Base38), - /* K11 */ be_nested_str_weak(encode), - }), - be_str_weak(compute_qrcode_content), - &be_const_str_solidified, - ( &(const binstruction[40]) { /* code */ - 0x60040015, // 0000 GETGBL R1 G21 - 0x7C040000, // 0001 CALL R1 0 - 0x8C040300, // 0002 GETMET R1 R1 K0 - 0x540E000A, // 0003 LDINT R3 11 - 0x7C040400, // 0004 CALL R1 2 - 0x8C080301, // 0005 GETMET R2 R1 K1 - 0x58100002, // 0006 LDCONST R4 K2 - 0x5416000F, // 0007 LDINT R5 16 - 0x88180103, // 0008 GETMBR R6 R0 K3 - 0x7C080800, // 0009 CALL R2 4 - 0x8C080301, // 000A GETMET R2 R1 K1 - 0x54120012, // 000B LDINT R4 19 - 0x5416000F, // 000C LDINT R5 16 - 0x88180104, // 000D GETMBR R6 R0 K4 - 0x7C080800, // 000E CALL R2 4 - 0x8C080301, // 000F GETMET R2 R1 K1 - 0x54120024, // 0010 LDINT R4 37 - 0x54160007, // 0011 LDINT R5 8 - 0x541A0003, // 0012 LDINT R6 4 - 0x7C080800, // 0013 CALL R2 4 - 0x8C080301, // 0014 GETMET R2 R1 K1 - 0x5412002C, // 0015 LDINT R4 45 - 0x5416000B, // 0016 LDINT R5 12 - 0x88180105, // 0017 GETMBR R6 R0 K5 - 0x541E0FFE, // 0018 LDINT R7 4095 - 0x2C180C07, // 0019 AND R6 R6 R7 - 0x7C080800, // 001A CALL R2 4 - 0x8C080301, // 001B GETMET R2 R1 K1 - 0x54120038, // 001C LDINT R4 57 - 0x5416001A, // 001D LDINT R5 27 - 0x88180106, // 001E GETMBR R6 R0 K6 - 0x2C180D07, // 001F AND R6 R6 K7 - 0x7C080800, // 0020 CALL R2 4 - 0xB80A1200, // 0021 GETNGBL R2 K9 - 0x8808050A, // 0022 GETMBR R2 R2 K10 - 0x8C08050B, // 0023 GETMET R2 R2 K11 - 0x5C100200, // 0024 MOVE R4 R1 - 0x7C080400, // 0025 CALL R2 2 - 0x000A1002, // 0026 ADD R2 K8 R2 - 0x80040400, // 0027 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: load_param ********************************************************************/ @@ -2577,49 +1350,59 @@ be_local_closure(Matter_Device_load_param, /* name */ /******************************************************************** -** Solidified function: mdns_announce_op_discovery_all_sessions +** Solidified function: start_operational_discovery_deferred ********************************************************************/ -be_local_closure(Matter_Device_mdns_announce_op_discovery_all_sessions, /* name */ +be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */ be_nested_proto( 6, /* nstack */ - 1, /* argc */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_nested_str_weak(get_deviceid), - /* K2 */ be_nested_str_weak(get_fabric), - /* K3 */ be_nested_str_weak(mdns_announce_op_discovery), - /* K4 */ be_nested_str_weak(stop_iteration), + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 3, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 2]) { /* upvals */ + be_local_const_upval(1, 0), + be_local_const_upval(1, 1), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(start_operational_discovery), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x68080001, // 0002 GETUPV R2 U1 + 0x7C000400, // 0003 CALL R0 2 + 0x80040000, // 0004 RET 1 R0 + }) + ), }), - be_str_weak(mdns_announce_op_discovery_all_sessions), + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(set_timer), + /* K2 */ be_const_int(0), + }), + be_str_weak(start_operational_discovery_deferred), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x60040010, // 0000 GETGBL R1 G16 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x88080500, // 0002 GETMBR R2 R2 K0 - 0x7C040200, // 0003 CALL R1 1 - 0xA802000B, // 0004 EXBLK 0 #0011 - 0x5C080200, // 0005 MOVE R2 R1 - 0x7C080000, // 0006 CALL R2 0 - 0x8C0C0501, // 0007 GETMET R3 R2 K1 - 0x7C0C0200, // 0008 CALL R3 1 - 0x780E0005, // 0009 JMPF R3 #0010 - 0x8C0C0502, // 000A GETMET R3 R2 K2 - 0x7C0C0200, // 000B CALL R3 1 - 0x780E0002, // 000C JMPF R3 #0010 - 0x8C0C0103, // 000D GETMET R3 R0 K3 - 0x5C140400, // 000E MOVE R5 R2 - 0x7C0C0400, // 000F CALL R3 2 - 0x7001FFF3, // 0010 JMP #0005 - 0x58040004, // 0011 LDCONST R1 K4 - 0xAC040200, // 0012 CATCH R1 1 0 - 0xB0080000, // 0013 RAISE 2 R0 R0 - 0x80000000, // 0014 RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x84140000, // 0003 CLOSURE R5 P0 + 0x7C080600, // 0004 CALL R2 3 + 0xA0000000, // 0005 CLOSE R0 + 0x80000000, // 0006 RET 0 }) ) ); @@ -2660,6 +1443,436 @@ be_local_closure(Matter_Device_msg_send, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Device_invoke_request, /* name */ + be_nested_proto( + 11, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(plugins), + /* K2 */ be_nested_str_weak(invoke_request), + /* K3 */ be_nested_str_weak(status), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(UNSUPPORTED_COMMAND), + /* K6 */ be_const_int(1), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x58100000, // 0000 LDCONST R4 K0 + 0x6014000C, // 0001 GETGBL R5 G12 + 0x88180101, // 0002 GETMBR R6 R0 K1 + 0x7C140200, // 0003 CALL R5 1 + 0x14140805, // 0004 LT R5 R4 R5 + 0x78160011, // 0005 JMPF R5 #0018 + 0x88140101, // 0006 GETMBR R5 R0 K1 + 0x94140A04, // 0007 GETIDX R5 R5 R4 + 0x8C180B02, // 0008 GETMET R6 R5 K2 + 0x5C200200, // 0009 MOVE R8 R1 + 0x5C240400, // 000A MOVE R9 R2 + 0x5C280600, // 000B MOVE R10 R3 + 0x7C180800, // 000C CALL R6 4 + 0x4C1C0000, // 000D LDNIL R7 + 0x201C0C07, // 000E NE R7 R6 R7 + 0x741E0004, // 000F JMPT R7 #0015 + 0x881C0703, // 0010 GETMBR R7 R3 K3 + 0xB8220800, // 0011 GETNGBL R8 K4 + 0x88201105, // 0012 GETMBR R8 R8 K5 + 0x201C0E08, // 0013 NE R7 R7 R8 + 0x781E0000, // 0014 JMPF R7 #0016 + 0x80040C00, // 0015 RET 1 R6 + 0x00100906, // 0016 ADD R4 R4 K6 + 0x7001FFE8, // 0017 JMP #0001 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init_basic_commissioning +********************************************************************/ +be_local_closure(Matter_Device_init_basic_commissioning, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(compute_pbkdf), + /* K1 */ be_nested_str_weak(passcode), + /* K2 */ be_nested_str_weak(sessions), + /* K3 */ be_nested_str_weak(fabrics), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(start_basic_commissioning), + }), + be_str_weak(init_basic_commissioning), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x7C040400, // 0002 CALL R1 2 + 0x6004000C, // 0003 GETGBL R1 G12 + 0x88080102, // 0004 GETMBR R2 R0 K2 + 0x88080503, // 0005 GETMBR R2 R2 K3 + 0x7C040200, // 0006 CALL R1 1 + 0x1C040304, // 0007 EQ R1 R1 K4 + 0x78060001, // 0008 JMPF R1 #000B + 0x8C040105, // 0009 GETMET R1 R0 K5 + 0x7C040200, // 000A CALL R1 1 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: attribute_updated +********************************************************************/ +be_local_closure(Matter_Device_attribute_updated, /* name */ + be_nested_proto( + 10, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(Path), + /* K2 */ be_nested_str_weak(endpoint), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(message_handler), + /* K6 */ be_nested_str_weak(im), + /* K7 */ be_nested_str_weak(subs), + /* K8 */ be_nested_str_weak(attribute_updated_ctx), + }), + be_str_weak(attribute_updated), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x1C140805, // 0001 EQ R5 R4 R5 + 0x78160000, // 0002 JMPF R5 #0004 + 0x50100000, // 0003 LDBOOL R4 0 0 + 0xB8160000, // 0004 GETNGBL R5 K0 + 0x8C140B01, // 0005 GETMET R5 R5 K1 + 0x7C140200, // 0006 CALL R5 1 + 0x90160401, // 0007 SETMBR R5 K2 R1 + 0x90160602, // 0008 SETMBR R5 K3 R2 + 0x90160803, // 0009 SETMBR R5 K4 R3 + 0x88180105, // 000A GETMBR R6 R0 K5 + 0x88180D06, // 000B GETMBR R6 R6 K6 + 0x88180D07, // 000C GETMBR R6 R6 K7 + 0x8C180D08, // 000D GETMET R6 R6 K8 + 0x5C200A00, // 000E MOVE R8 R5 + 0x5C240800, // 000F MOVE R9 R4 + 0x7C180600, // 0010 CALL R6 3 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_250ms +********************************************************************/ +be_local_closure(Matter_Device_every_250ms, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(message_handler), + /* K1 */ be_nested_str_weak(every_250ms), + }), + be_str_weak(every_250ms), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: compute_qrcode_content +********************************************************************/ +be_local_closure(Matter_Device_compute_qrcode_content, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(resize), + /* K1 */ be_nested_str_weak(setbits), + /* K2 */ be_const_int(3), + /* K3 */ be_nested_str_weak(vendorid), + /* K4 */ be_nested_str_weak(productid), + /* K5 */ be_nested_str_weak(discriminator), + /* K6 */ be_nested_str_weak(passcode), + /* K7 */ be_const_int(134217727), + /* K8 */ be_nested_str_weak(MT_X3A), + /* K9 */ be_nested_str_weak(matter), + /* K10 */ be_nested_str_weak(Base38), + /* K11 */ be_nested_str_weak(encode), + }), + be_str_weak(compute_qrcode_content), + &be_const_str_solidified, + ( &(const binstruction[40]) { /* code */ + 0x60040015, // 0000 GETGBL R1 G21 + 0x7C040000, // 0001 CALL R1 0 + 0x8C040300, // 0002 GETMET R1 R1 K0 + 0x540E000A, // 0003 LDINT R3 11 + 0x7C040400, // 0004 CALL R1 2 + 0x8C080301, // 0005 GETMET R2 R1 K1 + 0x58100002, // 0006 LDCONST R4 K2 + 0x5416000F, // 0007 LDINT R5 16 + 0x88180103, // 0008 GETMBR R6 R0 K3 + 0x7C080800, // 0009 CALL R2 4 + 0x8C080301, // 000A GETMET R2 R1 K1 + 0x54120012, // 000B LDINT R4 19 + 0x5416000F, // 000C LDINT R5 16 + 0x88180104, // 000D GETMBR R6 R0 K4 + 0x7C080800, // 000E CALL R2 4 + 0x8C080301, // 000F GETMET R2 R1 K1 + 0x54120024, // 0010 LDINT R4 37 + 0x54160007, // 0011 LDINT R5 8 + 0x541A0003, // 0012 LDINT R6 4 + 0x7C080800, // 0013 CALL R2 4 + 0x8C080301, // 0014 GETMET R2 R1 K1 + 0x5412002C, // 0015 LDINT R4 45 + 0x5416000B, // 0016 LDINT R5 12 + 0x88180105, // 0017 GETMBR R6 R0 K5 + 0x541E0FFE, // 0018 LDINT R7 4095 + 0x2C180C07, // 0019 AND R6 R6 R7 + 0x7C080800, // 001A CALL R2 4 + 0x8C080301, // 001B GETMET R2 R1 K1 + 0x54120038, // 001C LDINT R4 57 + 0x5416001A, // 001D LDINT R5 27 + 0x88180106, // 001E GETMBR R6 R0 K6 + 0x2C180D07, // 001F AND R6 R6 K7 + 0x7C080800, // 0020 CALL R2 4 + 0xB80A1200, // 0021 GETNGBL R2 K9 + 0x8808050A, // 0022 GETMBR R2 R2 K10 + 0x8C08050B, // 0023 GETMET R2 R2 K11 + 0x5C100200, // 0024 MOVE R4 R1 + 0x7C080400, // 0025 CALL R2 2 + 0x000A1002, // 0026 ADD R2 K8 R2 + 0x80040400, // 0027 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_announce_op_discovery +********************************************************************/ +be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ + be_nested_proto( + 15, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[29]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(get_device_id), + /* K3 */ be_nested_str_weak(copy), + /* K4 */ be_nested_str_weak(reverse), + /* K5 */ be_nested_str_weak(get_fabric_compressed), + /* K6 */ be_nested_str_weak(tohex), + /* K7 */ be_nested_str_weak(_X2D), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(log), + /* K10 */ be_nested_str_weak(MTR_X3A_X20Operational_X20Discovery_X20node_X20_X3D_X20), + /* K11 */ be_const_int(2), + /* K12 */ be_nested_str_weak(eth), + /* K13 */ be_nested_str_weak(find), + /* K14 */ be_nested_str_weak(up), + /* K15 */ be_nested_str_weak(format), + /* K16 */ be_nested_str_weak(MTR_X3A_X20adding_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), + /* K17 */ be_nested_str_weak(hostname_eth), + /* K18 */ be_const_int(3), + /* K19 */ be_nested_str_weak(add_service), + /* K20 */ be_nested_str_weak(_matter), + /* K21 */ be_nested_str_weak(_tcp), + /* K22 */ be_nested_str_weak(_I), + /* K23 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), + /* K24 */ be_nested_str_weak(add_subtype), + /* K25 */ be_nested_str_weak(wifi), + /* K26 */ be_nested_str_weak(hostname_wifi), + /* K27 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K28 */ be_nested_str_weak(_X7C), + }), + be_str_weak(mdns_announce_op_discovery), + &be_const_str_solidified, + ( &(const binstruction[122]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0xA8020064, // 0002 EXBLK 0 #0068 + 0x8C100302, // 0003 GETMET R4 R1 K2 + 0x7C100200, // 0004 CALL R4 1 + 0x8C100903, // 0005 GETMET R4 R4 K3 + 0x7C100200, // 0006 CALL R4 1 + 0x8C100904, // 0007 GETMET R4 R4 K4 + 0x7C100200, // 0008 CALL R4 1 + 0x8C140305, // 0009 GETMET R5 R1 K5 + 0x7C140200, // 000A CALL R5 1 + 0x8C180B06, // 000B GETMET R6 R5 K6 + 0x7C180200, // 000C CALL R6 1 + 0x00180D07, // 000D ADD R6 R6 K7 + 0x8C1C0906, // 000E GETMET R7 R4 K6 + 0x7C1C0200, // 000F CALL R7 1 + 0x00180C07, // 0010 ADD R6 R6 R7 + 0xB81E1000, // 0011 GETNGBL R7 K8 + 0x8C1C0F09, // 0012 GETMET R7 R7 K9 + 0x00261406, // 0013 ADD R9 K10 R6 + 0x5828000B, // 0014 LDCONST R10 K11 + 0x7C1C0600, // 0015 CALL R7 3 + 0xB81E1000, // 0016 GETNGBL R7 K8 + 0x8C1C0F0C, // 0017 GETMET R7 R7 K12 + 0x7C1C0200, // 0018 CALL R7 1 + 0x8C1C0F0D, // 0019 GETMET R7 R7 K13 + 0x5824000E, // 001A LDCONST R9 K14 + 0x7C1C0400, // 001B CALL R7 2 + 0x781E0020, // 001C JMPF R7 #003E + 0xB81E1000, // 001D GETNGBL R7 K8 + 0x8C1C0F09, // 001E GETMET R7 R7 K9 + 0x8C24070F, // 001F GETMET R9 R3 K15 + 0x582C0010, // 0020 LDCONST R11 K16 + 0x5830000C, // 0021 LDCONST R12 K12 + 0x5C340C00, // 0022 MOVE R13 R6 + 0x88380111, // 0023 GETMBR R14 R0 K17 + 0x7C240A00, // 0024 CALL R9 5 + 0x58280012, // 0025 LDCONST R10 K18 + 0x7C1C0600, // 0026 CALL R7 3 + 0x8C1C0513, // 0027 GETMET R7 R2 K19 + 0x58240014, // 0028 LDCONST R9 K20 + 0x58280015, // 0029 LDCONST R10 K21 + 0x542E15A3, // 002A LDINT R11 5540 + 0x4C300000, // 002B LDNIL R12 + 0x5C340C00, // 002C MOVE R13 R6 + 0x88380111, // 002D GETMBR R14 R0 K17 + 0x7C1C0E00, // 002E CALL R7 7 + 0x8C1C0B06, // 002F GETMET R7 R5 K6 + 0x7C1C0200, // 0030 CALL R7 1 + 0x001E2C07, // 0031 ADD R7 K22 R7 + 0xB8221000, // 0032 GETNGBL R8 K8 + 0x8C201109, // 0033 GETMET R8 R8 K9 + 0x002A2E07, // 0034 ADD R10 K23 R7 + 0x582C0012, // 0035 LDCONST R11 K18 + 0x7C200600, // 0036 CALL R8 3 + 0x8C200518, // 0037 GETMET R8 R2 K24 + 0x58280014, // 0038 LDCONST R10 K20 + 0x582C0015, // 0039 LDCONST R11 K21 + 0x5C300C00, // 003A MOVE R12 R6 + 0x88340111, // 003B GETMBR R13 R0 K17 + 0x5C380E00, // 003C MOVE R14 R7 + 0x7C200C00, // 003D CALL R8 6 + 0xB81E1000, // 003E GETNGBL R7 K8 + 0x8C1C0F19, // 003F GETMET R7 R7 K25 + 0x7C1C0200, // 0040 CALL R7 1 + 0x8C1C0F0D, // 0041 GETMET R7 R7 K13 + 0x5824000E, // 0042 LDCONST R9 K14 + 0x7C1C0400, // 0043 CALL R7 2 + 0x781E0020, // 0044 JMPF R7 #0066 + 0xB81E1000, // 0045 GETNGBL R7 K8 + 0x8C1C0F09, // 0046 GETMET R7 R7 K9 + 0x8C24070F, // 0047 GETMET R9 R3 K15 + 0x582C0010, // 0048 LDCONST R11 K16 + 0x58300019, // 0049 LDCONST R12 K25 + 0x5C340C00, // 004A MOVE R13 R6 + 0x8838011A, // 004B GETMBR R14 R0 K26 + 0x7C240A00, // 004C CALL R9 5 + 0x58280012, // 004D LDCONST R10 K18 + 0x7C1C0600, // 004E CALL R7 3 + 0x8C1C0513, // 004F GETMET R7 R2 K19 + 0x58240014, // 0050 LDCONST R9 K20 + 0x58280015, // 0051 LDCONST R10 K21 + 0x542E15A3, // 0052 LDINT R11 5540 + 0x4C300000, // 0053 LDNIL R12 + 0x5C340C00, // 0054 MOVE R13 R6 + 0x8838011A, // 0055 GETMBR R14 R0 K26 + 0x7C1C0E00, // 0056 CALL R7 7 + 0x8C1C0B06, // 0057 GETMET R7 R5 K6 + 0x7C1C0200, // 0058 CALL R7 1 + 0x001E2C07, // 0059 ADD R7 K22 R7 + 0xB8221000, // 005A GETNGBL R8 K8 + 0x8C201109, // 005B GETMET R8 R8 K9 + 0x002A2E07, // 005C ADD R10 K23 R7 + 0x582C0012, // 005D LDCONST R11 K18 + 0x7C200600, // 005E CALL R8 3 + 0x8C200518, // 005F GETMET R8 R2 K24 + 0x58280014, // 0060 LDCONST R10 K20 + 0x582C0015, // 0061 LDCONST R11 K21 + 0x5C300C00, // 0062 MOVE R12 R6 + 0x8834011A, // 0063 GETMBR R13 R0 K26 + 0x5C380E00, // 0064 MOVE R14 R7 + 0x7C200C00, // 0065 CALL R8 6 + 0xA8040001, // 0066 EXBLK 1 1 + 0x70020010, // 0067 JMP #0079 + 0xAC100002, // 0068 CATCH R4 0 2 + 0x7002000D, // 0069 JMP #0078 + 0xB81A1000, // 006A GETNGBL R6 K8 + 0x8C180D09, // 006B GETMET R6 R6 K9 + 0x60200008, // 006C GETGBL R8 G8 + 0x5C240800, // 006D MOVE R9 R4 + 0x7C200200, // 006E CALL R8 1 + 0x00223608, // 006F ADD R8 K27 R8 + 0x0020111C, // 0070 ADD R8 R8 K28 + 0x60240008, // 0071 GETGBL R9 G8 + 0x5C280A00, // 0072 MOVE R10 R5 + 0x7C240200, // 0073 CALL R9 1 + 0x00201009, // 0074 ADD R8 R8 R9 + 0x5824000B, // 0075 LDCONST R9 K11 + 0x7C180600, // 0076 CALL R6 3 + 0x70020000, // 0077 JMP #0079 + 0xB0080000, // 0078 RAISE 2 R0 R0 + 0x80000000, // 0079 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: get_active_endpoints ********************************************************************/ @@ -2728,67 +1941,971 @@ be_local_closure(Matter_Device_get_active_endpoints, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: sort_distinct +********************************************************************/ +be_local_closure(Matter_Device_sort_distinct, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Device), + /* K1 */ be_const_int(1), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(stop_iteration), + /* K4 */ be_nested_str_weak(remove), + }), + be_str_weak(sort_distinct), + &be_const_str_solidified, + ( &(const binstruction[53]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x60080010, // 0001 GETGBL R2 G16 + 0x600C000C, // 0002 GETGBL R3 G12 + 0x5C100000, // 0003 MOVE R4 R0 + 0x7C0C0200, // 0004 CALL R3 1 + 0x040C0701, // 0005 SUB R3 R3 K1 + 0x400E0203, // 0006 CONNECT R3 K1 R3 + 0x7C080200, // 0007 CALL R2 1 + 0xA8020010, // 0008 EXBLK 0 #001A + 0x5C0C0400, // 0009 MOVE R3 R2 + 0x7C0C0000, // 000A CALL R3 0 + 0x94100003, // 000B GETIDX R4 R0 R3 + 0x5C140600, // 000C MOVE R5 R3 + 0x24180B02, // 000D GT R6 R5 K2 + 0x781A0008, // 000E JMPF R6 #0018 + 0x04180B01, // 000F SUB R6 R5 K1 + 0x94180006, // 0010 GETIDX R6 R0 R6 + 0x24180C04, // 0011 GT R6 R6 R4 + 0x781A0004, // 0012 JMPF R6 #0018 + 0x04180B01, // 0013 SUB R6 R5 K1 + 0x94180006, // 0014 GETIDX R6 R0 R6 + 0x98000A06, // 0015 SETIDX R0 R5 R6 + 0x04140B01, // 0016 SUB R5 R5 K1 + 0x7001FFF4, // 0017 JMP #000D + 0x98000A04, // 0018 SETIDX R0 R5 R4 + 0x7001FFEE, // 0019 JMP #0009 + 0x58080003, // 001A LDCONST R2 K3 + 0xAC080200, // 001B CATCH R2 1 0 + 0xB0080000, // 001C RAISE 2 R0 R0 + 0x58080001, // 001D LDCONST R2 K1 + 0x600C000C, // 001E GETGBL R3 G12 + 0x5C100000, // 001F MOVE R4 R0 + 0x7C0C0200, // 0020 CALL R3 1 + 0x180C0701, // 0021 LE R3 R3 K1 + 0x780E0000, // 0022 JMPF R3 #0024 + 0x80040000, // 0023 RET 1 R0 + 0x940C0102, // 0024 GETIDX R3 R0 K2 + 0x6010000C, // 0025 GETGBL R4 G12 + 0x5C140000, // 0026 MOVE R5 R0 + 0x7C100200, // 0027 CALL R4 1 + 0x14100404, // 0028 LT R4 R2 R4 + 0x78120009, // 0029 JMPF R4 #0034 + 0x94100002, // 002A GETIDX R4 R0 R2 + 0x1C100803, // 002B EQ R4 R4 R3 + 0x78120003, // 002C JMPF R4 #0031 + 0x8C100104, // 002D GETMET R4 R0 K4 + 0x5C180400, // 002E MOVE R6 R2 + 0x7C100400, // 002F CALL R4 2 + 0x70020001, // 0030 JMP #0033 + 0x940C0002, // 0031 GETIDX R3 R0 R2 + 0x00080501, // 0032 ADD R2 R2 K1 + 0x7001FFF0, // 0033 JMP #0025 + 0x80040000, // 0034 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: finish_commissioning +********************************************************************/ +be_local_closure(Matter_Device_finish_commissioning, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(finish_commissioning), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_basic_commissioning +********************************************************************/ +be_local_closure(Matter_Device_start_basic_commissioning, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(commissioning_open), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(millis), + }), + be_str_weak(start_basic_commissioning), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0xB8060200, // 0000 GETNGBL R1 K1 + 0x8C040302, // 0001 GETMET R1 R1 K2 + 0x7C040200, // 0002 CALL R1 1 + 0x540A0004, // 0003 LDINT R2 5 + 0x540E003B, // 0004 LDINT R3 60 + 0x08080403, // 0005 MUL R2 R2 R3 + 0x540E03E7, // 0006 LDINT R3 1000 + 0x08080403, // 0007 MUL R2 R2 R3 + 0x00040202, // 0008 ADD R1 R1 R2 + 0x90020001, // 0009 SETMBR R0 K0 R1 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_mdns_announce_hostnames +********************************************************************/ +be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 4, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_start_mdns_announce), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(remove_rule), + /* K3 */ be_nested_str_weak(Wifi_X23Connected), + /* K4 */ be_nested_str_weak(matter_device_mdns), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x50080000, // 0002 LDBOOL R2 0 0 + 0x7C000400, // 0003 CALL R0 2 + 0xB8020200, // 0004 GETNGBL R0 K1 + 0x8C000102, // 0005 GETMET R0 R0 K2 + 0x58080003, // 0006 LDCONST R2 K3 + 0x580C0004, // 0007 LDCONST R3 K4 + 0x7C000600, // 0008 CALL R0 3 + 0x80000000, // 0009 RET 0 + }) + ), + be_nested_proto( + 4, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_start_mdns_announce), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(remove_rule), + /* K3 */ be_nested_str_weak(Eth_X23Connected), + /* K4 */ be_nested_str_weak(matter_device_mdns), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x50080200, // 0002 LDBOOL R2 1 0 + 0x7C000400, // 0003 CALL R0 2 + 0xB8020200, // 0004 GETNGBL R0 K1 + 0x8C000102, // 0005 GETMET R0 R0 K2 + 0x58080003, // 0006 LDCONST R2 K3 + 0x580C0004, // 0007 LDCONST R3 K4 + 0x7C000600, // 0008 CALL R0 3 + 0x80000000, // 0009 RET 0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(wifi), + /* K2 */ be_nested_str_weak(up), + /* K3 */ be_nested_str_weak(_start_mdns_announce), + /* K4 */ be_nested_str_weak(add_rule), + /* K5 */ be_nested_str_weak(Wifi_X23Connected), + /* K6 */ be_nested_str_weak(eth), + /* K7 */ be_nested_str_weak(Eth_X23Connected), + }), + be_str_weak(start_mdns_announce_hostnames), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x94040302, // 0003 GETIDX R1 R1 K2 + 0x78060003, // 0004 JMPF R1 #0009 + 0x8C040103, // 0005 GETMET R1 R0 K3 + 0x500C0000, // 0006 LDBOOL R3 0 0 + 0x7C040400, // 0007 CALL R1 2 + 0x70020005, // 0008 JMP #000F + 0xB8060000, // 0009 GETNGBL R1 K0 + 0x8C040304, // 000A GETMET R1 R1 K4 + 0x580C0005, // 000B LDCONST R3 K5 + 0x84100000, // 000C CLOSURE R4 P0 + 0x5C140000, // 000D MOVE R5 R0 + 0x7C040800, // 000E CALL R1 4 + 0xB8060000, // 000F GETNGBL R1 K0 + 0x8C040306, // 0010 GETMET R1 R1 K6 + 0x7C040200, // 0011 CALL R1 1 + 0x94040302, // 0012 GETIDX R1 R1 K2 + 0x78060003, // 0013 JMPF R1 #0018 + 0x8C040103, // 0014 GETMET R1 R0 K3 + 0x500C0200, // 0015 LDBOOL R3 1 0 + 0x7C040400, // 0016 CALL R1 2 + 0x70020005, // 0017 JMP #001E + 0xB8060000, // 0018 GETNGBL R1 K0 + 0x8C040304, // 0019 GETMET R1 R1 K4 + 0x580C0007, // 001A LDCONST R3 K7 + 0x84100001, // 001B CLOSURE R4 P1 + 0x5C140000, // 001C MOVE R5 R0 + 0x7C040800, // 001D CALL R1 4 + 0xA0000000, // 001E CLOSE R0 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: compute_manual_pairing_code +********************************************************************/ +be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */ + be_nested_proto( + 11, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(discriminator), + /* K2 */ be_nested_str_weak(passcode), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(Verhoeff), + /* K7 */ be_nested_str_weak(checksum), + }), + be_str_weak(compute_manual_pairing_code), + &be_const_str_solidified, + ( &(const binstruction[31]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x540E0FFE, // 0002 LDINT R3 4095 + 0x2C080403, // 0003 AND R2 R2 R3 + 0x540E0009, // 0004 LDINT R3 10 + 0x3C080403, // 0005 SHR R2 R2 R3 + 0x880C0101, // 0006 GETMBR R3 R0 K1 + 0x541202FF, // 0007 LDINT R4 768 + 0x2C0C0604, // 0008 AND R3 R3 R4 + 0x54120005, // 0009 LDINT R4 6 + 0x380C0604, // 000A SHL R3 R3 R4 + 0x88100102, // 000B GETMBR R4 R0 K2 + 0x54163FFE, // 000C LDINT R5 16383 + 0x2C100805, // 000D AND R4 R4 R5 + 0x300C0604, // 000E OR R3 R3 R4 + 0x88100102, // 000F GETMBR R4 R0 K2 + 0x5416000D, // 0010 LDINT R5 14 + 0x3C100805, // 0011 SHR R4 R4 R5 + 0x8C140303, // 0012 GETMET R5 R1 K3 + 0x581C0004, // 0013 LDCONST R7 K4 + 0x5C200400, // 0014 MOVE R8 R2 + 0x5C240600, // 0015 MOVE R9 R3 + 0x5C280800, // 0016 MOVE R10 R4 + 0x7C140A00, // 0017 CALL R5 5 + 0xB81A0A00, // 0018 GETNGBL R6 K5 + 0x88180D06, // 0019 GETMBR R6 R6 K6 + 0x8C180D07, // 001A GETMET R6 R6 K7 + 0x5C200A00, // 001B MOVE R8 R5 + 0x7C180400, // 001C CALL R6 2 + 0x00140A06, // 001D ADD R5 R5 R6 + 0x80040A00, // 001E RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: stop_basic_commissioning +********************************************************************/ +be_local_closure(Matter_Device_stop_basic_commissioning, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(commissioning_open), + }), + be_str_weak(stop_basic_commissioning), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x4C040000, // 0000 LDNIL R1 + 0x90020001, // 0001 SETMBR R0 K0 R1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_announce_op_discovery_all_fabrics +********************************************************************/ +be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(fabrics), + /* K2 */ be_nested_str_weak(get_device_id), + /* K3 */ be_nested_str_weak(get_fabric_id), + /* K4 */ be_nested_str_weak(mdns_announce_op_discovery), + /* K5 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(mdns_announce_op_discovery_all_fabrics), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x60040010, // 0000 GETGBL R1 G16 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x88080501, // 0002 GETMBR R2 R2 K1 + 0x7C040200, // 0003 CALL R1 1 + 0xA802000B, // 0004 EXBLK 0 #0011 + 0x5C080200, // 0005 MOVE R2 R1 + 0x7C080000, // 0006 CALL R2 0 + 0x8C0C0502, // 0007 GETMET R3 R2 K2 + 0x7C0C0200, // 0008 CALL R3 1 + 0x780E0005, // 0009 JMPF R3 #0010 + 0x8C0C0503, // 000A GETMET R3 R2 K3 + 0x7C0C0200, // 000B CALL R3 1 + 0x780E0002, // 000C JMPF R3 #0010 + 0x8C0C0104, // 000D GETMET R3 R0 K4 + 0x5C140400, // 000E MOVE R5 R2 + 0x7C0C0400, // 000F CALL R3 2 + 0x7001FFF3, // 0010 JMP #0005 + 0x58040005, // 0011 LDCONST R1 K5 + 0xAC040200, // 0012 CATCH R1 1 0 + 0xB0080000, // 0013 RAISE 2 R0 R0 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_commissioning_complete +********************************************************************/ +be_local_closure(Matter_Device_start_commissioning_complete, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(log), + /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A), + /* K3 */ be_const_int(2), + }), + be_str_weak(start_commissioning_complete), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x58140003, // 0003 LDCONST R5 K3 + 0x7C080600, // 0004 CALL R2 3 + 0x80000000, // 0005 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Device_init, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 4, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(start_udp), + /* K1 */ be_nested_str_weak(UDP_PORT), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(remove_rule), + /* K4 */ be_nested_str_weak(Wifi_X23Connected), + /* K5 */ be_nested_str_weak(matter_device_udp), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x68080000, // 0002 GETUPV R2 U0 + 0x88080501, // 0003 GETMBR R2 R2 K1 + 0x7C000400, // 0004 CALL R0 2 + 0xB8020400, // 0005 GETNGBL R0 K2 + 0x8C000103, // 0006 GETMET R0 R0 K3 + 0x58080004, // 0007 LDCONST R2 K4 + 0x580C0005, // 0008 LDCONST R3 K5 + 0x7C000600, // 0009 CALL R0 3 + 0x80000000, // 000A RET 0 + }) + ), + be_nested_proto( + 4, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(start_udp), + /* K1 */ be_nested_str_weak(UDP_PORT), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(remove_rule), + /* K4 */ be_nested_str_weak(Eth_X23Connected), + /* K5 */ be_nested_str_weak(matter_device_udp), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x68080000, // 0002 GETUPV R2 U0 + 0x88080501, // 0003 GETMBR R2 R2 K1 + 0x7C000400, // 0004 CALL R0 2 + 0xB8020400, // 0005 GETNGBL R0 K2 + 0x8C000103, // 0006 GETMET R0 R0 K3 + 0x58080004, // 0007 LDCONST R2 K4 + 0x580C0005, // 0008 LDCONST R3 K5 + 0x7C000600, // 0009 CALL R0 3 + 0x80000000, // 000A RET 0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[40]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(get_option), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(MATTER_OPTION), + /* K6 */ be_nested_str_weak(UI), + /* K7 */ be_nested_str_weak(plugins), + /* K8 */ be_nested_str_weak(vendorid), + /* K9 */ be_nested_str_weak(VENDOR_ID), + /* K10 */ be_nested_str_weak(productid), + /* K11 */ be_nested_str_weak(PRODUCT_ID), + /* K12 */ be_nested_str_weak(iterations), + /* K13 */ be_nested_str_weak(PBKDF_ITERATIONS), + /* K14 */ be_nested_str_weak(ipv4only), + /* K15 */ be_nested_str_weak(load_param), + /* K16 */ be_nested_str_weak(commissioning_instance_wifi), + /* K17 */ be_nested_str_weak(random), + /* K18 */ be_nested_str_weak(tohex), + /* K19 */ be_nested_str_weak(commissioning_instance_eth), + /* K20 */ be_nested_str_weak(sessions), + /* K21 */ be_nested_str_weak(Session_Store), + /* K22 */ be_nested_str_weak(load_fabrics), + /* K23 */ be_nested_str_weak(message_handler), + /* K24 */ be_nested_str_weak(MessageHandler), + /* K25 */ be_nested_str_weak(ui), + /* K26 */ be_nested_str_weak(push), + /* K27 */ be_nested_str_weak(Plugin_Root), + /* K28 */ be_nested_str_weak(Plugin_OnOff), + /* K29 */ be_nested_str_weak(start_mdns_announce_hostnames), + /* K30 */ be_nested_str_weak(wifi), + /* K31 */ be_nested_str_weak(up), + /* K32 */ be_nested_str_weak(start_udp), + /* K33 */ be_nested_str_weak(UDP_PORT), + /* K34 */ be_nested_str_weak(add_rule), + /* K35 */ be_nested_str_weak(Wifi_X23Connected), + /* K36 */ be_nested_str_weak(eth), + /* K37 */ be_nested_str_weak(Eth_X23Connected), + /* K38 */ be_nested_str_weak(init_basic_commissioning), + /* K39 */ be_nested_str_weak(add_driver), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[109]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0xB80E0400, // 0002 GETNGBL R3 K2 + 0x8C0C0703, // 0003 GETMET R3 R3 K3 + 0xB8160800, // 0004 GETNGBL R5 K4 + 0x88140B05, // 0005 GETMBR R5 R5 K5 + 0x7C0C0400, // 0006 CALL R3 2 + 0x740E0004, // 0007 JMPT R3 #000D + 0xB80E0800, // 0008 GETNGBL R3 K4 + 0x8C0C0706, // 0009 GETMET R3 R3 K6 + 0x5C140000, // 000A MOVE R5 R0 + 0x7C0C0400, // 000B CALL R3 2 + 0x80000600, // 000C RET 0 + 0x600C0012, // 000D GETGBL R3 G18 + 0x7C0C0000, // 000E CALL R3 0 + 0x90020E03, // 000F SETMBR R0 K7 R3 + 0x880C0109, // 0010 GETMBR R3 R0 K9 + 0x90021003, // 0011 SETMBR R0 K8 R3 + 0x880C010B, // 0012 GETMBR R3 R0 K11 + 0x90021403, // 0013 SETMBR R0 K10 R3 + 0x880C010D, // 0014 GETMBR R3 R0 K13 + 0x90021803, // 0015 SETMBR R0 K12 R3 + 0x500C0000, // 0016 LDBOOL R3 0 0 + 0x90021C03, // 0017 SETMBR R0 K14 R3 + 0x8C0C010F, // 0018 GETMET R3 R0 K15 + 0x7C0C0200, // 0019 CALL R3 1 + 0x8C0C0311, // 001A GETMET R3 R1 K17 + 0x54160007, // 001B LDINT R5 8 + 0x7C0C0400, // 001C CALL R3 2 + 0x8C0C0712, // 001D GETMET R3 R3 K18 + 0x7C0C0200, // 001E CALL R3 1 + 0x90022003, // 001F SETMBR R0 K16 R3 + 0x8C0C0311, // 0020 GETMET R3 R1 K17 + 0x54160007, // 0021 LDINT R5 8 + 0x7C0C0400, // 0022 CALL R3 2 + 0x8C0C0712, // 0023 GETMET R3 R3 K18 + 0x7C0C0200, // 0024 CALL R3 1 + 0x90022603, // 0025 SETMBR R0 K19 R3 + 0xB80E0800, // 0026 GETNGBL R3 K4 + 0x8C0C0715, // 0027 GETMET R3 R3 K21 + 0x7C0C0200, // 0028 CALL R3 1 + 0x90022803, // 0029 SETMBR R0 K20 R3 + 0x880C0114, // 002A GETMBR R3 R0 K20 + 0x8C0C0716, // 002B GETMET R3 R3 K22 + 0x7C0C0200, // 002C CALL R3 1 + 0xB80E0800, // 002D GETNGBL R3 K4 + 0x8C0C0718, // 002E GETMET R3 R3 K24 + 0x5C140000, // 002F MOVE R5 R0 + 0x7C0C0400, // 0030 CALL R3 2 + 0x90022E03, // 0031 SETMBR R0 K23 R3 + 0xB80E0800, // 0032 GETNGBL R3 K4 + 0x8C0C0706, // 0033 GETMET R3 R3 K6 + 0x5C140000, // 0034 MOVE R5 R0 + 0x7C0C0400, // 0035 CALL R3 2 + 0x90023203, // 0036 SETMBR R0 K25 R3 + 0x880C0107, // 0037 GETMBR R3 R0 K7 + 0x8C0C071A, // 0038 GETMET R3 R3 K26 + 0xB8160800, // 0039 GETNGBL R5 K4 + 0x8C140B1B, // 003A GETMET R5 R5 K27 + 0x5C1C0000, // 003B MOVE R7 R0 + 0x7C140400, // 003C CALL R5 2 + 0x7C0C0400, // 003D CALL R3 2 + 0x880C0107, // 003E GETMBR R3 R0 K7 + 0x8C0C071A, // 003F GETMET R3 R3 K26 + 0xB8160800, // 0040 GETNGBL R5 K4 + 0x8C140B1C, // 0041 GETMET R5 R5 K28 + 0x5C1C0000, // 0042 MOVE R7 R0 + 0x7C140400, // 0043 CALL R5 2 + 0x7C0C0400, // 0044 CALL R3 2 + 0x8C0C011D, // 0045 GETMET R3 R0 K29 + 0x7C0C0200, // 0046 CALL R3 1 + 0xB80E0400, // 0047 GETNGBL R3 K2 + 0x8C0C071E, // 0048 GETMET R3 R3 K30 + 0x7C0C0200, // 0049 CALL R3 1 + 0x940C071F, // 004A GETIDX R3 R3 K31 + 0x780E0003, // 004B JMPF R3 #0050 + 0x8C0C0120, // 004C GETMET R3 R0 K32 + 0x88140121, // 004D GETMBR R5 R0 K33 + 0x7C0C0400, // 004E CALL R3 2 + 0x70020005, // 004F JMP #0056 + 0xB80E0400, // 0050 GETNGBL R3 K2 + 0x8C0C0722, // 0051 GETMET R3 R3 K34 + 0x58140023, // 0052 LDCONST R5 K35 + 0x84180000, // 0053 CLOSURE R6 P0 + 0x5C1C0000, // 0054 MOVE R7 R0 + 0x7C0C0800, // 0055 CALL R3 4 + 0xB80E0400, // 0056 GETNGBL R3 K2 + 0x8C0C0724, // 0057 GETMET R3 R3 K36 + 0x7C0C0200, // 0058 CALL R3 1 + 0x940C071F, // 0059 GETIDX R3 R3 K31 + 0x780E0003, // 005A JMPF R3 #005F + 0x8C0C0120, // 005B GETMET R3 R0 K32 + 0x88140121, // 005C GETMBR R5 R0 K33 + 0x7C0C0400, // 005D CALL R3 2 + 0x70020005, // 005E JMP #0065 + 0xB80E0400, // 005F GETNGBL R3 K2 + 0x8C0C0722, // 0060 GETMET R3 R3 K34 + 0x58140025, // 0061 LDCONST R5 K37 + 0x84180001, // 0062 CLOSURE R6 P1 + 0x5C1C0000, // 0063 MOVE R7 R0 + 0x7C0C0800, // 0064 CALL R3 4 + 0x8C0C0126, // 0065 GETMET R3 R0 K38 + 0x7C0C0200, // 0066 CALL R3 1 + 0xB80E0400, // 0067 GETNGBL R3 K2 + 0x8C0C0727, // 0068 GETMET R3 R3 K39 + 0x5C140000, // 0069 MOVE R5 R0 + 0x7C0C0400, // 006A CALL R3 2 + 0xA0000000, // 006B CLOSE R0 + 0x80000000, // 006C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: msg_received +********************************************************************/ +be_local_closure(Matter_Device_msg_received, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(message_handler), + /* K1 */ be_nested_str_weak(msg_received), + }), + be_str_weak(msg_received), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x5C180200, // 0002 MOVE R6 R1 + 0x5C1C0400, // 0003 MOVE R7 R2 + 0x5C200600, // 0004 MOVE R8 R3 + 0x7C100800, // 0005 CALL R4 4 + 0x80040800, // 0006 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: save_param +********************************************************************/ +be_local_closure(Matter_Device_save_param, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(dump), + /* K2 */ be_nested_str_weak(distinguish), + /* K3 */ be_nested_str_weak(discriminator), + /* K4 */ be_nested_str_weak(passcode), + /* K5 */ be_nested_str_weak(ipv4only), + /* K6 */ be_nested_str_weak(string), + /* K7 */ be_nested_str_weak(FILENAME), + /* K8 */ be_nested_str_weak(w), + /* K9 */ be_nested_str_weak(write), + /* K10 */ be_nested_str_weak(close), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), + /* K14 */ be_nested_str_weak(_X7C), + /* K15 */ be_const_int(2), + }), + be_str_weak(save_param), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x60100013, // 0002 GETGBL R4 G19 + 0x7C100000, // 0003 CALL R4 0 + 0x88140103, // 0004 GETMBR R5 R0 K3 + 0x98120405, // 0005 SETIDX R4 K2 R5 + 0x88140104, // 0006 GETMBR R5 R0 K4 + 0x98120805, // 0007 SETIDX R4 K4 R5 + 0x88140105, // 0008 GETMBR R5 R0 K5 + 0x98120A05, // 0009 SETIDX R4 K5 R5 + 0x7C080400, // 000A CALL R2 2 + 0xA802000D, // 000B EXBLK 0 #001A + 0xA40E0C00, // 000C IMPORT R3 K6 + 0x60100011, // 000D GETGBL R4 G17 + 0x88140107, // 000E GETMBR R5 R0 K7 + 0x58180008, // 000F LDCONST R6 K8 + 0x7C100400, // 0010 CALL R4 2 + 0x8C140909, // 0011 GETMET R5 R4 K9 + 0x5C1C0400, // 0012 MOVE R7 R2 + 0x7C140400, // 0013 CALL R5 2 + 0x8C14090A, // 0014 GETMET R5 R4 K10 + 0x7C140200, // 0015 CALL R5 1 + 0xA8040001, // 0016 EXBLK 1 1 + 0x80040400, // 0017 RET 1 R2 + 0xA8040001, // 0018 EXBLK 1 1 + 0x70020011, // 0019 JMP #002C + 0xAC0C0002, // 001A CATCH R3 0 2 + 0x7002000E, // 001B JMP #002B + 0xB8161600, // 001C GETNGBL R5 K11 + 0x8C140B0C, // 001D GETMET R5 R5 K12 + 0x601C0008, // 001E GETGBL R7 G8 + 0x5C200600, // 001F MOVE R8 R3 + 0x7C1C0200, // 0020 CALL R7 1 + 0x001E1A07, // 0021 ADD R7 K13 R7 + 0x001C0F0E, // 0022 ADD R7 R7 K14 + 0x60200008, // 0023 GETGBL R8 G8 + 0x5C240800, // 0024 MOVE R9 R4 + 0x7C200200, // 0025 CALL R8 1 + 0x001C0E08, // 0026 ADD R7 R7 R8 + 0x5820000F, // 0027 LDCONST R8 K15 + 0x7C140600, // 0028 CALL R5 3 + 0x80040400, // 0029 RET 1 R2 + 0x70020000, // 002A JMP #002C + 0xB0080000, // 002B RAISE 2 R0 R0 + 0x80000000, // 002C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_udp +********************************************************************/ +be_local_closure(Matter_Device_start_udp, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(msg_received), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x680C0000, // 0000 GETUPV R3 U0 + 0x8C0C0700, // 0001 GETMET R3 R3 K0 + 0x5C140000, // 0002 MOVE R5 R0 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0400, // 0004 MOVE R7 R2 + 0x7C0C0800, // 0005 CALL R3 4 + 0x80040600, // 0006 RET 1 R3 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(udp_server), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20), + /* K4 */ be_const_int(2), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(UDPServer), + /* K7 */ be_nested_str_weak(), + /* K8 */ be_nested_str_weak(start), + }), + be_str_weak(start_udp), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0000, // 0001 JMPF R2 #0003 + 0x80000400, // 0002 RET 0 + 0x4C080000, // 0003 LDNIL R2 + 0x1C080202, // 0004 EQ R2 R1 R2 + 0x780A0000, // 0005 JMPF R2 #0007 + 0x540615A3, // 0006 LDINT R1 5540 + 0xB80A0200, // 0007 GETNGBL R2 K1 + 0x8C080502, // 0008 GETMET R2 R2 K2 + 0x60100008, // 0009 GETGBL R4 G8 + 0x5C140200, // 000A MOVE R5 R1 + 0x7C100200, // 000B CALL R4 1 + 0x00120604, // 000C ADD R4 K3 R4 + 0x58140004, // 000D LDCONST R5 K4 + 0x7C080600, // 000E CALL R2 3 + 0xB80A0A00, // 000F GETNGBL R2 K5 + 0x8C080506, // 0010 GETMET R2 R2 K6 + 0x58100007, // 0011 LDCONST R4 K7 + 0x5C140200, // 0012 MOVE R5 R1 + 0x7C080600, // 0013 CALL R2 3 + 0x90020002, // 0014 SETMBR R0 K0 R2 + 0x88080100, // 0015 GETMBR R2 R0 K0 + 0x8C080508, // 0016 GETMET R2 R2 K8 + 0x84100000, // 0017 CLOSURE R4 P0 + 0x7C080400, // 0018 CALL R2 2 + 0xA0000000, // 0019 CLOSE R0 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Device ********************************************************************/ be_local_class(Matter_Device, - 19, + 20, NULL, - be_nested_map(53, + be_nested_map(57, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(discriminator, 16), be_const_var(11) }, - { be_const_key_weak(w1, 37), be_const_var(17) }, - { be_const_key_weak(hostname_wifi, -1), be_const_var(7) }, - { be_const_key_weak(PASSCODE_DEFAULT, -1), be_const_int(20202021) }, - { be_const_key_weak(udp_server, 28), be_const_var(1) }, - { be_const_key_weak(msg_send, 40), be_const_closure(Matter_Device_msg_send_closure) }, - { be_const_key_weak(mdns_announce_op_discovery_all_sessions, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_sessions_closure) }, - { be_const_key_weak(passcode, -1), be_const_var(12) }, - { be_const_key_weak(plugins, -1), be_const_var(0) }, - { be_const_key_weak(invoke_request, 36), be_const_closure(Matter_Device_invoke_request_closure) }, - { be_const_key_weak(packet_ack, 51), be_const_closure(Matter_Device_packet_ack_closure) }, - { be_const_key_weak(salt, 29), be_const_var(15) }, - { be_const_key_weak(start_udp, 31), be_const_closure(Matter_Device_start_udp_closure) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) }, - { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) }, - { be_const_key_weak(mdns_announce_op_discovery, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) }, - { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) }, - { be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) }, - { be_const_key_weak(msg_received, 15), be_const_closure(Matter_Device_msg_received_closure) }, - { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) }, - { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) }, + { be_const_key_weak(PRODUCT_ID, 50), be_const_int(32768) }, { be_const_key_weak(compute_pbkdf, -1), be_const_closure(Matter_Device_compute_pbkdf_closure) }, - { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(6) }, - { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) }, - { be_const_key_weak(hostname_eth, 41), be_const_var(8) }, - { be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) }, - { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) }, - { be_const_key_weak(start_operational_dicovery, -1), be_const_closure(Matter_Device_start_operational_dicovery_closure) }, - { be_const_key_weak(attribute_updated, 2), be_const_closure(Matter_Device_attribute_updated_closure) }, - { be_const_key_weak(compute_manual_pairing_code, 38), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) }, - { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) }, - { be_const_key_weak(start_commissioning_complete, 22), be_const_closure(Matter_Device_start_commissioning_complete_closure) }, - { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) }, - { be_const_key_weak(sessions, -1), be_const_var(3) }, - { be_const_key_weak(start_operational_dicovery_deferred, 27), be_const_closure(Matter_Device_start_operational_dicovery_deferred_closure) }, - { be_const_key_weak(finish_commissioning, 5), be_const_closure(Matter_Device_finish_commissioning_closure) }, - { be_const_key_weak(commissioning_instance_wifi, 45), be_const_var(5) }, + { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(7) }, { be_const_key_weak(message_handler, -1), be_const_var(2) }, - { be_const_key_weak(PRODUCT_ID, 47), be_const_int(32768) }, - { be_const_key_weak(ipv4only, 34), be_const_var(13) }, - { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) }, - { be_const_key_weak(iterations, 26), be_const_var(14) }, - { be_const_key_weak(ui, -1), be_const_var(4) }, - { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) }, + { be_const_key_weak(_start_mdns_announce, 41), be_const_closure(Matter_Device__start_mdns_announce_closure) }, + { be_const_key_weak(start_operational_discovery_deferred, 3), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) }, + { be_const_key_weak(salt, 46), be_const_var(16) }, + { be_const_key_weak(w1, -1), be_const_var(18) }, + { be_const_key_weak(vendorid, 33), be_const_var(10) }, + { be_const_key_weak(udp_server, -1), be_const_var(1) }, + { be_const_key_weak(sessions, -1), be_const_var(3) }, { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) }, - { be_const_key_weak(w0, -1), be_const_var(16) }, + { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) }, + { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) }, + { be_const_key_weak(passcode, -1), be_const_var(13) }, + { be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) }, + { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) }, + { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) }, + { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) }, + { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) }, + { be_const_key_weak(start_operational_discovery, 5), be_const_closure(Matter_Device_start_operational_discovery_closure) }, + { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) }, + { be_const_key_weak(init_basic_commissioning, -1), be_const_closure(Matter_Device_init_basic_commissioning_closure) }, + { be_const_key_weak(FILENAME, 22), be_nested_str_weak(_matter_device_X2Ejson) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) }, + { be_const_key_weak(msg_send, -1), be_const_closure(Matter_Device_msg_send_closure) }, + { be_const_key_weak(commissioning_open, -1), be_const_var(5) }, + { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(6) }, + { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) }, + { be_const_key_weak(packet_ack, 40), be_const_closure(Matter_Device_packet_ack_closure) }, + { be_const_key_weak(start_commissioning_complete, 24), be_const_closure(Matter_Device_start_commissioning_complete_closure) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Device_attribute_updated_closure) }, + { be_const_key_weak(ui, 30), be_const_var(4) }, + { be_const_key_weak(hostname_eth, -1), be_const_var(9) }, + { be_const_key_weak(ipv4only, 49), be_const_var(14) }, + { be_const_key_weak(get_active_endpoints, 45), be_const_closure(Matter_Device_get_active_endpoints_closure) }, + { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) }, + { be_const_key_weak(finish_commissioning, -1), be_const_closure(Matter_Device_finish_commissioning_closure) }, + { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) }, + { be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) }, + { be_const_key_weak(PASSCODE_DEFAULT, -1), be_const_int(20202021) }, + { be_const_key_weak(stop_basic_commissioning, 44), be_const_closure(Matter_Device_stop_basic_commissioning_closure) }, + { be_const_key_weak(L, -1), be_const_var(19) }, + { be_const_key_weak(plugins, -1), be_const_var(0) }, + { be_const_key_weak(sort_distinct, -1), be_const_static_closure(Matter_Device_sort_distinct_closure) }, + { be_const_key_weak(compute_manual_pairing_code, -1), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) }, + { be_const_key_weak(productid, -1), be_const_var(11) }, + { be_const_key_weak(iterations, 36), be_const_var(15) }, + { be_const_key_weak(mdns_announce_op_discovery, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) }, { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) }, - { be_const_key_weak(L, -1), be_const_var(18) }, - { be_const_key_weak(vendorid, 14), be_const_var(9) }, - { be_const_key_weak(sort_distinct, 8), be_const_static_closure(Matter_Device_sort_distinct_closure) }, - { be_const_key_weak(productid, 6), be_const_var(10) }, - { be_const_key_weak(_start_mdns_announce, -1), be_const_closure(Matter_Device__start_mdns_announce_closure) }, - { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) }, + { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) }, + { be_const_key_weak(w0, 15), be_const_var(17) }, + { be_const_key_weak(discriminator, -1), be_const_var(12) }, + { be_const_key_weak(start_udp, -1), be_const_closure(Matter_Device_start_udp_closure) }, + { be_const_key_weak(hostname_wifi, 2), be_const_var(8) }, })), be_str_weak(Matter_Device) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Expirable.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Expirable.h new file mode 100644 index 000000000..5e4c55493 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Expirable.h @@ -0,0 +1,659 @@ +/* Solidification of Matter_Expirable.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Expirable; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Expirable_init, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_persist), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x50040000, // 0000 LDBOOL R1 0 0 + 0x90020001, // 0001 SETMBR R0 K0 R1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_persist +********************************************************************/ +be_local_closure(Matter_Expirable_set_persist, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_persist), + }), + be_str_weak(set_persist), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x60080017, // 0000 GETGBL R2 G23 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: has_expired +********************************************************************/ +be_local_closure(Matter_Expirable_has_expired, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(rtc), + /* K2 */ be_nested_str_weak(utc), + /* K3 */ be_nested_str_weak(_expiration), + }), + be_str_weak(has_expired), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0003, // 0002 JMPF R2 #0007 + 0xB80A0000, // 0003 GETNGBL R2 K0 + 0x8C080501, // 0004 GETMET R2 R2 K1 + 0x7C080200, // 0005 CALL R2 1 + 0x94040502, // 0006 GETIDX R1 R2 K2 + 0x88080103, // 0007 GETMBR R2 R0 K3 + 0x4C0C0000, // 0008 LDNIL R3 + 0x20080403, // 0009 NE R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x88080103, // 000B GETMBR R2 R0 K3 + 0x28080202, // 000C GE R2 R1 R2 + 0x80040400, // 000D RET 1 R2 + 0x50080000, // 000E LDBOOL R2 0 0 + 0x80040400, // 000F RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_parent_list +********************************************************************/ +be_local_closure(Matter_Expirable_get_parent_list, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_list), + }), + be_str_weak(get_parent_list), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: persist_post +********************************************************************/ +be_local_closure(Matter_Expirable_persist_post, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(persist_post), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_expire_time +********************************************************************/ +be_local_closure(Matter_Expirable_set_expire_time, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_expiration), + }), + be_str_weak(set_expire_time), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: persist_pre +********************************************************************/ +be_local_closure(Matter_Expirable_persist_pre, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(persist_pre), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: hydrate_post +********************************************************************/ +be_local_closure(Matter_Expirable_hydrate_post, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(hydrate_post), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: does_persist +********************************************************************/ +be_local_closure(Matter_Expirable_does_persist, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_persist), + }), + be_str_weak(does_persist), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_expire_in_seconds +********************************************************************/ +be_local_closure(Matter_Expirable_set_expire_in_seconds, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(rtc), + /* K2 */ be_nested_str_weak(utc), + /* K3 */ be_nested_str_weak(set_expire_time), + }), + be_str_weak(set_expire_in_seconds), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x1C0C0203, // 0001 EQ R3 R1 R3 + 0x780E0000, // 0002 JMPF R3 #0004 + 0x80000600, // 0003 RET 0 + 0x4C0C0000, // 0004 LDNIL R3 + 0x1C0C0403, // 0005 EQ R3 R2 R3 + 0x780E0003, // 0006 JMPF R3 #000B + 0xB80E0000, // 0007 GETNGBL R3 K0 + 0x8C0C0701, // 0008 GETMET R3 R3 K1 + 0x7C0C0200, // 0009 CALL R3 1 + 0x94080702, // 000A GETIDX R2 R3 K2 + 0x8C0C0103, // 000B GETMET R3 R0 K3 + 0x00140401, // 000C ADD R5 R2 R1 + 0x7C0C0400, // 000D CALL R3 2 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_parent_list +********************************************************************/ +be_local_closure(Matter_Expirable_set_parent_list, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_list), + }), + be_str_weak(set_parent_list), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_no_expiration +********************************************************************/ +be_local_closure(Matter_Expirable_set_no_expiration, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_expiration), + }), + be_str_weak(set_no_expiration), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x4C040000, // 0000 LDNIL R1 + 0x90020001, // 0001 SETMBR R0 K0 R1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Expirable +********************************************************************/ +be_local_class(Matter_Expirable, + 3, + NULL, + be_nested_map(15, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(init, -1), be_const_closure(Matter_Expirable_init_closure) }, + { be_const_key_weak(set_persist, -1), be_const_closure(Matter_Expirable_set_persist_closure) }, + { be_const_key_weak(has_expired, 7), be_const_closure(Matter_Expirable_has_expired_closure) }, + { be_const_key_weak(_persist, -1), be_const_var(1) }, + { be_const_key_weak(get_parent_list, 13), be_const_closure(Matter_Expirable_get_parent_list_closure) }, + { be_const_key_weak(persist_post, -1), be_const_closure(Matter_Expirable_persist_post_closure) }, + { be_const_key_weak(set_expire_time, -1), be_const_closure(Matter_Expirable_set_expire_time_closure) }, + { be_const_key_weak(_list, -1), be_const_var(0) }, + { be_const_key_weak(does_persist, -1), be_const_closure(Matter_Expirable_does_persist_closure) }, + { be_const_key_weak(hydrate_post, 8), be_const_closure(Matter_Expirable_hydrate_post_closure) }, + { be_const_key_weak(set_expire_in_seconds, 3), be_const_closure(Matter_Expirable_set_expire_in_seconds_closure) }, + { be_const_key_weak(_expiration, 10), be_const_var(2) }, + { be_const_key_weak(set_parent_list, -1), be_const_closure(Matter_Expirable_set_parent_list_closure) }, + { be_const_key_weak(persist_pre, -1), be_const_closure(Matter_Expirable_persist_pre_closure) }, + { be_const_key_weak(set_no_expiration, -1), be_const_closure(Matter_Expirable_set_no_expiration_closure) }, + })), + be_str_weak(Matter_Expirable) +); +/*******************************************************************/ + +void be_load_Matter_Expirable_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Expirable); + be_setglobal(vm, "Matter_Expirable"); + be_pop(vm, 1); +} + +extern const bclass be_class_Matter_Expirable_list; + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_Expirable_list_every_second, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(remove_expired), + }), + be_str_weak(every_second), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: setitem +********************************************************************/ +be_local_closure(Matter_Expirable_list_setitem, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(Expirable), + /* K2 */ be_nested_str_weak(type_error), + /* K3 */ be_nested_str_weak(argument_X20must_X20be_X20of_X20class_X20_X27Expirable_X27), + /* K4 */ be_nested_str_weak(set_parent_list), + /* K5 */ be_nested_str_weak(setitem), + }), + be_str_weak(setitem), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x600C000F, // 0000 GETGBL R3 G15 + 0x5C100400, // 0001 MOVE R4 R2 + 0xB8160000, // 0002 GETNGBL R5 K0 + 0x88140B01, // 0003 GETMBR R5 R5 K1 + 0x7C0C0400, // 0004 CALL R3 2 + 0x740E0000, // 0005 JMPT R3 #0007 + 0xB0060503, // 0006 RAISE 1 K2 K3 + 0x8C0C0504, // 0007 GETMET R3 R2 K4 + 0x5C140000, // 0008 MOVE R5 R0 + 0x7C0C0400, // 0009 CALL R3 2 + 0x600C0003, // 000A GETGBL R3 G3 + 0x5C100000, // 000B MOVE R4 R0 + 0x7C0C0200, // 000C CALL R3 1 + 0x8C0C0705, // 000D GETMET R3 R3 K5 + 0x5C140200, // 000E MOVE R5 R1 + 0x5C180400, // 000F MOVE R6 R2 + 0x7C0C0600, // 0010 CALL R3 3 + 0x80040600, // 0011 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: push +********************************************************************/ +be_local_closure(Matter_Expirable_list_push, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(Expirable), + /* K2 */ be_nested_str_weak(type_error), + /* K3 */ be_nested_str_weak(argument_X20must_X20be_X20of_X20class_X20_X27Expirable_X27), + /* K4 */ be_nested_str_weak(set_parent_list), + /* K5 */ be_nested_str_weak(push), + }), + be_str_weak(push), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0x6008000F, // 0000 GETGBL R2 G15 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0xB8120000, // 0002 GETNGBL R4 K0 + 0x88100901, // 0003 GETMBR R4 R4 K1 + 0x7C080400, // 0004 CALL R2 2 + 0x740A0000, // 0005 JMPT R2 #0007 + 0xB0060503, // 0006 RAISE 1 K2 K3 + 0x8C080304, // 0007 GETMET R2 R1 K4 + 0x5C100000, // 0008 MOVE R4 R0 + 0x7C080400, // 0009 CALL R2 2 + 0x60080003, // 000A GETGBL R2 G3 + 0x5C0C0000, // 000B MOVE R3 R0 + 0x7C080200, // 000C CALL R2 1 + 0x8C080505, // 000D GETMET R2 R2 K5 + 0x5C100200, // 000E MOVE R4 R1 + 0x7C080400, // 000F CALL R2 2 + 0x80040400, // 0010 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_expired +********************************************************************/ +be_local_closure(Matter_Expirable_list_remove_expired, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(has_expired), + /* K2 */ be_nested_str_weak(_persist), + /* K3 */ be_nested_str_weak(remove), + /* K4 */ be_const_int(1), + }), + be_str_weak(remove_expired), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x50040000, // 0000 LDBOOL R1 0 0 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C000C, // 0002 GETGBL R3 G12 + 0x5C100000, // 0003 MOVE R4 R0 + 0x7C0C0200, // 0004 CALL R3 1 + 0x140C0403, // 0005 LT R3 R2 R3 + 0x780E000D, // 0006 JMPF R3 #0015 + 0x940C0002, // 0007 GETIDX R3 R0 R2 + 0x8C0C0701, // 0008 GETMET R3 R3 K1 + 0x7C0C0200, // 0009 CALL R3 1 + 0x780E0007, // 000A JMPF R3 #0013 + 0x940C0002, // 000B GETIDX R3 R0 R2 + 0x880C0702, // 000C GETMBR R3 R3 K2 + 0x780E0000, // 000D JMPF R3 #000F + 0x50040200, // 000E LDBOOL R1 1 0 + 0x8C0C0103, // 000F GETMET R3 R0 K3 + 0x5C140400, // 0010 MOVE R5 R2 + 0x7C0C0400, // 0011 CALL R3 2 + 0x70020000, // 0012 JMP #0014 + 0x00080504, // 0013 ADD R2 R2 K4 + 0x7001FFEC, // 0014 JMP #0002 + 0x80040200, // 0015 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: persistables +********************************************************************/ +be_local_closure(Matter_Expirable_list_persistables, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 2, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 1), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_persist), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x50000200, // 0000 LDBOOL R0 1 0 + 0x78020005, // 0001 JMPF R0 #0008 + 0x68000000, // 0002 GETUPV R0 U0 + 0x7C000000, // 0003 CALL R0 0 + 0x88040100, // 0004 GETMBR R1 R0 K0 + 0x78060000, // 0005 JMPF R1 #0007 + 0x80040000, // 0006 RET 1 R0 + 0x7001FFF7, // 0007 JMP #0000 + 0x80000000, // 0008 RET 0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(iter), + }), + be_str_weak(persistables), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x84080000, // 0002 CLOSURE R2 P0 + 0xA0000000, // 0003 CLOSE R0 + 0x80040400, // 0004 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Expirable_list +********************************************************************/ +extern const bclass be_class_list; +be_local_class(Matter_Expirable_list, + 0, + &be_class_list, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(every_second, 4), be_const_closure(Matter_Expirable_list_every_second_closure) }, + { be_const_key_weak(setitem, -1), be_const_closure(Matter_Expirable_list_setitem_closure) }, + { be_const_key_weak(push, -1), be_const_closure(Matter_Expirable_list_push_closure) }, + { be_const_key_weak(remove_expired, -1), be_const_closure(Matter_Expirable_list_remove_expired_closure) }, + { be_const_key_weak(persistables, -1), be_const_closure(Matter_Expirable_list_persistables_closure) }, + })), + be_str_weak(Matter_Expirable_list) +); +/*******************************************************************/ + +void be_load_Matter_Expirable_list_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Expirable_list); + be_setglobal(vm, "Matter_Expirable_list"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h index 9bb56e254..8a984f3b9 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h @@ -1015,7 +1015,7 @@ be_local_closure(Matter_IM_send_subscribe_update, /* name */ /* K21 */ be_nested_str_weak(suppress_response), /* K22 */ be_nested_str_weak(send_queue), /* K23 */ be_nested_str_weak(IM_ReportDataSubscribed), - /* K24 */ be_nested_str_weak(__message_handler), + /* K24 */ be_nested_str_weak(_message_handler), /* K25 */ be_nested_str_weak(send_enqueued), }), be_str_weak(send_subscribe_update), diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Subscription.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Subscription.h index 2acbdcf9d..2a18dac30 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Subscription.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Subscription.h @@ -90,7 +90,7 @@ be_local_closure(Matter_IM_Subscription_init, /* name */ }), be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[65]) { /* code */ + ( &(const binstruction[66]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x90020202, // 0001 SETMBR R0 K1 R2 0x90020403, // 0002 SETMBR R0 K2 R3 @@ -112,50 +112,51 @@ be_local_closure(Matter_IM_Subscription_init, /* name */ 0x241C0C07, // 0012 GT R7 R6 R7 0x781E0000, // 0013 JMPF R7 #0015 0x541A0E0F, // 0014 LDINT R6 3600 - 0x90020E06, // 0015 SETMBR R0 K7 R6 - 0x881C0908, // 0016 GETMBR R7 R4 K8 - 0x90021007, // 0017 SETMBR R0 K8 R7 - 0x601C0012, // 0018 GETGBL R7 G18 - 0x7C1C0000, // 0019 CALL R7 0 - 0x90021207, // 001A SETMBR R0 K9 R7 - 0x601C0010, // 001B GETGBL R7 G16 - 0x8820090A, // 001C GETMBR R8 R4 K10 - 0x7C1C0200, // 001D CALL R7 1 - 0xA802000F, // 001E EXBLK 0 #002F - 0x5C200E00, // 001F MOVE R8 R7 - 0x7C200000, // 0020 CALL R8 0 - 0xB8261600, // 0021 GETNGBL R9 K11 - 0x8C24130C, // 0022 GETMET R9 R9 K12 - 0x7C240200, // 0023 CALL R9 1 - 0x8828110D, // 0024 GETMBR R10 R8 K13 - 0x90261A0A, // 0025 SETMBR R9 K13 R10 - 0x8828110E, // 0026 GETMBR R10 R8 K14 - 0x90261C0A, // 0027 SETMBR R9 K14 R10 - 0x8828110F, // 0028 GETMBR R10 R8 K15 - 0x90261E0A, // 0029 SETMBR R9 K15 R10 - 0x88280109, // 002A GETMBR R10 R0 K9 - 0x8C281510, // 002B GETMET R10 R10 K16 - 0x5C301200, // 002C MOVE R12 R9 - 0x7C280400, // 002D CALL R10 2 - 0x7001FFEF, // 002E JMP #001F - 0x581C0011, // 002F LDCONST R7 K17 - 0xAC1C0200, // 0030 CATCH R7 1 0 - 0xB0080000, // 0031 RAISE 2 R0 R0 - 0x601C0012, // 0032 GETGBL R7 G18 - 0x7C1C0000, // 0033 CALL R7 0 - 0x90022407, // 0034 SETMBR R0 K18 R7 - 0x8C1C0113, // 0035 GETMET R7 R0 K19 - 0x7C1C0200, // 0036 CALL R7 1 - 0xB81E2800, // 0037 GETNGBL R7 K20 - 0x8C1C0F15, // 0038 GETMET R7 R7 K21 - 0xB8261600, // 0039 GETNGBL R9 K11 - 0x8C241317, // 003A GETMET R9 R9 K23 - 0x5C2C0000, // 003B MOVE R11 R0 - 0x7C240400, // 003C CALL R9 2 - 0x00262C09, // 003D ADD R9 K22 R9 - 0x58280018, // 003E LDCONST R10 K24 - 0x7C1C0600, // 003F CALL R7 3 - 0x80000000, // 0040 RET 0 + 0x541A003B, // 0015 LDINT R6 60 + 0x90020E06, // 0016 SETMBR R0 K7 R6 + 0x881C0908, // 0017 GETMBR R7 R4 K8 + 0x90021007, // 0018 SETMBR R0 K8 R7 + 0x601C0012, // 0019 GETGBL R7 G18 + 0x7C1C0000, // 001A CALL R7 0 + 0x90021207, // 001B SETMBR R0 K9 R7 + 0x601C0010, // 001C GETGBL R7 G16 + 0x8820090A, // 001D GETMBR R8 R4 K10 + 0x7C1C0200, // 001E CALL R7 1 + 0xA802000F, // 001F EXBLK 0 #0030 + 0x5C200E00, // 0020 MOVE R8 R7 + 0x7C200000, // 0021 CALL R8 0 + 0xB8261600, // 0022 GETNGBL R9 K11 + 0x8C24130C, // 0023 GETMET R9 R9 K12 + 0x7C240200, // 0024 CALL R9 1 + 0x8828110D, // 0025 GETMBR R10 R8 K13 + 0x90261A0A, // 0026 SETMBR R9 K13 R10 + 0x8828110E, // 0027 GETMBR R10 R8 K14 + 0x90261C0A, // 0028 SETMBR R9 K14 R10 + 0x8828110F, // 0029 GETMBR R10 R8 K15 + 0x90261E0A, // 002A SETMBR R9 K15 R10 + 0x88280109, // 002B GETMBR R10 R0 K9 + 0x8C281510, // 002C GETMET R10 R10 K16 + 0x5C301200, // 002D MOVE R12 R9 + 0x7C280400, // 002E CALL R10 2 + 0x7001FFEF, // 002F JMP #0020 + 0x581C0011, // 0030 LDCONST R7 K17 + 0xAC1C0200, // 0031 CATCH R7 1 0 + 0xB0080000, // 0032 RAISE 2 R0 R0 + 0x601C0012, // 0033 GETGBL R7 G18 + 0x7C1C0000, // 0034 CALL R7 0 + 0x90022407, // 0035 SETMBR R0 K18 R7 + 0x8C1C0113, // 0036 GETMET R7 R0 K19 + 0x7C1C0200, // 0037 CALL R7 1 + 0xB81E2800, // 0038 GETNGBL R7 K20 + 0x8C1C0F15, // 0039 GETMET R7 R7 K21 + 0xB8261600, // 003A GETNGBL R9 K11 + 0x8C241317, // 003B GETMET R9 R9 K23 + 0x5C2C0000, // 003C MOVE R11 R0 + 0x7C240400, // 003D CALL R9 2 + 0x00262C09, // 003E ADD R9 K22 R9 + 0x58280018, // 003F LDCONST R10 K24 + 0x7C1C0600, // 0040 CALL R7 3 + 0x80000000, // 0041 RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h index 7fe36ec26..37a55eaef 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h @@ -52,7 +52,7 @@ be_local_closure(Matter_Frame_encrypt, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[29]) { /* constants */ + ( &(const bvalue[28]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(raw), /* K2 */ be_nested_str_weak(session), @@ -64,24 +64,23 @@ be_local_closure(Matter_Frame_encrypt, /* name */ /* K8 */ be_nested_str_weak(add), /* K9 */ be_nested_str_weak(flags), /* K10 */ be_nested_str_weak(message_counter), - /* K11 */ be_nested_str_weak(get_mode), - /* K12 */ be_nested_str_weak(__CASE), - /* K13 */ be_nested_str_weak(deviceid), - /* K14 */ be_nested_str_weak(resize), - /* K15 */ be_nested_str_weak(tasmota), - /* K16 */ be_nested_str_weak(log), - /* K17 */ be_nested_str_weak(MTR_X3A_X20cleartext_X3A_X20), - /* K18 */ be_nested_str_weak(tohex), - /* K19 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), - /* K20 */ be_nested_str_weak(MTR_X3A_X20r2i_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K21 */ be_nested_str_weak(MTR_X3A_X20p_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K22 */ be_nested_str_weak(MTR_X3A_X20a_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K23 */ be_nested_str_weak(MTR_X3A_X20n_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K24 */ be_nested_str_weak(AES_CCM), - /* K25 */ be_nested_str_weak(encrypt), - /* K26 */ be_nested_str_weak(tag), - /* K27 */ be_nested_str_weak(MTR_X3A_X20ciphertext_X20_X20_X3D), - /* K28 */ be_nested_str_weak(MTR_X3A_X20tag_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K11 */ be_nested_str_weak(is_CASE), + /* K12 */ be_nested_str_weak(get_device_id), + /* K13 */ be_nested_str_weak(resize), + /* K14 */ be_nested_str_weak(tasmota), + /* K15 */ be_nested_str_weak(log), + /* K16 */ be_nested_str_weak(MTR_X3A_X20cleartext_X3A_X20), + /* K17 */ be_nested_str_weak(tohex), + /* K18 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), + /* K19 */ be_nested_str_weak(MTR_X3A_X20r2i_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K20 */ be_nested_str_weak(MTR_X3A_X20p_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K21 */ be_nested_str_weak(MTR_X3A_X20a_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K22 */ be_nested_str_weak(MTR_X3A_X20n_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K23 */ be_nested_str_weak(AES_CCM), + /* K24 */ be_nested_str_weak(encrypt), + /* K25 */ be_nested_str_weak(tag), + /* K26 */ be_nested_str_weak(MTR_X3A_X20ciphertext_X20_X20_X3D), + /* K27 */ be_nested_str_weak(MTR_X3A_X20tag_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), }), be_str_weak(encrypt), &be_const_str_solidified, @@ -110,58 +109,58 @@ be_local_closure(Matter_Frame_encrypt, /* name */ 0x7C200600, // 0015 CALL R8 3 0x8C20070B, // 0016 GETMET R8 R3 K11 0x7C200200, // 0017 CALL R8 1 - 0x8824070C, // 0018 GETMBR R9 R3 K12 - 0x1C201009, // 0019 EQ R8 R8 R9 - 0x78220003, // 001A JMPF R8 #001F - 0x8820070D, // 001B GETMBR R8 R3 K13 - 0x78220001, // 001C JMPF R8 #001F - 0x8820070D, // 001D GETMBR R8 R3 K13 + 0x78220005, // 0018 JMPF R8 #001F + 0x8C20070C, // 0019 GETMET R8 R3 K12 + 0x7C200200, // 001A CALL R8 1 + 0x78220002, // 001B JMPF R8 #001F + 0x8C20070C, // 001C GETMET R8 R3 K12 + 0x7C200200, // 001D CALL R8 1 0x40200E08, // 001E CONNECT R8 R7 R8 - 0x8C200F0E, // 001F GETMET R8 R7 K14 + 0x8C200F0D, // 001F GETMET R8 R7 K13 0x542A000C, // 0020 LDINT R10 13 0x7C200400, // 0021 CALL R8 2 - 0xB8221E00, // 0022 GETNGBL R8 K15 - 0x8C201110, // 0023 GETMET R8 R8 K16 + 0xB8221C00, // 0022 GETNGBL R8 K14 + 0x8C20110F, // 0023 GETMET R8 R8 K15 0x88280101, // 0024 GETMBR R10 R0 K1 - 0x8C281512, // 0025 GETMET R10 R10 K18 + 0x8C281511, // 0025 GETMET R10 R10 K17 0x7C280200, // 0026 CALL R10 1 - 0x002A220A, // 0027 ADD R10 K17 R10 + 0x002A200A, // 0027 ADD R10 K16 R10 0x542E0003, // 0028 LDINT R11 4 0x7C200600, // 0029 CALL R8 3 - 0xB8221E00, // 002A GETNGBL R8 K15 - 0x8C201110, // 002B GETMET R8 R8 K16 - 0x58280013, // 002C LDCONST R10 K19 + 0xB8221C00, // 002A GETNGBL R8 K14 + 0x8C20110F, // 002B GETMET R8 R8 K15 + 0x58280012, // 002C LDCONST R10 K18 0x542E0003, // 002D LDINT R11 4 0x7C200600, // 002E CALL R8 3 - 0xB8221E00, // 002F GETNGBL R8 K15 - 0x8C201110, // 0030 GETMET R8 R8 K16 - 0x8C280912, // 0031 GETMET R10 R4 K18 + 0xB8221C00, // 002F GETNGBL R8 K14 + 0x8C20110F, // 0030 GETMET R8 R8 K15 + 0x8C280911, // 0031 GETMET R10 R4 K17 0x7C280200, // 0032 CALL R10 1 - 0x002A280A, // 0033 ADD R10 K20 R10 + 0x002A260A, // 0033 ADD R10 K19 R10 0x542E0003, // 0034 LDINT R11 4 0x7C200600, // 0035 CALL R8 3 - 0xB8221E00, // 0036 GETNGBL R8 K15 - 0x8C201110, // 0037 GETMET R8 R8 K16 - 0x8C280D12, // 0038 GETMET R10 R6 K18 + 0xB8221C00, // 0036 GETNGBL R8 K14 + 0x8C20110F, // 0037 GETMET R8 R8 K15 + 0x8C280D11, // 0038 GETMET R10 R6 K17 0x7C280200, // 0039 CALL R10 1 - 0x002A2A0A, // 003A ADD R10 K21 R10 + 0x002A280A, // 003A ADD R10 K20 R10 0x542E0003, // 003B LDINT R11 4 0x7C200600, // 003C CALL R8 3 - 0xB8221E00, // 003D GETNGBL R8 K15 - 0x8C201110, // 003E GETMET R8 R8 K16 - 0x8C280B12, // 003F GETMET R10 R5 K18 + 0xB8221C00, // 003D GETNGBL R8 K14 + 0x8C20110F, // 003E GETMET R8 R8 K15 + 0x8C280B11, // 003F GETMET R10 R5 K17 0x7C280200, // 0040 CALL R10 1 - 0x002A2C0A, // 0041 ADD R10 K22 R10 + 0x002A2A0A, // 0041 ADD R10 K21 R10 0x542E0003, // 0042 LDINT R11 4 0x7C200600, // 0043 CALL R8 3 - 0xB8221E00, // 0044 GETNGBL R8 K15 - 0x8C201110, // 0045 GETMET R8 R8 K16 - 0x8C280F12, // 0046 GETMET R10 R7 K18 + 0xB8221C00, // 0044 GETNGBL R8 K14 + 0x8C20110F, // 0045 GETMET R8 R8 K15 + 0x8C280F11, // 0046 GETMET R10 R7 K17 0x7C280200, // 0047 CALL R10 1 - 0x002A2E0A, // 0048 ADD R10 K23 R10 + 0x002A2C0A, // 0048 ADD R10 K22 R10 0x542E0003, // 0049 LDINT R11 4 0x7C200600, // 004A CALL R8 3 - 0x8C200318, // 004B GETMET R8 R1 K24 + 0x8C200317, // 004B GETMET R8 R1 K23 0x5C280800, // 004C MOVE R10 R4 0x5C2C0E00, // 004D MOVE R11 R7 0x5C300A00, // 004E MOVE R12 R5 @@ -170,37 +169,37 @@ be_local_closure(Matter_Frame_encrypt, /* name */ 0x7C340200, // 0051 CALL R13 1 0x543A000F, // 0052 LDINT R14 16 0x7C200C00, // 0053 CALL R8 6 - 0x8C241119, // 0054 GETMET R9 R8 K25 + 0x8C241118, // 0054 GETMET R9 R8 K24 0x5C2C0C00, // 0055 MOVE R11 R6 0x7C240400, // 0056 CALL R9 2 - 0x8C28111A, // 0057 GETMET R10 R8 K26 + 0x8C281119, // 0057 GETMET R10 R8 K25 0x7C280200, // 0058 CALL R10 1 - 0xB82E1E00, // 0059 GETNGBL R11 K15 - 0x8C2C1710, // 005A GETMET R11 R11 K16 - 0x58340013, // 005B LDCONST R13 K19 + 0xB82E1C00, // 0059 GETNGBL R11 K14 + 0x8C2C170F, // 005A GETMET R11 R11 K15 + 0x58340012, // 005B LDCONST R13 K18 0x543A0003, // 005C LDINT R14 4 0x7C2C0600, // 005D CALL R11 3 - 0xB82E1E00, // 005E GETNGBL R11 K15 - 0x8C2C1710, // 005F GETMET R11 R11 K16 - 0x8C341312, // 0060 GETMET R13 R9 K18 + 0xB82E1C00, // 005E GETNGBL R11 K14 + 0x8C2C170F, // 005F GETMET R11 R11 K15 + 0x8C341311, // 0060 GETMET R13 R9 K17 0x7C340200, // 0061 CALL R13 1 - 0x0036360D, // 0062 ADD R13 K27 R13 + 0x0036340D, // 0062 ADD R13 K26 R13 0x543A0003, // 0063 LDINT R14 4 0x7C2C0600, // 0064 CALL R11 3 - 0xB82E1E00, // 0065 GETNGBL R11 K15 - 0x8C2C1710, // 0066 GETMET R11 R11 K16 - 0x8C341512, // 0067 GETMET R13 R10 K18 + 0xB82E1C00, // 0065 GETNGBL R11 K14 + 0x8C2C170F, // 0066 GETMET R11 R11 K15 + 0x8C341511, // 0067 GETMET R13 R10 K17 0x7C340200, // 0068 CALL R13 1 - 0x0036380D, // 0069 ADD R13 K28 R13 + 0x0036360D, // 0069 ADD R13 K27 R13 0x543A0003, // 006A LDINT R14 4 0x7C2C0600, // 006B CALL R11 3 - 0xB82E1E00, // 006C GETNGBL R11 K15 - 0x8C2C1710, // 006D GETMET R11 R11 K16 - 0x58340013, // 006E LDCONST R13 K19 + 0xB82E1C00, // 006C GETNGBL R11 K14 + 0x8C2C170F, // 006D GETMET R11 R11 K15 + 0x58340012, // 006E LDCONST R13 K18 0x543A0003, // 006F LDINT R14 4 0x7C2C0600, // 0070 CALL R11 3 0x882C0101, // 0071 GETMBR R11 R0 K1 - 0x8C2C170E, // 0072 GETMET R11 R11 K14 + 0x8C2C170D, // 0072 GETMET R11 R11 K13 0x88340105, // 0073 GETMBR R13 R0 K5 0x7C2C0400, // 0074 CALL R11 2 0x882C0101, // 0075 GETMBR R11 R0 K1 @@ -405,7 +404,7 @@ be_local_closure(Matter_Frame_build_response, /* name */ /* K13 */ be_nested_str_weak(message_counter), /* K14 */ be_nested_str_weak(counter_snd), /* K15 */ be_nested_str_weak(next), - /* K16 */ be_nested_str_weak(_counter_insecure_snd), + /* K16 */ be_nested_str_weak(__counter_insecure_snd), /* K17 */ be_nested_str_weak(x_flag_i), /* K18 */ be_nested_str_weak(opcode), /* K19 */ be_nested_str_weak(exchange_id), @@ -541,9 +540,9 @@ be_local_closure(Matter_Frame_initiate_response, /* name */ /* K2 */ be_nested_str_weak(matter), /* K3 */ be_nested_str_weak(Frame), /* K4 */ be_nested_str_weak(remote_ip), - /* K5 */ be_nested_str_weak(__ip), + /* K5 */ be_nested_str_weak(_ip), /* K6 */ be_nested_str_weak(remote_port), - /* K7 */ be_nested_str_weak(__port), + /* K7 */ be_nested_str_weak(_port), /* K8 */ be_nested_str_weak(flag_dsiz), /* K9 */ be_const_int(0), /* K10 */ be_nested_str_weak(session), @@ -552,11 +551,11 @@ be_local_closure(Matter_Frame_initiate_response, /* name */ /* K13 */ be_nested_str_weak(counter_snd), /* K14 */ be_nested_str_weak(next), /* K15 */ be_nested_str_weak(local_session_id), - /* K16 */ be_nested_str_weak(_counter_insecure_snd), + /* K16 */ be_nested_str_weak(__counter_insecure_snd), /* K17 */ be_nested_str_weak(x_flag_i), /* K18 */ be_const_int(1), /* K19 */ be_nested_str_weak(opcode), - /* K20 */ be_nested_str_weak(__exchange_id), + /* K20 */ be_nested_str_weak(_exchange_id), /* K21 */ be_nested_str_weak(exchange_id), /* K22 */ be_nested_str_weak(protocol_id), /* K23 */ be_nested_str_weak(x_flag_r), diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h index d40e8c5fd..2a21b48c1 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h @@ -211,9 +211,9 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ /* K15 */ be_nested_str_weak(MTR_X3A_X20find_X20session_X20by_X20source_node_id_X20_X3D_X20), /* K16 */ be_nested_str_weak(session_id_X20_X3D_X20), /* K17 */ be_const_int(3), - /* K18 */ be_nested_str_weak(__ip), - /* K19 */ be_nested_str_weak(__port), - /* K20 */ be_nested_str_weak(__message_handler), + /* K18 */ be_nested_str_weak(_ip), + /* K19 */ be_nested_str_weak(_port), + /* K20 */ be_nested_str_weak(_message_handler), /* K21 */ be_nested_str_weak(session), /* K22 */ be_nested_str_weak(counter_rcv), /* K23 */ be_nested_str_weak(validate), diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h index e8ede2cdb..a40a8f2de 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h @@ -19,7 +19,7 @@ be_local_closure(Matter_Plugin_Root_read_attribute, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[82]) { /* constants */ + ( &(const bvalue[84]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(matter), /* K2 */ be_nested_str_weak(TLV), @@ -28,7 +28,7 @@ be_local_closure(Matter_Plugin_Root_read_attribute, /* name */ /* K5 */ be_const_int(0), /* K6 */ be_nested_str_weak(create_TLV), /* K7 */ be_nested_str_weak(U8), - /* K8 */ be_nested_str_weak(__breadcrumb), + /* K8 */ be_nested_str_weak(_breadcrumb), /* K9 */ be_const_int(1), /* K10 */ be_nested_str_weak(Matter_TLV_struct), /* K11 */ be_nested_str_weak(add_TLV), @@ -75,37 +75,39 @@ be_local_closure(Matter_Plugin_Root_read_attribute, /* name */ /* K52 */ be_nested_str_weak(sessions), /* K53 */ be_nested_str_weak(sessions_active), /* K54 */ be_nested_str_weak(B2), - /* K55 */ be_nested_str_weak(noc), - /* K56 */ be_nested_str_weak(icac), + /* K55 */ be_nested_str_weak(get_noc), + /* K56 */ be_nested_str_weak(get_icac), /* K57 */ be_nested_str_weak(stop_iteration), /* K58 */ be_nested_str_weak(parse), /* K59 */ be_nested_str_weak(get_ca), /* K60 */ be_nested_str_weak(findsubval), - /* K61 */ be_nested_str_weak(admin_vendor), - /* K62 */ be_nested_str_weak(fabric), - /* K63 */ be_nested_str_weak(deviceid), - /* K64 */ be_nested_str_weak(fabric_label), - /* K65 */ be_nested_str_weak(Tasmota), - /* K66 */ be_nested_str_weak(vendorid), - /* K67 */ be_nested_str_weak(DeviceName), - /* K68 */ be_nested_str_weak(FriendlyName), - /* K69 */ be_nested_str_weak(FriendlyName1), - /* K70 */ be_nested_str_weak(XX), - /* K71 */ be_nested_str_weak(Status_X202), - /* K72 */ be_nested_str_weak(StatusFWR), - /* K73 */ be_nested_str_weak(Hardware), - /* K74 */ be_nested_str_weak(Version), - /* K75 */ be_nested_str_weak(locale), - /* K76 */ be_nested_str_weak(TYPES), - /* K77 */ be_nested_str_weak(keys), - /* K78 */ be_nested_str_weak(get_cluster_list), - /* K79 */ be_nested_str_weak(get_active_endpoints), - /* K80 */ be_nested_str_weak(status), - /* K81 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), + /* K61 */ be_nested_str_weak(get_admin_vendor), + /* K62 */ be_nested_str_weak(get_fabric_compressed), + /* K63 */ be_nested_str_weak(get_device_id), + /* K64 */ be_nested_str_weak(get_fabric_label), + /* K65 */ be_nested_str_weak(Fabric), + /* K66 */ be_nested_str_weak(_MAX_CASE), + /* K67 */ be_nested_str_weak(Tasmota), + /* K68 */ be_nested_str_weak(vendorid), + /* K69 */ be_nested_str_weak(DeviceName), + /* K70 */ be_nested_str_weak(FriendlyName), + /* K71 */ be_nested_str_weak(FriendlyName1), + /* K72 */ be_nested_str_weak(XX), + /* K73 */ be_nested_str_weak(Status_X202), + /* K74 */ be_nested_str_weak(StatusFWR), + /* K75 */ be_nested_str_weak(Hardware), + /* K76 */ be_nested_str_weak(Version), + /* K77 */ be_nested_str_weak(locale), + /* K78 */ be_nested_str_weak(TYPES), + /* K79 */ be_nested_str_weak(keys), + /* K80 */ be_nested_str_weak(get_cluster_list), + /* K81 */ be_nested_str_weak(get_active_endpoints), + /* K82 */ be_nested_str_weak(status), + /* K83 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), }), be_str_weak(read_attribute), &be_const_str_solidified, - ( &(const binstruction[828]) { /* code */ + ( &(const binstruction[842]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0xB8120200, // 0001 GETNGBL R4 K1 0x88100902, // 0002 GETMBR R4 R4 K2 @@ -162,14 +164,14 @@ be_local_closure(Matter_Plugin_Root_read_attribute, /* name */ 0x50280000, // 0035 LDBOOL R10 0 0 0x7C1C0600, // 0036 CALL R7 3 0x80040E00, // 0037 RET 1 R7 - 0x70020301, // 0038 JMP #033B + 0x7002030F, // 0038 JMP #0349 0x541E0031, // 0039 LDINT R7 50 0x1C1C0A07, // 003A EQ R7 R5 R7 0x781E0000, // 003B JMPF R7 #003D - 0x700202FD, // 003C JMP #033B + 0x7002030B, // 003C JMP #0349 0x541E0032, // 003D LDINT R7 51 0x1C1C0A07, // 003E EQ R7 R5 R7 - 0x781E00DA, // 003F JMPF R7 #011B + 0x781E00DC, // 003F JMPF R7 #011D 0x1C1C0D05, // 0040 EQ R7 R6 K5 0x781E00B5, // 0041 JMPF R7 #00F8 0x8C1C0911, // 0042 GETMET R7 R4 K17 @@ -353,587 +355,601 @@ be_local_closure(Matter_Plugin_Root_read_attribute, /* name */ 0x58480009, // 00F4 LDCONST R18 K9 0x7C380800, // 00F5 CALL R14 4 0x80040E00, // 00F6 RET 1 R7 - 0x70020021, // 00F7 JMP #011A + 0x70020023, // 00F7 JMP #011C 0x1C1C0D09, // 00F8 EQ R7 R6 K9 - 0x781E000A, // 00F9 JMPF R7 #0105 + 0x781E000B, // 00F9 JMPF R7 #0106 0x8C1C0906, // 00FA GETMET R7 R4 K6 0x8824090C, // 00FB GETMBR R9 R4 K12 0xB82A2400, // 00FC GETNGBL R10 K18 0x8C281526, // 00FD GETMET R10 R10 K38 0x58300027, // 00FE LDCONST R12 K39 - 0x7C280400, // 00FF CALL R10 2 - 0x94281528, // 0100 GETIDX R10 R10 K40 - 0x94281529, // 0101 GETIDX R10 R10 K41 - 0x7C1C0600, // 0102 CALL R7 3 - 0x80040E00, // 0103 RET 1 R7 - 0x70020014, // 0104 JMP #011A - 0x1C1C0D0D, // 0105 EQ R7 R6 K13 - 0x781E000A, // 0106 JMPF R7 #0112 - 0x8C1C0906, // 0107 GETMET R7 R4 K6 - 0x8824092A, // 0108 GETMBR R9 R4 K42 - 0xB82A2400, // 0109 GETNGBL R10 K18 - 0x8C281526, // 010A GETMET R10 R10 K38 - 0x5830002B, // 010B LDCONST R12 K43 - 0x7C280400, // 010C CALL R10 2 - 0x9428152C, // 010D GETIDX R10 R10 K44 - 0x9428152D, // 010E GETIDX R10 R10 K45 - 0x7C1C0600, // 010F CALL R7 3 - 0x80040E00, // 0110 RET 1 R7 - 0x70020007, // 0111 JMP #011A - 0x541E0007, // 0112 LDINT R7 8 - 0x1C1C0C07, // 0113 EQ R7 R6 R7 - 0x781E0004, // 0114 JMPF R7 #011A - 0x8C1C0906, // 0115 GETMET R7 R4 K6 - 0x88240910, // 0116 GETMBR R9 R4 K16 - 0x50280000, // 0117 LDBOOL R10 0 0 - 0x7C1C0600, // 0118 CALL R7 3 - 0x80040E00, // 0119 RET 1 R7 - 0x7002021F, // 011A JMP #033B - 0x541E0033, // 011B LDINT R7 52 - 0x1C1C0A07, // 011C EQ R7 R5 R7 - 0x781E0000, // 011D JMPF R7 #011F - 0x7002021B, // 011E JMP #033B - 0x541E0037, // 011F LDINT R7 56 - 0x1C1C0A07, // 0120 EQ R7 R5 R7 - 0x781E002C, // 0121 JMPF R7 #014F - 0x1C1C0D05, // 0122 EQ R7 R6 K5 - 0x781E000F, // 0123 JMPF R7 #0134 - 0xB81E5C00, // 0124 GETNGBL R7 K46 - 0xB8222400, // 0125 GETNGBL R8 K18 - 0x8C20112F, // 0126 GETMET R8 R8 K47 - 0x7C200200, // 0127 CALL R8 1 - 0x94201130, // 0128 GETIDX R8 R8 K48 - 0x7C1C0200, // 0129 CALL R7 1 - 0xB8225C00, // 012A GETNGBL R8 K46 - 0x58240031, // 012B LDCONST R9 K49 - 0x7C200200, // 012C CALL R8 1 - 0x081C0E08, // 012D MUL R7 R7 R8 - 0x8C200906, // 012E GETMET R8 R4 K6 - 0x88280907, // 012F GETMBR R10 R4 K7 - 0x5C2C0E00, // 0130 MOVE R11 R7 - 0x7C200600, // 0131 CALL R8 3 - 0x80041000, // 0132 RET 1 R8 - 0x70020019, // 0133 JMP #014E - 0x1C1C0D09, // 0134 EQ R7 R6 K9 - 0x781E0005, // 0135 JMPF R7 #013C - 0x8C1C0906, // 0136 GETMET R7 R4 K6 - 0x8824090E, // 0137 GETMBR R9 R4 K14 - 0x5828000F, // 0138 LDCONST R10 K15 - 0x7C1C0600, // 0139 CALL R7 3 - 0x80040E00, // 013A RET 1 R7 - 0x70020011, // 013B JMP #014E - 0x541E0006, // 013C LDINT R7 7 - 0x1C1C0C07, // 013D EQ R7 R6 R7 - 0x781E000E, // 013E JMPF R7 #014E - 0xB81E5C00, // 013F GETNGBL R7 K46 - 0xB8222400, // 0140 GETNGBL R8 K18 - 0x8C20112F, // 0141 GETMET R8 R8 K47 - 0x7C200200, // 0142 CALL R8 1 - 0x94201132, // 0143 GETIDX R8 R8 K50 - 0x7C1C0200, // 0144 CALL R7 1 - 0xB8225C00, // 0145 GETNGBL R8 K46 - 0x58240031, // 0146 LDCONST R9 K49 - 0x7C200200, // 0147 CALL R8 1 - 0x081C0E08, // 0148 MUL R7 R7 R8 - 0x8C200906, // 0149 GETMET R8 R4 K6 - 0x88280907, // 014A GETMBR R10 R4 K7 - 0x5C2C0E00, // 014B MOVE R11 R7 - 0x7C200600, // 014C CALL R8 3 - 0x80041000, // 014D RET 1 R8 - 0x700201EB, // 014E JMP #033B - 0x541E003D, // 014F LDINT R7 62 - 0x1C1C0A07, // 0150 EQ R7 R5 R7 - 0x781E0082, // 0151 JMPF R7 #01D5 - 0x1C1C0D05, // 0152 EQ R7 R6 K5 - 0x781E001D, // 0153 JMPF R7 #0172 - 0x8C1C0911, // 0154 GETMET R7 R4 K17 - 0x7C1C0200, // 0155 CALL R7 1 - 0x60200010, // 0156 GETGBL R8 G16 - 0x88240133, // 0157 GETMBR R9 R0 K51 - 0x88241334, // 0158 GETMBR R9 R9 K52 - 0x8C241335, // 0159 GETMET R9 R9 K53 - 0x7C240200, // 015A CALL R9 1 - 0x7C200200, // 015B CALL R8 1 - 0xA802000F, // 015C EXBLK 0 #016D - 0x5C241000, // 015D MOVE R9 R8 - 0x7C240000, // 015E CALL R9 0 - 0x8C280F15, // 015F GETMET R10 R7 K21 - 0x4C300000, // 0160 LDNIL R12 - 0x7C280400, // 0161 CALL R10 2 - 0x8C2C150B, // 0162 GETMET R11 R10 K11 - 0x58340009, // 0163 LDCONST R13 K9 - 0x88380936, // 0164 GETMBR R14 R4 K54 - 0x883C1337, // 0165 GETMBR R15 R9 K55 - 0x7C2C0800, // 0166 CALL R11 4 - 0x8C2C150B, // 0167 GETMET R11 R10 K11 - 0x5834000D, // 0168 LDCONST R13 K13 - 0x88380936, // 0169 GETMBR R14 R4 K54 - 0x883C1338, // 016A GETMBR R15 R9 K56 - 0x7C2C0800, // 016B CALL R11 4 - 0x7001FFEF, // 016C JMP #015D - 0x58200039, // 016D LDCONST R8 K57 - 0xAC200200, // 016E CATCH R8 1 0 - 0xB0080000, // 016F RAISE 2 R0 R0 - 0x80040E00, // 0170 RET 1 R7 - 0x70020061, // 0171 JMP #01D4 - 0x1C1C0D09, // 0172 EQ R7 R6 K9 - 0x781E0032, // 0173 JMPF R7 #01A7 - 0x8C1C0911, // 0174 GETMET R7 R4 K17 - 0x7C1C0200, // 0175 CALL R7 1 - 0x60200010, // 0176 GETGBL R8 G16 - 0x88240133, // 0177 GETMBR R9 R0 K51 - 0x88241334, // 0178 GETMBR R9 R9 K52 - 0x8C241335, // 0179 GETMET R9 R9 K53 - 0x7C240200, // 017A CALL R9 1 - 0x7C200200, // 017B CALL R8 1 - 0xA8020024, // 017C EXBLK 0 #01A2 - 0x5C241000, // 017D MOVE R9 R8 - 0x7C240000, // 017E CALL R9 0 - 0x8C28093A, // 017F GETMET R10 R4 K58 - 0x8C30133B, // 0180 GETMET R12 R9 K59 - 0x7C300200, // 0181 CALL R12 1 - 0x7C280400, // 0182 CALL R10 2 - 0x8C2C0F15, // 0183 GETMET R11 R7 K21 - 0x4C340000, // 0184 LDNIL R13 - 0x7C2C0400, // 0185 CALL R11 2 - 0x8C30170B, // 0186 GETMET R12 R11 K11 - 0x58380009, // 0187 LDCONST R14 K9 - 0x883C0936, // 0188 GETMBR R15 R4 K54 - 0x8C40153C, // 0189 GETMET R16 R10 K60 - 0x544A0008, // 018A LDINT R18 9 - 0x7C400400, // 018B CALL R16 2 - 0x7C300800, // 018C CALL R12 4 - 0x8C30170B, // 018D GETMET R12 R11 K11 - 0x5838000D, // 018E LDCONST R14 K13 - 0x883C090C, // 018F GETMBR R15 R4 K12 - 0x8840133D, // 0190 GETMBR R16 R9 K61 - 0x7C300800, // 0191 CALL R12 4 - 0x8C30170B, // 0192 GETMET R12 R11 K11 - 0x5838000F, // 0193 LDCONST R14 K15 - 0x883C0907, // 0194 GETMBR R15 R4 K7 - 0x8840133E, // 0195 GETMBR R16 R9 K62 + 0x50340200, // 00FF LDBOOL R13 1 0 + 0x7C280600, // 0100 CALL R10 3 + 0x94281528, // 0101 GETIDX R10 R10 K40 + 0x94281529, // 0102 GETIDX R10 R10 K41 + 0x7C1C0600, // 0103 CALL R7 3 + 0x80040E00, // 0104 RET 1 R7 + 0x70020015, // 0105 JMP #011C + 0x1C1C0D0D, // 0106 EQ R7 R6 K13 + 0x781E000B, // 0107 JMPF R7 #0114 + 0x8C1C0906, // 0108 GETMET R7 R4 K6 + 0x8824092A, // 0109 GETMBR R9 R4 K42 + 0xB82A2400, // 010A GETNGBL R10 K18 + 0x8C281526, // 010B GETMET R10 R10 K38 + 0x5830002B, // 010C LDCONST R12 K43 + 0x50340200, // 010D LDBOOL R13 1 0 + 0x7C280600, // 010E CALL R10 3 + 0x9428152C, // 010F GETIDX R10 R10 K44 + 0x9428152D, // 0110 GETIDX R10 R10 K45 + 0x7C1C0600, // 0111 CALL R7 3 + 0x80040E00, // 0112 RET 1 R7 + 0x70020007, // 0113 JMP #011C + 0x541E0007, // 0114 LDINT R7 8 + 0x1C1C0C07, // 0115 EQ R7 R6 R7 + 0x781E0004, // 0116 JMPF R7 #011C + 0x8C1C0906, // 0117 GETMET R7 R4 K6 + 0x88240910, // 0118 GETMBR R9 R4 K16 + 0x50280000, // 0119 LDBOOL R10 0 0 + 0x7C1C0600, // 011A CALL R7 3 + 0x80040E00, // 011B RET 1 R7 + 0x7002022B, // 011C JMP #0349 + 0x541E0033, // 011D LDINT R7 52 + 0x1C1C0A07, // 011E EQ R7 R5 R7 + 0x781E0000, // 011F JMPF R7 #0121 + 0x70020227, // 0120 JMP #0349 + 0x541E0037, // 0121 LDINT R7 56 + 0x1C1C0A07, // 0122 EQ R7 R5 R7 + 0x781E002C, // 0123 JMPF R7 #0151 + 0x1C1C0D05, // 0124 EQ R7 R6 K5 + 0x781E000F, // 0125 JMPF R7 #0136 + 0xB81E5C00, // 0126 GETNGBL R7 K46 + 0xB8222400, // 0127 GETNGBL R8 K18 + 0x8C20112F, // 0128 GETMET R8 R8 K47 + 0x7C200200, // 0129 CALL R8 1 + 0x94201130, // 012A GETIDX R8 R8 K48 + 0x7C1C0200, // 012B CALL R7 1 + 0xB8225C00, // 012C GETNGBL R8 K46 + 0x58240031, // 012D LDCONST R9 K49 + 0x7C200200, // 012E CALL R8 1 + 0x081C0E08, // 012F MUL R7 R7 R8 + 0x8C200906, // 0130 GETMET R8 R4 K6 + 0x88280907, // 0131 GETMBR R10 R4 K7 + 0x5C2C0E00, // 0132 MOVE R11 R7 + 0x7C200600, // 0133 CALL R8 3 + 0x80041000, // 0134 RET 1 R8 + 0x70020019, // 0135 JMP #0150 + 0x1C1C0D09, // 0136 EQ R7 R6 K9 + 0x781E0005, // 0137 JMPF R7 #013E + 0x8C1C0906, // 0138 GETMET R7 R4 K6 + 0x8824090E, // 0139 GETMBR R9 R4 K14 + 0x5828000F, // 013A LDCONST R10 K15 + 0x7C1C0600, // 013B CALL R7 3 + 0x80040E00, // 013C RET 1 R7 + 0x70020011, // 013D JMP #0150 + 0x541E0006, // 013E LDINT R7 7 + 0x1C1C0C07, // 013F EQ R7 R6 R7 + 0x781E000E, // 0140 JMPF R7 #0150 + 0xB81E5C00, // 0141 GETNGBL R7 K46 + 0xB8222400, // 0142 GETNGBL R8 K18 + 0x8C20112F, // 0143 GETMET R8 R8 K47 + 0x7C200200, // 0144 CALL R8 1 + 0x94201132, // 0145 GETIDX R8 R8 K50 + 0x7C1C0200, // 0146 CALL R7 1 + 0xB8225C00, // 0147 GETNGBL R8 K46 + 0x58240031, // 0148 LDCONST R9 K49 + 0x7C200200, // 0149 CALL R8 1 + 0x081C0E08, // 014A MUL R7 R7 R8 + 0x8C200906, // 014B GETMET R8 R4 K6 + 0x88280907, // 014C GETMBR R10 R4 K7 + 0x5C2C0E00, // 014D MOVE R11 R7 + 0x7C200600, // 014E CALL R8 3 + 0x80041000, // 014F RET 1 R8 + 0x700201F7, // 0150 JMP #0349 + 0x541E003D, // 0151 LDINT R7 62 + 0x1C1C0A07, // 0152 EQ R7 R5 R7 + 0x781E008A, // 0153 JMPF R7 #01DF + 0x1C1C0D05, // 0154 EQ R7 R6 K5 + 0x781E001F, // 0155 JMPF R7 #0176 + 0x8C1C0911, // 0156 GETMET R7 R4 K17 + 0x7C1C0200, // 0157 CALL R7 1 + 0x60200010, // 0158 GETGBL R8 G16 + 0x88240133, // 0159 GETMBR R9 R0 K51 + 0x88241334, // 015A GETMBR R9 R9 K52 + 0x8C241335, // 015B GETMET R9 R9 K53 + 0x7C240200, // 015C CALL R9 1 + 0x7C200200, // 015D CALL R8 1 + 0xA8020011, // 015E EXBLK 0 #0171 + 0x5C241000, // 015F MOVE R9 R8 + 0x7C240000, // 0160 CALL R9 0 + 0x8C280F15, // 0161 GETMET R10 R7 K21 + 0x4C300000, // 0162 LDNIL R12 + 0x7C280400, // 0163 CALL R10 2 + 0x8C2C150B, // 0164 GETMET R11 R10 K11 + 0x58340009, // 0165 LDCONST R13 K9 + 0x88380936, // 0166 GETMBR R14 R4 K54 + 0x8C3C1337, // 0167 GETMET R15 R9 K55 + 0x7C3C0200, // 0168 CALL R15 1 + 0x7C2C0800, // 0169 CALL R11 4 + 0x8C2C150B, // 016A GETMET R11 R10 K11 + 0x5834000D, // 016B LDCONST R13 K13 + 0x88380936, // 016C GETMBR R14 R4 K54 + 0x8C3C1338, // 016D GETMET R15 R9 K56 + 0x7C3C0200, // 016E CALL R15 1 + 0x7C2C0800, // 016F CALL R11 4 + 0x7001FFED, // 0170 JMP #015F + 0x58200039, // 0171 LDCONST R8 K57 + 0xAC200200, // 0172 CATCH R8 1 0 + 0xB0080000, // 0173 RAISE 2 R0 R0 + 0x80040E00, // 0174 RET 1 R7 + 0x70020067, // 0175 JMP #01DE + 0x1C1C0D09, // 0176 EQ R7 R6 K9 + 0x781E0036, // 0177 JMPF R7 #01AF + 0x8C1C0911, // 0178 GETMET R7 R4 K17 + 0x7C1C0200, // 0179 CALL R7 1 + 0x60200010, // 017A GETGBL R8 G16 + 0x88240133, // 017B GETMBR R9 R0 K51 + 0x88241334, // 017C GETMBR R9 R9 K52 + 0x8C241335, // 017D GETMET R9 R9 K53 + 0x7C240200, // 017E CALL R9 1 + 0x7C200200, // 017F CALL R8 1 + 0xA8020028, // 0180 EXBLK 0 #01AA + 0x5C241000, // 0181 MOVE R9 R8 + 0x7C240000, // 0182 CALL R9 0 + 0x8C28093A, // 0183 GETMET R10 R4 K58 + 0x8C30133B, // 0184 GETMET R12 R9 K59 + 0x7C300200, // 0185 CALL R12 1 + 0x7C280400, // 0186 CALL R10 2 + 0x8C2C0F15, // 0187 GETMET R11 R7 K21 + 0x4C340000, // 0188 LDNIL R13 + 0x7C2C0400, // 0189 CALL R11 2 + 0x8C30170B, // 018A GETMET R12 R11 K11 + 0x58380009, // 018B LDCONST R14 K9 + 0x883C0936, // 018C GETMBR R15 R4 K54 + 0x8C40153C, // 018D GETMET R16 R10 K60 + 0x544A0008, // 018E LDINT R18 9 + 0x7C400400, // 018F CALL R16 2 + 0x7C300800, // 0190 CALL R12 4 + 0x8C30170B, // 0191 GETMET R12 R11 K11 + 0x5838000D, // 0192 LDCONST R14 K13 + 0x883C090C, // 0193 GETMBR R15 R4 K12 + 0x8C40133D, // 0194 GETMET R16 R9 K61 + 0x7C400200, // 0195 CALL R16 1 0x7C300800, // 0196 CALL R12 4 0x8C30170B, // 0197 GETMET R12 R11 K11 - 0x543A0003, // 0198 LDINT R14 4 + 0x5838000F, // 0198 LDCONST R14 K15 0x883C0907, // 0199 GETMBR R15 R4 K7 - 0x8840133F, // 019A GETMBR R16 R9 K63 - 0x7C300800, // 019B CALL R12 4 - 0x8C30170B, // 019C GETMET R12 R11 K11 - 0x543A0004, // 019D LDINT R14 5 - 0x883C0916, // 019E GETMBR R15 R4 K22 - 0x88401340, // 019F GETMBR R16 R9 K64 - 0x7C300800, // 01A0 CALL R12 4 - 0x7001FFDA, // 01A1 JMP #017D - 0x58200039, // 01A2 LDCONST R8 K57 - 0xAC200200, // 01A3 CATCH R8 1 0 - 0xB0080000, // 01A4 RAISE 2 R0 R0 - 0x80040E00, // 01A5 RET 1 R7 - 0x7002002C, // 01A6 JMP #01D4 - 0x1C1C0D0D, // 01A7 EQ R7 R6 K13 - 0x781E0005, // 01A8 JMPF R7 #01AF - 0x8C1C0906, // 01A9 GETMET R7 R4 K6 - 0x8824090E, // 01AA GETMBR R9 R4 K14 - 0x542A0004, // 01AB LDINT R10 5 - 0x7C1C0600, // 01AC CALL R7 3 + 0x8C40133E, // 019A GETMET R16 R9 K62 + 0x7C400200, // 019B CALL R16 1 + 0x7C300800, // 019C CALL R12 4 + 0x8C30170B, // 019D GETMET R12 R11 K11 + 0x543A0003, // 019E LDINT R14 4 + 0x883C0907, // 019F GETMBR R15 R4 K7 + 0x8C40133F, // 01A0 GETMET R16 R9 K63 + 0x7C400200, // 01A1 CALL R16 1 + 0x7C300800, // 01A2 CALL R12 4 + 0x8C30170B, // 01A3 GETMET R12 R11 K11 + 0x543A0004, // 01A4 LDINT R14 5 + 0x883C0916, // 01A5 GETMBR R15 R4 K22 + 0x8C401340, // 01A6 GETMET R16 R9 K64 + 0x7C400200, // 01A7 CALL R16 1 + 0x7C300800, // 01A8 CALL R12 4 + 0x7001FFD6, // 01A9 JMP #0181 + 0x58200039, // 01AA LDCONST R8 K57 + 0xAC200200, // 01AB CATCH R8 1 0 + 0xB0080000, // 01AC RAISE 2 R0 R0 0x80040E00, // 01AD RET 1 R7 - 0x70020024, // 01AE JMP #01D4 - 0x1C1C0D0F, // 01AF EQ R7 R6 K15 - 0x781E000B, // 01B0 JMPF R7 #01BD - 0x881C0133, // 01B1 GETMBR R7 R0 K51 - 0x881C0F34, // 01B2 GETMBR R7 R7 K52 - 0x8C1C0F35, // 01B3 GETMET R7 R7 K53 - 0x7C1C0200, // 01B4 CALL R7 1 - 0x8C200906, // 01B5 GETMET R8 R4 K6 - 0x8828090E, // 01B6 GETMBR R10 R4 K14 - 0x602C000C, // 01B7 GETGBL R11 G12 - 0x5C300E00, // 01B8 MOVE R12 R7 - 0x7C2C0200, // 01B9 CALL R11 1 - 0x7C200600, // 01BA CALL R8 3 - 0x80041000, // 01BB RET 1 R8 - 0x70020016, // 01BC JMP #01D4 - 0x541E0003, // 01BD LDINT R7 4 - 0x1C1C0C07, // 01BE EQ R7 R6 R7 - 0x781E0000, // 01BF JMPF R7 #01C1 - 0x70020012, // 01C0 JMP #01D4 - 0x541E0004, // 01C1 LDINT R7 5 - 0x1C1C0C07, // 01C2 EQ R7 R6 R7 - 0x781E000F, // 01C3 JMPF R7 #01D4 - 0x881C0133, // 01C4 GETMBR R7 R0 K51 - 0x881C0F34, // 01C5 GETMBR R7 R7 K52 - 0x8C1C0F35, // 01C6 GETMET R7 R7 K53 - 0x7C1C0200, // 01C7 CALL R7 1 - 0x8C200F1B, // 01C8 GETMET R8 R7 K27 - 0x5C280200, // 01C9 MOVE R10 R1 - 0x7C200400, // 01CA CALL R8 2 - 0x4C240000, // 01CB LDNIL R9 - 0x1C241009, // 01CC EQ R9 R8 R9 - 0x78260000, // 01CD JMPF R9 #01CF - 0x5421FFFE, // 01CE LDINT R8 -1 - 0x8C240906, // 01CF GETMET R9 R4 K6 - 0x882C090E, // 01D0 GETMBR R11 R4 K14 - 0x00301109, // 01D1 ADD R12 R8 K9 - 0x7C240600, // 01D2 CALL R9 3 - 0x80041200, // 01D3 RET 1 R9 - 0x70020165, // 01D4 JMP #033B - 0x541E003B, // 01D5 LDINT R7 60 - 0x1C1C0A07, // 01D6 EQ R7 R5 R7 - 0x781E0000, // 01D7 JMPF R7 #01D9 - 0x70020161, // 01D8 JMP #033B - 0x541E0027, // 01D9 LDINT R7 40 - 0x1C1C0A07, // 01DA EQ R7 R5 R7 - 0x781E0091, // 01DB JMPF R7 #026E - 0x1C1C0D05, // 01DC EQ R7 R6 K5 - 0x781E0005, // 01DD JMPF R7 #01E4 - 0x8C1C0906, // 01DE GETMET R7 R4 K6 - 0x8824090C, // 01DF GETMBR R9 R4 K12 - 0x58280005, // 01E0 LDCONST R10 K5 - 0x7C1C0600, // 01E1 CALL R7 3 - 0x80040E00, // 01E2 RET 1 R7 - 0x70020088, // 01E3 JMP #026D - 0x1C1C0D09, // 01E4 EQ R7 R6 K9 - 0x781E0005, // 01E5 JMPF R7 #01EC - 0x8C1C0906, // 01E6 GETMET R7 R4 K6 - 0x88240916, // 01E7 GETMBR R9 R4 K22 - 0x58280041, // 01E8 LDCONST R10 K65 - 0x7C1C0600, // 01E9 CALL R7 3 - 0x80040E00, // 01EA RET 1 R7 - 0x70020080, // 01EB JMP #026D - 0x1C1C0D0D, // 01EC EQ R7 R6 K13 - 0x781E0006, // 01ED JMPF R7 #01F5 - 0x8C1C0906, // 01EE GETMET R7 R4 K6 - 0x8824090C, // 01EF GETMBR R9 R4 K12 - 0x88280133, // 01F0 GETMBR R10 R0 K51 - 0x88281542, // 01F1 GETMBR R10 R10 K66 - 0x7C1C0600, // 01F2 CALL R7 3 - 0x80040E00, // 01F3 RET 1 R7 - 0x70020077, // 01F4 JMP #026D - 0x1C1C0D0F, // 01F5 EQ R7 R6 K15 - 0x781E0009, // 01F6 JMPF R7 #0201 - 0x8C1C0906, // 01F7 GETMET R7 R4 K6 - 0x88240916, // 01F8 GETMBR R9 R4 K22 - 0xB82A2400, // 01F9 GETNGBL R10 K18 - 0x8C281526, // 01FA GETMET R10 R10 K38 - 0x58300043, // 01FB LDCONST R12 K67 - 0x7C280400, // 01FC CALL R10 2 - 0x94281543, // 01FD GETIDX R10 R10 K67 - 0x7C1C0600, // 01FE CALL R7 3 - 0x80040E00, // 01FF RET 1 R7 - 0x7002006B, // 0200 JMP #026D - 0x541E0003, // 0201 LDINT R7 4 - 0x1C1C0C07, // 0202 EQ R7 R6 R7 - 0x781E0005, // 0203 JMPF R7 #020A - 0x8C1C0906, // 0204 GETMET R7 R4 K6 - 0x8824090C, // 0205 GETMBR R9 R4 K12 - 0x542A7FFF, // 0206 LDINT R10 32768 - 0x7C1C0600, // 0207 CALL R7 3 - 0x80040E00, // 0208 RET 1 R7 - 0x70020062, // 0209 JMP #026D - 0x541E0004, // 020A LDINT R7 5 - 0x1C1C0C07, // 020B EQ R7 R6 R7 - 0x781E0009, // 020C JMPF R7 #0217 - 0x8C1C0906, // 020D GETMET R7 R4 K6 - 0x88240916, // 020E GETMBR R9 R4 K22 - 0xB82A2400, // 020F GETNGBL R10 K18 - 0x8C281526, // 0210 GETMET R10 R10 K38 - 0x58300044, // 0211 LDCONST R12 K68 - 0x7C280400, // 0212 CALL R10 2 - 0x94281545, // 0213 GETIDX R10 R10 K69 - 0x7C1C0600, // 0214 CALL R7 3 - 0x80040E00, // 0215 RET 1 R7 - 0x70020055, // 0216 JMP #026D - 0x541E0005, // 0217 LDINT R7 6 - 0x1C1C0C07, // 0218 EQ R7 R6 R7 - 0x781E0005, // 0219 JMPF R7 #0220 - 0x8C1C0906, // 021A GETMET R7 R4 K6 - 0x88240916, // 021B GETMBR R9 R4 K22 - 0x58280046, // 021C LDCONST R10 K70 - 0x7C1C0600, // 021D CALL R7 3 - 0x80040E00, // 021E RET 1 R7 - 0x7002004C, // 021F JMP #026D - 0x541E0006, // 0220 LDINT R7 7 - 0x1C1C0C07, // 0221 EQ R7 R6 R7 - 0x781E0005, // 0222 JMPF R7 #0229 - 0x8C1C0906, // 0223 GETMET R7 R4 K6 - 0x8824090C, // 0224 GETMBR R9 R4 K12 - 0x58280005, // 0225 LDCONST R10 K5 - 0x7C1C0600, // 0226 CALL R7 3 - 0x80040E00, // 0227 RET 1 R7 - 0x70020043, // 0228 JMP #026D - 0x541E0007, // 0229 LDINT R7 8 - 0x1C1C0C07, // 022A EQ R7 R6 R7 - 0x781E000A, // 022B JMPF R7 #0237 - 0x8C1C0906, // 022C GETMET R7 R4 K6 - 0x88240916, // 022D GETMBR R9 R4 K22 - 0xB82A2400, // 022E GETNGBL R10 K18 - 0x8C281526, // 022F GETMET R10 R10 K38 - 0x58300047, // 0230 LDCONST R12 K71 - 0x7C280400, // 0231 CALL R10 2 - 0x94281548, // 0232 GETIDX R10 R10 K72 - 0x94281549, // 0233 GETIDX R10 R10 K73 - 0x7C1C0600, // 0234 CALL R7 3 - 0x80040E00, // 0235 RET 1 R7 - 0x70020035, // 0236 JMP #026D - 0x541E0008, // 0237 LDINT R7 9 - 0x1C1C0C07, // 0238 EQ R7 R6 R7 - 0x781E0005, // 0239 JMPF R7 #0240 - 0x8C1C0906, // 023A GETMET R7 R4 K6 - 0x8824090C, // 023B GETMBR R9 R4 K12 - 0x58280009, // 023C LDCONST R10 K9 - 0x7C1C0600, // 023D CALL R7 3 - 0x80040E00, // 023E RET 1 R7 - 0x7002002C, // 023F JMP #026D - 0x541E0009, // 0240 LDINT R7 10 - 0x1C1C0C07, // 0241 EQ R7 R6 R7 - 0x781E000A, // 0242 JMPF R7 #024E - 0x8C1C0906, // 0243 GETMET R7 R4 K6 - 0x88240916, // 0244 GETMBR R9 R4 K22 - 0xB82A2400, // 0245 GETNGBL R10 K18 - 0x8C281526, // 0246 GETMET R10 R10 K38 - 0x58300047, // 0247 LDCONST R12 K71 - 0x7C280400, // 0248 CALL R10 2 - 0x94281548, // 0249 GETIDX R10 R10 K72 - 0x9428154A, // 024A GETIDX R10 R10 K74 - 0x7C1C0600, // 024B CALL R7 3 - 0x80040E00, // 024C RET 1 R7 - 0x7002001E, // 024D JMP #026D - 0x541E0011, // 024E LDINT R7 18 - 0x1C1C0C07, // 024F EQ R7 R6 R7 - 0x781E000B, // 0250 JMPF R7 #025D - 0x8C1C0906, // 0251 GETMET R7 R4 K6 - 0x88240916, // 0252 GETMBR R9 R4 K22 - 0xB82A2400, // 0253 GETNGBL R10 K18 - 0x8C281525, // 0254 GETMET R10 R10 K37 - 0x7C280200, // 0255 CALL R10 1 - 0x8C28151B, // 0256 GETMET R10 R10 K27 - 0x5830001C, // 0257 LDCONST R12 K28 - 0x5834001D, // 0258 LDCONST R13 K29 - 0x7C280600, // 0259 CALL R10 3 - 0x7C1C0600, // 025A CALL R7 3 - 0x80040E00, // 025B RET 1 R7 - 0x7002000F, // 025C JMP #026D - 0x541E0012, // 025D LDINT R7 19 - 0x1C1C0C07, // 025E EQ R7 R6 R7 - 0x781E000C, // 025F JMPF R7 #026D - 0x8C1C090A, // 0260 GETMET R7 R4 K10 - 0x7C1C0200, // 0261 CALL R7 1 - 0x8C200F0B, // 0262 GETMET R8 R7 K11 - 0x58280005, // 0263 LDCONST R10 K5 - 0x882C090C, // 0264 GETMBR R11 R4 K12 - 0x5830000F, // 0265 LDCONST R12 K15 - 0x7C200800, // 0266 CALL R8 4 - 0x8C200F0B, // 0267 GETMET R8 R7 K11 - 0x58280009, // 0268 LDCONST R10 K9 - 0x882C090C, // 0269 GETMBR R11 R4 K12 - 0x5830000F, // 026A LDCONST R12 K15 - 0x7C200800, // 026B CALL R8 4 - 0x80040E00, // 026C RET 1 R7 - 0x700200CC, // 026D JMP #033B - 0x541E003E, // 026E LDINT R7 63 - 0x1C1C0A07, // 026F EQ R7 R5 R7 - 0x781E0000, // 0270 JMPF R7 #0272 - 0x700200C8, // 0271 JMP #033B - 0x541E0029, // 0272 LDINT R7 42 - 0x1C1C0A07, // 0273 EQ R7 R5 R7 - 0x781E001D, // 0274 JMPF R7 #0293 - 0x1C1C0D05, // 0275 EQ R7 R6 K5 - 0x781E0003, // 0276 JMPF R7 #027B - 0x8C1C0911, // 0277 GETMET R7 R4 K17 - 0x7C1C0200, // 0278 CALL R7 1 - 0x80040E00, // 0279 RET 1 R7 - 0x70020016, // 027A JMP #0292 - 0x1C1C0D09, // 027B EQ R7 R6 K9 - 0x781E0005, // 027C JMPF R7 #0283 - 0x8C1C0906, // 027D GETMET R7 R4 K6 - 0x88240910, // 027E GETMBR R9 R4 K16 - 0x58280005, // 027F LDCONST R10 K5 - 0x7C1C0600, // 0280 CALL R7 3 - 0x80040E00, // 0281 RET 1 R7 - 0x7002000E, // 0282 JMP #0292 - 0x1C1C0D0D, // 0283 EQ R7 R6 K13 - 0x781E0005, // 0284 JMPF R7 #028B - 0x8C1C0906, // 0285 GETMET R7 R4 K6 - 0x8824090E, // 0286 GETMBR R9 R4 K14 - 0x58280009, // 0287 LDCONST R10 K9 - 0x7C1C0600, // 0288 CALL R7 3 - 0x80040E00, // 0289 RET 1 R7 - 0x70020006, // 028A JMP #0292 - 0x1C1C0D0F, // 028B EQ R7 R6 K15 - 0x781E0004, // 028C JMPF R7 #0292 - 0x8C1C0906, // 028D GETMET R7 R4 K6 - 0x88240918, // 028E GETMBR R9 R4 K24 - 0x4C280000, // 028F LDNIL R10 - 0x7C1C0600, // 0290 CALL R7 3 - 0x80040E00, // 0291 RET 1 R7 - 0x700200A7, // 0292 JMP #033B - 0x541E002A, // 0293 LDINT R7 43 - 0x1C1C0A07, // 0294 EQ R7 R5 R7 - 0x781E0016, // 0295 JMPF R7 #02AD - 0x1C1C0D05, // 0296 EQ R7 R6 K5 - 0x781E0007, // 0297 JMPF R7 #02A0 - 0x8C1C0906, // 0298 GETMET R7 R4 K6 - 0x88240916, // 0299 GETMBR R9 R4 K22 - 0xB82A2400, // 029A GETNGBL R10 K18 - 0x8C28154B, // 029B GETMET R10 R10 K75 - 0x7C280200, // 029C CALL R10 1 - 0x7C1C0600, // 029D CALL R7 3 - 0x80040E00, // 029E RET 1 R7 - 0x7002000B, // 029F JMP #02AC - 0x1C1C0D09, // 02A0 EQ R7 R6 K9 - 0x781E0009, // 02A1 JMPF R7 #02AC - 0x8C1C0911, // 02A2 GETMET R7 R4 K17 - 0x7C1C0200, // 02A3 CALL R7 1 - 0x8C200F0B, // 02A4 GETMET R8 R7 K11 - 0x4C280000, // 02A5 LDNIL R10 - 0x882C0916, // 02A6 GETMBR R11 R4 K22 - 0xB8322400, // 02A7 GETNGBL R12 K18 - 0x8C30194B, // 02A8 GETMET R12 R12 K75 - 0x7C300200, // 02A9 CALL R12 1 - 0x7C200800, // 02AA CALL R8 4 - 0x80040E00, // 02AB RET 1 R7 - 0x7002008D, // 02AC JMP #033B - 0x541E002B, // 02AD LDINT R7 44 - 0x1C1C0A07, // 02AE EQ R7 R5 R7 - 0x781E001C, // 02AF JMPF R7 #02CD - 0x1C1C0D05, // 02B0 EQ R7 R6 K5 - 0x781E0005, // 02B1 JMPF R7 #02B8 - 0x8C1C0906, // 02B2 GETMET R7 R4 K6 - 0x8824090E, // 02B3 GETMBR R9 R4 K14 - 0x58280009, // 02B4 LDCONST R10 K9 - 0x7C1C0600, // 02B5 CALL R7 3 - 0x80040E00, // 02B6 RET 1 R7 - 0x70020013, // 02B7 JMP #02CC - 0x1C1C0D09, // 02B8 EQ R7 R6 K9 - 0x781E0005, // 02B9 JMPF R7 #02C0 - 0x8C1C0906, // 02BA GETMET R7 R4 K6 - 0x8824090E, // 02BB GETMBR R9 R4 K14 - 0x542A0003, // 02BC LDINT R10 4 - 0x7C1C0600, // 02BD CALL R7 3 - 0x80040E00, // 02BE RET 1 R7 - 0x7002000B, // 02BF JMP #02CC - 0x1C1C0D0D, // 02C0 EQ R7 R6 K13 - 0x781E0009, // 02C1 JMPF R7 #02CC - 0x8C1C0911, // 02C2 GETMET R7 R4 K17 - 0x7C1C0200, // 02C3 CALL R7 1 - 0x8C200F0B, // 02C4 GETMET R8 R7 K11 - 0x4C280000, // 02C5 LDNIL R10 - 0x8C2C0906, // 02C6 GETMET R11 R4 K6 - 0x8834090E, // 02C7 GETMBR R13 R4 K14 - 0x543A0003, // 02C8 LDINT R14 4 - 0x7C2C0600, // 02C9 CALL R11 3 - 0x7C200600, // 02CA CALL R8 3 - 0x80040E00, // 02CB RET 1 R7 - 0x7002006D, // 02CC JMP #033B - 0x541E0030, // 02CD LDINT R7 49 - 0x1C1C0A07, // 02CE EQ R7 R5 R7 - 0x781E0010, // 02CF JMPF R7 #02E1 - 0x1C1C0D0F, // 02D0 EQ R7 R6 K15 - 0x781E0005, // 02D1 JMPF R7 #02D8 - 0x8C1C0906, // 02D2 GETMET R7 R4 K6 - 0x8824090E, // 02D3 GETMBR R9 R4 K14 - 0x542A001D, // 02D4 LDINT R10 30 - 0x7C1C0600, // 02D5 CALL R7 3 - 0x80040E00, // 02D6 RET 1 R7 - 0x70020007, // 02D7 JMP #02E0 - 0x541EFFFB, // 02D8 LDINT R7 65532 - 0x1C1C0C07, // 02D9 EQ R7 R6 R7 - 0x781E0004, // 02DA JMPF R7 #02E0 - 0x8C1C0906, // 02DB GETMET R7 R4 K6 - 0x8824092A, // 02DC GETMBR R9 R4 K42 - 0x58280005, // 02DD LDCONST R10 K5 - 0x7C1C0600, // 02DE CALL R7 3 - 0x80040E00, // 02DF RET 1 R7 - 0x70020059, // 02E0 JMP #033B - 0x541E001C, // 02E1 LDINT R7 29 - 0x1C1C0A07, // 02E2 EQ R7 R5 R7 - 0x781E0053, // 02E3 JMPF R7 #0338 - 0x1C1C0D05, // 02E4 EQ R7 R6 K5 - 0x781E001C, // 02E5 JMPF R7 #0303 - 0x8C1C0911, // 02E6 GETMET R7 R4 K17 - 0x7C1C0200, // 02E7 CALL R7 1 - 0x60200010, // 02E8 GETGBL R8 G16 - 0x8824014C, // 02E9 GETMBR R9 R0 K76 - 0x8C24134D, // 02EA GETMET R9 R9 K77 - 0x7C240200, // 02EB CALL R9 1 - 0x7C200200, // 02EC CALL R8 1 - 0xA802000F, // 02ED EXBLK 0 #02FE - 0x5C241000, // 02EE MOVE R9 R8 - 0x7C240000, // 02EF CALL R9 0 - 0x8C280F15, // 02F0 GETMET R10 R7 K21 - 0x7C280200, // 02F1 CALL R10 1 - 0x8C2C150B, // 02F2 GETMET R11 R10 K11 - 0x58340005, // 02F3 LDCONST R13 K5 - 0x8838090C, // 02F4 GETMBR R14 R4 K12 - 0x5C3C1200, // 02F5 MOVE R15 R9 - 0x7C2C0800, // 02F6 CALL R11 4 - 0x8C2C150B, // 02F7 GETMET R11 R10 K11 - 0x58340009, // 02F8 LDCONST R13 K9 - 0x8838090C, // 02F9 GETMBR R14 R4 K12 - 0x883C014C, // 02FA GETMBR R15 R0 K76 - 0x943C1E09, // 02FB GETIDX R15 R15 R9 - 0x7C2C0800, // 02FC CALL R11 4 - 0x7001FFEF, // 02FD JMP #02EE - 0x58200039, // 02FE LDCONST R8 K57 - 0xAC200200, // 02FF CATCH R8 1 0 - 0xB0080000, // 0300 RAISE 2 R0 R0 - 0x80040E00, // 0301 RET 1 R7 - 0x70020033, // 0302 JMP #0337 - 0x1C1C0D09, // 0303 EQ R7 R6 K9 - 0x781E0013, // 0304 JMPF R7 #0319 - 0x8C1C0911, // 0305 GETMET R7 R4 K17 - 0x7C1C0200, // 0306 CALL R7 1 - 0x60200010, // 0307 GETGBL R8 G16 - 0x8C24014E, // 0308 GETMET R9 R0 K78 - 0x7C240200, // 0309 CALL R9 1 - 0x7C200200, // 030A CALL R8 1 - 0xA8020007, // 030B EXBLK 0 #0314 - 0x5C241000, // 030C MOVE R9 R8 - 0x7C240000, // 030D CALL R9 0 - 0x8C280F0B, // 030E GETMET R10 R7 K11 - 0x4C300000, // 030F LDNIL R12 - 0x8834092A, // 0310 GETMBR R13 R4 K42 - 0x5C381200, // 0311 MOVE R14 R9 - 0x7C280800, // 0312 CALL R10 4 - 0x7001FFF7, // 0313 JMP #030C - 0x58200039, // 0314 LDCONST R8 K57 - 0xAC200200, // 0315 CATCH R8 1 0 - 0xB0080000, // 0316 RAISE 2 R0 R0 - 0x80040E00, // 0317 RET 1 R7 - 0x7002001D, // 0318 JMP #0337 - 0x1C1C0D0D, // 0319 EQ R7 R6 K13 - 0x781E0003, // 031A JMPF R7 #031F - 0x8C1C0911, // 031B GETMET R7 R4 K17 - 0x7C1C0200, // 031C CALL R7 1 - 0x80040E00, // 031D RET 1 R7 - 0x70020017, // 031E JMP #0337 - 0x1C1C0D0F, // 031F EQ R7 R6 K15 - 0x781E0015, // 0320 JMPF R7 #0337 - 0x881C0133, // 0321 GETMBR R7 R0 K51 - 0x8C1C0F4F, // 0322 GETMET R7 R7 K79 - 0x50240200, // 0323 LDBOOL R9 1 0 - 0x7C1C0400, // 0324 CALL R7 2 - 0x8C200911, // 0325 GETMET R8 R4 K17 - 0x7C200200, // 0326 CALL R8 1 - 0x60240010, // 0327 GETGBL R9 G16 - 0x5C280E00, // 0328 MOVE R10 R7 - 0x7C240200, // 0329 CALL R9 1 - 0xA8020007, // 032A EXBLK 0 #0333 - 0x5C281200, // 032B MOVE R10 R9 - 0x7C280000, // 032C CALL R10 0 - 0x8C2C110B, // 032D GETMET R11 R8 K11 - 0x4C340000, // 032E LDNIL R13 - 0x8838090C, // 032F GETMBR R14 R4 K12 - 0x5C3C1400, // 0330 MOVE R15 R10 - 0x7C2C0800, // 0331 CALL R11 4 - 0x7001FFF7, // 0332 JMP #032B - 0x58240039, // 0333 LDCONST R9 K57 - 0xAC240200, // 0334 CATCH R9 1 0 - 0xB0080000, // 0335 RAISE 2 R0 R0 - 0x80041000, // 0336 RET 1 R8 - 0x70020002, // 0337 JMP #033B - 0xB81E0200, // 0338 GETNGBL R7 K1 - 0x881C0F51, // 0339 GETMBR R7 R7 K81 - 0x900AA007, // 033A SETMBR R2 K80 R7 - 0x80000000, // 033B RET 0 + 0x7002002E, // 01AE JMP #01DE + 0x1C1C0D0D, // 01AF EQ R7 R6 K13 + 0x781E0007, // 01B0 JMPF R7 #01B9 + 0x8C1C0906, // 01B1 GETMET R7 R4 K6 + 0x8824090E, // 01B2 GETMBR R9 R4 K14 + 0xB82A0200, // 01B3 GETNGBL R10 K1 + 0x88281541, // 01B4 GETMBR R10 R10 K65 + 0x88281542, // 01B5 GETMBR R10 R10 K66 + 0x7C1C0600, // 01B6 CALL R7 3 + 0x80040E00, // 01B7 RET 1 R7 + 0x70020024, // 01B8 JMP #01DE + 0x1C1C0D0F, // 01B9 EQ R7 R6 K15 + 0x781E000B, // 01BA JMPF R7 #01C7 + 0x881C0133, // 01BB GETMBR R7 R0 K51 + 0x881C0F34, // 01BC GETMBR R7 R7 K52 + 0x8C1C0F35, // 01BD GETMET R7 R7 K53 + 0x7C1C0200, // 01BE CALL R7 1 + 0x8C200906, // 01BF GETMET R8 R4 K6 + 0x8828090E, // 01C0 GETMBR R10 R4 K14 + 0x602C000C, // 01C1 GETGBL R11 G12 + 0x5C300E00, // 01C2 MOVE R12 R7 + 0x7C2C0200, // 01C3 CALL R11 1 + 0x7C200600, // 01C4 CALL R8 3 + 0x80041000, // 01C5 RET 1 R8 + 0x70020016, // 01C6 JMP #01DE + 0x541E0003, // 01C7 LDINT R7 4 + 0x1C1C0C07, // 01C8 EQ R7 R6 R7 + 0x781E0000, // 01C9 JMPF R7 #01CB + 0x70020012, // 01CA JMP #01DE + 0x541E0004, // 01CB LDINT R7 5 + 0x1C1C0C07, // 01CC EQ R7 R6 R7 + 0x781E000F, // 01CD JMPF R7 #01DE + 0x881C0133, // 01CE GETMBR R7 R0 K51 + 0x881C0F34, // 01CF GETMBR R7 R7 K52 + 0x8C1C0F35, // 01D0 GETMET R7 R7 K53 + 0x7C1C0200, // 01D1 CALL R7 1 + 0x8C200F1B, // 01D2 GETMET R8 R7 K27 + 0x5C280200, // 01D3 MOVE R10 R1 + 0x7C200400, // 01D4 CALL R8 2 + 0x4C240000, // 01D5 LDNIL R9 + 0x1C241009, // 01D6 EQ R9 R8 R9 + 0x78260000, // 01D7 JMPF R9 #01D9 + 0x5421FFFE, // 01D8 LDINT R8 -1 + 0x8C240906, // 01D9 GETMET R9 R4 K6 + 0x882C090E, // 01DA GETMBR R11 R4 K14 + 0x00301109, // 01DB ADD R12 R8 K9 + 0x7C240600, // 01DC CALL R9 3 + 0x80041200, // 01DD RET 1 R9 + 0x70020169, // 01DE JMP #0349 + 0x541E003B, // 01DF LDINT R7 60 + 0x1C1C0A07, // 01E0 EQ R7 R5 R7 + 0x781E0000, // 01E1 JMPF R7 #01E3 + 0x70020165, // 01E2 JMP #0349 + 0x541E0027, // 01E3 LDINT R7 40 + 0x1C1C0A07, // 01E4 EQ R7 R5 R7 + 0x781E0095, // 01E5 JMPF R7 #027C + 0x1C1C0D05, // 01E6 EQ R7 R6 K5 + 0x781E0005, // 01E7 JMPF R7 #01EE + 0x8C1C0906, // 01E8 GETMET R7 R4 K6 + 0x8824090C, // 01E9 GETMBR R9 R4 K12 + 0x58280005, // 01EA LDCONST R10 K5 + 0x7C1C0600, // 01EB CALL R7 3 + 0x80040E00, // 01EC RET 1 R7 + 0x7002008C, // 01ED JMP #027B + 0x1C1C0D09, // 01EE EQ R7 R6 K9 + 0x781E0005, // 01EF JMPF R7 #01F6 + 0x8C1C0906, // 01F0 GETMET R7 R4 K6 + 0x88240916, // 01F1 GETMBR R9 R4 K22 + 0x58280043, // 01F2 LDCONST R10 K67 + 0x7C1C0600, // 01F3 CALL R7 3 + 0x80040E00, // 01F4 RET 1 R7 + 0x70020084, // 01F5 JMP #027B + 0x1C1C0D0D, // 01F6 EQ R7 R6 K13 + 0x781E0006, // 01F7 JMPF R7 #01FF + 0x8C1C0906, // 01F8 GETMET R7 R4 K6 + 0x8824090C, // 01F9 GETMBR R9 R4 K12 + 0x88280133, // 01FA GETMBR R10 R0 K51 + 0x88281544, // 01FB GETMBR R10 R10 K68 + 0x7C1C0600, // 01FC CALL R7 3 + 0x80040E00, // 01FD RET 1 R7 + 0x7002007B, // 01FE JMP #027B + 0x1C1C0D0F, // 01FF EQ R7 R6 K15 + 0x781E000A, // 0200 JMPF R7 #020C + 0x8C1C0906, // 0201 GETMET R7 R4 K6 + 0x88240916, // 0202 GETMBR R9 R4 K22 + 0xB82A2400, // 0203 GETNGBL R10 K18 + 0x8C281526, // 0204 GETMET R10 R10 K38 + 0x58300045, // 0205 LDCONST R12 K69 + 0x50340200, // 0206 LDBOOL R13 1 0 + 0x7C280600, // 0207 CALL R10 3 + 0x94281545, // 0208 GETIDX R10 R10 K69 + 0x7C1C0600, // 0209 CALL R7 3 + 0x80040E00, // 020A RET 1 R7 + 0x7002006E, // 020B JMP #027B + 0x541E0003, // 020C LDINT R7 4 + 0x1C1C0C07, // 020D EQ R7 R6 R7 + 0x781E0005, // 020E JMPF R7 #0215 + 0x8C1C0906, // 020F GETMET R7 R4 K6 + 0x8824090C, // 0210 GETMBR R9 R4 K12 + 0x542A7FFF, // 0211 LDINT R10 32768 + 0x7C1C0600, // 0212 CALL R7 3 + 0x80040E00, // 0213 RET 1 R7 + 0x70020065, // 0214 JMP #027B + 0x541E0004, // 0215 LDINT R7 5 + 0x1C1C0C07, // 0216 EQ R7 R6 R7 + 0x781E000A, // 0217 JMPF R7 #0223 + 0x8C1C0906, // 0218 GETMET R7 R4 K6 + 0x88240916, // 0219 GETMBR R9 R4 K22 + 0xB82A2400, // 021A GETNGBL R10 K18 + 0x8C281526, // 021B GETMET R10 R10 K38 + 0x58300046, // 021C LDCONST R12 K70 + 0x50340200, // 021D LDBOOL R13 1 0 + 0x7C280600, // 021E CALL R10 3 + 0x94281547, // 021F GETIDX R10 R10 K71 + 0x7C1C0600, // 0220 CALL R7 3 + 0x80040E00, // 0221 RET 1 R7 + 0x70020057, // 0222 JMP #027B + 0x541E0005, // 0223 LDINT R7 6 + 0x1C1C0C07, // 0224 EQ R7 R6 R7 + 0x781E0005, // 0225 JMPF R7 #022C + 0x8C1C0906, // 0226 GETMET R7 R4 K6 + 0x88240916, // 0227 GETMBR R9 R4 K22 + 0x58280048, // 0228 LDCONST R10 K72 + 0x7C1C0600, // 0229 CALL R7 3 + 0x80040E00, // 022A RET 1 R7 + 0x7002004E, // 022B JMP #027B + 0x541E0006, // 022C LDINT R7 7 + 0x1C1C0C07, // 022D EQ R7 R6 R7 + 0x781E0005, // 022E JMPF R7 #0235 + 0x8C1C0906, // 022F GETMET R7 R4 K6 + 0x8824090C, // 0230 GETMBR R9 R4 K12 + 0x58280005, // 0231 LDCONST R10 K5 + 0x7C1C0600, // 0232 CALL R7 3 + 0x80040E00, // 0233 RET 1 R7 + 0x70020045, // 0234 JMP #027B + 0x541E0007, // 0235 LDINT R7 8 + 0x1C1C0C07, // 0236 EQ R7 R6 R7 + 0x781E000B, // 0237 JMPF R7 #0244 + 0x8C1C0906, // 0238 GETMET R7 R4 K6 + 0x88240916, // 0239 GETMBR R9 R4 K22 + 0xB82A2400, // 023A GETNGBL R10 K18 + 0x8C281526, // 023B GETMET R10 R10 K38 + 0x58300049, // 023C LDCONST R12 K73 + 0x50340200, // 023D LDBOOL R13 1 0 + 0x7C280600, // 023E CALL R10 3 + 0x9428154A, // 023F GETIDX R10 R10 K74 + 0x9428154B, // 0240 GETIDX R10 R10 K75 + 0x7C1C0600, // 0241 CALL R7 3 + 0x80040E00, // 0242 RET 1 R7 + 0x70020036, // 0243 JMP #027B + 0x541E0008, // 0244 LDINT R7 9 + 0x1C1C0C07, // 0245 EQ R7 R6 R7 + 0x781E0005, // 0246 JMPF R7 #024D + 0x8C1C0906, // 0247 GETMET R7 R4 K6 + 0x8824090C, // 0248 GETMBR R9 R4 K12 + 0x58280009, // 0249 LDCONST R10 K9 + 0x7C1C0600, // 024A CALL R7 3 + 0x80040E00, // 024B RET 1 R7 + 0x7002002D, // 024C JMP #027B + 0x541E0009, // 024D LDINT R7 10 + 0x1C1C0C07, // 024E EQ R7 R6 R7 + 0x781E000B, // 024F JMPF R7 #025C + 0x8C1C0906, // 0250 GETMET R7 R4 K6 + 0x88240916, // 0251 GETMBR R9 R4 K22 + 0xB82A2400, // 0252 GETNGBL R10 K18 + 0x8C281526, // 0253 GETMET R10 R10 K38 + 0x58300049, // 0254 LDCONST R12 K73 + 0x50340200, // 0255 LDBOOL R13 1 0 + 0x7C280600, // 0256 CALL R10 3 + 0x9428154A, // 0257 GETIDX R10 R10 K74 + 0x9428154C, // 0258 GETIDX R10 R10 K76 + 0x7C1C0600, // 0259 CALL R7 3 + 0x80040E00, // 025A RET 1 R7 + 0x7002001E, // 025B JMP #027B + 0x541E0011, // 025C LDINT R7 18 + 0x1C1C0C07, // 025D EQ R7 R6 R7 + 0x781E000B, // 025E JMPF R7 #026B + 0x8C1C0906, // 025F GETMET R7 R4 K6 + 0x88240916, // 0260 GETMBR R9 R4 K22 + 0xB82A2400, // 0261 GETNGBL R10 K18 + 0x8C281525, // 0262 GETMET R10 R10 K37 + 0x7C280200, // 0263 CALL R10 1 + 0x8C28151B, // 0264 GETMET R10 R10 K27 + 0x5830001C, // 0265 LDCONST R12 K28 + 0x5834001D, // 0266 LDCONST R13 K29 + 0x7C280600, // 0267 CALL R10 3 + 0x7C1C0600, // 0268 CALL R7 3 + 0x80040E00, // 0269 RET 1 R7 + 0x7002000F, // 026A JMP #027B + 0x541E0012, // 026B LDINT R7 19 + 0x1C1C0C07, // 026C EQ R7 R6 R7 + 0x781E000C, // 026D JMPF R7 #027B + 0x8C1C090A, // 026E GETMET R7 R4 K10 + 0x7C1C0200, // 026F CALL R7 1 + 0x8C200F0B, // 0270 GETMET R8 R7 K11 + 0x58280005, // 0271 LDCONST R10 K5 + 0x882C090C, // 0272 GETMBR R11 R4 K12 + 0x5830000F, // 0273 LDCONST R12 K15 + 0x7C200800, // 0274 CALL R8 4 + 0x8C200F0B, // 0275 GETMET R8 R7 K11 + 0x58280009, // 0276 LDCONST R10 K9 + 0x882C090C, // 0277 GETMBR R11 R4 K12 + 0x5830000F, // 0278 LDCONST R12 K15 + 0x7C200800, // 0279 CALL R8 4 + 0x80040E00, // 027A RET 1 R7 + 0x700200CC, // 027B JMP #0349 + 0x541E003E, // 027C LDINT R7 63 + 0x1C1C0A07, // 027D EQ R7 R5 R7 + 0x781E0000, // 027E JMPF R7 #0280 + 0x700200C8, // 027F JMP #0349 + 0x541E0029, // 0280 LDINT R7 42 + 0x1C1C0A07, // 0281 EQ R7 R5 R7 + 0x781E001D, // 0282 JMPF R7 #02A1 + 0x1C1C0D05, // 0283 EQ R7 R6 K5 + 0x781E0003, // 0284 JMPF R7 #0289 + 0x8C1C0911, // 0285 GETMET R7 R4 K17 + 0x7C1C0200, // 0286 CALL R7 1 + 0x80040E00, // 0287 RET 1 R7 + 0x70020016, // 0288 JMP #02A0 + 0x1C1C0D09, // 0289 EQ R7 R6 K9 + 0x781E0005, // 028A JMPF R7 #0291 + 0x8C1C0906, // 028B GETMET R7 R4 K6 + 0x88240910, // 028C GETMBR R9 R4 K16 + 0x58280005, // 028D LDCONST R10 K5 + 0x7C1C0600, // 028E CALL R7 3 + 0x80040E00, // 028F RET 1 R7 + 0x7002000E, // 0290 JMP #02A0 + 0x1C1C0D0D, // 0291 EQ R7 R6 K13 + 0x781E0005, // 0292 JMPF R7 #0299 + 0x8C1C0906, // 0293 GETMET R7 R4 K6 + 0x8824090E, // 0294 GETMBR R9 R4 K14 + 0x58280009, // 0295 LDCONST R10 K9 + 0x7C1C0600, // 0296 CALL R7 3 + 0x80040E00, // 0297 RET 1 R7 + 0x70020006, // 0298 JMP #02A0 + 0x1C1C0D0F, // 0299 EQ R7 R6 K15 + 0x781E0004, // 029A JMPF R7 #02A0 + 0x8C1C0906, // 029B GETMET R7 R4 K6 + 0x88240918, // 029C GETMBR R9 R4 K24 + 0x4C280000, // 029D LDNIL R10 + 0x7C1C0600, // 029E CALL R7 3 + 0x80040E00, // 029F RET 1 R7 + 0x700200A7, // 02A0 JMP #0349 + 0x541E002A, // 02A1 LDINT R7 43 + 0x1C1C0A07, // 02A2 EQ R7 R5 R7 + 0x781E0016, // 02A3 JMPF R7 #02BB + 0x1C1C0D05, // 02A4 EQ R7 R6 K5 + 0x781E0007, // 02A5 JMPF R7 #02AE + 0x8C1C0906, // 02A6 GETMET R7 R4 K6 + 0x88240916, // 02A7 GETMBR R9 R4 K22 + 0xB82A2400, // 02A8 GETNGBL R10 K18 + 0x8C28154D, // 02A9 GETMET R10 R10 K77 + 0x7C280200, // 02AA CALL R10 1 + 0x7C1C0600, // 02AB CALL R7 3 + 0x80040E00, // 02AC RET 1 R7 + 0x7002000B, // 02AD JMP #02BA + 0x1C1C0D09, // 02AE EQ R7 R6 K9 + 0x781E0009, // 02AF JMPF R7 #02BA + 0x8C1C0911, // 02B0 GETMET R7 R4 K17 + 0x7C1C0200, // 02B1 CALL R7 1 + 0x8C200F0B, // 02B2 GETMET R8 R7 K11 + 0x4C280000, // 02B3 LDNIL R10 + 0x882C0916, // 02B4 GETMBR R11 R4 K22 + 0xB8322400, // 02B5 GETNGBL R12 K18 + 0x8C30194D, // 02B6 GETMET R12 R12 K77 + 0x7C300200, // 02B7 CALL R12 1 + 0x7C200800, // 02B8 CALL R8 4 + 0x80040E00, // 02B9 RET 1 R7 + 0x7002008D, // 02BA JMP #0349 + 0x541E002B, // 02BB LDINT R7 44 + 0x1C1C0A07, // 02BC EQ R7 R5 R7 + 0x781E001C, // 02BD JMPF R7 #02DB + 0x1C1C0D05, // 02BE EQ R7 R6 K5 + 0x781E0005, // 02BF JMPF R7 #02C6 + 0x8C1C0906, // 02C0 GETMET R7 R4 K6 + 0x8824090E, // 02C1 GETMBR R9 R4 K14 + 0x58280009, // 02C2 LDCONST R10 K9 + 0x7C1C0600, // 02C3 CALL R7 3 + 0x80040E00, // 02C4 RET 1 R7 + 0x70020013, // 02C5 JMP #02DA + 0x1C1C0D09, // 02C6 EQ R7 R6 K9 + 0x781E0005, // 02C7 JMPF R7 #02CE + 0x8C1C0906, // 02C8 GETMET R7 R4 K6 + 0x8824090E, // 02C9 GETMBR R9 R4 K14 + 0x542A0003, // 02CA LDINT R10 4 + 0x7C1C0600, // 02CB CALL R7 3 + 0x80040E00, // 02CC RET 1 R7 + 0x7002000B, // 02CD JMP #02DA + 0x1C1C0D0D, // 02CE EQ R7 R6 K13 + 0x781E0009, // 02CF JMPF R7 #02DA + 0x8C1C0911, // 02D0 GETMET R7 R4 K17 + 0x7C1C0200, // 02D1 CALL R7 1 + 0x8C200F0B, // 02D2 GETMET R8 R7 K11 + 0x4C280000, // 02D3 LDNIL R10 + 0x8C2C0906, // 02D4 GETMET R11 R4 K6 + 0x8834090E, // 02D5 GETMBR R13 R4 K14 + 0x543A0003, // 02D6 LDINT R14 4 + 0x7C2C0600, // 02D7 CALL R11 3 + 0x7C200600, // 02D8 CALL R8 3 + 0x80040E00, // 02D9 RET 1 R7 + 0x7002006D, // 02DA JMP #0349 + 0x541E0030, // 02DB LDINT R7 49 + 0x1C1C0A07, // 02DC EQ R7 R5 R7 + 0x781E0010, // 02DD JMPF R7 #02EF + 0x1C1C0D0F, // 02DE EQ R7 R6 K15 + 0x781E0005, // 02DF JMPF R7 #02E6 + 0x8C1C0906, // 02E0 GETMET R7 R4 K6 + 0x8824090E, // 02E1 GETMBR R9 R4 K14 + 0x542A001D, // 02E2 LDINT R10 30 + 0x7C1C0600, // 02E3 CALL R7 3 + 0x80040E00, // 02E4 RET 1 R7 + 0x70020007, // 02E5 JMP #02EE + 0x541EFFFB, // 02E6 LDINT R7 65532 + 0x1C1C0C07, // 02E7 EQ R7 R6 R7 + 0x781E0004, // 02E8 JMPF R7 #02EE + 0x8C1C0906, // 02E9 GETMET R7 R4 K6 + 0x8824092A, // 02EA GETMBR R9 R4 K42 + 0x58280005, // 02EB LDCONST R10 K5 + 0x7C1C0600, // 02EC CALL R7 3 + 0x80040E00, // 02ED RET 1 R7 + 0x70020059, // 02EE JMP #0349 + 0x541E001C, // 02EF LDINT R7 29 + 0x1C1C0A07, // 02F0 EQ R7 R5 R7 + 0x781E0053, // 02F1 JMPF R7 #0346 + 0x1C1C0D05, // 02F2 EQ R7 R6 K5 + 0x781E001C, // 02F3 JMPF R7 #0311 + 0x8C1C0911, // 02F4 GETMET R7 R4 K17 + 0x7C1C0200, // 02F5 CALL R7 1 + 0x60200010, // 02F6 GETGBL R8 G16 + 0x8824014E, // 02F7 GETMBR R9 R0 K78 + 0x8C24134F, // 02F8 GETMET R9 R9 K79 + 0x7C240200, // 02F9 CALL R9 1 + 0x7C200200, // 02FA CALL R8 1 + 0xA802000F, // 02FB EXBLK 0 #030C + 0x5C241000, // 02FC MOVE R9 R8 + 0x7C240000, // 02FD CALL R9 0 + 0x8C280F15, // 02FE GETMET R10 R7 K21 + 0x7C280200, // 02FF CALL R10 1 + 0x8C2C150B, // 0300 GETMET R11 R10 K11 + 0x58340005, // 0301 LDCONST R13 K5 + 0x8838090C, // 0302 GETMBR R14 R4 K12 + 0x5C3C1200, // 0303 MOVE R15 R9 + 0x7C2C0800, // 0304 CALL R11 4 + 0x8C2C150B, // 0305 GETMET R11 R10 K11 + 0x58340009, // 0306 LDCONST R13 K9 + 0x8838090C, // 0307 GETMBR R14 R4 K12 + 0x883C014E, // 0308 GETMBR R15 R0 K78 + 0x943C1E09, // 0309 GETIDX R15 R15 R9 + 0x7C2C0800, // 030A CALL R11 4 + 0x7001FFEF, // 030B JMP #02FC + 0x58200039, // 030C LDCONST R8 K57 + 0xAC200200, // 030D CATCH R8 1 0 + 0xB0080000, // 030E RAISE 2 R0 R0 + 0x80040E00, // 030F RET 1 R7 + 0x70020033, // 0310 JMP #0345 + 0x1C1C0D09, // 0311 EQ R7 R6 K9 + 0x781E0013, // 0312 JMPF R7 #0327 + 0x8C1C0911, // 0313 GETMET R7 R4 K17 + 0x7C1C0200, // 0314 CALL R7 1 + 0x60200010, // 0315 GETGBL R8 G16 + 0x8C240150, // 0316 GETMET R9 R0 K80 + 0x7C240200, // 0317 CALL R9 1 + 0x7C200200, // 0318 CALL R8 1 + 0xA8020007, // 0319 EXBLK 0 #0322 + 0x5C241000, // 031A MOVE R9 R8 + 0x7C240000, // 031B CALL R9 0 + 0x8C280F0B, // 031C GETMET R10 R7 K11 + 0x4C300000, // 031D LDNIL R12 + 0x8834092A, // 031E GETMBR R13 R4 K42 + 0x5C381200, // 031F MOVE R14 R9 + 0x7C280800, // 0320 CALL R10 4 + 0x7001FFF7, // 0321 JMP #031A + 0x58200039, // 0322 LDCONST R8 K57 + 0xAC200200, // 0323 CATCH R8 1 0 + 0xB0080000, // 0324 RAISE 2 R0 R0 + 0x80040E00, // 0325 RET 1 R7 + 0x7002001D, // 0326 JMP #0345 + 0x1C1C0D0D, // 0327 EQ R7 R6 K13 + 0x781E0003, // 0328 JMPF R7 #032D + 0x8C1C0911, // 0329 GETMET R7 R4 K17 + 0x7C1C0200, // 032A CALL R7 1 + 0x80040E00, // 032B RET 1 R7 + 0x70020017, // 032C JMP #0345 + 0x1C1C0D0F, // 032D EQ R7 R6 K15 + 0x781E0015, // 032E JMPF R7 #0345 + 0x881C0133, // 032F GETMBR R7 R0 K51 + 0x8C1C0F51, // 0330 GETMET R7 R7 K81 + 0x50240200, // 0331 LDBOOL R9 1 0 + 0x7C1C0400, // 0332 CALL R7 2 + 0x8C200911, // 0333 GETMET R8 R4 K17 + 0x7C200200, // 0334 CALL R8 1 + 0x60240010, // 0335 GETGBL R9 G16 + 0x5C280E00, // 0336 MOVE R10 R7 + 0x7C240200, // 0337 CALL R9 1 + 0xA8020007, // 0338 EXBLK 0 #0341 + 0x5C281200, // 0339 MOVE R10 R9 + 0x7C280000, // 033A CALL R10 0 + 0x8C2C110B, // 033B GETMET R11 R8 K11 + 0x4C340000, // 033C LDNIL R13 + 0x8838090C, // 033D GETMBR R14 R4 K12 + 0x5C3C1400, // 033E MOVE R15 R10 + 0x7C2C0800, // 033F CALL R11 4 + 0x7001FFF7, // 0340 JMP #0339 + 0x58240039, // 0341 LDCONST R9 K57 + 0xAC240200, // 0342 CATCH R9 1 0 + 0xB0080000, // 0343 RAISE 2 R0 R0 + 0x80041000, // 0344 RET 1 R8 + 0x70020002, // 0345 JMP #0349 + 0xB81E0200, // 0346 GETNGBL R7 K1 + 0x881C0F53, // 0347 GETMBR R7 R7 K83 + 0x900AA407, // 0348 SETMBR R2 K82 R7 + 0x80000000, // 0349 RET 0 }) ) ); @@ -962,7 +978,7 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */ /* K5 */ be_const_int(0), /* K6 */ be_nested_str_weak(int), /* K7 */ be_nested_str_weak(int64), - /* K8 */ be_nested_str_weak(__breadcrumb), + /* K8 */ be_nested_str_weak(_breadcrumb), /* K9 */ be_nested_str_weak(attribute_updated), /* K10 */ be_nested_str_weak(endpoint), /* K11 */ be_nested_str_weak(status), @@ -1134,7 +1150,7 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[72]) { /* constants */ + ( &(const bvalue[79]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(matter), /* K2 */ be_nested_str_weak(TLV), @@ -1143,7 +1159,7 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */ /* K5 */ be_const_int(0), /* K6 */ be_nested_str_weak(findsubval), /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(__breadcrumb), + /* K8 */ be_nested_str_weak(_breadcrumb), /* K9 */ be_nested_str_weak(Matter_TLV_struct), /* K10 */ be_nested_str_weak(add_TLV), /* K11 */ be_nested_str_weak(U1), @@ -1152,65 +1168,72 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */ /* K14 */ be_const_int(2), /* K15 */ be_nested_str_weak(XX), /* K16 */ be_const_int(3), - /* K17 */ be_nested_str_weak(set_no_expiration), - /* K18 */ be_nested_str_weak(device), - /* K19 */ be_nested_str_weak(start_commissioning_complete_deferred), - /* K20 */ be_nested_str_weak(status), - /* K21 */ be_nested_str_weak(UNSUPPORTED_COMMAND), - /* K22 */ be_nested_str_weak(B2), - /* K23 */ be_nested_str_weak(DAC_Cert_FFF1_8000), - /* K24 */ be_nested_str_weak(PAI_Cert_FFF1), - /* K25 */ be_nested_str_weak(CD_FFF1_8000), - /* K26 */ be_nested_str_weak(B1), - /* K27 */ be_nested_str_weak(U4), - /* K28 */ be_nested_str_weak(tasmota), - /* K29 */ be_nested_str_weak(rtc), - /* K30 */ be_nested_str_weak(utc), - /* K31 */ be_nested_str_weak(encode), - /* K32 */ be_nested_str_weak(get_ac), - /* K33 */ be_nested_str_weak(log), - /* K34 */ be_nested_str_weak(MTR_X3A_X20attestation_tbs_X3D), - /* K35 */ be_nested_str_weak(tohex), - /* K36 */ be_nested_str_weak(EC_P256), - /* K37 */ be_nested_str_weak(ecdsa_sign_sha256), - /* K38 */ be_nested_str_weak(DAC_Priv_FFF1_8000), - /* K39 */ be_nested_str_weak(gen_CSR), - /* K40 */ be_nested_str_weak(MTR_X3A_X20nocsr_tbs_X3D), - /* K41 */ be_nested_str_weak(set_ca), - /* K42 */ be_nested_str_weak(MTR_X3A_X20received_X20ca_root_X3D), - /* K43 */ be_nested_str_weak(SUCCESS), - /* K44 */ be_nested_str_weak(get_ca), - /* K45 */ be_nested_str_weak(MTR_X3A_X20Error_X3A_X20AdNOC_X20without_X20CA), - /* K46 */ be_nested_str_weak(set_noc), - /* K47 */ be_nested_str_weak(set_ipk_epoch_key), - /* K48 */ be_nested_str_weak(admin_subject), - /* K49 */ be_nested_str_weak(admin_vendor), - /* K50 */ be_nested_str_weak(parse), - /* K51 */ be_nested_str_weak(findsub), - /* K52 */ be_nested_str_weak(MTR_X3A_X20Error_X3A_X20no_X20fabricid_X20nor_X20deviceid_X20in_X20NOC_X20certificate), - /* K53 */ be_nested_str_weak(int), - /* K54 */ be_nested_str_weak(int64), - /* K55 */ be_nested_str_weak(tobytes), - /* K56 */ be_const_int(2147483647), - /* K57 */ be_nested_str_weak(fromstring), - /* K58 */ be_nested_str_weak(CompressedFabric), - /* K59 */ be_nested_str_weak(HKDF_SHA256), - /* K60 */ be_nested_str_weak(copy), - /* K61 */ be_nested_str_weak(reverse), - /* K62 */ be_nested_str_weak(derive), - /* K63 */ be_nested_str_weak(set_fabric_device), - /* K64 */ be_nested_str_weak(start_operational_dicovery_deferred), - /* K65 */ be_nested_str_weak(set_fabric_label), - /* K66 */ be_nested_str_weak(sessions), - /* K67 */ be_nested_str_weak(sessions_active), - /* K68 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20), - /* K69 */ be_nested_str_weak(fabric), - /* K70 */ be_nested_str_weak(remove_session), - /* K71 */ be_nested_str_weak(save), + /* K17 */ be_nested_str_weak(fabric_completed), + /* K18 */ be_nested_str_weak(set_no_expiration), + /* K19 */ be_nested_str_weak(save), + /* K20 */ be_nested_str_weak(device), + /* K21 */ be_nested_str_weak(start_commissioning_complete_deferred), + /* K22 */ be_nested_str_weak(status), + /* K23 */ be_nested_str_weak(UNSUPPORTED_COMMAND), + /* K24 */ be_nested_str_weak(B2), + /* K25 */ be_nested_str_weak(DAC_Cert_FFF1_8000), + /* K26 */ be_nested_str_weak(PAI_Cert_FFF1), + /* K27 */ be_nested_str_weak(CD_FFF1_8000), + /* K28 */ be_nested_str_weak(B1), + /* K29 */ be_nested_str_weak(U4), + /* K30 */ be_nested_str_weak(tasmota), + /* K31 */ be_nested_str_weak(rtc), + /* K32 */ be_nested_str_weak(utc), + /* K33 */ be_nested_str_weak(encode), + /* K34 */ be_nested_str_weak(get_ac), + /* K35 */ be_nested_str_weak(log), + /* K36 */ be_nested_str_weak(MTR_X3A_X20attestation_tbs_X3D), + /* K37 */ be_nested_str_weak(tohex), + /* K38 */ be_nested_str_weak(EC_P256), + /* K39 */ be_nested_str_weak(ecdsa_sign_sha256), + /* K40 */ be_nested_str_weak(DAC_Priv_FFF1_8000), + /* K41 */ be_nested_str_weak(gen_CSR), + /* K42 */ be_nested_str_weak(MTR_X3A_X20nocsr_tbs_X3D), + /* K43 */ be_nested_str_weak(set_ca), + /* K44 */ be_nested_str_weak(MTR_X3A_X20received_X20ca_root_X3D), + /* K45 */ be_nested_str_weak(SUCCESS), + /* K46 */ be_nested_str_weak(get_ca), + /* K47 */ be_nested_str_weak(MTR_X3A_X20Error_X3A_X20AdNOC_X20without_X20CA), + /* K48 */ be_nested_str_weak(set_noc), + /* K49 */ be_nested_str_weak(set_ipk_epoch_key), + /* K50 */ be_nested_str_weak(set_admin_subject_vendor), + /* K51 */ be_nested_str_weak(parse), + /* K52 */ be_nested_str_weak(findsub), + /* K53 */ be_nested_str_weak(MTR_X3A_X20Error_X3A_X20no_X20fabricid_X20nor_X20deviceid_X20in_X20NOC_X20certificate), + /* K54 */ be_nested_str_weak(int), + /* K55 */ be_nested_str_weak(int64), + /* K56 */ be_nested_str_weak(tobytes), + /* K57 */ be_const_int(2147483647), + /* K58 */ be_nested_str_weak(fromstring), + /* K59 */ be_nested_str_weak(CompressedFabric), + /* K60 */ be_nested_str_weak(HKDF_SHA256), + /* K61 */ be_nested_str_weak(copy), + /* K62 */ be_nested_str_weak(reverse), + /* K63 */ be_nested_str_weak(derive), + /* K64 */ be_nested_str_weak(set_fabric_device), + /* K65 */ be_nested_str_weak(persist_to_fabric), + /* K66 */ be_nested_str_weak(fabric_candidate), + /* K67 */ be_nested_str_weak(start_operational_discovery_deferred), + /* K68 */ be_nested_str_weak(MTR_X3A_X20_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D_X2D), + /* K69 */ be_nested_str_weak(MTR_X3A_X20fabric_X3D), + /* K70 */ be_nested_str_weak(inspect), + /* K71 */ be_nested_str_weak(_fabric), + /* K72 */ be_nested_str_weak(set_fabric_label), + /* K73 */ be_nested_str_weak(sessions), + /* K74 */ be_nested_str_weak(sessions_active), + /* K75 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20), + /* K76 */ be_nested_str_weak(get_fabric_id), + /* K77 */ be_nested_str_weak(remove_session), + /* K78 */ be_nested_str_weak(save_fabrics), }), be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[502]) { /* code */ + ( &(const binstruction[532]) { /* code */ 0xA4120000, // 0000 IMPORT R4 K0 0xB8160200, // 0001 GETNGBL R5 K1 0x88140B02, // 0002 GETMBR R5 R5 K2 @@ -1218,7 +1241,7 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */ 0x881C0704, // 0004 GETMBR R7 R3 K4 0x5422002F, // 0005 LDINT R8 48 0x1C200C08, // 0006 EQ R8 R6 R8 - 0x78220050, // 0007 JMPF R8 #0059 + 0x78220054, // 0007 JMPF R8 #005D 0x1C200F05, // 0008 EQ R8 R7 K5 0x78220017, // 0009 JMPF R8 #0022 0x8C200506, // 000A GETMET R8 R2 K6 @@ -1244,7 +1267,7 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */ 0x7C2C0800, // 001E CALL R11 4 0x900E0907, // 001F SETMBR R3 K4 K7 0x80041400, // 0020 RET 1 R10 - 0x70020035, // 0021 JMP #0058 + 0x70020039, // 0021 JMP #005C 0x1C200F0E, // 0022 EQ R8 R7 K14 0x7822001A, // 0023 JMPF R8 #003F 0x8C200506, // 0024 GETMET R8 R2 K6 @@ -1273,446 +1296,476 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */ 0x7C300800, // 003B CALL R12 4 0x900E0910, // 003C SETMBR R3 K4 K16 0x80041600, // 003D RET 1 R11 - 0x70020018, // 003E JMP #0058 + 0x7002001C, // 003E JMP #005C 0x54220003, // 003F LDINT R8 4 0x1C200E08, // 0040 EQ R8 R7 R8 - 0x78220015, // 0041 JMPF R8 #0058 + 0x78220019, // 0041 JMPF R8 #005C 0x90061105, // 0042 SETMBR R1 K8 K5 0x8C200311, // 0043 GETMET R8 R1 K17 0x7C200200, // 0044 CALL R8 1 - 0x8C200B09, // 0045 GETMET R8 R5 K9 + 0x8C200312, // 0045 GETMET R8 R1 K18 0x7C200200, // 0046 CALL R8 1 - 0x8C24110A, // 0047 GETMET R9 R8 K10 - 0x582C0005, // 0048 LDCONST R11 K5 - 0x88300B0B, // 0049 GETMBR R12 R5 K11 - 0x58340005, // 004A LDCONST R13 K5 - 0x7C240800, // 004B CALL R9 4 - 0x8C24110A, // 004C GETMET R9 R8 K10 - 0x582C0007, // 004D LDCONST R11 K7 - 0x88300B0C, // 004E GETMBR R12 R5 K12 - 0x5834000D, // 004F LDCONST R13 K13 - 0x7C240800, // 0050 CALL R9 4 - 0x54260004, // 0051 LDINT R9 5 - 0x900E0809, // 0052 SETMBR R3 K4 R9 - 0x88240112, // 0053 GETMBR R9 R0 K18 - 0x8C241313, // 0054 GETMET R9 R9 K19 - 0x5C2C0200, // 0055 MOVE R11 R1 - 0x7C240400, // 0056 CALL R9 2 - 0x80041000, // 0057 RET 1 R8 - 0x7002019B, // 0058 JMP #01F5 - 0x5422003D, // 0059 LDINT R8 62 - 0x1C200C08, // 005A EQ R8 R6 R8 - 0x78220191, // 005B JMPF R8 #01EE - 0x1C200F0E, // 005C EQ R8 R7 K14 - 0x7822001D, // 005D JMPF R8 #007C - 0x8C200506, // 005E GETMET R8 R2 K6 - 0x58280005, // 005F LDCONST R10 K5 - 0x7C200400, // 0060 CALL R8 2 - 0x20241107, // 0061 NE R9 R8 K7 - 0x78260006, // 0062 JMPF R9 #006A - 0x2024110E, // 0063 NE R9 R8 K14 - 0x78260004, // 0064 JMPF R9 #006A - 0xB8260200, // 0065 GETNGBL R9 K1 - 0x88241315, // 0066 GETMBR R9 R9 K21 - 0x900E2809, // 0067 SETMBR R3 K20 R9 - 0x4C240000, // 0068 LDNIL R9 - 0x80041200, // 0069 RET 1 R9 - 0x8C240B09, // 006A GETMET R9 R5 K9 - 0x7C240200, // 006B CALL R9 1 - 0x8C28130A, // 006C GETMET R10 R9 K10 - 0x58300005, // 006D LDCONST R12 K5 - 0x88340B16, // 006E GETMBR R13 R5 K22 - 0x1C381107, // 006F EQ R14 R8 K7 - 0x783A0003, // 0070 JMPF R14 #0075 - 0xB83A0200, // 0071 GETNGBL R14 K1 - 0x8C381D17, // 0072 GETMET R14 R14 K23 - 0x7C380200, // 0073 CALL R14 1 - 0x70020002, // 0074 JMP #0078 + 0x8C200313, // 0047 GETMET R8 R1 K19 + 0x7C200200, // 0048 CALL R8 1 + 0x8C200B09, // 0049 GETMET R8 R5 K9 + 0x7C200200, // 004A CALL R8 1 + 0x8C24110A, // 004B GETMET R9 R8 K10 + 0x582C0005, // 004C LDCONST R11 K5 + 0x88300B0B, // 004D GETMBR R12 R5 K11 + 0x58340005, // 004E LDCONST R13 K5 + 0x7C240800, // 004F CALL R9 4 + 0x8C24110A, // 0050 GETMET R9 R8 K10 + 0x582C0007, // 0051 LDCONST R11 K7 + 0x88300B0C, // 0052 GETMBR R12 R5 K12 + 0x5834000D, // 0053 LDCONST R13 K13 + 0x7C240800, // 0054 CALL R9 4 + 0x54260004, // 0055 LDINT R9 5 + 0x900E0809, // 0056 SETMBR R3 K4 R9 + 0x88240114, // 0057 GETMBR R9 R0 K20 + 0x8C241315, // 0058 GETMET R9 R9 K21 + 0x5C2C0200, // 0059 MOVE R11 R1 + 0x7C240400, // 005A CALL R9 2 + 0x80041000, // 005B RET 1 R8 + 0x700201B5, // 005C JMP #0213 + 0x5422003D, // 005D LDINT R8 62 + 0x1C200C08, // 005E EQ R8 R6 R8 + 0x782201AB, // 005F JMPF R8 #020C + 0x1C200F0E, // 0060 EQ R8 R7 K14 + 0x7822001D, // 0061 JMPF R8 #0080 + 0x8C200506, // 0062 GETMET R8 R2 K6 + 0x58280005, // 0063 LDCONST R10 K5 + 0x7C200400, // 0064 CALL R8 2 + 0x20241107, // 0065 NE R9 R8 K7 + 0x78260006, // 0066 JMPF R9 #006E + 0x2024110E, // 0067 NE R9 R8 K14 + 0x78260004, // 0068 JMPF R9 #006E + 0xB8260200, // 0069 GETNGBL R9 K1 + 0x88241317, // 006A GETMBR R9 R9 K23 + 0x900E2C09, // 006B SETMBR R3 K22 R9 + 0x4C240000, // 006C LDNIL R9 + 0x80041200, // 006D RET 1 R9 + 0x8C240B09, // 006E GETMET R9 R5 K9 + 0x7C240200, // 006F CALL R9 1 + 0x8C28130A, // 0070 GETMET R10 R9 K10 + 0x58300005, // 0071 LDCONST R12 K5 + 0x88340B18, // 0072 GETMBR R13 R5 K24 + 0x1C381107, // 0073 EQ R14 R8 K7 + 0x783A0003, // 0074 JMPF R14 #0079 0xB83A0200, // 0075 GETNGBL R14 K1 - 0x8C381D18, // 0076 GETMET R14 R14 K24 + 0x8C381D19, // 0076 GETMET R14 R14 K25 0x7C380200, // 0077 CALL R14 1 - 0x7C280800, // 0078 CALL R10 4 - 0x900E0910, // 0079 SETMBR R3 K4 K16 - 0x80041200, // 007A RET 1 R9 - 0x70020170, // 007B JMP #01ED - 0x1C200F05, // 007C EQ R8 R7 K5 - 0x78220044, // 007D JMPF R8 #00C3 - 0x8C200506, // 007E GETMET R8 R2 K6 - 0x58280005, // 007F LDCONST R10 K5 - 0x7C200400, // 0080 CALL R8 2 - 0x6024000C, // 0081 GETGBL R9 G12 - 0x5C281000, // 0082 MOVE R10 R8 - 0x7C240200, // 0083 CALL R9 1 - 0x542A001F, // 0084 LDINT R10 32 - 0x2024120A, // 0085 NE R9 R9 R10 - 0x78260001, // 0086 JMPF R9 #0089 - 0x4C240000, // 0087 LDNIL R9 - 0x80041200, // 0088 RET 1 R9 - 0x900E0907, // 0089 SETMBR R3 K4 K7 - 0x8C240B09, // 008A GETMET R9 R5 K9 - 0x7C240200, // 008B CALL R9 1 - 0x8C28130A, // 008C GETMET R10 R9 K10 - 0x58300007, // 008D LDCONST R12 K7 - 0x88340B16, // 008E GETMBR R13 R5 K22 - 0xB83A0200, // 008F GETNGBL R14 K1 - 0x8C381D19, // 0090 GETMET R14 R14 K25 - 0x7C380200, // 0091 CALL R14 1 - 0x7C280800, // 0092 CALL R10 4 - 0x8C28130A, // 0093 GETMET R10 R9 K10 - 0x5830000E, // 0094 LDCONST R12 K14 - 0x88340B1A, // 0095 GETMBR R13 R5 K26 - 0x5C381000, // 0096 MOVE R14 R8 - 0x7C280800, // 0097 CALL R10 4 - 0x8C28130A, // 0098 GETMET R10 R9 K10 - 0x58300010, // 0099 LDCONST R12 K16 - 0x88340B1B, // 009A GETMBR R13 R5 K27 - 0xB83A3800, // 009B GETNGBL R14 K28 - 0x8C381D1D, // 009C GETMET R14 R14 K29 - 0x7C380200, // 009D CALL R14 1 - 0x94381D1E, // 009E GETIDX R14 R14 K30 - 0x7C280800, // 009F CALL R10 4 - 0x8C28131F, // 00A0 GETMET R10 R9 K31 - 0x7C280200, // 00A1 CALL R10 1 - 0x8C2C0320, // 00A2 GETMET R11 R1 K32 - 0x7C2C0200, // 00A3 CALL R11 1 - 0x0030140B, // 00A4 ADD R12 R10 R11 - 0xB8363800, // 00A5 GETNGBL R13 K28 - 0x8C341B21, // 00A6 GETMET R13 R13 K33 - 0x8C3C1923, // 00A7 GETMET R15 R12 K35 - 0x7C3C0200, // 00A8 CALL R15 1 - 0x003E440F, // 00A9 ADD R15 K34 R15 - 0x58400010, // 00AA LDCONST R16 K16 - 0x7C340600, // 00AB CALL R13 3 - 0x8C340924, // 00AC GETMET R13 R4 K36 - 0x7C340200, // 00AD CALL R13 1 - 0x8C341B25, // 00AE GETMET R13 R13 K37 - 0xB83E0200, // 00AF GETNGBL R15 K1 - 0x8C3C1F26, // 00B0 GETMET R15 R15 K38 - 0x7C3C0200, // 00B1 CALL R15 1 - 0x5C401800, // 00B2 MOVE R16 R12 - 0x7C340600, // 00B3 CALL R13 3 - 0x8C380B09, // 00B4 GETMET R14 R5 K9 - 0x7C380200, // 00B5 CALL R14 1 - 0x8C3C1D0A, // 00B6 GETMET R15 R14 K10 - 0x58440005, // 00B7 LDCONST R17 K5 - 0x88480B16, // 00B8 GETMBR R18 R5 K22 - 0x5C4C1400, // 00B9 MOVE R19 R10 - 0x7C3C0800, // 00BA CALL R15 4 - 0x8C3C1D0A, // 00BB GETMET R15 R14 K10 - 0x58440007, // 00BC LDCONST R17 K7 - 0x88480B1A, // 00BD GETMBR R18 R5 K26 - 0x5C4C1A00, // 00BE MOVE R19 R13 - 0x7C3C0800, // 00BF CALL R15 4 - 0x900E0907, // 00C0 SETMBR R3 K4 K7 - 0x80041C00, // 00C1 RET 1 R14 - 0x70020129, // 00C2 JMP #01ED - 0x54220003, // 00C3 LDINT R8 4 - 0x1C200E08, // 00C4 EQ R8 R7 R8 - 0x78220040, // 00C5 JMPF R8 #0107 - 0x8C200506, // 00C6 GETMET R8 R2 K6 - 0x58280005, // 00C7 LDCONST R10 K5 - 0x7C200400, // 00C8 CALL R8 2 - 0x6024000C, // 00C9 GETGBL R9 G12 - 0x5C281000, // 00CA MOVE R10 R8 - 0x7C240200, // 00CB CALL R9 1 - 0x542A001F, // 00CC LDINT R10 32 - 0x2024120A, // 00CD NE R9 R9 R10 - 0x78260001, // 00CE JMPF R9 #00D1 - 0x4C240000, // 00CF LDNIL R9 - 0x80041200, // 00D0 RET 1 R9 - 0x8C240506, // 00D1 GETMET R9 R2 K6 - 0x582C0007, // 00D2 LDCONST R11 K7 - 0x50300000, // 00D3 LDBOOL R12 0 0 - 0x7C240600, // 00D4 CALL R9 3 - 0x8C280327, // 00D5 GETMET R10 R1 K39 - 0x7C280200, // 00D6 CALL R10 1 - 0x8C2C0B09, // 00D7 GETMET R11 R5 K9 - 0x7C2C0200, // 00D8 CALL R11 1 - 0x8C30170A, // 00D9 GETMET R12 R11 K10 - 0x58380007, // 00DA LDCONST R14 K7 - 0x883C0B16, // 00DB GETMBR R15 R5 K22 - 0x5C401400, // 00DC MOVE R16 R10 - 0x7C300800, // 00DD CALL R12 4 - 0x8C30170A, // 00DE GETMET R12 R11 K10 - 0x5838000E, // 00DF LDCONST R14 K14 - 0x883C0B1A, // 00E0 GETMBR R15 R5 K26 - 0x5C401000, // 00E1 MOVE R16 R8 - 0x7C300800, // 00E2 CALL R12 4 - 0x8C30171F, // 00E3 GETMET R12 R11 K31 - 0x7C300200, // 00E4 CALL R12 1 - 0x8C340320, // 00E5 GETMET R13 R1 K32 - 0x7C340200, // 00E6 CALL R13 1 - 0x0034180D, // 00E7 ADD R13 R12 R13 - 0xB83A3800, // 00E8 GETNGBL R14 K28 - 0x8C381D21, // 00E9 GETMET R14 R14 K33 - 0x8C401B23, // 00EA GETMET R16 R13 K35 - 0x7C400200, // 00EB CALL R16 1 - 0x00425010, // 00EC ADD R16 K40 R16 - 0x58440010, // 00ED LDCONST R17 K16 - 0x7C380600, // 00EE CALL R14 3 - 0x8C380924, // 00EF GETMET R14 R4 K36 - 0x7C380200, // 00F0 CALL R14 1 - 0x8C381D25, // 00F1 GETMET R14 R14 K37 - 0xB8420200, // 00F2 GETNGBL R16 K1 - 0x8C402126, // 00F3 GETMET R16 R16 K38 - 0x7C400200, // 00F4 CALL R16 1 - 0x5C441A00, // 00F5 MOVE R17 R13 - 0x7C380600, // 00F6 CALL R14 3 - 0x8C3C0B09, // 00F7 GETMET R15 R5 K9 - 0x7C3C0200, // 00F8 CALL R15 1 - 0x8C401F0A, // 00F9 GETMET R16 R15 K10 - 0x58480005, // 00FA LDCONST R18 K5 - 0x884C0B16, // 00FB GETMBR R19 R5 K22 - 0x5C501800, // 00FC MOVE R20 R12 - 0x7C400800, // 00FD CALL R16 4 - 0x8C401F0A, // 00FE GETMET R16 R15 K10 - 0x58480007, // 00FF LDCONST R18 K7 - 0x884C0B1A, // 0100 GETMBR R19 R5 K26 - 0x5C501C00, // 0101 MOVE R20 R14 - 0x7C400800, // 0102 CALL R16 4 - 0x54420004, // 0103 LDINT R16 5 - 0x900E0810, // 0104 SETMBR R3 K4 R16 - 0x80041E00, // 0105 RET 1 R15 - 0x700200E5, // 0106 JMP #01ED - 0x5422000A, // 0107 LDINT R8 11 - 0x1C200E08, // 0108 EQ R8 R7 R8 - 0x78220012, // 0109 JMPF R8 #011D - 0x8C200506, // 010A GETMET R8 R2 K6 - 0x58280005, // 010B LDCONST R10 K5 - 0x7C200400, // 010C CALL R8 2 - 0x8C240329, // 010D GETMET R9 R1 K41 - 0x5C2C1000, // 010E MOVE R11 R8 - 0x7C240400, // 010F CALL R9 2 - 0xB8263800, // 0110 GETNGBL R9 K28 - 0x8C241321, // 0111 GETMET R9 R9 K33 - 0x8C2C1123, // 0112 GETMET R11 R8 K35 - 0x7C2C0200, // 0113 CALL R11 1 - 0x002E540B, // 0114 ADD R11 K42 R11 - 0x58300010, // 0115 LDCONST R12 K16 - 0x7C240600, // 0116 CALL R9 3 - 0xB8260200, // 0117 GETNGBL R9 K1 - 0x8824132B, // 0118 GETMBR R9 R9 K43 - 0x900E2809, // 0119 SETMBR R3 K20 R9 - 0x4C240000, // 011A LDNIL R9 - 0x80041200, // 011B RET 1 R9 - 0x700200CF, // 011C JMP #01ED - 0x54220005, // 011D LDINT R8 6 - 0x1C200E08, // 011E EQ R8 R7 R8 - 0x78220091, // 011F JMPF R8 #01B2 - 0x8C200506, // 0120 GETMET R8 R2 K6 - 0x58280005, // 0121 LDCONST R10 K5 - 0x7C200400, // 0122 CALL R8 2 - 0x8C240506, // 0123 GETMET R9 R2 K6 - 0x582C0007, // 0124 LDCONST R11 K7 - 0x7C240400, // 0125 CALL R9 2 - 0x8C280506, // 0126 GETMET R10 R2 K6 - 0x5830000E, // 0127 LDCONST R12 K14 - 0x7C280400, // 0128 CALL R10 2 - 0x8C2C0506, // 0129 GETMET R11 R2 K6 - 0x58340010, // 012A LDCONST R13 K16 - 0x7C2C0400, // 012B CALL R11 2 - 0x8C300506, // 012C GETMET R12 R2 K6 - 0x543A0003, // 012D LDINT R14 4 - 0x7C300400, // 012E CALL R12 2 - 0x8C34032C, // 012F GETMET R13 R1 K44 - 0x7C340200, // 0130 CALL R13 1 - 0x4C380000, // 0131 LDNIL R14 - 0x1C341A0E, // 0132 EQ R13 R13 R14 - 0x78360006, // 0133 JMPF R13 #013B - 0xB8363800, // 0134 GETNGBL R13 K28 - 0x8C341B21, // 0135 GETMET R13 R13 K33 - 0x583C002D, // 0136 LDCONST R15 K45 - 0x5840000E, // 0137 LDCONST R16 K14 - 0x7C340600, // 0138 CALL R13 3 - 0x4C340000, // 0139 LDNIL R13 - 0x80041A00, // 013A RET 1 R13 - 0x8C34032E, // 013B GETMET R13 R1 K46 - 0x5C3C1000, // 013C MOVE R15 R8 - 0x5C401200, // 013D MOVE R16 R9 - 0x7C340600, // 013E CALL R13 3 - 0x8C34032F, // 013F GETMET R13 R1 K47 - 0x5C3C1400, // 0140 MOVE R15 R10 - 0x7C340400, // 0141 CALL R13 2 - 0x9006600B, // 0142 SETMBR R1 K48 R11 - 0x9006620C, // 0143 SETMBR R1 K49 R12 - 0xB8360200, // 0144 GETNGBL R13 K1 - 0x88341B02, // 0145 GETMBR R13 R13 K2 - 0x8C341B32, // 0146 GETMET R13 R13 K50 - 0x5C3C1000, // 0147 MOVE R15 R8 - 0x7C340400, // 0148 CALL R13 2 - 0x8C381B33, // 0149 GETMET R14 R13 K51 - 0x54420005, // 014A LDINT R16 6 - 0x7C380400, // 014B CALL R14 2 - 0x8C3C1D06, // 014C GETMET R15 R14 K6 - 0x54460014, // 014D LDINT R17 21 - 0x7C3C0400, // 014E CALL R15 2 - 0x8C401D06, // 014F GETMET R16 R14 K6 - 0x544A0010, // 0150 LDINT R18 17 - 0x7C400400, // 0151 CALL R16 2 - 0x5C441E00, // 0152 MOVE R17 R15 - 0x78460001, // 0153 JMPF R17 #0156 - 0x5C442000, // 0154 MOVE R17 R16 - 0x74460006, // 0155 JMPT R17 #015D - 0xB8463800, // 0156 GETNGBL R17 K28 - 0x8C442321, // 0157 GETMET R17 R17 K33 - 0x584C0034, // 0158 LDCONST R19 K52 - 0x5850000E, // 0159 LDCONST R20 K14 - 0x7C440600, // 015A CALL R17 3 - 0x50440000, // 015B LDBOOL R17 0 0 - 0x80042200, // 015C RET 1 R17 - 0x60440004, // 015D GETGBL R17 G4 - 0x5C481E00, // 015E MOVE R18 R15 - 0x7C440200, // 015F CALL R17 1 - 0x1C442335, // 0160 EQ R17 R17 K53 - 0x78460006, // 0161 JMPF R17 #0169 - 0xB8466C00, // 0162 GETNGBL R17 K54 - 0x5C481E00, // 0163 MOVE R18 R15 - 0x7C440200, // 0164 CALL R17 1 - 0x8C442337, // 0165 GETMET R17 R17 K55 - 0x7C440200, // 0166 CALL R17 1 - 0x5C3C2200, // 0167 MOVE R15 R17 - 0x70020002, // 0168 JMP #016C - 0x8C441F37, // 0169 GETMET R17 R15 K55 + 0x70020002, // 0078 JMP #007C + 0xB83A0200, // 0079 GETNGBL R14 K1 + 0x8C381D1A, // 007A GETMET R14 R14 K26 + 0x7C380200, // 007B CALL R14 1 + 0x7C280800, // 007C CALL R10 4 + 0x900E0910, // 007D SETMBR R3 K4 K16 + 0x80041200, // 007E RET 1 R9 + 0x7002018A, // 007F JMP #020B + 0x1C200F05, // 0080 EQ R8 R7 K5 + 0x78220044, // 0081 JMPF R8 #00C7 + 0x8C200506, // 0082 GETMET R8 R2 K6 + 0x58280005, // 0083 LDCONST R10 K5 + 0x7C200400, // 0084 CALL R8 2 + 0x6024000C, // 0085 GETGBL R9 G12 + 0x5C281000, // 0086 MOVE R10 R8 + 0x7C240200, // 0087 CALL R9 1 + 0x542A001F, // 0088 LDINT R10 32 + 0x2024120A, // 0089 NE R9 R9 R10 + 0x78260001, // 008A JMPF R9 #008D + 0x4C240000, // 008B LDNIL R9 + 0x80041200, // 008C RET 1 R9 + 0x900E0907, // 008D SETMBR R3 K4 K7 + 0x8C240B09, // 008E GETMET R9 R5 K9 + 0x7C240200, // 008F CALL R9 1 + 0x8C28130A, // 0090 GETMET R10 R9 K10 + 0x58300007, // 0091 LDCONST R12 K7 + 0x88340B18, // 0092 GETMBR R13 R5 K24 + 0xB83A0200, // 0093 GETNGBL R14 K1 + 0x8C381D1B, // 0094 GETMET R14 R14 K27 + 0x7C380200, // 0095 CALL R14 1 + 0x7C280800, // 0096 CALL R10 4 + 0x8C28130A, // 0097 GETMET R10 R9 K10 + 0x5830000E, // 0098 LDCONST R12 K14 + 0x88340B1C, // 0099 GETMBR R13 R5 K28 + 0x5C381000, // 009A MOVE R14 R8 + 0x7C280800, // 009B CALL R10 4 + 0x8C28130A, // 009C GETMET R10 R9 K10 + 0x58300010, // 009D LDCONST R12 K16 + 0x88340B1D, // 009E GETMBR R13 R5 K29 + 0xB83A3C00, // 009F GETNGBL R14 K30 + 0x8C381D1F, // 00A0 GETMET R14 R14 K31 + 0x7C380200, // 00A1 CALL R14 1 + 0x94381D20, // 00A2 GETIDX R14 R14 K32 + 0x7C280800, // 00A3 CALL R10 4 + 0x8C281321, // 00A4 GETMET R10 R9 K33 + 0x7C280200, // 00A5 CALL R10 1 + 0x8C2C0322, // 00A6 GETMET R11 R1 K34 + 0x7C2C0200, // 00A7 CALL R11 1 + 0x0030140B, // 00A8 ADD R12 R10 R11 + 0xB8363C00, // 00A9 GETNGBL R13 K30 + 0x8C341B23, // 00AA GETMET R13 R13 K35 + 0x8C3C1925, // 00AB GETMET R15 R12 K37 + 0x7C3C0200, // 00AC CALL R15 1 + 0x003E480F, // 00AD ADD R15 K36 R15 + 0x58400010, // 00AE LDCONST R16 K16 + 0x7C340600, // 00AF CALL R13 3 + 0x8C340926, // 00B0 GETMET R13 R4 K38 + 0x7C340200, // 00B1 CALL R13 1 + 0x8C341B27, // 00B2 GETMET R13 R13 K39 + 0xB83E0200, // 00B3 GETNGBL R15 K1 + 0x8C3C1F28, // 00B4 GETMET R15 R15 K40 + 0x7C3C0200, // 00B5 CALL R15 1 + 0x5C401800, // 00B6 MOVE R16 R12 + 0x7C340600, // 00B7 CALL R13 3 + 0x8C380B09, // 00B8 GETMET R14 R5 K9 + 0x7C380200, // 00B9 CALL R14 1 + 0x8C3C1D0A, // 00BA GETMET R15 R14 K10 + 0x58440005, // 00BB LDCONST R17 K5 + 0x88480B18, // 00BC GETMBR R18 R5 K24 + 0x5C4C1400, // 00BD MOVE R19 R10 + 0x7C3C0800, // 00BE CALL R15 4 + 0x8C3C1D0A, // 00BF GETMET R15 R14 K10 + 0x58440007, // 00C0 LDCONST R17 K7 + 0x88480B1C, // 00C1 GETMBR R18 R5 K28 + 0x5C4C1A00, // 00C2 MOVE R19 R13 + 0x7C3C0800, // 00C3 CALL R15 4 + 0x900E0907, // 00C4 SETMBR R3 K4 K7 + 0x80041C00, // 00C5 RET 1 R14 + 0x70020143, // 00C6 JMP #020B + 0x54220003, // 00C7 LDINT R8 4 + 0x1C200E08, // 00C8 EQ R8 R7 R8 + 0x78220040, // 00C9 JMPF R8 #010B + 0x8C200506, // 00CA GETMET R8 R2 K6 + 0x58280005, // 00CB LDCONST R10 K5 + 0x7C200400, // 00CC CALL R8 2 + 0x6024000C, // 00CD GETGBL R9 G12 + 0x5C281000, // 00CE MOVE R10 R8 + 0x7C240200, // 00CF CALL R9 1 + 0x542A001F, // 00D0 LDINT R10 32 + 0x2024120A, // 00D1 NE R9 R9 R10 + 0x78260001, // 00D2 JMPF R9 #00D5 + 0x4C240000, // 00D3 LDNIL R9 + 0x80041200, // 00D4 RET 1 R9 + 0x8C240506, // 00D5 GETMET R9 R2 K6 + 0x582C0007, // 00D6 LDCONST R11 K7 + 0x50300000, // 00D7 LDBOOL R12 0 0 + 0x7C240600, // 00D8 CALL R9 3 + 0x8C280329, // 00D9 GETMET R10 R1 K41 + 0x7C280200, // 00DA CALL R10 1 + 0x8C2C0B09, // 00DB GETMET R11 R5 K9 + 0x7C2C0200, // 00DC CALL R11 1 + 0x8C30170A, // 00DD GETMET R12 R11 K10 + 0x58380007, // 00DE LDCONST R14 K7 + 0x883C0B18, // 00DF GETMBR R15 R5 K24 + 0x5C401400, // 00E0 MOVE R16 R10 + 0x7C300800, // 00E1 CALL R12 4 + 0x8C30170A, // 00E2 GETMET R12 R11 K10 + 0x5838000E, // 00E3 LDCONST R14 K14 + 0x883C0B1C, // 00E4 GETMBR R15 R5 K28 + 0x5C401000, // 00E5 MOVE R16 R8 + 0x7C300800, // 00E6 CALL R12 4 + 0x8C301721, // 00E7 GETMET R12 R11 K33 + 0x7C300200, // 00E8 CALL R12 1 + 0x8C340322, // 00E9 GETMET R13 R1 K34 + 0x7C340200, // 00EA CALL R13 1 + 0x0034180D, // 00EB ADD R13 R12 R13 + 0xB83A3C00, // 00EC GETNGBL R14 K30 + 0x8C381D23, // 00ED GETMET R14 R14 K35 + 0x8C401B25, // 00EE GETMET R16 R13 K37 + 0x7C400200, // 00EF CALL R16 1 + 0x00425410, // 00F0 ADD R16 K42 R16 + 0x58440010, // 00F1 LDCONST R17 K16 + 0x7C380600, // 00F2 CALL R14 3 + 0x8C380926, // 00F3 GETMET R14 R4 K38 + 0x7C380200, // 00F4 CALL R14 1 + 0x8C381D27, // 00F5 GETMET R14 R14 K39 + 0xB8420200, // 00F6 GETNGBL R16 K1 + 0x8C402128, // 00F7 GETMET R16 R16 K40 + 0x7C400200, // 00F8 CALL R16 1 + 0x5C441A00, // 00F9 MOVE R17 R13 + 0x7C380600, // 00FA CALL R14 3 + 0x8C3C0B09, // 00FB GETMET R15 R5 K9 + 0x7C3C0200, // 00FC CALL R15 1 + 0x8C401F0A, // 00FD GETMET R16 R15 K10 + 0x58480005, // 00FE LDCONST R18 K5 + 0x884C0B18, // 00FF GETMBR R19 R5 K24 + 0x5C501800, // 0100 MOVE R20 R12 + 0x7C400800, // 0101 CALL R16 4 + 0x8C401F0A, // 0102 GETMET R16 R15 K10 + 0x58480007, // 0103 LDCONST R18 K7 + 0x884C0B1C, // 0104 GETMBR R19 R5 K28 + 0x5C501C00, // 0105 MOVE R20 R14 + 0x7C400800, // 0106 CALL R16 4 + 0x54420004, // 0107 LDINT R16 5 + 0x900E0810, // 0108 SETMBR R3 K4 R16 + 0x80041E00, // 0109 RET 1 R15 + 0x700200FF, // 010A JMP #020B + 0x5422000A, // 010B LDINT R8 11 + 0x1C200E08, // 010C EQ R8 R7 R8 + 0x78220012, // 010D JMPF R8 #0121 + 0x8C200506, // 010E GETMET R8 R2 K6 + 0x58280005, // 010F LDCONST R10 K5 + 0x7C200400, // 0110 CALL R8 2 + 0x8C24032B, // 0111 GETMET R9 R1 K43 + 0x5C2C1000, // 0112 MOVE R11 R8 + 0x7C240400, // 0113 CALL R9 2 + 0xB8263C00, // 0114 GETNGBL R9 K30 + 0x8C241323, // 0115 GETMET R9 R9 K35 + 0x8C2C1125, // 0116 GETMET R11 R8 K37 + 0x7C2C0200, // 0117 CALL R11 1 + 0x002E580B, // 0118 ADD R11 K44 R11 + 0x58300010, // 0119 LDCONST R12 K16 + 0x7C240600, // 011A CALL R9 3 + 0xB8260200, // 011B GETNGBL R9 K1 + 0x8824132D, // 011C GETMBR R9 R9 K45 + 0x900E2C09, // 011D SETMBR R3 K22 R9 + 0x4C240000, // 011E LDNIL R9 + 0x80041200, // 011F RET 1 R9 + 0x700200E9, // 0120 JMP #020B + 0x54220005, // 0121 LDINT R8 6 + 0x1C200E08, // 0122 EQ R8 R7 R8 + 0x782200AA, // 0123 JMPF R8 #01CF + 0x8C200506, // 0124 GETMET R8 R2 K6 + 0x58280005, // 0125 LDCONST R10 K5 + 0x7C200400, // 0126 CALL R8 2 + 0x8C240506, // 0127 GETMET R9 R2 K6 + 0x582C0007, // 0128 LDCONST R11 K7 + 0x7C240400, // 0129 CALL R9 2 + 0x8C280506, // 012A GETMET R10 R2 K6 + 0x5830000E, // 012B LDCONST R12 K14 + 0x7C280400, // 012C CALL R10 2 + 0x8C2C0506, // 012D GETMET R11 R2 K6 + 0x58340010, // 012E LDCONST R13 K16 + 0x7C2C0400, // 012F CALL R11 2 + 0x8C300506, // 0130 GETMET R12 R2 K6 + 0x543A0003, // 0131 LDINT R14 4 + 0x7C300400, // 0132 CALL R12 2 + 0x8C34032E, // 0133 GETMET R13 R1 K46 + 0x7C340200, // 0134 CALL R13 1 + 0x4C380000, // 0135 LDNIL R14 + 0x1C341A0E, // 0136 EQ R13 R13 R14 + 0x78360006, // 0137 JMPF R13 #013F + 0xB8363C00, // 0138 GETNGBL R13 K30 + 0x8C341B23, // 0139 GETMET R13 R13 K35 + 0x583C002F, // 013A LDCONST R15 K47 + 0x5840000E, // 013B LDCONST R16 K14 + 0x7C340600, // 013C CALL R13 3 + 0x4C340000, // 013D LDNIL R13 + 0x80041A00, // 013E RET 1 R13 + 0x8C340330, // 013F GETMET R13 R1 K48 + 0x5C3C1000, // 0140 MOVE R15 R8 + 0x5C401200, // 0141 MOVE R16 R9 + 0x7C340600, // 0142 CALL R13 3 + 0x8C340331, // 0143 GETMET R13 R1 K49 + 0x5C3C1400, // 0144 MOVE R15 R10 + 0x7C340400, // 0145 CALL R13 2 + 0x8C340332, // 0146 GETMET R13 R1 K50 + 0x5C3C1600, // 0147 MOVE R15 R11 + 0x5C401800, // 0148 MOVE R16 R12 + 0x7C340600, // 0149 CALL R13 3 + 0xB8360200, // 014A GETNGBL R13 K1 + 0x88341B02, // 014B GETMBR R13 R13 K2 + 0x8C341B33, // 014C GETMET R13 R13 K51 + 0x5C3C1000, // 014D MOVE R15 R8 + 0x7C340400, // 014E CALL R13 2 + 0x8C381B34, // 014F GETMET R14 R13 K52 + 0x54420005, // 0150 LDINT R16 6 + 0x7C380400, // 0151 CALL R14 2 + 0x8C3C1D06, // 0152 GETMET R15 R14 K6 + 0x54460014, // 0153 LDINT R17 21 + 0x7C3C0400, // 0154 CALL R15 2 + 0x8C401D06, // 0155 GETMET R16 R14 K6 + 0x544A0010, // 0156 LDINT R18 17 + 0x7C400400, // 0157 CALL R16 2 + 0x5C441E00, // 0158 MOVE R17 R15 + 0x78460001, // 0159 JMPF R17 #015C + 0x5C442000, // 015A MOVE R17 R16 + 0x74460006, // 015B JMPT R17 #0163 + 0xB8463C00, // 015C GETNGBL R17 K30 + 0x8C442323, // 015D GETMET R17 R17 K35 + 0x584C0035, // 015E LDCONST R19 K53 + 0x5850000E, // 015F LDCONST R20 K14 + 0x7C440600, // 0160 CALL R17 3 + 0x50440000, // 0161 LDBOOL R17 0 0 + 0x80042200, // 0162 RET 1 R17 + 0x60440004, // 0163 GETGBL R17 G4 + 0x5C481E00, // 0164 MOVE R18 R15 + 0x7C440200, // 0165 CALL R17 1 + 0x1C442336, // 0166 EQ R17 R17 K54 + 0x78460006, // 0167 JMPF R17 #016F + 0xB8466E00, // 0168 GETNGBL R17 K55 + 0x5C481E00, // 0169 MOVE R18 R15 0x7C440200, // 016A CALL R17 1 - 0x5C3C2200, // 016B MOVE R15 R17 - 0x60440004, // 016C GETGBL R17 G4 - 0x5C482000, // 016D MOVE R18 R16 - 0x7C440200, // 016E CALL R17 1 - 0x1C442335, // 016F EQ R17 R17 K53 - 0x78460006, // 0170 JMPF R17 #0178 - 0xB8466C00, // 0171 GETNGBL R17 K54 - 0x5C482000, // 0172 MOVE R18 R16 - 0x7C440200, // 0173 CALL R17 1 - 0x8C442337, // 0174 GETMET R17 R17 K55 - 0x7C440200, // 0175 CALL R17 1 - 0x5C402200, // 0176 MOVE R16 R17 - 0x70020002, // 0177 JMP #017B - 0x8C442137, // 0178 GETMET R17 R16 K55 + 0x8C442338, // 016B GETMET R17 R17 K56 + 0x7C440200, // 016C CALL R17 1 + 0x5C3C2200, // 016D MOVE R15 R17 + 0x70020002, // 016E JMP #0172 + 0x8C441F38, // 016F GETMET R17 R15 K56 + 0x7C440200, // 0170 CALL R17 1 + 0x5C3C2200, // 0171 MOVE R15 R17 + 0x60440004, // 0172 GETGBL R17 G4 + 0x5C482000, // 0173 MOVE R18 R16 + 0x7C440200, // 0174 CALL R17 1 + 0x1C442336, // 0175 EQ R17 R17 K54 + 0x78460006, // 0176 JMPF R17 #017E + 0xB8466E00, // 0177 GETNGBL R17 K55 + 0x5C482000, // 0178 MOVE R18 R16 0x7C440200, // 0179 CALL R17 1 - 0x5C402200, // 017A MOVE R16 R17 - 0xB8460200, // 017B GETNGBL R17 K1 - 0x88442302, // 017C GETMBR R17 R17 K2 - 0x8C442332, // 017D GETMET R17 R17 K50 - 0x8C4C032C, // 017E GETMET R19 R1 K44 - 0x7C4C0200, // 017F CALL R19 1 - 0x7C440400, // 0180 CALL R17 2 - 0x8C442306, // 0181 GETMET R17 R17 K6 - 0x544E0008, // 0182 LDINT R19 9 - 0x7C440400, // 0183 CALL R17 2 - 0x404A0F38, // 0184 CONNECT R18 K7 K56 - 0x94442212, // 0185 GETIDX R17 R17 R18 - 0x604C0015, // 0186 GETGBL R19 G21 - 0x7C4C0000, // 0187 CALL R19 0 - 0x8C4C2739, // 0188 GETMET R19 R19 K57 - 0x5854003A, // 0189 LDCONST R21 K58 - 0x7C4C0400, // 018A CALL R19 2 - 0x5C482600, // 018B MOVE R18 R19 - 0x8C4C093B, // 018C GETMET R19 R4 K59 - 0x7C4C0200, // 018D CALL R19 1 - 0x8C501F3C, // 018E GETMET R20 R15 K60 - 0x7C500200, // 018F CALL R20 1 - 0x8C50293D, // 0190 GETMET R20 R20 K61 - 0x7C500200, // 0191 CALL R20 1 - 0x8C54273E, // 0192 GETMET R21 R19 K62 - 0x5C5C2200, // 0193 MOVE R23 R17 - 0x5C602800, // 0194 MOVE R24 R20 - 0x5C642400, // 0195 MOVE R25 R18 - 0x546A0007, // 0196 LDINT R26 8 - 0x7C540A00, // 0197 CALL R21 5 - 0x8C58033F, // 0198 GETMET R22 R1 K63 - 0x5C601E00, // 0199 MOVE R24 R15 - 0x5C642000, // 019A MOVE R25 R16 - 0x5C682A00, // 019B MOVE R26 R21 - 0x7C580800, // 019C CALL R22 4 - 0x88580112, // 019D GETMBR R22 R0 K18 - 0x8C582D40, // 019E GETMET R22 R22 K64 - 0x5C600200, // 019F MOVE R24 R1 - 0x7C580400, // 01A0 CALL R22 2 - 0x8C580B09, // 01A1 GETMET R22 R5 K9 - 0x7C580200, // 01A2 CALL R22 1 - 0x8C5C2D0A, // 01A3 GETMET R23 R22 K10 - 0x58640005, // 01A4 LDCONST R25 K5 - 0x88680B0B, // 01A5 GETMBR R26 R5 K11 - 0xB86E0200, // 01A6 GETNGBL R27 K1 - 0x886C372B, // 01A7 GETMBR R27 R27 K43 - 0x7C5C0800, // 01A8 CALL R23 4 - 0x8C5C2D0A, // 01A9 GETMET R23 R22 K10 - 0x58640007, // 01AA LDCONST R25 K7 - 0x88680B0B, // 01AB GETMBR R26 R5 K11 - 0x586C0007, // 01AC LDCONST R27 K7 - 0x7C5C0800, // 01AD CALL R23 4 - 0x545E0007, // 01AE LDINT R23 8 - 0x900E0817, // 01AF SETMBR R3 K4 R23 - 0x80042C00, // 01B0 RET 1 R22 - 0x7002003A, // 01B1 JMP #01ED - 0x54220008, // 01B2 LDINT R8 9 - 0x1C200E08, // 01B3 EQ R8 R7 R8 - 0x7822000B, // 01B4 JMPF R8 #01C1 - 0x8C200506, // 01B5 GETMET R8 R2 K6 - 0x58280005, // 01B6 LDCONST R10 K5 - 0x7C200400, // 01B7 CALL R8 2 - 0x8C240341, // 01B8 GETMET R9 R1 K65 - 0x5C2C1000, // 01B9 MOVE R11 R8 - 0x7C240400, // 01BA CALL R9 2 - 0xB8260200, // 01BB GETNGBL R9 K1 - 0x8824132B, // 01BC GETMBR R9 R9 K43 - 0x900E2809, // 01BD SETMBR R3 K20 R9 - 0x4C240000, // 01BE LDNIL R9 - 0x80041200, // 01BF RET 1 R9 - 0x7002002B, // 01C0 JMP #01ED - 0x54220009, // 01C1 LDINT R8 10 - 0x1C200E08, // 01C2 EQ R8 R7 R8 - 0x78220028, // 01C3 JMPF R8 #01ED - 0x8C200506, // 01C4 GETMET R8 R2 K6 - 0x58280005, // 01C5 LDCONST R10 K5 - 0x7C200400, // 01C6 CALL R8 2 - 0x88240112, // 01C7 GETMBR R9 R0 K18 - 0x88241342, // 01C8 GETMBR R9 R9 K66 - 0x8C241343, // 01C9 GETMET R9 R9 K67 - 0x7C240200, // 01CA CALL R9 1 - 0x28281107, // 01CB GE R10 R8 K7 - 0x782A001A, // 01CC JMPF R10 #01E8 - 0x6028000C, // 01CD GETGBL R10 G12 - 0x5C2C1200, // 01CE MOVE R11 R9 - 0x7C280200, // 01CF CALL R10 1 - 0x1828100A, // 01D0 LE R10 R8 R10 - 0x782A0015, // 01D1 JMPF R10 #01E8 - 0x04281107, // 01D2 SUB R10 R8 K7 - 0x9428120A, // 01D3 GETIDX R10 R9 R10 - 0xB82E3800, // 01D4 GETNGBL R11 K28 - 0x8C2C1721, // 01D5 GETMET R11 R11 K33 - 0x88340345, // 01D6 GETMBR R13 R1 K69 - 0x8C341B3C, // 01D7 GETMET R13 R13 K60 - 0x7C340200, // 01D8 CALL R13 1 - 0x8C341B3D, // 01D9 GETMET R13 R13 K61 - 0x7C340200, // 01DA CALL R13 1 - 0x8C341B23, // 01DB GETMET R13 R13 K35 - 0x7C340200, // 01DC CALL R13 1 - 0x0036880D, // 01DD ADD R13 K68 R13 - 0x7C2C0400, // 01DE CALL R11 2 - 0x882C0112, // 01DF GETMBR R11 R0 K18 - 0x882C1742, // 01E0 GETMBR R11 R11 K66 - 0x8C2C1746, // 01E1 GETMET R11 R11 K70 - 0x7C2C0200, // 01E2 CALL R11 1 - 0x882C0112, // 01E3 GETMBR R11 R0 K18 - 0x882C1742, // 01E4 GETMBR R11 R11 K66 - 0x8C2C1747, // 01E5 GETMET R11 R11 K71 - 0x7C2C0200, // 01E6 CALL R11 1 - 0x7001FFFF, // 01E7 JMP #01E8 - 0xB82A0200, // 01E8 GETNGBL R10 K1 - 0x8828152B, // 01E9 GETMBR R10 R10 K43 - 0x900E280A, // 01EA SETMBR R3 K20 R10 - 0x4C280000, // 01EB LDNIL R10 - 0x80041400, // 01EC RET 1 R10 - 0x70020006, // 01ED JMP #01F5 - 0x54220029, // 01EE LDINT R8 42 - 0x1C200C08, // 01EF EQ R8 R6 R8 - 0x78220003, // 01F0 JMPF R8 #01F5 - 0x1C200F05, // 01F1 EQ R8 R7 K5 - 0x78220001, // 01F2 JMPF R8 #01F5 - 0x50200200, // 01F3 LDBOOL R8 1 0 - 0x80041000, // 01F4 RET 1 R8 - 0x80000000, // 01F5 RET 0 + 0x8C442338, // 017A GETMET R17 R17 K56 + 0x7C440200, // 017B CALL R17 1 + 0x5C402200, // 017C MOVE R16 R17 + 0x70020002, // 017D JMP #0181 + 0x8C442138, // 017E GETMET R17 R16 K56 + 0x7C440200, // 017F CALL R17 1 + 0x5C402200, // 0180 MOVE R16 R17 + 0xB8460200, // 0181 GETNGBL R17 K1 + 0x88442302, // 0182 GETMBR R17 R17 K2 + 0x8C442333, // 0183 GETMET R17 R17 K51 + 0x8C4C032E, // 0184 GETMET R19 R1 K46 + 0x7C4C0200, // 0185 CALL R19 1 + 0x7C440400, // 0186 CALL R17 2 + 0x8C442306, // 0187 GETMET R17 R17 K6 + 0x544E0008, // 0188 LDINT R19 9 + 0x7C440400, // 0189 CALL R17 2 + 0x404A0F39, // 018A CONNECT R18 K7 K57 + 0x94442212, // 018B GETIDX R17 R17 R18 + 0x604C0015, // 018C GETGBL R19 G21 + 0x7C4C0000, // 018D CALL R19 0 + 0x8C4C273A, // 018E GETMET R19 R19 K58 + 0x5854003B, // 018F LDCONST R21 K59 + 0x7C4C0400, // 0190 CALL R19 2 + 0x5C482600, // 0191 MOVE R18 R19 + 0x8C4C093C, // 0192 GETMET R19 R4 K60 + 0x7C4C0200, // 0193 CALL R19 1 + 0x8C501F3D, // 0194 GETMET R20 R15 K61 + 0x7C500200, // 0195 CALL R20 1 + 0x8C50293E, // 0196 GETMET R20 R20 K62 + 0x7C500200, // 0197 CALL R20 1 + 0x8C54273F, // 0198 GETMET R21 R19 K63 + 0x5C5C2200, // 0199 MOVE R23 R17 + 0x5C602800, // 019A MOVE R24 R20 + 0x5C642400, // 019B MOVE R25 R18 + 0x546A0007, // 019C LDINT R26 8 + 0x7C540A00, // 019D CALL R21 5 + 0x8C580340, // 019E GETMET R22 R1 K64 + 0x5C601E00, // 019F MOVE R24 R15 + 0x5C642000, // 01A0 MOVE R25 R16 + 0x5C682A00, // 01A1 MOVE R26 R21 + 0x7C580800, // 01A2 CALL R22 4 + 0x8C580341, // 01A3 GETMET R22 R1 K65 + 0x7C580200, // 01A4 CALL R22 1 + 0x8C580342, // 01A5 GETMET R22 R1 K66 + 0x7C580200, // 01A6 CALL R22 1 + 0x88580114, // 01A7 GETMBR R22 R0 K20 + 0x8C582D43, // 01A8 GETMET R22 R22 K67 + 0x5C600200, // 01A9 MOVE R24 R1 + 0x7C580400, // 01AA CALL R22 2 + 0xB85A3C00, // 01AB GETNGBL R22 K30 + 0x8C582D23, // 01AC GETMET R22 R22 K35 + 0x58600044, // 01AD LDCONST R24 K68 + 0x58640010, // 01AE LDCONST R25 K16 + 0x7C580600, // 01AF CALL R22 3 + 0xB85A3C00, // 01B0 GETNGBL R22 K30 + 0x8C582D23, // 01B1 GETMET R22 R22 K35 + 0xB8620200, // 01B2 GETNGBL R24 K1 + 0x8C603146, // 01B3 GETMET R24 R24 K70 + 0x88680347, // 01B4 GETMBR R26 R1 K71 + 0x7C600400, // 01B5 CALL R24 2 + 0x00628A18, // 01B6 ADD R24 K69 R24 + 0x58640010, // 01B7 LDCONST R25 K16 + 0x7C580600, // 01B8 CALL R22 3 + 0xB85A3C00, // 01B9 GETNGBL R22 K30 + 0x8C582D23, // 01BA GETMET R22 R22 K35 + 0x58600044, // 01BB LDCONST R24 K68 + 0x58640010, // 01BC LDCONST R25 K16 + 0x7C580600, // 01BD CALL R22 3 + 0x8C580B09, // 01BE GETMET R22 R5 K9 + 0x7C580200, // 01BF CALL R22 1 + 0x8C5C2D0A, // 01C0 GETMET R23 R22 K10 + 0x58640005, // 01C1 LDCONST R25 K5 + 0x88680B0B, // 01C2 GETMBR R26 R5 K11 + 0xB86E0200, // 01C3 GETNGBL R27 K1 + 0x886C372D, // 01C4 GETMBR R27 R27 K45 + 0x7C5C0800, // 01C5 CALL R23 4 + 0x8C5C2D0A, // 01C6 GETMET R23 R22 K10 + 0x58640007, // 01C7 LDCONST R25 K7 + 0x88680B0B, // 01C8 GETMBR R26 R5 K11 + 0x586C0007, // 01C9 LDCONST R27 K7 + 0x7C5C0800, // 01CA CALL R23 4 + 0x545E0007, // 01CB LDINT R23 8 + 0x900E0817, // 01CC SETMBR R3 K4 R23 + 0x80042C00, // 01CD RET 1 R22 + 0x7002003B, // 01CE JMP #020B + 0x54220008, // 01CF LDINT R8 9 + 0x1C200E08, // 01D0 EQ R8 R7 R8 + 0x7822000B, // 01D1 JMPF R8 #01DE + 0x8C200506, // 01D2 GETMET R8 R2 K6 + 0x58280005, // 01D3 LDCONST R10 K5 + 0x7C200400, // 01D4 CALL R8 2 + 0x8C240348, // 01D5 GETMET R9 R1 K72 + 0x5C2C1000, // 01D6 MOVE R11 R8 + 0x7C240400, // 01D7 CALL R9 2 + 0xB8260200, // 01D8 GETNGBL R9 K1 + 0x8824132D, // 01D9 GETMBR R9 R9 K45 + 0x900E2C09, // 01DA SETMBR R3 K22 R9 + 0x4C240000, // 01DB LDNIL R9 + 0x80041200, // 01DC RET 1 R9 + 0x7002002C, // 01DD JMP #020B + 0x54220009, // 01DE LDINT R8 10 + 0x1C200E08, // 01DF EQ R8 R7 R8 + 0x78220029, // 01E0 JMPF R8 #020B + 0x8C200506, // 01E1 GETMET R8 R2 K6 + 0x58280005, // 01E2 LDCONST R10 K5 + 0x7C200400, // 01E3 CALL R8 2 + 0x88240114, // 01E4 GETMBR R9 R0 K20 + 0x88241349, // 01E5 GETMBR R9 R9 K73 + 0x8C24134A, // 01E6 GETMET R9 R9 K74 + 0x7C240200, // 01E7 CALL R9 1 + 0x28281107, // 01E8 GE R10 R8 K7 + 0x782A001B, // 01E9 JMPF R10 #0206 + 0x6028000C, // 01EA GETGBL R10 G12 + 0x5C2C1200, // 01EB MOVE R11 R9 + 0x7C280200, // 01EC CALL R10 1 + 0x1828100A, // 01ED LE R10 R8 R10 + 0x782A0016, // 01EE JMPF R10 #0206 + 0x04281107, // 01EF SUB R10 R8 K7 + 0x9428120A, // 01F0 GETIDX R10 R9 R10 + 0xB82E3C00, // 01F1 GETNGBL R11 K30 + 0x8C2C1723, // 01F2 GETMET R11 R11 K35 + 0x8C34034C, // 01F3 GETMET R13 R1 K76 + 0x7C340200, // 01F4 CALL R13 1 + 0x8C341B3D, // 01F5 GETMET R13 R13 K61 + 0x7C340200, // 01F6 CALL R13 1 + 0x8C341B3E, // 01F7 GETMET R13 R13 K62 + 0x7C340200, // 01F8 CALL R13 1 + 0x8C341B25, // 01F9 GETMET R13 R13 K37 + 0x7C340200, // 01FA CALL R13 1 + 0x0036960D, // 01FB ADD R13 K75 R13 + 0x7C2C0400, // 01FC CALL R11 2 + 0x882C0114, // 01FD GETMBR R11 R0 K20 + 0x882C1749, // 01FE GETMBR R11 R11 K73 + 0x8C2C174D, // 01FF GETMET R11 R11 K77 + 0x7C2C0200, // 0200 CALL R11 1 + 0x882C0114, // 0201 GETMBR R11 R0 K20 + 0x882C1749, // 0202 GETMBR R11 R11 K73 + 0x8C2C174E, // 0203 GETMET R11 R11 K78 + 0x7C2C0200, // 0204 CALL R11 1 + 0x7001FFFF, // 0205 JMP #0206 + 0xB82A0200, // 0206 GETNGBL R10 K1 + 0x8828152D, // 0207 GETMBR R10 R10 K45 + 0x900E2C0A, // 0208 SETMBR R3 K22 R10 + 0x4C280000, // 0209 LDNIL R10 + 0x80041400, // 020A RET 1 R10 + 0x70020006, // 020B JMP #0213 + 0x54220029, // 020C LDINT R8 42 + 0x1C200C08, // 020D EQ R8 R6 R8 + 0x78220003, // 020E JMPF R8 #0213 + 0x1C200F05, // 020F EQ R8 R7 K5 + 0x78220001, // 0210 JMPF R8 #0213 + 0x50200200, // 0211 LDBOOL R8 1 0 + 0x80041000, // 0212 RET 1 R8 + 0x80000000, // 0213 RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h index 475888601..7b3dd4de6 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h @@ -4,14 +4,789 @@ \********************************************************************/ #include "be_constobj.h" -extern const bclass be_class_Matter_Session; +extern const bclass be_class_Matter_Fabric; + +/******************************************************************** +** Solidified function: get_admin_subject +********************************************************************/ +be_local_closure(Matter_Fabric_get_admin_subject, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(admin_subject), + }), + be_str_weak(get_admin_subject), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tojson +********************************************************************/ +be_local_closure(Matter_Fabric_tojson, /* name */ + be_nested_proto( + 18, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[27]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(introspect), + /* K3 */ be_nested_str_weak(members), + /* K4 */ be_nested_str_weak(get), + /* K5 */ be_nested_str_weak(function), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(_), + /* K8 */ be_nested_str_weak(push), + /* K9 */ be_nested_str_weak(stop_iteration), + /* K10 */ be_nested_str_weak(matter), + /* K11 */ be_nested_str_weak(sort), + /* K12 */ be_nested_str_weak(_X24_X24), + /* K13 */ be_nested_str_weak(tob64), + /* K14 */ be_nested_str_weak(format), + /* K15 */ be_nested_str_weak(_X25s_X3A_X25s), + /* K16 */ be_nested_str_weak(dump), + /* K17 */ be_nested_str_weak(_sessions), + /* K18 */ be_nested_str_weak(persistables), + /* K19 */ be_nested_str_weak(tojson), + /* K20 */ be_nested_str_weak(_X5B), + /* K21 */ be_nested_str_weak(concat), + /* K22 */ be_nested_str_weak(_X2C), + /* K23 */ be_nested_str_weak(_X5D), + /* K24 */ be_nested_str_weak(_X22_sessions_X22_X3A), + /* K25 */ be_nested_str_weak(_X7B), + /* K26 */ be_nested_str_weak(_X7D), + }), + be_str_weak(tojson), + &be_const_str_solidified, + ( &(const binstruction[116]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0xA40E0400, // 0002 IMPORT R3 K2 + 0x60100012, // 0003 GETGBL R4 G18 + 0x7C100000, // 0004 CALL R4 0 + 0x60140010, // 0005 GETGBL R5 G16 + 0x8C180703, // 0006 GETMET R6 R3 K3 + 0x5C200000, // 0007 MOVE R8 R0 + 0x7C180400, // 0008 CALL R6 2 + 0x7C140200, // 0009 CALL R5 1 + 0xA8020011, // 000A EXBLK 0 #001D + 0x5C180A00, // 000B MOVE R6 R5 + 0x7C180000, // 000C CALL R6 0 + 0x8C1C0704, // 000D GETMET R7 R3 K4 + 0x5C240000, // 000E MOVE R9 R0 + 0x5C280C00, // 000F MOVE R10 R6 + 0x7C1C0600, // 0010 CALL R7 3 + 0x60200004, // 0011 GETGBL R8 G4 + 0x5C240E00, // 0012 MOVE R9 R7 + 0x7C200200, // 0013 CALL R8 1 + 0x20201105, // 0014 NE R8 R8 K5 + 0x78220005, // 0015 JMPF R8 #001C + 0x94200D06, // 0016 GETIDX R8 R6 K6 + 0x20201107, // 0017 NE R8 R8 K7 + 0x78220002, // 0018 JMPF R8 #001C + 0x8C200908, // 0019 GETMET R8 R4 K8 + 0x5C280C00, // 001A MOVE R10 R6 + 0x7C200400, // 001B CALL R8 2 + 0x7001FFED, // 001C JMP #000B + 0x58140009, // 001D LDCONST R5 K9 + 0xAC140200, // 001E CATCH R5 1 0 + 0xB0080000, // 001F RAISE 2 R0 R0 + 0xB8161400, // 0020 GETNGBL R5 K10 + 0x8C140B0B, // 0021 GETMET R5 R5 K11 + 0x5C1C0800, // 0022 MOVE R7 R4 + 0x7C140400, // 0023 CALL R5 2 + 0x5C100A00, // 0024 MOVE R4 R5 + 0x60140012, // 0025 GETGBL R5 G18 + 0x7C140000, // 0026 CALL R5 0 + 0x60180010, // 0027 GETGBL R6 G16 + 0x5C1C0800, // 0028 MOVE R7 R4 + 0x7C180200, // 0029 CALL R6 1 + 0xA8020020, // 002A EXBLK 0 #004C + 0x5C1C0C00, // 002B MOVE R7 R6 + 0x7C1C0000, // 002C CALL R7 0 + 0x8C200704, // 002D GETMET R8 R3 K4 + 0x5C280000, // 002E MOVE R10 R0 + 0x5C2C0E00, // 002F MOVE R11 R7 + 0x7C200600, // 0030 CALL R8 3 + 0x4C240000, // 0031 LDNIL R9 + 0x1C241009, // 0032 EQ R9 R8 R9 + 0x78260000, // 0033 JMPF R9 #0035 + 0x7001FFF5, // 0034 JMP #002B + 0x6024000F, // 0035 GETGBL R9 G15 + 0x5C281000, // 0036 MOVE R10 R8 + 0x602C0015, // 0037 GETGBL R11 G21 + 0x7C240400, // 0038 CALL R9 2 + 0x78260003, // 0039 JMPF R9 #003E + 0x8C24110D, // 003A GETMET R9 R8 K13 + 0x7C240200, // 003B CALL R9 1 + 0x00261809, // 003C ADD R9 K12 R9 + 0x5C201200, // 003D MOVE R8 R9 + 0x8C240B08, // 003E GETMET R9 R5 K8 + 0x8C2C050E, // 003F GETMET R11 R2 K14 + 0x5834000F, // 0040 LDCONST R13 K15 + 0x8C380310, // 0041 GETMET R14 R1 K16 + 0x60400008, // 0042 GETGBL R16 G8 + 0x5C440E00, // 0043 MOVE R17 R7 + 0x7C400200, // 0044 CALL R16 1 + 0x7C380400, // 0045 CALL R14 2 + 0x8C3C0310, // 0046 GETMET R15 R1 K16 + 0x5C441000, // 0047 MOVE R17 R8 + 0x7C3C0400, // 0048 CALL R15 2 + 0x7C2C0800, // 0049 CALL R11 4 + 0x7C240400, // 004A CALL R9 2 + 0x7001FFDE, // 004B JMP #002B + 0x58180009, // 004C LDCONST R6 K9 + 0xAC180200, // 004D CATCH R6 1 0 + 0xB0080000, // 004E RAISE 2 R0 R0 + 0x60180012, // 004F GETGBL R6 G18 + 0x7C180000, // 0050 CALL R6 0 + 0x601C0010, // 0051 GETGBL R7 G16 + 0x88200111, // 0052 GETMBR R8 R0 K17 + 0x8C201112, // 0053 GETMET R8 R8 K18 + 0x7C200200, // 0054 CALL R8 1 + 0x7C1C0200, // 0055 CALL R7 1 + 0xA8020006, // 0056 EXBLK 0 #005E + 0x5C200E00, // 0057 MOVE R8 R7 + 0x7C200000, // 0058 CALL R8 0 + 0x8C240D08, // 0059 GETMET R9 R6 K8 + 0x8C2C1113, // 005A GETMET R11 R8 K19 + 0x7C2C0200, // 005B CALL R11 1 + 0x7C240400, // 005C CALL R9 2 + 0x7001FFF8, // 005D JMP #0057 + 0x581C0009, // 005E LDCONST R7 K9 + 0xAC1C0200, // 005F CATCH R7 1 0 + 0xB0080000, // 0060 RAISE 2 R0 R0 + 0x601C000C, // 0061 GETGBL R7 G12 + 0x5C200C00, // 0062 MOVE R8 R6 + 0x7C1C0200, // 0063 CALL R7 1 + 0x241C0F06, // 0064 GT R7 R7 K6 + 0x781E0007, // 0065 JMPF R7 #006E + 0x8C1C0D15, // 0066 GETMET R7 R6 K21 + 0x58240016, // 0067 LDCONST R9 K22 + 0x7C1C0400, // 0068 CALL R7 2 + 0x001E2807, // 0069 ADD R7 K20 R7 + 0x001C0F17, // 006A ADD R7 R7 K23 + 0x8C200B08, // 006B GETMET R8 R5 K8 + 0x002A3007, // 006C ADD R10 K24 R7 + 0x7C200400, // 006D CALL R8 2 + 0x8C1C0B15, // 006E GETMET R7 R5 K21 + 0x58240016, // 006F LDCONST R9 K22 + 0x7C1C0400, // 0070 CALL R7 2 + 0x001E3207, // 0071 ADD R7 K25 R7 + 0x001C0F1A, // 0072 ADD R7 R7 K26 + 0x80040E00, // 0073 RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ipk_group_key +********************************************************************/ +be_local_closure(Matter_Fabric_get_ipk_group_key, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(ipk_epoch_key), + /* K1 */ be_nested_str_weak(fabric_compressed), + /* K2 */ be_nested_str_weak(crypto), + /* K3 */ be_nested_str_weak(HKDF_SHA256), + /* K4 */ be_nested_str_weak(fromstring), + /* K5 */ be_nested_str_weak(_GROUP_KEY), + /* K6 */ be_nested_str_weak(derive), + }), + be_str_weak(get_ipk_group_key), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x74060003, // 0003 JMPT R1 #0008 + 0x88040101, // 0004 GETMBR R1 R0 K1 + 0x4C080000, // 0005 LDNIL R2 + 0x1C040202, // 0006 EQ R1 R1 R2 + 0x78060001, // 0007 JMPF R1 #000A + 0x4C040000, // 0008 LDNIL R1 + 0x80040200, // 0009 RET 1 R1 + 0xA4060400, // 000A IMPORT R1 K2 + 0x8C080303, // 000B GETMET R2 R1 K3 + 0x7C080200, // 000C CALL R2 1 + 0x600C0015, // 000D GETGBL R3 G21 + 0x7C0C0000, // 000E CALL R3 0 + 0x8C0C0704, // 000F GETMET R3 R3 K4 + 0x88140105, // 0010 GETMBR R5 R0 K5 + 0x7C0C0400, // 0011 CALL R3 2 + 0x8C100506, // 0012 GETMET R4 R2 K6 + 0x88180100, // 0013 GETMBR R6 R0 K0 + 0x881C0101, // 0014 GETMBR R7 R0 K1 + 0x5C200600, // 0015 MOVE R8 R3 + 0x5426000F, // 0016 LDINT R9 16 + 0x7C100A00, // 0017 CALL R4 5 + 0x80040800, // 0018 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_icac +********************************************************************/ +be_local_closure(Matter_Fabric_get_icac, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(icac), + }), + be_str_weak(get_icac), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Fabric_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(_store), + /* K2 */ be_nested_str_weak(_sessions), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(Expirable_list), + /* K5 */ be_nested_str_weak(fabric_label), + /* K6 */ be_nested_str_weak(), + /* K7 */ be_nested_str_weak(created), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(rtc), + /* K10 */ be_nested_str_weak(utc), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x90020201, // 0001 SETMBR R0 K1 R1 + 0xB80E0600, // 0002 GETNGBL R3 K3 + 0x8C0C0704, // 0003 GETMET R3 R3 K4 + 0x7C0C0200, // 0004 CALL R3 1 + 0x90020403, // 0005 SETMBR R0 K2 R3 + 0x90020B06, // 0006 SETMBR R0 K5 K6 + 0xB80E1000, // 0007 GETNGBL R3 K8 + 0x8C0C0709, // 0008 GETMET R3 R3 K9 + 0x7C0C0200, // 0009 CALL R3 1 + 0x940C070A, // 000A GETIDX R3 R3 K10 + 0x90020E03, // 000B SETMBR R0 K7 R3 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_old_recent_session +********************************************************************/ +be_local_closure(Matter_Fabric_get_old_recent_session, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_sessions), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(last_used), + /* K3 */ be_const_int(1), + }), + be_str_weak(get_old_recent_session), + &be_const_str_solidified, + ( &(const binstruction[30]) { /* code */ + 0x6008000C, // 0000 GETGBL R2 G12 + 0x880C0100, // 0001 GETMBR R3 R0 K0 + 0x7C080200, // 0002 CALL R2 1 + 0x1C080501, // 0003 EQ R2 R2 K1 + 0x780A0001, // 0004 JMPF R2 #0007 + 0x4C080000, // 0005 LDNIL R2 + 0x80040400, // 0006 RET 1 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x94080501, // 0008 GETIDX R2 R2 K1 + 0x880C0502, // 0009 GETMBR R3 R2 K2 + 0x58100003, // 000A LDCONST R4 K3 + 0x6014000C, // 000B GETGBL R5 G12 + 0x88180100, // 000C GETMBR R6 R0 K0 + 0x7C140200, // 000D CALL R5 1 + 0x14140805, // 000E LT R5 R4 R5 + 0x7816000C, // 000F JMPF R5 #001D + 0x88140100, // 0010 GETMBR R5 R0 K0 + 0x94140A04, // 0011 GETIDX R5 R5 R4 + 0x88140B02, // 0012 GETMBR R5 R5 K2 + 0x78060001, // 0013 JMPF R1 #0016 + 0x14180A03, // 0014 LT R6 R5 R3 + 0x70020000, // 0015 JMP #0017 + 0x24180A03, // 0016 GT R6 R5 R3 + 0x781A0002, // 0017 JMPF R6 #001B + 0x88180100, // 0018 GETMBR R6 R0 K0 + 0x94080C04, // 0019 GETIDX R2 R6 R4 + 0x5C0C0A00, // 001A MOVE R3 R5 + 0x00100903, // 001B ADD R4 R4 K3 + 0x7001FFED, // 001C JMP #000B + 0x80040400, // 001D RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_noc +********************************************************************/ +be_local_closure(Matter_Fabric_get_noc, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(noc), + }), + be_str_weak(get_noc), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_newest_session +********************************************************************/ +be_local_closure(Matter_Fabric_get_newest_session, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(get_old_recent_session), + }), + be_str_weak(get_newest_session), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x500C0000, // 0001 LDBOOL R3 0 0 + 0x7C040400, // 0002 CALL R1 2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_fabric_id +********************************************************************/ +be_local_closure(Matter_Fabric_get_fabric_id, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(fabric_id), + }), + be_str_weak(get_fabric_id), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_admin_vendor +********************************************************************/ +be_local_closure(Matter_Fabric_get_admin_vendor, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(admin_vendor), + }), + be_str_weak(get_admin_vendor), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_fabric_compressed +********************************************************************/ +be_local_closure(Matter_Fabric_get_fabric_compressed, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(fabric_compressed), + }), + be_str_weak(get_fabric_compressed), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_fabric_label +********************************************************************/ +be_local_closure(Matter_Fabric_get_fabric_label, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(fabric_label), + }), + be_str_weak(get_fabric_label), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_oldest_session +********************************************************************/ +be_local_closure(Matter_Fabric_get_oldest_session, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(get_old_recent_session), + }), + be_str_weak(get_oldest_session), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x500C0200, // 0001 LDBOOL R3 1 0 + 0x7C040400, // 0002 CALL R1 2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_session +********************************************************************/ +be_local_closure(Matter_Fabric_add_session, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(_sessions), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(_MAX_CASE), + /* K3 */ be_nested_str_weak(remove), + /* K4 */ be_nested_str_weak(get_oldest_session), + /* K5 */ be_nested_str_weak(push), + }), + be_str_weak(add_session), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x4C0C0000, // 0004 LDNIL R3 + 0x1C080403, // 0005 EQ R2 R2 R3 + 0x780A0012, // 0006 JMPF R2 #001A + 0x6008000C, // 0007 GETGBL R2 G12 + 0x880C0100, // 0008 GETMBR R3 R0 K0 + 0x7C080200, // 0009 CALL R2 1 + 0x880C0102, // 000A GETMBR R3 R0 K2 + 0x28080403, // 000B GE R2 R2 R3 + 0x780A0008, // 000C JMPF R2 #0016 + 0x88080100, // 000D GETMBR R2 R0 K0 + 0x8C080503, // 000E GETMET R2 R2 K3 + 0x88100100, // 000F GETMBR R4 R0 K0 + 0x8C100901, // 0010 GETMET R4 R4 K1 + 0x8C180104, // 0011 GETMET R6 R0 K4 + 0x7C180200, // 0012 CALL R6 1 + 0x7C100400, // 0013 CALL R4 2 + 0x7C080400, // 0014 CALL R2 2 + 0x7001FFF0, // 0015 JMP #0007 + 0x88080100, // 0016 GETMBR R2 R0 K0 + 0x8C080505, // 0017 GETMET R2 R2 K5 + 0x5C100200, // 0018 MOVE R4 R1 + 0x7C080400, // 0019 CALL R2 2 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_device_id +********************************************************************/ +be_local_closure(Matter_Fabric_get_device_id, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(device_id), + }), + be_str_weak(get_device_id), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: fromjson +********************************************************************/ +be_local_closure(Matter_Fabric_fromjson, /* name */ + be_nested_proto( + 16, /* nstack */ + 2, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[17]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Fabric), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(introspect), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(Fabric), + /* K5 */ be_nested_str_weak(keys), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(_), + /* K8 */ be_nested_str_weak(find), + /* K9 */ be_nested_str_weak(0x), + /* K10 */ be_nested_str_weak(set), + /* K11 */ be_nested_str_weak(fromhex), + /* K12 */ be_const_int(2), + /* K13 */ be_const_int(2147483647), + /* K14 */ be_nested_str_weak(_X24_X24), + /* K15 */ be_nested_str_weak(fromb64), + /* K16 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(fromjson), + &be_const_str_solidified, + ( &(const binstruction[74]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0xA4120400, // 0002 IMPORT R4 K2 + 0xB8160600, // 0003 GETNGBL R5 K3 + 0x8C140B04, // 0004 GETMET R5 R5 K4 + 0x5C1C0000, // 0005 MOVE R7 R0 + 0x7C140400, // 0006 CALL R5 2 + 0x60180010, // 0007 GETGBL R6 G16 + 0x8C1C0305, // 0008 GETMET R7 R1 K5 + 0x7C1C0200, // 0009 CALL R7 1 + 0x7C180200, // 000A CALL R6 1 + 0xA8020039, // 000B EXBLK 0 #0046 + 0x5C1C0C00, // 000C MOVE R7 R6 + 0x7C1C0000, // 000D CALL R7 0 + 0x94200F06, // 000E GETIDX R8 R7 K6 + 0x1C201107, // 000F EQ R8 R8 K7 + 0x78220000, // 0010 JMPF R8 #0012 + 0x7001FFF9, // 0011 JMP #000C + 0x94200207, // 0012 GETIDX R8 R1 R7 + 0x60240004, // 0013 GETGBL R9 G4 + 0x5C281000, // 0014 MOVE R10 R8 + 0x7C240200, // 0015 CALL R9 1 + 0x1C241301, // 0016 EQ R9 R9 K1 + 0x78260027, // 0017 JMPF R9 #0040 + 0x8C240708, // 0018 GETMET R9 R3 K8 + 0x5C2C1000, // 0019 MOVE R11 R8 + 0x58300009, // 001A LDCONST R12 K9 + 0x7C240600, // 001B CALL R9 3 + 0x1C241306, // 001C EQ R9 R9 K6 + 0x7826000A, // 001D JMPF R9 #0029 + 0x8C24090A, // 001E GETMET R9 R4 K10 + 0x5C2C0A00, // 001F MOVE R11 R5 + 0x5C300E00, // 0020 MOVE R12 R7 + 0x60340015, // 0021 GETGBL R13 G21 + 0x7C340000, // 0022 CALL R13 0 + 0x8C341B0B, // 0023 GETMET R13 R13 K11 + 0x403E190D, // 0024 CONNECT R15 K12 K13 + 0x943C100F, // 0025 GETIDX R15 R8 R15 + 0x7C340400, // 0026 CALL R13 2 + 0x7C240800, // 0027 CALL R9 4 + 0x70020015, // 0028 JMP #003F + 0x8C240708, // 0029 GETMET R9 R3 K8 + 0x5C2C1000, // 002A MOVE R11 R8 + 0x5830000E, // 002B LDCONST R12 K14 + 0x7C240600, // 002C CALL R9 3 + 0x1C241306, // 002D EQ R9 R9 K6 + 0x7826000A, // 002E JMPF R9 #003A + 0x8C24090A, // 002F GETMET R9 R4 K10 + 0x5C2C0A00, // 0030 MOVE R11 R5 + 0x5C300E00, // 0031 MOVE R12 R7 + 0x60340015, // 0032 GETGBL R13 G21 + 0x7C340000, // 0033 CALL R13 0 + 0x8C341B0F, // 0034 GETMET R13 R13 K15 + 0x403E190D, // 0035 CONNECT R15 K12 K13 + 0x943C100F, // 0036 GETIDX R15 R8 R15 + 0x7C340400, // 0037 CALL R13 2 + 0x7C240800, // 0038 CALL R9 4 + 0x70020004, // 0039 JMP #003F + 0x8C24090A, // 003A GETMET R9 R4 K10 + 0x5C2C0A00, // 003B MOVE R11 R5 + 0x5C300E00, // 003C MOVE R12 R7 + 0x5C341000, // 003D MOVE R13 R8 + 0x7C240800, // 003E CALL R9 4 + 0x70020004, // 003F JMP #0045 + 0x8C24090A, // 0040 GETMET R9 R4 K10 + 0x5C2C0A00, // 0041 MOVE R11 R5 + 0x5C300E00, // 0042 MOVE R12 R7 + 0x5C341000, // 0043 MOVE R13 R8 + 0x7C240800, // 0044 CALL R9 4 + 0x7001FFC5, // 0045 JMP #000C + 0x58180010, // 0046 LDCONST R6 K16 + 0xAC180200, // 0047 CATCH R6 1 0 + 0xB0080000, // 0048 RAISE 2 R0 R0 + 0x80040A00, // 0049 RET 1 R5 + }) + ) +); +/*******************************************************************/ + /******************************************************************** ** Solidified function: get_ca_pub ********************************************************************/ -be_local_closure(Matter_Session_get_ca_pub, /* name */ +be_local_closure(Matter_Fabric_get_ca_pub, /* name */ be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -31,15 +806,15 @@ be_local_closure(Matter_Session_get_ca_pub, /* name */ ( &(const binstruction[12]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x78060008, // 0001 JMPF R1 #000B - 0xB8060200, // 0002 GETNGBL R1 K1 - 0x88040302, // 0003 GETMBR R1 R1 K2 - 0x8C040303, // 0004 GETMET R1 R1 K3 - 0x880C0100, // 0005 GETMBR R3 R0 K0 - 0x7C040400, // 0006 CALL R1 2 - 0x8C080304, // 0007 GETMET R2 R1 K4 - 0x54120008, // 0008 LDINT R4 9 - 0x7C080400, // 0009 CALL R2 2 - 0x80040400, // 000A RET 1 R2 + 0xB80A0200, // 0002 GETNGBL R2 K1 + 0x88080502, // 0003 GETMBR R2 R2 K2 + 0x8C080503, // 0004 GETMET R2 R2 K3 + 0x5C100200, // 0005 MOVE R4 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x8C0C0504, // 0007 GETMET R3 R2 K4 + 0x54160008, // 0008 LDINT R5 9 + 0x7C0C0400, // 0009 CALL R3 2 + 0x80040600, // 000A RET 1 R3 0x80000000, // 000B RET 0 }) ) @@ -48,9 +823,9 @@ be_local_closure(Matter_Session_get_ca_pub, /* name */ /******************************************************************** -** Solidified function: get_noc +** Solidified function: get_ipk_epoch_key ********************************************************************/ -be_local_closure(Matter_Session_get_noc, /* name */ +be_local_closure(Matter_Fabric_get_ipk_epoch_key, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -61,9 +836,9 @@ be_local_closure(Matter_Session_get_noc, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(noc), + /* K0 */ be_nested_str_weak(ipk_epoch_key), }), - be_str_weak(get_noc), + be_str_weak(get_ipk_epoch_key), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -74,6 +849,121 @@ be_local_closure(Matter_Session_get_noc, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified class: Matter_Fabric +********************************************************************/ +extern const bclass be_class_Matter_Expirable; +be_local_class(Matter_Fabric, + 14, + &be_class_Matter_Expirable, + be_nested_map(34, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(get_admin_subject, 33), be_const_closure(Matter_Fabric_get_admin_subject_closure) }, + { be_const_key_weak(get_ipk_epoch_key, 21), be_const_closure(Matter_Fabric_get_ipk_epoch_key_closure) }, + { be_const_key_weak(fabric_id, -1), be_const_var(8) }, + { be_const_key_weak(ipk_epoch_key, -1), be_const_var(7) }, + { be_const_key_weak(get_noc, -1), be_const_closure(Matter_Fabric_get_noc_closure) }, + { be_const_key_weak(admin_subject, -1), be_const_var(12) }, + { be_const_key_weak(root_ca_certificate, -1), be_const_var(4) }, + { be_const_key_weak(_sessions, 29), be_const_var(2) }, + { be_const_key_weak(get_old_recent_session, -1), be_const_closure(Matter_Fabric_get_old_recent_session_closure) }, + { be_const_key_weak(icac, 30), be_const_var(6) }, + { be_const_key_weak(get_ipk_group_key, 4), be_const_closure(Matter_Fabric_get_ipk_group_key_closure) }, + { be_const_key_weak(created, -1), be_const_var(1) }, + { be_const_key_weak(_store, 24), be_const_var(0) }, + { be_const_key_weak(get_newest_session, -1), be_const_closure(Matter_Fabric_get_newest_session_closure) }, + { be_const_key_weak(_MAX_CASE, -1), be_const_int(5) }, + { be_const_key_weak(init, 7), be_const_closure(Matter_Fabric_init_closure) }, + { be_const_key_weak(get_admin_vendor, 25), be_const_closure(Matter_Fabric_get_admin_vendor_closure) }, + { be_const_key_weak(fabric_label, -1), be_const_var(11) }, + { be_const_key_weak(get_icac, 1), be_const_closure(Matter_Fabric_get_icac_closure) }, + { be_const_key_weak(get_fabric_compressed, 12), be_const_closure(Matter_Fabric_get_fabric_compressed_closure) }, + { be_const_key_weak(fromjson, -1), be_const_static_closure(Matter_Fabric_fromjson_closure) }, + { be_const_key_weak(get_device_id, 28), be_const_closure(Matter_Fabric_get_device_id_closure) }, + { be_const_key_weak(no_private_key, 26), be_const_var(3) }, + { be_const_key_weak(device_id, -1), be_const_var(10) }, + { be_const_key_weak(add_session, -1), be_const_closure(Matter_Fabric_add_session_closure) }, + { be_const_key_weak(get_oldest_session, -1), be_const_closure(Matter_Fabric_get_oldest_session_closure) }, + { be_const_key_weak(get_fabric_label, -1), be_const_closure(Matter_Fabric_get_fabric_label_closure) }, + { be_const_key_weak(admin_vendor, 20), be_const_var(13) }, + { be_const_key_weak(fabric_compressed, -1), be_const_var(9) }, + { be_const_key_weak(get_fabric_id, -1), be_const_closure(Matter_Fabric_get_fabric_id_closure) }, + { be_const_key_weak(noc, 14), be_const_var(5) }, + { be_const_key_weak(_GROUP_KEY, 5), be_nested_str_weak(GroupKey_X20v1_X2E0) }, + { be_const_key_weak(get_ca_pub, -1), be_const_closure(Matter_Fabric_get_ca_pub_closure) }, + { be_const_key_weak(tojson, -1), be_const_closure(Matter_Fabric_tojson_closure) }, + })), + be_str_weak(Matter_Fabric) +); +/*******************************************************************/ + +void be_load_Matter_Fabric_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Fabric); + be_setglobal(vm, "Matter_Fabric"); + be_pop(vm, 1); +} + +extern const bclass be_class_Matter_Session; + +/******************************************************************** +** Solidified function: is_PASE +********************************************************************/ +be_local_closure(Matter_Session_is_PASE, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(mode), + /* K1 */ be_nested_str_weak(_PASE), + }), + be_str_weak(is_PASE), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ipk_epoch_key +********************************************************************/ +be_local_closure(Matter_Session_get_ipk_epoch_key, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(ipk_epoch_key), + }), + be_str_weak(get_ipk_epoch_key), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: get_i2r_privacy ********************************************************************/ @@ -128,26 +1018,100 @@ be_local_closure(Matter_Session_get_i2r_privacy, /* name */ /******************************************************************** -** Solidified function: set_ipk_epoch_key +** Solidified function: close ********************************************************************/ -be_local_closure(Matter_Session_set_ipk_epoch_key, /* name */ +be_local_closure(Matter_Session_close, /* name */ be_nested_proto( - 2, /* nstack */ - 2, /* argc */ + 8, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), + ( &(const bvalue[21]) { /* constants */ + /* K0 */ be_nested_str_weak(local_session_id), + /* K1 */ be_nested_str_weak(__future_local_session_id), + /* K2 */ be_nested_str_weak(initiator_session_id), + /* K3 */ be_nested_str_weak(__future_initiator_session_id), + /* K4 */ be_nested_str_weak(source_node_id), + /* K5 */ be_nested_str_weak(counter_rcv), + /* K6 */ be_nested_str_weak(reset), + /* K7 */ be_nested_str_weak(counter_snd), + /* K8 */ be_nested_str_weak(i2rkey), + /* K9 */ be_nested_str_weak(_i2r_privacy), + /* K10 */ be_nested_str_weak(r2ikey), + /* K11 */ be_nested_str_weak(attestation_challenge), + /* K12 */ be_nested_str_weak(introspect), + /* K13 */ be_nested_str_weak(members), + /* K14 */ be_nested_str_weak(get), + /* K15 */ be_nested_str_weak(function), + /* K16 */ be_nested_str_weak(instance), + /* K17 */ be_const_int(0), + /* K18 */ be_nested_str_weak(_), + /* K19 */ be_const_int(1), + /* K20 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(set_ipk_epoch_key), + be_str_weak(close), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 + ( &(const binstruction[56]) { /* code */ + 0x88040101, // 0000 GETMBR R1 R0 K1 + 0x90020001, // 0001 SETMBR R0 K0 R1 + 0x88040103, // 0002 GETMBR R1 R0 K3 + 0x90020401, // 0003 SETMBR R0 K2 R1 + 0x4C040000, // 0004 LDNIL R1 + 0x90020801, // 0005 SETMBR R0 K4 R1 + 0x88040105, // 0006 GETMBR R1 R0 K5 + 0x8C040306, // 0007 GETMET R1 R1 K6 + 0x7C040200, // 0008 CALL R1 1 + 0x88040107, // 0009 GETMBR R1 R0 K7 + 0x8C040306, // 000A GETMET R1 R1 K6 + 0x7C040200, // 000B CALL R1 1 + 0x4C040000, // 000C LDNIL R1 + 0x90021001, // 000D SETMBR R0 K8 R1 + 0x4C040000, // 000E LDNIL R1 + 0x90021201, // 000F SETMBR R0 K9 R1 + 0x4C040000, // 0010 LDNIL R1 + 0x90021401, // 0011 SETMBR R0 K10 R1 + 0x4C040000, // 0012 LDNIL R1 + 0x90021601, // 0013 SETMBR R0 K11 R1 + 0xA4061800, // 0014 IMPORT R1 K12 + 0x60080010, // 0015 GETGBL R2 G16 + 0x8C0C030D, // 0016 GETMET R3 R1 K13 + 0x5C140000, // 0017 MOVE R5 R0 + 0x7C0C0400, // 0018 CALL R3 2 + 0x7C080200, // 0019 CALL R2 1 + 0xA8020018, // 001A EXBLK 0 #0034 + 0x5C0C0400, // 001B MOVE R3 R2 + 0x7C0C0000, // 001C CALL R3 0 + 0x8C10030E, // 001D GETMET R4 R1 K14 + 0x5C180000, // 001E MOVE R6 R0 + 0x5C1C0600, // 001F MOVE R7 R3 + 0x7C100600, // 0020 CALL R4 3 + 0x60140004, // 0021 GETGBL R5 G4 + 0x5C180800, // 0022 MOVE R6 R4 + 0x7C140200, // 0023 CALL R5 1 + 0x20140B0F, // 0024 NE R5 R5 K15 + 0x7816000C, // 0025 JMPF R5 #0033 + 0x60140004, // 0026 GETGBL R5 G4 + 0x5C180800, // 0027 MOVE R6 R4 + 0x7C140200, // 0028 CALL R5 1 + 0x20140B10, // 0029 NE R5 R5 K16 + 0x78160007, // 002A JMPF R5 #0033 + 0x94140711, // 002B GETIDX R5 R3 K17 + 0x1C140B12, // 002C EQ R5 R5 K18 + 0x78160004, // 002D JMPF R5 #0033 + 0x94140713, // 002E GETIDX R5 R3 K19 + 0x1C140B12, // 002F EQ R5 R5 K18 + 0x78160001, // 0030 JMPF R5 #0033 + 0x4C140000, // 0031 LDNIL R5 + 0x90000605, // 0032 SETMBR R0 R3 R5 + 0x7001FFE6, // 0033 JMP #001B + 0x58080014, // 0034 LDCONST R2 K20 + 0xAC080200, // 0035 CATCH R2 1 0 + 0xB0080000, // 0036 RAISE 2 R0 R0 + 0x80000000, // 0037 RET 0 }) ) ); @@ -155,28 +1119,123 @@ be_local_closure(Matter_Session_set_ipk_epoch_key, /* name */ /******************************************************************** -** Solidified function: set_persist +** Solidified function: update ********************************************************************/ -be_local_closure(Matter_Session_set_persist, /* name */ +be_local_closure(Matter_Session_update, /* name */ be_nested_proto( - 4, /* nstack */ - 2, /* argc */ + 3, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(_persist), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(last_used), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(rtc), + /* K3 */ be_nested_str_weak(utc), }), - be_str_weak(set_persist), + be_str_weak(update), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0xB8060200, // 0000 GETNGBL R1 K1 + 0x8C040302, // 0001 GETMET R1 R1 K2 + 0x7C040200, // 0002 CALL R1 1 + 0x94040303, // 0003 GETIDX R1 R1 K3 + 0x90020001, // 0004 SETMBR R0 K0 R1 + 0x80000000, // 0005 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_mode_CASE +********************************************************************/ +be_local_closure(Matter_Session_set_mode_CASE, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(set_mode), + /* K1 */ be_nested_str_weak(_CASE), + }), + be_str_weak(set_mode_CASE), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x7C040400, // 0002 CALL R1 2 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ca +********************************************************************/ +be_local_closure(Matter_Session_get_ca, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(root_ca_certificate), + }), + be_str_weak(get_ca), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_admin_subject_vendor +********************************************************************/ +be_local_closure(Matter_Session_set_admin_subject_vendor, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(admin_subject), + /* K2 */ be_nested_str_weak(admin_vendor), + }), + be_str_weak(set_admin_subject_vendor), &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ - 0x60080017, // 0000 GETGBL R2 G23 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x900E0201, // 0001 SETMBR R3 K1 R1 + 0x880C0100, // 0002 GETMBR R3 R0 K0 + 0x900E0402, // 0003 SETMBR R3 K2 R2 0x80000000, // 0004 RET 0 }) ) @@ -185,26 +1244,173 @@ be_local_closure(Matter_Session_set_persist, /* name */ /******************************************************************** -** Solidified function: set_mode +** Solidified function: get_device_id ********************************************************************/ -be_local_closure(Matter_Session_set_mode, /* name */ +be_local_closure(Matter_Session_get_device_id, /* name */ be_nested_proto( 2, /* nstack */ - 2, /* argc */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(mode), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(device_id), }), - be_str_weak(set_mode), + be_str_weak(get_device_id), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Session_init, /* name */ + be_nested_proto( + 10, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[20]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(_store), + /* K2 */ be_nested_str_weak(mode), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(local_session_id), + /* K5 */ be_nested_str_weak(initiator_session_id), + /* K6 */ be_nested_str_weak(counter_rcv), + /* K7 */ be_nested_str_weak(matter), + /* K8 */ be_nested_str_weak(Counter), + /* K9 */ be_nested_str_weak(counter_snd), + /* K10 */ be_nested_str_weak(__counter_insecure_rcv), + /* K11 */ be_nested_str_weak(__counter_insecure_snd), + /* K12 */ be_nested_str_weak(_breadcrumb), + /* K13 */ be_nested_str_weak(_exchange_id), + /* K14 */ be_nested_str_weak(random), + /* K15 */ be_const_int(2), + /* K16 */ be_nested_str_weak(get), + /* K17 */ be_nested_str_weak(_fabric), + /* K18 */ be_nested_str_weak(create_fabric), + /* K19 */ be_nested_str_weak(update), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[40]) { /* code */ + 0xA4160000, // 0000 IMPORT R5 K0 + 0x90020201, // 0001 SETMBR R0 K1 R1 + 0x90020503, // 0002 SETMBR R0 K2 K3 + 0x90020802, // 0003 SETMBR R0 K4 R2 + 0x90020A03, // 0004 SETMBR R0 K5 R3 + 0xB81A0E00, // 0005 GETNGBL R6 K7 + 0x8C180D08, // 0006 GETMET R6 R6 K8 + 0x7C180200, // 0007 CALL R6 1 + 0x90020C06, // 0008 SETMBR R0 K6 R6 + 0xB81A0E00, // 0009 GETNGBL R6 K7 + 0x8C180D08, // 000A GETMET R6 R6 K8 + 0x7C180200, // 000B CALL R6 1 + 0x90021206, // 000C SETMBR R0 K9 R6 + 0xB81A0E00, // 000D GETNGBL R6 K7 + 0x8C180D08, // 000E GETMET R6 R6 K8 + 0x7C180200, // 000F CALL R6 1 + 0x90021406, // 0010 SETMBR R0 K10 R6 + 0xB81A0E00, // 0011 GETNGBL R6 K7 + 0x8C180D08, // 0012 GETMET R6 R6 K8 + 0x7C180200, // 0013 CALL R6 1 + 0x90021606, // 0014 SETMBR R0 K11 R6 + 0x90021903, // 0015 SETMBR R0 K12 K3 + 0x8C180B0E, // 0016 GETMET R6 R5 K14 + 0x5820000F, // 0017 LDCONST R8 K15 + 0x7C180400, // 0018 CALL R6 2 + 0x8C180D10, // 0019 GETMET R6 R6 K16 + 0x58200003, // 001A LDCONST R8 K3 + 0x5824000F, // 001B LDCONST R9 K15 + 0x7C180600, // 001C CALL R6 3 + 0x90021A06, // 001D SETMBR R0 K13 R6 + 0x78120001, // 001E JMPF R4 #0021 + 0x5C180800, // 001F MOVE R6 R4 + 0x70020002, // 0020 JMP #0024 + 0x88180101, // 0021 GETMBR R6 R0 K1 + 0x8C180D12, // 0022 GETMET R6 R6 K18 + 0x7C180200, // 0023 CALL R6 1 + 0x90022206, // 0024 SETMBR R0 K17 R6 + 0x8C180113, // 0025 GETMET R6 R0 K19 + 0x7C180200, // 0026 CALL R6 1 + 0x80000000, // 0027 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: persist_to_fabric +********************************************************************/ +be_local_closure(Matter_Session_persist_to_fabric, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(add_session), + }), + be_str_weak(persist_to_fabric), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_mode_PASE +********************************************************************/ +be_local_closure(Matter_Session_set_mode_PASE, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(set_mode), + /* K1 */ be_nested_str_weak(_PASE), + }), + be_str_weak(set_mode_PASE), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x7C040400, // 0002 CALL R1 2 + 0x80000000, // 0003 RET 0 }) ) ); @@ -215,210 +1421,9 @@ be_local_closure(Matter_Session_set_mode, /* name */ ** Solidified function: set_ca ********************************************************************/ be_local_closure(Matter_Session_set_ca, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(root_ca_certificate), - }), - be_str_weak(set_ca), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_expire_in_seconds -********************************************************************/ -be_local_closure(Matter_Session_set_expire_in_seconds, /* name */ - be_nested_proto( - 6, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(rtc), - /* K2 */ be_nested_str_weak(utc), - /* K3 */ be_nested_str_weak(set_expire_time), - }), - be_str_weak(set_expire_in_seconds), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x1C0C0203, // 0001 EQ R3 R1 R3 - 0x780E0000, // 0002 JMPF R3 #0004 - 0x80000600, // 0003 RET 0 - 0x4C0C0000, // 0004 LDNIL R3 - 0x1C0C0403, // 0005 EQ R3 R2 R3 - 0x780E0003, // 0006 JMPF R3 #000B - 0xB80E0000, // 0007 GETNGBL R3 K0 - 0x8C0C0701, // 0008 GETMET R3 R3 K1 - 0x7C0C0200, // 0009 CALL R3 1 - 0x94080702, // 000A GETIDX R2 R3 K2 - 0x8C0C0103, // 000B GETMET R3 R0 K3 - 0x00140401, // 000C ADD R5 R2 R1 - 0x7C0C0400, // 000D CALL R3 2 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: fromjson -********************************************************************/ -be_local_closure(Matter_Session_fromjson, /* name */ - be_nested_proto( - 16, /* nstack */ - 2, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[19]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Session), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(introspect), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(Session), - /* K5 */ be_nested_str_weak(keys), - /* K6 */ be_nested_str_weak(counter_rcv), - /* K7 */ be_nested_str_weak(reset), - /* K8 */ be_nested_str_weak(counter_snd), - /* K9 */ be_nested_str_weak(find), - /* K10 */ be_nested_str_weak(0x), - /* K11 */ be_const_int(0), - /* K12 */ be_nested_str_weak(set), - /* K13 */ be_nested_str_weak(fromhex), - /* K14 */ be_const_int(2), - /* K15 */ be_const_int(2147483647), - /* K16 */ be_nested_str_weak(_X24_X24), - /* K17 */ be_nested_str_weak(fromb64), - /* K18 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(fromjson), - &be_const_str_solidified, - ( &(const binstruction[88]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0xA4120400, // 0002 IMPORT R4 K2 - 0xB8160600, // 0003 GETNGBL R5 K3 - 0x8C140B04, // 0004 GETMET R5 R5 K4 - 0x5C1C0000, // 0005 MOVE R7 R0 - 0x7C140400, // 0006 CALL R5 2 - 0x60180010, // 0007 GETGBL R6 G16 - 0x8C1C0305, // 0008 GETMET R7 R1 K5 - 0x7C1C0200, // 0009 CALL R7 1 - 0x7C180200, // 000A CALL R6 1 - 0xA8020047, // 000B EXBLK 0 #0054 - 0x5C1C0C00, // 000C MOVE R7 R6 - 0x7C1C0000, // 000D CALL R7 0 - 0x94200207, // 000E GETIDX R8 R1 R7 - 0x1C240F06, // 000F EQ R9 R7 K6 - 0x78260006, // 0010 JMPF R9 #0018 - 0x88240B06, // 0011 GETMBR R9 R5 K6 - 0x8C241307, // 0012 GETMET R9 R9 K7 - 0x602C0009, // 0013 GETGBL R11 G9 - 0x5C301000, // 0014 MOVE R12 R8 - 0x7C2C0200, // 0015 CALL R11 1 - 0x7C240400, // 0016 CALL R9 2 - 0x7002003A, // 0017 JMP #0053 - 0x1C240F08, // 0018 EQ R9 R7 K8 - 0x78260006, // 0019 JMPF R9 #0021 - 0x88240B08, // 001A GETMBR R9 R5 K8 - 0x8C241307, // 001B GETMET R9 R9 K7 - 0x602C0009, // 001C GETGBL R11 G9 - 0x5C301000, // 001D MOVE R12 R8 - 0x7C2C0200, // 001E CALL R11 1 - 0x7C240400, // 001F CALL R9 2 - 0x70020031, // 0020 JMP #0053 - 0x60240004, // 0021 GETGBL R9 G4 - 0x5C281000, // 0022 MOVE R10 R8 - 0x7C240200, // 0023 CALL R9 1 - 0x1C241301, // 0024 EQ R9 R9 K1 - 0x78260027, // 0025 JMPF R9 #004E - 0x8C240709, // 0026 GETMET R9 R3 K9 - 0x5C2C1000, // 0027 MOVE R11 R8 - 0x5830000A, // 0028 LDCONST R12 K10 - 0x7C240600, // 0029 CALL R9 3 - 0x1C24130B, // 002A EQ R9 R9 K11 - 0x7826000A, // 002B JMPF R9 #0037 - 0x8C24090C, // 002C GETMET R9 R4 K12 - 0x5C2C0A00, // 002D MOVE R11 R5 - 0x5C300E00, // 002E MOVE R12 R7 - 0x60340015, // 002F GETGBL R13 G21 - 0x7C340000, // 0030 CALL R13 0 - 0x8C341B0D, // 0031 GETMET R13 R13 K13 - 0x403E1D0F, // 0032 CONNECT R15 K14 K15 - 0x943C100F, // 0033 GETIDX R15 R8 R15 - 0x7C340400, // 0034 CALL R13 2 - 0x7C240800, // 0035 CALL R9 4 - 0x70020015, // 0036 JMP #004D - 0x8C240709, // 0037 GETMET R9 R3 K9 - 0x5C2C1000, // 0038 MOVE R11 R8 - 0x58300010, // 0039 LDCONST R12 K16 - 0x7C240600, // 003A CALL R9 3 - 0x1C24130B, // 003B EQ R9 R9 K11 - 0x7826000A, // 003C JMPF R9 #0048 - 0x8C24090C, // 003D GETMET R9 R4 K12 - 0x5C2C0A00, // 003E MOVE R11 R5 - 0x5C300E00, // 003F MOVE R12 R7 - 0x60340015, // 0040 GETGBL R13 G21 - 0x7C340000, // 0041 CALL R13 0 - 0x8C341B11, // 0042 GETMET R13 R13 K17 - 0x403E1D0F, // 0043 CONNECT R15 K14 K15 - 0x943C100F, // 0044 GETIDX R15 R8 R15 - 0x7C340400, // 0045 CALL R13 2 - 0x7C240800, // 0046 CALL R9 4 - 0x70020004, // 0047 JMP #004D - 0x8C24090C, // 0048 GETMET R9 R4 K12 - 0x5C2C0A00, // 0049 MOVE R11 R5 - 0x5C300E00, // 004A MOVE R12 R7 - 0x5C341000, // 004B MOVE R13 R8 - 0x7C240800, // 004C CALL R9 4 - 0x70020004, // 004D JMP #0053 - 0x8C24090C, // 004E GETMET R9 R4 K12 - 0x5C2C0A00, // 004F MOVE R11 R5 - 0x5C300E00, // 0050 MOVE R12 R7 - 0x5C341000, // 0051 MOVE R13 R8 - 0x7C240800, // 0052 CALL R9 4 - 0x7001FFB7, // 0053 JMP #000C - 0x58180012, // 0054 LDCONST R6 K18 - 0xAC180200, // 0055 CATCH R6 1 0 - 0xB0080000, // 0056 RAISE 2 R0 R0 - 0x80040A00, // 0057 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_noc -********************************************************************/ -be_local_closure(Matter_Session_set_noc, /* name */ be_nested_proto( 3, /* nstack */ - 3, /* argc */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -426,14 +1431,43 @@ be_local_closure(Matter_Session_set_noc, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(noc), - /* K1 */ be_nested_str_weak(icac), + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(root_ca_certificate), }), - be_str_weak(set_noc), + be_str_weak(set_ca), &be_const_str_solidified, ( &(const binstruction[ 3]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x900A0201, // 0001 SETMBR R2 K1 R1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_ipk_epoch_key +********************************************************************/ +be_local_closure(Matter_Session_set_ipk_epoch_key, /* name */ + be_nested_proto( + 3, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(ipk_epoch_key), + }), + be_str_weak(set_ipk_epoch_key), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x900A0201, // 0001 SETMBR R2 K1 R1 0x80000000, // 0002 RET 0 }) ) @@ -481,7 +1515,7 @@ be_local_closure(Matter_Session_tojson, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[24]) { /* constants */ + ( &(const bvalue[26]) { /* constants */ /* K0 */ be_nested_str_weak(json), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(introspect), @@ -497,19 +1531,21 @@ be_local_closure(Matter_Session_tojson, /* name */ /* K12 */ be_nested_str_weak(counter_rcv), /* K13 */ be_nested_str_weak(val), /* K14 */ be_nested_str_weak(counter_snd), - /* K15 */ be_nested_str_weak(_X24_X24), - /* K16 */ be_nested_str_weak(tob64), - /* K17 */ be_nested_str_weak(format), - /* K18 */ be_nested_str_weak(_X25s_X3A_X25s), - /* K19 */ be_nested_str_weak(dump), - /* K20 */ be_nested_str_weak(_X7B), - /* K21 */ be_nested_str_weak(concat), - /* K22 */ be_nested_str_weak(_X2C), - /* K23 */ be_nested_str_weak(_X7D), + /* K15 */ be_nested_str_weak(next), + /* K16 */ be_nested_str_weak(_X24_X24), + /* K17 */ be_nested_str_weak(tob64), + /* K18 */ be_nested_str_weak(instance), + /* K19 */ be_nested_str_weak(format), + /* K20 */ be_nested_str_weak(_X25s_X3A_X25s), + /* K21 */ be_nested_str_weak(dump), + /* K22 */ be_nested_str_weak(_X7B), + /* K23 */ be_nested_str_weak(concat), + /* K24 */ be_nested_str_weak(_X2C), + /* K25 */ be_nested_str_weak(_X7D), }), be_str_weak(tojson), &be_const_str_solidified, - ( &(const binstruction[98]) { /* code */ + ( &(const binstruction[106]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 0xA40E0400, // 0002 IMPORT R3 K2 @@ -552,7 +1588,7 @@ be_local_closure(Matter_Session_tojson, /* name */ 0x60180010, // 0027 GETGBL R6 G16 0x5C1C0800, // 0028 MOVE R7 R4 0x7C180200, // 0029 CALL R6 1 - 0xA802002D, // 002A EXBLK 0 #0059 + 0xA8020035, // 002A EXBLK 0 #0061 0x5C1C0C00, // 002B MOVE R7 R6 0x7C1C0000, // 002C CALL R7 0 0x8C200704, // 002D GETMET R8 R3 K4 @@ -568,46 +1604,54 @@ be_local_closure(Matter_Session_tojson, /* name */ 0x8C24110D, // 0037 GETMET R9 R8 K13 0x7C240200, // 0038 CALL R9 1 0x5C201200, // 0039 MOVE R8 R9 - 0x70020006, // 003A JMP #0042 + 0x70020017, // 003A JMP #0053 0x1C240F0E, // 003B EQ R9 R7 K14 - 0x78260004, // 003C JMPF R9 #0042 - 0x8C24110D, // 003D GETMET R9 R8 K13 + 0x78260005, // 003C JMPF R9 #0043 + 0x8C24110F, // 003D GETMET R9 R8 K15 0x7C240200, // 003E CALL R9 1 0x542A00FF, // 003F LDINT R10 256 0x0024120A, // 0040 ADD R9 R9 R10 0x5C201200, // 0041 MOVE R8 R9 - 0x6024000F, // 0042 GETGBL R9 G15 - 0x5C281000, // 0043 MOVE R10 R8 - 0x602C0015, // 0044 GETGBL R11 G21 - 0x7C240400, // 0045 CALL R9 2 - 0x78260003, // 0046 JMPF R9 #004B - 0x8C241110, // 0047 GETMET R9 R8 K16 - 0x7C240200, // 0048 CALL R9 1 - 0x00261E09, // 0049 ADD R9 K15 R9 - 0x5C201200, // 004A MOVE R8 R9 - 0x8C240B08, // 004B GETMET R9 R5 K8 - 0x8C2C0511, // 004C GETMET R11 R2 K17 - 0x58340012, // 004D LDCONST R13 K18 - 0x8C380313, // 004E GETMET R14 R1 K19 - 0x60400008, // 004F GETGBL R16 G8 - 0x5C440E00, // 0050 MOVE R17 R7 - 0x7C400200, // 0051 CALL R16 1 - 0x7C380400, // 0052 CALL R14 2 - 0x8C3C0313, // 0053 GETMET R15 R1 K19 - 0x5C441000, // 0054 MOVE R17 R8 - 0x7C3C0400, // 0055 CALL R15 2 - 0x7C2C0800, // 0056 CALL R11 4 - 0x7C240400, // 0057 CALL R9 2 - 0x7001FFD1, // 0058 JMP #002B - 0x58180009, // 0059 LDCONST R6 K9 - 0xAC180200, // 005A CATCH R6 1 0 - 0xB0080000, // 005B RAISE 2 R0 R0 - 0x8C180B15, // 005C GETMET R6 R5 K21 - 0x58200016, // 005D LDCONST R8 K22 - 0x7C180400, // 005E CALL R6 2 - 0x001A2806, // 005F ADD R6 K20 R6 - 0x00180D17, // 0060 ADD R6 R6 K23 - 0x80040C00, // 0061 RET 1 R6 + 0x7002000F, // 0042 JMP #0053 + 0x6024000F, // 0043 GETGBL R9 G15 + 0x5C281000, // 0044 MOVE R10 R8 + 0x602C0015, // 0045 GETGBL R11 G21 + 0x7C240400, // 0046 CALL R9 2 + 0x78260004, // 0047 JMPF R9 #004D + 0x8C241111, // 0048 GETMET R9 R8 K17 + 0x7C240200, // 0049 CALL R9 1 + 0x00262009, // 004A ADD R9 K16 R9 + 0x5C201200, // 004B MOVE R8 R9 + 0x70020005, // 004C JMP #0053 + 0x60240004, // 004D GETGBL R9 G4 + 0x5C281000, // 004E MOVE R10 R8 + 0x7C240200, // 004F CALL R9 1 + 0x1C241312, // 0050 EQ R9 R9 K18 + 0x78260000, // 0051 JMPF R9 #0053 + 0x7001FFD7, // 0052 JMP #002B + 0x8C240B08, // 0053 GETMET R9 R5 K8 + 0x8C2C0513, // 0054 GETMET R11 R2 K19 + 0x58340014, // 0055 LDCONST R13 K20 + 0x8C380315, // 0056 GETMET R14 R1 K21 + 0x60400008, // 0057 GETGBL R16 G8 + 0x5C440E00, // 0058 MOVE R17 R7 + 0x7C400200, // 0059 CALL R16 1 + 0x7C380400, // 005A CALL R14 2 + 0x8C3C0315, // 005B GETMET R15 R1 K21 + 0x5C441000, // 005C MOVE R17 R8 + 0x7C3C0400, // 005D CALL R15 2 + 0x7C2C0800, // 005E CALL R11 4 + 0x7C240400, // 005F CALL R9 2 + 0x7001FFC9, // 0060 JMP #002B + 0x58180009, // 0061 LDCONST R6 K9 + 0xAC180200, // 0062 CATCH R6 1 0 + 0xB0080000, // 0063 RAISE 2 R0 R0 + 0x8C180B17, // 0064 GETMET R6 R5 K23 + 0x58200018, // 0065 LDCONST R8 K24 + 0x7C180400, // 0066 CALL R6 2 + 0x001A2C06, // 0067 ADD R6 K22 R6 + 0x00180D19, // 0068 ADD R6 R6 K25 + 0x80040C00, // 0069 RET 1 R6 }) ) ); @@ -615,11 +1659,11 @@ be_local_closure(Matter_Session_tojson, /* name */ /******************************************************************** -** Solidified function: close +** Solidified function: get_fabric_compressed ********************************************************************/ -be_local_closure(Matter_Session_close, /* name */ +be_local_closure(Matter_Session_get_fabric_compressed, /* name */ be_nested_proto( - 9, /* nstack */ + 2, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -627,94 +1671,16 @@ be_local_closure(Matter_Session_close, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[24]) { /* constants */ - /* K0 */ be_nested_str_weak(_persist), - /* K1 */ be_nested_str_weak(local_session_id), - /* K2 */ be_nested_str_weak(_future_local_session_id), - /* K3 */ be_nested_str_weak(initiator_session_id), - /* K4 */ be_nested_str_weak(_future_initiator_session_id), - /* K5 */ be_nested_str_weak(source_node_id), - /* K6 */ be_nested_str_weak(counter_rcv), - /* K7 */ be_nested_str_weak(reset), - /* K8 */ be_nested_str_weak(counter_snd), - /* K9 */ be_nested_str_weak(i2rkey), - /* K10 */ be_nested_str_weak(_i2r_privacy), - /* K11 */ be_nested_str_weak(r2ikey), - /* K12 */ be_nested_str_weak(attestation_challenge), - /* K13 */ be_nested_str_weak(fabric_label), - /* K14 */ be_nested_str_weak(), - /* K15 */ be_nested_str_weak(introspect), - /* K16 */ be_nested_str_weak(members), - /* K17 */ be_nested_str_weak(get), - /* K18 */ be_nested_str_weak(function), - /* K19 */ be_nested_str_weak(instance), - /* K20 */ be_const_int(0), - /* K21 */ be_nested_str_weak(_), - /* K22 */ be_const_int(1), - /* K23 */ be_nested_str_weak(stop_iteration), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(fabric_compressed), }), - be_str_weak(close), + be_str_weak(get_fabric_compressed), &be_const_str_solidified, - ( &(const binstruction[59]) { /* code */ + ( &(const binstruction[ 3]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x88080102, // 0001 GETMBR R2 R0 K2 - 0x90020202, // 0002 SETMBR R0 K1 R2 - 0x88080104, // 0003 GETMBR R2 R0 K4 - 0x90020602, // 0004 SETMBR R0 K3 R2 - 0x4C080000, // 0005 LDNIL R2 - 0x90020A02, // 0006 SETMBR R0 K5 R2 - 0x88080106, // 0007 GETMBR R2 R0 K6 - 0x8C080507, // 0008 GETMET R2 R2 K7 - 0x7C080200, // 0009 CALL R2 1 - 0x88080108, // 000A GETMBR R2 R0 K8 - 0x8C080507, // 000B GETMET R2 R2 K7 - 0x7C080200, // 000C CALL R2 1 - 0x4C080000, // 000D LDNIL R2 - 0x90021202, // 000E SETMBR R0 K9 R2 - 0x4C080000, // 000F LDNIL R2 - 0x90021402, // 0010 SETMBR R0 K10 R2 - 0x4C080000, // 0011 LDNIL R2 - 0x90021602, // 0012 SETMBR R0 K11 R2 - 0x4C080000, // 0013 LDNIL R2 - 0x90021802, // 0014 SETMBR R0 K12 R2 - 0x90021B0E, // 0015 SETMBR R0 K13 K14 - 0xA40A1E00, // 0016 IMPORT R2 K15 - 0x600C0010, // 0017 GETGBL R3 G16 - 0x8C100510, // 0018 GETMET R4 R2 K16 - 0x5C180000, // 0019 MOVE R6 R0 - 0x7C100400, // 001A CALL R4 2 - 0x7C0C0200, // 001B CALL R3 1 - 0xA8020018, // 001C EXBLK 0 #0036 - 0x5C100600, // 001D MOVE R4 R3 - 0x7C100000, // 001E CALL R4 0 - 0x8C140511, // 001F GETMET R5 R2 K17 - 0x5C1C0000, // 0020 MOVE R7 R0 - 0x5C200800, // 0021 MOVE R8 R4 - 0x7C140600, // 0022 CALL R5 3 - 0x60180004, // 0023 GETGBL R6 G4 - 0x5C1C0A00, // 0024 MOVE R7 R5 - 0x7C180200, // 0025 CALL R6 1 - 0x20180D12, // 0026 NE R6 R6 K18 - 0x781A000C, // 0027 JMPF R6 #0035 - 0x60180004, // 0028 GETGBL R6 G4 - 0x5C1C0A00, // 0029 MOVE R7 R5 - 0x7C180200, // 002A CALL R6 1 - 0x20180D13, // 002B NE R6 R6 K19 - 0x781A0007, // 002C JMPF R6 #0035 - 0x94180914, // 002D GETIDX R6 R4 K20 - 0x1C180D15, // 002E EQ R6 R6 K21 - 0x781A0004, // 002F JMPF R6 #0035 - 0x94180916, // 0030 GETIDX R6 R4 K22 - 0x20180D15, // 0031 NE R6 R6 K21 - 0x781A0001, // 0032 JMPF R6 #0035 - 0x4C180000, // 0033 LDNIL R6 - 0x90000806, // 0034 SETMBR R0 R4 R6 - 0x7001FFE6, // 0035 JMP #001D - 0x580C0017, // 0036 LDCONST R3 K23 - 0xAC0C0200, // 0037 CATCH R3 1 0 - 0xB0080000, // 0038 RAISE 2 R0 R0 - 0x90020001, // 0039 SETMBR R0 K0 R1 - 0x80000000, // 003A RET 0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 }) ) ); @@ -722,43 +1688,305 @@ be_local_closure(Matter_Session_close, /* name */ /******************************************************************** -** Solidified function: has_expired +** Solidified function: get_i2r ********************************************************************/ -be_local_closure(Matter_Session_has_expired, /* name */ +be_local_closure(Matter_Session_get_i2r, /* name */ be_nested_proto( - 4, /* nstack */ - 2, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(rtc), - /* K2 */ be_nested_str_weak(utc), - /* K3 */ be_nested_str_weak(expiration), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(i2rkey), }), - be_str_weak(has_expired), + be_str_weak(get_i2r), &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0003, // 0002 JMPF R2 #0007 - 0xB80A0000, // 0003 GETNGBL R2 K0 - 0x8C080501, // 0004 GETMET R2 R2 K1 - 0x7C080200, // 0005 CALL R2 1 - 0x94040502, // 0006 GETIDX R1 R2 K2 - 0x88080103, // 0007 GETMBR R2 R0 K3 - 0x4C0C0000, // 0008 LDNIL R3 - 0x20080403, // 0009 NE R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x88080103, // 000B GETMBR R2 R0 K3 - 0x28080202, // 000C GE R2 R1 R2 - 0x80040400, // 000D RET 1 R2 - 0x50080000, // 000E LDBOOL R2 0 0 - 0x80040400, // 000F RET 1 R2 + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ipk_group_key +********************************************************************/ +be_local_closure(Matter_Session_get_ipk_group_key, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(get_ipk_epoch_key), + /* K1 */ be_nested_str_weak(get_fabric_compressed), + /* K2 */ be_nested_str_weak(crypto), + /* K3 */ be_nested_str_weak(HKDF_SHA256), + /* K4 */ be_nested_str_weak(fromstring), + /* K5 */ be_nested_str_weak(_GROUP_KEY), + /* K6 */ be_nested_str_weak(derive), + }), + be_str_weak(get_ipk_group_key), + &be_const_str_solidified, + ( &(const binstruction[29]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x1C040202, // 0003 EQ R1 R1 R2 + 0x74060004, // 0004 JMPT R1 #000A + 0x8C040101, // 0005 GETMET R1 R0 K1 + 0x7C040200, // 0006 CALL R1 1 + 0x4C080000, // 0007 LDNIL R2 + 0x1C040202, // 0008 EQ R1 R1 R2 + 0x78060001, // 0009 JMPF R1 #000C + 0x4C040000, // 000A LDNIL R1 + 0x80040200, // 000B RET 1 R1 + 0xA4060400, // 000C IMPORT R1 K2 + 0x8C080303, // 000D GETMET R2 R1 K3 + 0x7C080200, // 000E CALL R2 1 + 0x600C0015, // 000F GETGBL R3 G21 + 0x7C0C0000, // 0010 CALL R3 0 + 0x8C0C0704, // 0011 GETMET R3 R3 K4 + 0x88140105, // 0012 GETMBR R5 R0 K5 + 0x7C0C0400, // 0013 CALL R3 2 + 0x8C100506, // 0014 GETMET R4 R2 K6 + 0x8C180100, // 0015 GETMET R6 R0 K0 + 0x7C180200, // 0016 CALL R6 1 + 0x8C1C0101, // 0017 GETMET R7 R0 K1 + 0x7C1C0200, // 0018 CALL R7 1 + 0x5C200600, // 0019 MOVE R8 R3 + 0x5426000F, // 001A LDINT R9 16 + 0x7C100A00, // 001B CALL R4 5 + 0x80040800, // 001C RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: fromjson +********************************************************************/ +be_local_closure(Matter_Session_fromjson, /* name */ + be_nested_proto( + 17, /* nstack */ + 3, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[19]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Session), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(introspect), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(Session), + /* K5 */ be_nested_str_weak(keys), + /* K6 */ be_nested_str_weak(counter_rcv), + /* K7 */ be_nested_str_weak(reset), + /* K8 */ be_nested_str_weak(counter_snd), + /* K9 */ be_nested_str_weak(find), + /* K10 */ be_nested_str_weak(0x), + /* K11 */ be_const_int(0), + /* K12 */ be_nested_str_weak(set), + /* K13 */ be_nested_str_weak(fromhex), + /* K14 */ be_const_int(2), + /* K15 */ be_const_int(2147483647), + /* K16 */ be_nested_str_weak(_X24_X24), + /* K17 */ be_nested_str_weak(fromb64), + /* K18 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(fromjson), + &be_const_str_solidified, + ( &(const binstruction[91]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0xA4160400, // 0002 IMPORT R5 K2 + 0xB81A0600, // 0003 GETNGBL R6 K3 + 0x8C180D04, // 0004 GETMET R6 R6 K4 + 0x5C200000, // 0005 MOVE R8 R0 + 0x4C240000, // 0006 LDNIL R9 + 0x4C280000, // 0007 LDNIL R10 + 0x5C2C0400, // 0008 MOVE R11 R2 + 0x7C180A00, // 0009 CALL R6 5 + 0x601C0010, // 000A GETGBL R7 G16 + 0x8C200305, // 000B GETMET R8 R1 K5 + 0x7C200200, // 000C CALL R8 1 + 0x7C1C0200, // 000D CALL R7 1 + 0xA8020047, // 000E EXBLK 0 #0057 + 0x5C200E00, // 000F MOVE R8 R7 + 0x7C200000, // 0010 CALL R8 0 + 0x94240208, // 0011 GETIDX R9 R1 R8 + 0x1C281106, // 0012 EQ R10 R8 K6 + 0x782A0006, // 0013 JMPF R10 #001B + 0x88280D06, // 0014 GETMBR R10 R6 K6 + 0x8C281507, // 0015 GETMET R10 R10 K7 + 0x60300009, // 0016 GETGBL R12 G9 + 0x5C341200, // 0017 MOVE R13 R9 + 0x7C300200, // 0018 CALL R12 1 + 0x7C280400, // 0019 CALL R10 2 + 0x7002003A, // 001A JMP #0056 + 0x1C281108, // 001B EQ R10 R8 K8 + 0x782A0006, // 001C JMPF R10 #0024 + 0x88280D08, // 001D GETMBR R10 R6 K8 + 0x8C281507, // 001E GETMET R10 R10 K7 + 0x60300009, // 001F GETGBL R12 G9 + 0x5C341200, // 0020 MOVE R13 R9 + 0x7C300200, // 0021 CALL R12 1 + 0x7C280400, // 0022 CALL R10 2 + 0x70020031, // 0023 JMP #0056 + 0x60280004, // 0024 GETGBL R10 G4 + 0x5C2C1200, // 0025 MOVE R11 R9 + 0x7C280200, // 0026 CALL R10 1 + 0x1C281501, // 0027 EQ R10 R10 K1 + 0x782A0027, // 0028 JMPF R10 #0051 + 0x8C280909, // 0029 GETMET R10 R4 K9 + 0x5C301200, // 002A MOVE R12 R9 + 0x5834000A, // 002B LDCONST R13 K10 + 0x7C280600, // 002C CALL R10 3 + 0x1C28150B, // 002D EQ R10 R10 K11 + 0x782A000A, // 002E JMPF R10 #003A + 0x8C280B0C, // 002F GETMET R10 R5 K12 + 0x5C300C00, // 0030 MOVE R12 R6 + 0x5C341000, // 0031 MOVE R13 R8 + 0x60380015, // 0032 GETGBL R14 G21 + 0x7C380000, // 0033 CALL R14 0 + 0x8C381D0D, // 0034 GETMET R14 R14 K13 + 0x40421D0F, // 0035 CONNECT R16 K14 K15 + 0x94401210, // 0036 GETIDX R16 R9 R16 + 0x7C380400, // 0037 CALL R14 2 + 0x7C280800, // 0038 CALL R10 4 + 0x70020015, // 0039 JMP #0050 + 0x8C280909, // 003A GETMET R10 R4 K9 + 0x5C301200, // 003B MOVE R12 R9 + 0x58340010, // 003C LDCONST R13 K16 + 0x7C280600, // 003D CALL R10 3 + 0x1C28150B, // 003E EQ R10 R10 K11 + 0x782A000A, // 003F JMPF R10 #004B + 0x8C280B0C, // 0040 GETMET R10 R5 K12 + 0x5C300C00, // 0041 MOVE R12 R6 + 0x5C341000, // 0042 MOVE R13 R8 + 0x60380015, // 0043 GETGBL R14 G21 + 0x7C380000, // 0044 CALL R14 0 + 0x8C381D11, // 0045 GETMET R14 R14 K17 + 0x40421D0F, // 0046 CONNECT R16 K14 K15 + 0x94401210, // 0047 GETIDX R16 R9 R16 + 0x7C380400, // 0048 CALL R14 2 + 0x7C280800, // 0049 CALL R10 4 + 0x70020004, // 004A JMP #0050 + 0x8C280B0C, // 004B GETMET R10 R5 K12 + 0x5C300C00, // 004C MOVE R12 R6 + 0x5C341000, // 004D MOVE R13 R8 + 0x5C381200, // 004E MOVE R14 R9 + 0x7C280800, // 004F CALL R10 4 + 0x70020004, // 0050 JMP #0056 + 0x8C280B0C, // 0051 GETMET R10 R5 K12 + 0x5C300C00, // 0052 MOVE R12 R6 + 0x5C341000, // 0053 MOVE R13 R8 + 0x5C381200, // 0054 MOVE R14 R9 + 0x7C280800, // 0055 CALL R10 4 + 0x7001FFB7, // 0056 JMP #000F + 0x581C0012, // 0057 LDCONST R7 K18 + 0xAC1C0200, // 0058 CATCH R7 1 0 + 0xB0080000, // 0059 RAISE 2 R0 R0 + 0x80040C00, // 005A RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ac +********************************************************************/ +be_local_closure(Matter_Session_get_ac, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(attestation_challenge), + }), + be_str_weak(get_ac), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_fabric_label +********************************************************************/ +be_local_closure(Matter_Session_get_fabric_label, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(fabric_label), + }), + be_str_weak(get_fabric_label), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_noc +********************************************************************/ +be_local_closure(Matter_Session_get_noc, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(noc), + }), + be_str_weak(get_noc), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 }) ) ); @@ -770,7 +1998,7 @@ be_local_closure(Matter_Session_has_expired, /* name */ ********************************************************************/ be_local_closure(Matter_Session_set_fabric_device, /* name */ be_nested_proto( - 7, /* nstack */ + 5, /* nstack */ 4, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -778,24 +2006,22 @@ be_local_closure(Matter_Session_set_fabric_device, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(fabric), - /* K1 */ be_nested_str_weak(deviceid), - /* K2 */ be_nested_str_weak(fabric_compressed), - /* K3 */ be_nested_str_weak(__store), - /* K4 */ be_nested_str_weak(remove_redundant_session), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(fabric_id), + /* K2 */ be_nested_str_weak(device_id), + /* K3 */ be_nested_str_weak(fabric_compressed), }), be_str_weak(set_fabric_device), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x90020403, // 0002 SETMBR R0 K2 R3 - 0x88100103, // 0003 GETMBR R4 R0 K3 - 0x8C100904, // 0004 GETMET R4 R4 K4 - 0x5C180000, // 0005 MOVE R6 R0 - 0x7C100400, // 0006 CALL R4 2 - 0x80000000, // 0007 RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x90120201, // 0001 SETMBR R4 K1 R1 + 0x88100100, // 0002 GETMBR R4 R0 K0 + 0x90120402, // 0003 SETMBR R4 K2 R2 + 0x88100100, // 0004 GETMBR R4 R0 K0 + 0x90120603, // 0005 SETMBR R4 K3 R3 + 0x80000000, // 0006 RET 0 }) ) ); @@ -803,9 +2029,313 @@ be_local_closure(Matter_Session_set_fabric_device, /* name */ /******************************************************************** -** Solidified function: set_expire_time +** Solidified function: get_admin_vendor ********************************************************************/ -be_local_closure(Matter_Session_set_expire_time, /* name */ +be_local_closure(Matter_Session_get_admin_vendor, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(admin_vendor), + }), + be_str_weak(get_admin_vendor), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ca_pub +********************************************************************/ +be_local_closure(Matter_Session_get_ca_pub, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(get_ca_pub), + }), + be_str_weak(get_ca_pub), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: fabric_completed +********************************************************************/ +be_local_closure(Matter_Session_fabric_completed, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(set_no_expiration), + /* K2 */ be_nested_str_weak(set_persist), + /* K3 */ be_nested_str_weak(_store), + /* K4 */ be_nested_str_weak(add_fabric), + }), + be_str_weak(fabric_completed), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x88040100, // 0003 GETMBR R1 R0 K0 + 0x8C040302, // 0004 GETMET R1 R1 K2 + 0x500C0200, // 0005 LDBOOL R3 1 0 + 0x7C040400, // 0006 CALL R1 2 + 0x88040103, // 0007 GETMBR R1 R0 K3 + 0x8C040304, // 0008 GETMET R1 R1 K4 + 0x880C0100, // 0009 GETMBR R3 R0 K0 + 0x7C040400, // 000A CALL R1 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_fabric_id +********************************************************************/ +be_local_closure(Matter_Session_get_fabric_id, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(fabric_id), + }), + be_str_weak(get_fabric_id), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_keys +********************************************************************/ +be_local_closure(Matter_Session_set_keys, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(i2rkey), + /* K1 */ be_nested_str_weak(_i2r_privacy), + /* K2 */ be_nested_str_weak(r2ikey), + /* K3 */ be_nested_str_weak(attestation_challenge), + /* K4 */ be_nested_str_weak(created), + }), + be_str_weak(set_keys), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x4C140000, // 0001 LDNIL R5 + 0x90020205, // 0002 SETMBR R0 K1 R5 + 0x90020402, // 0003 SETMBR R0 K2 R2 + 0x90020603, // 0004 SETMBR R0 K3 R3 + 0x90020804, // 0005 SETMBR R0 K4 R4 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_CASE +********************************************************************/ +be_local_closure(Matter_Session_is_CASE, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(mode), + /* K1 */ be_nested_str_weak(_CASE), + }), + be_str_weak(is_CASE), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_pk +********************************************************************/ +be_local_closure(Matter_Session_get_pk, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(no_private_key), + /* K2 */ be_nested_str_weak(crypto), + /* K3 */ be_nested_str_weak(random), + }), + be_str_weak(get_pk), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x74060005, // 0002 JMPT R1 #0009 + 0xA4060400, // 0003 IMPORT R1 K2 + 0x88080100, // 0004 GETMBR R2 R0 K0 + 0x8C0C0303, // 0005 GETMET R3 R1 K3 + 0x5416001F, // 0006 LDINT R5 32 + 0x7C0C0400, // 0007 CALL R3 2 + 0x900A0203, // 0008 SETMBR R2 K1 R3 + 0x88040100, // 0009 GETMBR R1 R0 K0 + 0x88040301, // 000A GETMBR R1 R1 K1 + 0x80040200, // 000B RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: fabric_candidate +********************************************************************/ +be_local_closure(Matter_Session_fabric_candidate, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(set_expire_in_seconds), + /* K2 */ be_nested_str_weak(_store), + /* K3 */ be_nested_str_weak(add_fabric), + }), + be_str_weak(fabric_candidate), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x540E0077, // 0002 LDINT R3 120 + 0x7C040400, // 0003 CALL R1 2 + 0x88040102, // 0004 GETMBR R1 R0 K2 + 0x8C040303, // 0005 GETMET R1 R1 K3 + 0x880C0100, // 0006 GETMBR R3 R0 K0 + 0x7C040400, // 0007 CALL R1 2 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_noc +********************************************************************/ +be_local_closure(Matter_Session_set_noc, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(noc), + /* K2 */ be_nested_str_weak(icac), + }), + be_str_weak(set_noc), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x900E0201, // 0001 SETMBR R3 K1 R1 + 0x880C0100, // 0002 GETMBR R3 R0 K0 + 0x900E0402, // 0003 SETMBR R3 K2 R2 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_fabric_label +********************************************************************/ +be_local_closure(Matter_Session_set_fabric_label, /* name */ be_nested_proto( 4, /* nstack */ 2, /* argc */ @@ -815,17 +2345,51 @@ be_local_closure(Matter_Session_set_expire_time, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(expiration), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(_fabric), + /* K2 */ be_nested_str_weak(fabric_label), }), - be_str_weak(set_expire_time), + be_str_weak(set_fabric_label), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 + ( &(const binstruction[ 8]) { /* code */ + 0x60080004, // 0000 GETGBL R2 G4 0x5C0C0200, // 0001 MOVE R3 R1 0x7C080200, // 0002 CALL R2 1 - 0x90020002, // 0003 SETMBR R0 K0 R2 - 0x80000000, // 0004 RET 0 + 0x1C080500, // 0003 EQ R2 R2 K0 + 0x780A0001, // 0004 JMPF R2 #0007 + 0x88080101, // 0005 GETMBR R2 R0 K1 + 0x900A0401, // 0006 SETMBR R2 K2 R1 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_admin_subject +********************************************************************/ +be_local_closure(Matter_Session_get_admin_subject, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(admin_subject), + }), + be_str_weak(get_admin_subject), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 }) ) ); @@ -941,193 +2505,6 @@ be_local_closure(Matter_Session_gen_CSR, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: get_fabric -********************************************************************/ -be_local_closure(Matter_Session_get_fabric, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(fabric), - }), - be_str_weak(get_fabric), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_fabric_compressed -********************************************************************/ -be_local_closure(Matter_Session_get_fabric_compressed, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(fabric_compressed), - }), - be_str_weak(get_fabric_compressed), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_fabric_label -********************************************************************/ -be_local_closure(Matter_Session_set_fabric_label, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(fabric_label), - }), - be_str_weak(set_fabric_label), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x60080004, // 0000 GETGBL R2 G4 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x1C080500, // 0003 EQ R2 R2 K0 - 0x780A0000, // 0004 JMPF R2 #0006 - 0x90020201, // 0005 SETMBR R0 K1 R1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_no_expiration -********************************************************************/ -be_local_closure(Matter_Session_set_no_expiration, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(expiration), - }), - be_str_weak(set_no_expiration), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x4C040000, // 0000 LDNIL R1 - 0x90020001, // 0001 SETMBR R0 K0 R1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Session_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[17]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(__store), - /* K2 */ be_nested_str_weak(mode), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(local_session_id), - /* K5 */ be_nested_str_weak(initiator_session_id), - /* K6 */ be_nested_str_weak(counter_rcv), - /* K7 */ be_nested_str_weak(matter), - /* K8 */ be_nested_str_weak(Counter), - /* K9 */ be_nested_str_weak(counter_snd), - /* K10 */ be_nested_str_weak(_counter_insecure_rcv), - /* K11 */ be_nested_str_weak(_counter_insecure_snd), - /* K12 */ be_nested_str_weak(__breadcrumb), - /* K13 */ be_nested_str_weak(__exchange_id), - /* K14 */ be_nested_str_weak(random), - /* K15 */ be_const_int(2), - /* K16 */ be_nested_str_weak(get), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[31]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0x90020201, // 0001 SETMBR R0 K1 R1 - 0x90020503, // 0002 SETMBR R0 K2 K3 - 0x90020802, // 0003 SETMBR R0 K4 R2 - 0x90020A03, // 0004 SETMBR R0 K5 R3 - 0xB8160E00, // 0005 GETNGBL R5 K7 - 0x8C140B08, // 0006 GETMET R5 R5 K8 - 0x7C140200, // 0007 CALL R5 1 - 0x90020C05, // 0008 SETMBR R0 K6 R5 - 0xB8160E00, // 0009 GETNGBL R5 K7 - 0x8C140B08, // 000A GETMET R5 R5 K8 - 0x7C140200, // 000B CALL R5 1 - 0x90021205, // 000C SETMBR R0 K9 R5 - 0xB8160E00, // 000D GETNGBL R5 K7 - 0x8C140B08, // 000E GETMET R5 R5 K8 - 0x7C140200, // 000F CALL R5 1 - 0x90021405, // 0010 SETMBR R0 K10 R5 - 0xB8160E00, // 0011 GETNGBL R5 K7 - 0x8C140B08, // 0012 GETMET R5 R5 K8 - 0x7C140200, // 0013 CALL R5 1 - 0x90021605, // 0014 SETMBR R0 K11 R5 - 0x90021903, // 0015 SETMBR R0 K12 K3 - 0x8C14090E, // 0016 GETMET R5 R4 K14 - 0x581C000F, // 0017 LDCONST R7 K15 - 0x7C140400, // 0018 CALL R5 2 - 0x8C140B10, // 0019 GETMET R5 R5 K16 - 0x581C0003, // 001A LDCONST R7 K3 - 0x5820000F, // 001B LDCONST R8 K15 - 0x7C140600, // 001C CALL R5 3 - 0x90021A05, // 001D SETMBR R0 K13 R5 - 0x80000000, // 001E RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: save ********************************************************************/ @@ -1142,8 +2519,8 @@ be_local_closure(Matter_Session_save, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(__store), - /* K1 */ be_nested_str_weak(save), + /* K0 */ be_nested_str_weak(_store), + /* K1 */ be_nested_str_weak(save_fabrics), }), be_str_weak(save), &be_const_str_solidified, @@ -1159,45 +2536,9 @@ be_local_closure(Matter_Session_save, /* name */ /******************************************************************** -** Solidified function: set_keys +** Solidified function: get_fabric ********************************************************************/ -be_local_closure(Matter_Session_set_keys, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(i2rkey), - /* K1 */ be_nested_str_weak(_i2r_privacy), - /* K2 */ be_nested_str_weak(r2ikey), - /* K3 */ be_nested_str_weak(attestation_challenge), - /* K4 */ be_nested_str_weak(session_timestamp), - }), - be_str_weak(set_keys), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x4C140000, // 0001 LDNIL R5 - 0x90020205, // 0002 SETMBR R0 K1 R5 - 0x90020402, // 0003 SETMBR R0 K2 R2 - 0x90020603, // 0004 SETMBR R0 K3 R3 - 0x90020804, // 0005 SETMBR R0 K4 R4 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_ac -********************************************************************/ -be_local_closure(Matter_Session_get_ac, /* name */ +be_local_closure(Matter_Session_get_fabric, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -1208,155 +2549,9 @@ be_local_closure(Matter_Session_get_ac, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(attestation_challenge), + /* K0 */ be_nested_str_weak(_fabric), }), - be_str_weak(get_ac), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_ipk_group_key -********************************************************************/ -be_local_closure(Matter_Session_get_ipk_group_key, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), - /* K1 */ be_nested_str_weak(fabric_compressed), - /* K2 */ be_nested_str_weak(crypto), - /* K3 */ be_nested_str_weak(HKDF_SHA256), - /* K4 */ be_nested_str_weak(fromstring), - /* K5 */ be_nested_str_weak(__GROUP_KEY), - /* K6 */ be_nested_str_weak(derive), - }), - be_str_weak(get_ipk_group_key), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x74060003, // 0003 JMPT R1 #0008 - 0x88040101, // 0004 GETMBR R1 R0 K1 - 0x4C080000, // 0005 LDNIL R2 - 0x1C040202, // 0006 EQ R1 R1 R2 - 0x78060001, // 0007 JMPF R1 #000A - 0x4C040000, // 0008 LDNIL R1 - 0x80040200, // 0009 RET 1 R1 - 0xA4060400, // 000A IMPORT R1 K2 - 0x8C080303, // 000B GETMET R2 R1 K3 - 0x7C080200, // 000C CALL R2 1 - 0x600C0015, // 000D GETGBL R3 G21 - 0x7C0C0000, // 000E CALL R3 0 - 0x8C0C0704, // 000F GETMET R3 R3 K4 - 0x88140105, // 0010 GETMBR R5 R0 K5 - 0x7C0C0400, // 0011 CALL R3 2 - 0x8C100506, // 0012 GETMET R4 R2 K6 - 0x88180100, // 0013 GETMBR R6 R0 K0 - 0x881C0101, // 0014 GETMBR R7 R0 K1 - 0x5C200600, // 0015 MOVE R8 R3 - 0x5426000F, // 0016 LDINT R9 16 - 0x7C100A00, // 0017 CALL R4 5 - 0x80040800, // 0018 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_ipk_epoch_key -********************************************************************/ -be_local_closure(Matter_Session_get_ipk_epoch_key, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), - }), - be_str_weak(get_ipk_epoch_key), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_pk -********************************************************************/ -be_local_closure(Matter_Session_get_pk, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(no_private_key), - /* K1 */ be_nested_str_weak(crypto), - /* K2 */ be_nested_str_weak(random), - }), - be_str_weak(get_pk), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x74060004, // 0001 JMPT R1 #0007 - 0xA4060200, // 0002 IMPORT R1 K1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x5412001F, // 0004 LDINT R4 32 - 0x7C080400, // 0005 CALL R2 2 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88040100, // 0007 GETMBR R1 R0 K0 - 0x80040200, // 0008 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_i2r -********************************************************************/ -be_local_closure(Matter_Session_get_i2r, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(i2rkey), - }), - be_str_weak(get_i2r), + be_str_weak(get_fabric), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -1380,14 +2575,16 @@ be_local_closure(Matter_Session_get_icac, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(icac), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_fabric), + /* K1 */ be_nested_str_weak(icac), }), be_str_weak(get_icac), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ + ( &(const binstruction[ 3]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x80040200, // 0002 RET 1 R1 }) ) ); @@ -1422,12 +2619,12 @@ be_local_closure(Matter_Session_get_mode, /* name */ /******************************************************************** -** Solidified function: get_ca +** Solidified function: set_mode ********************************************************************/ -be_local_closure(Matter_Session_get_ca, /* name */ +be_local_closure(Matter_Session_set_mode, /* name */ be_nested_proto( 2, /* nstack */ - 1, /* argc */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -1435,40 +2632,13 @@ be_local_closure(Matter_Session_get_ca, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(root_ca_certificate), + /* K0 */ be_nested_str_weak(mode), }), - be_str_weak(get_ca), + be_str_weak(set_mode), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_deviceid -********************************************************************/ -be_local_closure(Matter_Session_get_deviceid, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(deviceid), - }), - be_str_weak(get_deviceid), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 }) ) ); @@ -1478,87 +2648,85 @@ be_local_closure(Matter_Session_get_deviceid, /* name */ /******************************************************************** ** Solidified class: Matter_Session ********************************************************************/ +extern const bclass be_class_Matter_Expirable; be_local_class(Matter_Session, - 40, - NULL, - be_nested_map(76, + 29, + &be_class_Matter_Expirable, + be_nested_map(73, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(get_deviceid, -1), be_const_closure(Matter_Session_get_deviceid_closure) }, - { be_const_key_weak(_counter_insecure_rcv, -1), be_const_var(14) }, - { be_const_key_weak(deviceid, -1), be_const_var(31) }, - { be_const_key_weak(_Msg2, -1), be_const_var(36) }, - { be_const_key_weak(get_ca_pub, -1), be_const_closure(Matter_Session_get_ca_pub_closure) }, - { be_const_key_weak(__ip, 7), be_const_var(11) }, - { be_const_key_weak(_i2r_privacy, -1), be_const_var(18) }, - { be_const_key_weak(__exchange_id, 26), be_const_var(10) }, - { be_const_key_weak(session_timestamp, -1), be_const_var(4) }, - { be_const_key_weak(set_fabric_device, -1), be_const_closure(Matter_Session_set_fabric_device_closure) }, - { be_const_key_weak(set_expire_time, -1), be_const_closure(Matter_Session_set_expire_time_closure) }, - { be_const_key_weak(admin_vendor, 69), be_const_var(34) }, - { be_const_key_weak(r2ikey, 13), be_const_var(17) }, - { be_const_key_weak(get_mode, -1), be_const_closure(Matter_Session_get_mode_closure) }, - { be_const_key_weak(_Msg1, -1), be_const_var(35) }, - { be_const_key_weak(set_mode, 66), be_const_closure(Matter_Session_set_mode_closure) }, - { be_const_key_weak(set_persist, 75), be_const_closure(Matter_Session_set_persist_closure) }, - { be_const_key_weak(set_expire_in_seconds, 10), be_const_closure(Matter_Session_set_expire_in_seconds_closure) }, - { be_const_key_weak(mode, 33), be_const_var(1) }, - { be_const_key_weak(fromjson, -1), be_const_static_closure(Matter_Session_fromjson_closure) }, - { be_const_key_weak(__port, 54), be_const_var(12) }, - { be_const_key_weak(get_icac, -1), be_const_closure(Matter_Session_get_icac_closure) }, - { be_const_key_weak(__GROUP_KEY, -1), be_nested_str_weak(GroupKey_X20v1_X2E0) }, - { be_const_key_weak(noc, 12), be_const_var(24) }, - { be_const_key_weak(expiration, -1), be_const_var(38) }, - { be_const_key_weak(gen_CSR, -1), be_const_closure(Matter_Session_gen_CSR_closure) }, - { be_const_key_weak(__breadcrumb, -1), be_const_var(21) }, - { be_const_key_weak(__CASE, -1), be_const_int(2) }, - { be_const_key_weak(__PASE, -1), be_const_int(1) }, - { be_const_key_weak(has_expired, 39), be_const_closure(Matter_Session_has_expired_closure) }, - { be_const_key_weak(_chunked_attr_reports, -1), be_const_var(39) }, - { be_const_key_weak(local_session_id, -1), be_const_var(2) }, - { be_const_key_weak(set_ipk_epoch_key, 70), be_const_closure(Matter_Session_set_ipk_epoch_key_closure) }, - { be_const_key_weak(get_ipk_group_key, -1), be_const_closure(Matter_Session_get_ipk_group_key_closure) }, - { be_const_key_weak(tojson, 46), be_const_closure(Matter_Session_tojson_closure) }, - { be_const_key_weak(_counter_insecure_snd, -1), be_const_var(15) }, - { be_const_key_weak(_future_initiator_session_id, -1), be_const_var(6) }, - { be_const_key_weak(fabric_label, -1), be_const_var(32) }, - { be_const_key_weak(no_private_key, -1), be_const_var(22) }, - { be_const_key_weak(set_no_expiration, -1), be_const_closure(Matter_Session_set_no_expiration_closure) }, + { be_const_key_weak(set_mode, 32), be_const_closure(Matter_Session_set_mode_closure) }, + { be_const_key_weak(get_ipk_epoch_key, 66), be_const_closure(Matter_Session_get_ipk_epoch_key_closure) }, + { be_const_key_weak(last_used, -1), be_const_var(6) }, + { be_const_key_weak(attestation_challenge, 33), be_const_var(21) }, + { be_const_key_weak(resumption_id, -1), be_const_var(24) }, + { be_const_key_weak(set_mode_CASE, 55), be_const_closure(Matter_Session_set_mode_CASE_closure) }, + { be_const_key_weak(get_mode, 43), be_const_closure(Matter_Session_get_mode_closure) }, + { be_const_key_weak(set_admin_subject_vendor, 13), be_const_closure(Matter_Session_set_admin_subject_vendor_closure) }, + { be_const_key_weak(_ip, -1), be_const_var(13) }, + { be_const_key_weak(shared_secret, -1), be_const_var(25) }, + { be_const_key_weak(get_icac, 46), be_const_closure(Matter_Session_get_icac_closure) }, + { be_const_key_weak(_port, 39), be_const_var(14) }, { be_const_key_weak(init, -1), be_const_closure(Matter_Session_init_closure) }, - { be_const_key_weak(get_fabric, -1), be_const_closure(Matter_Session_get_fabric_closure) }, - { be_const_key_weak(peer_node_id, -1), be_const_var(20) }, - { be_const_key_weak(get_fabric_compressed, -1), be_const_closure(Matter_Session_get_fabric_compressed_closure) }, - { be_const_key_weak(fabric_compressed, 28), be_const_var(30) }, - { be_const_key_weak(save, 62), be_const_closure(Matter_Session_save_closure) }, - { be_const_key_weak(_future_local_session_id, 25), be_const_var(7) }, - { be_const_key_weak(counter_snd, -1), be_const_var(9) }, - { be_const_key_weak(set_keys, -1), be_const_closure(Matter_Session_set_keys_closure) }, - { be_const_key_weak(__message_handler, -1), be_const_var(13) }, - { be_const_key_weak(attestation_challenge, -1), be_const_var(19) }, - { be_const_key_weak(counter_rcv, 40), be_const_var(8) }, - { be_const_key_weak(get_i2r_privacy, 45), be_const_closure(Matter_Session_get_i2r_privacy_closure) }, - { be_const_key_weak(resumption_id, 57), be_const_var(27) }, - { be_const_key_weak(set_noc, -1), be_const_closure(Matter_Session_set_noc_closure) }, - { be_const_key_weak(get_r2i, 50), be_const_closure(Matter_Session_get_r2i_closure) }, - { be_const_key_weak(__store, 48), be_const_var(0) }, - { be_const_key_weak(shared_secret, 31), be_const_var(28) }, - { be_const_key_weak(_persist, -1), be_const_var(37) }, - { be_const_key_weak(initiator_session_id, 0), be_const_var(3) }, - { be_const_key_weak(get_ac, -1), be_const_closure(Matter_Session_get_ac_closure) }, - { be_const_key_weak(icac, 35), be_const_var(25) }, - { be_const_key_weak(set_fabric_label, 30), be_const_closure(Matter_Session_set_fabric_label_closure) }, - { be_const_key_weak(ipk_epoch_key, -1), be_const_var(26) }, - { be_const_key_weak(get_ipk_epoch_key, -1), be_const_closure(Matter_Session_get_ipk_epoch_key_closure) }, - { be_const_key_weak(get_pk, -1), be_const_closure(Matter_Session_get_pk_closure) }, - { be_const_key_weak(admin_subject, -1), be_const_var(33) }, - { be_const_key_weak(get_i2r, -1), be_const_closure(Matter_Session_get_i2r_closure) }, - { be_const_key_weak(get_noc, 21), be_const_closure(Matter_Session_get_noc_closure) }, - { be_const_key_weak(i2rkey, 73), be_const_var(16) }, - { be_const_key_weak(fabric, 9), be_const_var(29) }, - { be_const_key_weak(source_node_id, -1), be_const_var(5) }, - { be_const_key_weak(get_ca, -1), be_const_closure(Matter_Session_get_ca_closure) }, - { be_const_key_weak(close, -1), be_const_closure(Matter_Session_close_closure) }, - { be_const_key_weak(root_ca_certificate, 5), be_const_var(23) }, + { be_const_key_weak(_GROUP_KEY, -1), be_nested_str_weak(GroupKey_X20v1_X2E0) }, + { be_const_key_weak(set_mode_PASE, -1), be_const_closure(Matter_Session_set_mode_PASE_closure) }, { be_const_key_weak(set_ca, -1), be_const_closure(Matter_Session_set_ca_closure) }, + { be_const_key_weak(initiator_session_id, -1), be_const_var(4) }, + { be_const_key_weak(i2rkey, 26), be_const_var(18) }, + { be_const_key_weak(get_fabric, -1), be_const_closure(Matter_Session_get_fabric_closure) }, + { be_const_key_weak(r2ikey, -1), be_const_var(19) }, + { be_const_key_weak(_PASE, -1), be_const_int(1) }, + { be_const_key_weak(get_fabric_compressed, -1), be_const_closure(Matter_Session_get_fabric_compressed_closure) }, + { be_const_key_weak(get_i2r_privacy, 68), be_const_closure(Matter_Session_get_i2r_privacy_closure) }, + { be_const_key_weak(get_r2i, 67), be_const_closure(Matter_Session_get_r2i_closure) }, + { be_const_key_weak(get_i2r, -1), be_const_closure(Matter_Session_get_i2r_closure) }, + { be_const_key_weak(peer_node_id, -1), be_const_var(22) }, + { be_const_key_weak(fromjson, -1), be_const_static_closure(Matter_Session_fromjson_closure) }, + { be_const_key_weak(get_ipk_group_key, -1), be_const_closure(Matter_Session_get_ipk_group_key_closure) }, + { be_const_key_weak(save, -1), be_const_closure(Matter_Session_save_closure) }, + { be_const_key_weak(get_ac, -1), be_const_closure(Matter_Session_get_ac_closure) }, + { be_const_key_weak(get_fabric_label, -1), be_const_closure(Matter_Session_get_fabric_label_closure) }, + { be_const_key_weak(get_noc, -1), be_const_closure(Matter_Session_get_noc_closure) }, + { be_const_key_weak(get_admin_vendor, 17), be_const_closure(Matter_Session_get_admin_vendor_closure) }, + { be_const_key_weak(__future_local_session_id, -1), be_const_var(9) }, + { be_const_key_weak(source_node_id, -1), be_const_var(7) }, + { be_const_key_weak(_store, -1), be_const_var(0) }, + { be_const_key_weak(__Msg1, -1), be_const_var(26) }, + { be_const_key_weak(tojson, 61), be_const_closure(Matter_Session_tojson_closure) }, + { be_const_key_weak(close, 0), be_const_closure(Matter_Session_close_closure) }, + { be_const_key_weak(get_admin_subject, 40), be_const_closure(Matter_Session_get_admin_subject_closure) }, + { be_const_key_weak(set_fabric_label, -1), be_const_closure(Matter_Session_set_fabric_label_closure) }, + { be_const_key_weak(mode, -1), be_const_var(1) }, + { be_const_key_weak(is_PASE, 56), be_const_closure(Matter_Session_is_PASE_closure) }, + { be_const_key_weak(set_noc, -1), be_const_closure(Matter_Session_set_noc_closure) }, + { be_const_key_weak(__chunked_attr_reports, -1), be_const_var(28) }, + { be_const_key_weak(counter_rcv, 36), be_const_var(10) }, + { be_const_key_weak(_exchange_id, 57), be_const_var(12) }, + { be_const_key_weak(set_keys, -1), be_const_closure(Matter_Session_set_keys_closure) }, + { be_const_key_weak(set_fabric_device, 10), be_const_closure(Matter_Session_set_fabric_device_closure) }, + { be_const_key_weak(is_CASE, -1), be_const_closure(Matter_Session_is_CASE_closure) }, + { be_const_key_weak(__future_initiator_session_id, -1), be_const_var(8) }, + { be_const_key_weak(get_pk, -1), be_const_closure(Matter_Session_get_pk_closure) }, + { be_const_key_weak(_message_handler, 50), be_const_var(15) }, + { be_const_key_weak(fabric_candidate, -1), be_const_closure(Matter_Session_fabric_candidate_closure) }, + { be_const_key_weak(__counter_insecure_snd, 6), be_const_var(17) }, + { be_const_key_weak(get_fabric_id, -1), be_const_closure(Matter_Session_get_fabric_id_closure) }, + { be_const_key_weak(fabric_completed, 72), be_const_closure(Matter_Session_fabric_completed_closure) }, + { be_const_key_weak(_fabric, -1), be_const_var(2) }, + { be_const_key_weak(get_ca, 34), be_const_closure(Matter_Session_get_ca_closure) }, + { be_const_key_weak(counter_snd, -1), be_const_var(11) }, + { be_const_key_weak(gen_CSR, 28), be_const_closure(Matter_Session_gen_CSR_closure) }, + { be_const_key_weak(local_session_id, 59), be_const_var(3) }, + { be_const_key_weak(__counter_insecure_rcv, -1), be_const_var(16) }, + { be_const_key_weak(get_ca_pub, 18), be_const_closure(Matter_Session_get_ca_pub_closure) }, + { be_const_key_weak(created, -1), be_const_var(5) }, + { be_const_key_weak(_breadcrumb, 16), be_const_var(23) }, + { be_const_key_weak(__Msg2, -1), be_const_var(27) }, + { be_const_key_weak(_i2r_privacy, -1), be_const_var(20) }, + { be_const_key_weak(_CASE, -1), be_const_int(2) }, + { be_const_key_weak(get_device_id, 4), be_const_closure(Matter_Session_get_device_id_closure) }, + { be_const_key_weak(persist_to_fabric, 3), be_const_closure(Matter_Session_persist_to_fabric_closure) }, + { be_const_key_weak(update, 2), be_const_closure(Matter_Session_update_closure) }, + { be_const_key_weak(set_ipk_epoch_key, -1), be_const_closure(Matter_Session_set_ipk_epoch_key_closure) }, })), be_str_weak(Matter_Session) ); @@ -1573,11 +2741,11 @@ void be_load_Matter_Session_class(bvm *vm) { extern const bclass be_class_Matter_Session_Store; /******************************************************************** -** Solidified function: remove_expired +** Solidified function: save_fabrics ********************************************************************/ -be_local_closure(Matter_Session_Store_remove_expired, /* name */ +be_local_closure(Matter_Session_Store_save_fabrics, /* name */ be_nested_proto( - 7, /* nstack */ + 14, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1585,336 +2753,121 @@ be_local_closure(Matter_Session_Store_remove_expired, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(has_expired), - /* K3 */ be_nested_str_weak(_persist), - /* K4 */ be_nested_str_weak(remove), - /* K5 */ be_const_int(1), - /* K6 */ be_nested_str_weak(save), - }), - be_str_weak(remove_expired), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0x50040000, // 0000 LDBOOL R1 0 0 - 0x58080000, // 0001 LDCONST R2 K0 - 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x6010000C, // 0003 GETGBL R4 G12 - 0x88140101, // 0004 GETMBR R5 R0 K1 - 0x7C100200, // 0005 CALL R4 1 - 0x14100404, // 0006 LT R4 R2 R4 - 0x7812000D, // 0007 JMPF R4 #0016 - 0x94100602, // 0008 GETIDX R4 R3 R2 - 0x8C100902, // 0009 GETMET R4 R4 K2 - 0x7C100200, // 000A CALL R4 1 - 0x78120007, // 000B JMPF R4 #0014 - 0x94100602, // 000C GETIDX R4 R3 R2 - 0x88100903, // 000D GETMBR R4 R4 K3 - 0x78120000, // 000E JMPF R4 #0010 - 0x50040200, // 000F LDBOOL R1 1 0 - 0x8C100704, // 0010 GETMET R4 R3 K4 - 0x5C180400, // 0011 MOVE R6 R2 - 0x7C100400, // 0012 CALL R4 2 - 0x70020000, // 0013 JMP #0015 - 0x00080505, // 0014 ADD R2 R2 K5 - 0x7001FFEC, // 0015 JMP #0003 - 0x78060001, // 0016 JMPF R1 #0019 - 0x8C100106, // 0017 GETMET R4 R0 K6 - 0x7C100200, // 0018 CALL R4 1 - 0x80000000, // 0019 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_redundant_session -********************************************************************/ -be_local_closure(Matter_Session_Store_remove_redundant_session, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(fabric), - /* K3 */ be_nested_str_weak(deviceid), - /* K4 */ be_nested_str_weak(remove), - /* K5 */ be_const_int(1), - }), - be_str_weak(remove_redundant_session), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x6010000C, // 0002 GETGBL R4 G12 - 0x88140101, // 0003 GETMBR R5 R0 K1 - 0x7C100200, // 0004 CALL R4 1 - 0x14100404, // 0005 LT R4 R2 R4 - 0x78120010, // 0006 JMPF R4 #0018 - 0x94100602, // 0007 GETIDX R4 R3 R2 - 0x20140801, // 0008 NE R5 R4 R1 - 0x7816000B, // 0009 JMPF R5 #0016 - 0x88140902, // 000A GETMBR R5 R4 K2 - 0x88180302, // 000B GETMBR R6 R1 K2 - 0x1C140A06, // 000C EQ R5 R5 R6 - 0x78160007, // 000D JMPF R5 #0016 - 0x88140903, // 000E GETMBR R5 R4 K3 - 0x88180303, // 000F GETMBR R6 R1 K3 - 0x1C140A06, // 0010 EQ R5 R5 R6 - 0x78160003, // 0011 JMPF R5 #0016 - 0x8C140704, // 0012 GETMET R5 R3 K4 - 0x5C1C0400, // 0013 MOVE R7 R2 - 0x7C140400, // 0014 CALL R5 2 - 0x70020000, // 0015 JMP #0017 - 0x00080505, // 0016 ADD R2 R2 K5 - 0x7001FFE9, // 0017 JMP #0002 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_session -********************************************************************/ -be_local_closure(Matter_Session_Store_add_session, /* name */ - be_nested_proto( - 6, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(set_expire_in_seconds), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(push), - }), - be_str_weak(add_session), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x200C0403, // 0001 NE R3 R2 R3 - 0x780E0002, // 0002 JMPF R3 #0006 - 0x8C0C0300, // 0003 GETMET R3 R1 K0 - 0x5C140400, // 0004 MOVE R5 R2 - 0x7C0C0400, // 0005 CALL R3 2 - 0x880C0101, // 0006 GETMBR R3 R0 K1 - 0x8C0C0702, // 0007 GETMET R3 R3 K2 - 0x5C140200, // 0008 MOVE R5 R1 - 0x7C0C0400, // 0009 CALL R3 2 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: sessions_active -********************************************************************/ -be_local_closure(Matter_Session_Store_sessions_active, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(get_deviceid), - /* K3 */ be_nested_str_weak(get_fabric), - /* K4 */ be_nested_str_weak(push), - /* K5 */ be_const_int(1), - }), - be_str_weak(sessions_active), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x60040012, // 0000 GETGBL R1 G18 - 0x7C040000, // 0001 CALL R1 0 - 0x58080000, // 0002 LDCONST R2 K0 - 0x600C000C, // 0003 GETGBL R3 G12 - 0x88100101, // 0004 GETMBR R4 R0 K1 - 0x7C0C0200, // 0005 CALL R3 1 - 0x140C0403, // 0006 LT R3 R2 R3 - 0x780E000C, // 0007 JMPF R3 #0015 - 0x880C0101, // 0008 GETMBR R3 R0 K1 - 0x940C0602, // 0009 GETIDX R3 R3 R2 - 0x8C100702, // 000A GETMET R4 R3 K2 - 0x7C100200, // 000B CALL R4 1 - 0x78120005, // 000C JMPF R4 #0013 - 0x8C100703, // 000D GETMET R4 R3 K3 - 0x7C100200, // 000E CALL R4 1 - 0x78120002, // 000F JMPF R4 #0013 - 0x8C100304, // 0010 GETMET R4 R1 K4 - 0x5C180600, // 0011 MOVE R6 R3 - 0x7C100400, // 0012 CALL R4 2 - 0x00080505, // 0013 ADD R2 R2 K5 - 0x7001FFED, // 0014 JMP #0003 - 0x80040200, // 0015 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Session_Store_every_second, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(remove_expired), - }), - be_str_weak(every_second), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: save -********************************************************************/ -be_local_closure(Matter_Session_Store_save, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[23]) { /* constants */ + ( &(const bvalue[26]) { /* constants */ /* K0 */ be_nested_str_weak(json), /* K1 */ be_nested_str_weak(remove_expired), - /* K2 */ be_nested_str_weak(sessions), - /* K3 */ be_nested_str_weak(_persist), - /* K4 */ be_nested_str_weak(push), - /* K5 */ be_nested_str_weak(tojson), - /* K6 */ be_nested_str_weak(stop_iteration), - /* K7 */ be_nested_str_weak(_X5B), - /* K8 */ be_nested_str_weak(concat), - /* K9 */ be_nested_str_weak(_X2C), - /* K10 */ be_nested_str_weak(_X5D), - /* K11 */ be_nested_str_weak(string), - /* K12 */ be_nested_str_weak(FILENAME), - /* K13 */ be_nested_str_weak(w), - /* K14 */ be_nested_str_weak(write), - /* K15 */ be_nested_str_weak(close), - /* K16 */ be_nested_str_weak(tasmota), - /* K17 */ be_nested_str_weak(log), - /* K18 */ be_nested_str_weak(format), - /* K19 */ be_nested_str_weak(MTR_X3A_X20Saved_X20_X25i_X20session_X28s_X29), - /* K20 */ be_const_int(2), - /* K21 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), - /* K22 */ be_nested_str_weak(_X7C), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(fabrics), + /* K4 */ be_nested_str_weak(persistables), + /* K5 */ be_nested_str_weak(_sessions), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str_weak(stop_iteration), + /* K8 */ be_nested_str_weak(push), + /* K9 */ be_nested_str_weak(tojson), + /* K10 */ be_nested_str_weak(_X5B), + /* K11 */ be_nested_str_weak(concat), + /* K12 */ be_nested_str_weak(_X2C), + /* K13 */ be_nested_str_weak(_X5D), + /* K14 */ be_nested_str_weak(string), + /* K15 */ be_nested_str_weak(_FABRICS), + /* K16 */ be_nested_str_weak(w), + /* K17 */ be_nested_str_weak(write), + /* K18 */ be_nested_str_weak(close), + /* K19 */ be_nested_str_weak(tasmota), + /* K20 */ be_nested_str_weak(log), + /* K21 */ be_nested_str_weak(format), + /* K22 */ be_nested_str_weak(MTR_X3A_X20Saved_X20_X25i_X20fabric_X28s_X29_X20and_X20_X25i_X20session_X28s_X29), + /* K23 */ be_const_int(2), + /* K24 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), + /* K25 */ be_nested_str_weak(_X7C), }), - be_str_weak(save), + be_str_weak(save_fabrics), &be_const_str_solidified, - ( &(const binstruction[72]) { /* code */ + ( &(const binstruction[84]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080101, // 0001 GETMET R2 R0 K1 0x7C080200, // 0002 CALL R2 1 - 0x60080012, // 0003 GETGBL R2 G18 - 0x7C080000, // 0004 CALL R2 0 - 0x600C0010, // 0005 GETGBL R3 G16 - 0x88100102, // 0006 GETMBR R4 R0 K2 - 0x7C0C0200, // 0007 CALL R3 1 - 0xA8020008, // 0008 EXBLK 0 #0012 - 0x5C100600, // 0009 MOVE R4 R3 - 0x7C100000, // 000A CALL R4 0 - 0x88140903, // 000B GETMBR R5 R4 K3 - 0x78160003, // 000C JMPF R5 #0011 - 0x8C140504, // 000D GETMET R5 R2 K4 - 0x8C1C0905, // 000E GETMET R7 R4 K5 - 0x7C1C0200, // 000F CALL R7 1 - 0x7C140400, // 0010 CALL R5 2 - 0x7001FFF6, // 0011 JMP #0009 - 0x580C0006, // 0012 LDCONST R3 K6 - 0xAC0C0200, // 0013 CATCH R3 1 0 - 0xB0080000, // 0014 RAISE 2 R0 R0 - 0x600C000C, // 0015 GETGBL R3 G12 - 0x5C100400, // 0016 MOVE R4 R2 - 0x7C0C0200, // 0017 CALL R3 1 - 0x8C100508, // 0018 GETMET R4 R2 K8 - 0x58180009, // 0019 LDCONST R6 K9 - 0x7C100400, // 001A CALL R4 2 - 0x00120E04, // 001B ADD R4 K7 R4 - 0x0010090A, // 001C ADD R4 R4 K10 - 0x5C080800, // 001D MOVE R2 R4 - 0xA8020015, // 001E EXBLK 0 #0035 - 0xA4121600, // 001F IMPORT R4 K11 - 0x60140011, // 0020 GETGBL R5 G17 - 0x8818010C, // 0021 GETMBR R6 R0 K12 - 0x581C000D, // 0022 LDCONST R7 K13 - 0x7C140400, // 0023 CALL R5 2 - 0x8C180B0E, // 0024 GETMET R6 R5 K14 - 0x5C200400, // 0025 MOVE R8 R2 - 0x7C180400, // 0026 CALL R6 2 - 0x8C180B0F, // 0027 GETMET R6 R5 K15 - 0x7C180200, // 0028 CALL R6 1 - 0xB81A2000, // 0029 GETNGBL R6 K16 - 0x8C180D11, // 002A GETMET R6 R6 K17 - 0x8C200912, // 002B GETMET R8 R4 K18 - 0x58280013, // 002C LDCONST R10 K19 - 0x5C2C0600, // 002D MOVE R11 R3 - 0x7C200600, // 002E CALL R8 3 - 0x58240014, // 002F LDCONST R9 K20 - 0x7C180600, // 0030 CALL R6 3 - 0xA8040001, // 0031 EXBLK 1 1 - 0x80040400, // 0032 RET 1 R2 - 0xA8040001, // 0033 EXBLK 1 1 - 0x70020011, // 0034 JMP #0047 - 0xAC100002, // 0035 CATCH R4 0 2 - 0x7002000E, // 0036 JMP #0046 - 0xB81A2000, // 0037 GETNGBL R6 K16 - 0x8C180D11, // 0038 GETMET R6 R6 K17 - 0x60200008, // 0039 GETGBL R8 G8 - 0x5C240800, // 003A MOVE R9 R4 - 0x7C200200, // 003B CALL R8 1 - 0x00222A08, // 003C ADD R8 K21 R8 - 0x00201116, // 003D ADD R8 R8 K22 - 0x60240008, // 003E GETGBL R9 G8 - 0x5C280A00, // 003F MOVE R10 R5 - 0x7C240200, // 0040 CALL R9 1 - 0x00201009, // 0041 ADD R8 R8 R9 - 0x58240014, // 0042 LDCONST R9 K20 - 0x7C180600, // 0043 CALL R6 3 - 0x80040400, // 0044 RET 1 R2 - 0x70020000, // 0045 JMP #0047 - 0xB0080000, // 0046 RAISE 2 R0 R0 - 0x80000000, // 0047 RET 0 + 0x58080002, // 0003 LDCONST R2 K2 + 0x600C0012, // 0004 GETGBL R3 G18 + 0x7C0C0000, // 0005 CALL R3 0 + 0x60100010, // 0006 GETGBL R4 G16 + 0x88140103, // 0007 GETMBR R5 R0 K3 + 0x8C140B04, // 0008 GETMET R5 R5 K4 + 0x7C140200, // 0009 CALL R5 1 + 0x7C100200, // 000A CALL R4 1 + 0xA8020013, // 000B EXBLK 0 #0020 + 0x5C140800, // 000C MOVE R5 R4 + 0x7C140000, // 000D CALL R5 0 + 0x60180010, // 000E GETGBL R6 G16 + 0x881C0B05, // 000F GETMBR R7 R5 K5 + 0x8C1C0F04, // 0010 GETMET R7 R7 K4 + 0x7C1C0200, // 0011 CALL R7 1 + 0x7C180200, // 0012 CALL R6 1 + 0xA8020003, // 0013 EXBLK 0 #0018 + 0x5C1C0C00, // 0014 MOVE R7 R6 + 0x7C1C0000, // 0015 CALL R7 0 + 0x00080506, // 0016 ADD R2 R2 K6 + 0x7001FFFB, // 0017 JMP #0014 + 0x58180007, // 0018 LDCONST R6 K7 + 0xAC180200, // 0019 CATCH R6 1 0 + 0xB0080000, // 001A RAISE 2 R0 R0 + 0x8C180708, // 001B GETMET R6 R3 K8 + 0x8C200B09, // 001C GETMET R8 R5 K9 + 0x7C200200, // 001D CALL R8 1 + 0x7C180400, // 001E CALL R6 2 + 0x7001FFEB, // 001F JMP #000C + 0x58100007, // 0020 LDCONST R4 K7 + 0xAC100200, // 0021 CATCH R4 1 0 + 0xB0080000, // 0022 RAISE 2 R0 R0 + 0x6010000C, // 0023 GETGBL R4 G12 + 0x5C140600, // 0024 MOVE R5 R3 + 0x7C100200, // 0025 CALL R4 1 + 0x8C14070B, // 0026 GETMET R5 R3 K11 + 0x581C000C, // 0027 LDCONST R7 K12 + 0x7C140400, // 0028 CALL R5 2 + 0x00161405, // 0029 ADD R5 K10 R5 + 0x00140B0D, // 002A ADD R5 R5 K13 + 0x5C0C0A00, // 002B MOVE R3 R5 + 0xA8020014, // 002C EXBLK 0 #0042 + 0xA4161C00, // 002D IMPORT R5 K14 + 0x60180011, // 002E GETGBL R6 G17 + 0x881C010F, // 002F GETMBR R7 R0 K15 + 0x58200010, // 0030 LDCONST R8 K16 + 0x7C180400, // 0031 CALL R6 2 + 0x8C1C0D11, // 0032 GETMET R7 R6 K17 + 0x5C240600, // 0033 MOVE R9 R3 + 0x7C1C0400, // 0034 CALL R7 2 + 0x8C1C0D12, // 0035 GETMET R7 R6 K18 + 0x7C1C0200, // 0036 CALL R7 1 + 0xB81E2600, // 0037 GETNGBL R7 K19 + 0x8C1C0F14, // 0038 GETMET R7 R7 K20 + 0x8C240B15, // 0039 GETMET R9 R5 K21 + 0x582C0016, // 003A LDCONST R11 K22 + 0x5C300800, // 003B MOVE R12 R4 + 0x5C340400, // 003C MOVE R13 R2 + 0x7C240800, // 003D CALL R9 4 + 0x58280017, // 003E LDCONST R10 K23 + 0x7C1C0600, // 003F CALL R7 3 + 0xA8040001, // 0040 EXBLK 1 1 + 0x70020010, // 0041 JMP #0053 + 0xAC140002, // 0042 CATCH R5 0 2 + 0x7002000D, // 0043 JMP #0052 + 0xB81E2600, // 0044 GETNGBL R7 K19 + 0x8C1C0F14, // 0045 GETMET R7 R7 K20 + 0x60240008, // 0046 GETGBL R9 G8 + 0x5C280A00, // 0047 MOVE R10 R5 + 0x7C240200, // 0048 CALL R9 1 + 0x00263009, // 0049 ADD R9 K24 R9 + 0x00241319, // 004A ADD R9 R9 K25 + 0x60280008, // 004B GETGBL R10 G8 + 0x5C2C0C00, // 004C MOVE R11 R6 + 0x7C280200, // 004D CALL R10 1 + 0x0024120A, // 004E ADD R9 R9 R10 + 0x58280017, // 004F LDCONST R10 K23 + 0x7C1C0600, // 0050 CALL R7 3 + 0x70020000, // 0051 JMP #0053 + 0xB0080000, // 0052 RAISE 2 R0 R0 + 0x80000000, // 0053 RET 0 }) ) ); @@ -1922,238 +2875,9 @@ be_local_closure(Matter_Session_Store_save, /* name */ /******************************************************************** -** Solidified function: find_session_by_resumption_id +** Solidified function: remove_redundant_fabric ********************************************************************/ -be_local_closure(Matter_Session_Store_find_session_by_resumption_id, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(resumption_id), - /* K3 */ be_const_int(1), - }), - be_str_weak(find_session_by_resumption_id), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x5C080200, // 0000 MOVE R2 R1 - 0x740A0001, // 0001 JMPT R2 #0004 - 0x4C080000, // 0002 LDNIL R2 - 0x80040400, // 0003 RET 1 R2 - 0x58080000, // 0004 LDCONST R2 K0 - 0x880C0101, // 0005 GETMBR R3 R0 K1 - 0x6010000C, // 0006 GETGBL R4 G12 - 0x5C140600, // 0007 MOVE R5 R3 - 0x7C100200, // 0008 CALL R4 1 - 0x14100404, // 0009 LT R4 R2 R4 - 0x78120007, // 000A JMPF R4 #0013 - 0x94100602, // 000B GETIDX R4 R3 R2 - 0x88100902, // 000C GETMBR R4 R4 K2 - 0x1C100801, // 000D EQ R4 R4 R1 - 0x78120001, // 000E JMPF R4 #0011 - 0x94100602, // 000F GETIDX R4 R3 R2 - 0x80040800, // 0010 RET 1 R4 - 0x00080503, // 0011 ADD R2 R2 K3 - 0x7001FFF2, // 0012 JMP #0006 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: gen_local_session_id -********************************************************************/ -be_local_closure(Matter_Session_Store_gen_local_session_id, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(random), - /* K2 */ be_const_int(2), - /* K3 */ be_nested_str_weak(get), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(get_session_by_local_session_id), - }), - be_str_weak(gen_local_session_id), - &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x50080200, // 0001 LDBOOL R2 1 0 - 0x780A000E, // 0002 JMPF R2 #0012 - 0x8C080301, // 0003 GETMET R2 R1 K1 - 0x58100002, // 0004 LDCONST R4 K2 - 0x7C080400, // 0005 CALL R2 2 - 0x8C080503, // 0006 GETMET R2 R2 K3 - 0x58100004, // 0007 LDCONST R4 K4 - 0x58140002, // 0008 LDCONST R5 K2 - 0x7C080600, // 0009 CALL R2 3 - 0x8C0C0105, // 000A GETMET R3 R0 K5 - 0x5C140400, // 000B MOVE R5 R2 - 0x7C0C0400, // 000C CALL R3 2 - 0x4C100000, // 000D LDNIL R4 - 0x1C0C0604, // 000E EQ R3 R3 R4 - 0x780E0000, // 000F JMPF R3 #0011 - 0x80040400, // 0010 RET 1 R2 - 0x7001FFEE, // 0011 JMP #0001 - 0x80000000, // 0012 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_session_by_local_session_id -********************************************************************/ -be_local_closure(Matter_Session_Store_get_session_by_local_session_id, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(local_session_id), - /* K3 */ be_const_int(1), - }), - be_str_weak(get_session_by_local_session_id), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0001, // 0002 JMPF R2 #0005 - 0x4C080000, // 0003 LDNIL R2 - 0x80040400, // 0004 RET 1 R2 - 0x6008000C, // 0005 GETGBL R2 G12 - 0x880C0100, // 0006 GETMBR R3 R0 K0 - 0x7C080200, // 0007 CALL R2 1 - 0x580C0001, // 0008 LDCONST R3 K1 - 0x88100100, // 0009 GETMBR R4 R0 K0 - 0x14140602, // 000A LT R5 R3 R2 - 0x78160007, // 000B JMPF R5 #0014 - 0x94140803, // 000C GETIDX R5 R4 R3 - 0x88140B02, // 000D GETMBR R5 R5 K2 - 0x1C140A01, // 000E EQ R5 R5 R1 - 0x78160001, // 000F JMPF R5 #0012 - 0x94140803, // 0010 GETIDX R5 R4 R3 - 0x80040A00, // 0011 RET 1 R5 - 0x000C0703, // 0012 ADD R3 R3 K3 - 0x7001FFF5, // 0013 JMP #000A - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Session_Store_init, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040012, // 0000 GETGBL R1 G18 - 0x7C040000, // 0001 CALL R1 0 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: find_session_source_id_unsecure -********************************************************************/ -be_local_closure(Matter_Session_Store_find_session_source_id_unsecure, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(get_session_by_source_node_id), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(Session), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(source_node_id), - /* K5 */ be_nested_str_weak(sessions), - /* K6 */ be_nested_str_weak(push), - /* K7 */ be_nested_str_weak(set_expire_in_seconds), - }), - be_str_weak(find_session_source_id_unsecure), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x5C140200, // 0001 MOVE R5 R1 - 0x7C0C0400, // 0002 CALL R3 2 - 0x4C100000, // 0003 LDNIL R4 - 0x1C100604, // 0004 EQ R4 R3 R4 - 0x7812000B, // 0005 JMPF R4 #0012 - 0xB8120200, // 0006 GETNGBL R4 K1 - 0x8C100902, // 0007 GETMET R4 R4 K2 - 0x5C180000, // 0008 MOVE R6 R0 - 0x581C0003, // 0009 LDCONST R7 K3 - 0x58200003, // 000A LDCONST R8 K3 - 0x7C100800, // 000B CALL R4 4 - 0x5C0C0800, // 000C MOVE R3 R4 - 0x900E0801, // 000D SETMBR R3 K4 R1 - 0x88100105, // 000E GETMBR R4 R0 K5 - 0x8C100906, // 000F GETMET R4 R4 K6 - 0x5C180600, // 0010 MOVE R6 R3 - 0x7C100400, // 0011 CALL R4 2 - 0x8C100707, // 0012 GETMET R4 R3 K7 - 0x5C180400, // 0013 MOVE R6 R2 - 0x7C100400, // 0014 CALL R4 2 - 0x80040600, // 0015 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_session -********************************************************************/ -be_local_closure(Matter_Session_Store_remove_session, /* name */ +be_local_closure(Matter_Session_Store_remove_redundant_fabric, /* name */ be_nested_proto( 7, /* nstack */ 2, /* argc */ @@ -2163,32 +2887,43 @@ be_local_closure(Matter_Session_Store_remove_session, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ + ( &(const bvalue[ 6]) { /* constants */ /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(remove), - /* K3 */ be_const_int(1), + /* K1 */ be_nested_str_weak(fabrics), + /* K2 */ be_nested_str_weak(fabric_id), + /* K3 */ be_nested_str_weak(device_id), + /* K4 */ be_nested_str_weak(remove), + /* K5 */ be_const_int(1), }), - be_str_weak(remove_session), + be_str_weak(remove_redundant_fabric), &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ + ( &(const binstruction[26]) { /* code */ 0x58080000, // 0000 LDCONST R2 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x6010000C, // 0002 GETGBL R4 G12 - 0x88140101, // 0003 GETMBR R5 R0 K1 - 0x7C100200, // 0004 CALL R4 1 - 0x14100404, // 0005 LT R4 R2 R4 - 0x78120008, // 0006 JMPF R4 #0010 - 0x94100602, // 0007 GETIDX R4 R3 R2 - 0x1C100801, // 0008 EQ R4 R4 R1 - 0x78120003, // 0009 JMPF R4 #000E - 0x8C100702, // 000A GETMET R4 R3 K2 - 0x5C180400, // 000B MOVE R6 R2 - 0x7C100400, // 000C CALL R4 2 - 0x70020000, // 000D JMP #000F - 0x00080503, // 000E ADD R2 R2 K3 - 0x7001FFF1, // 000F JMP #0002 - 0x80000000, // 0010 RET 0 + 0x600C000C, // 0001 GETGBL R3 G12 + 0x88100101, // 0002 GETMBR R4 R0 K1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x140C0403, // 0004 LT R3 R2 R3 + 0x780E0012, // 0005 JMPF R3 #0019 + 0x880C0101, // 0006 GETMBR R3 R0 K1 + 0x940C0602, // 0007 GETIDX R3 R3 R2 + 0x20100601, // 0008 NE R4 R3 R1 + 0x7812000C, // 0009 JMPF R4 #0017 + 0x88100702, // 000A GETMBR R4 R3 K2 + 0x88140302, // 000B GETMBR R5 R1 K2 + 0x1C100805, // 000C EQ R4 R4 R5 + 0x78120008, // 000D JMPF R4 #0017 + 0x88100703, // 000E GETMBR R4 R3 K3 + 0x88140303, // 000F GETMBR R5 R1 K3 + 0x1C100805, // 0010 EQ R4 R4 R5 + 0x78120004, // 0011 JMPF R4 #0017 + 0x88100101, // 0012 GETMBR R4 R0 K1 + 0x8C100904, // 0013 GETMET R4 R4 K4 + 0x5C180400, // 0014 MOVE R6 R2 + 0x7C100400, // 0015 CALL R4 2 + 0x70020000, // 0016 JMP #0018 + 0x00080505, // 0017 ADD R2 R2 K5 + 0x7001FFE7, // 0018 JMP #0001 + 0x80000000, // 0019 RET 0 }) ) ); @@ -2247,11 +2982,11 @@ be_local_closure(Matter_Session_Store_create_session, /* name */ /******************************************************************** -** Solidified function: load +** Solidified function: remove_expired ********************************************************************/ -be_local_closure(Matter_Session_Store_load, /* name */ +be_local_closure(Matter_Session_Store_remove_expired, /* name */ be_nested_proto( - 13, /* nstack */ + 3, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2259,112 +2994,21 @@ be_local_closure(Matter_Session_Store_load, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[23]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(FILENAME), - /* K3 */ be_nested_str_weak(read), - /* K4 */ be_nested_str_weak(close), - /* K5 */ be_nested_str_weak(json), - /* K6 */ be_nested_str_weak(load), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(gc), - /* K9 */ be_nested_str_weak(matter), - /* K10 */ be_nested_str_weak(Session), - /* K11 */ be_nested_str_weak(fromjson), - /* K12 */ be_nested_str_weak(_persist), - /* K13 */ be_nested_str_weak(add_session), - /* K14 */ be_nested_str_weak(stop_iteration), - /* K15 */ be_nested_str_weak(log), - /* K16 */ be_nested_str_weak(format), - /* K17 */ be_nested_str_weak(MTR_X3A_X20Loaded_X20_X25i_X20session_X28s_X29), - /* K18 */ be_const_int(2), - /* K19 */ be_nested_str_weak(io_error), - /* K20 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A), - /* K21 */ be_nested_str_weak(_X7C), - /* K22 */ be_nested_str_weak(remove_expired), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(every_second), + /* K2 */ be_nested_str_weak(fabrics), }), - be_str_weak(load), + be_str_weak(remove_expired), &be_const_str_solidified, - ( &(const binstruction[78]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA8020035, // 0001 EXBLK 0 #0038 - 0x60080012, // 0002 GETGBL R2 G18 - 0x7C080000, // 0003 CALL R2 0 - 0x90020202, // 0004 SETMBR R0 K1 R2 - 0x60080011, // 0005 GETGBL R2 G17 - 0x880C0102, // 0006 GETMBR R3 R0 K2 - 0x7C080200, // 0007 CALL R2 1 - 0x8C0C0503, // 0008 GETMET R3 R2 K3 - 0x7C0C0200, // 0009 CALL R3 1 - 0x8C100504, // 000A GETMET R4 R2 K4 - 0x7C100200, // 000B CALL R4 1 - 0xA4120A00, // 000C IMPORT R4 K5 - 0x8C140906, // 000D GETMET R5 R4 K6 - 0x5C1C0600, // 000E MOVE R7 R3 - 0x7C140400, // 000F CALL R5 2 - 0x4C0C0000, // 0010 LDNIL R3 - 0xB81A0E00, // 0011 GETNGBL R6 K7 - 0x8C180D08, // 0012 GETMET R6 R6 K8 - 0x7C180200, // 0013 CALL R6 1 - 0x60180010, // 0014 GETGBL R6 G16 - 0x5C1C0A00, // 0015 MOVE R7 R5 - 0x7C180200, // 0016 CALL R6 1 - 0xA8020010, // 0017 EXBLK 0 #0029 - 0x5C1C0C00, // 0018 MOVE R7 R6 - 0x7C1C0000, // 0019 CALL R7 0 - 0xB8221200, // 001A GETNGBL R8 K9 - 0x8820110A, // 001B GETMBR R8 R8 K10 - 0x8C20110B, // 001C GETMET R8 R8 K11 - 0x5C280000, // 001D MOVE R10 R0 - 0x5C2C0E00, // 001E MOVE R11 R7 - 0x7C200600, // 001F CALL R8 3 - 0x50240200, // 0020 LDBOOL R9 1 0 - 0x90221809, // 0021 SETMBR R8 K12 R9 - 0x4C240000, // 0022 LDNIL R9 - 0x20241009, // 0023 NE R9 R8 R9 - 0x78260002, // 0024 JMPF R9 #0028 - 0x8C24010D, // 0025 GETMET R9 R0 K13 - 0x5C2C1000, // 0026 MOVE R11 R8 - 0x7C240400, // 0027 CALL R9 2 - 0x7001FFEE, // 0028 JMP #0018 - 0x5818000E, // 0029 LDCONST R6 K14 - 0xAC180200, // 002A CATCH R6 1 0 - 0xB0080000, // 002B RAISE 2 R0 R0 - 0xB81A0E00, // 002C GETNGBL R6 K7 - 0x8C180D0F, // 002D GETMET R6 R6 K15 - 0x8C200310, // 002E GETMET R8 R1 K16 - 0x58280011, // 002F LDCONST R10 K17 - 0x602C000C, // 0030 GETGBL R11 G12 - 0x88300101, // 0031 GETMBR R12 R0 K1 - 0x7C2C0200, // 0032 CALL R11 1 - 0x7C200600, // 0033 CALL R8 3 - 0x58240012, // 0034 LDCONST R9 K18 - 0x7C180600, // 0035 CALL R6 3 - 0xA8040001, // 0036 EXBLK 1 1 - 0x70020012, // 0037 JMP #004B - 0xAC080002, // 0038 CATCH R2 0 2 - 0x7002000F, // 0039 JMP #004A - 0x20100513, // 003A NE R4 R2 K19 - 0x7812000C, // 003B JMPF R4 #0049 - 0xB8120E00, // 003C GETNGBL R4 K7 - 0x8C10090F, // 003D GETMET R4 R4 K15 - 0x60180008, // 003E GETGBL R6 G8 - 0x5C1C0400, // 003F MOVE R7 R2 - 0x7C180200, // 0040 CALL R6 1 - 0x001A2806, // 0041 ADD R6 K20 R6 - 0x00180D15, // 0042 ADD R6 R6 K21 - 0x601C0008, // 0043 GETGBL R7 G8 - 0x5C200600, // 0044 MOVE R8 R3 - 0x7C1C0200, // 0045 CALL R7 1 - 0x00180C07, // 0046 ADD R6 R6 R7 - 0x581C0012, // 0047 LDCONST R7 K18 - 0x7C100600, // 0048 CALL R4 3 - 0x70020000, // 0049 JMP #004B - 0xB0080000, // 004A RAISE 2 R0 R0 - 0x8C080116, // 004B GETMET R2 R0 K22 - 0x7C080200, // 004C CALL R2 1 - 0x80000000, // 004D RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x88040102, // 0003 GETMBR R1 R0 K2 + 0x8C040301, // 0004 GETMET R1 R1 K1 + 0x7C040200, // 0005 CALL R1 1 + 0x80000000, // 0006 RET 0 }) ) ); @@ -2372,11 +3016,182 @@ be_local_closure(Matter_Session_Store_load, /* name */ /******************************************************************** -** Solidified function: get_session_by_source_node_id +** Solidified function: load_fabrics ********************************************************************/ -be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name */ +be_local_closure(Matter_Session_Store_load_fabrics, /* name */ be_nested_proto( - 6, /* nstack */ + 17, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[29]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(matter), + /* K3 */ be_nested_str_weak(Expirable_list), + /* K4 */ be_nested_str_weak(fabrics), + /* K5 */ be_nested_str_weak(_FABRICS), + /* K6 */ be_nested_str_weak(read), + /* K7 */ be_nested_str_weak(close), + /* K8 */ be_nested_str_weak(json), + /* K9 */ be_nested_str_weak(load), + /* K10 */ be_nested_str_weak(tasmota), + /* K11 */ be_nested_str_weak(gc), + /* K12 */ be_nested_str_weak(Fabric), + /* K13 */ be_nested_str_weak(fromjson), + /* K14 */ be_nested_str_weak(set_no_expiration), + /* K15 */ be_nested_str_weak(set_persist), + /* K16 */ be_nested_str_weak(find), + /* K17 */ be_nested_str_weak(_sessions), + /* K18 */ be_nested_str_weak(Session), + /* K19 */ be_nested_str_weak(add_session), + /* K20 */ be_nested_str_weak(stop_iteration), + /* K21 */ be_nested_str_weak(push), + /* K22 */ be_nested_str_weak(log), + /* K23 */ be_nested_str_weak(format), + /* K24 */ be_nested_str_weak(MTR_X3A_X20Loaded_X20_X25i_X20fabric_X28s_X29), + /* K25 */ be_const_int(2), + /* K26 */ be_nested_str_weak(io_error), + /* K27 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A), + /* K28 */ be_nested_str_weak(_X7C), + }), + be_str_weak(load_fabrics), + &be_const_str_solidified, + ( &(const binstruction[118]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA802005F, // 0001 EXBLK 0 #0062 + 0xB80A0400, // 0002 GETNGBL R2 K2 + 0x8C080503, // 0003 GETMET R2 R2 K3 + 0x7C080200, // 0004 CALL R2 1 + 0x90020202, // 0005 SETMBR R0 K1 R2 + 0xB80A0400, // 0006 GETNGBL R2 K2 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x7C080200, // 0008 CALL R2 1 + 0x90020802, // 0009 SETMBR R0 K4 R2 + 0x60080011, // 000A GETGBL R2 G17 + 0x880C0105, // 000B GETMBR R3 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x8C0C0506, // 000D GETMET R3 R2 K6 + 0x7C0C0200, // 000E CALL R3 1 + 0x8C100507, // 000F GETMET R4 R2 K7 + 0x7C100200, // 0010 CALL R4 1 + 0xA4121000, // 0011 IMPORT R4 K8 + 0x8C140909, // 0012 GETMET R5 R4 K9 + 0x5C1C0600, // 0013 MOVE R7 R3 + 0x7C140400, // 0014 CALL R5 2 + 0x4C0C0000, // 0015 LDNIL R3 + 0xB81A1400, // 0016 GETNGBL R6 K10 + 0x8C180D0B, // 0017 GETMET R6 R6 K11 + 0x7C180200, // 0018 CALL R6 1 + 0x60180010, // 0019 GETGBL R6 G16 + 0x5C1C0A00, // 001A MOVE R7 R5 + 0x7C180200, // 001B CALL R6 1 + 0xA8020035, // 001C EXBLK 0 #0053 + 0x5C1C0C00, // 001D MOVE R7 R6 + 0x7C1C0000, // 001E CALL R7 0 + 0xB8220400, // 001F GETNGBL R8 K2 + 0x8820110C, // 0020 GETMBR R8 R8 K12 + 0x8C20110D, // 0021 GETMET R8 R8 K13 + 0x5C280000, // 0022 MOVE R10 R0 + 0x5C2C0E00, // 0023 MOVE R11 R7 + 0x7C200600, // 0024 CALL R8 3 + 0x8C24110E, // 0025 GETMET R9 R8 K14 + 0x7C240200, // 0026 CALL R9 1 + 0x8C24110F, // 0027 GETMET R9 R8 K15 + 0x502C0200, // 0028 LDBOOL R11 1 0 + 0x7C240400, // 0029 CALL R9 2 + 0x8C240F10, // 002A GETMET R9 R7 K16 + 0x582C0011, // 002B LDCONST R11 K17 + 0x60300012, // 002C GETGBL R12 G18 + 0x7C300000, // 002D CALL R12 0 + 0x7C240600, // 002E CALL R9 3 + 0x60280010, // 002F GETGBL R10 G16 + 0x5C2C1200, // 0030 MOVE R11 R9 + 0x7C280200, // 0031 CALL R10 1 + 0xA8020017, // 0032 EXBLK 0 #004B + 0x5C2C1400, // 0033 MOVE R11 R10 + 0x7C2C0000, // 0034 CALL R11 0 + 0xB8320400, // 0035 GETNGBL R12 K2 + 0x88301912, // 0036 GETMBR R12 R12 K18 + 0x8C30190D, // 0037 GETMET R12 R12 K13 + 0x5C380000, // 0038 MOVE R14 R0 + 0x5C3C1600, // 0039 MOVE R15 R11 + 0x5C401000, // 003A MOVE R16 R8 + 0x7C300800, // 003B CALL R12 4 + 0x4C340000, // 003C LDNIL R13 + 0x2034180D, // 003D NE R13 R12 R13 + 0x7836000A, // 003E JMPF R13 #004A + 0x8C34190E, // 003F GETMET R13 R12 K14 + 0x7C340200, // 0040 CALL R13 1 + 0x8C34190F, // 0041 GETMET R13 R12 K15 + 0x503C0200, // 0042 LDBOOL R15 1 0 + 0x7C340400, // 0043 CALL R13 2 + 0x8C340113, // 0044 GETMET R13 R0 K19 + 0x5C3C1800, // 0045 MOVE R15 R12 + 0x7C340400, // 0046 CALL R13 2 + 0x8C341113, // 0047 GETMET R13 R8 K19 + 0x5C3C1800, // 0048 MOVE R15 R12 + 0x7C340400, // 0049 CALL R13 2 + 0x7001FFE7, // 004A JMP #0033 + 0x58280014, // 004B LDCONST R10 K20 + 0xAC280200, // 004C CATCH R10 1 0 + 0xB0080000, // 004D RAISE 2 R0 R0 + 0x88280104, // 004E GETMBR R10 R0 K4 + 0x8C281515, // 004F GETMET R10 R10 K21 + 0x5C301000, // 0050 MOVE R12 R8 + 0x7C280400, // 0051 CALL R10 2 + 0x7001FFC9, // 0052 JMP #001D + 0x58180014, // 0053 LDCONST R6 K20 + 0xAC180200, // 0054 CATCH R6 1 0 + 0xB0080000, // 0055 RAISE 2 R0 R0 + 0xB81A1400, // 0056 GETNGBL R6 K10 + 0x8C180D16, // 0057 GETMET R6 R6 K22 + 0x8C200317, // 0058 GETMET R8 R1 K23 + 0x58280018, // 0059 LDCONST R10 K24 + 0x602C000C, // 005A GETGBL R11 G12 + 0x88300104, // 005B GETMBR R12 R0 K4 + 0x7C2C0200, // 005C CALL R11 1 + 0x7C200600, // 005D CALL R8 3 + 0x58240019, // 005E LDCONST R9 K25 + 0x7C180600, // 005F CALL R6 3 + 0xA8040001, // 0060 EXBLK 1 1 + 0x70020012, // 0061 JMP #0075 + 0xAC080002, // 0062 CATCH R2 0 2 + 0x7002000F, // 0063 JMP #0074 + 0x2010051A, // 0064 NE R4 R2 K26 + 0x7812000C, // 0065 JMPF R4 #0073 + 0xB8121400, // 0066 GETNGBL R4 K10 + 0x8C100916, // 0067 GETMET R4 R4 K22 + 0x60180008, // 0068 GETGBL R6 G8 + 0x5C1C0400, // 0069 MOVE R7 R2 + 0x7C180200, // 006A CALL R6 1 + 0x001A3606, // 006B ADD R6 K27 R6 + 0x00180D1C, // 006C ADD R6 R6 K28 + 0x601C0008, // 006D GETGBL R7 G8 + 0x5C200600, // 006E MOVE R8 R3 + 0x7C1C0200, // 006F CALL R7 1 + 0x00180C07, // 0070 ADD R6 R6 R7 + 0x581C0019, // 0071 LDCONST R7 K25 + 0x7C100600, // 0072 CALL R4 3 + 0x70020000, // 0073 JMP #0075 + 0xB0080000, // 0074 RAISE 2 R0 R0 + 0x80000000, // 0075 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_session +********************************************************************/ +be_local_closure(Matter_Session_Store_remove_session, /* name */ + be_nested_proto( + 7, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2385,14 +3200,232 @@ be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name * NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(source_node_id), + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(remove), /* K3 */ be_const_int(1), }), - be_str_weak(get_session_by_source_node_id), + be_str_weak(remove_session), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ + ( &(const binstruction[17]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x6010000C, // 0002 GETGBL R4 G12 + 0x88140101, // 0003 GETMBR R5 R0 K1 + 0x7C100200, // 0004 CALL R4 1 + 0x14100404, // 0005 LT R4 R2 R4 + 0x78120008, // 0006 JMPF R4 #0010 + 0x94100602, // 0007 GETIDX R4 R3 R2 + 0x1C100801, // 0008 EQ R4 R4 R1 + 0x78120003, // 0009 JMPF R4 #000E + 0x8C100702, // 000A GETMET R4 R3 K2 + 0x5C180400, // 000B MOVE R6 R2 + 0x7C100400, // 000C CALL R4 2 + 0x70020000, // 000D JMP #000F + 0x00080503, // 000E ADD R2 R2 K3 + 0x7001FFF1, // 000F JMP #0002 + 0x80000000, // 0010 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_session +********************************************************************/ +be_local_closure(Matter_Session_Store_add_session, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(set_expire_in_seconds), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(push), + }), + be_str_weak(add_session), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x200C0403, // 0001 NE R3 R2 R3 + 0x780E0002, // 0002 JMPF R3 #0006 + 0x8C0C0300, // 0003 GETMET R3 R1 K0 + 0x5C140400, // 0004 MOVE R5 R2 + 0x7C0C0400, // 0005 CALL R3 2 + 0x880C0101, // 0006 GETMBR R3 R0 K1 + 0x8C0C0702, // 0007 GETMET R3 R3 K2 + 0x5C140200, // 0008 MOVE R5 R1 + 0x7C0C0400, // 0009 CALL R3 2 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_Session_Store_every_second, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(remove_expired), + }), + be_str_weak(every_second), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: sessions_active +********************************************************************/ +be_local_closure(Matter_Session_Store_sessions_active, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(get_device_id), + /* K3 */ be_nested_str_weak(get_fabric_id), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_const_int(1), + }), + be_str_weak(sessions_active), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x60040012, // 0000 GETGBL R1 G18 + 0x7C040000, // 0001 CALL R1 0 + 0x58080000, // 0002 LDCONST R2 K0 + 0x600C000C, // 0003 GETGBL R3 G12 + 0x88100101, // 0004 GETMBR R4 R0 K1 + 0x7C0C0200, // 0005 CALL R3 1 + 0x140C0403, // 0006 LT R3 R2 R3 + 0x780E000C, // 0007 JMPF R3 #0015 + 0x880C0101, // 0008 GETMBR R3 R0 K1 + 0x940C0602, // 0009 GETIDX R3 R3 R2 + 0x8C100702, // 000A GETMET R4 R3 K2 + 0x7C100200, // 000B CALL R4 1 + 0x78120005, // 000C JMPF R4 #0013 + 0x8C100703, // 000D GETMET R4 R3 K3 + 0x7C100200, // 000E CALL R4 1 + 0x78120002, // 000F JMPF R4 #0013 + 0x8C100304, // 0010 GETMET R4 R1 K4 + 0x5C180600, // 0011 MOVE R6 R3 + 0x7C100400, // 0012 CALL R4 2 + 0x00080505, // 0013 ADD R2 R2 K5 + 0x7001FFED, // 0014 JMP #0003 + 0x80040200, // 0015 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_fabric +********************************************************************/ +be_local_closure(Matter_Session_Store_add_fabric, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(Fabric), + /* K2 */ be_nested_str_weak(value_error), + /* K3 */ be_nested_str_weak(must_X20be_X20of_X20class_X20matter_X2EFabric), + /* K4 */ be_nested_str_weak(fabrics), + /* K5 */ be_nested_str_weak(find), + /* K6 */ be_nested_str_weak(remove_redundant_fabric), + /* K7 */ be_nested_str_weak(push), + }), + be_str_weak(add_fabric), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x6008000F, // 0000 GETGBL R2 G15 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0xB8120000, // 0002 GETNGBL R4 K0 + 0x88100901, // 0003 GETMBR R4 R4 K1 + 0x7C080400, // 0004 CALL R2 2 + 0x740A0000, // 0005 JMPT R2 #0007 + 0xB0060503, // 0006 RAISE 1 K2 K3 + 0x88080104, // 0007 GETMBR R2 R0 K4 + 0x8C080505, // 0008 GETMET R2 R2 K5 + 0x5C100200, // 0009 MOVE R4 R1 + 0x7C080400, // 000A CALL R2 2 + 0x4C0C0000, // 000B LDNIL R3 + 0x1C080403, // 000C EQ R2 R2 R3 + 0x780A0006, // 000D JMPF R2 #0015 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x5C100200, // 000F MOVE R4 R1 + 0x7C080400, // 0010 CALL R2 2 + 0x88080104, // 0011 GETMBR R2 R0 K4 + 0x8C080507, // 0012 GETMET R2 R2 K7 + 0x5C100200, // 0013 MOVE R4 R1 + 0x7C080400, // 0014 CALL R2 2 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_session_by_local_session_id +********************************************************************/ +be_local_closure(Matter_Session_Store_get_session_by_local_session_id, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(local_session_id), + /* K3 */ be_nested_str_weak(update), + /* K4 */ be_const_int(1), + }), + be_str_weak(get_session_by_local_session_id), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ 0x4C080000, // 0000 LDNIL R2 0x1C080202, // 0001 EQ R2 R1 R2 0x780A0001, // 0002 JMPF R2 #0005 @@ -2404,16 +3437,297 @@ be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name * 0x580C0001, // 0008 LDCONST R3 K1 0x88100100, // 0009 GETMBR R4 R0 K0 0x14140602, // 000A LT R5 R3 R2 - 0x78160007, // 000B JMPF R5 #0014 + 0x78160008, // 000B JMPF R5 #0015 0x94140803, // 000C GETIDX R5 R4 R3 - 0x88140B02, // 000D GETMBR R5 R5 K2 - 0x1C140A01, // 000E EQ R5 R5 R1 - 0x78160001, // 000F JMPF R5 #0012 - 0x94140803, // 0010 GETIDX R5 R4 R3 - 0x80040A00, // 0011 RET 1 R5 - 0x000C0703, // 0012 ADD R3 R3 K3 - 0x7001FFF5, // 0013 JMP #000A - 0x80000000, // 0014 RET 0 + 0x88180B02, // 000D GETMBR R6 R5 K2 + 0x1C180C01, // 000E EQ R6 R6 R1 + 0x781A0002, // 000F JMPF R6 #0013 + 0x8C180B03, // 0010 GETMET R6 R5 K3 + 0x7C180200, // 0011 CALL R6 1 + 0x80040A00, // 0012 RET 1 R5 + 0x000C0704, // 0013 ADD R3 R3 K4 + 0x7001FFF4, // 0014 JMP #000A + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: gen_local_session_id +********************************************************************/ +be_local_closure(Matter_Session_Store_gen_local_session_id, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(random), + /* K2 */ be_const_int(2), + /* K3 */ be_nested_str_weak(get), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(get_session_by_local_session_id), + }), + be_str_weak(gen_local_session_id), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x50080200, // 0001 LDBOOL R2 1 0 + 0x780A000E, // 0002 JMPF R2 #0012 + 0x8C080301, // 0003 GETMET R2 R1 K1 + 0x58100002, // 0004 LDCONST R4 K2 + 0x7C080400, // 0005 CALL R2 2 + 0x8C080503, // 0006 GETMET R2 R2 K3 + 0x58100004, // 0007 LDCONST R4 K4 + 0x58140002, // 0008 LDCONST R5 K2 + 0x7C080600, // 0009 CALL R2 3 + 0x8C0C0105, // 000A GETMET R3 R0 K5 + 0x5C140400, // 000B MOVE R5 R2 + 0x7C0C0400, // 000C CALL R3 2 + 0x4C100000, // 000D LDNIL R4 + 0x1C0C0604, // 000E EQ R3 R3 R4 + 0x780E0000, // 000F JMPF R3 #0011 + 0x80040400, // 0010 RET 1 R2 + 0x7001FFEE, // 0011 JMP #0001 + 0x80000000, // 0012 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Session_Store_init, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(Expirable_list), + /* K3 */ be_nested_str_weak(fabrics), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0xB8060200, // 0000 GETNGBL R1 K1 + 0x8C040302, // 0001 GETMET R1 R1 K2 + 0x7C040200, // 0002 CALL R1 1 + 0x90020001, // 0003 SETMBR R0 K0 R1 + 0xB8060200, // 0004 GETNGBL R1 K1 + 0x8C040302, // 0005 GETMET R1 R1 K2 + 0x7C040200, // 0006 CALL R1 1 + 0x90020601, // 0007 SETMBR R0 K3 R1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: find_session_source_id_unsecure +********************************************************************/ +be_local_closure(Matter_Session_Store_find_session_source_id_unsecure, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(get_session_by_source_node_id), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(Session), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(source_node_id), + /* K5 */ be_nested_str_weak(sessions), + /* K6 */ be_nested_str_weak(push), + /* K7 */ be_nested_str_weak(set_expire_in_seconds), + /* K8 */ be_nested_str_weak(update), + }), + be_str_weak(find_session_source_id_unsecure), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x5C140200, // 0001 MOVE R5 R1 + 0x7C0C0400, // 0002 CALL R3 2 + 0x4C100000, // 0003 LDNIL R4 + 0x1C100604, // 0004 EQ R4 R3 R4 + 0x7812000B, // 0005 JMPF R4 #0012 + 0xB8120200, // 0006 GETNGBL R4 K1 + 0x8C100902, // 0007 GETMET R4 R4 K2 + 0x5C180000, // 0008 MOVE R6 R0 + 0x581C0003, // 0009 LDCONST R7 K3 + 0x58200003, // 000A LDCONST R8 K3 + 0x7C100800, // 000B CALL R4 4 + 0x5C0C0800, // 000C MOVE R3 R4 + 0x900E0801, // 000D SETMBR R3 K4 R1 + 0x88100105, // 000E GETMBR R4 R0 K5 + 0x8C100906, // 000F GETMET R4 R4 K6 + 0x5C180600, // 0010 MOVE R6 R3 + 0x7C100400, // 0011 CALL R4 2 + 0x8C100707, // 0012 GETMET R4 R3 K7 + 0x5C180400, // 0013 MOVE R6 R2 + 0x7C100400, // 0014 CALL R4 2 + 0x8C100708, // 0015 GETMET R4 R3 K8 + 0x7C100200, // 0016 CALL R4 1 + 0x80040600, // 0017 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_session_by_source_node_id +********************************************************************/ +be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(source_node_id), + /* K3 */ be_nested_str_weak(update), + /* K4 */ be_const_int(1), + }), + be_str_weak(get_session_by_source_node_id), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0001, // 0002 JMPF R2 #0005 + 0x4C080000, // 0003 LDNIL R2 + 0x80040400, // 0004 RET 1 R2 + 0x6008000C, // 0005 GETGBL R2 G12 + 0x880C0100, // 0006 GETMBR R3 R0 K0 + 0x7C080200, // 0007 CALL R2 1 + 0x580C0001, // 0008 LDCONST R3 K1 + 0x88100100, // 0009 GETMBR R4 R0 K0 + 0x14140602, // 000A LT R5 R3 R2 + 0x78160008, // 000B JMPF R5 #0015 + 0x94140803, // 000C GETIDX R5 R4 R3 + 0x88180B02, // 000D GETMBR R6 R5 K2 + 0x1C180C01, // 000E EQ R6 R6 R1 + 0x781A0002, // 000F JMPF R6 #0013 + 0x8C180B03, // 0010 GETMET R6 R5 K3 + 0x7C180200, // 0011 CALL R6 1 + 0x80040A00, // 0012 RET 1 R5 + 0x000C0704, // 0013 ADD R3 R3 K4 + 0x7001FFF4, // 0014 JMP #000A + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: find_session_by_resumption_id +********************************************************************/ +be_local_closure(Matter_Session_Store_find_session_by_resumption_id, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(resumption_id), + /* K3 */ be_nested_str_weak(shared_secret), + /* K4 */ be_nested_str_weak(update), + /* K5 */ be_const_int(1), + }), + be_str_weak(find_session_by_resumption_id), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x5C080200, // 0000 MOVE R2 R1 + 0x740A0001, // 0001 JMPT R2 #0004 + 0x4C080000, // 0002 LDNIL R2 + 0x80040400, // 0003 RET 1 R2 + 0x58080000, // 0004 LDCONST R2 K0 + 0x880C0101, // 0005 GETMBR R3 R0 K1 + 0x6010000C, // 0006 GETGBL R4 G12 + 0x5C140600, // 0007 MOVE R5 R3 + 0x7C100200, // 0008 CALL R4 1 + 0x14100404, // 0009 LT R4 R2 R4 + 0x7812000C, // 000A JMPF R4 #0018 + 0x94100602, // 000B GETIDX R4 R3 R2 + 0x88140902, // 000C GETMBR R5 R4 K2 + 0x1C140A01, // 000D EQ R5 R5 R1 + 0x78160006, // 000E JMPF R5 #0016 + 0x88140903, // 000F GETMBR R5 R4 K3 + 0x4C180000, // 0010 LDNIL R6 + 0x20140A06, // 0011 NE R5 R5 R6 + 0x78160002, // 0012 JMPF R5 #0016 + 0x8C140904, // 0013 GETMET R5 R4 K4 + 0x7C140200, // 0014 CALL R5 1 + 0x80040800, // 0015 RET 1 R4 + 0x00080505, // 0016 ADD R2 R2 K5 + 0x7001FFED, // 0017 JMP #0006 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: create_fabric +********************************************************************/ +be_local_closure(Matter_Session_Store_create_fabric, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(Fabric), + }), + be_str_weak(create_fabric), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 }) ) ); @@ -2424,27 +3738,30 @@ be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name * ** Solidified class: Matter_Session_Store ********************************************************************/ be_local_class(Matter_Session_Store, - 1, + 2, NULL, - be_nested_map(17, + be_nested_map(20, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(remove_expired, 6), be_const_closure(Matter_Session_Store_remove_expired_closure) }, - { be_const_key_weak(remove_redundant_session, -1), be_const_closure(Matter_Session_Store_remove_redundant_session_closure) }, - { be_const_key_weak(add_session, -1), be_const_closure(Matter_Session_Store_add_session_closure) }, - { be_const_key_weak(sessions, 12), be_const_var(0) }, - { be_const_key_weak(sessions_active, -1), be_const_closure(Matter_Session_Store_sessions_active_closure) }, - { be_const_key_weak(every_second, 9), be_const_closure(Matter_Session_Store_every_second_closure) }, - { be_const_key_weak(find_session_by_resumption_id, -1), be_const_closure(Matter_Session_Store_find_session_by_resumption_id_closure) }, - { be_const_key_weak(load, -1), be_const_closure(Matter_Session_Store_load_closure) }, - { be_const_key_weak(gen_local_session_id, -1), be_const_closure(Matter_Session_Store_gen_local_session_id_closure) }, - { be_const_key_weak(get_session_by_local_session_id, -1), be_const_closure(Matter_Session_Store_get_session_by_local_session_id_closure) }, - { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_sessions_X2Ejson) }, - { be_const_key_weak(save, 10), be_const_closure(Matter_Session_Store_save_closure) }, - { be_const_key_weak(find_session_source_id_unsecure, -1), be_const_closure(Matter_Session_Store_find_session_source_id_unsecure_closure) }, + { be_const_key_weak(fabrics, -1), be_const_var(1) }, + { be_const_key_weak(remove_redundant_fabric, -1), be_const_closure(Matter_Session_Store_remove_redundant_fabric_closure) }, + { be_const_key_weak(create_session, 14), be_const_closure(Matter_Session_Store_create_session_closure) }, + { be_const_key_weak(remove_expired, -1), be_const_closure(Matter_Session_Store_remove_expired_closure) }, + { be_const_key_weak(load_fabrics, -1), be_const_closure(Matter_Session_Store_load_fabrics_closure) }, + { be_const_key_weak(save_fabrics, 9), be_const_closure(Matter_Session_Store_save_fabrics_closure) }, { be_const_key_weak(remove_session, -1), be_const_closure(Matter_Session_Store_remove_session_closure) }, - { be_const_key_weak(create_session, -1), be_const_closure(Matter_Session_Store_create_session_closure) }, - { be_const_key_weak(init, 7), be_const_closure(Matter_Session_Store_init_closure) }, + { be_const_key_weak(add_session, 10), be_const_closure(Matter_Session_Store_add_session_closure) }, + { be_const_key_weak(sessions, -1), be_const_var(0) }, + { be_const_key_weak(every_second, 0), be_const_closure(Matter_Session_Store_every_second_closure) }, { be_const_key_weak(get_session_by_source_node_id, -1), be_const_closure(Matter_Session_Store_get_session_by_source_node_id_closure) }, + { be_const_key_weak(sessions_active, -1), be_const_closure(Matter_Session_Store_sessions_active_closure) }, + { be_const_key_weak(find_session_source_id_unsecure, 17), be_const_closure(Matter_Session_Store_find_session_source_id_unsecure_closure) }, + { be_const_key_weak(get_session_by_local_session_id, -1), be_const_closure(Matter_Session_Store_get_session_by_local_session_id_closure) }, + { be_const_key_weak(gen_local_session_id, -1), be_const_closure(Matter_Session_Store_gen_local_session_id_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Session_Store_init_closure) }, + { be_const_key_weak(_FABRICS, 12), be_nested_str_weak(_matter_fabrics_X2Ejson) }, + { be_const_key_weak(add_fabric, -1), be_const_closure(Matter_Session_Store_add_fabric_closure) }, + { be_const_key_weak(find_session_by_resumption_id, -1), be_const_closure(Matter_Session_Store_find_session_by_resumption_id_closure) }, + { be_const_key_weak(create_fabric, -1), be_const_closure(Matter_Session_Store_create_fabric_closure) }, })), be_str_weak(Matter_Session_Store) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h index 9bf85ea64..66a6c3e61 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h @@ -332,7 +332,7 @@ be_local_closure(Matter_UDPServer_init, /* name */ 0x90020403, // 0009 SETMBR R0 K2 R3 0x500C0000, // 000A LDBOOL R3 0 0 0x90020603, // 000B SETMBR R0 K3 R3 - 0x600C0013, // 000C GETGBL R3 G19 + 0x600C0012, // 000C GETGBL R3 G18 0x7C0C0000, // 000D CALL R3 0 0x90020803, // 000E SETMBR R0 K4 R3 0x80000000, // 000F RET 0 @@ -356,91 +356,93 @@ be_local_closure(Matter_UDPServer_resend_packets, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[23]) { /* constants */ - /* K0 */ be_nested_str_weak(packets_sent), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(time_reached), - /* K3 */ be_nested_str_weak(next_try), - /* K4 */ be_nested_str_weak(retries), - /* K5 */ be_nested_str_weak(RETRIES), - /* K6 */ be_nested_str_weak(log), - /* K7 */ be_nested_str_weak(MTR_X3A_X20resending_X20packet_X20id_X3D), - /* K8 */ be_nested_str_weak(msg_id), - /* K9 */ be_const_int(3), - /* K10 */ be_nested_str_weak(send), - /* K11 */ be_nested_str_weak(udp_socket), - /* K12 */ be_nested_str_weak(millis), - /* K13 */ be_nested_str_weak(backoff_time), - /* K14 */ be_const_int(1), - /* K15 */ be_nested_str_weak(string), - /* K16 */ be_nested_str_weak(remove), - /* K17 */ be_nested_str_weak(format), - /* K18 */ be_nested_str_weak(MTR_X3A_X20target_X20unreachable_X20_X27_X5B_X25s_X5D_X3A_X25i_X27_X20msg_id_X3D_X25i), - /* K19 */ be_nested_str_weak(addr), - /* K20 */ be_nested_str_weak(port), - /* K21 */ be_const_int(2), - /* K22 */ be_nested_str_weak(stop_iteration), + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(packets_sent), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(time_reached), + /* K4 */ be_nested_str_weak(next_try), + /* K5 */ be_nested_str_weak(retries), + /* K6 */ be_nested_str_weak(RETRIES), + /* K7 */ be_nested_str_weak(log), + /* K8 */ be_nested_str_weak(MTR_X3A_X20resending_X20packet_X20id_X3D), + /* K9 */ be_nested_str_weak(msg_id), + /* K10 */ be_const_int(3), + /* K11 */ be_nested_str_weak(send), + /* K12 */ be_nested_str_weak(udp_socket), + /* K13 */ be_nested_str_weak(millis), + /* K14 */ be_nested_str_weak(backoff_time), + /* K15 */ be_const_int(1), + /* K16 */ be_nested_str_weak(string), + /* K17 */ be_nested_str_weak(remove), + /* K18 */ be_nested_str_weak(format), + /* K19 */ be_nested_str_weak(MTR_X3A_X20target_X20unreachable_X20_X27_X5B_X25s_X5D_X3A_X25i_X27_X20msg_id_X3D_X25i), + /* K20 */ be_nested_str_weak(addr), + /* K21 */ be_nested_str_weak(port), + /* K22 */ be_const_int(2), }), be_str_weak(resend_packets), &be_const_str_solidified, - ( &(const binstruction[58]) { /* code */ - 0x60040010, // 0000 GETGBL R1 G16 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x7C040200, // 0002 CALL R1 1 - 0xA8020031, // 0003 EXBLK 0 #0036 - 0x5C080200, // 0004 MOVE R2 R1 - 0x7C080000, // 0005 CALL R2 0 - 0xB80E0200, // 0006 GETNGBL R3 K1 - 0x8C0C0702, // 0007 GETMET R3 R3 K2 - 0x88140503, // 0008 GETMBR R5 R2 K3 - 0x7C0C0400, // 0009 CALL R3 2 - 0x780E0029, // 000A JMPF R3 #0035 - 0x880C0504, // 000B GETMBR R3 R2 K4 - 0x88100105, // 000C GETMBR R4 R0 K5 - 0x180C0604, // 000D LE R3 R3 R4 - 0x780E0016, // 000E JMPF R3 #0026 - 0xB80E0200, // 000F GETNGBL R3 K1 - 0x8C0C0706, // 0010 GETMET R3 R3 K6 - 0x60140008, // 0011 GETGBL R5 G8 - 0x88180508, // 0012 GETMBR R6 R2 K8 - 0x7C140200, // 0013 CALL R5 1 - 0x00160E05, // 0014 ADD R5 K7 R5 - 0x58180009, // 0015 LDCONST R6 K9 - 0x7C0C0600, // 0016 CALL R3 3 - 0x8C0C050A, // 0017 GETMET R3 R2 K10 - 0x8814010B, // 0018 GETMBR R5 R0 K11 - 0x7C0C0400, // 0019 CALL R3 2 - 0xB80E0200, // 001A GETNGBL R3 K1 - 0x8C0C070C, // 001B GETMET R3 R3 K12 - 0x7C0C0200, // 001C CALL R3 1 - 0x8C10050D, // 001D GETMET R4 R2 K13 - 0x88180504, // 001E GETMBR R6 R2 K4 - 0x7C100400, // 001F CALL R4 2 - 0x000C0604, // 0020 ADD R3 R3 R4 - 0x900A0603, // 0021 SETMBR R2 K3 R3 - 0x880C0504, // 0022 GETMBR R3 R2 K4 - 0x000C070E, // 0023 ADD R3 R3 K14 - 0x900A0803, // 0024 SETMBR R2 K4 R3 - 0x7002000E, // 0025 JMP #0035 - 0xA40E1E00, // 0026 IMPORT R3 K15 - 0x88100100, // 0027 GETMBR R4 R0 K0 - 0x8C100910, // 0028 GETMET R4 R4 K16 - 0x88180508, // 0029 GETMBR R6 R2 K8 - 0x7C100400, // 002A CALL R4 2 - 0xB8120200, // 002B GETNGBL R4 K1 - 0x8C100906, // 002C GETMET R4 R4 K6 - 0x8C180711, // 002D GETMET R6 R3 K17 - 0x58200012, // 002E LDCONST R8 K18 - 0x88240513, // 002F GETMBR R9 R2 K19 - 0x88280514, // 0030 GETMBR R10 R2 K20 - 0x882C0508, // 0031 GETMBR R11 R2 K8 - 0x7C180A00, // 0032 CALL R6 5 - 0x581C0015, // 0033 LDCONST R7 K21 - 0x7C100600, // 0034 CALL R4 3 - 0x7001FFCD, // 0035 JMP #0004 - 0x58040016, // 0036 LDCONST R1 K22 - 0xAC040200, // 0037 CATCH R1 1 0 - 0xB0080000, // 0038 RAISE 2 R0 R0 - 0x80000000, // 0039 RET 0 + ( &(const binstruction[60]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x6008000C, // 0001 GETGBL R2 G12 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x14080202, // 0004 LT R2 R1 R2 + 0x780A0034, // 0005 JMPF R2 #003B + 0x88080101, // 0006 GETMBR R2 R0 K1 + 0x94080401, // 0007 GETIDX R2 R2 R1 + 0xB80E0400, // 0008 GETNGBL R3 K2 + 0x8C0C0703, // 0009 GETMET R3 R3 K3 + 0x88140504, // 000A GETMBR R5 R2 K4 + 0x7C0C0400, // 000B CALL R3 2 + 0x780E002B, // 000C JMPF R3 #0039 + 0x880C0505, // 000D GETMBR R3 R2 K5 + 0x88100106, // 000E GETMBR R4 R0 K6 + 0x180C0604, // 000F LE R3 R3 R4 + 0x780E0017, // 0010 JMPF R3 #0029 + 0xB80E0400, // 0011 GETNGBL R3 K2 + 0x8C0C0707, // 0012 GETMET R3 R3 K7 + 0x60140008, // 0013 GETGBL R5 G8 + 0x88180509, // 0014 GETMBR R6 R2 K9 + 0x7C140200, // 0015 CALL R5 1 + 0x00161005, // 0016 ADD R5 K8 R5 + 0x5818000A, // 0017 LDCONST R6 K10 + 0x7C0C0600, // 0018 CALL R3 3 + 0x8C0C050B, // 0019 GETMET R3 R2 K11 + 0x8814010C, // 001A GETMBR R5 R0 K12 + 0x7C0C0400, // 001B CALL R3 2 + 0xB80E0400, // 001C GETNGBL R3 K2 + 0x8C0C070D, // 001D GETMET R3 R3 K13 + 0x7C0C0200, // 001E CALL R3 1 + 0x8C10050E, // 001F GETMET R4 R2 K14 + 0x88180505, // 0020 GETMBR R6 R2 K5 + 0x7C100400, // 0021 CALL R4 2 + 0x000C0604, // 0022 ADD R3 R3 R4 + 0x900A0803, // 0023 SETMBR R2 K4 R3 + 0x880C0505, // 0024 GETMBR R3 R2 K5 + 0x000C070F, // 0025 ADD R3 R3 K15 + 0x900A0A03, // 0026 SETMBR R2 K5 R3 + 0x0004030F, // 0027 ADD R1 R1 K15 + 0x7002000E, // 0028 JMP #0038 + 0xA40E2000, // 0029 IMPORT R3 K16 + 0x88100101, // 002A GETMBR R4 R0 K1 + 0x8C100911, // 002B GETMET R4 R4 K17 + 0x5C180200, // 002C MOVE R6 R1 + 0x7C100400, // 002D CALL R4 2 + 0xB8120400, // 002E GETNGBL R4 K2 + 0x8C100907, // 002F GETMET R4 R4 K7 + 0x8C180712, // 0030 GETMET R6 R3 K18 + 0x58200013, // 0031 LDCONST R8 K19 + 0x88240514, // 0032 GETMBR R9 R2 K20 + 0x88280515, // 0033 GETMBR R10 R2 K21 + 0x882C0509, // 0034 GETMBR R11 R2 K9 + 0x7C180A00, // 0035 CALL R6 5 + 0x581C0016, // 0036 LDCONST R7 K22 + 0x7C100600, // 0037 CALL R4 3 + 0x70020000, // 0038 JMP #003A + 0x0004030F, // 0039 ADD R1 R1 K15 + 0x7001FFC5, // 003A JMP #0001 + 0x80000000, // 003B RET 0 }) ) ); @@ -452,7 +454,7 @@ be_local_closure(Matter_UDPServer_resend_packets, /* name */ ********************************************************************/ be_local_closure(Matter_UDPServer_packet_ack, /* name */ be_nested_proto( - 6, /* nstack */ + 7, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -460,39 +462,50 @@ be_local_closure(Matter_UDPServer_packet_ack, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(packets_sent), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(remove), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(log), - /* K5 */ be_nested_str_weak(MTR_X3A_X20removed_X20packet_X20from_X20sending_X20list_X20id_X3D), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(packets_sent), + /* K2 */ be_nested_str_weak(msg_id), + /* K3 */ be_nested_str_weak(remove), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(log), + /* K6 */ be_nested_str_weak(MTR_X3A_X20removed_X20packet_X20from_X20sending_X20list_X20id_X3D), + /* K7 */ be_const_int(1), }), be_str_weak(packet_ack), &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ + ( &(const binstruction[31]) { /* code */ 0x4C080000, // 0000 LDNIL R2 0x1C080202, // 0001 EQ R2 R1 R2 0x780A0000, // 0002 JMPF R2 #0004 0x80000400, // 0003 RET 0 - 0x88080100, // 0004 GETMBR R2 R0 K0 - 0x8C080501, // 0005 GETMET R2 R2 K1 - 0x5C100200, // 0006 MOVE R4 R1 - 0x7C080400, // 0007 CALL R2 2 - 0x780A000B, // 0008 JMPF R2 #0015 - 0x88080100, // 0009 GETMBR R2 R0 K0 - 0x8C080502, // 000A GETMET R2 R2 K2 - 0x5C100200, // 000B MOVE R4 R1 - 0x7C080400, // 000C CALL R2 2 - 0xB80A0600, // 000D GETNGBL R2 K3 - 0x8C080504, // 000E GETMET R2 R2 K4 - 0x60100008, // 000F GETGBL R4 G8 - 0x5C140200, // 0010 MOVE R5 R1 - 0x7C100200, // 0011 CALL R4 1 - 0x00120A04, // 0012 ADD R4 K5 R4 - 0x54160003, // 0013 LDINT R5 4 - 0x7C080600, // 0014 CALL R2 3 - 0x80000000, // 0015 RET 0 + 0x58080000, // 0004 LDCONST R2 K0 + 0x600C000C, // 0005 GETGBL R3 G12 + 0x88100101, // 0006 GETMBR R4 R0 K1 + 0x7C0C0200, // 0007 CALL R3 1 + 0x140C0403, // 0008 LT R3 R2 R3 + 0x780E0013, // 0009 JMPF R3 #001E + 0x880C0101, // 000A GETMBR R3 R0 K1 + 0x940C0602, // 000B GETIDX R3 R3 R2 + 0x880C0702, // 000C GETMBR R3 R3 K2 + 0x1C0C0601, // 000D EQ R3 R3 R1 + 0x780E000C, // 000E JMPF R3 #001C + 0x880C0101, // 000F GETMBR R3 R0 K1 + 0x8C0C0703, // 0010 GETMET R3 R3 K3 + 0x5C140400, // 0011 MOVE R5 R2 + 0x7C0C0400, // 0012 CALL R3 2 + 0xB80E0800, // 0013 GETNGBL R3 K4 + 0x8C0C0705, // 0014 GETMET R3 R3 K5 + 0x60140008, // 0015 GETGBL R5 G8 + 0x5C180200, // 0016 MOVE R6 R1 + 0x7C140200, // 0017 CALL R5 1 + 0x00160C05, // 0018 ADD R5 K6 R5 + 0x541A0003, // 0019 LDINT R6 4 + 0x7C0C0600, // 001A CALL R3 3 + 0x70020000, // 001B JMP #001D + 0x00080507, // 001C ADD R2 R2 K7 + 0x7001FFE6, // 001D JMP #0005 + 0x80000000, // 001E RET 0 }) ) ); @@ -662,16 +675,17 @@ be_local_closure(Matter_UDPServer_send_response, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ + ( &(const bvalue[ 6]) { /* constants */ /* K0 */ be_nested_str_weak(matter), /* K1 */ be_nested_str_weak(UDPPacket_sent), /* K2 */ be_nested_str_weak(send), /* K3 */ be_nested_str_weak(udp_socket), /* K4 */ be_nested_str_weak(packets_sent), + /* K5 */ be_nested_str_weak(push), }), be_str_weak(send_response), &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ + ( &(const binstruction[16]) { /* code */ 0xB8160000, // 0000 GETNGBL R5 K0 0x8C140B01, // 0001 GETMET R5 R5 K1 0x5C1C0200, // 0002 MOVE R7 R1 @@ -682,10 +696,12 @@ be_local_closure(Matter_UDPServer_send_response, /* name */ 0x8C180B02, // 0007 GETMET R6 R5 K2 0x88200103, // 0008 GETMBR R8 R0 K3 0x7C180400, // 0009 CALL R6 2 - 0x78120001, // 000A JMPF R4 #000D + 0x78120003, // 000A JMPF R4 #000F 0x88180104, // 000B GETMBR R6 R0 K4 - 0x98180805, // 000C SETIDX R6 R4 R5 - 0x80000000, // 000D RET 0 + 0x8C180D05, // 000C GETMET R6 R6 K5 + 0x5C200A00, // 000D MOVE R8 R5 + 0x7C180400, // 000E CALL R6 2 + 0x80000000, // 000F RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h index 23c1bce7c..9ebdf332e 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -7,12 +7,12 @@ extern const bclass be_class_Matter_UI; /******************************************************************** -** Solidified function: show_commissioning_info +** Solidified function: show_fabric_info ********************************************************************/ -be_local_closure(Matter_UI_show_commissioning_info, /* name */ +be_local_closure(Matter_UI_show_fabric_info, /* name */ be_nested_proto( - 12, /* nstack */ - 1, /* argc */ + 16, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -23,116 +23,398 @@ be_local_closure(Matter_UI_show_commissioning_info, /* name */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20Passcode_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K4 */ be_nested_str_weak(device), - /* K5 */ be_nested_str_weak(compute_manual_pairing_code), - /* K6 */ be_nested_str_weak(format), - /* K7 */ be_nested_str_weak(_X3Cp_X3EManual_X20pairing_X20code_X3A_X3Cbr_X3E_X3Cb_X3E_X25s_X2D_X25s_X2D_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E_X3Chr_X3E), - /* K8 */ be_const_int(0), - /* K9 */ be_const_int(3), - /* K10 */ be_const_int(2147483647), - /* K11 */ be_nested_str_weak(compute_qrcode_content), - /* K12 */ be_nested_str_weak(_X3Cdiv_X20id_X3D_X22qrcode_X22_X3E_X3C_X2Fdiv_X3E), - /* K13 */ be_nested_str_weak(_X3Cscript_X20type_X3D_X22text_X2Fjavascript_X22_X3E_X20new_X20QRCode_X28document_X2EgetElementById_X28_X22qrcode_X22_X29_X2C_X20_X22_X25s_X22_X29_X3B_X3C_X2Fscript_X3E), - /* K14 */ be_nested_str_weak(_X3Cp_X3E_X25s_X3C_X2Fp_X3E_X3Chr_X3E), - /* K15 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20_X3E), - /* K16 */ be_nested_str_weak(_X3Cp_X3EPasscode_X3A_X3C_X2Fp_X3E), - /* K17 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X271_X27_X20max_X3D_X2799999998_X27_X20name_X3D_X27passcode_X27_X20value_X3D_X27_X25i_X27_X3E), - /* K18 */ be_nested_str_weak(passcode), - /* K19 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E), - /* K20 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X272047_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E), - /* K21 */ be_nested_str_weak(discriminator), - /* K22 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E), - /* K23 */ be_nested_str_weak(ipv4only), - /* K24 */ be_nested_str_weak(_X20checked), - /* K25 */ be_nested_str_weak(), - /* K26 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), - /* K27 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BFabrics_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K4 */ be_nested_str_weak(_X3Cp_X3EExisting_X20fabrics_X3A_X3C_X2Fp_X3E), + /* K5 */ be_nested_str_weak(device), + /* K6 */ be_nested_str_weak(sessions), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(_X3Cp_X3E_X3Cb_X3ENone_X3C_X2Fb_X3E_X3C_X2Fp_X3E), + /* K9 */ be_nested_str_weak(fabrics), + /* K10 */ be_nested_str_weak(persistables), + /* K11 */ be_nested_str_weak(_X3Chr_X3E), + /* K12 */ be_nested_str_weak(format), + /* K13 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3B_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K14 */ be_nested_str_weak(_X26lt_X3BNo_X20label_X26gt_X3B), + /* K15 */ be_nested_str_weak(get_fabric_id), + /* K16 */ be_nested_str_weak(copy), + /* K17 */ be_nested_str_weak(reverse), + /* K18 */ be_nested_str_weak(get_device_id), + /* K19 */ be_nested_str_weak(Fabric_X3A_X20_X25s_X3Cbr_X3E), + /* K20 */ be_nested_str_weak(tohex), + /* K21 */ be_nested_str_weak(Device_X3A_X20_X25s_X3Cbr_X3E_X26nbsp_X3B), + /* K22 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20), + /* K23 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E), + /* K24 */ be_nested_str_weak(_X3Cinput_X20name_X3D_X27del_fabric_X27_X20type_X3D_X27hidden_X27_X20value_X3D_X27_X25s_X27_X3E), + /* K25 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27del_X27_X20class_X3D_X27button_X20bgrn_X27_X3EDelete_X20Fabric_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), + /* K26 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K27 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(show_commissioning_info), + be_str_weak(show_fabric_info), &be_const_str_solidified, - ( &(const binstruction[81]) { /* code */ + ( &(const binstruction[95]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0x8C100502, // 0002 GETMET R4 R2 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C100400, // 0004 CALL R4 2 + 0x8C100502, // 0005 GETMET R4 R2 K2 + 0x58180004, // 0006 LDCONST R6 K4 + 0x7C100400, // 0007 CALL R4 2 + 0x6010000C, // 0008 GETGBL R4 G12 + 0x88140105, // 0009 GETMBR R5 R0 K5 + 0x88140B06, // 000A GETMBR R5 R5 K6 + 0x88140B06, // 000B GETMBR R5 R5 K6 + 0x7C100200, // 000C CALL R4 1 + 0x1C100907, // 000D EQ R4 R4 K7 + 0x78120003, // 000E JMPF R4 #0013 + 0x8C100502, // 000F GETMET R4 R2 K2 + 0x58180008, // 0010 LDCONST R6 K8 + 0x7C100400, // 0011 CALL R4 2 + 0x70020047, // 0012 JMP #005B + 0x50100200, // 0013 LDBOOL R4 1 0 + 0x60140010, // 0014 GETGBL R5 G16 + 0x88180105, // 0015 GETMBR R6 R0 K5 + 0x88180D06, // 0016 GETMBR R6 R6 K6 + 0x88180D09, // 0017 GETMBR R6 R6 K9 + 0x8C180D0A, // 0018 GETMET R6 R6 K10 + 0x7C180200, // 0019 CALL R6 1 + 0x7C140200, // 001A CALL R5 1 + 0xA802003B, // 001B EXBLK 0 #0058 + 0x5C180A00, // 001C MOVE R6 R5 + 0x7C180000, // 001D CALL R6 0 + 0x5C1C0800, // 001E MOVE R7 R4 + 0x741E0002, // 001F JMPT R7 #0023 + 0x8C1C0502, // 0020 GETMET R7 R2 K2 + 0x5824000B, // 0021 LDCONST R9 K11 + 0x7C1C0400, // 0022 CALL R7 2 + 0x50100000, // 0023 LDBOOL R4 0 0 + 0x8C1C0502, // 0024 GETMET R7 R2 K2 + 0x8C24070C, // 0025 GETMET R9 R3 K12 + 0x582C000D, // 0026 LDCONST R11 K13 + 0x5830000E, // 0027 LDCONST R12 K14 + 0x7C240600, // 0028 CALL R9 3 + 0x7C1C0400, // 0029 CALL R7 2 + 0x8C1C0D0F, // 002A GETMET R7 R6 K15 + 0x7C1C0200, // 002B CALL R7 1 + 0x8C1C0F10, // 002C GETMET R7 R7 K16 + 0x7C1C0200, // 002D CALL R7 1 + 0x8C1C0F11, // 002E GETMET R7 R7 K17 + 0x7C1C0200, // 002F CALL R7 1 + 0x8C200D12, // 0030 GETMET R8 R6 K18 + 0x7C200200, // 0031 CALL R8 1 + 0x8C201110, // 0032 GETMET R8 R8 K16 + 0x7C200200, // 0033 CALL R8 1 + 0x8C201111, // 0034 GETMET R8 R8 K17 + 0x7C200200, // 0035 CALL R8 1 + 0x8C240502, // 0036 GETMET R9 R2 K2 + 0x8C2C070C, // 0037 GETMET R11 R3 K12 + 0x58340013, // 0038 LDCONST R13 K19 + 0x8C380F14, // 0039 GETMET R14 R7 K20 + 0x7C380200, // 003A CALL R14 1 + 0x7C2C0600, // 003B CALL R11 3 + 0x7C240400, // 003C CALL R9 2 + 0x8C240502, // 003D GETMET R9 R2 K2 + 0x8C2C070C, // 003E GETMET R11 R3 K12 + 0x58340015, // 003F LDCONST R13 K21 + 0x8C381114, // 0040 GETMET R14 R8 K20 + 0x7C380200, // 0041 CALL R14 1 + 0x7C2C0600, // 0042 CALL R11 3 + 0x7C240400, // 0043 CALL R9 2 + 0x8C240502, // 0044 GETMET R9 R2 K2 + 0x582C0016, // 0045 LDCONST R11 K22 + 0x7C240400, // 0046 CALL R9 2 + 0x8C240502, // 0047 GETMET R9 R2 K2 + 0x582C0017, // 0048 LDCONST R11 K23 + 0x7C240400, // 0049 CALL R9 2 + 0x8C240502, // 004A GETMET R9 R2 K2 + 0x8C2C070C, // 004B GETMET R11 R3 K12 + 0x58340018, // 004C LDCONST R13 K24 + 0x8C380F14, // 004D GETMET R14 R7 K20 + 0x7C380200, // 004E CALL R14 1 + 0x7C2C0600, // 004F CALL R11 3 + 0x7C240400, // 0050 CALL R9 2 + 0x8C240502, // 0051 GETMET R9 R2 K2 + 0x582C0019, // 0052 LDCONST R11 K25 + 0x7C240400, // 0053 CALL R9 2 + 0x8C240502, // 0054 GETMET R9 R2 K2 + 0x582C001A, // 0055 LDCONST R11 K26 + 0x7C240400, // 0056 CALL R9 2 + 0x7001FFC3, // 0057 JMP #001C + 0x5814001B, // 0058 LDCONST R5 K27 + 0xAC140200, // 0059 CATCH R5 1 0 + 0xB0080000, // 005A RAISE 2 R0 R0 + 0x8C100502, // 005B GETMET R4 R2 K2 + 0x5818001A, // 005C LDCONST R6 K26 + 0x7C100400, // 005D CALL R4 2 + 0x80000000, // 005E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_sensor +********************************************************************/ +be_local_closure(Matter_UI_web_sensor, /* name */ + be_nested_proto( + 11, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[17]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(get_option), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(MATTER_OPTION), + /* K6 */ be_nested_str_weak(device), + /* K7 */ be_nested_str_weak(commissioning_open), + /* K8 */ be_nested_str_weak(show_commissioning_info), + /* K9 */ be_nested_str_weak(content_send), + /* K10 */ be_nested_str_weak(format), + /* K11 */ be_nested_str_weak(_X3Cbutton_X20onclick_X3D_X27la_X28_X22_X26mtc_X25i_X3D1_X22_X29_X3B_X27_X3E), + /* K12 */ be_const_int(1), + /* K13 */ be_const_int(0), + /* K14 */ be_nested_str_weak(_LOGO), + /* K15 */ be_nested_str_weak(_X20Open_X20Commissioning_X3C_X2Fbutton_X3E), + /* K16 */ be_nested_str_weak(_X20Close_X20Commissioning_X3C_X2Fbutton_X3E), + }), + be_str_weak(web_sensor), + &be_const_str_solidified, + ( &(const binstruction[43]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0xB80E0400, // 0002 GETNGBL R3 K2 + 0x8C0C0703, // 0003 GETMET R3 R3 K3 + 0xB8160800, // 0004 GETNGBL R5 K4 + 0x88140B05, // 0005 GETMBR R5 R5 K5 + 0x7C0C0400, // 0006 CALL R3 2 + 0x780E0021, // 0007 JMPF R3 #002A + 0x88100106, // 0008 GETMBR R4 R0 K6 + 0x88100907, // 0009 GETMBR R4 R4 K7 + 0x78120001, // 000A JMPF R4 #000D + 0x8C100108, // 000B GETMET R4 R0 K8 + 0x7C100200, // 000C CALL R4 1 + 0x8C100309, // 000D GETMET R4 R1 K9 + 0x8C18050A, // 000E GETMET R6 R2 K10 + 0x5820000B, // 000F LDCONST R8 K11 + 0x88240106, // 0010 GETMBR R9 R0 K6 + 0x88241307, // 0011 GETMBR R9 R9 K7 + 0x4C280000, // 0012 LDNIL R10 + 0x1C24120A, // 0013 EQ R9 R9 R10 + 0x78260001, // 0014 JMPF R9 #0017 + 0x5824000C, // 0015 LDCONST R9 K12 + 0x70020000, // 0016 JMP #0018 + 0x5824000D, // 0017 LDCONST R9 K13 + 0x7C180600, // 0018 CALL R6 3 + 0x7C100400, // 0019 CALL R4 2 + 0x8C100309, // 001A GETMET R4 R1 K9 + 0xB81A0800, // 001B GETNGBL R6 K4 + 0x88180D0E, // 001C GETMBR R6 R6 K14 + 0x7C100400, // 001D CALL R4 2 + 0x88100106, // 001E GETMBR R4 R0 K6 + 0x88100907, // 001F GETMBR R4 R4 K7 + 0x4C140000, // 0020 LDNIL R5 + 0x1C100805, // 0021 EQ R4 R4 R5 + 0x78120003, // 0022 JMPF R4 #0027 + 0x8C100309, // 0023 GETMET R4 R1 K9 + 0x5818000F, // 0024 LDCONST R6 K15 + 0x7C100400, // 0025 CALL R4 2 + 0x70020002, // 0026 JMP #002A + 0x8C100309, // 0027 GETMET R4 R1 K9 + 0x58180010, // 0028 LDCONST R6 K16 + 0x7C100400, // 0029 CALL R4 2 + 0x80000000, // 002A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_get_arg +********************************************************************/ +be_local_closure(Matter_UI_web_get_arg, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(has_arg), + /* K2 */ be_nested_str_weak(mtc0), + /* K3 */ be_nested_str_weak(device), + /* K4 */ be_nested_str_weak(stop_basic_commissioning), + /* K5 */ be_nested_str_weak(mtc1), + /* K6 */ be_nested_str_weak(start_basic_commissioning), + }), + be_str_weak(web_get_arg), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x7C080400, // 0003 CALL R2 2 + 0x780A0003, // 0004 JMPF R2 #0009 + 0x88080103, // 0005 GETMBR R2 R0 K3 + 0x8C080504, // 0006 GETMET R2 R2 K4 + 0x7C080200, // 0007 CALL R2 1 + 0x70020006, // 0008 JMP #0010 + 0x8C080301, // 0009 GETMET R2 R1 K1 + 0x58100005, // 000A LDCONST R4 K5 + 0x7C080400, // 000B CALL R2 2 + 0x780A0002, // 000C JMPF R2 #0010 + 0x88080103, // 000D GETMBR R2 R0 K3 + 0x8C080506, // 000E GETMET R2 R2 K6 + 0x7C080200, // 000F CALL R2 1 + 0x80000000, // 0010 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: page_part_mgr +********************************************************************/ +be_local_closure(Matter_UI_page_part_mgr, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(check_privileged_access), + /* K3 */ be_nested_str_weak(content_start), + /* K4 */ be_nested_str_weak(Matter), + /* K5 */ be_nested_str_weak(content_send_style), + /* K6 */ be_nested_str_weak(show_enable), + /* K7 */ be_nested_str_weak(show_passcode_form), + /* K8 */ be_nested_str_weak(show_fabric_info), + /* K9 */ be_nested_str_weak(content_button), + /* K10 */ be_nested_str_weak(BUTTON_CONFIGURATION), + /* K11 */ be_nested_str_weak(content_stop), + }), + be_str_weak(page_part_mgr), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 0x8C0C0302, // 0002 GETMET R3 R1 K2 - 0x58140003, // 0003 LDCONST R5 K3 - 0x7C0C0400, // 0004 CALL R3 2 - 0x880C0104, // 0005 GETMBR R3 R0 K4 - 0x8C0C0705, // 0006 GETMET R3 R3 K5 - 0x7C0C0200, // 0007 CALL R3 1 - 0x8C100302, // 0008 GETMET R4 R1 K2 - 0x8C180506, // 0009 GETMET R6 R2 K6 - 0x58200007, // 000A LDCONST R8 K7 - 0x40261109, // 000B CONNECT R9 K8 K9 - 0x94240609, // 000C GETIDX R9 R3 R9 - 0x542A0003, // 000D LDINT R10 4 - 0x542E0005, // 000E LDINT R11 6 - 0x4028140B, // 000F CONNECT R10 R10 R11 - 0x9428060A, // 0010 GETIDX R10 R3 R10 - 0x542E0006, // 0011 LDINT R11 7 - 0x402C170A, // 0012 CONNECT R11 R11 K10 - 0x942C060B, // 0013 GETIDX R11 R3 R11 - 0x7C180A00, // 0014 CALL R6 5 - 0x7C100400, // 0015 CALL R4 2 - 0x88100104, // 0016 GETMBR R4 R0 K4 - 0x8C10090B, // 0017 GETMET R4 R4 K11 - 0x7C100200, // 0018 CALL R4 1 - 0x8C140302, // 0019 GETMET R5 R1 K2 - 0x581C000C, // 001A LDCONST R7 K12 - 0x7C140400, // 001B CALL R5 2 - 0x8C140302, // 001C GETMET R5 R1 K2 - 0x8C1C0506, // 001D GETMET R7 R2 K6 - 0x5824000D, // 001E LDCONST R9 K13 - 0x5C280800, // 001F MOVE R10 R4 - 0x7C1C0600, // 0020 CALL R7 3 - 0x7C140400, // 0021 CALL R5 2 - 0x8C140302, // 0022 GETMET R5 R1 K2 - 0x8C1C0506, // 0023 GETMET R7 R2 K6 - 0x5824000E, // 0024 LDCONST R9 K14 - 0x5C280800, // 0025 MOVE R10 R4 - 0x7C1C0600, // 0026 CALL R7 3 - 0x7C140400, // 0027 CALL R5 2 - 0x8C140302, // 0028 GETMET R5 R1 K2 - 0x581C000F, // 0029 LDCONST R7 K15 - 0x7C140400, // 002A CALL R5 2 - 0x8C140302, // 002B GETMET R5 R1 K2 - 0x581C0010, // 002C LDCONST R7 K16 - 0x7C140400, // 002D CALL R5 2 - 0x8C140302, // 002E GETMET R5 R1 K2 - 0x8C1C0506, // 002F GETMET R7 R2 K6 - 0x58240011, // 0030 LDCONST R9 K17 - 0x88280104, // 0031 GETMBR R10 R0 K4 - 0x88281512, // 0032 GETMBR R10 R10 K18 - 0x7C1C0600, // 0033 CALL R7 3 - 0x7C140400, // 0034 CALL R5 2 - 0x8C140302, // 0035 GETMET R5 R1 K2 - 0x581C0013, // 0036 LDCONST R7 K19 - 0x7C140400, // 0037 CALL R5 2 - 0x8C140302, // 0038 GETMET R5 R1 K2 - 0x8C1C0506, // 0039 GETMET R7 R2 K6 - 0x58240014, // 003A LDCONST R9 K20 - 0x88280104, // 003B GETMBR R10 R0 K4 - 0x88281515, // 003C GETMBR R10 R10 K21 - 0x7C1C0600, // 003D CALL R7 3 - 0x7C140400, // 003E CALL R5 2 - 0x8C140302, // 003F GETMET R5 R1 K2 - 0x8C1C0506, // 0040 GETMET R7 R2 K6 - 0x58240016, // 0041 LDCONST R9 K22 - 0x88280104, // 0042 GETMBR R10 R0 K4 - 0x88281517, // 0043 GETMBR R10 R10 K23 - 0x782A0001, // 0044 JMPF R10 #0047 - 0x58280018, // 0045 LDCONST R10 K24 - 0x70020000, // 0046 JMP #0048 - 0x58280019, // 0047 LDCONST R10 K25 - 0x7C1C0600, // 0048 CALL R7 3 - 0x7C140400, // 0049 CALL R5 2 - 0x8C140302, // 004A GETMET R5 R1 K2 - 0x581C001A, // 004B LDCONST R7 K26 - 0x7C140400, // 004C CALL R5 2 - 0x8C140302, // 004D GETMET R5 R1 K2 - 0x581C001B, // 004E LDCONST R7 K27 - 0x7C140400, // 004F CALL R5 2 - 0x80000000, // 0050 RET 0 + 0x7C0C0200, // 0003 CALL R3 1 + 0x740E0001, // 0004 JMPT R3 #0007 + 0x4C0C0000, // 0005 LDNIL R3 + 0x80040600, // 0006 RET 1 R3 + 0x8C0C0303, // 0007 GETMET R3 R1 K3 + 0x58140004, // 0008 LDCONST R5 K4 + 0x7C0C0400, // 0009 CALL R3 2 + 0x8C0C0305, // 000A GETMET R3 R1 K5 + 0x7C0C0200, // 000B CALL R3 1 + 0x8C0C0106, // 000C GETMET R3 R0 K6 + 0x7C0C0200, // 000D CALL R3 1 + 0x780E0003, // 000E JMPF R3 #0013 + 0x8C0C0107, // 000F GETMET R3 R0 K7 + 0x7C0C0200, // 0010 CALL R3 1 + 0x8C0C0108, // 0011 GETMET R3 R0 K8 + 0x7C0C0200, // 0012 CALL R3 1 + 0x8C0C0309, // 0013 GETMET R3 R1 K9 + 0x8814030A, // 0014 GETMBR R5 R1 K10 + 0x7C0C0400, // 0015 CALL R3 2 + 0x8C0C030B, // 0016 GETMET R3 R1 K11 + 0x7C0C0200, // 0017 CALL R3 1 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_add_config_button +********************************************************************/ +be_local_closure(Matter_UI_web_add_config_button, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(content_send), + /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(_LOGO), + /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), + }), + be_str_weak(web_add_config_button), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x7C080400, // 0003 CALL R2 2 + 0x8C080301, // 0004 GETMET R2 R1 K1 + 0xB8120600, // 0005 GETNGBL R4 K3 + 0x88100904, // 0006 GETMBR R4 R4 K4 + 0x7C080400, // 0007 CALL R2 2 + 0x8C080301, // 0008 GETMET R2 R1 K1 + 0x58100005, // 0009 LDCONST R4 K5 + 0x7C080400, // 000A CALL R2 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_UI_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(add_driver), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0xB80A0200, // 0001 GETNGBL R2 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0x5C100000, // 0003 MOVE R4 R0 + 0x7C080400, // 0004 CALL R2 2 + 0x80000000, // 0005 RET 0 }) ) ); @@ -150,7 +432,7 @@ be_local_closure(Matter_UI_web_add_handler, /* name */ 0, /* has upvals */ NULL, /* no upvals */ 1, /* has sup protos */ - ( &(const struct bproto*[ 3]) { + ( &(const struct bproto*[ 2]) { be_nested_proto( 2, /* nstack */ 0, /* argc */ @@ -197,42 +479,18 @@ be_local_closure(Matter_UI_web_add_handler, /* name */ 0x80040000, // 0003 RET 1 R0 }) ), - be_nested_proto( - 2, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(page_qrcode_min_js), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0x80040000, // 0003 RET 1 R0 - }) - ), }), 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ + ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(on), /* K2 */ be_nested_str_weak(_X2Fmatterc), /* K3 */ be_nested_str_weak(HTTP_GET), /* K4 */ be_nested_str_weak(HTTP_POST), - /* K5 */ be_nested_str_weak(_X2Fqrcode_X2Emin_X2Ejs), }), be_str_weak(web_add_handler), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ + ( &(const binstruction[13]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x58100002, // 0002 LDCONST R4 K2 @@ -244,13 +502,8 @@ be_local_closure(Matter_UI_web_add_handler, /* name */ 0x84140001, // 0008 CLOSURE R5 P1 0x88180304, // 0009 GETMBR R6 R1 K4 0x7C080800, // 000A CALL R2 4 - 0x8C080301, // 000B GETMET R2 R1 K1 - 0x58100005, // 000C LDCONST R4 K5 - 0x84140002, // 000D CLOSURE R5 P2 - 0x88180303, // 000E GETMBR R6 R1 K3 - 0x7C080800, // 000F CALL R2 4 - 0xA0000000, // 0010 CLOSE R0 - 0x80000000, // 0011 RET 0 + 0xA0000000, // 000B CLOSE R0 + 0x80000000, // 000C RET 0 }) ) ); @@ -258,11 +511,11 @@ be_local_closure(Matter_UI_web_add_handler, /* name */ /******************************************************************** -** Solidified function: show_session_info +** Solidified function: show_qrcode ********************************************************************/ -be_local_closure(Matter_UI_show_session_info, /* name */ +be_local_closure(Matter_UI_show_qrcode, /* name */ be_nested_proto( - 16, /* nstack */ + 18, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -270,129 +523,242 @@ be_local_closure(Matter_UI_show_session_info, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[26]) { /* constants */ + ( &(const bvalue[22]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(_X20), + /* K2 */ be_nested_str_weak(_XE2_X96_X84), + /* K3 */ be_nested_str_weak(_XE2_X96_X80), + /* K4 */ be_nested_str_weak(_XE2_X96_X88), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(QRCode), + /* K7 */ be_nested_str_weak(encode_str), + /* K8 */ be_nested_str_weak(bitmap), + /* K9 */ be_nested_str_weak(size), + /* K10 */ be_nested_str_weak(content_send), + /* K11 */ be_nested_str_weak(_X3Cstyle_X3E_X2Eqr_X7Bfont_X2Dfamily_X3Amonospace_X3B_X20margin_X3A0_X3B_X20padding_X3A0_X3B_X20white_X2Dspace_X3Apre_X3B_X20font_X2Dsize_X3A18px_X3B_X20color_X3A_X23fff_X3B_X20line_X2Dheight_X3A100_X25_X3B_X7D_X3C_X2Fstyle_X3E), + /* K12 */ be_nested_str_weak(_X3Cdiv_X20style_X3D_X27transform_X3Ascale_X28_X2E8_X2C1_X29_X3B_X20display_X3Ainline_X2Dblock_X3B_X27_X3E), + /* K13 */ be_nested_str_weak(_X3Cdiv_X20class_X3D_X27qr_X27_X3E), + /* K14 */ be_nested_str_weak(), + /* K15 */ be_const_int(0), + /* K16 */ be_const_int(1), + /* K17 */ be_nested_str_weak(stop_iteration), + /* K18 */ be_nested_str_weak(_X3C_X2Fdiv_X3E), + /* K19 */ be_const_int(2), + /* K20 */ be_nested_str_weak(_X3Cdiv_X20class_X3D_X27qr_X27_X20style_X3D_X27background_X2Dcolor_X3A_X23000_X3B_X27_X3E), + /* K21 */ be_nested_str_weak(_X2F_X3Cdiv_X3E), + }), + be_str_weak(show_qrcode), + &be_const_str_solidified, + ( &(const binstruction[120]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x580C0001, // 0001 LDCONST R3 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x58140003, // 0003 LDCONST R5 K3 + 0x58180004, // 0004 LDCONST R6 K4 + 0xB81E0A00, // 0005 GETNGBL R7 K5 + 0x881C0F06, // 0006 GETMBR R7 R7 K6 + 0x8C1C0F07, // 0007 GETMET R7 R7 K7 + 0x5C240200, // 0008 MOVE R9 R1 + 0x7C1C0400, // 0009 CALL R7 2 + 0x94200F08, // 000A GETIDX R8 R7 K8 + 0x94240F09, // 000B GETIDX R9 R7 K9 + 0x8C28050A, // 000C GETMET R10 R2 K10 + 0x5830000B, // 000D LDCONST R12 K11 + 0x7C280400, // 000E CALL R10 2 + 0x8C28050A, // 000F GETMET R10 R2 K10 + 0x5830000C, // 0010 LDCONST R12 K12 + 0x7C280400, // 0011 CALL R10 2 + 0x5828000D, // 0012 LDCONST R10 K13 + 0x8C2C050A, // 0013 GETMET R11 R2 K10 + 0x5C341400, // 0014 MOVE R13 R10 + 0x7C2C0400, // 0015 CALL R11 2 + 0x5828000E, // 0016 LDCONST R10 K14 + 0x602C0010, // 0017 GETGBL R11 G16 + 0x00301310, // 0018 ADD R12 R9 K16 + 0x40321E0C, // 0019 CONNECT R12 K15 R12 + 0x7C2C0200, // 001A CALL R11 1 + 0xA8020003, // 001B EXBLK 0 #0020 + 0x5C301600, // 001C MOVE R12 R11 + 0x7C300000, // 001D CALL R12 0 + 0x00281404, // 001E ADD R10 R10 R4 + 0x7001FFFB, // 001F JMP #001C + 0x582C0011, // 0020 LDCONST R11 K17 + 0xAC2C0200, // 0021 CATCH R11 1 0 + 0xB0080000, // 0022 RAISE 2 R0 R0 + 0x00281512, // 0023 ADD R10 R10 K18 + 0x8C2C050A, // 0024 GETMET R11 R2 K10 + 0x5C341400, // 0025 MOVE R13 R10 + 0x7C2C0400, // 0026 CALL R11 2 + 0x602C0010, // 0027 GETGBL R11 G16 + 0x00301310, // 0028 ADD R12 R9 K16 + 0x0C301913, // 0029 DIV R12 R12 K19 + 0x04301910, // 002A SUB R12 R12 K16 + 0x40321E0C, // 002B CONNECT R12 K15 R12 + 0x7C2C0200, // 002C CALL R11 1 + 0xA802002E, // 002D EXBLK 0 #005D + 0x5C301600, // 002E MOVE R12 R11 + 0x7C300000, // 002F CALL R12 0 + 0x00362806, // 0030 ADD R13 K20 R6 + 0x5C281A00, // 0031 MOVE R10 R13 + 0x60340010, // 0032 GETGBL R13 G16 + 0x04381310, // 0033 SUB R14 R9 K16 + 0x403A1E0E, // 0034 CONNECT R14 K15 R14 + 0x7C340200, // 0035 CALL R13 1 + 0xA802001C, // 0036 EXBLK 0 #0054 + 0x5C381A00, // 0037 MOVE R14 R13 + 0x7C380000, // 0038 CALL R14 0 + 0x083C1913, // 0039 MUL R15 R12 K19 + 0x943C100F, // 003A GETIDX R15 R8 R15 + 0x943C1E0E, // 003B GETIDX R15 R15 R14 + 0x1C3C1F01, // 003C EQ R15 R15 K1 + 0x08401913, // 003D MUL R16 R12 K19 + 0x00402110, // 003E ADD R16 R16 K16 + 0x14402009, // 003F LT R16 R16 R9 + 0x78420005, // 0040 JMPF R16 #0047 + 0x08401913, // 0041 MUL R16 R12 K19 + 0x00402110, // 0042 ADD R16 R16 K16 + 0x94401010, // 0043 GETIDX R16 R8 R16 + 0x9440200E, // 0044 GETIDX R16 R16 R14 + 0x1C402101, // 0045 EQ R16 R16 K1 + 0x70020000, // 0046 JMP #0048 + 0x50400200, // 0047 LDBOOL R16 1 0 + 0x783E0004, // 0048 JMPF R15 #004E + 0x78420001, // 0049 JMPF R16 #004C + 0x5C440C00, // 004A MOVE R17 R6 + 0x70020000, // 004B JMP #004D + 0x5C440A00, // 004C MOVE R17 R5 + 0x70020003, // 004D JMP #0052 + 0x78420001, // 004E JMPF R16 #0051 + 0x5C440800, // 004F MOVE R17 R4 + 0x70020000, // 0050 JMP #0052 + 0x5C440600, // 0051 MOVE R17 R3 + 0x00281411, // 0052 ADD R10 R10 R17 + 0x7001FFE2, // 0053 JMP #0037 + 0x58340011, // 0054 LDCONST R13 K17 + 0xAC340200, // 0055 CATCH R13 1 0 + 0xB0080000, // 0056 RAISE 2 R0 R0 + 0x00281406, // 0057 ADD R10 R10 R6 + 0x00281512, // 0058 ADD R10 R10 K18 + 0x8C34050A, // 0059 GETMET R13 R2 K10 + 0x5C3C1400, // 005A MOVE R15 R10 + 0x7C340400, // 005B CALL R13 2 + 0x7001FFD0, // 005C JMP #002E + 0x582C0011, // 005D LDCONST R11 K17 + 0xAC2C0200, // 005E CATCH R11 1 0 + 0xB0080000, // 005F RAISE 2 R0 R0 + 0x102C1313, // 0060 MOD R11 R9 K19 + 0x1C2C170F, // 0061 EQ R11 R11 K15 + 0x782E0010, // 0062 JMPF R11 #0074 + 0x58280014, // 0063 LDCONST R10 K20 + 0x602C0010, // 0064 GETGBL R11 G16 + 0x00301310, // 0065 ADD R12 R9 K16 + 0x40321E0C, // 0066 CONNECT R12 K15 R12 + 0x7C2C0200, // 0067 CALL R11 1 + 0xA8020003, // 0068 EXBLK 0 #006D + 0x5C301600, // 0069 MOVE R12 R11 + 0x7C300000, // 006A CALL R12 0 + 0x00281405, // 006B ADD R10 R10 R5 + 0x7001FFFB, // 006C JMP #0069 + 0x582C0011, // 006D LDCONST R11 K17 + 0xAC2C0200, // 006E CATCH R11 1 0 + 0xB0080000, // 006F RAISE 2 R0 R0 + 0x00281515, // 0070 ADD R10 R10 K21 + 0x8C2C050A, // 0071 GETMET R11 R2 K10 + 0x5C341400, // 0072 MOVE R13 R10 + 0x7C2C0400, // 0073 CALL R11 2 + 0x8C2C050A, // 0074 GETMET R11 R2 K10 + 0x58340012, // 0075 LDCONST R13 K18 + 0x7C2C0400, // 0076 CALL R11 2 + 0x80000000, // 0077 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: show_passcode_form +********************************************************************/ +be_local_closure(Matter_UI_show_passcode_form, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[19]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BSessions_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K4 */ be_nested_str_weak(_X3Cp_X3EExisting_X20sessions_X3A_X3C_X2Fp_X3E), - /* K5 */ be_nested_str_weak(device), - /* K6 */ be_nested_str_weak(sessions), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(_X3Cp_X3E_X3Cb_X3ENone_X3C_X2Fb_X3E_X3C_X2Fp_X3E), - /* K9 */ be_nested_str_weak(fabric), - /* K10 */ be_nested_str_weak(format), - /* K11 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BSession_X20_X25i_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K12 */ be_nested_str_weak(local_session_id), - /* K13 */ be_nested_str_weak(_X3Chr_X3E), - /* K14 */ be_nested_str_weak(copy), - /* K15 */ be_nested_str_weak(reverse), - /* K16 */ be_nested_str_weak(deviceid), - /* K17 */ be_nested_str_weak(Fabric_X3A_X20_X25s_X3Cbr_X3E), - /* K18 */ be_nested_str_weak(tohex), - /* K19 */ be_nested_str_weak(Device_X3A_X20_X25s_X3Cbr_X3E_X26nbsp_X3B), - /* K20 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20), - /* K21 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E), - /* K22 */ be_nested_str_weak(_X3Cinput_X20name_X3D_X27del_session_X27_X20type_X3D_X27hidden_X27_X20value_X3D_X27_X25d_X27_X3E), - /* K23 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27del_X27_X20class_X3D_X27button_X20bgrn_X27_X3EDelete_X20Session_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), - /* K24 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K25 */ be_const_int(1), + /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20Passcode_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20_X3E), + /* K5 */ be_nested_str_weak(_X3Cp_X3EPasscode_X3A_X3C_X2Fp_X3E), + /* K6 */ be_nested_str_weak(format), + /* K7 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X271_X27_X20max_X3D_X2799999998_X27_X20name_X3D_X27passcode_X27_X20value_X3D_X27_X25i_X27_X3E), + /* K8 */ be_nested_str_weak(device), + /* K9 */ be_nested_str_weak(passcode), + /* K10 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E), + /* K11 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X272047_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E), + /* K12 */ be_nested_str_weak(discriminator), + /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E), + /* K14 */ be_nested_str_weak(ipv4only), + /* K15 */ be_nested_str_weak(_X20checked), + /* K16 */ be_nested_str_weak(), + /* K17 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), + /* K18 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), }), - be_str_weak(show_session_info), + be_str_weak(show_passcode_form), &be_const_str_solidified, - ( &(const binstruction[92]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0x8C100502, // 0002 GETMET R4 R2 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C100400, // 0004 CALL R4 2 - 0x8C100502, // 0005 GETMET R4 R2 K2 - 0x58180004, // 0006 LDCONST R6 K4 - 0x7C100400, // 0007 CALL R4 2 - 0x6010000C, // 0008 GETGBL R4 G12 - 0x88140105, // 0009 GETMBR R5 R0 K5 - 0x88140B06, // 000A GETMBR R5 R5 K6 - 0x88140B06, // 000B GETMBR R5 R5 K6 - 0x7C100200, // 000C CALL R4 1 - 0x1C100907, // 000D EQ R4 R4 K7 - 0x78120003, // 000E JMPF R4 #0013 - 0x8C100502, // 000F GETMET R4 R2 K2 - 0x58180008, // 0010 LDCONST R6 K8 - 0x7C100400, // 0011 CALL R4 2 - 0x70020044, // 0012 JMP #0058 - 0x58100007, // 0013 LDCONST R4 K7 - 0x6014000C, // 0014 GETGBL R5 G12 - 0x88180105, // 0015 GETMBR R6 R0 K5 - 0x88180D06, // 0016 GETMBR R6 R6 K6 - 0x88180D06, // 0017 GETMBR R6 R6 K6 - 0x7C140200, // 0018 CALL R5 1 - 0x14180805, // 0019 LT R6 R4 R5 - 0x781A003C, // 001A JMPF R6 #0058 - 0x88180105, // 001B GETMBR R6 R0 K5 - 0x88180D06, // 001C GETMBR R6 R6 K6 - 0x88180D06, // 001D GETMBR R6 R6 K6 - 0x94180C04, // 001E GETIDX R6 R6 R4 - 0x881C0D09, // 001F GETMBR R7 R6 K9 - 0x781E0034, // 0020 JMPF R7 #0056 - 0x8C1C0502, // 0021 GETMET R7 R2 K2 - 0x8C24070A, // 0022 GETMET R9 R3 K10 - 0x582C000B, // 0023 LDCONST R11 K11 - 0x88300D0C, // 0024 GETMBR R12 R6 K12 - 0x7C240600, // 0025 CALL R9 3 - 0x7C1C0400, // 0026 CALL R7 2 - 0x201C0907, // 0027 NE R7 R4 K7 - 0x781E0002, // 0028 JMPF R7 #002C - 0x8C1C0502, // 0029 GETMET R7 R2 K2 - 0x5824000D, // 002A LDCONST R9 K13 - 0x7C1C0400, // 002B CALL R7 2 - 0x881C0D09, // 002C GETMBR R7 R6 K9 - 0x8C1C0F0E, // 002D GETMET R7 R7 K14 - 0x7C1C0200, // 002E CALL R7 1 - 0x8C1C0F0F, // 002F GETMET R7 R7 K15 - 0x7C1C0200, // 0030 CALL R7 1 - 0x88200D10, // 0031 GETMBR R8 R6 K16 - 0x8C20110E, // 0032 GETMET R8 R8 K14 - 0x7C200200, // 0033 CALL R8 1 - 0x8C20110F, // 0034 GETMET R8 R8 K15 - 0x7C200200, // 0035 CALL R8 1 - 0x8C240502, // 0036 GETMET R9 R2 K2 - 0x8C2C070A, // 0037 GETMET R11 R3 K10 - 0x58340011, // 0038 LDCONST R13 K17 - 0x8C380F12, // 0039 GETMET R14 R7 K18 - 0x7C380200, // 003A CALL R14 1 - 0x7C2C0600, // 003B CALL R11 3 - 0x7C240400, // 003C CALL R9 2 - 0x8C240502, // 003D GETMET R9 R2 K2 - 0x8C2C070A, // 003E GETMET R11 R3 K10 - 0x58340013, // 003F LDCONST R13 K19 - 0x8C381112, // 0040 GETMET R14 R8 K18 - 0x7C380200, // 0041 CALL R14 1 - 0x7C2C0600, // 0042 CALL R11 3 - 0x7C240400, // 0043 CALL R9 2 - 0x8C240502, // 0044 GETMET R9 R2 K2 - 0x582C0014, // 0045 LDCONST R11 K20 - 0x7C240400, // 0046 CALL R9 2 - 0x8C240502, // 0047 GETMET R9 R2 K2 - 0x582C0015, // 0048 LDCONST R11 K21 - 0x7C240400, // 0049 CALL R9 2 - 0x8C240502, // 004A GETMET R9 R2 K2 - 0x8C2C070A, // 004B GETMET R11 R3 K10 - 0x58340016, // 004C LDCONST R13 K22 - 0x88380D0C, // 004D GETMBR R14 R6 K12 - 0x7C2C0600, // 004E CALL R11 3 - 0x7C240400, // 004F CALL R9 2 - 0x8C240502, // 0050 GETMET R9 R2 K2 - 0x582C0017, // 0051 LDCONST R11 K23 - 0x7C240400, // 0052 CALL R9 2 - 0x8C240502, // 0053 GETMET R9 R2 K2 - 0x582C0018, // 0054 LDCONST R11 K24 - 0x7C240400, // 0055 CALL R9 2 - 0x00100919, // 0056 ADD R4 R4 K25 - 0x7001FFC0, // 0057 JMP #0019 - 0x8C100502, // 0058 GETMET R4 R2 K2 - 0x58180018, // 0059 LDCONST R6 K24 - 0x7C100400, // 005A CALL R4 2 - 0x80000000, // 005B RET 0 + ( &(const binstruction[46]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x58140003, // 0003 LDCONST R5 K3 + 0x7C0C0400, // 0004 CALL R3 2 + 0x8C0C0302, // 0005 GETMET R3 R1 K2 + 0x58140004, // 0006 LDCONST R5 K4 + 0x7C0C0400, // 0007 CALL R3 2 + 0x8C0C0302, // 0008 GETMET R3 R1 K2 + 0x58140005, // 0009 LDCONST R5 K5 + 0x7C0C0400, // 000A CALL R3 2 + 0x8C0C0302, // 000B GETMET R3 R1 K2 + 0x8C140506, // 000C GETMET R5 R2 K6 + 0x581C0007, // 000D LDCONST R7 K7 + 0x88200108, // 000E GETMBR R8 R0 K8 + 0x88201109, // 000F GETMBR R8 R8 K9 + 0x7C140600, // 0010 CALL R5 3 + 0x7C0C0400, // 0011 CALL R3 2 + 0x8C0C0302, // 0012 GETMET R3 R1 K2 + 0x5814000A, // 0013 LDCONST R5 K10 + 0x7C0C0400, // 0014 CALL R3 2 + 0x8C0C0302, // 0015 GETMET R3 R1 K2 + 0x8C140506, // 0016 GETMET R5 R2 K6 + 0x581C000B, // 0017 LDCONST R7 K11 + 0x88200108, // 0018 GETMBR R8 R0 K8 + 0x8820110C, // 0019 GETMBR R8 R8 K12 + 0x7C140600, // 001A CALL R5 3 + 0x7C0C0400, // 001B CALL R3 2 + 0x8C0C0302, // 001C GETMET R3 R1 K2 + 0x8C140506, // 001D GETMET R5 R2 K6 + 0x581C000D, // 001E LDCONST R7 K13 + 0x88200108, // 001F GETMBR R8 R0 K8 + 0x8820110E, // 0020 GETMBR R8 R8 K14 + 0x78220001, // 0021 JMPF R8 #0024 + 0x5820000F, // 0022 LDCONST R8 K15 + 0x70020000, // 0023 JMP #0025 + 0x58200010, // 0024 LDCONST R8 K16 + 0x7C140600, // 0025 CALL R5 3 + 0x7C0C0400, // 0026 CALL R3 2 + 0x8C0C0302, // 0027 GETMET R3 R1 K2 + 0x58140011, // 0028 LDCONST R5 K17 + 0x7C0C0400, // 0029 CALL R3 2 + 0x8C0C0302, // 002A GETMET R3 R1 K2 + 0x58140012, // 002B LDCONST R5 K18 + 0x7C0C0400, // 002C CALL R3 2 + 0x80000000, // 002D RET 0 }) ) ); @@ -488,32 +854,97 @@ be_local_closure(Matter_UI_show_enable, /* name */ /******************************************************************** -** Solidified function: init +** Solidified function: show_commissioning_info ********************************************************************/ -be_local_closure(Matter_UI_init, /* name */ +be_local_closure(Matter_UI_show_commissioning_info, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ + 14, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(add_driver), + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(device), + /* K3 */ be_nested_str_weak(commissioning_open), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(millis), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(content_send), + /* K8 */ be_nested_str_weak(format), + /* K9 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3B_X5B_X20Commissioning_X20open_X20for_X20_X25i_X20min_X20_X5D_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K10 */ be_nested_str_weak(compute_manual_pairing_code), + /* K11 */ be_nested_str_weak(_X3Cp_X3EManual_X20pairing_X20code_X3A_X3Cbr_X3E_X3Cb_X3E_X25s_X2D_X25s_X2D_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E_X3Chr_X3E), + /* K12 */ be_const_int(3), + /* K13 */ be_const_int(2147483647), + /* K14 */ be_nested_str_weak(compute_qrcode_content), + /* K15 */ be_nested_str_weak(show_qrcode), + /* K16 */ be_nested_str_weak(_X3Cp_X3E_X20_X25s_X3C_X2Fp_X3E), + /* K17 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), }), - be_str_weak(init), + be_str_weak(show_commissioning_info), &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0xB80A0200, // 0001 GETNGBL R2 K1 - 0x8C080502, // 0002 GETMET R2 R2 K2 - 0x5C100000, // 0003 MOVE R4 R0 - 0x7C080400, // 0004 CALL R2 2 - 0x80000000, // 0005 RET 0 + ( &(const binstruction[56]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x880C0703, // 0003 GETMBR R3 R3 K3 + 0xB8120800, // 0004 GETNGBL R4 K4 + 0x8C100905, // 0005 GETMET R4 R4 K5 + 0x7C100200, // 0006 CALL R4 1 + 0x040C0604, // 0007 SUB R3 R3 R4 + 0x541203E7, // 0008 LDINT R4 1000 + 0x0C0C0604, // 0009 DIV R3 R3 R4 + 0x14100706, // 000A LT R4 R3 K6 + 0x78120000, // 000B JMPF R4 #000D + 0x580C0006, // 000C LDCONST R3 K6 + 0x5412001D, // 000D LDINT R4 30 + 0x00100604, // 000E ADD R4 R3 R4 + 0x5416003B, // 000F LDINT R5 60 + 0x0C100805, // 0010 DIV R4 R4 R5 + 0x8C140307, // 0011 GETMET R5 R1 K7 + 0x8C1C0508, // 0012 GETMET R7 R2 K8 + 0x58240009, // 0013 LDCONST R9 K9 + 0x5C280800, // 0014 MOVE R10 R4 + 0x7C1C0600, // 0015 CALL R7 3 + 0x7C140400, // 0016 CALL R5 2 + 0x88140102, // 0017 GETMBR R5 R0 K2 + 0x8C140B0A, // 0018 GETMET R5 R5 K10 + 0x7C140200, // 0019 CALL R5 1 + 0x8C180307, // 001A GETMET R6 R1 K7 + 0x8C200508, // 001B GETMET R8 R2 K8 + 0x5828000B, // 001C LDCONST R10 K11 + 0x402E0D0C, // 001D CONNECT R11 K6 K12 + 0x942C0A0B, // 001E GETIDX R11 R5 R11 + 0x54320003, // 001F LDINT R12 4 + 0x54360005, // 0020 LDINT R13 6 + 0x4030180D, // 0021 CONNECT R12 R12 R13 + 0x94300A0C, // 0022 GETIDX R12 R5 R12 + 0x54360006, // 0023 LDINT R13 7 + 0x40341B0D, // 0024 CONNECT R13 R13 K13 + 0x94340A0D, // 0025 GETIDX R13 R5 R13 + 0x7C200A00, // 0026 CALL R8 5 + 0x7C180400, // 0027 CALL R6 2 + 0x88180102, // 0028 GETMBR R6 R0 K2 + 0x8C180D0E, // 0029 GETMET R6 R6 K14 + 0x7C180200, // 002A CALL R6 1 + 0x8C1C010F, // 002B GETMET R7 R0 K15 + 0x5C240C00, // 002C MOVE R9 R6 + 0x7C1C0400, // 002D CALL R7 2 + 0x8C1C0307, // 002E GETMET R7 R1 K7 + 0x8C240508, // 002F GETMET R9 R2 K8 + 0x582C0010, // 0030 LDCONST R11 K16 + 0x5C300C00, // 0031 MOVE R12 R6 + 0x7C240600, // 0032 CALL R9 3 + 0x7C1C0400, // 0033 CALL R7 2 + 0x8C1C0307, // 0034 GETMET R7 R1 K7 + 0x58240011, // 0035 LDCONST R9 K17 + 0x7C1C0400, // 0036 CALL R7 2 + 0x80000000, // 0037 RET 0 }) ) ); @@ -533,7 +964,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[43]) { /* constants */ + ( &(const bvalue[49]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(check_privileged_access), /* K2 */ be_nested_str_weak(string), @@ -560,27 +991,33 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ /* K23 */ be_nested_str_weak(_X201), /* K24 */ be_nested_str_weak(disable), /* K25 */ be_nested_str_weak(_X200), - /* K26 */ be_nested_str_weak(del_session), - /* K27 */ be_nested_str_weak(sessions), - /* K28 */ be_nested_str_weak(get_session_by_local_session_id), - /* K29 */ be_nested_str_weak(remove_session), - /* K30 */ be_nested_str_weak(save), - /* K31 */ be_nested_str_weak(log), - /* K32 */ be_nested_str_weak(format), - /* K33 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), - /* K34 */ be_const_int(2), - /* K35 */ be_nested_str_weak(content_start), - /* K36 */ be_nested_str_weak(Parameter_X20error), - /* K37 */ be_nested_str_weak(content_send_style), - /* K38 */ be_nested_str_weak(content_send), - /* K39 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E), - /* K40 */ be_nested_str_weak(content_button), - /* K41 */ be_nested_str_weak(BUTTON_MANAGEMENT), - /* K42 */ be_nested_str_weak(content_stop), + /* K26 */ be_nested_str_weak(del_fabric), + /* K27 */ be_const_int(0), + /* K28 */ be_nested_str_weak(sessions), + /* K29 */ be_nested_str_weak(fabrics), + /* K30 */ be_nested_str_weak(get_fabric_id), + /* K31 */ be_nested_str_weak(copy), + /* K32 */ be_nested_str_weak(reverse), + /* K33 */ be_nested_str_weak(tohex), + /* K34 */ be_nested_str_weak(remove), + /* K35 */ be_const_int(1), + /* K36 */ be_nested_str_weak(save_fabrics), + /* K37 */ be_nested_str_weak(log), + /* K38 */ be_nested_str_weak(format), + /* K39 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K40 */ be_const_int(2), + /* K41 */ be_nested_str_weak(content_start), + /* K42 */ be_nested_str_weak(Parameter_X20error), + /* K43 */ be_nested_str_weak(content_send_style), + /* K44 */ be_nested_str_weak(content_send), + /* K45 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E), + /* K46 */ be_nested_str_weak(content_button), + /* K47 */ be_nested_str_weak(BUTTON_MANAGEMENT), + /* K48 */ be_nested_str_weak(content_stop), }), be_str_weak(page_part_ctl), &be_const_str_solidified, - ( &(const binstruction[150]) { /* code */ + ( &(const binstruction[165]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x7C080200, // 0002 CALL R2 1 @@ -592,7 +1029,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0xA4120800, // 0008 IMPORT R4 K4 0x8C140705, // 0009 GETMET R5 R3 K5 0x7C140200, // 000A CALL R5 1 - 0xA802006A, // 000B EXBLK 0 #0077 + 0xA8020079, // 000B EXBLK 0 #0086 0x8C180306, // 000C GETMET R6 R1 K6 0x58200007, // 000D LDCONST R8 K7 0x7C180400, // 000E CALL R6 2 @@ -635,7 +1072,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C18030F, // 0033 GETMET R6 R1 K15 0x58200010, // 0034 LDCONST R8 K16 0x7C180400, // 0035 CALL R6 2 - 0x7002003D, // 0036 JMP #0075 + 0x7002004C, // 0036 JMP #0084 0x8C180306, // 0037 GETMET R6 R1 K6 0x58200011, // 0038 LDCONST R8 K17 0x7C180400, // 0039 CALL R6 2 @@ -652,7 +1089,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C18030F, // 0044 GETMET R6 R1 K15 0x58200010, // 0045 LDCONST R8 K16 0x7C180400, // 0046 CALL R6 2 - 0x7002002C, // 0047 JMP #0075 + 0x7002003B, // 0047 JMP #0084 0x8C180306, // 0048 GETMET R6 R1 K6 0x58200018, // 0049 LDCONST R8 K24 0x7C180400, // 004A CALL R6 2 @@ -669,216 +1106,83 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C18030F, // 0055 GETMET R6 R1 K15 0x58200010, // 0056 LDCONST R8 K16 0x7C180400, // 0057 CALL R6 2 - 0x7002001B, // 0058 JMP #0075 + 0x7002002A, // 0058 JMP #0084 0x8C180306, // 0059 GETMET R6 R1 K6 0x5820001A, // 005A LDCONST R8 K26 0x7C180400, // 005B CALL R6 2 - 0x781A0017, // 005C JMPF R6 #0075 - 0x88180109, // 005D GETMBR R6 R0 K9 - 0x88180D1B, // 005E GETMBR R6 R6 K27 - 0x8C180D1C, // 005F GETMET R6 R6 K28 - 0x60200009, // 0060 GETGBL R8 G9 - 0x8C24030A, // 0061 GETMET R9 R1 K10 - 0x582C001A, // 0062 LDCONST R11 K26 - 0x7C240400, // 0063 CALL R9 2 - 0x7C200200, // 0064 CALL R8 1 - 0x7C180400, // 0065 CALL R6 2 - 0x4C1C0000, // 0066 LDNIL R7 - 0x201C0C07, // 0067 NE R7 R6 R7 - 0x781E0008, // 0068 JMPF R7 #0072 - 0x881C0109, // 0069 GETMBR R7 R0 K9 - 0x881C0F1B, // 006A GETMBR R7 R7 K27 - 0x8C1C0F1D, // 006B GETMET R7 R7 K29 - 0x5C240C00, // 006C MOVE R9 R6 - 0x7C1C0400, // 006D CALL R7 2 - 0x881C0109, // 006E GETMBR R7 R0 K9 - 0x881C0F1B, // 006F GETMBR R7 R7 K27 - 0x8C1C0F1E, // 0070 GETMET R7 R7 K30 - 0x7C1C0200, // 0071 CALL R7 1 - 0x8C1C030F, // 0072 GETMET R7 R1 K15 - 0x58240010, // 0073 LDCONST R9 K16 - 0x7C1C0400, // 0074 CALL R7 2 - 0xA8040001, // 0075 EXBLK 1 1 - 0x7002001D, // 0076 JMP #0095 - 0xAC180002, // 0077 CATCH R6 0 2 - 0x7002001A, // 0078 JMP #0094 - 0xB8222400, // 0079 GETNGBL R8 K18 - 0x8C20111F, // 007A GETMET R8 R8 K31 - 0x8C280520, // 007B GETMET R10 R2 K32 - 0x58300021, // 007C LDCONST R12 K33 - 0x5C340C00, // 007D MOVE R13 R6 - 0x5C380E00, // 007E MOVE R14 R7 - 0x7C280800, // 007F CALL R10 4 - 0x582C0022, // 0080 LDCONST R11 K34 - 0x7C200600, // 0081 CALL R8 3 - 0x8C200323, // 0082 GETMET R8 R1 K35 - 0x58280024, // 0083 LDCONST R10 K36 - 0x7C200400, // 0084 CALL R8 2 - 0x8C200325, // 0085 GETMET R8 R1 K37 - 0x7C200200, // 0086 CALL R8 1 - 0x8C200326, // 0087 GETMET R8 R1 K38 - 0x8C280520, // 0088 GETMET R10 R2 K32 - 0x58300027, // 0089 LDCONST R12 K39 - 0x5C340C00, // 008A MOVE R13 R6 - 0x5C380E00, // 008B MOVE R14 R7 - 0x7C280800, // 008C CALL R10 4 - 0x7C200400, // 008D CALL R8 2 - 0x8C200328, // 008E GETMET R8 R1 K40 - 0x88280329, // 008F GETMBR R10 R1 K41 - 0x7C200400, // 0090 CALL R8 2 - 0x8C20032A, // 0091 GETMET R8 R1 K42 - 0x7C200200, // 0092 CALL R8 1 - 0x70020000, // 0093 JMP #0095 - 0xB0080000, // 0094 RAISE 2 R0 R0 - 0x80000000, // 0095 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_add_config_button -********************************************************************/ -be_local_closure(Matter_UI_web_add_config_button, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(content_send), - /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(_LOGO), - /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), - }), - be_str_weak(web_add_config_button), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x7C080400, // 0003 CALL R2 2 - 0x8C080301, // 0004 GETMET R2 R1 K1 - 0xB8120600, // 0005 GETNGBL R4 K3 - 0x88100904, // 0006 GETMBR R4 R4 K4 - 0x7C080400, // 0007 CALL R2 2 - 0x8C080301, // 0008 GETMET R2 R1 K1 - 0x58100005, // 0009 LDCONST R4 K5 - 0x7C080400, // 000A CALL R2 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: page_qrcode_min_js -********************************************************************/ -be_local_closure(Matter_UI_page_qrcode_min_js, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(content_open), - /* K2 */ be_nested_str_weak(text_X2Fjavascript), - /* K3 */ be_nested_str_weak(content_send), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(_QRCODE_MINJS), - }), - be_str_weak(page_qrcode_min_js), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x541200C7, // 0002 LDINT R4 200 - 0x58140002, // 0003 LDCONST R5 K2 - 0x7C080600, // 0004 CALL R2 3 - 0x8C080303, // 0005 GETMET R2 R1 K3 - 0xB8120800, // 0006 GETNGBL R4 K4 - 0x88100905, // 0007 GETMBR R4 R4 K5 - 0x7C080400, // 0008 CALL R2 2 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: page_part_mgr -********************************************************************/ -be_local_closure(Matter_UI_page_part_mgr, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(check_privileged_access), - /* K3 */ be_nested_str_weak(content_start), - /* K4 */ be_nested_str_weak(Matter), - /* K5 */ be_nested_str_weak(content_send_style), - /* K6 */ be_nested_str_weak(content_send), - /* K7 */ be_nested_str_weak(_X3Cscript_X20type_X3D_X22text_X2Fjavascript_X22_X20src_X3D_X22qrcode_X2Emin_X2Ejs_X22_X3E_X3C_X2Fscript_X3E), - /* K8 */ be_nested_str_weak(show_enable), - /* K9 */ be_nested_str_weak(show_commissioning_info), - /* K10 */ be_nested_str_weak(show_session_info), - /* K11 */ be_nested_str_weak(content_button), - /* K12 */ be_nested_str_weak(BUTTON_CONFIGURATION), - /* K13 */ be_nested_str_weak(content_stop), - }), - be_str_weak(page_part_mgr), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0x8C0C0302, // 0002 GETMET R3 R1 K2 - 0x7C0C0200, // 0003 CALL R3 1 - 0x740E0001, // 0004 JMPT R3 #0007 - 0x4C0C0000, // 0005 LDNIL R3 - 0x80040600, // 0006 RET 1 R3 - 0x8C0C0303, // 0007 GETMET R3 R1 K3 - 0x58140004, // 0008 LDCONST R5 K4 - 0x7C0C0400, // 0009 CALL R3 2 - 0x8C0C0305, // 000A GETMET R3 R1 K5 - 0x7C0C0200, // 000B CALL R3 1 - 0x8C0C0306, // 000C GETMET R3 R1 K6 - 0x58140007, // 000D LDCONST R5 K7 - 0x7C0C0400, // 000E CALL R3 2 - 0x8C0C0108, // 000F GETMET R3 R0 K8 - 0x7C0C0200, // 0010 CALL R3 1 - 0x780E0003, // 0011 JMPF R3 #0016 - 0x8C0C0109, // 0012 GETMET R3 R0 K9 - 0x7C0C0200, // 0013 CALL R3 1 - 0x8C0C010A, // 0014 GETMET R3 R0 K10 - 0x7C0C0200, // 0015 CALL R3 1 - 0x8C0C030B, // 0016 GETMET R3 R1 K11 - 0x8814030C, // 0017 GETMBR R5 R1 K12 - 0x7C0C0400, // 0018 CALL R3 2 - 0x8C0C030D, // 0019 GETMET R3 R1 K13 - 0x7C0C0200, // 001A CALL R3 1 - 0x80000000, // 001B RET 0 + 0x781A0026, // 005C JMPF R6 #0084 + 0x8C18030A, // 005D GETMET R6 R1 K10 + 0x5820001A, // 005E LDCONST R8 K26 + 0x7C180400, // 005F CALL R6 2 + 0x581C001B, // 0060 LDCONST R7 K27 + 0x88200109, // 0061 GETMBR R8 R0 K9 + 0x8820111C, // 0062 GETMBR R8 R8 K28 + 0x8820111D, // 0063 GETMBR R8 R8 K29 + 0x50240000, // 0064 LDBOOL R9 0 0 + 0x6028000C, // 0065 GETGBL R10 G12 + 0x5C2C1000, // 0066 MOVE R11 R8 + 0x7C280200, // 0067 CALL R10 1 + 0x14280E0A, // 0068 LT R10 R7 R10 + 0x782A0011, // 0069 JMPF R10 #007C + 0x94281007, // 006A GETIDX R10 R8 R7 + 0x8C28151E, // 006B GETMET R10 R10 K30 + 0x7C280200, // 006C CALL R10 1 + 0x8C28151F, // 006D GETMET R10 R10 K31 + 0x7C280200, // 006E CALL R10 1 + 0x8C281520, // 006F GETMET R10 R10 K32 + 0x7C280200, // 0070 CALL R10 1 + 0x8C281521, // 0071 GETMET R10 R10 K33 + 0x7C280200, // 0072 CALL R10 1 + 0x1C2C1406, // 0073 EQ R11 R10 R6 + 0x782E0004, // 0074 JMPF R11 #007A + 0x8C2C1122, // 0075 GETMET R11 R8 K34 + 0x5C340E00, // 0076 MOVE R13 R7 + 0x7C2C0400, // 0077 CALL R11 2 + 0x50240200, // 0078 LDBOOL R9 1 0 + 0x70020000, // 0079 JMP #007B + 0x001C0F23, // 007A ADD R7 R7 K35 + 0x7001FFE8, // 007B JMP #0065 + 0x78260003, // 007C JMPF R9 #0081 + 0x88280109, // 007D GETMBR R10 R0 K9 + 0x8828151C, // 007E GETMBR R10 R10 K28 + 0x8C281524, // 007F GETMET R10 R10 K36 + 0x7C280200, // 0080 CALL R10 1 + 0x8C28030F, // 0081 GETMET R10 R1 K15 + 0x58300010, // 0082 LDCONST R12 K16 + 0x7C280400, // 0083 CALL R10 2 + 0xA8040001, // 0084 EXBLK 1 1 + 0x7002001D, // 0085 JMP #00A4 + 0xAC180002, // 0086 CATCH R6 0 2 + 0x7002001A, // 0087 JMP #00A3 + 0xB8222400, // 0088 GETNGBL R8 K18 + 0x8C201125, // 0089 GETMET R8 R8 K37 + 0x8C280526, // 008A GETMET R10 R2 K38 + 0x58300027, // 008B LDCONST R12 K39 + 0x5C340C00, // 008C MOVE R13 R6 + 0x5C380E00, // 008D MOVE R14 R7 + 0x7C280800, // 008E CALL R10 4 + 0x582C0028, // 008F LDCONST R11 K40 + 0x7C200600, // 0090 CALL R8 3 + 0x8C200329, // 0091 GETMET R8 R1 K41 + 0x5828002A, // 0092 LDCONST R10 K42 + 0x7C200400, // 0093 CALL R8 2 + 0x8C20032B, // 0094 GETMET R8 R1 K43 + 0x7C200200, // 0095 CALL R8 1 + 0x8C20032C, // 0096 GETMET R8 R1 K44 + 0x8C280526, // 0097 GETMET R10 R2 K38 + 0x5830002D, // 0098 LDCONST R12 K45 + 0x5C340C00, // 0099 MOVE R13 R6 + 0x5C380E00, // 009A MOVE R14 R7 + 0x7C280800, // 009B CALL R10 4 + 0x7C200400, // 009C CALL R8 2 + 0x8C20032E, // 009D GETMET R8 R1 K46 + 0x8828032F, // 009E GETMBR R10 R1 K47 + 0x7C200400, // 009F CALL R8 2 + 0x8C200330, // 00A0 GETMET R8 R1 K48 + 0x7C200200, // 00A1 CALL R8 1 + 0x70020000, // 00A2 JMP #00A4 + 0xB0080000, // 00A3 RAISE 2 R0 R0 + 0x80000000, // 00A4 RET 0 }) ) ); @@ -891,18 +1195,21 @@ be_local_closure(Matter_UI_page_part_mgr, /* name */ be_local_class(Matter_UI, 1, NULL, - be_nested_map(10, + be_nested_map(13, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) }, - { be_const_key_weak(device, -1), be_const_var(0) }, - { be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) }, + { be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) }, { be_const_key_weak(page_part_ctl, -1), be_const_closure(Matter_UI_page_part_ctl_closure) }, - { be_const_key_weak(show_enable, -1), be_const_closure(Matter_UI_show_enable_closure) }, - { be_const_key_weak(show_commissioning_info, 7), be_const_closure(Matter_UI_show_commissioning_info_closure) }, - { be_const_key_weak(show_session_info, 3), be_const_closure(Matter_UI_show_session_info_closure) }, - { be_const_key_weak(web_add_config_button, 0), be_const_closure(Matter_UI_web_add_config_button_closure) }, - { be_const_key_weak(page_qrcode_min_js, -1), be_const_closure(Matter_UI_page_qrcode_min_js_closure) }, - { be_const_key_weak(page_part_mgr, -1), be_const_closure(Matter_UI_page_part_mgr_closure) }, + { be_const_key_weak(web_get_arg, -1), be_const_closure(Matter_UI_web_get_arg_closure) }, + { be_const_key_weak(page_part_mgr, 8), be_const_closure(Matter_UI_page_part_mgr_closure) }, + { be_const_key_weak(web_add_config_button, -1), be_const_closure(Matter_UI_web_add_config_button_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) }, + { be_const_key_weak(web_sensor, 10), be_const_closure(Matter_UI_web_sensor_closure) }, + { be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) }, + { be_const_key_weak(show_enable, 12), be_const_closure(Matter_UI_show_enable_closure) }, + { be_const_key_weak(show_passcode_form, 1), be_const_closure(Matter_UI_show_passcode_form_closure) }, + { be_const_key_weak(show_qrcode, 5), be_const_closure(Matter_UI_show_qrcode_closure) }, + { be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) }, + { be_const_key_weak(device, -1), be_const_var(0) }, })), be_str_weak(Matter_UI) );