
void bufchain_clear(bufchain *ch)

{
  bufchain_granule *ptr;
  
  ptr = ch->head;
  while (ptr != (bufchain_granule *)0x0) {
    ch->head = ptr->next;
    safefree(ptr);
    ptr = ch->head;
  }
  ch->tail = (bufchain_granule *)0x0;
  ch->buffersize = 0;
  return;
}



void FUN_0010dc2c(undefined8 *param_1)

{
  undefined8 *puVar1;
  
  puVar1 = (undefined8 *)*param_1;
  while (puVar1 != (undefined8 *)0x0) {
    *param_1 = *puVar1;
    FUN_0010db2f();
    puVar1 = (undefined8 *)*param_1;
  }
  param_1[1] = 0;
  *(undefined4 *)(param_1 + 2) = 0;
  return;
}


PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0010dc4b
MOV RAX,qword ptr [RDI]
MOV qword ptr [RBX],RAX
CALL 0x0010db2f
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JNZ 0x0010dc38
MOV qword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0x10],0x0
POP RBX
RET
(translation_unit "void FUN_0010dc2c(undefined8 *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}\n\n" (function_definition "void FUN_0010dc2c(undefined8 *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0010dc2c(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (expression_statement "puVar1 = (undefined8 *)*param_1;" (assignment_expression "puVar1 = (undefined8 *)*param_1" identifier = (cast_expression "(undefined8 *)*param_1" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }" while (parenthesized_expression "(puVar1 != (undefined8 *)0x0)" ( (binary_expression "puVar1 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }" { (expression_statement "*param_1 = *puVar1;" (assignment_expression "*param_1 = *puVar1" (pointer_expression "*param_1" * identifier) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "FUN_0010db2f();" (call_expression "FUN_0010db2f()" identifier (argument_list "()" ( ))) ;) (expression_statement "puVar1 = (undefined8 *)*param_1;" (assignment_expression "puVar1 = (undefined8 *)*param_1" identifier = (cast_expression "(undefined8 *)*param_1" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 2) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 2) = 0" (pointer_expression "*(undefined4 *)(param_1 + 2)" * (cast_expression "(undefined4 *)(param_1 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void bufchain_clear(bufchain *ch)\n\n{\n  bufchain_granule *ptr;\n  \n  ptr = ch->head;\n  while (ptr != (bufchain_granule *)0x0) {\n    ch->head = ptr->next;\n    safefree(ptr);\n    ptr = ch->head;\n  }\n  ch->tail = (bufchain_granule *)0x0;\n  ch->buffersize = 0;\n  return;\n}\n\n" (function_definition "void bufchain_clear(bufchain *ch)\n\n{\n  bufchain_granule *ptr;\n  \n  ptr = ch->head;\n  while (ptr != (bufchain_granule *)0x0) {\n    ch->head = ptr->next;\n    safefree(ptr);\n    ptr = ch->head;\n  }\n  ch->tail = (bufchain_granule *)0x0;\n  ch->buffersize = 0;\n  return;\n}" primitive_type (function_declarator "bufchain_clear(bufchain *ch)" identifier (parameter_list "(bufchain *ch)" ( (parameter_declaration "bufchain *ch" type_identifier (pointer_declarator "*ch" * identifier)) ))) (compound_statement "{\n  bufchain_granule *ptr;\n  \n  ptr = ch->head;\n  while (ptr != (bufchain_granule *)0x0) {\n    ch->head = ptr->next;\n    safefree(ptr);\n    ptr = ch->head;\n  }\n  ch->tail = (bufchain_granule *)0x0;\n  ch->buffersize = 0;\n  return;\n}" { (declaration "bufchain_granule *ptr;" type_identifier (pointer_declarator "*ptr" * identifier) ;) (expression_statement "ptr = ch->head;" (assignment_expression "ptr = ch->head" identifier = (field_expression "ch->head" identifier -> field_identifier)) ;) (while_statement "while (ptr != (bufchain_granule *)0x0) {\n    ch->head = ptr->next;\n    safefree(ptr);\n    ptr = ch->head;\n  }" while (parenthesized_expression "(ptr != (bufchain_granule *)0x0)" ( (binary_expression "ptr != (bufchain_granule *)0x0" identifier != (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ch->head = ptr->next;\n    safefree(ptr);\n    ptr = ch->head;\n  }" { (expression_statement "ch->head = ptr->next;" (assignment_expression "ch->head = ptr->next" (field_expression "ch->head" identifier -> field_identifier) = (field_expression "ptr->next" identifier -> field_identifier)) ;) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (expression_statement "ptr = ch->head;" (assignment_expression "ptr = ch->head" identifier = (field_expression "ch->head" identifier -> field_identifier)) ;) })) (expression_statement "ch->tail = (bufchain_granule *)0x0;" (assignment_expression "ch->tail = (bufchain_granule *)0x0" (field_expression "ch->tail" identifier -> field_identifier) = (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ch->buffersize = 0;" (assignment_expression "ch->buffersize = 0" (field_expression "ch->buffersize" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0010dc2c(undefined8 *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}\n\n" (function_definition "void FUN_0010dc2c(undefined8 *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0010dc2c(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (expression_statement "puVar1 = (undefined8 *)*param_1;" (assignment_expression "puVar1 = (undefined8 *)*param_1" identifier = (cast_expression "(undefined8 *)*param_1" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }" while (parenthesized_expression "(puVar1 != (undefined8 *)0x0)" ( (binary_expression "puVar1 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }" { (expression_statement "*param_1 = *puVar1;" (assignment_expression "*param_1 = *puVar1" (pointer_expression "*param_1" * identifier) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "FUN_0010db2f();" (call_expression "FUN_0010db2f()" identifier (argument_list "()" ( ))) ;) (expression_statement "puVar1 = (undefined8 *)*param_1;" (assignment_expression "puVar1 = (undefined8 *)*param_1" identifier = (cast_expression "(undefined8 *)*param_1" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 2) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 2) = 0" (pointer_expression "*(undefined4 *)(param_1 + 2)" * (cast_expression "(undefined4 *)(param_1 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = 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 (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0010dc2c(undefined8 *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0010dc2c(undefined8 *param_1)" (identifier "FUN_0010dc2c") (parameter_list "(undefined8 *param_1)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)*param_1;\n  while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }\n  param_1[1] = 0;\n  *(undefined4 *)(param_1 + 2) = 0;\n  return;\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (expression_statement "puVar1 = (undefined8 *)*param_1;" (assignment_expression "puVar1 = (undefined8 *)*param_1" (identifier "puVar1") (= "=") (cast_expression "(undefined8 *)*param_1" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (while_statement "while (puVar1 != (undefined8 *)0x0) {\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }" (while "while") (parenthesized_expression "(puVar1 != (undefined8 *)0x0)" (( "(") (binary_expression "puVar1 != (undefined8 *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *param_1 = *puVar1;\n    FUN_0010db2f();\n    puVar1 = (undefined8 *)*param_1;\n  }" ({ "{") (expression_statement "*param_1 = *puVar1;" (assignment_expression "*param_1 = *puVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (expression_statement "FUN_0010db2f();" (call_expression "FUN_0010db2f()" (identifier "FUN_0010db2f") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar1 = (undefined8 *)*param_1;" (assignment_expression "puVar1 = (undefined8 *)*param_1" (identifier "puVar1") (= "=") (cast_expression "(undefined8 *)*param_1" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 2) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 2) = 0" (pointer_expression "*(undefined4 *)(param_1 + 2)" (* "*") (cast_expression "(undefined4 *)(param_1 + 2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *ch)

{
  type_2 *var_1;
  
  var_1 = ch->head;
  while (var_1 != (type_2 *)0x0) {
    ch->head = var_1->next;
    var_2(var_1);
    var_1 = ch->head;
  }
  ch->tail = (type_2 *)0x0;
  ch->buffersize = 0;
  return;
}


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

void MASKED(undefined8 *param_1)

{
  undefined8 *puVar1;
  
  puVar1 = (undefined8 *)*param_1;
  while (puVar1 != (undefined8 *)0x0) {
    *param_1 = *puVar1;
    FUN_0010db2f();
    puVar1 = (undefined8 *)*param_1;
  }
  param_1[1] = 0;
  *(undefined4 *)(param_1 + 2) = 0;
  return;
}

