
/* WARNING: Unknown calling convention */

int udhcp_end_option(uint8_t *optionptr)

{
  int iVar1;
  long lVar2;
  uint8_t uVar3;
  
  uVar3 = *optionptr;
  iVar1 = 0;
  if (uVar3 != 0xff) {
    lVar2 = 0;
    do {
      if (uVar3 != '\0') {
        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];
      }
      iVar1 = iVar1 + 1;
      lVar2 = (long)iVar1;
      uVar3 = optionptr[lVar2];
    } while (uVar3 != 0xff);
  }
  return iVar1;
}



void FUN_00142e6b(char *param_1)

{
  int iVar1;
  long lVar2;
  char cVar3;
  
  cVar3 = *param_1;
  iVar1 = 0;
  if (cVar3 != -1) {
    lVar2 = 0;
    do {
      if (cVar3 != '\0') {
        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];
      }
      iVar1 = iVar1 + 1;
      lVar2 = (long)iVar1;
      cVar3 = param_1[lVar2];
    } while (cVar3 != -1);
  }
  return;
}


MOVZX EDX,byte ptr [RDI]
MOV EAX,0x0
CMP DL,0xff
JZ 0x00142e99
MOV ECX,0x0
TEST DL,DL
JZ 0x00142e8a
MOVZX EDX,byte ptr [RDI + RCX*0x1 + 0x1]
LEA EAX,[RAX + RDX*0x1 + 0x1]
ADD EAX,0x1
MOVSXD RCX,EAX
MOVZX EDX,byte ptr [RDI + RCX*0x1]
CMP DL,0xff
JNZ 0x00142e7d
RET
(translation_unit "void FUN_00142e6b(char *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00142e6b(char *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00142e6b(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (expression_statement "cVar3 = *param_1;" (assignment_expression "cVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }" if (parenthesized_expression "(cVar3 != -1)" ( (binary_expression "cVar3 != -1" identifier != number_literal) )) (compound_statement "{\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }" { (expression_statement "lVar2 = 0;" (assignment_expression "lVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);" do (compound_statement "{\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    }" { (if_statement "if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }" if (parenthesized_expression "(cVar3 != '\0')" ( (binary_expression "cVar3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }" { (expression_statement "iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];" (assignment_expression "iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1]" identifier = (binary_expression "iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1]" (binary_expression "iVar1 + 1" identifier + number_literal) + (cast_expression "(uint)(byte)param_1[lVar2 + 1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[lVar2 + 1]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[lVar2 + 1]" identifier [ (binary_expression "lVar2 + 1" identifier + number_literal) ]))))) ;) })) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "lVar2 = (long)iVar1;" (assignment_expression "lVar2 = (long)iVar1" identifier = (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "cVar3 = param_1[lVar2];" (assignment_expression "cVar3 = param_1[lVar2]" identifier = (subscript_expression "param_1[lVar2]" identifier [ identifier ])) ;) }) while (parenthesized_expression "(cVar3 != -1)" ( (binary_expression "cVar3 != -1" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint udhcp_end_option(uint8_t *optionptr)\n\n{\n  int iVar1;\n  long lVar2;\n  uint8_t uVar3;\n  \n  uVar3 = *optionptr;\n  iVar1 = 0;\n  if (uVar3 != 0xff) {\n    lVar2 = 0;\n    do {\n      if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      uVar3 = optionptr[lVar2];\n    } while (uVar3 != 0xff);\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int udhcp_end_option(uint8_t *optionptr)\n\n{\n  int iVar1;\n  long lVar2;\n  uint8_t uVar3;\n  \n  uVar3 = *optionptr;\n  iVar1 = 0;\n  if (uVar3 != 0xff) {\n    lVar2 = 0;\n    do {\n      if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      uVar3 = optionptr[lVar2];\n    } while (uVar3 != 0xff);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "udhcp_end_option(uint8_t *optionptr)" identifier (parameter_list "(uint8_t *optionptr)" ( (parameter_declaration "uint8_t *optionptr" primitive_type (pointer_declarator "*optionptr" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  uint8_t uVar3;\n  \n  uVar3 = *optionptr;\n  iVar1 = 0;\n  if (uVar3 != 0xff) {\n    lVar2 = 0;\n    do {\n      if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      uVar3 = optionptr[lVar2];\n    } while (uVar3 != 0xff);\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "uint8_t uVar3;" primitive_type identifier ;) (expression_statement "uVar3 = *optionptr;" (assignment_expression "uVar3 = *optionptr" identifier = (pointer_expression "*optionptr" * identifier)) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (uVar3 != 0xff) {\n    lVar2 = 0;\n    do {\n      if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      uVar3 = optionptr[lVar2];\n    } while (uVar3 != 0xff);\n  }" if (parenthesized_expression "(uVar3 != 0xff)" ( (binary_expression "uVar3 != 0xff" identifier != number_literal) )) (compound_statement "{\n    lVar2 = 0;\n    do {\n      if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      uVar3 = optionptr[lVar2];\n    } while (uVar3 != 0xff);\n  }" { (expression_statement "lVar2 = 0;" (assignment_expression "lVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      uVar3 = optionptr[lVar2];\n    } while (uVar3 != 0xff);" do (compound_statement "{\n      if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      uVar3 = optionptr[lVar2];\n    }" { (if_statement "if (uVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }" if (parenthesized_expression "(uVar3 != '\0')" ( (binary_expression "uVar3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];\n      }" { (expression_statement "iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1];" (assignment_expression "iVar1 = iVar1 + 1 + (uint)optionptr[lVar2 + 1]" identifier = (binary_expression "iVar1 + 1 + (uint)optionptr[lVar2 + 1]" (binary_expression "iVar1 + 1" identifier + number_literal) + (cast_expression "(uint)optionptr[lVar2 + 1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "optionptr[lVar2 + 1]" identifier [ (binary_expression "lVar2 + 1" identifier + number_literal) ])))) ;) })) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "lVar2 = (long)iVar1;" (assignment_expression "lVar2 = (long)iVar1" identifier = (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "uVar3 = optionptr[lVar2];" (assignment_expression "uVar3 = optionptr[lVar2]" identifier = (subscript_expression "optionptr[lVar2]" identifier [ identifier ])) ;) }) while (parenthesized_expression "(uVar3 != 0xff)" ( (binary_expression "uVar3 != 0xff" identifier != number_literal) )) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "void FUN_00142e6b(char *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00142e6b(char *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00142e6b(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (expression_statement "cVar3 = *param_1;" (assignment_expression "cVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }" if (parenthesized_expression "(cVar3 != -1)" ( (binary_expression "cVar3 != -1" identifier != number_literal) )) (compound_statement "{\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }" { (expression_statement "lVar2 = 0;" (assignment_expression "lVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);" do (compound_statement "{\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    }" { (if_statement "if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }" if (parenthesized_expression "(cVar3 != '\0')" ( (binary_expression "cVar3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }" { (expression_statement "iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];" (assignment_expression "iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1]" identifier = (binary_expression "iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1]" (binary_expression "iVar1 + 1" identifier + number_literal) + (cast_expression "(uint)(byte)param_1[lVar2 + 1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[lVar2 + 1]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[lVar2 + 1]" identifier [ (binary_expression "lVar2 + 1" identifier + number_literal) ]))))) ;) })) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "lVar2 = (long)iVar1;" (assignment_expression "lVar2 = (long)iVar1" identifier = (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "cVar3 = param_1[lVar2];" (assignment_expression "cVar3 = param_1[lVar2]" identifier = (subscript_expression "param_1[lVar2]" identifier [ identifier ])) ;) }) while (parenthesized_expression "(cVar3 != -1)" ( (binary_expression "cVar3 != -1" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]))))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ IDENT ])) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00142e6b(char *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00142e6b(char *param_1)" (identifier "FUN_00142e6b") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  char cVar3;\n  \n  cVar3 = *param_1;\n  iVar1 = 0;\n  if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "char cVar3;" (primitive_type "char") (identifier "cVar3") (; ";")) (expression_statement "cVar3 = *param_1;" (assignment_expression "cVar3 = *param_1" (identifier "cVar3") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (cVar3 != -1) {\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }" (if "if") (parenthesized_expression "(cVar3 != -1)" (( "(") (binary_expression "cVar3 != -1" (identifier "cVar3") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n    lVar2 = 0;\n    do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);\n  }" ({ "{") (expression_statement "lVar2 = 0;" (assignment_expression "lVar2 = 0" (identifier "lVar2") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    } while (cVar3 != -1);" (do "do") (compound_statement "{\n      if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }\n      iVar1 = iVar1 + 1;\n      lVar2 = (long)iVar1;\n      cVar3 = param_1[lVar2];\n    }" ({ "{") (if_statement "if (cVar3 != '\0') {\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }" (if "if") (parenthesized_expression "(cVar3 != '\0')" (( "(") (binary_expression "cVar3 != '\0'" (identifier "cVar3") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];\n      }" ({ "{") (expression_statement "iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];" (assignment_expression "iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1]" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1]" (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) (+ "+") (cast_expression "(uint)(byte)param_1[lVar2 + 1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(byte)param_1[lVar2 + 1]" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (subscript_expression "param_1[lVar2 + 1]" (identifier "param_1") ([ "[") (binary_expression "lVar2 + 1" (identifier "lVar2") (+ "+") (number_literal "1")) (] "]")))))) (; ";")) (} "}"))) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "lVar2 = (long)iVar1;" (assignment_expression "lVar2 = (long)iVar1" (identifier "lVar2") (= "=") (cast_expression "(long)iVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar1"))) (; ";")) (expression_statement "cVar3 = param_1[lVar2];" (assignment_expression "cVar3 = param_1[lVar2]" (identifier "cVar3") (= "=") (subscript_expression "param_1[lVar2]" (identifier "param_1") ([ "[") (identifier "lVar2") (] "]"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar3 != -1)" (( "(") (binary_expression "cVar3 != -1" (identifier "cVar3") (!= "!=") (number_literal "-1")) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(uint8_t *optionptr)

{
  int var_2;
  long var_3;
  uint8_t var_1;
  
  var_1 = *optionptr;
  var_2 = 0;
  if (var_1 != 0xff) {
    var_3 = 0;
    do {
      if (var_1 != '\0') {
        var_2 = var_2 + 1 + (type_1)optionptr[var_3 + 1];
      }
      var_2 = var_2 + 1;
      var_3 = (long)var_2;
      var_1 = optionptr[var_3];
    } while (var_1 != 0xff);
  }
  return var_2;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal)))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (return_statement))))

void MASKED(char *param_1)

{
  int iVar1;
  long lVar2;
  char cVar3;
  
  cVar3 = *param_1;
  iVar1 = 0;
  if (cVar3 != -1) {
    lVar2 = 0;
    do {
      if (cVar3 != '\0') {
        iVar1 = iVar1 + 1 + (uint)(byte)param_1[lVar2 + 1];
      }
      iVar1 = iVar1 + 1;
      lVar2 = (long)iVar1;
      cVar3 = param_1[lVar2];
    } while (cVar3 != -1);
  }
  return;
}

