decompiled_code:
void **__fastcall CANOpenShellSlaveOD_scanIndexOD(__int16 a1, _QWORD *a2, _QWORD *a3)
{
void **result; // rax

*a3 = 0LL;
switch ( a1 )
{
case 4096:
result = &CANOpenShellSlaveOD_objdict;
goto LABEL_4;
case 4097:
result = &CANOpenShellSlaveOD_objdict + 2;
goto LABEL_4;
case 4119:
*a3 = &CANOpenShellSlaveOD_Index1017_callbacks;
result = &CANOpenShellSlaveOD_objdict + 4;
goto LABEL_4;
case 4120:
result = &CANOpenShellSlaveOD_objdict + 6;
goto LABEL_4;
case 4736:
result = &CANOpenShellSlaveOD_objdict + 8;
goto LABEL_4;
case 4737:
result = &CANOpenShellSlaveOD_objdict + 10;
goto LABEL_4;
case 4738:
result = &CANOpenShellSlaveOD_objdict + 12;
goto LABEL_4;
case 4739:
result = &CANOpenShellSlaveOD_objdict + 14;
goto LABEL_4;
case 4740:
result = &CANOpenShellSlaveOD_objdict + 16;
goto LABEL_4;
case 4741:
result = &CANOpenShellSlaveOD_objdict + 18;
goto LABEL_4;
case 4742:
result = &CANOpenShellSlaveOD_objdict + 20;
goto LABEL_4;
case 4743:
result = &CANOpenShellSlaveOD_objdict + 22;
goto LABEL_4;
case 4744:
result = &CANOpenShellSlaveOD_objdict + 24;
goto LABEL_4;
case 4745:
result = &CANOpenShellSlaveOD_objdict + 26;
goto LABEL_4;
case 4746:
result = &CANOpenShellSlaveOD_objdict + 28;
goto LABEL_4;
case 4747:
result = &CANOpenShellSlaveOD_objdict + 30;
goto LABEL_4;
case 4748:
result = &CANOpenShellSlaveOD_objdict + 32;
goto LABEL_4;
case 4749:
result = &CANOpenShellSlaveOD_objdict + 34;
goto LABEL_4;
case 4750:
result = &CANOpenShellSlaveOD_objdict + 36;
goto LABEL_4;
case 4751:
result = &CANOpenShellSlaveOD_objdict + 38;
goto LABEL_4;
case 4752:
result = &CANOpenShellSlaveOD_objdict + 40;
goto LABEL_4;
case 4753:
result = &CANOpenShellSlaveOD_objdict + 42;
goto LABEL_4;
case 4754:
result = &CANOpenShellSlaveOD_objdict + 44;
goto LABEL_4;
case 4755:
result = &CANOpenShellSlaveOD_objdict + 46;
goto LABEL_4;
case 4756:
result = &CANOpenShellSlaveOD_objdict + 48;
goto LABEL_4;
case 4757:
result = &CANOpenShellSlaveOD_objdict + 50;
goto LABEL_4;
case 4758:
result = &CANOpenShellSlaveOD_objdict + 52;
goto LABEL_4;
case 4759:
result = &CANOpenShellSlaveOD_objdict + 54;
goto LABEL_4;
case 4760:
result = &CANOpenShellSlaveOD_objdict + 56;
goto LABEL_4;
case 4761:
result = &CANOpenShellSlaveOD_objdict + 58;
goto LABEL_4;
case 4762:
result = &CANOpenShellSlaveOD_objdict + 60;
goto LABEL_4;
case 4763:
result = &CANOpenShellSlaveOD_objdict + 62;
goto LABEL_4;
case 4764:
result = &CANOpenShellSlaveOD_objdict + 64;
goto LABEL_4;
case 4765:
result = &CANOpenShellSlaveOD_objdict + 66;
goto LABEL_4;
case 4766:
result = &CANOpenShellSlaveOD_objdict + 68;
goto LABEL_4;
case 4767:
result = &CANOpenShellSlaveOD_objdict + 70;
goto LABEL_4;
case 4768:
result = &CANOpenShellSlaveOD_objdict + 72;
goto LABEL_4;
case 4769:
result = &CANOpenShellSlaveOD_objdict + 74;
goto LABEL_4;
case 4770:
result = &CANOpenShellSlaveOD_objdict + 76;
goto LABEL_4;
case 4771:
result = &CANOpenShellSlaveOD_objdict + 78;
goto LABEL_4;
case 4772:
result = &CANOpenShellSlaveOD_objdict + 80;
goto LABEL_4;
case 4773:
result = &CANOpenShellSlaveOD_objdict + 82;
goto LABEL_4;
case 4774:
result = &CANOpenShellSlaveOD_objdict + 84;
goto LABEL_4;
case 4775:
result = &CANOpenShellSlaveOD_objdict + 86;
goto LABEL_4;
case 4776:
result = &CANOpenShellSlaveOD_objdict + 88;
goto LABEL_4;
case 4777:
result = &CANOpenShellSlaveOD_objdict + 90;
goto LABEL_4;
case 4778:
result = &CANOpenShellSlaveOD_objdict + 92;
goto LABEL_4;
case 4779:
result = &CANOpenShellSlaveOD_objdict + 94;
goto LABEL_4;
case 4780:
result = &CANOpenShellSlaveOD_objdict + 96;
goto LABEL_4;
case 4781:
result = &CANOpenShellSlaveOD_objdict + 98;
goto LABEL_4;
case 4782:
result = &CANOpenShellSlaveOD_objdict + 100;
goto LABEL_4;
case 4783:
result = &CANOpenShellSlaveOD_objdict + 102;
goto LABEL_4;
case 4784:
result = &CANOpenShellSlaveOD_objdict + 104;
goto LABEL_4;
case 4785:
result = &CANOpenShellSlaveOD_objdict + 106;
goto LABEL_4;
case 4786:
result = &CANOpenShellSlaveOD_objdict + 108;
goto LABEL_4;
case 4787:
result = &CANOpenShellSlaveOD_objdict + 110;
goto LABEL_4;
case 4788:
result = &CANOpenShellSlaveOD_objdict + 112;
goto LABEL_4;
case 4789:
result = &CANOpenShellSlaveOD_objdict + 114;
goto LABEL_4;
case 4790:
result = &CANOpenShellSlaveOD_objdict + 116;
goto LABEL_4;
case 4791:
result = &CANOpenShellSlaveOD_objdict + 118;
goto LABEL_4;
case 4792:
result = &CANOpenShellSlaveOD_objdict + 120;
goto LABEL_4;
case 4793:
result = &CANOpenShellSlaveOD_objdict + 122;
goto LABEL_4;
case 4794:
result = &CANOpenShellSlaveOD_objdict + 124;
goto LABEL_4;
case 4795:
result = &CANOpenShellSlaveOD_objdict + 126;
goto LABEL_4;
case 4796:
result = &CANOpenShellSlaveOD_objdict + 128;
goto LABEL_4;
case 4797:
result = &CANOpenShellSlaveOD_objdict + 130;
goto LABEL_4;
case 4798:
result = &CANOpenShellSlaveOD_objdict + 132;
goto LABEL_4;
case 4799:
result = &CANOpenShellSlaveOD_objdict + 134;
goto LABEL_4;
case 4800:
result = &CANOpenShellSlaveOD_objdict + 136;
goto LABEL_4;
case 4801:
result = &CANOpenShellSlaveOD_objdict + 138;
goto LABEL_4;
case 4802:
result = &CANOpenShellSlaveOD_objdict + 140;
goto LABEL_4;
case 4803:
result = &CANOpenShellSlaveOD_objdict + 142;
goto LABEL_4;
case 4804:
result = &CANOpenShellSlaveOD_objdict + 144;
goto LABEL_4;
case 4805:
result = &CANOpenShellSlaveOD_objdict + 146;
goto LABEL_4;
case 4806:
result = &CANOpenShellSlaveOD_objdict + 148;
goto LABEL_4;
case 4807:
result = &CANOpenShellSlaveOD_objdict + 150;
goto LABEL_4;
case 4808:
result = &CANOpenShellSlaveOD_objdict + 152;
goto LABEL_4;
case 4809:
result = &CANOpenShellSlaveOD_objdict + 154;
goto LABEL_4;
case 4810:
result = &CANOpenShellSlaveOD_objdict + 156;
goto LABEL_4;
case 4811:
result = &CANOpenShellSlaveOD_objdict + 158;
goto LABEL_4;
case 4812:
result = &CANOpenShellSlaveOD_objdict + 160;
goto LABEL_4;
case 4813:
result = &CANOpenShellSlaveOD_objdict + 162;
goto LABEL_4;
case 4814:
result = &CANOpenShellSlaveOD_objdict + 164;
goto LABEL_4;
case 4815:
result = &CANOpenShellSlaveOD_objdict + 166;
goto LABEL_4;
case 4816:
result = &CANOpenShellSlaveOD_objdict + 168;
goto LABEL_4;
case 4817:
result = &CANOpenShellSlaveOD_objdict + 170;
goto LABEL_4;
case 4818:
result = &CANOpenShellSlaveOD_objdict + 172;
goto LABEL_4;
case 4819:
result = &CANOpenShellSlaveOD_objdict + 174;
goto LABEL_4;
case 4820:
result = &CANOpenShellSlaveOD_objdict + 176;
goto LABEL_4;
case 4821:
result = &CANOpenShellSlaveOD_objdict + 178;
goto LABEL_4;
case 4822:
result = &CANOpenShellSlaveOD_objdict + 180;
goto LABEL_4;
case 4823:
result = &CANOpenShellSlaveOD_objdict + 182;
goto LABEL_4;
case 4824:
result = &CANOpenShellSlaveOD_objdict + 184;
goto LABEL_4;
case 4825:
result = &CANOpenShellSlaveOD_objdict + 186;
goto LABEL_4;
case 4826:
result = &CANOpenShellSlaveOD_objdict + 188;
goto LABEL_4;
case 4827:
result = &CANOpenShellSlaveOD_objdict + 190;
goto LABEL_4;
case 4828:
result = &CANOpenShellSlaveOD_objdict + 192;
goto LABEL_4;
case 4829:
result = &CANOpenShellSlaveOD_objdict + 194;
goto LABEL_4;
case 4830:
result = &CANOpenShellSlaveOD_objdict + 196;
goto LABEL_4;
case 4831:
result = &CANOpenShellSlaveOD_objdict + 198;
goto LABEL_4;
case 4832:
result = &CANOpenShellSlaveOD_objdict + 200;
goto LABEL_4;
case 4833:
result = &CANOpenShellSlaveOD_objdict + 202;
goto LABEL_4;
case 4834:
result = &CANOpenShellSlaveOD_objdict + 204;
goto LABEL_4;
case 4835:
result = &CANOpenShellSlaveOD_objdict + 206;
goto LABEL_4;
case 4836:
result = &CANOpenShellSlaveOD_objdict + 208;
goto LABEL_4;
case 4837:
result = &CANOpenShellSlaveOD_objdict + 210;
goto LABEL_4;
case 4838:
result = &CANOpenShellSlaveOD_objdict + 212;
goto LABEL_4;
case 4839:
result = &CANOpenShellSlaveOD_objdict + 214;
goto LABEL_4;
case 4840:
result = &CANOpenShellSlaveOD_objdict + 216;
goto LABEL_4;
case 4841:
result = &CANOpenShellSlaveOD_objdict + 218;
goto LABEL_4;
case 4842:
result = &CANOpenShellSlaveOD_objdict + 220;
goto LABEL_4;
case 4843:
result = &CANOpenShellSlaveOD_objdict + 222;
goto LABEL_4;
case 4844:
result = &CANOpenShellSlaveOD_objdict + 224;
goto LABEL_4;
case 4845:
result = &CANOpenShellSlaveOD_objdict + 226;
goto LABEL_4;
case 4846:
result = &CANOpenShellSlaveOD_objdict + 228;
goto LABEL_4;
case 4847:
result = &CANOpenShellSlaveOD_objdict + 230;
goto LABEL_4;
case 4848:
result = &CANOpenShellSlaveOD_objdict + 232;
goto LABEL_4;
case 4849:
result = &CANOpenShellSlaveOD_objdict + 234;
goto LABEL_4;
case 4850:
result = &CANOpenShellSlaveOD_objdict + 236;
goto LABEL_4;
case 4851:
result = &CANOpenShellSlaveOD_objdict + 238;
goto LABEL_4;
case 4852:
result = &CANOpenShellSlaveOD_objdict + 240;
goto LABEL_4;
case 4853:
result = &CANOpenShellSlaveOD_objdict + 242;
goto LABEL_4;
case 4854:
result = &CANOpenShellSlaveOD_objdict + 244;
goto LABEL_4;
case 4855:
result = &CANOpenShellSlaveOD_objdict + 246;
goto LABEL_4;
case 4856:
result = &CANOpenShellSlaveOD_objdict + 248;
goto LABEL_4;
case 4857:
result = &CANOpenShellSlaveOD_objdict + 250;
goto LABEL_4;
case 4858:
result = &CANOpenShellSlaveOD_objdict + 252;
goto LABEL_4;
case 4859:
result = &CANOpenShellSlaveOD_objdict + 254;
goto LABEL_4;
case 4860:
result = &CANOpenShellSlaveOD_objdict + 256;
goto LABEL_4;
case 4861:
result = &CANOpenShellSlaveOD_objdict + 258;
goto LABEL_4;
case 4862:
result = &CANOpenShellSlaveOD_objdict + 260;
LABEL_4:
*a2 = 0LL;
break;
default:
*a2 = 100794368LL;
result = 0LL;
break;
}
return result;
}

