
char ** vec_append(char **vec,char *str)

{
  char **ppcVar1;
  char *pcVar2;
  int iVar3;
  long lVar4;
  
  iVar3 = 1;
  if (vec != (char **)0x0) {
    if (*vec == (char *)0x0) {
      iVar3 = 0;
    }
    else {
      lVar4 = 1;
      do {
        iVar3 = (int)lVar4;
        ppcVar1 = vec + lVar4;
        lVar4 = lVar4 + 1;
      } while (*ppcVar1 != (char *)0x0);
    }
    iVar3 = iVar3 + 1;
  }
  lVar4 = (long)(iVar3 + 1);
  ppcVar1 = (char **)xrealloc(vec,lVar4 * 8);
  pcVar2 = xstrdup(str);
  ppcVar1[lVar4 + -2] = pcVar2;
  ppcVar1[lVar4 + -1] = (char *)0x0;
  return ppcVar1;
}



long FUN_0013b794(long *param_1,undefined8 param_2)

{
  long *plVar1;
  long lVar2;
  undefined8 uVar3;
  int iVar4;
  long lVar5;
  
  iVar4 = 1;
  if (param_1 != (long *)0x0) {
    if (*param_1 == 0) {
      iVar4 = 0;
    }
    else {
      lVar2 = 1;
      do {
        iVar4 = (int)lVar2;
        plVar1 = param_1 + lVar2;
        lVar2 = lVar2 + 1;
      } while (*plVar1 != 0);
    }
    iVar4 = iVar4 + 1;
  }
  lVar5 = (long)(iVar4 + 1) * 8;
  lVar2 = FUN_0014951a(param_1,lVar5);
  uVar3 = FUN_001496d9(param_2);
  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;
  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;
  return lVar2;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RSI
MOV EDX,0x1
TEST RDI,RDI
JZ 0x0013b7c7
CMP qword ptr [RDI],0x0
JZ 0x0013b804
MOV EAX,0x1
MOV EDX,EAX
ADD RAX,0x1
CMP qword ptr [RDI + RAX*0x8 + -0x8],0x0
JNZ 0x0013b7b6
ADD EDX,0x1
ADD EDX,0x1
MOVSXD RBX,EDX
SHL RBX,0x3
MOV RSI,RBX
CALL 0x0014951a
MOV R12,RAX
LEA R13,[RAX + RBX*0x1 + -0x10]
MOV RDI,RBP
CALL 0x001496d9
MOV qword ptr [R13],RAX
MOV qword ptr [R12 + RBX*0x1 + -0x8],0x0
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
MOV EDX,0x0
JMP 0x0013b7c4
(translation_unit "long FUN_0013b794(long *param_1,undefined8 param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}\n\n" (function_definition "long FUN_0013b794(long *param_1,undefined8 param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0013b794(long *param_1,undefined8 param_2)" identifier (parameter_list "(long *param_1,undefined8 param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (if_statement "if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }" if (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)) )) (compound_statement "{\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }" { (if_statement "if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" if (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n      iVar4 = 0;\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" else (compound_statement "{\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" { (expression_statement "lVar2 = 1;" (assignment_expression "lVar2 = 1" identifier = number_literal) ;) (do_statement "do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);" do (compound_statement "{\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      }" { (expression_statement "iVar4 = (int)lVar2;" (assignment_expression "iVar4 = (int)lVar2" identifier = (cast_expression "(int)lVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "plVar1 = param_1 + lVar2;" (assignment_expression "plVar1 = param_1 + lVar2" identifier = (binary_expression "param_1 + lVar2" identifier + identifier)) ;) (expression_statement "lVar2 = lVar2 + 1;" (assignment_expression "lVar2 = lVar2 + 1" identifier = (binary_expression "lVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(*plVar1 != 0)" ( (binary_expression "*plVar1 != 0" (pointer_expression "*plVar1" * identifier) != number_literal) )) ;) }))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) })) (expression_statement "lVar5 = (long)(iVar4 + 1) * 8;" (assignment_expression "lVar5 = (long)(iVar4 + 1) * 8" identifier = (binary_expression "(long)(iVar4 + 1) * 8" (cast_expression "(long)(iVar4 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar4 + 1)" ( (binary_expression "iVar4 + 1" identifier + number_literal) ))) * number_literal)) ;) (expression_statement "lVar2 = FUN_0014951a(param_1,lVar5);" (assignment_expression "lVar2 = FUN_0014951a(param_1,lVar5)" identifier = (call_expression "FUN_0014951a(param_1,lVar5)" identifier (argument_list "(param_1,lVar5)" ( identifier , identifier )))) ;) (expression_statement "uVar3 = FUN_001496d9(param_2);" (assignment_expression "uVar3 = FUN_001496d9(param_2)" identifier = (call_expression "FUN_001496d9(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;" (assignment_expression "*(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3" (pointer_expression "*(undefined8 *)(lVar2 + -0x10 + lVar5)" * (cast_expression "(undefined8 *)(lVar2 + -0x10 + lVar5)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -0x10 + lVar5)" ( (binary_expression "lVar2 + -0x10 + lVar5" (binary_expression "lVar2 + -0x10" identifier + number_literal) + identifier) )))) = identifier) ;) (expression_statement "*(undefined8 *)(lVar2 + -8 + lVar5) = 0;" (assignment_expression "*(undefined8 *)(lVar2 + -8 + lVar5) = 0" (pointer_expression "*(undefined8 *)(lVar2 + -8 + lVar5)" * (cast_expression "(undefined8 *)(lVar2 + -8 + lVar5)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -8 + lVar5)" ( (binary_expression "lVar2 + -8 + lVar5" (binary_expression "lVar2 + -8" identifier + number_literal) + identifier) )))) = number_literal) ;) (return_statement "return lVar2;" return identifier ;) })))
(translation_unit "char ** vec_append(char **vec,char *str)\n\n{\n  char **ppcVar1;\n  char *pcVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar3 = 1;\n  if (vec != (char **)0x0) {\n    if (*vec == (char *)0x0) {\n      iVar3 = 0;\n    }\n    else {\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }\n    iVar3 = iVar3 + 1;\n  }\n  lVar4 = (long)(iVar3 + 1);\n  ppcVar1 = (char **)xrealloc(vec,lVar4 * 8);\n  pcVar2 = xstrdup(str);\n  ppcVar1[lVar4 + -2] = pcVar2;\n  ppcVar1[lVar4 + -1] = (char *)0x0;\n  return ppcVar1;\n}\n\n" (function_definition "char ** vec_append(char **vec,char *str)\n\n{\n  char **ppcVar1;\n  char *pcVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar3 = 1;\n  if (vec != (char **)0x0) {\n    if (*vec == (char *)0x0) {\n      iVar3 = 0;\n    }\n    else {\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }\n    iVar3 = iVar3 + 1;\n  }\n  lVar4 = (long)(iVar3 + 1);\n  ppcVar1 = (char **)xrealloc(vec,lVar4 * 8);\n  pcVar2 = xstrdup(str);\n  ppcVar1[lVar4 + -2] = pcVar2;\n  ppcVar1[lVar4 + -1] = (char *)0x0;\n  return ppcVar1;\n}" primitive_type (pointer_declarator "** vec_append(char **vec,char *str)" * (pointer_declarator "* vec_append(char **vec,char *str)" * (function_declarator "vec_append(char **vec,char *str)" identifier (parameter_list "(char **vec,char *str)" ( (parameter_declaration "char **vec" primitive_type (pointer_declarator "**vec" * (pointer_declarator "*vec" * identifier))) , (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) ))))) (compound_statement "{\n  char **ppcVar1;\n  char *pcVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar3 = 1;\n  if (vec != (char **)0x0) {\n    if (*vec == (char *)0x0) {\n      iVar3 = 0;\n    }\n    else {\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }\n    iVar3 = iVar3 + 1;\n  }\n  lVar4 = (long)(iVar3 + 1);\n  ppcVar1 = (char **)xrealloc(vec,lVar4 * 8);\n  pcVar2 = xstrdup(str);\n  ppcVar1[lVar4 + -2] = pcVar2;\n  ppcVar1[lVar4 + -1] = (char *)0x0;\n  return ppcVar1;\n}" { (declaration "char **ppcVar1;" primitive_type (pointer_declarator "**ppcVar1" * (pointer_declarator "*ppcVar1" * identifier)) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) (if_statement "if (vec != (char **)0x0) {\n    if (*vec == (char *)0x0) {\n      iVar3 = 0;\n    }\n    else {\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }\n    iVar3 = iVar3 + 1;\n  }" if (parenthesized_expression "(vec != (char **)0x0)" ( (binary_expression "vec != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    if (*vec == (char *)0x0) {\n      iVar3 = 0;\n    }\n    else {\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }\n    iVar3 = iVar3 + 1;\n  }" { (if_statement "if (*vec == (char *)0x0) {\n      iVar3 = 0;\n    }\n    else {\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }" if (parenthesized_expression "(*vec == (char *)0x0)" ( (binary_expression "*vec == (char *)0x0" (pointer_expression "*vec" * identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = 0;\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }" else (compound_statement "{\n      lVar4 = 1;\n      do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);\n    }" { (expression_statement "lVar4 = 1;" (assignment_expression "lVar4 = 1" identifier = number_literal) ;) (do_statement "do {\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      } while (*ppcVar1 != (char *)0x0);" do (compound_statement "{\n        iVar3 = (int)lVar4;\n        ppcVar1 = vec + lVar4;\n        lVar4 = lVar4 + 1;\n      }" { (expression_statement "iVar3 = (int)lVar4;" (assignment_expression "iVar3 = (int)lVar4" identifier = (cast_expression "(int)lVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "ppcVar1 = vec + lVar4;" (assignment_expression "ppcVar1 = vec + lVar4" identifier = (binary_expression "vec + lVar4" identifier + identifier)) ;) (expression_statement "lVar4 = lVar4 + 1;" (assignment_expression "lVar4 = lVar4 + 1" identifier = (binary_expression "lVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(*ppcVar1 != (char *)0x0)" ( (binary_expression "*ppcVar1 != (char *)0x0" (pointer_expression "*ppcVar1" * identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "lVar4 = (long)(iVar3 + 1);" (assignment_expression "lVar4 = (long)(iVar3 + 1)" identifier = (cast_expression "(long)(iVar3 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar3 + 1)" ( (binary_expression "iVar3 + 1" identifier + number_literal) )))) ;) (expression_statement "ppcVar1 = (char **)xrealloc(vec,lVar4 * 8);" (assignment_expression "ppcVar1 = (char **)xrealloc(vec,lVar4 * 8)" identifier = (cast_expression "(char **)xrealloc(vec,lVar4 * 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "xrealloc(vec,lVar4 * 8)" identifier (argument_list "(vec,lVar4 * 8)" ( identifier , (binary_expression "lVar4 * 8" identifier * number_literal) ))))) ;) (expression_statement "pcVar2 = xstrdup(str);" (assignment_expression "pcVar2 = xstrdup(str)" identifier = (call_expression "xstrdup(str)" identifier (argument_list "(str)" ( identifier )))) ;) (expression_statement "ppcVar1[lVar4 + -2] = pcVar2;" (assignment_expression "ppcVar1[lVar4 + -2] = pcVar2" (subscript_expression "ppcVar1[lVar4 + -2]" identifier [ (binary_expression "lVar4 + -2" identifier + number_literal) ]) = identifier) ;) (expression_statement "ppcVar1[lVar4 + -1] = (char *)0x0;" (assignment_expression "ppcVar1[lVar4 + -1] = (char *)0x0" (subscript_expression "ppcVar1[lVar4 + -1]" identifier [ (binary_expression "lVar4 + -1" identifier + number_literal) ]) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return ppcVar1;" return identifier ;) })))
(translation_unit "long FUN_0013b794(long *param_1,undefined8 param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}\n\n" (function_definition "long FUN_0013b794(long *param_1,undefined8 param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0013b794(long *param_1,undefined8 param_2)" identifier (parameter_list "(long *param_1,undefined8 param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (if_statement "if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }" if (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)) )) (compound_statement "{\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }" { (if_statement "if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" if (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n      iVar4 = 0;\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" else (compound_statement "{\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" { (expression_statement "lVar2 = 1;" (assignment_expression "lVar2 = 1" identifier = number_literal) ;) (do_statement "do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);" do (compound_statement "{\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      }" { (expression_statement "iVar4 = (int)lVar2;" (assignment_expression "iVar4 = (int)lVar2" identifier = (cast_expression "(int)lVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "plVar1 = param_1 + lVar2;" (assignment_expression "plVar1 = param_1 + lVar2" identifier = (binary_expression "param_1 + lVar2" identifier + identifier)) ;) (expression_statement "lVar2 = lVar2 + 1;" (assignment_expression "lVar2 = lVar2 + 1" identifier = (binary_expression "lVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(*plVar1 != 0)" ( (binary_expression "*plVar1 != 0" (pointer_expression "*plVar1" * identifier) != number_literal) )) ;) }))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) })) (expression_statement "lVar5 = (long)(iVar4 + 1) * 8;" (assignment_expression "lVar5 = (long)(iVar4 + 1) * 8" identifier = (binary_expression "(long)(iVar4 + 1) * 8" (cast_expression "(long)(iVar4 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar4 + 1)" ( (binary_expression "iVar4 + 1" identifier + number_literal) ))) * number_literal)) ;) (expression_statement "lVar2 = FUN_0014951a(param_1,lVar5);" (assignment_expression "lVar2 = FUN_0014951a(param_1,lVar5)" identifier = (call_expression "FUN_0014951a(param_1,lVar5)" identifier (argument_list "(param_1,lVar5)" ( identifier , identifier )))) ;) (expression_statement "uVar3 = FUN_001496d9(param_2);" (assignment_expression "uVar3 = FUN_001496d9(param_2)" identifier = (call_expression "FUN_001496d9(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;" (assignment_expression "*(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3" (pointer_expression "*(undefined8 *)(lVar2 + -0x10 + lVar5)" * (cast_expression "(undefined8 *)(lVar2 + -0x10 + lVar5)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -0x10 + lVar5)" ( (binary_expression "lVar2 + -0x10 + lVar5" (binary_expression "lVar2 + -0x10" identifier + number_literal) + identifier) )))) = identifier) ;) (expression_statement "*(undefined8 *)(lVar2 + -8 + lVar5) = 0;" (assignment_expression "*(undefined8 *)(lVar2 + -8 + lVar5) = 0" (pointer_expression "*(undefined8 *)(lVar2 + -8 + lVar5)" * (cast_expression "(undefined8 *)(lVar2 + -8 + lVar5)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -8 + lVar5)" ( (binary_expression "lVar2 + -8 + lVar5" (binary_expression "lVar2 + -8" identifier + number_literal) + identifier) )))) = number_literal) ;) (return_statement "return lVar2;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (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) )) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) * LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "long FUN_0013b794(long *param_1,undefined8 param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "FUN_0013b794(long *param_1,undefined8 param_2)" (identifier "FUN_0013b794") (parameter_list "(long *param_1,undefined8 param_2)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) () ")"))) (compound_statement "{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 1;\n  if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }\n  lVar5 = (long)(iVar4 + 1) * 8;\n  lVar2 = FUN_0014951a(param_1,lVar5);\n  uVar3 = FUN_001496d9(param_2);\n  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;\n  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;\n  return lVar2;\n}" ({ "{") (declaration "long *plVar1;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar1" (* "*") (identifier "plVar1")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";")) (if_statement "if (param_1 != (long *)0x0) {\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }" (if "if") (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"))) () ")")) (compound_statement "{\n    if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }\n    iVar4 = iVar4 + 1;\n  }" ({ "{") (if_statement "if (*param_1 == 0) {\n      iVar4 = 0;\n    }\n    else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" (if "if") (parenthesized_expression "(*param_1 == 0)" (( "(") (binary_expression "*param_1 == 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = 0;\n    }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" (else "else") (compound_statement "{\n      lVar2 = 1;\n      do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);\n    }" ({ "{") (expression_statement "lVar2 = 1;" (assignment_expression "lVar2 = 1" (identifier "lVar2") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      } while (*plVar1 != 0);" (do "do") (compound_statement "{\n        iVar4 = (int)lVar2;\n        plVar1 = param_1 + lVar2;\n        lVar2 = lVar2 + 1;\n      }" ({ "{") (expression_statement "iVar4 = (int)lVar2;" (assignment_expression "iVar4 = (int)lVar2" (identifier "iVar4") (= "=") (cast_expression "(int)lVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar2"))) (; ";")) (expression_statement "plVar1 = param_1 + lVar2;" (assignment_expression "plVar1 = param_1 + lVar2" (identifier "plVar1") (= "=") (binary_expression "param_1 + lVar2" (identifier "param_1") (+ "+") (identifier "lVar2"))) (; ";")) (expression_statement "lVar2 = lVar2 + 1;" (assignment_expression "lVar2 = lVar2 + 1" (identifier "lVar2") (= "=") (binary_expression "lVar2 + 1" (identifier "lVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*plVar1 != 0)" (( "(") (binary_expression "*plVar1 != 0" (pointer_expression "*plVar1" (* "*") (identifier "plVar1")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}")))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "lVar5 = (long)(iVar4 + 1) * 8;" (assignment_expression "lVar5 = (long)(iVar4 + 1) * 8" (identifier "lVar5") (= "=") (binary_expression "(long)(iVar4 + 1) * 8" (cast_expression "(long)(iVar4 + 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(iVar4 + 1)" (( "(") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1")) () ")"))) (* "*") (number_literal "8"))) (; ";")) (expression_statement "lVar2 = FUN_0014951a(param_1,lVar5);" (assignment_expression "lVar2 = FUN_0014951a(param_1,lVar5)" (identifier "lVar2") (= "=") (call_expression "FUN_0014951a(param_1,lVar5)" (identifier "FUN_0014951a") (argument_list "(param_1,lVar5)" (( "(") (identifier "param_1") (, ",") (identifier "lVar5") () ")")))) (; ";")) (expression_statement "uVar3 = FUN_001496d9(param_2);" (assignment_expression "uVar3 = FUN_001496d9(param_2)" (identifier "uVar3") (= "=") (call_expression "FUN_001496d9(param_2)" (identifier "FUN_001496d9") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "*(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;" (assignment_expression "*(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3" (pointer_expression "*(undefined8 *)(lVar2 + -0x10 + lVar5)" (* "*") (cast_expression "(undefined8 *)(lVar2 + -0x10 + lVar5)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + -0x10 + lVar5)" (( "(") (binary_expression "lVar2 + -0x10 + lVar5" (binary_expression "lVar2 + -0x10" (identifier "lVar2") (+ "+") (number_literal "-0x10")) (+ "+") (identifier "lVar5")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "*(undefined8 *)(lVar2 + -8 + lVar5) = 0;" (assignment_expression "*(undefined8 *)(lVar2 + -8 + lVar5) = 0" (pointer_expression "*(undefined8 *)(lVar2 + -8 + lVar5)" (* "*") (cast_expression "(undefined8 *)(lVar2 + -8 + lVar5)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + -8 + lVar5)" (( "(") (binary_expression "lVar2 + -8 + lVar5" (binary_expression "lVar2 + -8" (identifier "lVar2") (+ "+") (number_literal "-8")) (+ "+") (identifier "lVar5")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return lVar2;" (return "return") (identifier "lVar2") (; ";")) (} "}")))

char ** function_1(char **var_1,char *str)

{
  char **ppcVar1;
  char *pcVar2;
  int var_3;
  long var_2;
  
  var_3 = 1;
  if (var_1 != (char **)0x0) {
    if (*var_1 == (char *)0x0) {
      var_3 = 0;
    }
    else {
      var_2 = 1;
      do {
        var_3 = (int)var_2;
        ppcVar1 = var_1 + var_2;
        var_2 = var_2 + 1;
      } while (*ppcVar1 != (char *)0x0);
    }
    var_3 = var_3 + 1;
  }
  var_2 = (long)(var_3 + 1);
  ppcVar1 = (char **)var_4(var_1,var_2 * 8);
  pcVar2 = var_5(str);
  ppcVar1[var_2 + -2] = pcVar2;
  ppcVar1[var_2 + -1] = (char *)0x0;
  return ppcVar1;
}


(translation_unit (function_definition type: (sized_type_specifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (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))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (number_literal))) (return_statement (identifier)))))

long MASKED(long *param_1,undefined8 param_2)

{
  long *plVar1;
  long lVar2;
  undefined8 uVar3;
  int iVar4;
  long lVar5;
  
  iVar4 = 1;
  if (param_1 != (long *)0x0) {
    if (*param_1 == 0) {
      iVar4 = 0;
    }
    else {
      lVar2 = 1;
      do {
        iVar4 = (int)lVar2;
        plVar1 = param_1 + lVar2;
        lVar2 = lVar2 + 1;
      } while (*plVar1 != 0);
    }
    iVar4 = iVar4 + 1;
  }
  lVar5 = (long)(iVar4 + 1) * 8;
  lVar2 = FUN_0014951a(param_1,lVar5);
  uVar3 = FUN_001496d9(param_2);
  *(undefined8 *)(lVar2 + -0x10 + lVar5) = uVar3;
  *(undefined8 *)(lVar2 + -8 + lVar5) = 0;
  return lVar2;
}

