From 3d3280eb8ed916c15fd90c07b4fe4d9001f46ba0 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sun, 25 Feb 2024 23:02:13 +0100 Subject: [PATCH] Matter reduce memory usage when saving Fabrics (#20809) --- .../src/embedded/Matter_Fabric.be | 49 + .../src/embedded/Matter_Session_Store.be | 3 +- .../src/solidify/solidified_Matter_Fabric.h | 2388 +++++++++-------- .../solidified_Matter_Session_Store.h | 98 +- 4 files changed, 1380 insertions(+), 1158 deletions(-) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Fabric.be b/lib/libesp32/berry_matter/src/embedded/Matter_Fabric.be index 92a4c04a5..b77f1bd1a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Fabric.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Fabric.be @@ -335,6 +335,55 @@ class Matter_Fabric : Matter_Expirable return "{" + r.concat(",") + "}" end + ############################################################# + # Fabric::writejson(f) + # + # convert a single entry as json + # write to file + ############################################################# + def writejson(f) + import json + import introspect + + f.write("{") + + self.persist_pre() + 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 first = true + for k : keys + var v = introspect.get(self, k) + if v == nil continue end + if isinstance(v, bytes) v = "$$" + v.tob64() end # bytes + if (!first) f.write(",") end + f.write(format("%s:%s", json.dump(str(k)), json.dump(v))) + first = false + end + + # add sessions + var first_session = true + for sess : self._sessions.persistables() + if first_session + f.write(',"_sessions":[') + else + f.write(",") + end + f.write(sess.tojson()) + first_session = false + end + if !first_session + f.write("]") + end + + self.persist_post() + f.write("}") + end + ############################################################# # fromjson() # diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be b/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be index e59d35770..05fe414bd 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be @@ -331,8 +331,7 @@ class Matter_Session_Store if fabrics_saved > 0 f.write(",") end - var f_json = fab.tojson() - f.write(f_json) + fab.writejson(f) fabrics_saved += 1 end f.write("]") diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Fabric.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Fabric.h index a650382d4..c882ed705 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Fabric.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Fabric.h @@ -7,82 +7,87 @@ extern const bclass be_class_Matter_Fabric; /******************************************************************** -** Solidified function: get_device_id_as_int64 +** Solidified function: get_icac ********************************************************************/ -be_local_closure(Matter_Fabric_get_device_id_as_int64, /* 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(int64), - /* K1 */ be_nested_str_weak(frombytes), - /* K2 */ be_nested_str_weak(device_id), - }), - be_str_weak(get_device_id_as_int64), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x7C040400, // 0003 CALL R1 2 - 0x80040200, // 0004 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: fabric_candidate -********************************************************************/ -be_local_closure(Matter_Fabric_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(set_expire_in_seconds), - /* K1 */ be_nested_str_weak(assign_fabric_index), - /* K2 */ be_nested_str_weak(_store), - /* K3 */ be_nested_str_weak(add_fabric), - }), - be_str_weak(fabric_candidate), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x540E0077, // 0001 LDINT R3 120 - 0x7C040400, // 0002 CALL R1 2 - 0x8C040101, // 0003 GETMET R1 R0 K1 - 0x7C040200, // 0004 CALL R1 1 - 0x88040102, // 0005 GETMBR R1 R0 K2 - 0x8C040303, // 0006 GETMET R1 R1 K3 - 0x5C0C0000, // 0007 MOVE R3 R0 - 0x7C040400, // 0008 CALL R1 2 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_pk -********************************************************************/ -be_local_closure(Matter_Fabric_set_pk, /* name */ +be_local_closure(Matter_Fabric_get_icac, /* 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(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: before_remove +********************************************************************/ +be_local_closure(Matter_Fabric_before_remove, /* 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[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(log), + /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2DFabric_X20_X20_X20_X20fab_X3D_X27_X25s_X27_X20_X28removed_X29), + /* K3 */ be_nested_str_weak(get_fabric_id), + /* K4 */ be_nested_str_weak(copy), + /* K5 */ be_nested_str_weak(reverse), + /* K6 */ be_nested_str_weak(tohex), + /* K7 */ be_const_int(3), + }), + be_str_weak(before_remove), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x600C0018, // 0002 GETGBL R3 G24 + 0x58100002, // 0003 LDCONST R4 K2 + 0x8C140103, // 0004 GETMET R5 R0 K3 + 0x7C140200, // 0005 CALL R5 1 + 0x8C140B04, // 0006 GETMET R5 R5 K4 + 0x7C140200, // 0007 CALL R5 1 + 0x8C140B05, // 0008 GETMET R5 R5 K5 + 0x7C140200, // 0009 CALL R5 1 + 0x8C140B06, // 000A GETMET R5 R5 K6 + 0x7C140200, // 000B CALL R5 1 + 0x7C0C0400, // 000C CALL R3 2 + 0x58100007, // 000D LDCONST R4 K7 + 0x7C040600, // 000E CALL R1 3 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_pk +********************************************************************/ +be_local_closure(Matter_Fabric_get_pk, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -92,11 +97,11 @@ be_local_closure(Matter_Fabric_set_pk, /* name */ ( &(const bvalue[ 1]) { /* constants */ /* K0 */ be_nested_str_weak(no_private_key), }), - be_str_weak(set_pk), + be_str_weak(get_pk), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -104,102 +109,9 @@ be_local_closure(Matter_Fabric_set_pk, /* name */ /******************************************************************** -** Solidified function: add_session +** Solidified function: get_fabric_compressed ********************************************************************/ -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[ 8]) { /* 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(get_oldest_session), - /* K4 */ be_nested_str_weak(remove), - /* K5 */ be_nested_str_weak(_store), - /* K6 */ be_nested_str_weak(remove_session), - /* K7 */ be_nested_str_weak(push), - }), - be_str_weak(add_session), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* 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 - 0x780A0017, // 0006 JMPF R2 #001F - 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 - 0x780A000D, // 000C JMPF R2 #001B - 0x8C080103, // 000D GETMET R2 R0 K3 - 0x7C080200, // 000E CALL R2 1 - 0x880C0100, // 000F GETMBR R3 R0 K0 - 0x8C0C0704, // 0010 GETMET R3 R3 K4 - 0x88140100, // 0011 GETMBR R5 R0 K0 - 0x8C140B01, // 0012 GETMET R5 R5 K1 - 0x5C1C0400, // 0013 MOVE R7 R2 - 0x7C140400, // 0014 CALL R5 2 - 0x7C0C0400, // 0015 CALL R3 2 - 0x880C0105, // 0016 GETMBR R3 R0 K5 - 0x8C0C0706, // 0017 GETMET R3 R3 K6 - 0x5C140400, // 0018 MOVE R5 R2 - 0x7C0C0400, // 0019 CALL R3 2 - 0x7001FFEB, // 001A JMP #0007 - 0x88080100, // 001B GETMBR R2 R0 K0 - 0x8C080507, // 001C GETMET R2 R2 K7 - 0x5C100200, // 001D MOVE R4 R1 - 0x7C080400, // 001E CALL R2 2 - 0x80000000, // 001F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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: get_ipk_epoch_key -********************************************************************/ -be_local_closure(Matter_Fabric_get_ipk_epoch_key, /* name */ +be_local_closure(Matter_Fabric_get_fabric_compressed, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -210,9 +122,92 @@ be_local_closure(Matter_Fabric_get_ipk_epoch_key, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), + /* K0 */ be_nested_str_weak(fabric_compressed), }), - be_str_weak(get_ipk_epoch_key), + 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_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: set_admin_subject_vendor +********************************************************************/ +be_local_closure(Matter_Fabric_set_admin_subject_vendor, /* name */ + be_nested_proto( + 3, /* nstack */ + 3, /* 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(admin_subject), + /* K1 */ be_nested_str_weak(admin_vendor), + }), + be_str_weak(set_admin_subject_vendor), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** 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 @@ -251,26 +246,117 @@ be_local_closure(Matter_Fabric_get_noc, /* name */ /******************************************************************** -** Solidified function: get_device_id +** Solidified function: fromjson ********************************************************************/ -be_local_closure(Matter_Fabric_get_device_id, /* name */ +be_local_closure(Matter_Fabric_fromjson, /* name */ be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ + 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[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(device_id), + ( &(const bvalue[18]) { /* 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), + /* K17 */ be_nested_str_weak(hydrate_post), }), - be_str_weak(get_device_id), + be_str_weak(fromjson), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + ( &(const binstruction[76]) { /* 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 + 0x8C180B11, // 0049 GETMET R6 R5 K17 + 0x7C180200, // 004A CALL R6 1 + 0x80040A00, // 004B RET 1 R5 }) ) ); @@ -278,36 +364,9 @@ be_local_closure(Matter_Fabric_get_device_id, /* name */ /******************************************************************** -** Solidified function: get_icac +** Solidified function: set_ca ********************************************************************/ -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: set_fabric_index -********************************************************************/ -be_local_closure(Matter_Fabric_set_fabric_index, /* name */ +be_local_closure(Matter_Fabric_set_ca, /* name */ be_nested_proto( 2, /* nstack */ 2, /* argc */ @@ -318,9 +377,9 @@ be_local_closure(Matter_Fabric_set_fabric_index, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(fabric_index), + /* K0 */ be_nested_str_weak(root_ca_certificate), }), - be_str_weak(set_fabric_index), + be_str_weak(set_ca), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 @@ -331,154 +390,6 @@ be_local_closure(Matter_Fabric_set_fabric_index, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: fabric_completed -********************************************************************/ -be_local_closure(Matter_Fabric_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(set_no_expiration), - /* K1 */ be_nested_str_weak(set_persist), - /* K2 */ be_nested_str_weak(assign_fabric_index), - /* 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 */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C040101, // 0002 GETMET R1 R0 K1 - 0x500C0200, // 0003 LDBOOL R3 1 0 - 0x7C040400, // 0004 CALL R1 2 - 0x8C040102, // 0005 GETMET R1 R0 K2 - 0x7C040200, // 0006 CALL R1 1 - 0x88040103, // 0007 GETMBR R1 R0 K3 - 0x8C040304, // 0008 GETMET R1 R1 K4 - 0x5C0C0000, // 0009 MOVE R3 R0 - 0x7C040400, // 000A CALL R1 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_pk -********************************************************************/ -be_local_closure(Matter_Fabric_get_pk, /* 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(no_private_key), - }), - be_str_weak(get_pk), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: log_new_fabric -********************************************************************/ -be_local_closure(Matter_Fabric_log_new_fabric, /* 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[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2BFabric_X20_X20_X20_X20fab_X3D_X27_X25s_X27_X20vendorid_X3D_X25s), - /* K3 */ be_nested_str_weak(get_fabric_id), - /* K4 */ be_nested_str_weak(copy), - /* K5 */ be_nested_str_weak(reverse), - /* K6 */ be_nested_str_weak(tohex), - /* K7 */ be_nested_str_weak(get_admin_vendor_name), - /* K8 */ be_const_int(3), - }), - be_str_weak(log_new_fabric), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x600C0018, // 0002 GETGBL R3 G24 - 0x58100002, // 0003 LDCONST R4 K2 - 0x8C140103, // 0004 GETMET R5 R0 K3 - 0x7C140200, // 0005 CALL R5 1 - 0x8C140B04, // 0006 GETMET R5 R5 K4 - 0x7C140200, // 0007 CALL R5 1 - 0x8C140B05, // 0008 GETMET R5 R5 K5 - 0x7C140200, // 0009 CALL R5 1 - 0x8C140B06, // 000A GETMET R5 R5 K6 - 0x7C140200, // 000B CALL R5 1 - 0x8C180107, // 000C GETMET R6 R0 K7 - 0x7C180200, // 000D CALL R6 1 - 0x7C0C0600, // 000E CALL R3 3 - 0x58100008, // 000F LDCONST R4 K8 - 0x7C040600, // 0010 CALL R1 3 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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: tojson ********************************************************************/ @@ -650,11 +561,11 @@ be_local_closure(Matter_Fabric_tojson, /* name */ /******************************************************************** -** Solidified function: before_remove +** Solidified function: hydrate_post ********************************************************************/ -be_local_closure(Matter_Fabric_before_remove, /* name */ +be_local_closure(Matter_Fabric_hydrate_post, /* name */ be_nested_proto( - 7, /* nstack */ + 4, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -662,35 +573,34 @@ be_local_closure(Matter_Fabric_before_remove, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2DFabric_X20_X20_X20_X20fab_X3D_X27_X25s_X27_X20_X28removed_X29), - /* K3 */ be_nested_str_weak(get_fabric_id), - /* K4 */ be_nested_str_weak(copy), - /* K5 */ be_nested_str_weak(reverse), - /* K6 */ be_nested_str_weak(tohex), - /* K7 */ be_const_int(3), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(_counter_group_data_snd_impl), + /* K1 */ be_nested_str_weak(reset), + /* K2 */ be_nested_str_weak(counter_group_data_snd), + /* K3 */ be_nested_str_weak(_counter_group_ctrl_snd_impl), + /* K4 */ be_nested_str_weak(counter_group_ctrl_snd), + /* K5 */ be_nested_str_weak(val), }), - be_str_weak(before_remove), + be_str_weak(hydrate_post), &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 + ( &(const binstruction[17]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x600C0018, // 0002 GETGBL R3 G24 - 0x58100002, // 0003 LDCONST R4 K2 - 0x8C140103, // 0004 GETMET R5 R0 K3 - 0x7C140200, // 0005 CALL R5 1 - 0x8C140B04, // 0006 GETMET R5 R5 K4 - 0x7C140200, // 0007 CALL R5 1 - 0x8C140B05, // 0008 GETMET R5 R5 K5 - 0x7C140200, // 0009 CALL R5 1 - 0x8C140B06, // 000A GETMET R5 R5 K6 - 0x7C140200, // 000B CALL R5 1 - 0x7C0C0400, // 000C CALL R3 2 - 0x58100007, // 000D LDCONST R4 K7 - 0x7C040600, // 000E CALL R1 3 - 0x80000000, // 000F RET 0 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x7C040400, // 0003 CALL R1 2 + 0x88040103, // 0004 GETMBR R1 R0 K3 + 0x8C040301, // 0005 GETMET R1 R1 K1 + 0x880C0104, // 0006 GETMBR R3 R0 K4 + 0x7C040400, // 0007 CALL R1 2 + 0x88040100, // 0008 GETMBR R1 R0 K0 + 0x8C040305, // 0009 GETMET R1 R1 K5 + 0x7C040200, // 000A CALL R1 1 + 0x90020401, // 000B SETMBR R0 K2 R1 + 0x88040103, // 000C GETMBR R1 R0 K3 + 0x8C040305, // 000D GETMET R1 R1 K5 + 0x7C040200, // 000E CALL R1 1 + 0x90020801, // 000F SETMBR R0 K4 R1 + 0x80000000, // 0010 RET 0 }) ) ); @@ -698,146 +608,279 @@ be_local_closure(Matter_Fabric_before_remove, /* name */ /******************************************************************** -** Solidified function: fromjson +** Solidified function: set_ipk_epoch_key ********************************************************************/ -be_local_closure(Matter_Fabric_fromjson, /* name */ +be_local_closure(Matter_Fabric_set_ipk_epoch_key, /* name */ be_nested_proto( - 16, /* nstack */ + 2, /* nstack */ 2, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[18]) { /* 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), - /* K17 */ be_nested_str_weak(hydrate_post), - }), - be_str_weak(fromjson), - &be_const_str_solidified, - ( &(const binstruction[76]) { /* 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 - 0x8C180B11, // 0049 GETMET R6 R5 K17 - 0x7C180200, // 004A CALL R6 1 - 0x80040A00, // 004B RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_admin_subject_vendor -********************************************************************/ -be_local_closure(Matter_Fabric_set_admin_subject_vendor, /* name */ - be_nested_proto( - 3, /* nstack */ - 3, /* 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(admin_subject), - /* K1 */ be_nested_str_weak(admin_vendor), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(ipk_epoch_key), }), - be_str_weak(set_admin_subject_vendor), + be_str_weak(set_ipk_epoch_key), &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_fabric_device +********************************************************************/ +be_local_closure(Matter_Fabric_set_fabric_device, /* name */ + be_nested_proto( + 7, /* 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(fabric_id), + /* K1 */ be_nested_str_weak(device_id), + /* K2 */ be_nested_str_weak(fabric_compressed), + /* K3 */ be_nested_str_weak(fabric_parent), + /* K4 */ be_nested_str_weak(get_fabric_index), + }), + be_str_weak(set_fabric_device), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x80000000, // 0002 RET 0 + 0x90020403, // 0002 SETMBR R0 K2 R3 + 0x4C140000, // 0003 LDNIL R5 + 0x20140805, // 0004 NE R5 R4 R5 + 0x78160002, // 0005 JMPF R5 #0009 + 0x8C140904, // 0006 GETMET R5 R4 K4 + 0x7C140200, // 0007 CALL R5 1 + 0x70020000, // 0008 JMP #000A + 0x4C140000, // 0009 LDNIL R5 + 0x90020605, // 000A SETMBR R0 K3 R5 + 0x80000000, // 000B 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: 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: is_marked_for_deletion +********************************************************************/ +be_local_closure(Matter_Fabric_is_marked_for_deletion, /* 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(deleted), + }), + be_str_weak(is_marked_for_deletion), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x20040202, // 0002 NE R1 R1 R2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_fabric_id_as_int64 +********************************************************************/ +be_local_closure(Matter_Fabric_get_fabric_id_as_int64, /* 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(int64), + /* K1 */ be_nested_str_weak(frombytes), + /* K2 */ be_nested_str_weak(fabric_id), + }), + be_str_weak(get_fabric_id_as_int64), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ca +********************************************************************/ +be_local_closure(Matter_Fabric_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[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(root_ca_certificate), + }), + be_str_weak(get_ca), + &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: fabric_completed +********************************************************************/ +be_local_closure(Matter_Fabric_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(set_no_expiration), + /* K1 */ be_nested_str_weak(set_persist), + /* K2 */ be_nested_str_weak(assign_fabric_index), + /* 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 */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C040101, // 0002 GETMET R1 R0 K1 + 0x500C0200, // 0003 LDBOOL R3 1 0 + 0x7C040400, // 0004 CALL R1 2 + 0x8C040102, // 0005 GETMET R1 R0 K2 + 0x7C040200, // 0006 CALL R1 1 + 0x88040103, // 0007 GETMBR R1 R0 K3 + 0x8C040304, // 0008 GETMET R1 R1 K4 + 0x5C0C0000, // 0009 MOVE R3 R0 + 0x7C040400, // 000A CALL R1 2 + 0x80000000, // 000B RET 0 }) ) ); @@ -909,67 +952,28 @@ be_local_closure(Matter_Fabric_counter_group_data_snd_next, /* name */ /******************************************************************** -** Solidified function: get_fabric_compressed +** Solidified function: set_noc_icac ********************************************************************/ -be_local_closure(Matter_Fabric_get_fabric_compressed, /* name */ +be_local_closure(Matter_Fabric_set_noc_icac, /* name */ be_nested_proto( - 2, /* nstack */ - 1, /* argc */ + 3, /* nstack */ + 3, /* 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), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(noc), + /* K1 */ be_nested_str_weak(icac), }), - be_str_weak(get_fabric_compressed), + be_str_weak(set_noc_icac), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_fabric_device -********************************************************************/ -be_local_closure(Matter_Fabric_set_fabric_device, /* name */ - be_nested_proto( - 7, /* 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(fabric_id), - /* K1 */ be_nested_str_weak(device_id), - /* K2 */ be_nested_str_weak(fabric_compressed), - /* K3 */ be_nested_str_weak(fabric_parent), - /* K4 */ be_nested_str_weak(get_fabric_index), - }), - be_str_weak(set_fabric_device), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ + ( &(const binstruction[ 3]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x90020403, // 0002 SETMBR R0 K2 R3 - 0x4C140000, // 0003 LDNIL R5 - 0x20140805, // 0004 NE R5 R4 R5 - 0x78160002, // 0005 JMPF R5 #0009 - 0x8C140904, // 0006 GETMET R5 R4 K4 - 0x7C140200, // 0007 CALL R5 1 - 0x70020000, // 0008 JMP #000A - 0x4C140000, // 0009 LDNIL R5 - 0x90020605, // 000A SETMBR R0 K3 R5 - 0x80000000, // 000B RET 0 + 0x80000000, // 0002 RET 0 }) ) ); @@ -977,9 +981,9 @@ be_local_closure(Matter_Fabric_set_fabric_device, /* name */ /******************************************************************** -** Solidified function: set_ipk_epoch_key +** Solidified function: set_pk ********************************************************************/ -be_local_closure(Matter_Fabric_set_ipk_epoch_key, /* name */ +be_local_closure(Matter_Fabric_set_pk, /* name */ be_nested_proto( 2, /* nstack */ 2, /* argc */ @@ -990,9 +994,9 @@ be_local_closure(Matter_Fabric_set_ipk_epoch_key, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), + /* K0 */ be_nested_str_weak(no_private_key), }), - be_str_weak(set_ipk_epoch_key), + be_str_weak(set_pk), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 @@ -1004,65 +1008,9 @@ be_local_closure(Matter_Fabric_set_ipk_epoch_key, /* name */ /******************************************************************** -** Solidified function: get_ipk_group_key +** Solidified function: get_newest_session ********************************************************************/ -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_fabric_id_as_int64 -********************************************************************/ -be_local_closure(Matter_Fabric_get_fabric_id_as_int64, /* name */ +be_local_closure(Matter_Fabric_get_newest_session, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -1072,19 +1020,16 @@ be_local_closure(Matter_Fabric_get_fabric_id_as_int64, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(int64), - /* K1 */ be_nested_str_weak(frombytes), - /* K2 */ be_nested_str_weak(fabric_id), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(get_old_recent_session), }), - be_str_weak(get_fabric_id_as_int64), + be_str_weak(get_newest_session), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x7C040400, // 0003 CALL R1 2 - 0x80040200, // 0004 RET 1 R1 + ( &(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 }) ) ); @@ -1092,11 +1037,11 @@ be_local_closure(Matter_Fabric_get_fabric_id_as_int64, /* name */ /******************************************************************** -** Solidified function: get_admin_vendor +** Solidified function: log_new_fabric ********************************************************************/ -be_local_closure(Matter_Fabric_get_admin_vendor, /* name */ +be_local_closure(Matter_Fabric_log_new_fabric, /* name */ be_nested_proto( - 2, /* nstack */ + 8, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1104,14 +1049,38 @@ be_local_closure(Matter_Fabric_get_admin_vendor, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(admin_vendor), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(log), + /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2BFabric_X20_X20_X20_X20fab_X3D_X27_X25s_X27_X20vendorid_X3D_X25s), + /* K3 */ be_nested_str_weak(get_fabric_id), + /* K4 */ be_nested_str_weak(copy), + /* K5 */ be_nested_str_weak(reverse), + /* K6 */ be_nested_str_weak(tohex), + /* K7 */ be_nested_str_weak(get_admin_vendor_name), + /* K8 */ be_const_int(3), }), - be_str_weak(get_admin_vendor), + be_str_weak(log_new_fabric), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + ( &(const binstruction[18]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x600C0018, // 0002 GETGBL R3 G24 + 0x58100002, // 0003 LDCONST R4 K2 + 0x8C140103, // 0004 GETMET R5 R0 K3 + 0x7C140200, // 0005 CALL R5 1 + 0x8C140B04, // 0006 GETMET R5 R5 K4 + 0x7C140200, // 0007 CALL R5 1 + 0x8C140B05, // 0008 GETMET R5 R5 K5 + 0x7C140200, // 0009 CALL R5 1 + 0x8C140B06, // 000A GETMET R5 R5 K6 + 0x7C140200, // 000B CALL R5 1 + 0x8C180107, // 000C GETMET R6 R0 K7 + 0x7C180200, // 000D CALL R6 1 + 0x7C0C0600, // 000E CALL R3 3 + 0x58100008, // 000F LDCONST R4 K8 + 0x7C040600, // 0010 CALL R1 3 + 0x80000000, // 0011 RET 0 }) ) ); @@ -1160,11 +1129,11 @@ be_local_closure(Matter_Fabric_get_ca_pub, /* name */ /******************************************************************** -** Solidified function: is_marked_for_deletion +** Solidified function: get_fabric_index ********************************************************************/ -be_local_closure(Matter_Fabric_is_marked_for_deletion, /* name */ +be_local_closure(Matter_Fabric_get_fabric_index, /* name */ be_nested_proto( - 3, /* nstack */ + 2, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1173,15 +1142,387 @@ be_local_closure(Matter_Fabric_is_marked_for_deletion, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(deleted), + /* K0 */ be_nested_str_weak(fabric_index), }), - be_str_weak(is_marked_for_deletion), + be_str_weak(get_fabric_index), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ + ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x20040202, // 0002 NE R1 R1 R2 - 0x80040200, // 0003 RET 1 R1 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: writejson +********************************************************************/ +be_local_closure(Matter_Fabric_writejson, /* 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[26]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(introspect), + /* K2 */ be_nested_str_weak(write), + /* K3 */ be_nested_str_weak(_X7B), + /* K4 */ be_nested_str_weak(persist_pre), + /* K5 */ be_nested_str_weak(members), + /* K6 */ be_nested_str_weak(get), + /* K7 */ be_nested_str_weak(function), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(_), + /* K10 */ be_nested_str_weak(push), + /* K11 */ be_nested_str_weak(stop_iteration), + /* K12 */ be_nested_str_weak(matter), + /* K13 */ be_nested_str_weak(sort), + /* K14 */ be_nested_str_weak(_X24_X24), + /* K15 */ be_nested_str_weak(tob64), + /* K16 */ be_nested_str_weak(_X2C), + /* K17 */ be_nested_str_weak(_X25s_X3A_X25s), + /* K18 */ be_nested_str_weak(dump), + /* K19 */ be_nested_str_weak(_sessions), + /* K20 */ be_nested_str_weak(persistables), + /* K21 */ be_nested_str_weak(_X2C_X22_sessions_X22_X3A_X5B), + /* K22 */ be_nested_str_weak(tojson), + /* K23 */ be_nested_str_weak(_X5D), + /* K24 */ be_nested_str_weak(persist_post), + /* K25 */ be_nested_str_weak(_X7D), + }), + be_str_weak(writejson), + &be_const_str_solidified, + ( &(const binstruction[125]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0x8C100302, // 0002 GETMET R4 R1 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C100400, // 0004 CALL R4 2 + 0x8C100104, // 0005 GETMET R4 R0 K4 + 0x7C100200, // 0006 CALL R4 1 + 0x60100012, // 0007 GETGBL R4 G18 + 0x7C100000, // 0008 CALL R4 0 + 0x60140010, // 0009 GETGBL R5 G16 + 0x8C180705, // 000A GETMET R6 R3 K5 + 0x5C200000, // 000B MOVE R8 R0 + 0x7C180400, // 000C CALL R6 2 + 0x7C140200, // 000D CALL R5 1 + 0xA8020011, // 000E EXBLK 0 #0021 + 0x5C180A00, // 000F MOVE R6 R5 + 0x7C180000, // 0010 CALL R6 0 + 0x8C1C0706, // 0011 GETMET R7 R3 K6 + 0x5C240000, // 0012 MOVE R9 R0 + 0x5C280C00, // 0013 MOVE R10 R6 + 0x7C1C0600, // 0014 CALL R7 3 + 0x60200004, // 0015 GETGBL R8 G4 + 0x5C240E00, // 0016 MOVE R9 R7 + 0x7C200200, // 0017 CALL R8 1 + 0x20201107, // 0018 NE R8 R8 K7 + 0x78220005, // 0019 JMPF R8 #0020 + 0x94200D08, // 001A GETIDX R8 R6 K8 + 0x20201109, // 001B NE R8 R8 K9 + 0x78220002, // 001C JMPF R8 #0020 + 0x8C20090A, // 001D GETMET R8 R4 K10 + 0x5C280C00, // 001E MOVE R10 R6 + 0x7C200400, // 001F CALL R8 2 + 0x7001FFED, // 0020 JMP #000F + 0x5814000B, // 0021 LDCONST R5 K11 + 0xAC140200, // 0022 CATCH R5 1 0 + 0xB0080000, // 0023 RAISE 2 R0 R0 + 0xB8161800, // 0024 GETNGBL R5 K12 + 0x8C140B0D, // 0025 GETMET R5 R5 K13 + 0x5C1C0800, // 0026 MOVE R7 R4 + 0x7C140400, // 0027 CALL R5 2 + 0x5C100A00, // 0028 MOVE R4 R5 + 0x50140200, // 0029 LDBOOL R5 1 0 + 0x60180010, // 002A GETGBL R6 G16 + 0x5C1C0800, // 002B MOVE R7 R4 + 0x7C180200, // 002C CALL R6 1 + 0xA8020026, // 002D EXBLK 0 #0055 + 0x5C1C0C00, // 002E MOVE R7 R6 + 0x7C1C0000, // 002F CALL R7 0 + 0x8C200706, // 0030 GETMET R8 R3 K6 + 0x5C280000, // 0031 MOVE R10 R0 + 0x5C2C0E00, // 0032 MOVE R11 R7 + 0x7C200600, // 0033 CALL R8 3 + 0x4C240000, // 0034 LDNIL R9 + 0x1C241009, // 0035 EQ R9 R8 R9 + 0x78260000, // 0036 JMPF R9 #0038 + 0x7001FFF5, // 0037 JMP #002E + 0x6024000F, // 0038 GETGBL R9 G15 + 0x5C281000, // 0039 MOVE R10 R8 + 0x602C0015, // 003A GETGBL R11 G21 + 0x7C240400, // 003B CALL R9 2 + 0x78260003, // 003C JMPF R9 #0041 + 0x8C24110F, // 003D GETMET R9 R8 K15 + 0x7C240200, // 003E CALL R9 1 + 0x00261C09, // 003F ADD R9 K14 R9 + 0x5C201200, // 0040 MOVE R8 R9 + 0x5C240A00, // 0041 MOVE R9 R5 + 0x74260002, // 0042 JMPT R9 #0046 + 0x8C240302, // 0043 GETMET R9 R1 K2 + 0x582C0010, // 0044 LDCONST R11 K16 + 0x7C240400, // 0045 CALL R9 2 + 0x8C240302, // 0046 GETMET R9 R1 K2 + 0x602C0018, // 0047 GETGBL R11 G24 + 0x58300011, // 0048 LDCONST R12 K17 + 0x8C340512, // 0049 GETMET R13 R2 K18 + 0x603C0008, // 004A GETGBL R15 G8 + 0x5C400E00, // 004B MOVE R16 R7 + 0x7C3C0200, // 004C CALL R15 1 + 0x7C340400, // 004D CALL R13 2 + 0x8C380512, // 004E GETMET R14 R2 K18 + 0x5C401000, // 004F MOVE R16 R8 + 0x7C380400, // 0050 CALL R14 2 + 0x7C2C0600, // 0051 CALL R11 3 + 0x7C240400, // 0052 CALL R9 2 + 0x50140000, // 0053 LDBOOL R5 0 0 + 0x7001FFD8, // 0054 JMP #002E + 0x5818000B, // 0055 LDCONST R6 K11 + 0xAC180200, // 0056 CATCH R6 1 0 + 0xB0080000, // 0057 RAISE 2 R0 R0 + 0x50180200, // 0058 LDBOOL R6 1 0 + 0x601C0010, // 0059 GETGBL R7 G16 + 0x88200113, // 005A GETMBR R8 R0 K19 + 0x8C201114, // 005B GETMET R8 R8 K20 + 0x7C200200, // 005C CALL R8 1 + 0x7C1C0200, // 005D CALL R7 1 + 0xA802000F, // 005E EXBLK 0 #006F + 0x5C200E00, // 005F MOVE R8 R7 + 0x7C200000, // 0060 CALL R8 0 + 0x781A0003, // 0061 JMPF R6 #0066 + 0x8C240302, // 0062 GETMET R9 R1 K2 + 0x582C0015, // 0063 LDCONST R11 K21 + 0x7C240400, // 0064 CALL R9 2 + 0x70020002, // 0065 JMP #0069 + 0x8C240302, // 0066 GETMET R9 R1 K2 + 0x582C0010, // 0067 LDCONST R11 K16 + 0x7C240400, // 0068 CALL R9 2 + 0x8C240302, // 0069 GETMET R9 R1 K2 + 0x8C2C1116, // 006A GETMET R11 R8 K22 + 0x7C2C0200, // 006B CALL R11 1 + 0x7C240400, // 006C CALL R9 2 + 0x50180000, // 006D LDBOOL R6 0 0 + 0x7001FFEF, // 006E JMP #005F + 0x581C000B, // 006F LDCONST R7 K11 + 0xAC1C0200, // 0070 CATCH R7 1 0 + 0xB0080000, // 0071 RAISE 2 R0 R0 + 0x5C1C0C00, // 0072 MOVE R7 R6 + 0x741E0002, // 0073 JMPT R7 #0077 + 0x8C1C0302, // 0074 GETMET R7 R1 K2 + 0x58240017, // 0075 LDCONST R9 K23 + 0x7C1C0400, // 0076 CALL R7 2 + 0x8C1C0118, // 0077 GETMET R7 R0 K24 + 0x7C1C0200, // 0078 CALL R7 1 + 0x8C1C0302, // 0079 GETMET R7 R1 K2 + 0x58240019, // 007A LDCONST R9 K25 + 0x7C1C0400, // 007B CALL R7 2 + 0x80000000, // 007C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: counter_group_ctrl_snd_next +********************************************************************/ +be_local_closure(Matter_Fabric_counter_group_ctrl_snd_next, /* 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[13]) { /* constants */ + /* K0 */ be_nested_str_weak(_counter_group_ctrl_snd_impl), + /* K1 */ be_nested_str_weak(next), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(log), + /* K4 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20Counter_group_ctrl_snd_X3D_X25i), + /* K5 */ be_const_int(3), + /* K6 */ be_nested_str_weak(matter), + /* K7 */ be_nested_str_weak(Counter), + /* K8 */ be_nested_str_weak(is_greater), + /* K9 */ be_nested_str_weak(counter_group_ctrl_snd), + /* K10 */ be_nested_str_weak(_GROUP_SND_INCR), + /* K11 */ be_nested_str_weak(does_persist), + /* K12 */ be_nested_str_weak(save), + }), + be_str_weak(counter_group_ctrl_snd_next), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0xB80A0400, // 0003 GETNGBL R2 K2 + 0x8C080503, // 0004 GETMET R2 R2 K3 + 0x60100018, // 0005 GETGBL R4 G24 + 0x58140004, // 0006 LDCONST R5 K4 + 0x5C180200, // 0007 MOVE R6 R1 + 0x7C100400, // 0008 CALL R4 2 + 0x58140005, // 0009 LDCONST R5 K5 + 0x7C080600, // 000A CALL R2 3 + 0xB80A0C00, // 000B GETNGBL R2 K6 + 0x88080507, // 000C GETMBR R2 R2 K7 + 0x8C080508, // 000D GETMET R2 R2 K8 + 0x5C100200, // 000E MOVE R4 R1 + 0x88140109, // 000F GETMBR R5 R0 K9 + 0x7C080600, // 0010 CALL R2 3 + 0x780A0007, // 0011 JMPF R2 #001A + 0x8808010A, // 0012 GETMBR R2 R0 K10 + 0x00080202, // 0013 ADD R2 R1 R2 + 0x90021202, // 0014 SETMBR R0 K9 R2 + 0x8C08010B, // 0015 GETMET R2 R0 K11 + 0x7C080200, // 0016 CALL R2 1 + 0x780A0001, // 0017 JMPF R2 #001A + 0x8C08010C, // 0018 GETMET R2 R0 K12 + 0x7C080200, // 0019 CALL R2 1 + 0x80040200, // 001A RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: fabric_candidate +********************************************************************/ +be_local_closure(Matter_Fabric_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(set_expire_in_seconds), + /* K1 */ be_nested_str_weak(assign_fabric_index), + /* K2 */ be_nested_str_weak(_store), + /* K3 */ be_nested_str_weak(add_fabric), + }), + be_str_weak(fabric_candidate), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x540E0077, // 0001 LDINT R3 120 + 0x7C040400, // 0002 CALL R1 2 + 0x8C040101, // 0003 GETMET R1 R0 K1 + 0x7C040200, // 0004 CALL R1 1 + 0x88040102, // 0005 GETMBR R1 R0 K2 + 0x8C040303, // 0006 GETMET R1 R1 K3 + 0x5C0C0000, // 0007 MOVE R3 R0 + 0x7C040400, // 0008 CALL R1 2 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: assign_fabric_index +********************************************************************/ +be_local_closure(Matter_Fabric_assign_fabric_index, /* 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[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(get_fabric_index), + /* K1 */ be_nested_str_weak(set_fabric_index), + /* K2 */ be_nested_str_weak(_store), + /* K3 */ be_nested_str_weak(next_fabric_idx), + }), + be_str_weak(assign_fabric_index), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x1C040202, // 0003 EQ R1 R1 R2 + 0x78060004, // 0004 JMPF R1 #000A + 0x8C040101, // 0005 GETMET R1 R0 K1 + 0x880C0102, // 0006 GETMBR R3 R0 K2 + 0x8C0C0703, // 0007 GETMET R3 R3 K3 + 0x7C0C0200, // 0008 CALL R3 1 + 0x7C040400, // 0009 CALL R1 2 + 0x80000000, // 000A 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 }) ) ); @@ -1262,28 +1603,26 @@ be_local_closure(Matter_Fabric_init, /* name */ /******************************************************************** -** Solidified function: set_noc_icac +** Solidified function: get_ipk_epoch_key ********************************************************************/ -be_local_closure(Matter_Fabric_set_noc_icac, /* name */ +be_local_closure(Matter_Fabric_get_ipk_epoch_key, /* name */ be_nested_proto( - 3, /* nstack */ - 3, /* 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[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(noc), - /* K1 */ be_nested_str_weak(icac), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(ipk_epoch_key), }), - be_str_weak(set_noc_icac), + be_str_weak(get_ipk_epoch_key), &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x80000000, // 0002 RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -1291,9 +1630,73 @@ be_local_closure(Matter_Fabric_set_noc_icac, /* name */ /******************************************************************** -** Solidified function: set_ca +** Solidified function: add_session ********************************************************************/ -be_local_closure(Matter_Fabric_set_ca, /* name */ +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[ 8]) { /* 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(get_oldest_session), + /* K4 */ be_nested_str_weak(remove), + /* K5 */ be_nested_str_weak(_store), + /* K6 */ be_nested_str_weak(remove_session), + /* K7 */ be_nested_str_weak(push), + }), + be_str_weak(add_session), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* 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 + 0x780A0017, // 0006 JMPF R2 #001F + 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 + 0x780A000D, // 000C JMPF R2 #001B + 0x8C080103, // 000D GETMET R2 R0 K3 + 0x7C080200, // 000E CALL R2 1 + 0x880C0100, // 000F GETMBR R3 R0 K0 + 0x8C0C0704, // 0010 GETMET R3 R3 K4 + 0x88140100, // 0011 GETMBR R5 R0 K0 + 0x8C140B01, // 0012 GETMET R5 R5 K1 + 0x5C1C0400, // 0013 MOVE R7 R2 + 0x7C140400, // 0014 CALL R5 2 + 0x7C0C0400, // 0015 CALL R3 2 + 0x880C0105, // 0016 GETMBR R3 R0 K5 + 0x8C0C0706, // 0017 GETMET R3 R3 K6 + 0x5C140400, // 0018 MOVE R5 R2 + 0x7C0C0400, // 0019 CALL R3 2 + 0x7001FFEB, // 001A JMP #0007 + 0x88080100, // 001B GETMBR R2 R0 K0 + 0x8C080507, // 001C GETMET R2 R2 K7 + 0x5C100200, // 001D MOVE R4 R1 + 0x7C080400, // 001E CALL R2 2 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_fabric_index +********************************************************************/ +be_local_closure(Matter_Fabric_set_fabric_index, /* name */ be_nested_proto( 2, /* nstack */ 2, /* argc */ @@ -1304,9 +1707,9 @@ be_local_closure(Matter_Fabric_set_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(fabric_index), }), - be_str_weak(set_ca), + be_str_weak(set_fabric_index), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 @@ -1317,6 +1720,153 @@ be_local_closure(Matter_Fabric_set_ca, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: get_device_id_as_int64 +********************************************************************/ +be_local_closure(Matter_Fabric_get_device_id_as_int64, /* 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(int64), + /* K1 */ be_nested_str_weak(frombytes), + /* K2 */ be_nested_str_weak(device_id), + }), + be_str_weak(get_device_id_as_int64), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 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_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: mark_for_deletion +********************************************************************/ +be_local_closure(Matter_Fabric_mark_for_deletion, /* 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[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(deleted), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(rtc_utc), + }), + be_str_weak(mark_for_deletion), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8060200, // 0000 GETNGBL R1 K1 + 0x8C040302, // 0001 GETMET R1 R1 K2 + 0x7C040200, // 0002 CALL R1 1 + 0x90020001, // 0003 SETMBR R0 K0 R1 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: get_admin_vendor_name ********************************************************************/ @@ -1366,381 +1916,6 @@ be_local_closure(Matter_Fabric_get_admin_vendor_name, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: assign_fabric_index -********************************************************************/ -be_local_closure(Matter_Fabric_assign_fabric_index, /* 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[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(get_fabric_index), - /* K1 */ be_nested_str_weak(set_fabric_index), - /* K2 */ be_nested_str_weak(_store), - /* K3 */ be_nested_str_weak(next_fabric_idx), - }), - be_str_weak(assign_fabric_index), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x1C040202, // 0003 EQ R1 R1 R2 - 0x78060004, // 0004 JMPF R1 #000A - 0x8C040101, // 0005 GETMET R1 R0 K1 - 0x880C0102, // 0006 GETMBR R3 R0 K2 - 0x8C0C0703, // 0007 GETMET R3 R3 K3 - 0x7C0C0200, // 0008 CALL R3 1 - 0x7C040400, // 0009 CALL R1 2 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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: 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_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_ca -********************************************************************/ -be_local_closure(Matter_Fabric_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[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(root_ca_certificate), - }), - be_str_weak(get_ca), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: mark_for_deletion -********************************************************************/ -be_local_closure(Matter_Fabric_mark_for_deletion, /* 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[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(deleted), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(rtc_utc), - }), - be_str_weak(mark_for_deletion), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8060200, // 0000 GETNGBL R1 K1 - 0x8C040302, // 0001 GETMET R1 R1 K2 - 0x7C040200, // 0002 CALL R1 1 - 0x90020001, // 0003 SETMBR R0 K0 R1 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_fabric_index -********************************************************************/ -be_local_closure(Matter_Fabric_get_fabric_index, /* 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_index), - }), - be_str_weak(get_fabric_index), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 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: hydrate_post -********************************************************************/ -be_local_closure(Matter_Fabric_hydrate_post, /* 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(_counter_group_data_snd_impl), - /* K1 */ be_nested_str_weak(reset), - /* K2 */ be_nested_str_weak(counter_group_data_snd), - /* K3 */ be_nested_str_weak(_counter_group_ctrl_snd_impl), - /* K4 */ be_nested_str_weak(counter_group_ctrl_snd), - /* K5 */ be_nested_str_weak(val), - }), - be_str_weak(hydrate_post), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x7C040400, // 0003 CALL R1 2 - 0x88040103, // 0004 GETMBR R1 R0 K3 - 0x8C040301, // 0005 GETMET R1 R1 K1 - 0x880C0104, // 0006 GETMBR R3 R0 K4 - 0x7C040400, // 0007 CALL R1 2 - 0x88040100, // 0008 GETMBR R1 R0 K0 - 0x8C040305, // 0009 GETMET R1 R1 K5 - 0x7C040200, // 000A CALL R1 1 - 0x90020401, // 000B SETMBR R0 K2 R1 - 0x88040103, // 000C GETMBR R1 R0 K3 - 0x8C040305, // 000D GETMET R1 R1 K5 - 0x7C040200, // 000E CALL R1 1 - 0x90020801, // 000F SETMBR R0 K4 R1 - 0x80000000, // 0010 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: counter_group_ctrl_snd_next -********************************************************************/ -be_local_closure(Matter_Fabric_counter_group_ctrl_snd_next, /* 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[13]) { /* constants */ - /* K0 */ be_nested_str_weak(_counter_group_ctrl_snd_impl), - /* K1 */ be_nested_str_weak(next), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(log), - /* K4 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20Counter_group_ctrl_snd_X3D_X25i), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str_weak(matter), - /* K7 */ be_nested_str_weak(Counter), - /* K8 */ be_nested_str_weak(is_greater), - /* K9 */ be_nested_str_weak(counter_group_ctrl_snd), - /* K10 */ be_nested_str_weak(_GROUP_SND_INCR), - /* K11 */ be_nested_str_weak(does_persist), - /* K12 */ be_nested_str_weak(save), - }), - be_str_weak(counter_group_ctrl_snd_next), - &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0xB80A0400, // 0003 GETNGBL R2 K2 - 0x8C080503, // 0004 GETMET R2 R2 K3 - 0x60100018, // 0005 GETGBL R4 G24 - 0x58140004, // 0006 LDCONST R5 K4 - 0x5C180200, // 0007 MOVE R6 R1 - 0x7C100400, // 0008 CALL R4 2 - 0x58140005, // 0009 LDCONST R5 K5 - 0x7C080600, // 000A CALL R2 3 - 0xB80A0C00, // 000B GETNGBL R2 K6 - 0x88080507, // 000C GETMBR R2 R2 K7 - 0x8C080508, // 000D GETMET R2 R2 K8 - 0x5C100200, // 000E MOVE R4 R1 - 0x88140109, // 000F GETMBR R5 R0 K9 - 0x7C080600, // 0010 CALL R2 3 - 0x780A0007, // 0011 JMPF R2 #001A - 0x8808010A, // 0012 GETMBR R2 R0 K10 - 0x00080202, // 0013 ADD R2 R1 R2 - 0x90021202, // 0014 SETMBR R0 K9 R2 - 0x8C08010B, // 0015 GETMET R2 R0 K11 - 0x7C080200, // 0016 CALL R2 1 - 0x780A0001, // 0017 JMPF R2 #001A - 0x8C08010C, // 0018 GETMET R2 R0 K12 - 0x7C080200, // 0019 CALL R2 1 - 0x80040200, // 001A RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Fabric ********************************************************************/ @@ -1748,73 +1923,74 @@ extern const bclass be_class_Matter_Expirable; be_local_class(Matter_Fabric, 21, &be_class_Matter_Expirable, - be_nested_map(65, + be_nested_map(66, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(get_device_id_as_int64, -1), be_const_closure(Matter_Fabric_get_device_id_as_int64_closure) }, - { be_const_key_weak(admin_vendor, -1), be_const_var(20) }, - { be_const_key_weak(counter_group_ctrl_snd_next, -1), be_const_closure(Matter_Fabric_counter_group_ctrl_snd_next_closure) }, - { be_const_key_weak(hydrate_post, 12), be_const_closure(Matter_Fabric_hydrate_post_closure) }, - { be_const_key_weak(admin_subject, 63), be_const_var(19) }, - { be_const_key_weak(fabric_compressed, 36), be_const_var(12) }, - { be_const_key_weak(noc, -1), be_const_var(8) }, - { be_const_key_weak(add_session, -1), be_const_closure(Matter_Fabric_add_session_closure) }, - { be_const_key_weak(get_oldest_session, 22), be_const_closure(Matter_Fabric_get_oldest_session_closure) }, - { be_const_key_weak(get_ipk_epoch_key, -1), be_const_closure(Matter_Fabric_get_ipk_epoch_key_closure) }, - { be_const_key_weak(log_new_fabric, -1), be_const_closure(Matter_Fabric_log_new_fabric_closure) }, - { be_const_key_weak(fromjson, 64), be_const_static_closure(Matter_Fabric_fromjson_closure) }, - { be_const_key_weak(get_fabric_index, -1), be_const_closure(Matter_Fabric_get_fabric_index_closure) }, { be_const_key_weak(get_icac, -1), be_const_closure(Matter_Fabric_get_icac_closure) }, - { be_const_key_weak(set_fabric_index, -1), be_const_closure(Matter_Fabric_set_fabric_index_closure) }, - { be_const_key_weak(counter_group_ctrl_snd, -1), be_const_var(16) }, - { be_const_key_weak(get_noc, 4), be_const_closure(Matter_Fabric_get_noc_closure) }, - { be_const_key_weak(_counter_group_data_snd_impl, -1), be_const_var(17) }, - { be_const_key_weak(fabric_completed, -1), be_const_closure(Matter_Fabric_fabric_completed_closure) }, - { be_const_key_weak(_sessions, -1), be_const_var(5) }, - { be_const_key_weak(get_pk, -1), be_const_closure(Matter_Fabric_get_pk_closure) }, - { be_const_key_weak(mark_for_deletion, -1), be_const_closure(Matter_Fabric_mark_for_deletion_closure) }, - { be_const_key_weak(_store, 47), be_const_var(0) }, - { be_const_key_weak(get_newest_session, 58), be_const_closure(Matter_Fabric_get_newest_session_closure) }, + { be_const_key_weak(_counter_group_ctrl_snd_impl, 2), be_const_var(18) }, { be_const_key_weak(get_fabric_compressed, -1), be_const_closure(Matter_Fabric_get_fabric_compressed_closure) }, - { be_const_key_weak(before_remove, -1), be_const_closure(Matter_Fabric_before_remove_closure) }, - { be_const_key_weak(set_pk, 11), be_const_closure(Matter_Fabric_set_pk_closure) }, - { be_const_key_weak(root_ca_certificate, 37), be_const_var(7) }, - { be_const_key_weak(set_admin_subject_vendor, 29), be_const_closure(Matter_Fabric_set_admin_subject_vendor_closure) }, - { be_const_key_weak(get_old_recent_session, 42), be_const_closure(Matter_Fabric_get_old_recent_session_closure) }, - { be_const_key_weak(get_fabric_label, 10), be_const_closure(Matter_Fabric_get_fabric_label_closure) }, - { be_const_key_weak(tojson, 57), be_const_closure(Matter_Fabric_tojson_closure) }, - { be_const_key_weak(fabric_id, -1), be_const_var(11) }, - { be_const_key_weak(device_id, 24), be_const_var(13) }, - { be_const_key_weak(_counter_group_ctrl_snd_impl, -1), be_const_var(18) }, - { be_const_key_weak(_GROUP_KEY, -1), be_nested_str_weak(GroupKey_X20v1_X2E0) }, + { be_const_key_weak(get_pk, -1), be_const_closure(Matter_Fabric_get_pk_closure) }, + { be_const_key_weak(get_admin_vendor_name, 8), be_const_closure(Matter_Fabric_get_admin_vendor_name_closure) }, + { be_const_key_weak(get_fabric_id, -1), be_const_closure(Matter_Fabric_get_fabric_id_closure) }, + { be_const_key_weak(deleted, 49), be_const_var(2) }, + { be_const_key_weak(set_admin_subject_vendor, -1), be_const_closure(Matter_Fabric_set_admin_subject_vendor_closure) }, { be_const_key_weak(set_ipk_epoch_key, -1), be_const_closure(Matter_Fabric_set_ipk_epoch_key_closure) }, - { be_const_key_weak(fabric_label, -1), be_const_var(14) }, - { be_const_key_weak(get_ipk_group_key, 2), be_const_closure(Matter_Fabric_get_ipk_group_key_closure) }, - { be_const_key_weak(get_fabric_id_as_int64, -1), be_const_closure(Matter_Fabric_get_fabric_id_as_int64_closure) }, - { be_const_key_weak(no_private_key, -1), be_const_var(6) }, - { be_const_key_weak(get_admin_vendor, -1), be_const_closure(Matter_Fabric_get_admin_vendor_closure) }, - { be_const_key_weak(_MAX_CASE, -1), be_const_int(5) }, - { be_const_key_weak(is_marked_for_deletion, -1), be_const_closure(Matter_Fabric_is_marked_for_deletion_closure) }, - { be_const_key_weak(fabric_index, -1), be_const_var(3) }, - { be_const_key_weak(init, 21), be_const_closure(Matter_Fabric_init_closure) }, - { be_const_key_weak(get_admin_vendor_name, -1), be_const_closure(Matter_Fabric_get_admin_vendor_name_closure) }, - { be_const_key_weak(set_noc_icac, 55), be_const_closure(Matter_Fabric_set_noc_icac_closure) }, + { be_const_key_weak(fabric_parent, 45), be_const_var(4) }, + { be_const_key_weak(get_ipk_group_key, 18), be_const_closure(Matter_Fabric_get_ipk_group_key_closure) }, + { be_const_key_weak(fromjson, -1), be_const_static_closure(Matter_Fabric_fromjson_closure) }, { be_const_key_weak(set_ca, -1), be_const_closure(Matter_Fabric_set_ca_closure) }, - { be_const_key_weak(fabric_parent, -1), be_const_var(4) }, - { be_const_key_weak(fabric_candidate, 46), be_const_closure(Matter_Fabric_fabric_candidate_closure) }, - { be_const_key_weak(counter_group_data_snd, -1), be_const_var(15) }, - { be_const_key_weak(assign_fabric_index, -1), be_const_closure(Matter_Fabric_assign_fabric_index_closure) }, + { be_const_key_weak(counter_group_ctrl_snd, -1), be_const_var(16) }, + { be_const_key_weak(tojson, -1), be_const_closure(Matter_Fabric_tojson_closure) }, + { be_const_key_weak(hydrate_post, 53), be_const_closure(Matter_Fabric_hydrate_post_closure) }, + { be_const_key_weak(no_private_key, 58), be_const_var(6) }, + { be_const_key_weak(_sessions, -1), be_const_var(5) }, + { be_const_key_weak(fabric_compressed, -1), be_const_var(12) }, + { be_const_key_weak(device_id, -1), be_const_var(13) }, + { be_const_key_weak(get_noc, 25), be_const_closure(Matter_Fabric_get_noc_closure) }, + { be_const_key_weak(get_fabric_label, -1), be_const_closure(Matter_Fabric_get_fabric_label_closure) }, { be_const_key_weak(get_admin_subject, -1), be_const_closure(Matter_Fabric_get_admin_subject_closure) }, - { be_const_key_weak(created, 30), be_const_var(1) }, + { be_const_key_weak(before_remove, 28), be_const_closure(Matter_Fabric_before_remove_closure) }, + { be_const_key_weak(get_fabric_id_as_int64, -1), be_const_closure(Matter_Fabric_get_fabric_id_as_int64_closure) }, { be_const_key_weak(set_fabric_device, -1), be_const_closure(Matter_Fabric_set_fabric_device_closure) }, { be_const_key_weak(get_ca, -1), be_const_closure(Matter_Fabric_get_ca_closure) }, - { be_const_key_weak(counter_group_data_snd_next, -1), be_const_closure(Matter_Fabric_counter_group_data_snd_next_closure) }, { be_const_key_weak(ipk_epoch_key, -1), be_const_var(10) }, - { be_const_key_weak(get_ca_pub, 3), be_const_closure(Matter_Fabric_get_ca_pub_closure) }, + { be_const_key_weak(fabric_index, 48), be_const_var(3) }, + { be_const_key_weak(set_pk, -1), be_const_closure(Matter_Fabric_set_pk_closure) }, + { be_const_key_weak(fabric_completed, -1), be_const_closure(Matter_Fabric_fabric_completed_closure) }, + { be_const_key_weak(created, -1), be_const_var(1) }, + { be_const_key_weak(counter_group_data_snd_next, -1), be_const_closure(Matter_Fabric_counter_group_data_snd_next_closure) }, + { be_const_key_weak(set_noc_icac, -1), be_const_closure(Matter_Fabric_set_noc_icac_closure) }, { be_const_key_weak(_GROUP_SND_INCR, -1), be_const_int(32) }, - { be_const_key_weak(deleted, -1), be_const_var(2) }, - { be_const_key_weak(get_fabric_id, -1), be_const_closure(Matter_Fabric_get_fabric_id_closure) }, - { be_const_key_weak(get_device_id, -1), be_const_closure(Matter_Fabric_get_device_id_closure) }, + { be_const_key_weak(admin_vendor, 29), be_const_var(20) }, + { be_const_key_weak(fabric_id, -1), be_const_var(11) }, + { be_const_key_weak(fabric_label, -1), be_const_var(14) }, + { be_const_key_weak(log_new_fabric, -1), be_const_closure(Matter_Fabric_log_new_fabric_closure) }, + { be_const_key_weak(noc, -1), be_const_var(8) }, + { be_const_key_weak(_counter_group_data_snd_impl, -1), be_const_var(17) }, + { be_const_key_weak(get_newest_session, 37), be_const_closure(Matter_Fabric_get_newest_session_closure) }, + { be_const_key_weak(get_ca_pub, -1), be_const_closure(Matter_Fabric_get_ca_pub_closure) }, + { be_const_key_weak(add_session, -1), be_const_closure(Matter_Fabric_add_session_closure) }, + { be_const_key_weak(get_ipk_epoch_key, -1), be_const_closure(Matter_Fabric_get_ipk_epoch_key_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Fabric_init_closure) }, + { be_const_key_weak(writejson, -1), be_const_closure(Matter_Fabric_writejson_closure) }, + { be_const_key_weak(counter_group_ctrl_snd_next, -1), be_const_closure(Matter_Fabric_counter_group_ctrl_snd_next_closure) }, + { be_const_key_weak(_store, 61), be_const_var(0) }, + { be_const_key_weak(fabric_candidate, -1), be_const_closure(Matter_Fabric_fabric_candidate_closure) }, + { be_const_key_weak(counter_group_data_snd, -1), be_const_var(15) }, + { be_const_key_weak(assign_fabric_index, -1), be_const_closure(Matter_Fabric_assign_fabric_index_closure) }, + { be_const_key_weak(get_old_recent_session, -1), be_const_closure(Matter_Fabric_get_old_recent_session_closure) }, + { be_const_key_weak(admin_subject, -1), be_const_var(19) }, + { be_const_key_weak(get_fabric_index, 44), be_const_closure(Matter_Fabric_get_fabric_index_closure) }, + { be_const_key_weak(_GROUP_KEY, 43), be_nested_str_weak(GroupKey_X20v1_X2E0) }, + { be_const_key_weak(set_fabric_index, -1), be_const_closure(Matter_Fabric_set_fabric_index_closure) }, { be_const_key_weak(icac, -1), be_const_var(9) }, + { be_const_key_weak(root_ca_certificate, -1), be_const_var(7) }, + { be_const_key_weak(get_device_id_as_int64, -1), be_const_closure(Matter_Fabric_get_device_id_as_int64_closure) }, + { be_const_key_weak(get_device_id, 21), be_const_closure(Matter_Fabric_get_device_id_closure) }, + { be_const_key_weak(is_marked_for_deletion, -1), be_const_closure(Matter_Fabric_is_marked_for_deletion_closure) }, + { be_const_key_weak(get_oldest_session, 10), be_const_closure(Matter_Fabric_get_oldest_session_closure) }, + { be_const_key_weak(mark_for_deletion, -1), be_const_closure(Matter_Fabric_mark_for_deletion_closure) }, + { be_const_key_weak(get_admin_vendor, 4), be_const_closure(Matter_Fabric_get_admin_vendor_closure) }, + { be_const_key_weak(_MAX_CASE, -1), be_const_int(5) }, })), be_str_weak(Matter_Fabric) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h index 4747ddfb1..0eac96186 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h @@ -1194,7 +1194,7 @@ be_local_closure(Matter_Session_Store_save_fabrics, /* name */ /* K10 */ be_const_int(1), /* K11 */ be_nested_str_weak(stop_iteration), /* K12 */ be_nested_str_weak(_X2C), - /* K13 */ be_nested_str_weak(tojson), + /* K13 */ be_nested_str_weak(writejson), /* K14 */ be_nested_str_weak(_X5D), /* K15 */ be_nested_str_weak(close), /* K16 */ be_nested_str_weak(tasmota), @@ -1208,9 +1208,9 @@ be_local_closure(Matter_Session_Store_save_fabrics, /* name */ }), be_str_weak(save_fabrics), &be_const_str_solidified, - ( &(const binstruction[86]) { /* code */ + ( &(const binstruction[84]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 - 0xA8020041, // 0001 EXBLK 0 #0044 + 0xA802003F, // 0001 EXBLK 0 #0042 0x8C080101, // 0002 GETMET R2 R0 K1 0x7C080200, // 0003 CALL R2 1 0x58080002, // 0004 LDCONST R2 K2 @@ -1227,7 +1227,7 @@ be_local_closure(Matter_Session_Store_save_fabrics, /* name */ 0x8C180D08, // 000F GETMET R6 R6 K8 0x7C180200, // 0010 CALL R6 1 0x7C140200, // 0011 CALL R5 1 - 0xA802001A, // 0012 EXBLK 0 #002E + 0xA8020018, // 0012 EXBLK 0 #002C 0x5C180A00, // 0013 MOVE R6 R5 0x7C180000, // 0014 CALL R6 0 0x601C0010, // 0015 GETGBL R7 G16 @@ -1249,52 +1249,50 @@ be_local_closure(Matter_Session_Store_save_fabrics, /* name */ 0x5824000C, // 0025 LDCONST R9 K12 0x7C1C0400, // 0026 CALL R7 2 0x8C1C0D0D, // 0027 GETMET R7 R6 K13 - 0x7C1C0200, // 0028 CALL R7 1 - 0x8C200905, // 0029 GETMET R8 R4 K5 - 0x5C280E00, // 002A MOVE R10 R7 - 0x7C200400, // 002B CALL R8 2 - 0x000C070A, // 002C ADD R3 R3 K10 - 0x7001FFE4, // 002D JMP #0013 - 0x5814000B, // 002E LDCONST R5 K11 - 0xAC140200, // 002F CATCH R5 1 0 - 0xB0080000, // 0030 RAISE 2 R0 R0 - 0x8C140905, // 0031 GETMET R5 R4 K5 - 0x581C000E, // 0032 LDCONST R7 K14 - 0x7C140400, // 0033 CALL R5 2 - 0x8C14090F, // 0034 GETMET R5 R4 K15 - 0x7C140200, // 0035 CALL R5 1 - 0xB8162000, // 0036 GETNGBL R5 K16 - 0x8C140B11, // 0037 GETMET R5 R5 K17 - 0x601C0018, // 0038 GETGBL R7 G24 - 0x58200012, // 0039 LDCONST R8 K18 - 0x5C240600, // 003A MOVE R9 R3 - 0x5C280400, // 003B MOVE R10 R2 - 0x7C1C0600, // 003C CALL R7 3 - 0x58200013, // 003D LDCONST R8 K19 - 0x7C140600, // 003E CALL R5 3 - 0x88140114, // 003F GETMBR R5 R0 K20 - 0x8C140B15, // 0040 GETMET R5 R5 K21 - 0x7C140200, // 0041 CALL R5 1 - 0xA8040001, // 0042 EXBLK 1 1 - 0x70020010, // 0043 JMP #0055 - 0xAC080002, // 0044 CATCH R2 0 2 - 0x7002000D, // 0045 JMP #0054 - 0xB8122000, // 0046 GETNGBL R4 K16 - 0x8C100911, // 0047 GETMET R4 R4 K17 - 0x60180008, // 0048 GETGBL R6 G8 - 0x5C1C0400, // 0049 MOVE R7 R2 - 0x7C180200, // 004A CALL R6 1 - 0x001A2C06, // 004B ADD R6 K22 R6 - 0x00180D17, // 004C ADD R6 R6 K23 - 0x601C0008, // 004D GETGBL R7 G8 - 0x5C200600, // 004E MOVE R8 R3 - 0x7C1C0200, // 004F CALL R7 1 - 0x00180C07, // 0050 ADD R6 R6 R7 - 0x581C0013, // 0051 LDCONST R7 K19 - 0x7C100600, // 0052 CALL R4 3 - 0x70020000, // 0053 JMP #0055 - 0xB0080000, // 0054 RAISE 2 R0 R0 - 0x80000000, // 0055 RET 0 + 0x5C240800, // 0028 MOVE R9 R4 + 0x7C1C0400, // 0029 CALL R7 2 + 0x000C070A, // 002A ADD R3 R3 K10 + 0x7001FFE6, // 002B JMP #0013 + 0x5814000B, // 002C LDCONST R5 K11 + 0xAC140200, // 002D CATCH R5 1 0 + 0xB0080000, // 002E RAISE 2 R0 R0 + 0x8C140905, // 002F GETMET R5 R4 K5 + 0x581C000E, // 0030 LDCONST R7 K14 + 0x7C140400, // 0031 CALL R5 2 + 0x8C14090F, // 0032 GETMET R5 R4 K15 + 0x7C140200, // 0033 CALL R5 1 + 0xB8162000, // 0034 GETNGBL R5 K16 + 0x8C140B11, // 0035 GETMET R5 R5 K17 + 0x601C0018, // 0036 GETGBL R7 G24 + 0x58200012, // 0037 LDCONST R8 K18 + 0x5C240600, // 0038 MOVE R9 R3 + 0x5C280400, // 0039 MOVE R10 R2 + 0x7C1C0600, // 003A CALL R7 3 + 0x58200013, // 003B LDCONST R8 K19 + 0x7C140600, // 003C CALL R5 3 + 0x88140114, // 003D GETMBR R5 R0 K20 + 0x8C140B15, // 003E GETMET R5 R5 K21 + 0x7C140200, // 003F CALL R5 1 + 0xA8040001, // 0040 EXBLK 1 1 + 0x70020010, // 0041 JMP #0053 + 0xAC080002, // 0042 CATCH R2 0 2 + 0x7002000D, // 0043 JMP #0052 + 0xB8122000, // 0044 GETNGBL R4 K16 + 0x8C100911, // 0045 GETMET R4 R4 K17 + 0x60180008, // 0046 GETGBL R6 G8 + 0x5C1C0400, // 0047 MOVE R7 R2 + 0x7C180200, // 0048 CALL R6 1 + 0x001A2C06, // 0049 ADD R6 K22 R6 + 0x00180D17, // 004A ADD R6 R6 K23 + 0x601C0008, // 004B GETGBL R7 G8 + 0x5C200600, // 004C MOVE R8 R3 + 0x7C1C0200, // 004D CALL R7 1 + 0x00180C07, // 004E ADD R6 R6 R7 + 0x581C0013, // 004F LDCONST R7 K19 + 0x7C100600, // 0050 CALL R4 3 + 0x70020000, // 0051 JMP #0053 + 0xB0080000, // 0052 RAISE 2 R0 R0 + 0x80000000, // 0053 RET 0 }) ) );