canonical_decompiled_code:
void **__fastcall func1(__int16 a1, _QWORD *a2, _QWORD *a3)
{
void **result; // rax

*a3 = 0LL;
switch ( a1 )
{
case 4096:
result = &CANOpenShellSlaveOD_objdict;
goto LABEL_4;
case 4097:
result = &CANOpenShellSlaveOD_objdict + 2;
goto LABEL_4;
case 4119:
*a3 = &CANOpenShellSlaveOD_Index1017_callbacks;
result = &CANOpenShellSlaveOD_objdict + 4;
goto LABEL_4;
case 4120:
result = &CANOpenShellSlaveOD_objdict + 6;
goto LABEL_4;
case 4736:
result = &CANOpenShellSlaveOD_objdict + 8;
goto LABEL_4;
case 4737:
result = &CANOpenShellSlaveOD_objdict + 10;
goto LABEL_4;
case 4738:
result = &CANOpenShellSlaveOD_objdict + 12;
goto LABEL_4;
case 4739:
result = &CANOpenShellSlaveOD_objdict + 14;
goto LABEL_4;
case 4740:
result = &CANOpenShellSlaveOD_objdict + 16;
goto LABEL_4;
case 4741:
result = &CANOpenShellSlaveOD_objdict + 18;
goto LABEL_4;
case 4742:
result = &CANOpenShellSlaveOD_objdict + 20;
goto LABEL_4;
case 4743:
result = &CANOpenShellSlaveOD_objdict + 22;
goto LABEL_4;
case 4744:
result = &CANOpenShellSlaveOD_objdict + 24;
goto LABEL_4;
case 4745:
result = &CANOpenShellSlaveOD_objdict + 26;
goto LABEL_4;
case 4746:
result = &CANOpenShellSlaveOD_objdict + 28;
goto LABEL_4;
case 4747:
result = &CANOpenShellSlaveOD_objdict + 30;
goto LABEL_4;
case 4748:
result = &CANOpenShellSlaveOD_objdict + 32;
goto LABEL_4;
case 4749:
result = &CANOpenShellSlaveOD_objdict + 34;
goto LABEL_4;
case 4750:
result = &CANOpenShellSlaveOD_objdict + 36;
goto LABEL_4;
case 4751:
result = &CANOpenShellSlaveOD_objdict + 38;
goto LABEL_4;
case 4752:
result = &CANOpenShellSlaveOD_objdict + 40;
goto LABEL_4;
case 4753:
result = &CANOpenShellSlaveOD_objdict + 42;
goto LABEL_4;
case 4754:
result = &CANOpenShellSlaveOD_objdict + 44;
goto LABEL_4;
case 4755:
result = &CANOpenShellSlaveOD_objdict + 46;
goto LABEL_4;
case 4756:
result = &CANOpenShellSlaveOD_objdict + 48;
goto LABEL_4;
case 4757:
result = &CANOpenShellSlaveOD_objdict + 50;
goto LABEL_4;
case 4758:
result = &CANOpenShellSlaveOD_objdict + 52;
goto LABEL_4;
case 4759:
result = &CANOpenShellSlaveOD_objdict + 54;
goto LABEL_4;
case 4760:
result = &CANOpenShellSlaveOD_objdict + 56;
goto LABEL_4;
case 4761:
result = &CANOpenShellSlaveOD_objdict + 58;
goto LABEL_4;
case 4762:
result = &CANOpenShellSlaveOD_objdict + 60;
goto LABEL_4;
case 4763:
result = &CANOpenShellSlaveOD_objdict + 62;
goto LABEL_4;
case 4764:
result = &CANOpenShellSlaveOD_objdict + 64;
goto LABEL_4;
case 4765:
result = &CANOpenShellSlaveOD_objdict + 66;
goto LABEL_4;
case 4766:
result = &CANOpenShellSlaveOD_objdict + 68;
goto LABEL_4;
case 4767:
result = &CANOpenShellSlaveOD_objdict + 70;
goto LABEL_4;
case 4768:
result = &CANOpenShellSlaveOD_objdict + 72;
goto LABEL_4;
case 4769:
result = &CANOpenShellSlaveOD_objdict + 74;
goto LABEL_4;
case 4770:
result = &CANOpenShellSlaveOD_objdict + 76;
goto LABEL_4;
case 4771:
result = &CANOpenShellSlaveOD_objdict + 78;
goto LABEL_4;
case 4772:
result = &CANOpenShellSlaveOD_objdict + 80;
goto LABEL_4;
case 4773:
result = &CANOpenShellSlaveOD_objdict + 82;
goto LABEL_4;
case 4774:
result = &CANOpenShellSlaveOD_objdict + 84;
goto LABEL_4;
case 4775:
result = &CANOpenShellSlaveOD_objdict + 86;
goto LABEL_4;
case 4776:
result = &CANOpenShellSlaveOD_objdict + 88;
goto LABEL_4;
case 4777:
result = &CANOpenShellSlaveOD_objdict + 90;
goto LABEL_4;
case 4778:
result = &CANOpenShellSlaveOD_objdict + 92;
goto LABEL_4;
case 4779:
result = &CANOpenShellSlaveOD_objdict + 94;
goto LABEL_4;
case 4780:
result = &CANOpenShellSlaveOD_objdict + 96;
goto LABEL_4;
case 4781:
result = &CANOpenShellSlaveOD_objdict + 98;
goto LABEL_4;
case 4782:
result = &CANOpenShellSlaveOD_objdict + 100;
goto LABEL_4;
case 4783:
result = &CANOpenShellSlaveOD_objdict + 102;
goto LABEL_4;
case 4784:
result = &CANOpenShellSlaveOD_objdict + 104;
goto LABEL_4;
case 4785:
result = &CANOpenShellSlaveOD_objdict + 106;
goto LABEL_4;
case 4786:
result = &CANOpenShellSlaveOD_objdict + 108;
goto LABEL_4;
case 4787:
result = &CANOpenShellSlaveOD_objdict + 110;
goto LABEL_4;
case 4788:
result = &CANOpenShellSlaveOD_objdict + 112;
goto LABEL_4;
case 4789:
result = &CANOpenShellSlaveOD_objdict + 114;
goto LABEL_4;
case 4790:
result = &CANOpenShellSlaveOD_objdict + 116;
goto LABEL_4;
case 4791:
result = &CANOpenShellSlaveOD_objdict + 118;
goto LABEL_4;
case 4792:
result = &CANOpenShellSlaveOD_objdict + 120;
goto LABEL_4;
case 4793:
result = &CANOpenShellSlaveOD_objdict + 122;
goto LABEL_4;
case 4794:
result = &CANOpenShellSlaveOD_objdict + 124;
goto LABEL_4;
case 4795:
result = &CANOpenShellSlaveOD_objdict + 126;
goto LABEL_4;
case 4796:
result = &CANOpenShellSlaveOD_objdict + 128;
goto LABEL_4;
case 4797:
result = &CANOpenShellSlaveOD_objdict + 130;
goto LABEL_4;
case 4798:
result = &CANOpenShellSlaveOD_objdict + 132;
goto LABEL_4;
case 4799:
result = &CANOpenShellSlaveOD_objdict + 134;
goto LABEL_4;
case 4800:
result = &CANOpenShellSlaveOD_objdict + 136;
goto LABEL_4;
case 4801:
result = &CANOpenShellSlaveOD_objdict + 138;
goto LABEL_4;
case 4802:
result = &CANOpenShellSlaveOD_objdict + 140;
goto LABEL_4;
case 4803:
result = &CANOpenShellSlaveOD_objdict + 142;
goto LABEL_4;
case 4804:
result = &CANOpenShellSlaveOD_objdict + 144;
goto LABEL_4;
case 4805:
result = &CANOpenShellSlaveOD_objdict + 146;
goto LABEL_4;
case 4806:
result = &CANOpenShellSlaveOD_objdict + 148;
goto LABEL_4;
case 4807:
result = &CANOpenShellSlaveOD_objdict + 150;
goto LABEL_4;
case 4808:
result = &CANOpenShellSlaveOD_objdict + 152;
goto LABEL_4;
case 4809:
result = &CANOpenShellSlaveOD_objdict + 154;
goto LABEL_4;
case 4810:
result = &CANOpenShellSlaveOD_objdict + 156;
goto LABEL_4;
case 4811:
result = &CANOpenShellSlaveOD_objdict + 158;
goto LABEL_4;
case 4812:
result = &CANOpenShellSlaveOD_objdict + 160;
goto LABEL_4;
case 4813:
result = &CANOpenShellSlaveOD_objdict + 162;
goto LABEL_4;
case 4814:
result = &CANOpenShellSlaveOD_objdict + 164;
goto LABEL_4;
case 4815:
result = &CANOpenShellSlaveOD_objdict + 166;
goto LABEL_4;
case 4816:
result = &CANOpenShellSlaveOD_objdict + 168;
goto LABEL_4;
case 4817:
result = &CANOpenShellSlaveOD_objdict + 170;
goto LABEL_4;
case 4818:
result = &CANOpenShellSlaveOD_objdict + 172;
goto LABEL_4;
case 4819:
result = &CANOpenShellSlaveOD_objdict + 174;
goto LABEL_4;
case 4820:
result = &CANOpenShellSlaveOD_objdict + 176;
goto LABEL_4;
case 4821:
result = &CANOpenShellSlaveOD_objdict + 178;
goto LABEL_4;
case 4822:
result = &CANOpenShellSlaveOD_objdict + 180;
goto LABEL_4;
case 4823:
result = &CANOpenShellSlaveOD_objdict + 182;
goto LABEL_4;
case 4824:
result = &CANOpenShellSlaveOD_objdict + 184;
goto LABEL_4;
case 4825:
result = &CANOpenShellSlaveOD_objdict + 186;
goto LABEL_4;
case 4826:
result = &CANOpenShellSlaveOD_objdict + 188;
goto LABEL_4;
case 4827:
result = &CANOpenShellSlaveOD_objdict + 190;
goto LABEL_4;
case 4828:
result = &CANOpenShellSlaveOD_objdict + 192;
goto LABEL_4;
case 4829:
result = &CANOpenShellSlaveOD_objdict + 194;
goto LABEL_4;
case 4830:
result = &CANOpenShellSlaveOD_objdict + 196;
goto LABEL_4;
case 4831:
result = &CANOpenShellSlaveOD_objdict + 198;
goto LABEL_4;
case 4832:
result = &CANOpenShellSlaveOD_objdict + 200;
goto LABEL_4;
case 4833:
result = &CANOpenShellSlaveOD_objdict + 202;
goto LABEL_4;
case 4834:
result = &CANOpenShellSlaveOD_objdict + 204;
goto LABEL_4;
case 4835:
result = &CANOpenShellSlaveOD_objdict + 206;
goto LABEL_4;
case 4836:
result = &CANOpenShellSlaveOD_objdict + 208;
goto LABEL_4;
case 4837:
result = &CANOpenShellSlaveOD_objdict + 210;
goto LABEL_4;
case 4838:
result = &CANOpenShellSlaveOD_objdict + 212;
goto LABEL_4;
case 4839:
result = &CANOpenShellSlaveOD_objdict + 214;
goto LABEL_4;
case 4840:
result = &CANOpenShellSlaveOD_objdict + 216;
goto LABEL_4;
case 4841:
result = &CANOpenShellSlaveOD_objdict + 218;
goto LABEL_4;
case 4842:
result = &CANOpenShellSlaveOD_objdict + 220;
goto LABEL_4;
case 4843:
result = &CANOpenShellSlaveOD_objdict + 222;
goto LABEL_4;
case 4844:
result = &CANOpenShellSlaveOD_objdict + 224;
goto LABEL_4;
case 4845:
result = &CANOpenShellSlaveOD_objdict + 226;
goto LABEL_4;
case 4846:
result = &CANOpenShellSlaveOD_objdict + 228;
goto LABEL_4;
case 4847:
result = &CANOpenShellSlaveOD_objdict + 230;
goto LABEL_4;
case 4848:
result = &CANOpenShellSlaveOD_objdict + 232;
goto LABEL_4;
case 4849:
result = &CANOpenShellSlaveOD_objdict + 234;
goto LABEL_4;
case 4850:
result = &CANOpenShellSlaveOD_objdict + 236;
goto LABEL_4;
case 4851:
result = &CANOpenShellSlaveOD_objdict + 238;
goto LABEL_4;
case 4852:
result = &CANOpenShellSlaveOD_objdict + 240;
goto LABEL_4;
case 4853:
result = &CANOpenShellSlaveOD_objdict + 242;
goto LABEL_4;
case 4854:
result = &CANOpenShellSlaveOD_objdict + 244;
goto LABEL_4;
case 4855:
result = &CANOpenShellSlaveOD_objdict + 246;
goto LABEL_4;
case 4856:
result = &CANOpenShellSlaveOD_objdict + 248;
goto LABEL_4;
case 4857:
result = &CANOpenShellSlaveOD_objdict + 250;
goto LABEL_4;
case 4858:
result = &CANOpenShellSlaveOD_objdict + 252;
goto LABEL_4;
case 4859:
result = &CANOpenShellSlaveOD_objdict + 254;
goto LABEL_4;
case 4860:
result = &CANOpenShellSlaveOD_objdict + 256;
goto LABEL_4;
case 4861:
result = &CANOpenShellSlaveOD_objdict + 258;
goto LABEL_4;
case 4862:
result = &CANOpenShellSlaveOD_objdict + 260;
LABEL_4:
*a2 = 0LL;
break;
default:
*a2 = 100794368LL;
result = 0LL;
break;
}
return result;
}

original_code:
const indextable * CANOpenShellSlaveOD_scanIndexOD (unsigned short wIndex, unsigned long int * errorCode, ODCallback_t **callbacks)
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1017: i = 2;*callbacks = CANOpenShellSlaveOD_Index1017_callbacks; break;
  case 0x1018: i = 3;break;
  case 0x1280: i = 4;break;
  case 0x1281: i = 5;break;
  case 0x1282: i = 6;break;
  case 0x1283: i = 7;break;
  case 0x1284: i = 8;break;
  case 0x1285: i = 9;break;
  case 0x1286: i = 10;break;
  case 0x1287: i = 11;break;
  case 0x1288: i = 12;break;
  case 0x1289: i = 13;break;
  case 0x128A: i = 14;break;
  case 0x128B: i = 15;break;
  case 0x128C: i = 16;break;
  case 0x128D: i = 17;break;
  case 0x128E: i = 18;break;
  case 0x128F: i = 19;break;
  case 0x1290: i = 20;break;
  case 0x1291: i = 21;break;
  case 0x1292: i = 22;break;
  case 0x1293: i = 23;break;
  case 0x1294: i = 24;break;
  case 0x1295: i = 25;break;
  case 0x1296: i = 26;break;
  case 0x1297: i = 27;break;
  case 0x1298: i = 28;break;
  case 0x1299: i = 29;break;
  case 0x129A: i = 30;break;
  case 0x129B: i = 31;break;
  case 0x129C: i = 32;break;
  case 0x129D: i = 33;break;
  case 0x129E: i = 34;break;
  case 0x129F: i = 35;break;
  case 0x12A0: i = 36;break;
  case 0x12A1: i = 37;break;
  case 0x12A2: i = 38;break;
  case 0x12A3: i = 39;break;
  case 0x12A4: i = 40;break;
  case 0x12A5: i = 41;break;
  case 0x12A6: i = 42;break;
  case 0x12A7: i = 43;break;
  case 0x12A8: i = 44;break;
  case 0x12A9: i = 45;break;
  case 0x12AA: i = 46;break;
  case 0x12AB: i = 47;break;
  case 0x12AC: i = 48;break;
  case 0x12AD: i = 49;break;
  case 0x12AE: i = 50;break;
  case 0x12AF: i = 51;break;
  case 0x12B0: i = 52;break;
  case 0x12B1: i = 53;break;
  case 0x12B2: i = 54;break;
  case 0x12B3: i = 55;break;
  case 0x12B4: i = 56;break;
  case 0x12B5: i = 57;break;
  case 0x12B6: i = 58;break;
  case 0x12B7: i = 59;break;
  case 0x12B8: i = 60;break;
  case 0x12B9: i = 61;break;
  case 0x12BA: i = 62;break;
  case 0x12BB: i = 63;break;
  case 0x12BC: i = 64;break;
  case 0x12BD: i = 65;break;
  case 0x12BE: i = 66;break;
  case 0x12BF: i = 67;break;
  case 0x12C0: i = 68;break;
  case 0x12C1: i = 69;break;
  case 0x12C2: i = 70;break;
  case 0x12C3: i = 71;break;
  case 0x12C4: i = 72;break;
  case 0x12C5: i = 73;break;
  case 0x12C6: i = 74;break;
  case 0x12C7: i = 75;break;
  case 0x12C8: i = 76;break;
  case 0x12C9: i = 77;break;
  case 0x12CA: i = 78;break;
  case 0x12CB: i = 79;break;
  case 0x12CC: i = 80;break;
  case 0x12CD: i = 81;break;
  case 0x12CE: i = 82;break;
  case 0x12CF: i = 83;break;
  case 0x12D0: i = 84;break;
  case 0x12D1: i = 85;break;
  case 0x12D2: i = 86;break;
  case 0x12D3: i = 87;break;
  case 0x12D4: i = 88;break;
  case 0x12D5: i = 89;break;
  case 0x12D6: i = 90;break;
  case 0x12D7: i = 91;break;
  case 0x12D8: i = 92;break;
  case 0x12D9: i = 93;break;
  case 0x12DA: i = 94;break;
  case 0x12DB: i = 95;break;
  case 0x12DC: i = 96;break;
  case 0x12DD: i = 97;break;
  case 0x12DE: i = 98;break;
  case 0x12DF: i = 99;break;
  case 0x12E0: i = 100;break;
  case 0x12E1: i = 101;break;
  case 0x12E2: i = 102;break;
  case 0x12E3: i = 103;break;
  case 0x12E4: i = 104;break;
  case 0x12E5: i = 105;break;
  case 0x12E6: i = 106;break;
  case 0x12E7: i = 107;break;
  case 0x12E8: i = 108;break;
  case 0x12E9: i = 109;break;
  case 0x12EA: i = 110;break;
  case 0x12EB: i = 111;break;
  case 0x12EC: i = 112;break;
  case 0x12ED: i = 113;break;
  case 0x12EE: i = 114;break;
  case 0x12EF: i = 115;break;
  case 0x12F0: i = 116;break;
  case 0x12F1: i = 117;break;
  case 0x12F2: i = 118;break;
  case 0x12F3: i = 119;break;
  case 0x12F4: i = 120;break;
  case 0x12F5: i = 121;break;
  case 0x12F6: i = 122;break;
  case 0x12F7: i = 123;break;
  case 0x12F8: i = 124;break;
  case 0x12F9: i = 125;break;
  case 0x12FA: i = 126;break;
  case 0x12FB: i = 127;break;
  case 0x12FC: i = 128;break;
  case 0x12FD: i = 129;break;
  case 0x12FE: i = 130;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &CANOpenShellSlaveOD_objdict[i];
}

