
/* WARNING: Unknown calling convention */

size_t _obstack_memory_used(obstack *h)

{
  _obstack_chunk **pp_Var1;
  char *pcVar2;
  _obstack_chunk *p_Var3;
  
  p_Var3 = h->chunk;
  pcVar2 = (char *)0x0;
  if (p_Var3 == (_obstack_chunk *)0x0) {
    return 0;
  }
  do {
    pp_Var1 = &p_Var3->prev;
    pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3);
    p_Var3 = *pp_Var1;
  } while (*pp_Var1 != (_obstack_chunk *)0x0);
  return (size_t)pcVar2;
}



long _obstack_memory_used(long param_1)

{
  long lVar1;
  long lVar2;
  long *plVar3;
  
  plVar3 = *(long **)(param_1 + 8);
  lVar1 = 0;
  if (plVar3 == (long *)0x0) {
    return 0;
  }
  do {
    lVar2 = *plVar3 - (long)plVar3;
    plVar3 = (long *)plVar3[1];
    lVar1 = lVar1 + lVar2;
  } while (plVar3 != (long *)0x0);
  return lVar1;
}


MOV RDX,qword ptr [RDI + 0x8]
XOR EAX,EAX
TEST RDX,RDX
JZ 0x0015c938
NOP dword ptr [RAX + RAX*0x1]
MOV RCX,qword ptr [RDX]
SUB RCX,RDX
MOV RDX,qword ptr [RDX + 0x8]
ADD RAX,RCX
TEST RDX,RDX
JNZ 0x0015c920
RET
RET
(translation_unit "long _obstack_memory_used(long param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}\n\n" (function_definition "long _obstack_memory_used(long param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}" (sized_type_specifier "long" long) (function_declarator "_obstack_memory_used(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "long *plVar3;" (sized_type_specifier "long" long) (pointer_declarator "*plVar3" * identifier) ;) (expression_statement "plVar3 = *(long **)(param_1 + 8);" (assignment_expression "plVar3 = *(long **)(param_1 + 8)" identifier = (pointer_expression "*(long **)(param_1 + 8)" * (cast_expression "(long **)(param_1 + 8)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "lVar1 = 0;" (assignment_expression "lVar1 = 0" identifier = number_literal) ;) (if_statement "if (plVar3 == (long *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(plVar3 == (long *)0x0)" ( (binary_expression "plVar3 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);" do (compound_statement "{\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  }" { (expression_statement "lVar2 = *plVar3 - (long)plVar3;" (assignment_expression "lVar2 = *plVar3 - (long)plVar3" identifier = (binary_expression "*plVar3 - (long)plVar3" (pointer_expression "*plVar3" * identifier) - (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "plVar3 = (long *)plVar3[1];" (assignment_expression "plVar3 = (long *)plVar3[1]" identifier = (cast_expression "(long *)plVar3[1]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "plVar3[1]" identifier [ number_literal ]))) ;) (expression_statement "lVar1 = lVar1 + lVar2;" (assignment_expression "lVar1 = lVar1 + lVar2" identifier = (binary_expression "lVar1 + lVar2" identifier + identifier)) ;) }) while (parenthesized_expression "(plVar3 != (long *)0x0)" ( (binary_expression "plVar3 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return lVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nsize_t _obstack_memory_used(obstack *h)\n\n{\n  _obstack_chunk **pp_Var1;\n  char *pcVar2;\n  _obstack_chunk *p_Var3;\n  \n  p_Var3 = h->chunk;\n  pcVar2 = (char *)0x0;\n  if (p_Var3 == (_obstack_chunk *)0x0) {\n    return 0;\n  }\n  do {\n    pp_Var1 = &p_Var3->prev;\n    pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3);\n    p_Var3 = *pp_Var1;\n  } while (*pp_Var1 != (_obstack_chunk *)0x0);\n  return (size_t)pcVar2;\n}\n\n" comment (function_definition "size_t _obstack_memory_used(obstack *h)\n\n{\n  _obstack_chunk **pp_Var1;\n  char *pcVar2;\n  _obstack_chunk *p_Var3;\n  \n  p_Var3 = h->chunk;\n  pcVar2 = (char *)0x0;\n  if (p_Var3 == (_obstack_chunk *)0x0) {\n    return 0;\n  }\n  do {\n    pp_Var1 = &p_Var3->prev;\n    pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3);\n    p_Var3 = *pp_Var1;\n  } while (*pp_Var1 != (_obstack_chunk *)0x0);\n  return (size_t)pcVar2;\n}" primitive_type (function_declarator "_obstack_memory_used(obstack *h)" identifier (parameter_list "(obstack *h)" ( (parameter_declaration "obstack *h" type_identifier (pointer_declarator "*h" * identifier)) ))) (compound_statement "{\n  _obstack_chunk **pp_Var1;\n  char *pcVar2;\n  _obstack_chunk *p_Var3;\n  \n  p_Var3 = h->chunk;\n  pcVar2 = (char *)0x0;\n  if (p_Var3 == (_obstack_chunk *)0x0) {\n    return 0;\n  }\n  do {\n    pp_Var1 = &p_Var3->prev;\n    pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3);\n    p_Var3 = *pp_Var1;\n  } while (*pp_Var1 != (_obstack_chunk *)0x0);\n  return (size_t)pcVar2;\n}" { (declaration "_obstack_chunk **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "_obstack_chunk *p_Var3;" type_identifier (pointer_declarator "*p_Var3" * identifier) ;) (expression_statement "p_Var3 = h->chunk;" (assignment_expression "p_Var3 = h->chunk" identifier = (field_expression "h->chunk" identifier -> field_identifier)) ;) (expression_statement "pcVar2 = (char *)0x0;" (assignment_expression "pcVar2 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (p_Var3 == (_obstack_chunk *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(p_Var3 == (_obstack_chunk *)0x0)" ( (binary_expression "p_Var3 == (_obstack_chunk *)0x0" identifier == (cast_expression "(_obstack_chunk *)0x0" ( (type_descriptor "_obstack_chunk *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    pp_Var1 = &p_Var3->prev;\n    pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3);\n    p_Var3 = *pp_Var1;\n  } while (*pp_Var1 != (_obstack_chunk *)0x0);" do (compound_statement "{\n    pp_Var1 = &p_Var3->prev;\n    pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3);\n    p_Var3 = *pp_Var1;\n  }" { (expression_statement "pp_Var1 = &p_Var3->prev;" (assignment_expression "pp_Var1 = &p_Var3->prev" identifier = (pointer_expression "&p_Var3->prev" & (field_expression "p_Var3->prev" identifier -> field_identifier))) ;) (expression_statement "pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3);" (assignment_expression "pcVar2 = p_Var3->limit + ((long)pcVar2 - (long)p_Var3)" identifier = (binary_expression "p_Var3->limit + ((long)pcVar2 - (long)p_Var3)" (field_expression "p_Var3->limit" identifier -> field_identifier) + (parenthesized_expression "((long)pcVar2 - (long)p_Var3)" ( (binary_expression "(long)pcVar2 - (long)p_Var3" (cast_expression "(long)pcVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)p_Var3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "p_Var3 = *pp_Var1;" (assignment_expression "p_Var3 = *pp_Var1" identifier = (pointer_expression "*pp_Var1" * identifier)) ;) }) while (parenthesized_expression "(*pp_Var1 != (_obstack_chunk *)0x0)" ( (binary_expression "*pp_Var1 != (_obstack_chunk *)0x0" (pointer_expression "*pp_Var1" * identifier) != (cast_expression "(_obstack_chunk *)0x0" ( (type_descriptor "_obstack_chunk *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return (size_t)pcVar2;" return (cast_expression "(size_t)pcVar2" ( (type_descriptor "size_t" primitive_type) ) identifier) ;) })))
(translation_unit "long _obstack_memory_used(long param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}\n\n" (function_definition "long _obstack_memory_used(long param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}" (sized_type_specifier "long" long) (function_declarator "_obstack_memory_used(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "long *plVar3;" (sized_type_specifier "long" long) (pointer_declarator "*plVar3" * identifier) ;) (expression_statement "plVar3 = *(long **)(param_1 + 8);" (assignment_expression "plVar3 = *(long **)(param_1 + 8)" identifier = (pointer_expression "*(long **)(param_1 + 8)" * (cast_expression "(long **)(param_1 + 8)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "lVar1 = 0;" (assignment_expression "lVar1 = 0" identifier = number_literal) ;) (if_statement "if (plVar3 == (long *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(plVar3 == (long *)0x0)" ( (binary_expression "plVar3 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);" do (compound_statement "{\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  }" { (expression_statement "lVar2 = *plVar3 - (long)plVar3;" (assignment_expression "lVar2 = *plVar3 - (long)plVar3" identifier = (binary_expression "*plVar3 - (long)plVar3" (pointer_expression "*plVar3" * identifier) - (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "plVar3 = (long *)plVar3[1];" (assignment_expression "plVar3 = (long *)plVar3[1]" identifier = (cast_expression "(long *)plVar3[1]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "plVar3[1]" identifier [ number_literal ]))) ;) (expression_statement "lVar1 = lVar1 + lVar2;" (assignment_expression "lVar1 = lVar1 + lVar2" identifier = (binary_expression "lVar1 + lVar2" identifier + identifier)) ;) }) while (parenthesized_expression "(plVar3 != (long *)0x0)" ( (binary_expression "plVar3 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return lVar1;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (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 { (return_statement return LIT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) ;) (return_statement return IDENT ;) })))
(function_definition "long _obstack_memory_used(long param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "_obstack_memory_used(long param_1)" (identifier "_obstack_memory_used") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  long *plVar3;\n  \n  plVar3 = *(long **)(param_1 + 8);\n  lVar1 = 0;\n  if (plVar3 == (long *)0x0) {\n    return 0;\n  }\n  do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);\n  return lVar1;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "long *plVar3;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar3" (* "*") (identifier "plVar3")) (; ";")) (expression_statement "plVar3 = *(long **)(param_1 + 8);" (assignment_expression "plVar3 = *(long **)(param_1 + 8)" (identifier "plVar3") (= "=") (pointer_expression "*(long **)(param_1 + 8)" (* "*") (cast_expression "(long **)(param_1 + 8)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "lVar1 = 0;" (assignment_expression "lVar1 = 0" (identifier "lVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (plVar3 == (long *)0x0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(plVar3 == (long *)0x0)" (( "(") (binary_expression "plVar3 == (long *)0x0" (identifier "plVar3") (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (do_statement "do {\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  } while (plVar3 != (long *)0x0);" (do "do") (compound_statement "{\n    lVar2 = *plVar3 - (long)plVar3;\n    plVar3 = (long *)plVar3[1];\n    lVar1 = lVar1 + lVar2;\n  }" ({ "{") (expression_statement "lVar2 = *plVar3 - (long)plVar3;" (assignment_expression "lVar2 = *plVar3 - (long)plVar3" (identifier "lVar2") (= "=") (binary_expression "*plVar3 - (long)plVar3" (pointer_expression "*plVar3" (* "*") (identifier "plVar3")) (- "-") (cast_expression "(long)plVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "plVar3")))) (; ";")) (expression_statement "plVar3 = (long *)plVar3[1];" (assignment_expression "plVar3 = (long *)plVar3[1]" (identifier "plVar3") (= "=") (cast_expression "(long *)plVar3[1]" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "plVar3[1]" (identifier "plVar3") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "lVar1 = lVar1 + lVar2;" (assignment_expression "lVar1 = lVar1 + lVar2" (identifier "lVar1") (= "=") (binary_expression "lVar1 + lVar2" (identifier "lVar1") (+ "+") (identifier "lVar2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(plVar3 != (long *)0x0)" (( "(") (binary_expression "plVar3 != (long *)0x0" (identifier "plVar3") (!= "!=") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (return_statement "return lVar1;" (return "return") (identifier "lVar1") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

size_t function_1(type_1 *h)

{
  type_2 **pp_Var1;
  char *pcVar2;
  type_2 *var_1;
  
  var_1 = h->chunk;
  pcVar2 = (char *)0x0;
  if (var_1 == (type_2 *)0x0) {
    return 0;
  }
  do {
    pp_Var1 = &var_1->prev;
    pcVar2 = var_1->limit + ((long)pcVar2 - (long)var_1);
    var_1 = *pp_Var1;
  } while (*pp_Var1 != (type_2 *)0x0);
  return (size_t)pcVar2;
}


(translation_unit (function_definition type: (sized_type_specifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (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 (return_statement (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (return_statement (identifier)))))

long MASKED(long param_1)

{
  long lVar1;
  long lVar2;
  long *plVar3;
  
  plVar3 = *(long **)(param_1 + 8);
  lVar1 = 0;
  if (plVar3 == (long *)0x0) {
    return 0;
  }
  do {
    lVar2 = *plVar3 - (long)plVar3;
    plVar3 = (long *)plVar3[1];
    lVar1 = lVar1 + lVar2;
  } while (plVar3 != (long *)0x0);
  return lVar1;
}

