
/* WARNING: Unknown calling convention */

int countargv(char **argv)

{
  long lVar1;
  long lVar2;
  
  if ((argv != (char **)0x0) && (*argv != (char *)0x0)) {
    lVar1 = 1;
    do {
      lVar2 = lVar1;
      lVar1 = lVar2 + 1;
    } while (argv[lVar2] != (char *)0x0);
    return (int)lVar2;
  }
  return 0;
}



ulong FUN_00143f60(long *param_1)

{
  long *plVar1;
  ulong uVar2;
  ulong uVar3;
  
  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
    uVar3 = 1;
    do {
      uVar2 = uVar3 & 0xffffffff;
      plVar1 = param_1 + uVar3;
      uVar3 = uVar3 + 1;
    } while (*plVar1 != 0);
    return uVar2;
  }
  return 0;
}


XOR EAX,EAX
TEST RDI,RDI
JZ 0x00143f88
CMP qword ptr [RDI],0x0
JZ 0x00143f88
MOV EDX,0x1
MOV EAX,EDX
ADD RDX,0x1
CMP qword ptr [RDI + RDX*0x8 + -0x8],0x0
JNZ 0x00143f72
RET
RET
(translation_unit "ulong FUN_00143f60(long *param_1)\n\n{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}\n\n" (function_definition "ulong FUN_00143f60(long *param_1)\n\n{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00143f60(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (if_statement "if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }" if (parenthesized_expression "((param_1 != (long *)0x0) && (*param_1 != 0))" ( (binary_expression "(param_1 != (long *)0x0) && (*param_1 != 0)" (parenthesized_expression "(param_1 != (long *)0x0)" ( (binary_expression "param_1 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) ))) )) (compound_statement "{\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (do_statement "do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);" do (compound_statement "{\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    }" { (expression_statement "uVar2 = uVar3 & 0xffffffff;" (assignment_expression "uVar2 = uVar3 & 0xffffffff" identifier = (binary_expression "uVar3 & 0xffffffff" identifier & number_literal)) ;) (expression_statement "plVar1 = param_1 + uVar3;" (assignment_expression "plVar1 = param_1 + uVar3" identifier = (binary_expression "param_1 + uVar3" identifier + identifier)) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(*plVar1 != 0)" ( (binary_expression "*plVar1 != 0" (pointer_expression "*plVar1" * identifier) != number_literal) )) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint countargv(char **argv)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  if ((argv != (char **)0x0) && (*argv != (char *)0x0)) {\n    lVar1 = 1;\n    do {\n      lVar2 = lVar1;\n      lVar1 = lVar2 + 1;\n    } while (argv[lVar2] != (char *)0x0);\n    return (int)lVar2;\n  }\n  return 0;\n}\n\n" comment (function_definition "int countargv(char **argv)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  if ((argv != (char **)0x0) && (*argv != (char *)0x0)) {\n    lVar1 = 1;\n    do {\n      lVar2 = lVar1;\n      lVar1 = lVar2 + 1;\n    } while (argv[lVar2] != (char *)0x0);\n    return (int)lVar2;\n  }\n  return 0;\n}" primitive_type (function_declarator "countargv(char **argv)" identifier (parameter_list "(char **argv)" ( (parameter_declaration "char **argv" primitive_type (pointer_declarator "**argv" * (pointer_declarator "*argv" * identifier))) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  if ((argv != (char **)0x0) && (*argv != (char *)0x0)) {\n    lVar1 = 1;\n    do {\n      lVar2 = lVar1;\n      lVar1 = lVar2 + 1;\n    } while (argv[lVar2] != (char *)0x0);\n    return (int)lVar2;\n  }\n  return 0;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (if_statement "if ((argv != (char **)0x0) && (*argv != (char *)0x0)) {\n    lVar1 = 1;\n    do {\n      lVar2 = lVar1;\n      lVar1 = lVar2 + 1;\n    } while (argv[lVar2] != (char *)0x0);\n    return (int)lVar2;\n  }" if (parenthesized_expression "((argv != (char **)0x0) && (*argv != (char *)0x0))" ( (binary_expression "(argv != (char **)0x0) && (*argv != (char *)0x0)" (parenthesized_expression "(argv != (char **)0x0)" ( (binary_expression "argv != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) && (parenthesized_expression "(*argv != (char *)0x0)" ( (binary_expression "*argv != (char *)0x0" (pointer_expression "*argv" * identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    lVar1 = 1;\n    do {\n      lVar2 = lVar1;\n      lVar1 = lVar2 + 1;\n    } while (argv[lVar2] != (char *)0x0);\n    return (int)lVar2;\n  }" { (expression_statement "lVar1 = 1;" (assignment_expression "lVar1 = 1" identifier = number_literal) ;) (do_statement "do {\n      lVar2 = lVar1;\n      lVar1 = lVar2 + 1;\n    } while (argv[lVar2] != (char *)0x0);" do (compound_statement "{\n      lVar2 = lVar1;\n      lVar1 = lVar2 + 1;\n    }" { (expression_statement "lVar2 = lVar1;" (assignment_expression "lVar2 = lVar1" identifier = identifier) ;) (expression_statement "lVar1 = lVar2 + 1;" (assignment_expression "lVar1 = lVar2 + 1" identifier = (binary_expression "lVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(argv[lVar2] != (char *)0x0)" ( (binary_expression "argv[lVar2] != (char *)0x0" (subscript_expression "argv[lVar2]" identifier [ identifier ]) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return (int)lVar2;" return (cast_expression "(int)lVar2" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "ulong FUN_00143f60(long *param_1)\n\n{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}\n\n" (function_definition "ulong FUN_00143f60(long *param_1)\n\n{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00143f60(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (if_statement "if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }" if (parenthesized_expression "((param_1 != (long *)0x0) && (*param_1 != 0))" ( (binary_expression "(param_1 != (long *)0x0) && (*param_1 != 0)" (parenthesized_expression "(param_1 != (long *)0x0)" ( (binary_expression "param_1 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) ))) )) (compound_statement "{\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (do_statement "do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);" do (compound_statement "{\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    }" { (expression_statement "uVar2 = uVar3 & 0xffffffff;" (assignment_expression "uVar2 = uVar3 & 0xffffffff" identifier = (binary_expression "uVar3 & 0xffffffff" identifier & number_literal)) ;) (expression_statement "plVar1 = param_1 + uVar3;" (assignment_expression "plVar1 = param_1 + uVar3" identifier = (binary_expression "param_1 + uVar3" identifier + identifier)) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(*plVar1 != 0)" ( (binary_expression "*plVar1 != 0" (pointer_expression "*plVar1" * identifier) != number_literal) )) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) ;) (return_statement return IDENT ;) })) (return_statement return LIT ;) })))
(function_definition "ulong FUN_00143f60(long *param_1)\n\n{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}" (type_identifier "ulong") (function_declarator "FUN_00143f60(long *param_1)" (identifier "FUN_00143f60") (parameter_list "(long *param_1)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  long *plVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }\n  return 0;\n}" ({ "{") (declaration "long *plVar1;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar1" (* "*") (identifier "plVar1")) (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (if_statement "if ((param_1 != (long *)0x0) && (*param_1 != 0)) {\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }" (if "if") (parenthesized_expression "((param_1 != (long *)0x0) && (*param_1 != 0))" (( "(") (binary_expression "(param_1 != (long *)0x0) && (*param_1 != 0)" (parenthesized_expression "(param_1 != (long *)0x0)" (( "(") (binary_expression "param_1 != (long *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(*param_1 != 0)" (( "(") (binary_expression "*param_1 != 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    uVar3 = 1;\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    } while (*plVar1 != 0);" (do "do") (compound_statement "{\n      uVar2 = uVar3 & 0xffffffff;\n      plVar1 = param_1 + uVar3;\n      uVar3 = uVar3 + 1;\n    }" ({ "{") (expression_statement "uVar2 = uVar3 & 0xffffffff;" (assignment_expression "uVar2 = uVar3 & 0xffffffff" (identifier "uVar2") (= "=") (binary_expression "uVar3 & 0xffffffff" (identifier "uVar3") (& "&") (number_literal "0xffffffff"))) (; ";")) (expression_statement "plVar1 = param_1 + uVar3;" (assignment_expression "plVar1 = param_1 + uVar3" (identifier "plVar1") (= "=") (binary_expression "param_1 + uVar3" (identifier "param_1") (+ "+") (identifier "uVar3"))) (; ";")) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 1" (identifier "uVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*plVar1 != 0)" (( "(") (binary_expression "*plVar1 != 0" (pointer_expression "*plVar1" (* "*") (identifier "plVar1")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(char **var_1)

{
  long lVar1;
  long var_2;
  
  if ((var_1 != (char **)0x0) && (*var_1 != (char *)0x0)) {
    lVar1 = 1;
    do {
      var_2 = lVar1;
      lVar1 = var_2 + 1;
    } while (var_1[var_2] != (char *)0x0);
    return (int)var_2;
  }
  return 0;
}


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

ulong MASKED(long *param_1)

{
  long *plVar1;
  ulong uVar2;
  ulong uVar3;
  
  if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
    uVar3 = 1;
    do {
      uVar2 = uVar3 & 0xffffffff;
      plVar1 = param_1 + uVar3;
      uVar3 = uVar3 + 1;
    } while (*plVar1 != 0);
    return uVar2;
  }
  return 0;
}