canonical_original_code:
struct td_indextable *CANOpenShellSlaveOD_scanIndexOD(unsigned short wIndex, unsigned long *errorCode, unsigned long (***callbacks)(struct struct_CO_Data *d, struct td_indextable *, unsigned char bSubindex))
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1017: i = 2;*callbacks = CANOpenShellSlaveOD_Index1017_callbacks; break;
  case 0x1018: i = 3;break;
  case 0x1280: i = 4;break;
  case 0x1281: i = 5;break;
  case 0x1282: i = 6;break;
  case 0x1283: i = 7;break;
  case 0x1284: i = 8;break;
  case 0x1285: i = 9;break;
  case 0x1286: i = 10;break;
  case 0x1287: i = 11;break;
  case 0x1288: i = 12;break;
  case 0x1289: i = 13;break;
  case 0x128A: i = 14;break;
  case 0x128B: i = 15;break;
  case 0x128C: i = 16;break;
  case 0x128D: i = 17;break;
  case 0x128E: i = 18;break;
  case 0x128F: i = 19;break;
  case 0x1290: i = 20;break;
  case 0x1291: i = 21;break;
  case 0x1292: i = 22;break;
  case 0x1293: i = 23;break;
  case 0x1294: i = 24;break;
  case 0x1295: i = 25;break;
  case 0x1296: i = 26;break;
  case 0x1297: i = 27;break;
  case 0x1298: i = 28;break;
  case 0x1299: i = 29;break;
  case 0x129A: i = 30;break;
  case 0x129B: i = 31;break;
  case 0x129C: i = 32;break;
  case 0x129D: i = 33;break;
  case 0x129E: i = 34;break;
  case 0x129F: i = 35;break;
  case 0x12A0: i = 36;break;
  case 0x12A1: i = 37;break;
  case 0x12A2: i = 38;break;
  case 0x12A3: i = 39;break;
  case 0x12A4: i = 40;break;
  case 0x12A5: i = 41;break;
  case 0x12A6: i = 42;break;
  case 0x12A7: i = 43;break;
  case 0x12A8: i = 44;break;
  case 0x12A9: i = 45;break;
  case 0x12AA: i = 46;break;
  case 0x12AB: i = 47;break;
  case 0x12AC: i = 48;break;
  case 0x12AD: i = 49;break;
  case 0x12AE: i = 50;break;
  case 0x12AF: i = 51;break;
  case 0x12B0: i = 52;break;
  case 0x12B1: i = 53;break;
  case 0x12B2: i = 54;break;
  case 0x12B3: i = 55;break;
  case 0x12B4: i = 56;break;
  case 0x12B5: i = 57;break;
  case 0x12B6: i = 58;break;
  case 0x12B7: i = 59;break;
  case 0x12B8: i = 60;break;
  case 0x12B9: i = 61;break;
  case 0x12BA: i = 62;break;
  case 0x12BB: i = 63;break;
  case 0x12BC: i = 64;break;
  case 0x12BD: i = 65;break;
  case 0x12BE: i = 66;break;
  case 0x12BF: i = 67;break;
  case 0x12C0: i = 68;break;
  case 0x12C1: i = 69;break;
  case 0x12C2: i = 70;break;
  case 0x12C3: i = 71;break;
  case 0x12C4: i = 72;break;
  case 0x12C5: i = 73;break;
  case 0x12C6: i = 74;break;
  case 0x12C7: i = 75;break;
  case 0x12C8: i = 76;break;
  case 0x12C9: i = 77;break;
  case 0x12CA: i = 78;break;
  case 0x12CB: i = 79;break;
  case 0x12CC: i = 80;break;
  case 0x12CD: i = 81;break;
  case 0x12CE: i = 82;break;
  case 0x12CF: i = 83;break;
  case 0x12D0: i = 84;break;
  case 0x12D1: i = 85;break;
  case 0x12D2: i = 86;break;
  case 0x12D3: i = 87;break;
  case 0x12D4: i = 88;break;
  case 0x12D5: i = 89;break;
  case 0x12D6: i = 90;break;
  case 0x12D7: i = 91;break;
  case 0x12D8: i = 92;break;
  case 0x12D9: i = 93;break;
  case 0x12DA: i = 94;break;
  case 0x12DB: i = 95;break;
  case 0x12DC: i = 96;break;
  case 0x12DD: i = 97;break;
  case 0x12DE: i = 98;break;
  case 0x12DF: i = 99;break;
  case 0x12E0: i = 100;break;
  case 0x12E1: i = 101;break;
  case 0x12E2: i = 102;break;
  case 0x12E3: i = 103;break;
  case 0x12E4: i = 104;break;
  case 0x12E5: i = 105;break;
  case 0x12E6: i = 106;break;
  case 0x12E7: i = 107;break;
  case 0x12E8: i = 108;break;
  case 0x12E9: i = 109;break;
  case 0x12EA: i = 110;break;
  case 0x12EB: i = 111;break;
  case 0x12EC: i = 112;break;
  case 0x12ED: i = 113;break;
  case 0x12EE: i = 114;break;
  case 0x12EF: i = 115;break;
  case 0x12F0: i = 116;break;
  case 0x12F1: i = 117;break;
  case 0x12F2: i = 118;break;
  case 0x12F3: i = 119;break;
  case 0x12F4: i = 120;break;
  case 0x12F5: i = 121;break;
  case 0x12F6: i = 122;break;
  case 0x12F7: i = 123;break;
  case 0x12F8: i = 124;break;
  case 0x12F9: i = 125;break;
  case 0x12FA: i = 126;break;
  case 0x12FB: i = 127;break;
  case 0x12FC: i = 128;break;
  case 0x12FD: i = 129;break;
  case 0x12FE: i = 130;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &CANOpenShellSlaveOD_objdict[i];
}

variable_types:
wIndex
unsigned short

variable_types:
errorCode
unsigned long *

variable_types: unsigned long (***)(struct struct_CO_Data { unsigned char *bDeviceNodeId; struct td_indextable *objdict; struct struct_s_PDO_status { unsigned char transmit_type_parameter; short event_timer; short inhibit_timer; struct Message { unsigned short cob_id; unsigned char rtr; unsigned char len; unsigned char data[8]; } last_message; } *PDO_status; short *RxPDO_EventTimers; void (*RxPDO_EventTimers_Handler)(struct struct_CO_Data *, unsigned long); struct s_quick_index { unsigned short SDO_SVR; unsigned short SDO_CLT; unsigned short PDO_RCV; unsigned short PDO_RCV_MAP; unsigned short PDO_TRS; unsigned short PDO_TRS_MAP; } *firstIndex; struct s_quick_index *lastIndex; unsigned short *ObjdictSize; unsigned char *iam_a_slave; unsigned long (*valueRangeTest)(unsigned char typeValue, void *Value); struct struct_s_transfer { unsigned char CliServNbr; unsigned char whoami; unsigned char state; unsigned char toggle; unsigned long abortCode; unsigned short index; unsigned char subIndex; unsigned long count; unsigned long offset; unsigned char data[32]; unsigned char peerCRCsupport; unsigned char blksize; unsigned char ackseq; unsigned long objsize; unsigned char lastblockoffset; unsigned char seqno; unsigned char endfield; enum rxStep_t { RXSTEP_INIT=0, RXSTEP_STARTED=1, RXSTEP_END=2 } rxstep; unsigned char tmpData[8]; unsigned char dataType; short timer; void (*Callback)(struct struct_CO_Data *d, unsigned char nodeId); } transfers[4]; enum enum_nodeState { Initialisation=0, Disconnected=1, Connecting=2, Preparing=2, Stopped=4, Operational=5, Pre_operational=127, Unknown_state=15 } nodeState; struct s_state_communication { char csBoot_Up; char csSDO; char csEmergency; char csSYNC; char csLifeGuard; char csPDO; char csLSS; } CurrentCommunicationState; void (*initialisation)(struct struct_CO_Data *); void (*preOperational)(struct struct_CO_Data *); void (*operational)(struct struct_CO_Data *); void (*stopped)(struct struct_CO_Data *); void (*NMT_Slave_Node_Reset_Callback)(struct struct_CO_Data *); void (*NMT_Slave_Communications_Reset_Callback)(struct struct_CO_Data *); unsigned char *ConsumerHeartbeatCount; unsigned long *ConsumerHeartbeatEntries; short *ConsumerHeartBeatTimers; unsigned short *ProducerHeartBeatTime; short ProducerHeartBeatTimer; void (*heartbeatError)(struct struct_CO_Data *, unsigned char); enum enum_nodeState { Initialisation=0, Disconnected=1, Connecting=2, Preparing=2, Stopped=4, Operational=5, Pre_operational=127, Unknown_state=15 } NMTable[128]; short GuardTimeTimer; short LifeTimeTimer; void (*nodeguardError)(struct struct_CO_Data *, unsigned char); unsigned short *GuardTime; unsigned char *LifeTimeFactor; unsigned char nodeGuardStatus[128]; short syncTimer; unsigned long *COB_ID_Sync; unsigned long *Sync_Cycle_Period; void (*post_sync)(struct struct_CO_Data *); void (*post_TPDO)(struct struct_CO_Data *); void (*post_SlaveBootup)(struct struct_CO_Data *, unsigned char); void (*post_SlaveStateChange)(struct struct_CO_Data *, unsigned char, enum enum_nodeState { Initialisation=0, Disconnected=1, Connecting=2, Preparing=2, Stopped=4, Operational=5, Pre_operational=127, Unknown_state=15 }); unsigned char toggle; void *canHandle; struct td_indextable *(*scanIndexOD)(unsigned short wIndex, unsigned long *errorCode, unsigned long (***Callback)(struct struct_CO_Data *d, struct td_indextable *, unsigned char bSubindex)); void (*storeODSubIndex)(struct struct_CO_Data *d, unsigned short wIndex, unsigned char bSubindex); struct td_indextable *dcf_odentry; unsigned char *dcf_cursor; unsigned long dcf_entries_count; unsigned char dcf_status; unsigned long dcf_size; unsigned char *dcf_data; enum enum_errorState { Error_free=0, Error_occurred=1 } error_state; unsigned char error_history_size; unsigned char *error_number; unsigned long *error_first_element; unsigned char *error_register; unsigned long *error_cobid; struct s_errors { unsigned short errCode; unsigned char errRegMask; unsigned char active; } error_data[8]; void (*post_emcy)(struct struct_CO_Data *d, unsigned char nodeID, unsigned short errCode, unsigned char errReg); } *d, struct td_indextable *, unsigned char bSubindex)

return_type: struct td_indextable { struct td_subindex { unsigned char bAccessType; unsigned char bDataType; unsigned long size; void *pObject; } *pSubindex; unsigned char bSubCount; unsigned short index; } *


TranslateBaudRate

original_code:
int TranslateBaudRate(char* optarg){
 if(!strcmp( optarg, "1M")) return (int)1000;
 if(!strcmp( optarg, "500K")) return (int)500;
 if(!strcmp( optarg, "250K")) return (int)250;
 if(!strcmp( optarg, "125K")) return (int)125;
 if(!strcmp( optarg, "100K")) return (int)100;
 if(!strcmp( optarg, "50K")) return (int)50;
 if(!strcmp( optarg, "20K")) return (int)20;
 if(!strcmp( optarg, "10K")) return (int)10;
 if(!strcmp( optarg, "5K")) return (int)5;
 if(!strcmp( optarg, "none")) return 0;
 return 0x0000;
}

canonical_original_code:
int TranslateBaudRate(char *optarg){
 if(!strcmp( optarg, "1M")) return (int)1000;
 if(!strcmp( optarg, "500K")) return (int)500;
 if(!strcmp( optarg, "250K")) return (int)250;
 if(!strcmp( optarg, "125K")) return (int)125;
 if(!strcmp( optarg, "100K")) return (int)100;
 if(!strcmp( optarg, "50K")) return (int)50;
 if(!strcmp( optarg, "20K")) return (int)20;
 if(!strcmp( optarg, "10K")) return (int)10;
 if(!strcmp( optarg, "5K")) return (int)5;
 if(!strcmp( optarg, "none")) return 0;
 return 0x0000;
}

variable_types:
optarg
char *

return_type: int


decompiled_code:
bool __fastcall canReceive_driver(__int64 a1, void *a2)
{
return read(*(_DWORD *)(a1 + 4), a2, 0xCuLL) != 12;
}

canonical_decompiled_code:
bool __fastcall func0(__int64 a1, void *a2)
{
return read(*(_DWORD *)(a1 + 4), a2, 0xCuLL) != 12;
}

original_code:
unsigned char canReceive_driver(CAN_HANDLE fd0, Message *m)
{
 if(read(((CANPipe*)fd0)->pipe[0], m, sizeof(Message)) != (ssize_t)sizeof(Message))
 {
  return 1;
 }
 return 0;
}

canonical_original_code:
unsigned char canReceive_driver(void *fd0, struct Message *m)
{
 if(read(((struct CANPipe *)fd0)->pipe[0], m, sizeof(Message)) != (long)sizeof(Message))
 {
  return 1;
 }
 return 0;
}

variable_types: struct Message { unsigned short cob_id; unsigned char rtr; unsigned char len; unsigned char data[8]; } *

return_type: unsigned char

user_defined_types: struct CANPipe { char used; int pipe[2]; }


decompiled_code:
__int64 __fastcall canSend_driver(_BYTE *a1, const void *a2)
{
unsigned int v2; // er12
_DWORD *v3; // rbx
_BYTE *v4; // rbp

v2 = 0;
printf("%lx->[ ", 0xAAAAAAAAAAAAAAABLL * ((a1 - (_BYTE *)&canpipes) >> 2));
v3 = &canpipes;
v4 = &canpipes;
do
{
if ( *v4 && a1 != v4 )
printf("%x ", v2);
++v2;
v4 += 12;
}
while ( v2 != 16 );
printf(" ]");
do
{
if ( *(_BYTE *)v3 && a1 != (_BYTE *)v3 )
write(v3[2], a2, 0xCuLL);
v3 += 3;
}
while ( v3 != (_DWORD *)((char *)&canpipes + 192) );
return 0LL;
}

canonical_decompiled_code:
__int64 __fastcall func1(_BYTE *a1, const void *a2)
{
unsigned int v2; // er12
_DWORD *v3; // rbx
_BYTE *v4; // rbp

v2 = 0;
printf("%lx->[ ", 0xAAAAAAAAAAAAAAABLL * ((a1 - (_BYTE *)&canpipes) >> 2));
v3 = &canpipes;
v4 = &canpipes;
do
{
if ( *v4 && a1 != v4 )
printf("%x ", v2);
++v2;
v4 += 12;
}
while ( v2 != 16 );
printf(" ]");
do
{
if ( *(_BYTE *)v3 && a1 != (_BYTE *)v3 )
write(v3[2], a2, 0xCuLL);
v3 += 3;
}
while ( v3 != (_DWORD *)((char *)&canpipes + 192) );
return 0LL;
}

original_code:
unsigned char canSend_driver(CAN_HANDLE fd0, Message const *m)
{
  int i;
  printf("%lx->[ ", (CANPipe*)fd0 - &canpipes[0]);
  for(i=0; i < 16; i++)
  {
   if(canpipes[i].used && &canpipes[i] != (CANPipe*)fd0)
   {
  printf("%x ",i);
   }
  }
  printf(" ]");
  print_message(m);
  for(i=0; i < 16; i++)
  {
   if(canpipes[i].used && &canpipes[i] != (CANPipe*)fd0)
   {
  write(canpipes[i].pipe[1], m, sizeof(Message));
   }
  }
  return 0;
}

canonical_original_code:
unsigned char canSend_driver(void *fd0, struct Message *m)
{
  int i;
  printf("%lx->[ ", (struct CANPipe *)fd0 - &canpipes[0]);
  for(i=0; i < 16; i++)
  {
   if(canpipes[i].used && &canpipes[i] != (struct CANPipe *)fd0)
   {
  printf("%x ",i);
   }
  }
  printf(" ]");
  print_message(m);
  for(i=0; i < 16; i++)
  {
   if(canpipes[i].used && &canpipes[i] != (struct CANPipe *)fd0)
   {
  write(canpipes[i].pipe[1], m, sizeof(Message));
   }
  }
  return 0;
}

variable_types: i int

user_defined_types: struct Message { unsigned short cob_id; unsigned char rtr; unsigned char len; unsigned char data[8]; }


decompiled_code:
__int64 __fastcall canChangeBaudRate_driver(__int64 a1, const char *a2)
{
unsigned int v2; // eax

v2 = TranslateBaudRate(a2);
printf("%lx-> changing to baud rate %s[%d]\n", 0xAAAAAAAAAAAAAAABLL * ((a1 - (__int64)&canpipes) >> 2), a2, v2);
return 0LL;
}

canonical_decompiled_code:
__int64 __fastcall func3(__int64 a1, const char *a2)
{
unsigned int v2; // eax

v2 = func2(a2);
printf("%lx-> changing to baud rate %s[%d]\n", 0xAAAAAAAAAAAAAAABLL * ((a1 - (__int64)&canpipes) >> 2), a2, v2);
return 0LL;
}

original_code:
unsigned char canChangeBaudRate_driver( CAN_HANDLE fd0, char* baud)
{
    printf("%lx-> changing to baud rate %s[%d]\n", (CANPipe*)fd0 - &canpipes[0],baud,TranslateBaudRate(baud));
    return 0;
}

canonical_original_code:
unsigned char canChangeBaudRate_driver(void *fd0, char *baud)
{
    printf("%lx-> changing to baud rate %s[%d]\n", (struct CANPipe *)fd0 - &canpipes[0],baud,TranslateBaudRate(baud));
    return 0;
}

variable_types:
baud
char *


decompiled_code:
char *canOpen_driver()
{
int v0; // eax
_BYTE *v1; // rdx
char *result; // rax
__int64 v3; // rbx

v0 = 0;
v1 = canpipes;
while ( *v1 )
{
++v0;
v1 += 12;
if ( v0 == 16 )
goto LABEL_4;
}
v3 = 12LL * v0;
if ( pipe((int *)&canpipes[v3 + 4]) )
{
LABEL_4:
fwrite("Open failed.\n", 1uLL, 0xDuLL, stderr);
return 0LL;
}
result = &canpipes[v3];
canpipes[v3] = 1;
return result;
}

canonical_decompiled_code:
char *func4()
{
int v0; // eax
_BYTE *v1; // rdx
char *result; // rax
__int64 v3; // rbx

v0 = 0;
v1 = canpipes;
while ( *v1 )
{
++v0;
v1 += 12;
if ( v0 == 16 )
goto LABEL_4;
}
v3 = 12LL * v0;
if ( pipe((int *)&canpipes[v3 + 4]) )
{
LABEL_4:
fwrite("Open failed.\n", 1uLL, 0xDuLL, stderr);
return 0LL;
}
result = &canpipes[v3];
canpipes[v3] = 1;
return result;
}

original_code:
CAN_HANDLE canOpen_driver(s_BOARD *board)
{
  int i;
  for(i=0; i < 16; i++)
  {
   if(!canpipes[i].used)
    break;
  }
  if (i==16 || pipe(canpipes[i].pipe))
    {
      fprintf (stderr, "Open failed.\n");
      return (CAN_HANDLE)((void *)0);
    }
   canpipes[i].used = 1;
   return (CAN_HANDLE) &canpipes[i];
}

canonical_original_code:
void *canOpen_driver(struct struct_s_BOARD *board)
{
  int i;
  for(i=0; i < 16; i++)
  {
   if(!canpipes[i].used)
    break;
  }
  if (i==16 || pipe(canpipes[i].pipe))
    {
      fprintf (stderr, "Open failed.\n");
      return (CAN_HANDLE)((void *)0);
    }
   canpipes[i].used = 1;
   return (CAN_HANDLE) &canpipes[i];
}

variable_types: struct struct_s_BOARD { char *busname; char *baudrate; } *

return_type: void *


decompiled_code:
__int64 __fastcall canClose_driver(__int64 a1)
{
close(*(_DWORD *)(a1 + 4));
close(*(_DWORD *)(a1 + 8));
*(_BYTE *)a1 = 0;
return 0LL;
}

canonical_decompiled_code:
__int64 __fastcall func5(__int64 a1)
{
close(*(_DWORD *)(a1 + 4));
close(*(_DWORD *)(a1 + 8));
*(_BYTE *)a1 = 0;
return 0LL;
}

original_code:
int canClose_driver(CAN_HANDLE fd0)
{
  close(((CANPipe*)fd0)->pipe[0]);
  close(((CANPipe*)fd0)->pipe[1]);
  ((CANPipe*)fd0)->used = 0;
  return 0;
}

canonical_original_code:
int canClose_driver(void *fd0)
{
  close(((struct CANPipe *)fd0)->pipe[0]);
  close(((struct CANPipe *)fd0)->pipe[1]);
  ((struct CANPipe *)fd0)->used = 0;
  return 0;
}


decompiled_code:
__int64 __fastcall TestSlave_valueRangeTest(char a1, _BYTE *a2)
{
__int64 result; // rax

result = 0LL;
if ( a1 == -97 )
result = *a2 != 0 ? 0x6090030 : 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(char a1, _BYTE *a2)
{
__int64 result; // rax

result = 0LL;
if ( a1 == -97 )
result = *a2 != 0 ? 0x6090030 : 0;
return result;
}

original_code:
unsigned long int TestSlave_valueRangeTest (unsigned char typeValue, void * value)
{
  switch (typeValue) {
    case 0x9F:
      if (*(unsigned char*)value != (unsigned char)0) return 0x06090030;
      break;
  }
  return 0;
}

canonical_original_code:
unsigned long TestSlave_valueRangeTest(unsigned char typeValue, void *value)
{
  switch (typeValue) {
    case 0x9F:
      if (*(unsigned char *)value != (unsigned char)0) return 0x06090030;
      break;
  }
  return 0;
}

variable_types:
typeValue
unsigned char

variable_types:
value
void *

return_type: unsigned long


decompiled_code:
void ***__fastcall TestSlave_scanIndexOD(unsigned __int16 a1, _QWORD *a2, _QWORD *a3)
{
void ***result; // rax

*a3 = 0LL;
if ( a1 > 0x1A04u )
{
switch ( a1 )
{
case 0x2000u:
result = &TestSlave_objdict + 42;
break;
case 0x2001u:
result = &TestSlave_objdict + 44;
break;
case 0x2002u:
result = &TestSlave_objdict + 46;
break;
case 0x2003u:
result = &TestSlave_objdict + 48;
break;
case 0x2004u:
result = &TestSlave_objdict + 50;
break;
case 0x2005u:
result = &TestSlave_objdict + 52;
break;
case 0x2006u:
result = &TestSlave_objdict + 54;
break;
case 0x2007u:
result = &TestSlave_objdict + 56;
break;
case 0x2008u:
result = &TestSlave_objdict + 58;
break;
case 0x2009u:
result = &TestSlave_objdict + 60;
break;
case 0x200Au:
result = &TestSlave_objdict + 62;
break;
case 0x200Bu:
result = &TestSlave_objdict + 64;
break;
case 0x200Cu:
result = &TestSlave_objdict + 66;
break;
default:
goto LABEL_17;
}
LABEL_11:
*a2 = 0LL;
}
else if ( a1 > 0x19FFu )
{
switch ( a1 )
{
case 0x1A01u:
result = &TestSlave_objdict + 34;
goto LABEL_11;
case 0x1A02u:
result = &TestSlave_objdict + 36;
goto LABEL_11;
case 0x1A03u:
result = &TestSlave_objdict + 38;
goto LABEL_11;
case 0x1A04u:
result = &TestSlave_objdict + 40;
goto LABEL_11;
default:
*a2 = 0LL;
result = &TestSlave_objdict + 32;
break;
}
}
else if ( a1 > 0x1018u )
{
if ( a1 != 4608 )
{
switch ( a1 )
{
case 0x1800u:
*a3 = &TestSlave_Index1800_callbacks;
result = &TestSlave_objdict + 22;
goto LABEL_11;
case 0x1801u:
*a3 = &TestSlave_Index1801_callbacks;
result = &TestSlave_objdict + 24;
goto LABEL_11;
case 0x1802u:
*a3 = &TestSlave_Index1802_callbacks;
result = &TestSlave_objdict + 26;
goto LABEL_11;
case 0x1803u:
*a3 = &TestSlave_Index1803_callbacks;
result = &TestSlave_objdict + 28;
goto LABEL_11;
case 0x1804u:
*a3 = &TestSlave_Index1804_callbacks;
result = &TestSlave_objdict + 30;
goto LABEL_11;
default:
goto LABEL_17;
}
}
*a2 = 0LL;
result = &TestSlave_objdict + 20;
}
else
{
if ( a1 > 0xFFFu )
{
switch ( a1 )
{
case 0x1000u:
result = &TestSlave_objdict;
goto LABEL_11;
case 0x1001u:
result = &TestSlave_objdict + 2;
goto LABEL_11;
case 0x1003u:
*a3 = &TestSlave_Index1003_callbacks;
result = &TestSlave_objdict + 4;
goto LABEL_11;
case 0x1005u:
*a3 = &TestSlave_Index1005_callbacks;
result = &TestSlave_objdict + 6;
goto LABEL_11;
case 0x1006u:
*a3 = &TestSlave_Index1006_callbacks;
result = &TestSlave_objdict + 8;
goto LABEL_11;
case 0x1010u:
*a3 = &TestSlave_Index1010_callbacks;
result = &TestSlave_objdict + 10;
goto LABEL_11;
case 0x1011u:
*a3 = &TestSlave_Index1011_callbacks;
result = &TestSlave_objdict + 12;
goto LABEL_11;
case 0x1014u:
result = &TestSlave_objdict + 14;
goto LABEL_11;
case 0x1017u:
*a3 = &TestSlave_Index1017_callbacks;
result = &TestSlave_objdict + 16;
goto LABEL_11;
case 0x1018u:
result = &TestSlave_objdict + 18;
goto LABEL_11;
default:
break;
}
}
LABEL_17:
*a2 = 100794368LL;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
void ***__fastcall func1(unsigned __int16 a1, _QWORD *a2, _QWORD *a3)
{
void ***result; // rax

*a3 = 0LL;
if ( a1 > 0x1A04u )
{
switch ( a1 )
{
case 0x2000u:
result = &TestSlave_objdict + 42;
break;
case 0x2001u:
result = &TestSlave_objdict + 44;
break;
case 0x2002u:
result = &TestSlave_objdict + 46;
break;
case 0x2003u:
result = &TestSlave_objdict + 48;
break;
case 0x2004u:
result = &TestSlave_objdict + 50;
break;
case 0x2005u:
result = &TestSlave_objdict + 52;
break;
case 0x2006u:
result = &TestSlave_objdict + 54;
break;
case 0x2007u:
result = &TestSlave_objdict + 56;
break;
case 0x2008u:
result = &TestSlave_objdict + 58;
break;
case 0x2009u:
result = &TestSlave_objdict + 60;
break;
case 0x200Au:
result = &TestSlave_objdict + 62;
break;
case 0x200Bu:
result = &TestSlave_objdict + 64;
break;
case 0x200Cu:
result = &TestSlave_objdict + 66;
break;
default:
goto LABEL_17;
}
LABEL_11:
*a2 = 0LL;
}
else if ( a1 > 0x19FFu )
{
switch ( a1 )
{
case 0x1A01u:
result = &TestSlave_objdict + 34;
goto LABEL_11;
case 0x1A02u:
result = &TestSlave_objdict + 36;
goto LABEL_11;
case 0x1A03u:
result = &TestSlave_objdict + 38;
goto LABEL_11;
case 0x1A04u:
result = &TestSlave_objdict + 40;
goto LABEL_11;
default:
*a2 = 0LL;
result = &TestSlave_objdict + 32;
break;
}
}
else if ( a1 > 0x1018u )
{
if ( a1 != 4608 )
{
switch ( a1 )
{
case 0x1800u:
*a3 = &TestSlave_Index1800_callbacks;
result = &TestSlave_objdict + 22;
goto LABEL_11;
case 0x1801u:
*a3 = &TestSlave_Index1801_callbacks;
result = &TestSlave_objdict + 24;
goto LABEL_11;
case 0x1802u:
*a3 = &TestSlave_Index1802_callbacks;
result = &TestSlave_objdict + 26;
goto LABEL_11;
case 0x1803u:
*a3 = &TestSlave_Index1803_callbacks;
result = &TestSlave_objdict + 28;
goto LABEL_11;
case 0x1804u:
*a3 = &TestSlave_Index1804_callbacks;
result = &TestSlave_objdict + 30;
goto LABEL_11;
default:
goto LABEL_17;
}
}
*a2 = 0LL;
result = &TestSlave_objdict + 20;
}
else
{
if ( a1 > 0xFFFu )
{
switch ( a1 )
{
case 0x1000u:
result = &TestSlave_objdict;
goto LABEL_11;
case 0x1001u:
result = &TestSlave_objdict + 2;
goto LABEL_11;
case 0x1003u:
*a3 = &TestSlave_Index1003_callbacks;
result = &TestSlave_objdict + 4;
goto LABEL_11;
case 0x1005u:
*a3 = &TestSlave_Index1005_callbacks;
result = &TestSlave_objdict + 6;
goto LABEL_11;
case 0x1006u:
*a3 = &TestSlave_Index1006_callbacks;
result = &TestSlave_objdict + 8;
goto LABEL_11;
case 0x1010u:
*a3 = &TestSlave_Index1010_callbacks;
result = &TestSlave_objdict + 10;
goto LABEL_11;
case 0x1011u:
*a3 = &TestSlave_Index1011_callbacks;
result = &TestSlave_objdict + 12;
goto LABEL_11;
case 0x1014u:
result = &TestSlave_objdict + 14;
goto LABEL_11;
case 0x1017u:
*a3 = &TestSlave_Index1017_callbacks;
result = &TestSlave_objdict + 16;
goto LABEL_11;
case 0x1018u:
result = &TestSlave_objdict + 18;
goto LABEL_11;
default:
break;
}
}
LABEL_17:
*a2 = 100794368LL;
result = 0LL;
}
return result;
}

original_code:
const indextable * TestSlave_scanIndexOD (unsigned short wIndex, unsigned long int * errorCode, ODCallback_t **callbacks)
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1003: i = 2;*callbacks = TestSlave_Index1003_callbacks; break;
  case 0x1005: i = 3;*callbacks = TestSlave_Index1005_callbacks; break;
  case 0x1006: i = 4;*callbacks = TestSlave_Index1006_callbacks; break;
  case 0x1010: i = 5;*callbacks = TestSlave_Index1010_callbacks; break;
  case 0x1011: i = 6;*callbacks = TestSlave_Index1011_callbacks; break;
  case 0x1014: i = 7;break;
  case 0x1017: i = 8;*callbacks = TestSlave_Index1017_callbacks; break;
  case 0x1018: i = 9;break;
  case 0x1200: i = 10;break;
  case 0x1800: i = 11;*callbacks = TestSlave_Index1800_callbacks; break;
  case 0x1801: i = 12;*callbacks = TestSlave_Index1801_callbacks; break;
  case 0x1802: i = 13;*callbacks = TestSlave_Index1802_callbacks; break;
  case 0x1803: i = 14;*callbacks = TestSlave_Index1803_callbacks; break;
  case 0x1804: i = 15;*callbacks = TestSlave_Index1804_callbacks; break;
  case 0x1A00: i = 16;break;
  case 0x1A01: i = 17;break;
  case 0x1A02: i = 18;break;
  case 0x1A03: i = 19;break;
  case 0x1A04: i = 20;break;
  case 0x2000: i = 21;break;
  case 0x2001: i = 22;break;
  case 0x2002: i = 23;break;
  case 0x2003: i = 24;break;
  case 0x2004: i = 25;break;
  case 0x2005: i = 26;break;
  case 0x2006: i = 27;break;
  case 0x2007: i = 28;break;
  case 0x2008: i = 29;break;
  case 0x2009: i = 30;break;
  case 0x200A: i = 31;break;
  case 0x200B: i = 32;break;
  case 0x200C: i = 33;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &TestSlave_objdict[i];
}

canonical_original_code:
struct td_indextable *TestSlave_scanIndexOD(unsigned short wIndex, unsigned long *errorCode, unsigned long (***callbacks)(struct struct_CO_Data *d, struct td_indextable *, unsigned char bSubindex))
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1003: i = 2;*callbacks = TestSlave_Index1003_callbacks; break;
  case 0x1005: i = 3;*callbacks = TestSlave_Index1005_callbacks; break;
  case 0x1006: i = 4;*callbacks = TestSlave_Index1006_callbacks; break;
  case 0x1010: i = 5;*callbacks = TestSlave_Index1010_callbacks; break;
  case 0x1011: i = 6;*callbacks = TestSlave_Index1011_callbacks; break;
  case 0x1014: i = 7;break;
  case 0x1017: i = 8;*callbacks = TestSlave_Index1017_callbacks; break;
  case 0x1018: i = 9;break;
  case 0x1200: i = 10;break;
  case 0x1800: i = 11;*callbacks = TestSlave_Index1800_callbacks; break;
  case 0x1801: i = 12;*callbacks = TestSlave_Index1801_callbacks; break;
  case 0x1802: i = 13;*callbacks = TestSlave_Index1802_callbacks; break;
  case 0x1803: i = 14;*callbacks = TestSlave_Index1803_callbacks; break;
  case 0x1804: i = 15;*callbacks = TestSlave_Index1804_callbacks; break;
  case 0x1A00: i = 16;break;
  case 0x1A01: i = 17;break;
  case 0x1A02: i = 18;break;
  case 0x1A03: i = 19;break;
  case 0x1A04: i = 20;break;
  case 0x2000: i = 21;break;
  case 0x2001: i = 22;break;
  case 0x2002: i = 23;break;
  case 0x2003: i = 24;break;
  case 0x2004: i = 25;break;
  case 0x2005: i = 26;break;
  case 0x2006: i = 27;break;
  case 0x2007: i = 28;break;
  case 0x2008: i = 29;break;
  case 0x2009: i = 30;break;
  case 0x200A: i = 31;break;
  case 0x200B: i = 32;break;
  case 0x200C: i = 33;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &TestSlave_objdict[i];
}

user_defined_types: struct td_indextable { struct td_subindex *pSubindex; unsigned char bSubCount; unsigned short index; }

user_defined_types: struct td_subindex { unsigned char bAccessType; unsigned char bDataType; unsigned long size; void *pObject; }

user_defined_types: struct struct_CO_Data { unsigned char *bDeviceNodeId; struct td_indextable *objdict; struct struct_s_PDO_status *PDO_status; short *RxPDO_EventTimers; void (*RxPDO_EventTimers_Handler)(struct struct_CO_Data *, unsigned long); struct s_quick_index *firstIndex; struct s_quick_index *lastIndex; unsigned short *ObjdictSize; unsigned char *iam_a_slave; unsigned long (*valueRangeTest)(unsigned char typeValue, void *Value); struct struct_s_transfer transfers[4]; enum enum_nodeState nodeState; struct s_state_communication CurrentCommunicationState; void (*initialisation)(struct struct_CO_Data *); void (*preOperational)(struct struct_CO_Data *); void (*operational)(struct struct_CO_Data *); void (*stopped)(struct struct_CO_Data *); void (*NMT_Slave_Node_Reset_Callback)(struct struct_CO_Data *); void (*NMT_Slave_Communications_Reset_Callback)(struct struct_CO_Data *); unsigned char *ConsumerHeartbeatCount; unsigned long *ConsumerHeartbeatEntries; short *ConsumerHeartBeatTimers; unsigned short *ProducerHeartBeatTime; short ProducerHeartBeatTimer; void (*heartbeatError)(struct struct_CO_Data *, unsigned char); enum enum_nodeState NMTable[128]; short GuardTimeTimer; short LifeTimeTimer; void (*nodeguardError)(struct struct_CO_Data *, unsigned char); unsigned short *GuardTime; unsigned char *LifeTimeFactor; unsigned char nodeGuardStatus[128]; short syncTimer; unsigned long *COB_ID_Sync; unsigned long *Sync_Cycle_Period; void (*post_sync)(struct struct_CO_Data *); void (*post_TPDO)(struct struct_CO_Data *); void (*post_SlaveBootup)(struct struct_CO_Data *, unsigned char); void (*post_SlaveStateChange)(struct struct_CO_Data *, unsigned char, enum enum_nodeState); unsigned char toggle; void *canHandle; struct td_indextable *(*scanIndexOD)(unsigned short wIndex, unsigned long *errorCode, unsigned long (***Callback)(struct struct_CO_Data *d, struct td_indextable *, unsigned char bSubindex)); void (*storeODSubIndex)(struct struct_CO_Data *d, unsigned short wIndex, unsigned char bSubindex); struct td_indextable *dcf_odentry; unsigned char *dcf_cursor; unsigned long dcf_entries_count; unsigned char dcf_status; unsigned long dcf_size; unsigned char *dcf_data; enum enum_errorState error_state; unsigned char error_history_size; unsigned char *error_number; unsigned long *error_first_element; unsigned char *error_register; unsigned long *error_cobid; struct s_errors error_data[8]; void (*post_emcy)(struct struct_CO_Data *d, unsigned char nodeID, unsigned short errCode, unsigned char errReg); }

user_defined_types: enum enum_nodeState { Initialisation=0, Disconnected=1, Connecting=2, Preparing=2, Stopped=4, Operational=5, Pre_operational=127, Unknown_state=15 }

user_defined_types: struct s_state_communication { char csBoot_Up; char csSDO; char csEmergency; char csSYNC; char csLifeGuard; char csPDO; char csLSS; }

user_defined_types: enum enum_errorState { Error_free=0, Error_occurred=1 }

user_defined_types: struct struct_s_PDO_status { unsigned char transmit_type_parameter; short event_timer; short inhibit_timer; struct Message last_message; }

user_defined_types: struct s_quick_index { unsigned short SDO_SVR; unsigned short SDO_CLT; unsigned short PDO_RCV; unsigned short PDO_RCV_MAP; unsigned short PDO_TRS; unsigned short PDO_TRS_MAP; }

user_defined_types: struct struct_s_transfer { unsigned char CliServNbr; unsigned char whoami; unsigned char state; unsigned char toggle; unsigned long abortCode; unsigned short index; unsigned char subIndex; unsigned long count; unsigned long offset; unsigned char data[32]; unsigned char peerCRCsupport; unsigned char blksize; unsigned char ackseq; unsigned long objsize; unsigned char lastblockoffset; unsigned char seqno; unsigned char endfield; enum rxStep_t rxstep; unsigned char tmpData[8]; unsigned char dataType; short timer; void (*Callback)(struct struct_CO_Data *d, unsigned char nodeId); }

user_defined_types: struct s_errors { unsigned short errCode; unsigned char errRegMask; unsigned char active; }

user_defined_types: enum rxStep_t { RXSTEP_INIT=0, RXSTEP_STARTED=1, RXSTEP_END=2 }


decompiled_code:
__int64 __fastcall CANOpenShellMasterOD_valueRangeTest(char a1, _BYTE *a2)
{
__int64 result; // rax

result = 0LL;
if ( a1 == -97 )
result = *a2 != 0 ? 0x6090030 : 0;
return result;
}

original_code:
unsigned long int CANOpenShellMasterOD_valueRangeTest (unsigned char typeValue, void * value)
{
  switch (typeValue) {
    case 0x9F:
      if (*(unsigned char*)value != (unsigned char)0) return 0x06090030;
      break;
  }
  return 0;
}

canonical_original_code:
unsigned long CANOpenShellMasterOD_valueRangeTest(unsigned char typeValue, void *value)
{
  switch (typeValue) {
    case 0x9F:
      if (*(unsigned char *)value != (unsigned char)0) return 0x06090030;
      break;
  }
  return 0;
}


decompiled_code:
void **__fastcall CANOpenShellMasterOD_scanIndexOD(__int16 a1, _QWORD *a2, _QWORD *a3)
{
void **result; // rax

*a3 = 0LL;
switch ( a1 )
{
case 4096:
result = &CANOpenShellMasterOD_objdict;
goto LABEL_4;
case 4097:
result = &CANOpenShellMasterOD_objdict + 2;
goto LABEL_4;
case 4101:
*a3 = &CANOpenShellMasterOD_Index1005_callbacks;
result = &CANOpenShellMasterOD_objdict + 4;
goto LABEL_4;
case 4102:
*a3 = &CANOpenShellMasterOD_Index1006_callbacks;
result = &CANOpenShellMasterOD_objdict + 6;
goto LABEL_4;
case 4119:
*a3 = &CANOpenShellMasterOD_Index1017_callbacks;
result = &CANOpenShellMasterOD_objdict + 8;
goto LABEL_4;
case 4120:
result = &CANOpenShellMasterOD_objdict + 10;
goto LABEL_4;
case 4736:
result = &CANOpenShellMasterOD_objdict + 12;
goto LABEL_4;
case 4737:
result = &CANOpenShellMasterOD_objdict + 14;
goto LABEL_4;
case 4738:
result = &CANOpenShellMasterOD_objdict + 16;
goto LABEL_4;
case 4739:
result = &CANOpenShellMasterOD_objdict + 18;
goto LABEL_4;
case 4740:
result = &CANOpenShellMasterOD_objdict + 20;
goto LABEL_4;
case 4741:
result = &CANOpenShellMasterOD_objdict + 22;
goto LABEL_4;
case 4742:
result = &CANOpenShellMasterOD_objdict + 24;
goto LABEL_4;
case 4743:
result = &CANOpenShellMasterOD_objdict + 26;
goto LABEL_4;
case 4744:
result = &CANOpenShellMasterOD_objdict + 28;
goto LABEL_4;
case 4745:
result = &CANOpenShellMasterOD_objdict + 30;
goto LABEL_4;
case 4746:
result = &CANOpenShellMasterOD_objdict + 32;
goto LABEL_4;
case 4747:
result = &CANOpenShellMasterOD_objdict + 34;
goto LABEL_4;
case 4748:
result = &CANOpenShellMasterOD_objdict + 36;
goto LABEL_4;
case 4749:
result = &CANOpenShellMasterOD_objdict + 38;
goto LABEL_4;
case 4750:
result = &CANOpenShellMasterOD_objdict + 40;
goto LABEL_4;
case 4751:
result = &CANOpenShellMasterOD_objdict + 42;
goto LABEL_4;
case 4752:
result = &CANOpenShellMasterOD_objdict + 44;
goto LABEL_4;
case 4753:
result = &CANOpenShellMasterOD_objdict + 46;
goto LABEL_4;
case 4754:
result = &CANOpenShellMasterOD_objdict + 48;
goto LABEL_4;
case 4755:
result = &CANOpenShellMasterOD_objdict + 50;
goto LABEL_4;
case 4756:
result = &CANOpenShellMasterOD_objdict + 52;
goto LABEL_4;
case 4757:
result = &CANOpenShellMasterOD_objdict + 54;
goto LABEL_4;
case 4758:
result = &CANOpenShellMasterOD_objdict + 56;
goto LABEL_4;
case 4759:
result = &CANOpenShellMasterOD_objdict + 58;
goto LABEL_4;
case 4760:
result = &CANOpenShellMasterOD_objdict + 60;
goto LABEL_4;
case 4761:
result = &CANOpenShellMasterOD_objdict + 62;
goto LABEL_4;
case 4762:
result = &CANOpenShellMasterOD_objdict + 64;
goto LABEL_4;
case 4763:
result = &CANOpenShellMasterOD_objdict + 66;
goto LABEL_4;
case 4764:
result = &CANOpenShellMasterOD_objdict + 68;
goto LABEL_4;
case 4765:
result = &CANOpenShellMasterOD_objdict + 70;
goto LABEL_4;
case 4766:
result = &CANOpenShellMasterOD_objdict + 72;
goto LABEL_4;
case 4767:
result = &CANOpenShellMasterOD_objdict + 74;
goto LABEL_4;
case 4768:
result = &CANOpenShellMasterOD_objdict + 76;
goto LABEL_4;
case 4769:
result = &CANOpenShellMasterOD_objdict + 78;
goto LABEL_4;
case 4770:
result = &CANOpenShellMasterOD_objdict + 80;
goto LABEL_4;
case 4771:
result = &CANOpenShellMasterOD_objdict + 82;
goto LABEL_4;
case 4772:
result = &CANOpenShellMasterOD_objdict + 84;
goto LABEL_4;
case 4773:
result = &CANOpenShellMasterOD_objdict + 86;
goto LABEL_4;
case 4774:
result = &CANOpenShellMasterOD_objdict + 88;
goto LABEL_4;
case 4775:
result = &CANOpenShellMasterOD_objdict + 90;
goto LABEL_4;
case 4776:
result = &CANOpenShellMasterOD_objdict + 92;
goto LABEL_4;
case 4777:
result = &CANOpenShellMasterOD_objdict + 94;
goto LABEL_4;
case 4778:
result = &CANOpenShellMasterOD_objdict + 96;
goto LABEL_4;
case 4779:
result = &CANOpenShellMasterOD_objdict + 98;
goto LABEL_4;
case 4780:
result = &CANOpenShellMasterOD_objdict + 100;
goto LABEL_4;
case 4781:
result = &CANOpenShellMasterOD_objdict + 102;
goto LABEL_4;
case 4782:
result = &CANOpenShellMasterOD_objdict + 104;
goto LABEL_4;
case 4783:
result = &CANOpenShellMasterOD_objdict + 106;
goto LABEL_4;
case 4784:
result = &CANOpenShellMasterOD_objdict + 108;
goto LABEL_4;
case 4785:
result = &CANOpenShellMasterOD_objdict + 110;
goto LABEL_4;
case 4786:
result = &CANOpenShellMasterOD_objdict + 112;
goto LABEL_4;
case 4787:
result = &CANOpenShellMasterOD_objdict + 114;
goto LABEL_4;
case 4788:
result = &CANOpenShellMasterOD_objdict + 116;
goto LABEL_4;
case 4789:
result = &CANOpenShellMasterOD_objdict + 118;
goto LABEL_4;
case 4790:
result = &CANOpenShellMasterOD_objdict + 120;
goto LABEL_4;
case 4791:
result = &CANOpenShellMasterOD_objdict + 122;
goto LABEL_4;
case 4792:
result = &CANOpenShellMasterOD_objdict + 124;
goto LABEL_4;
case 4793:
result = &CANOpenShellMasterOD_objdict + 126;
goto LABEL_4;
case 4794:
result = &CANOpenShellMasterOD_objdict + 128;
goto LABEL_4;
case 4795:
result = &CANOpenShellMasterOD_objdict + 130;
goto LABEL_4;
case 4796:
result = &CANOpenShellMasterOD_objdict + 132;
goto LABEL_4;
case 4797:
result = &CANOpenShellMasterOD_objdict + 134;
goto LABEL_4;
case 4798:
result = &CANOpenShellMasterOD_objdict + 136;
goto LABEL_4;
case 4799:
result = &CANOpenShellMasterOD_objdict + 138;
goto LABEL_4;
case 4800:
result = &CANOpenShellMasterOD_objdict + 140;
goto LABEL_4;
case 4801:
result = &CANOpenShellMasterOD_objdict + 142;
goto LABEL_4;
case 4802:
result = &CANOpenShellMasterOD_objdict + 144;
goto LABEL_4;
case 4803:
result = &CANOpenShellMasterOD_objdict + 146;
goto LABEL_4;
case 4804:
result = &CANOpenShellMasterOD_objdict + 148;
goto LABEL_4;
case 4805:
result = &CANOpenShellMasterOD_objdict + 150;
goto LABEL_4;
case 4806:
result = &CANOpenShellMasterOD_objdict + 152;
goto LABEL_4;
case 4807:
result = &CANOpenShellMasterOD_objdict + 154;
goto LABEL_4;
case 4808:
result = &CANOpenShellMasterOD_objdict + 156;
goto LABEL_4;
case 4809:
result = &CANOpenShellMasterOD_objdict + 158;
goto LABEL_4;
case 4810:
result = &CANOpenShellMasterOD_objdict + 160;
goto LABEL_4;
case 4811:
result = &CANOpenShellMasterOD_objdict + 162;
goto LABEL_4;
case 4812:
result = &CANOpenShellMasterOD_objdict + 164;
goto LABEL_4;
case 4813:
result = &CANOpenShellMasterOD_objdict + 166;
goto LABEL_4;
case 4814:
result = &CANOpenShellMasterOD_objdict + 168;
goto LABEL_4;
case 4815:
result = &CANOpenShellMasterOD_objdict + 170;
goto LABEL_4;
case 4816:
result = &CANOpenShellMasterOD_objdict + 172;
goto LABEL_4;
case 4817:
result = &CANOpenShellMasterOD_objdict + 174;
goto LABEL_4;
case 4818:
result = &CANOpenShellMasterOD_objdict + 176;
goto LABEL_4;
case 4819:
result = &CANOpenShellMasterOD_objdict + 178;
goto LABEL_4;
case 4820:
result = &CANOpenShellMasterOD_objdict + 180;
goto LABEL_4;
case 4821:
result = &CANOpenShellMasterOD_objdict + 182;
goto LABEL_4;
case 4822:
result = &CANOpenShellMasterOD_objdict + 184;
goto LABEL_4;
case 4823:
result = &CANOpenShellMasterOD_objdict + 186;
goto LABEL_4;
case 4824:
result = &CANOpenShellMasterOD_objdict + 188;
goto LABEL_4;
case 4825:
result = &CANOpenShellMasterOD_objdict + 190;
goto LABEL_4;
case 4826:
result = &CANOpenShellMasterOD_objdict + 192;
goto LABEL_4;
case 4827:
result = &CANOpenShellMasterOD_objdict + 194;
goto LABEL_4;
case 4828:
result = &CANOpenShellMasterOD_objdict + 196;
goto LABEL_4;
case 4829:
result = &CANOpenShellMasterOD_objdict + 198;
goto LABEL_4;
case 4830:
result = &CANOpenShellMasterOD_objdict + 200;
goto LABEL_4;
case 4831:
result = &CANOpenShellMasterOD_objdict + 202;
goto LABEL_4;
case 4832:
result = &CANOpenShellMasterOD_objdict + 204;
goto LABEL_4;
case 4833:
result = &CANOpenShellMasterOD_objdict + 206;
goto LABEL_4;
case 4834:
result = &CANOpenShellMasterOD_objdict + 208;
goto LABEL_4;
case 4835:
result = &CANOpenShellMasterOD_objdict + 210;
goto LABEL_4;
case 4836:
result = &CANOpenShellMasterOD_objdict + 212;
goto LABEL_4;
case 4837:
result = &CANOpenShellMasterOD_objdict + 214;
goto LABEL_4;
case 4838:
result = &CANOpenShellMasterOD_objdict + 216;
goto LABEL_4;
case 4839:
result = &CANOpenShellMasterOD_objdict + 218;
goto LABEL_4;
case 4840:
result = &CANOpenShellMasterOD_objdict + 220;
goto LABEL_4;
case 4841:
result = &CANOpenShellMasterOD_objdict + 222;
goto LABEL_4;
case 4842:
result = &CANOpenShellMasterOD_objdict + 224;
goto LABEL_4;
case 4843:
result = &CANOpenShellMasterOD_objdict + 226;
goto LABEL_4;
case 4844:
result = &CANOpenShellMasterOD_objdict + 228;
goto LABEL_4;
case 4845:
result = &CANOpenShellMasterOD_objdict + 230;
goto LABEL_4;
case 4846:
result = &CANOpenShellMasterOD_objdict + 232;
goto LABEL_4;
case 4847:
result = &CANOpenShellMasterOD_objdict + 234;
goto LABEL_4;
case 4848:
result = &CANOpenShellMasterOD_objdict + 236;
goto LABEL_4;
case 4849:
result = &CANOpenShellMasterOD_objdict + 238;
goto LABEL_4;
case 4850:
result = &CANOpenShellMasterOD_objdict + 240;
goto LABEL_4;
case 4851:
result = &CANOpenShellMasterOD_objdict + 242;
goto LABEL_4;
case 4852:
result = &CANOpenShellMasterOD_objdict + 244;
goto LABEL_4;
case 4853:
result = &CANOpenShellMasterOD_objdict + 246;
goto LABEL_4;
case 4854:
result = &CANOpenShellMasterOD_objdict + 248;
goto LABEL_4;
case 4855:
result = &CANOpenShellMasterOD_objdict + 250;
goto LABEL_4;
case 4856:
result = &CANOpenShellMasterOD_objdict + 252;
goto LABEL_4;
case 4857:
result = &CANOpenShellMasterOD_objdict + 254;
goto LABEL_4;
case 4858:
result = &CANOpenShellMasterOD_objdict + 256;
goto LABEL_4;
case 4859:
result = &CANOpenShellMasterOD_objdict + 258;
goto LABEL_4;
case 4860:
result = &CANOpenShellMasterOD_objdict + 260;
goto LABEL_4;
case 4861:
result = &CANOpenShellMasterOD_objdict + 262;
goto LABEL_4;
case 4862:
result = &CANOpenShellMasterOD_objdict + 264;
LABEL_4:
*a2 = 0LL;
break;
default:
*a2 = 100794368LL;
result = 0LL;
break;
}
return result;
}

canonical_decompiled_code:
void **__fastcall func1(__int16 a1, _QWORD *a2, _QWORD *a3)
{
void **result; // rax

*a3 = 0LL;
switch ( a1 )
{
case 4096:
result = &CANOpenShellMasterOD_objdict;
goto LABEL_4;
case 4097:
result = &CANOpenShellMasterOD_objdict + 2;
goto LABEL_4;
case 4101:
*a3 = &CANOpenShellMasterOD_Index1005_callbacks;
result = &CANOpenShellMasterOD_objdict + 4;
goto LABEL_4;
case 4102:
*a3 = &CANOpenShellMasterOD_Index1006_callbacks;
result = &CANOpenShellMasterOD_objdict + 6;
goto LABEL_4;
case 4119:
*a3 = &CANOpenShellMasterOD_Index1017_callbacks;
result = &CANOpenShellMasterOD_objdict + 8;
goto LABEL_4;
case 4120:
result = &CANOpenShellMasterOD_objdict + 10;
goto LABEL_4;
case 4736:
result = &CANOpenShellMasterOD_objdict + 12;
goto LABEL_4;
case 4737:
result = &CANOpenShellMasterOD_objdict + 14;
goto LABEL_4;
case 4738:
result = &CANOpenShellMasterOD_objdict + 16;
goto LABEL_4;
case 4739:
result = &CANOpenShellMasterOD_objdict + 18;
goto LABEL_4;
case 4740:
result = &CANOpenShellMasterOD_objdict + 20;
goto LABEL_4;
case 4741:
result = &CANOpenShellMasterOD_objdict + 22;
goto LABEL_4;
case 4742:
result = &CANOpenShellMasterOD_objdict + 24;
goto LABEL_4;
case 4743:
result = &CANOpenShellMasterOD_objdict + 26;
goto LABEL_4;
case 4744:
result = &CANOpenShellMasterOD_objdict + 28;
goto LABEL_4;
case 4745:
result = &CANOpenShellMasterOD_objdict + 30;
goto LABEL_4;
case 4746:
result = &CANOpenShellMasterOD_objdict + 32;
goto LABEL_4;
case 4747:
result = &CANOpenShellMasterOD_objdict + 34;
goto LABEL_4;
case 4748:
result = &CANOpenShellMasterOD_objdict + 36;
goto LABEL_4;
case 4749:
result = &CANOpenShellMasterOD_objdict + 38;
goto LABEL_4;
case 4750:
result = &CANOpenShellMasterOD_objdict + 40;
goto LABEL_4;
case 4751:
result = &CANOpenShellMasterOD_objdict + 42;
goto LABEL_4;
case 4752:
result = &CANOpenShellMasterOD_objdict + 44;
goto LABEL_4;
case 4753:
result = &CANOpenShellMasterOD_objdict + 46;
goto LABEL_4;
case 4754:
result = &CANOpenShellMasterOD_objdict + 48;
goto LABEL_4;
case 4755:
result = &CANOpenShellMasterOD_objdict + 50;
goto LABEL_4;
case 4756:
result = &CANOpenShellMasterOD_objdict + 52;
goto LABEL_4;
case 4757:
result = &CANOpenShellMasterOD_objdict + 54;
goto LABEL_4;
case 4758:
result = &CANOpenShellMasterOD_objdict + 56;
goto LABEL_4;
case 4759:
result = &CANOpenShellMasterOD_objdict + 58;
goto LABEL_4;
case 4760:
result = &CANOpenShellMasterOD_objdict + 60;
goto LABEL_4;
case 4761:
result = &CANOpenShellMasterOD_objdict + 62;
goto LABEL_4;
case 4762:
result = &CANOpenShellMasterOD_objdict + 64;
goto LABEL_4;
case 4763:
result = &CANOpenShellMasterOD_objdict + 66;
goto LABEL_4;
case 4764:
result = &CANOpenShellMasterOD_objdict + 68;
goto LABEL_4;
case 4765:
result = &CANOpenShellMasterOD_objdict + 70;
goto LABEL_4;
case 4766:
result = &CANOpenShellMasterOD_objdict + 72;
goto LABEL_4;
case 4767:
result = &CANOpenShellMasterOD_objdict + 74;
goto LABEL_4;
case 4768:
result = &CANOpenShellMasterOD_objdict + 76;
goto LABEL_4;
case 4769:
result = &CANOpenShellMasterOD_objdict + 78;
goto LABEL_4;
case 4770:
result = &CANOpenShellMasterOD_objdict + 80;
goto LABEL_4;
case 4771:
result = &CANOpenShellMasterOD_objdict + 82;
goto LABEL_4;
case 4772:
result = &CANOpenShellMasterOD_objdict + 84;
goto LABEL_4;
case 4773:
result = &CANOpenShellMasterOD_objdict + 86;
goto LABEL_4;
case 4774:
result = &CANOpenShellMasterOD_objdict + 88;
goto LABEL_4;
case 4775:
result = &CANOpenShellMasterOD_objdict + 90;
goto LABEL_4;
case 4776:
result = &CANOpenShellMasterOD_objdict + 92;
goto LABEL_4;
case 4777:
result = &CANOpenShellMasterOD_objdict + 94;
goto LABEL_4;
case 4778:
result = &CANOpenShellMasterOD_objdict + 96;
goto LABEL_4;
case 4779:
result = &CANOpenShellMasterOD_objdict + 98;
goto LABEL_4;
case 4780:
result = &CANOpenShellMasterOD_objdict + 100;
goto LABEL_4;
case 4781:
result = &CANOpenShellMasterOD_objdict + 102;
goto LABEL_4;
case 4782:
result = &CANOpenShellMasterOD_objdict + 104;
goto LABEL_4;
case 4783:
result = &CANOpenShellMasterOD_objdict + 106;
goto LABEL_4;
case 4784:
result = &CANOpenShellMasterOD_objdict + 108;
goto LABEL_4;
case 4785:
result = &CANOpenShellMasterOD_objdict + 110;
goto LABEL_4;
case 4786:
result = &CANOpenShellMasterOD_objdict + 112;
goto LABEL_4;
case 4787:
result = &CANOpenShellMasterOD_objdict + 114;
goto LABEL_4;
case 4788:
result = &CANOpenShellMasterOD_objdict + 116;
goto LABEL_4;
case 4789:
result = &CANOpenShellMasterOD_objdict + 118;
goto LABEL_4;
case 4790:
result = &CANOpenShellMasterOD_objdict + 120;
goto LABEL_4;
case 4791:
result = &CANOpenShellMasterOD_objdict + 122;
goto LABEL_4;
case 4792:
result = &CANOpenShellMasterOD_objdict + 124;
goto LABEL_4;
case 4793:
result = &CANOpenShellMasterOD_objdict + 126;
goto LABEL_4;
case 4794:
result = &CANOpenShellMasterOD_objdict + 128;
goto LABEL_4;
case 4795:
result = &CANOpenShellMasterOD_objdict + 130;
goto LABEL_4;
case 4796:
result = &CANOpenShellMasterOD_objdict + 132;
goto LABEL_4;
case 4797:
result = &CANOpenShellMasterOD_objdict + 134;
goto LABEL_4;
case 4798:
result = &CANOpenShellMasterOD_objdict + 136;
goto LABEL_4;
case 4799:
result = &CANOpenShellMasterOD_objdict + 138;
goto LABEL_4;
case 4800:
result = &CANOpenShellMasterOD_objdict + 140;
goto LABEL_4;
case 4801:
result = &CANOpenShellMasterOD_objdict + 142;
goto LABEL_4;
case 4802:
result = &CANOpenShellMasterOD_objdict + 144;
goto LABEL_4;
case 4803:
result = &CANOpenShellMasterOD_objdict + 146;
goto LABEL_4;
case 4804:
result = &CANOpenShellMasterOD_objdict + 148;
goto LABEL_4;
case 4805:
result = &CANOpenShellMasterOD_objdict + 150;
goto LABEL_4;
case 4806:
result = &CANOpenShellMasterOD_objdict + 152;
goto LABEL_4;
case 4807:
result = &CANOpenShellMasterOD_objdict + 154;
goto LABEL_4;
case 4808:
result = &CANOpenShellMasterOD_objdict + 156;
goto LABEL_4;
case 4809:
result = &CANOpenShellMasterOD_objdict + 158;
goto LABEL_4;
case 4810:
result = &CANOpenShellMasterOD_objdict + 160;
goto LABEL_4;
case 4811:
result = &CANOpenShellMasterOD_objdict + 162;
goto LABEL_4;
case 4812:
result = &CANOpenShellMasterOD_objdict + 164;
goto LABEL_4;
case 4813:
result = &CANOpenShellMasterOD_objdict + 166;
goto LABEL_4;
case 4814:
result = &CANOpenShellMasterOD_objdict + 168;
goto LABEL_4;
case 4815:
result = &CANOpenShellMasterOD_objdict + 170;
goto LABEL_4;
case 4816:
result = &CANOpenShellMasterOD_objdict + 172;
goto LABEL_4;
case 4817:
result = &CANOpenShellMasterOD_objdict + 174;
goto LABEL_4;
case 4818:
result = &CANOpenShellMasterOD_objdict + 176;
goto LABEL_4;
case 4819:
result = &CANOpenShellMasterOD_objdict + 178;
goto LABEL_4;
case 4820:
result = &CANOpenShellMasterOD_objdict + 180;
goto LABEL_4;
case 4821:
result = &CANOpenShellMasterOD_objdict + 182;
goto LABEL_4;
case 4822:
result = &CANOpenShellMasterOD_objdict + 184;
goto LABEL_4;
case 4823:
result = &CANOpenShellMasterOD_objdict + 186;
goto LABEL_4;
case 4824:
result = &CANOpenShellMasterOD_objdict + 188;
goto LABEL_4;
case 4825:
result = &CANOpenShellMasterOD_objdict + 190;
goto LABEL_4;
case 4826:
result = &CANOpenShellMasterOD_objdict + 192;
goto LABEL_4;
case 4827:
result = &CANOpenShellMasterOD_objdict + 194;
goto LABEL_4;
case 4828:
result = &CANOpenShellMasterOD_objdict + 196;
goto LABEL_4;
case 4829:
result = &CANOpenShellMasterOD_objdict + 198;
goto LABEL_4;
case 4830:
result = &CANOpenShellMasterOD_objdict + 200;
goto LABEL_4;
case 4831:
result = &CANOpenShellMasterOD_objdict + 202;
goto LABEL_4;
case 4832:
result = &CANOpenShellMasterOD_objdict + 204;
goto LABEL_4;
case 4833:
result = &CANOpenShellMasterOD_objdict + 206;
goto LABEL_4;
case 4834:
result = &CANOpenShellMasterOD_objdict + 208;
goto LABEL_4;
case 4835:
result = &CANOpenShellMasterOD_objdict + 210;
goto LABEL_4;
case 4836:
result = &CANOpenShellMasterOD_objdict + 212;
goto LABEL_4;
case 4837:
result = &CANOpenShellMasterOD_objdict + 214;
goto LABEL_4;
case 4838:
result = &CANOpenShellMasterOD_objdict + 216;
goto LABEL_4;
case 4839:
result = &CANOpenShellMasterOD_objdict + 218;
goto LABEL_4;
case 4840:
result = &CANOpenShellMasterOD_objdict + 220;
goto LABEL_4;
case 4841:
result = &CANOpenShellMasterOD_objdict + 222;
goto LABEL_4;
case 4842:
result = &CANOpenShellMasterOD_objdict + 224;
goto LABEL_4;
case 4843:
result = &CANOpenShellMasterOD_objdict + 226;
goto LABEL_4;
case 4844:
result = &CANOpenShellMasterOD_objdict + 228;
goto LABEL_4;
case 4845:
result = &CANOpenShellMasterOD_objdict + 230;
goto LABEL_4;
case 4846:
result = &CANOpenShellMasterOD_objdict + 232;
goto LABEL_4;
case 4847:
result = &CANOpenShellMasterOD_objdict + 234;
goto LABEL_4;
case 4848:
result = &CANOpenShellMasterOD_objdict + 236;
goto LABEL_4;
case 4849:
result = &CANOpenShellMasterOD_objdict + 238;
goto LABEL_4;
case 4850:
result = &CANOpenShellMasterOD_objdict + 240;
goto LABEL_4;
case 4851:
result = &CANOpenShellMasterOD_objdict + 242;
goto LABEL_4;
case 4852:
result = &CANOpenShellMasterOD_objdict + 244;
goto LABEL_4;
case 4853:
result = &CANOpenShellMasterOD_objdict + 246;
goto LABEL_4;
case 4854:
result = &CANOpenShellMasterOD_objdict + 248;
goto LABEL_4;
case 4855:
result = &CANOpenShellMasterOD_objdict + 250;
goto LABEL_4;
case 4856:
result = &CANOpenShellMasterOD_objdict + 252;
goto LABEL_4;
case 4857:
result = &CANOpenShellMasterOD_objdict + 254;
goto LABEL_4;
case 4858:
result = &CANOpenShellMasterOD_objdict + 256;
goto LABEL_4;
case 4859:
result = &CANOpenShellMasterOD_objdict + 258;
goto LABEL_4;
case 4860:
result = &CANOpenShellMasterOD_objdict + 260;
goto LABEL_4;
case 4861:
result = &CANOpenShellMasterOD_objdict + 262;
goto LABEL_4;
case 4862:
result = &CANOpenShellMasterOD_objdict + 264;
LABEL_4:
*a2 = 0LL;
break;
default:
*a2 = 100794368LL;
result = 0LL;
break;
}
return result;
}

original_code:
const indextable * CANOpenShellMasterOD_scanIndexOD (unsigned short wIndex, unsigned long int * errorCode, ODCallback_t **callbacks)
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1005: i = 2;*callbacks = CANOpenShellMasterOD_Index1005_callbacks; break;
  case 0x1006: i = 3;*callbacks = CANOpenShellMasterOD_Index1006_callbacks; break;
  case 0x1017: i = 4;*callbacks = CANOpenShellMasterOD_Index1017_callbacks; break;
  case 0x1018: i = 5;break;
  case 0x1280: i = 6;break;
  case 0x1281: i = 7;break;
  case 0x1282: i = 8;break;
  case 0x1283: i = 9;break;
  case 0x1284: i = 10;break;
  case 0x1285: i = 11;break;
  case 0x1286: i = 12;break;
  case 0x1287: i = 13;break;
  case 0x1288: i = 14;break;
  case 0x1289: i = 15;break;
  case 0x128A: i = 16;break;
  case 0x128B: i = 17;break;
  case 0x128C: i = 18;break;
  case 0x128D: i = 19;break;
  case 0x128E: i = 20;break;
  case 0x128F: i = 21;break;
  case 0x1290: i = 22;break;
  case 0x1291: i = 23;break;
  case 0x1292: i = 24;break;
  case 0x1293: i = 25;break;
  case 0x1294: i = 26;break;
  case 0x1295: i = 27;break;
  case 0x1296: i = 28;break;
  case 0x1297: i = 29;break;
  case 0x1298: i = 30;break;
  case 0x1299: i = 31;break;
  case 0x129A: i = 32;break;
  case 0x129B: i = 33;break;
  case 0x129C: i = 34;break;
  case 0x129D: i = 35;break;
  case 0x129E: i = 36;break;
  case 0x129F: i = 37;break;
  case 0x12A0: i = 38;break;
  case 0x12A1: i = 39;break;
  case 0x12A2: i = 40;break;
  case 0x12A3: i = 41;break;
  case 0x12A4: i = 42;break;
  case 0x12A5: i = 43;break;
  case 0x12A6: i = 44;break;
  case 0x12A7: i = 45;break;
  case 0x12A8: i = 46;break;
  case 0x12A9: i = 47;break;
  case 0x12AA: i = 48;break;
  case 0x12AB: i = 49;break;
  case 0x12AC: i = 50;break;
  case 0x12AD: i = 51;break;
  case 0x12AE: i = 52;break;
  case 0x12AF: i = 53;break;
  case 0x12B0: i = 54;break;
  case 0x12B1: i = 55;break;
  case 0x12B2: i = 56;break;
  case 0x12B3: i = 57;break;
  case 0x12B4: i = 58;break;
  case 0x12B5: i = 59;break;
  case 0x12B6: i = 60;break;
  case 0x12B7: i = 61;break;
  case 0x12B8: i = 62;break;
  case 0x12B9: i = 63;break;
  case 0x12BA: i = 64;break;
  case 0x12BB: i = 65;break;
  case 0x12BC: i = 66;break;
  case 0x12BD: i = 67;break;
  case 0x12BE: i = 68;break;
  case 0x12BF: i = 69;break;
  case 0x12C0: i = 70;break;
  case 0x12C1: i = 71;break;
  case 0x12C2: i = 72;break;
  case 0x12C3: i = 73;break;
  case 0x12C4: i = 74;break;
  case 0x12C5: i = 75;break;
  case 0x12C6: i = 76;break;
  case 0x12C7: i = 77;break;
  case 0x12C8: i = 78;break;
  case 0x12C9: i = 79;break;
  case 0x12CA: i = 80;break;
  case 0x12CB: i = 81;break;
  case 0x12CC: i = 82;break;
  case 0x12CD: i = 83;break;
  case 0x12CE: i = 84;break;
  case 0x12CF: i = 85;break;
  case 0x12D0: i = 86;break;
  case 0x12D1: i = 87;break;
  case 0x12D2: i = 88;break;
  case 0x12D3: i = 89;break;
  case 0x12D4: i = 90;break;
  case 0x12D5: i = 91;break;
  case 0x12D6: i = 92;break;
  case 0x12D7: i = 93;break;
  case 0x12D8: i = 94;break;
  case 0x12D9: i = 95;break;
  case 0x12DA: i = 96;break;
  case 0x12DB: i = 97;break;
  case 0x12DC: i = 98;break;
  case 0x12DD: i = 99;break;
  case 0x12DE: i = 100;break;
  case 0x12DF: i = 101;break;
  case 0x12E0: i = 102;break;
  case 0x12E1: i = 103;break;
  case 0x12E2: i = 104;break;
  case 0x12E3: i = 105;break;
  case 0x12E4: i = 106;break;
  case 0x12E5: i = 107;break;
  case 0x12E6: i = 108;break;
  case 0x12E7: i = 109;break;
  case 0x12E8: i = 110;break;
  case 0x12E9: i = 111;break;
  case 0x12EA: i = 112;break;
  case 0x12EB: i = 113;break;
  case 0x12EC: i = 114;break;
  case 0x12ED: i = 115;break;
  case 0x12EE: i = 116;break;
  case 0x12EF: i = 117;break;
  case 0x12F0: i = 118;break;
  case 0x12F1: i = 119;break;
  case 0x12F2: i = 120;break;
  case 0x12F3: i = 121;break;
  case 0x12F4: i = 122;break;
  case 0x12F5: i = 123;break;
  case 0x12F6: i = 124;break;
  case 0x12F7: i = 125;break;
  case 0x12F8: i = 126;break;
  case 0x12F9: i = 127;break;
  case 0x12FA: i = 128;break;
  case 0x12FB: i = 129;break;
  case 0x12FC: i = 130;break;
  case 0x12FD: i = 131;break;
  case 0x12FE: i = 132;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &CANOpenShellMasterOD_objdict[i];
}

canonical_original_code:
struct td_indextable *CANOpenShellMasterOD_scanIndexOD(unsigned short wIndex, unsigned long *errorCode, unsigned long (***callbacks)(struct struct_CO_Data *d, struct td_indextable *, unsigned char bSubindex))
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1005: i = 2;*callbacks = CANOpenShellMasterOD_Index1005_callbacks; break;
  case 0x1006: i = 3;*callbacks = CANOpenShellMasterOD_Index1006_callbacks; break;
  case 0x1017: i = 4;*callbacks = CANOpenShellMasterOD_Index1017_callbacks; break;
  case 0x1018: i = 5;break;
  case 0x1280: i = 6;break;
  case 0x1281: i = 7;break;
  case 0x1282: i = 8;break;
  case 0x1283: i = 9;break;
  case 0x1284: i = 10;break;
  case 0x1285: i = 11;break;
  case 0x1286: i = 12;break;
  case 0x1287: i = 13;break;
  case 0x1288: i = 14;break;
  case 0x1289: i = 15;break;
  case 0x128A: i = 16;break;
  case 0x128B: i = 17;break;
  case 0x128C: i = 18;break;
  case 0x128D: i = 19;break;
  case 0x128E: i = 20;break;
  case 0x128F: i = 21;break;
  case 0x1290: i = 22;break;
  case 0x1291: i = 23;break;
  case 0x1292: i = 24;break;
  case 0x1293: i = 25;break;
  case 0x1294: i = 26;break;
  case 0x1295: i = 27;break;
  case 0x1296: i = 28;break;
  case 0x1297: i = 29;break;
  case 0x1298: i = 30;break;
  case 0x1299: i = 31;break;
  case 0x129A: i = 32;break;
  case 0x129B: i = 33;break;
  case 0x129C: i = 34;break;
  case 0x129D: i = 35;break;
  case 0x129E: i = 36;break;
  case 0x129F: i = 37;break;
  case 0x12A0: i = 38;break;
  case 0x12A1: i = 39;break;
  case 0x12A2: i = 40;break;
  case 0x12A3: i = 41;break;
  case 0x12A4: i = 42;break;
  case 0x12A5: i = 43;break;
  case 0x12A6: i = 44;break;
  case 0x12A7: i = 45;break;
  case 0x12A8: i = 46;break;
  case 0x12A9: i = 47;break;
  case 0x12AA: i = 48;break;
  case 0x12AB: i = 49;break;
  case 0x12AC: i = 50;break;
  case 0x12AD: i = 51;break;
  case 0x12AE: i = 52;break;
  case 0x12AF: i = 53;break;
  case 0x12B0: i = 54;break;
  case 0x12B1: i = 55;break;
  case 0x12B2: i = 56;break;
  case 0x12B3: i = 57;break;
  case 0x12B4: i = 58;break;
  case 0x12B5: i = 59;break;
  case 0x12B6: i = 60;break;
  case 0x12B7: i = 61;break;
  case 0x12B8: i = 62;break;
  case 0x12B9: i = 63;break;
  case 0x12BA: i = 64;break;
  case 0x12BB: i = 65;break;
  case 0x12BC: i = 66;break;
  case 0x12BD: i = 67;break;
  case 0x12BE: i = 68;break;
  case 0x12BF: i = 69;break;
  case 0x12C0: i = 70;break;
  case 0x12C1: i = 71;break;
  case 0x12C2: i = 72;break;
  case 0x12C3: i = 73;break;
  case 0x12C4: i = 74;break;
  case 0x12C5: i = 75;break;
  case 0x12C6: i = 76;break;
  case 0x12C7: i = 77;break;
  case 0x12C8: i = 78;break;
  case 0x12C9: i = 79;break;
  case 0x12CA: i = 80;break;
  case 0x12CB: i = 81;break;
  case 0x12CC: i = 82;break;
  case 0x12CD: i = 83;break;
  case 0x12CE: i = 84;break;
  case 0x12CF: i = 85;break;
  case 0x12D0: i = 86;break;
  case 0x12D1: i = 87;break;
  case 0x12D2: i = 88;break;
  case 0x12D3: i = 89;break;
  case 0x12D4: i = 90;break;
  case 0x12D5: i = 91;break;
  case 0x12D6: i = 92;break;
  case 0x12D7: i = 93;break;
  case 0x12D8: i = 94;break;
  case 0x12D9: i = 95;break;
  case 0x12DA: i = 96;break;
  case 0x12DB: i = 97;break;
  case 0x12DC: i = 98;break;
  case 0x12DD: i = 99;break;
  case 0x12DE: i = 100;break;
  case 0x12DF: i = 101;break;
  case 0x12E0: i = 102;break;
  case 0x12E1: i = 103;break;
  case 0x12E2: i = 104;break;
  case 0x12E3: i = 105;break;
  case 0x12E4: i = 106;break;
  case 0x12E5: i = 107;break;
  case 0x12E6: i = 108;break;
  case 0x12E7: i = 109;break;
  case 0x12E8: i = 110;break;
  case 0x12E9: i = 111;break;
  case 0x12EA: i = 112;break;
  case 0x12EB: i = 113;break;
  case 0x12EC: i = 114;break;
  case 0x12ED: i = 115;break;
  case 0x12EE: i = 116;break;
  case 0x12EF: i = 117;break;
  case 0x12F0: i = 118;break;
  case 0x12F1: i = 119;break;
  case 0x12F2: i = 120;break;
  case 0x12F3: i = 121;break;
  case 0x12F4: i = 122;break;
  case 0x12F5: i = 123;break;
  case 0x12F6: i = 124;break;
  case 0x12F7: i = 125;break;
  case 0x12F8: i = 126;break;
  case 0x12F9: i = 127;break;
  case 0x12FA: i = 128;break;
  case 0x12FB: i = 129;break;
  case 0x12FC: i = 130;break;
  case 0x12FD: i = 131;break;
  case 0x12FE: i = 132;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &CANOpenShellMasterOD_objdict[i];
}


decompiled_code:
__int64 __fastcall TestSlaveA_valueRangeTest(char a1, _BYTE *a2)
{
__int64 result; // rax

result = 0LL;
if ( a1 == -97 )
result = *a2 != 0 ? 0x6090030 : 0;
return result;
}

original_code:
unsigned long int TestSlaveA_valueRangeTest (unsigned char typeValue, void * value)
{
  switch (typeValue) {
    case 0x9F:
      if (*(unsigned char*)value != (unsigned char)0) return 0x06090030;
      break;
  }
  return 0;
}

canonical_original_code:
unsigned long TestSlaveA_valueRangeTest(unsigned char typeValue, void *value)
{
  switch (typeValue) {
    case 0x9F:
      if (*(unsigned char *)value != (unsigned char)0) return 0x06090030;
      break;
  }
  return 0;
}


decompiled_code:
void ***__fastcall TestSlaveA_scanIndexOD(unsigned __int16 a1, _QWORD *a2, _QWORD *a3)
{
void ***result; // rax

*a3 = 0LL;
if ( a1 <= 0x1018u )
{
if ( a1 > 0xFFFu )
{
switch ( a1 )
{
case 0x1000u:
result = &TestSlaveA_objdict;
goto LABEL_9;
case 0x1001u:
result = &TestSlaveA_objdict + 2;
goto LABEL_9;
case 0x1003u:
*a3 = &TestSlaveA_Index1003_callbacks;
result = &TestSlaveA_objdict + 4;
goto LABEL_9;
case 0x1005u:
*a3 = &TestSlaveA_Index1005_callbacks;
result = &TestSlaveA_objdict + 6;
goto LABEL_9;
case 0x1006u:
*a3 = &TestSlaveA_Index1006_callbacks;
result = &TestSlaveA_objdict + 8;
goto LABEL_9;
case 0x1010u:
*a3 = &TestSlaveA_Index1010_callbacks;
result = &TestSlaveA_objdict + 10;
goto LABEL_9;
case 0x1011u:
*a3 = &TestSlaveA_Index1011_callbacks;
result = &TestSlaveA_objdict + 12;
goto LABEL_9;
case 0x1014u:
result = &TestSlaveA_objdict + 14;
goto LABEL_9;
case 0x1017u:
*a3 = &TestSlaveA_Index1017_callbacks;
result = &TestSlaveA_objdict + 16;
goto LABEL_9;
case 0x1018u:
result = &TestSlaveA_objdict + 18;
goto LABEL_9;
default:
break;
}
}
LABEL_15:
*a2 = 100794368LL;
return 0LL;
}
if ( a1 != 6656 )
{
if ( a1 <= 0x1A00u )
{
if ( a1 == 4608 )
{
*a2 = 0LL;
return &TestSlaveA_objdict + 20;
}
if ( a1 != 6144 )
goto LABEL_15;
*a3 = &TestSlaveA_Index1800_callbacks;
result = &TestSlaveA_objdict + 22;
}
else
{
if ( a1 == 0x2000 )
{
*a2 = 0LL;
return &TestSlaveA_objdict + 26;
}
if ( a1 != 8193 )
goto LABEL_15;
result = &TestSlaveA_objdict + 28;
}
LABEL_9:
*a2 = 0LL;
return result;
}
*a2 = 0LL;
return &TestSlaveA_objdict + 24;
}

canonical_decompiled_code:
void ***__fastcall func1(unsigned __int16 a1, _QWORD *a2, _QWORD *a3)
{
void ***result; // rax

*a3 = 0LL;
if ( a1 <= 0x1018u )
{
if ( a1 > 0xFFFu )
{
switch ( a1 )
{
case 0x1000u:
result = &TestSlaveA_objdict;
goto LABEL_9;
case 0x1001u:
result = &TestSlaveA_objdict + 2;
goto LABEL_9;
case 0x1003u:
*a3 = &TestSlaveA_Index1003_callbacks;
result = &TestSlaveA_objdict + 4;
goto LABEL_9;
case 0x1005u:
*a3 = &TestSlaveA_Index1005_callbacks;
result = &TestSlaveA_objdict + 6;
goto LABEL_9;
case 0x1006u:
*a3 = &TestSlaveA_Index1006_callbacks;
result = &TestSlaveA_objdict + 8;
goto LABEL_9;
case 0x1010u:
*a3 = &TestSlaveA_Index1010_callbacks;
result = &TestSlaveA_objdict + 10;
goto LABEL_9;
case 0x1011u:
*a3 = &TestSlaveA_Index1011_callbacks;
result = &TestSlaveA_objdict + 12;
goto LABEL_9;
case 0x1014u:
result = &TestSlaveA_objdict + 14;
goto LABEL_9;
case 0x1017u:
*a3 = &TestSlaveA_Index1017_callbacks;
result = &TestSlaveA_objdict + 16;
goto LABEL_9;
case 0x1018u:
result = &TestSlaveA_objdict + 18;
goto LABEL_9;
default:
break;
}
}
LABEL_15:
*a2 = 100794368LL;
return 0LL;
}
if ( a1 != 6656 )
{
if ( a1 <= 0x1A00u )
{
if ( a1 == 4608 )
{
*a2 = 0LL;
return &TestSlaveA_objdict + 20;
}
if ( a1 != 6144 )
goto LABEL_15;
*a3 = &TestSlaveA_Index1800_callbacks;
result = &TestSlaveA_objdict + 22;
}
else
{
if ( a1 == 0x2000 )
{
*a2 = 0LL;
return &TestSlaveA_objdict + 26;
}
if ( a1 != 8193 )
goto LABEL_15;
result = &TestSlaveA_objdict + 28;
}
LABEL_9:
*a2 = 0LL;
return result;
}
*a2 = 0LL;
return &TestSlaveA_objdict + 24;
}

original_code:
const indextable * TestSlaveA_scanIndexOD (unsigned short wIndex, unsigned long int * errorCode, ODCallback_t **callbacks)
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1003: i = 2;*callbacks = TestSlaveA_Index1003_callbacks; break;
  case 0x1005: i = 3;*callbacks = TestSlaveA_Index1005_callbacks; break;
  case 0x1006: i = 4;*callbacks = TestSlaveA_Index1006_callbacks; break;
  case 0x1010: i = 5;*callbacks = TestSlaveA_Index1010_callbacks; break;
  case 0x1011: i = 6;*callbacks = TestSlaveA_Index1011_callbacks; break;
  case 0x1014: i = 7;break;
  case 0x1017: i = 8;*callbacks = TestSlaveA_Index1017_callbacks; break;
  case 0x1018: i = 9;break;
  case 0x1200: i = 10;break;
  case 0x1800: i = 11;*callbacks = TestSlaveA_Index1800_callbacks; break;
  case 0x1A00: i = 12;break;
  case 0x2000: i = 13;break;
  case 0x2001: i = 14;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &TestSlaveA_objdict[i];
}

canonical_original_code:
struct td_indextable *TestSlaveA_scanIndexOD(unsigned short wIndex, unsigned long *errorCode, unsigned long (***callbacks)(struct struct_CO_Data *d, struct td_indextable *, unsigned char bSubindex))
{
 int i;
 *callbacks = ((void *)0);
 switch(wIndex){
  case 0x1000: i = 0;break;
  case 0x1001: i = 1;break;
  case 0x1003: i = 2;*callbacks = TestSlaveA_Index1003_callbacks; break;
  case 0x1005: i = 3;*callbacks = TestSlaveA_Index1005_callbacks; break;
  case 0x1006: i = 4;*callbacks = TestSlaveA_Index1006_callbacks; break;
  case 0x1010: i = 5;*callbacks = TestSlaveA_Index1010_callbacks; break;
  case 0x1011: i = 6;*callbacks = TestSlaveA_Index1011_callbacks; break;
  case 0x1014: i = 7;break;
  case 0x1017: i = 8;*callbacks = TestSlaveA_Index1017_callbacks; break;
  case 0x1018: i = 9;break;
  case 0x1200: i = 10;break;
  case 0x1800: i = 11;*callbacks = TestSlaveA_Index1800_callbacks; break;
  case 0x1A00: i = 12;break;
  case 0x2000: i = 13;break;
  case 0x2001: i = 14;break;
  default:
   *errorCode = 0x06020000;
   return ((void *)0);
 }
 *errorCode = 0x00000000;
 return &TestSlaveA_objdict[i];
}


decompiled_code:
int __fastcall TestMaster_heartbeatError(__int64 a1, unsigned __int8 a2)
{
return printf("TestMaster_heartbeatError %d\n", a2);
}

canonical_decompiled_code:
int __fastcall func1(__int64 a1, unsigned __int8 a2)
{
return printf("TestMaster_heartbeatError %d\n", a2);
}

original_code:
void TestMaster_heartbeatError(CO_Data* d, unsigned char heartbeatID)
{
 printf ("TestMaster_heartbeatError %d\n", heartbeatID);
}

canonical_original_code:
void TestMaster_heartbeatError(struct struct_CO_Data *d, unsigned char heartbeatID)
{
 printf ("TestMaster_heartbeatError %d\n", heartbeatID);
}

variable_types: struct struct_CO_Data { unsigned char *bDeviceNodeId; struct td_indextable { struct td_subindex { unsigned char bAccessType; unsigned char bDataType; unsigned long size; void *pObject; } *pSubindex; unsigned char bSubCount; unsigned short index; } *objdict; struct struct_s_PDO_status { unsigned char transmit_type_parameter; short event_timer; short inhibit_timer; struct Message { unsigned short cob_id; unsigned char rtr; unsigned char len; unsigned char data[8]; } last_message; } *PDO_status; short *RxPDO_EventTimers; void (*RxPDO_EventTimers_Handler)(struct struct_CO_Data *, unsigned long); struct s_quick_index { unsigned short SDO_SVR; unsigned short SDO_CLT; unsigned short PDO_RCV; unsigned short PDO_RCV_MAP; unsigned short PDO_TRS; unsigned short PDO_TRS_MAP; } *firstIndex; struct s_quick_index *lastIndex; unsigned short *ObjdictSize; unsigned char *iam_a_slave; unsigned long (*valueRangeTest)(unsigned char typeValue, void *Value); struct struct_s_transfer { unsigned char CliServNbr; unsigned char whoami; unsigned char state; unsigned char toggle; unsigned long abortCode; unsigned short index; unsigned char subIndex; unsigned long count; unsigned long offset; unsigned char data[32]; unsigned char peerCRCsupport; unsigned char blksize; unsigned char ackseq; unsigned long objsize; unsigned char lastblockoffset; unsigned char seqno; unsigned char endfield; enum rxStep_t { RXSTEP_INIT=0, RXSTEP_STARTED=1, RXSTEP_END=2 } rxstep; unsigned char tmpData[8]; unsigned char dataType; short timer; void (*Callback)(struct struct_CO_Data *d, unsigned char nodeId); } transfers[4]; enum enum_nodeState { Initialisation=0, Disconnected=1, Connecting=2, Preparing=2, Stopped=4, Operational=5, Pre_operational=127, Unknown_state=15 } nodeState; struct s_state_communication { char csBoot_Up; char csSDO; char csEmergency; char csSYNC; char csLifeGuard; char csPDO; char csLSS; } CurrentCommunicationState; void (*initialisation)(struct struct_CO_Data *); void (*preOperational)(struct struct_CO_Data *); void (*operational)(struct struct_CO_Data *); void (*stopped)(struct struct_CO_Data *); void (*NMT_Slave_Node_Reset_Callback)(struct struct_CO_Data *); void (*NMT_Slave_Communications_Reset_Callback)(struct struct_CO_Data *); unsigned char *ConsumerHeartbeatCount; unsigned long *ConsumerHeartbeatEntries; short *ConsumerHeartBeatTimers; unsigned short *ProducerHeartBeatTime; short ProducerHeartBeatTimer; void (*heartbeatError)(struct struct_CO_Data *, unsigned char); enum enum_nodeState { Initialisation=0, Disconnected=1, Connecting=2, Preparing=2, Stopped=4, Operational=5, Pre_operational=127, Unknown_state=15 } NMTable[128]; short GuardTimeTimer; short LifeTimeTimer; void (*nodeguardError)(struct struct_CO_Data *, unsigned char); unsigned short *GuardTime; unsigned char *LifeTimeFactor; unsigned char nodeGuardStatus[128]; short syncTimer; unsigned long *COB_ID_Sync; unsigned long *Sync_Cycle_Period; void (*post_sync)(struct struct_CO_Data *); void (*post_TPDO)(struct struct_CO_Data *); void (*post_SlaveBootup)(struct struct_CO_Data *, unsigned char); void (*post_SlaveStateChange)(struct struct_CO_Data *, unsigned char, enum enum_nodeState { Initialisation=0, Disconnected=1, Connecting=2, Preparing=2, Stopped=4, Operational=5, Pre_operational=127, Unknown_state=15 }); unsigned char toggle; void *canHandle; struct td_indextable *(*scanIndexOD)(unsigned short wIndex, unsigned long *errorCode, unsigned long (***Callback)(struct struct_CO_Data *d, struct td_indextable *, unsigned char bSubindex)); void (*storeODSubIndex)(struct struct_CO_Data *d, unsigned short wIndex, unsigned char bSubindex); struct td_indextable *dcf_odentry; unsigned char *dcf_cursor; unsigned long dcf_entries_count; unsigned char dcf_status; unsigned long dcf_size; unsigned char *dcf_data; enum enum_errorState { Error_free=0, Error_occurred=1 } error_state; unsigned char error_history_size; unsigned char *error_number; unsigned long *error_first_element; unsigned char *error_register; unsigned long *error_cobid; struct s_errors { unsigned short errCode; unsigned char errRegMask; unsigned char active; } error_data[8]; void (*post_emcy)(struct struct_CO_Data *d, unsigned char nodeID, unsigned short errCode, unsigned char errReg); } *

variable_types:
heartbeatID
unsigned char

return_type: void


decompiled_code:
int TestMaster_operational()
{
return puts("TestMaster_operational");
}

canonical_decompiled_code:
int func3()
{
return puts("TestMaster_operational");
}

original_code:
void TestMaster_operational(CO_Data* d)
{
 printf ("TestMaster_operational\n");
}

canonical_original_code:
void TestMaster_operational(struct struct_CO_Data *d)
{
 printf ("TestMaster_operational\n");
}


decompiled_code:
int TestMaster_stopped()
{
return puts("TestMaster_stopped");
}

canonical_decompiled_code:
int func4()
{
return puts("TestMaster_stopped");
}

original_code:
void TestMaster_stopped(CO_Data* d)
{
 printf ("TestMaster_stopped\n");
}

canonical_original_code:
void TestMaster_stopped(struct struct_CO_Data *d)
{
 printf ("TestMaster_stopped\n");
}