
size_t hash_get_entries(Hash_table *table,void **buffer,size_t buffer_size)

{
  hash_entry *phVar1;
  size_t sVar2;
  void **ppvVar3;
  hash_entry *phVar4;
  
  phVar4 = table->bucket;
  phVar1 = table->bucket_limit;
  sVar2 = 0;
  if (phVar1 <= phVar4) {
    return 0;
  }
  do {
    if (phVar4->data != (void *)0x0) {
      if (buffer_size <= sVar2) {
        return sVar2;
      }
      ppvVar3 = buffer + sVar2;
      *ppvVar3 = phVar4->data;
      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;
          phVar1 = phVar1->next) {
        ppvVar3 = ppvVar3 + 1;
        if (buffer_size == sVar2) {
          return buffer_size;
        }
        *ppvVar3 = phVar1->data;
      }
      phVar1 = table->bucket_limit;
    }
    phVar4 = phVar4 + 1;
  } while (phVar4 < phVar1);
  return sVar2;
}



uint hash_get_entries(undefined4 *param_1,int param_2,uint param_3)

{
  int *piVar1;
  int *piVar2;
  uint uVar3;
  int *piVar4;
  
  piVar4 = (int *)*param_1;
  piVar2 = (int *)param_1[1];
  uVar3 = 0;
  if (piVar2 <= piVar4) {
    return 0;
  }
  do {
    if (*piVar4 != 0) {
      if (param_3 <= uVar3) {
        return uVar3;
      }
      piVar2 = (int *)(param_2 + uVar3 * 4);
      *piVar2 = *piVar4;
      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;
          piVar1 = (int *)piVar1[1]) {
        piVar2 = piVar2 + 1;
        if (param_3 == uVar3) {
          return param_3;
        }
        *piVar2 = *piVar1;
      }
      piVar2 = (int *)param_1[1];
    }
    piVar4 = piVar4 + 2;
  } while (piVar4 < piVar2);
  return uVar3;
}


lw t2,0x0(a0)
or v0,a2,zero
lw a2,0x4(a0)
sltu v1,t2,a2
beq v1,zero,0x00065cc0
_or a3,zero,zero
lw v1,0x0(t2)
bne v1,zero,0x00065c6c
_nop
addiu t2,t2,0x8
sltu v1,t2,a2
bne v1,zero,0x00065c48
_nop
jr ra
_or v0,a3,zero
sltu a2,a3,v0
beq a2,zero,0x00065cb8
_sll t0,a3,0x2
addu t0,a1,t0
sw v1,0x0(t0)
lw v1,0x4(t2)
beq v1,zero,0x00065ca8
_addiu a3,a3,0x1
beq v0,a3,0x00065cb0
_addiu t0,t0,0x4
lw t1,0x0(v1)
sw t1,0x0(t0)
lw v1,0x4(v1)
bne v1,zero,0x00065c8c
_addiu a3,a3,0x1
b 0x00065c54
_lw a2,0x4(a0)
jr ra
_nop
jr ra
_or v0,a3,zero
jr ra
_or v0,zero,zero
(translation_unit "uint hash_get_entries(undefined4 *param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}\n\n" (function_definition "uint hash_get_entries(undefined4 *param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}" type_identifier (function_declarator "hash_get_entries(undefined4 *param_1,int param_2,uint param_3)" identifier (parameter_list "(undefined4 *param_1,int param_2,uint param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (expression_statement "piVar4 = (int *)*param_1;" (assignment_expression "piVar4 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "piVar2 = (int *)param_1[1];" (assignment_expression "piVar2 = (int *)param_1[1]" identifier = (cast_expression "(int *)param_1[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if (piVar2 <= piVar4) {\n    return 0;\n  }" if (parenthesized_expression "(piVar2 <= piVar4)" ( (binary_expression "piVar2 <= piVar4" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);" do (compound_statement "{\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  }" { (if_statement "if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }" if (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) (compound_statement "{\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }" { (if_statement "if (param_3 <= uVar3) {\n        return uVar3;\n      }" if (parenthesized_expression "(param_3 <= uVar3)" ( (binary_expression "param_3 <= uVar3" identifier <= identifier) )) (compound_statement "{\n        return uVar3;\n      }" { (return_statement "return uVar3;" return identifier ;) })) (expression_statement "piVar2 = (int *)(param_2 + uVar3 * 4);" (assignment_expression "piVar2 = (int *)(param_2 + uVar3 * 4)" identifier = (cast_expression "(int *)(param_2 + uVar3 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar3 * 4)" ( (binary_expression "param_2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) )))) ;) (expression_statement "*piVar2 = *piVar4;" (assignment_expression "*piVar2 = *piVar4" (pointer_expression "*piVar2" * identifier) = (pointer_expression "*piVar4" * identifier)) ;) (for_statement "for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }" for ( (assignment_expression "piVar1 = (int *)piVar4[1]" identifier = (cast_expression "(int *)piVar4[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[1]" identifier [ number_literal ]))) ; (comma_expression "uVar3 = uVar3 + 1, piVar1 != (int *)0x0" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) , (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ; (assignment_expression "piVar1 = (int *)piVar1[1]" identifier = (cast_expression "(int *)piVar1[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar1[1]" identifier [ number_literal ]))) ) (compound_statement "{\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (if_statement "if (param_3 == uVar3) {\n          return param_3;\n        }" if (parenthesized_expression "(param_3 == uVar3)" ( (binary_expression "param_3 == uVar3" identifier == identifier) )) (compound_statement "{\n          return param_3;\n        }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "*piVar2 = *piVar1;" (assignment_expression "*piVar2 = *piVar1" (pointer_expression "*piVar2" * identifier) = (pointer_expression "*piVar1" * identifier)) ;) })) (expression_statement "piVar2 = (int *)param_1[1];" (assignment_expression "piVar2 = (int *)param_1[1]" identifier = (cast_expression "(int *)param_1[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) })) (expression_statement "piVar4 = piVar4 + 2;" (assignment_expression "piVar4 = piVar4 + 2" identifier = (binary_expression "piVar4 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar4 < piVar2)" ( (binary_expression "piVar4 < piVar2" identifier < identifier) )) ;) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "size_t hash_get_entries(Hash_table *table,void **buffer,size_t buffer_size)\n\n{\n  hash_entry *phVar1;\n  size_t sVar2;\n  void **ppvVar3;\n  hash_entry *phVar4;\n  \n  phVar4 = table->bucket;\n  phVar1 = table->bucket_limit;\n  sVar2 = 0;\n  if (phVar1 <= phVar4) {\n    return 0;\n  }\n  do {\n    if (phVar4->data != (void *)0x0) {\n      if (buffer_size <= sVar2) {\n        return sVar2;\n      }\n      ppvVar3 = buffer + sVar2;\n      *ppvVar3 = phVar4->data;\n      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }\n      phVar1 = table->bucket_limit;\n    }\n    phVar4 = phVar4 + 1;\n  } while (phVar4 < phVar1);\n  return sVar2;\n}\n\n" (function_definition "size_t hash_get_entries(Hash_table *table,void **buffer,size_t buffer_size)\n\n{\n  hash_entry *phVar1;\n  size_t sVar2;\n  void **ppvVar3;\n  hash_entry *phVar4;\n  \n  phVar4 = table->bucket;\n  phVar1 = table->bucket_limit;\n  sVar2 = 0;\n  if (phVar1 <= phVar4) {\n    return 0;\n  }\n  do {\n    if (phVar4->data != (void *)0x0) {\n      if (buffer_size <= sVar2) {\n        return sVar2;\n      }\n      ppvVar3 = buffer + sVar2;\n      *ppvVar3 = phVar4->data;\n      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }\n      phVar1 = table->bucket_limit;\n    }\n    phVar4 = phVar4 + 1;\n  } while (phVar4 < phVar1);\n  return sVar2;\n}" primitive_type (function_declarator "hash_get_entries(Hash_table *table,void **buffer,size_t buffer_size)" identifier (parameter_list "(Hash_table *table,void **buffer,size_t buffer_size)" ( (parameter_declaration "Hash_table *table" type_identifier (pointer_declarator "*table" * identifier)) , (parameter_declaration "void **buffer" primitive_type (pointer_declarator "**buffer" * (pointer_declarator "*buffer" * identifier))) , (parameter_declaration "size_t buffer_size" primitive_type identifier) ))) (compound_statement "{\n  hash_entry *phVar1;\n  size_t sVar2;\n  void **ppvVar3;\n  hash_entry *phVar4;\n  \n  phVar4 = table->bucket;\n  phVar1 = table->bucket_limit;\n  sVar2 = 0;\n  if (phVar1 <= phVar4) {\n    return 0;\n  }\n  do {\n    if (phVar4->data != (void *)0x0) {\n      if (buffer_size <= sVar2) {\n        return sVar2;\n      }\n      ppvVar3 = buffer + sVar2;\n      *ppvVar3 = phVar4->data;\n      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }\n      phVar1 = table->bucket_limit;\n    }\n    phVar4 = phVar4 + 1;\n  } while (phVar4 < phVar1);\n  return sVar2;\n}" { (declaration "hash_entry *phVar1;" type_identifier (pointer_declarator "*phVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "void **ppvVar3;" primitive_type (pointer_declarator "**ppvVar3" * (pointer_declarator "*ppvVar3" * identifier)) ;) (declaration "hash_entry *phVar4;" type_identifier (pointer_declarator "*phVar4" * identifier) ;) (expression_statement "phVar4 = table->bucket;" (assignment_expression "phVar4 = table->bucket" identifier = (field_expression "table->bucket" identifier -> field_identifier)) ;) (expression_statement "phVar1 = table->bucket_limit;" (assignment_expression "phVar1 = table->bucket_limit" identifier = (field_expression "table->bucket_limit" identifier -> field_identifier)) ;) (expression_statement "sVar2 = 0;" (assignment_expression "sVar2 = 0" identifier = number_literal) ;) (if_statement "if (phVar1 <= phVar4) {\n    return 0;\n  }" if (parenthesized_expression "(phVar1 <= phVar4)" ( (binary_expression "phVar1 <= phVar4" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    if (phVar4->data != (void *)0x0) {\n      if (buffer_size <= sVar2) {\n        return sVar2;\n      }\n      ppvVar3 = buffer + sVar2;\n      *ppvVar3 = phVar4->data;\n      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }\n      phVar1 = table->bucket_limit;\n    }\n    phVar4 = phVar4 + 1;\n  } while (phVar4 < phVar1);" do (compound_statement "{\n    if (phVar4->data != (void *)0x0) {\n      if (buffer_size <= sVar2) {\n        return sVar2;\n      }\n      ppvVar3 = buffer + sVar2;\n      *ppvVar3 = phVar4->data;\n      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }\n      phVar1 = table->bucket_limit;\n    }\n    phVar4 = phVar4 + 1;\n  }" { (if_statement "if (phVar4->data != (void *)0x0) {\n      if (buffer_size <= sVar2) {\n        return sVar2;\n      }\n      ppvVar3 = buffer + sVar2;\n      *ppvVar3 = phVar4->data;\n      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }\n      phVar1 = table->bucket_limit;\n    }" if (parenthesized_expression "(phVar4->data != (void *)0x0)" ( (binary_expression "phVar4->data != (void *)0x0" (field_expression "phVar4->data" identifier -> field_identifier) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (buffer_size <= sVar2) {\n        return sVar2;\n      }\n      ppvVar3 = buffer + sVar2;\n      *ppvVar3 = phVar4->data;\n      for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }\n      phVar1 = table->bucket_limit;\n    }" { (if_statement "if (buffer_size <= sVar2) {\n        return sVar2;\n      }" if (parenthesized_expression "(buffer_size <= sVar2)" ( (binary_expression "buffer_size <= sVar2" identifier <= identifier) )) (compound_statement "{\n        return sVar2;\n      }" { (return_statement "return sVar2;" return identifier ;) })) (expression_statement "ppvVar3 = buffer + sVar2;" (assignment_expression "ppvVar3 = buffer + sVar2" identifier = (binary_expression "buffer + sVar2" identifier + identifier)) ;) (expression_statement "*ppvVar3 = phVar4->data;" (assignment_expression "*ppvVar3 = phVar4->data" (pointer_expression "*ppvVar3" * identifier) = (field_expression "phVar4->data" identifier -> field_identifier)) ;) (for_statement "for (phVar1 = phVar4->next; sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0;\n          phVar1 = phVar1->next) {\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }" for ( (assignment_expression "phVar1 = phVar4->next" identifier = (field_expression "phVar4->next" identifier -> field_identifier)) ; (comma_expression "sVar2 = sVar2 + 1, phVar1 != (hash_entry *)0x0" (assignment_expression "sVar2 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) , (binary_expression "phVar1 != (hash_entry *)0x0" identifier != (cast_expression "(hash_entry *)0x0" ( (type_descriptor "hash_entry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ; (assignment_expression "phVar1 = phVar1->next" identifier = (field_expression "phVar1->next" identifier -> field_identifier)) ) (compound_statement "{\n        ppvVar3 = ppvVar3 + 1;\n        if (buffer_size == sVar2) {\n          return buffer_size;\n        }\n        *ppvVar3 = phVar1->data;\n      }" { (expression_statement "ppvVar3 = ppvVar3 + 1;" (assignment_expression "ppvVar3 = ppvVar3 + 1" identifier = (binary_expression "ppvVar3 + 1" identifier + number_literal)) ;) (if_statement "if (buffer_size == sVar2) {\n          return buffer_size;\n        }" if (parenthesized_expression "(buffer_size == sVar2)" ( (binary_expression "buffer_size == sVar2" identifier == identifier) )) (compound_statement "{\n          return buffer_size;\n        }" { (return_statement "return buffer_size;" return identifier ;) })) (expression_statement "*ppvVar3 = phVar1->data;" (assignment_expression "*ppvVar3 = phVar1->data" (pointer_expression "*ppvVar3" * identifier) = (field_expression "phVar1->data" identifier -> field_identifier)) ;) })) (expression_statement "phVar1 = table->bucket_limit;" (assignment_expression "phVar1 = table->bucket_limit" identifier = (field_expression "table->bucket_limit" identifier -> field_identifier)) ;) })) (expression_statement "phVar4 = phVar4 + 1;" (assignment_expression "phVar4 = phVar4 + 1" identifier = (binary_expression "phVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(phVar4 < phVar1)" ( (binary_expression "phVar4 < phVar1" identifier < identifier) )) ;) (return_statement "return sVar2;" return identifier ;) })))
(translation_unit "uint hash_get_entries(undefined4 *param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}\n\n" (function_definition "uint hash_get_entries(undefined4 *param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}" type_identifier (function_declarator "hash_get_entries(undefined4 *param_1,int param_2,uint param_3)" identifier (parameter_list "(undefined4 *param_1,int param_2,uint param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (expression_statement "piVar4 = (int *)*param_1;" (assignment_expression "piVar4 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "piVar2 = (int *)param_1[1];" (assignment_expression "piVar2 = (int *)param_1[1]" identifier = (cast_expression "(int *)param_1[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if (piVar2 <= piVar4) {\n    return 0;\n  }" if (parenthesized_expression "(piVar2 <= piVar4)" ( (binary_expression "piVar2 <= piVar4" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);" do (compound_statement "{\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  }" { (if_statement "if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }" if (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) (compound_statement "{\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }" { (if_statement "if (param_3 <= uVar3) {\n        return uVar3;\n      }" if (parenthesized_expression "(param_3 <= uVar3)" ( (binary_expression "param_3 <= uVar3" identifier <= identifier) )) (compound_statement "{\n        return uVar3;\n      }" { (return_statement "return uVar3;" return identifier ;) })) (expression_statement "piVar2 = (int *)(param_2 + uVar3 * 4);" (assignment_expression "piVar2 = (int *)(param_2 + uVar3 * 4)" identifier = (cast_expression "(int *)(param_2 + uVar3 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar3 * 4)" ( (binary_expression "param_2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) )))) ;) (expression_statement "*piVar2 = *piVar4;" (assignment_expression "*piVar2 = *piVar4" (pointer_expression "*piVar2" * identifier) = (pointer_expression "*piVar4" * identifier)) ;) (for_statement "for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }" for ( (assignment_expression "piVar1 = (int *)piVar4[1]" identifier = (cast_expression "(int *)piVar4[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[1]" identifier [ number_literal ]))) ; (comma_expression "uVar3 = uVar3 + 1, piVar1 != (int *)0x0" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) , (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ; (assignment_expression "piVar1 = (int *)piVar1[1]" identifier = (cast_expression "(int *)piVar1[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar1[1]" identifier [ number_literal ]))) ) (compound_statement "{\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (if_statement "if (param_3 == uVar3) {\n          return param_3;\n        }" if (parenthesized_expression "(param_3 == uVar3)" ( (binary_expression "param_3 == uVar3" identifier == identifier) )) (compound_statement "{\n          return param_3;\n        }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "*piVar2 = *piVar1;" (assignment_expression "*piVar2 = *piVar1" (pointer_expression "*piVar2" * identifier) = (pointer_expression "*piVar1" * identifier)) ;) })) (expression_statement "piVar2 = (int *)param_1[1];" (assignment_expression "piVar2 = (int *)param_1[1]" identifier = (cast_expression "(int *)param_1[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) })) (expression_statement "piVar4 = piVar4 + 2;" (assignment_expression "piVar4 = piVar4 + 2" identifier = (binary_expression "piVar4 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar4 < piVar2)" ( (binary_expression "piVar4 < piVar2" identifier < identifier) )) ;) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (for_statement for ( (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ; (comma_expression (assignment_expression IDENT = (binary_expression IDENT + LIT)) , (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ; (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (return_statement return IDENT ;) })))
(function_definition "uint hash_get_entries(undefined4 *param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}" (type_identifier "uint") (function_declarator "hash_get_entries(undefined4 *param_1,int param_2,uint param_3)" (identifier "hash_get_entries") (parameter_list "(undefined4 *param_1,int param_2,uint param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  uint uVar3;\n  int *piVar4;\n  \n  piVar4 = (int *)*param_1;\n  piVar2 = (int *)param_1[1];\n  uVar3 = 0;\n  if (piVar2 <= piVar4) {\n    return 0;\n  }\n  do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);\n  return uVar3;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (expression_statement "piVar4 = (int *)*param_1;" (assignment_expression "piVar4 = (int *)*param_1" (identifier "piVar4") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "piVar2 = (int *)param_1[1];" (assignment_expression "piVar2 = (int *)param_1[1]" (identifier "piVar2") (= "=") (cast_expression "(int *)param_1[1]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if (piVar2 <= piVar4) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(piVar2 <= piVar4)" (( "(") (binary_expression "piVar2 <= piVar4" (identifier "piVar2") (<= "<=") (identifier "piVar4")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (do_statement "do {\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  } while (piVar4 < piVar2);" (do "do") (compound_statement "{\n    if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }\n    piVar4 = piVar4 + 2;\n  }" ({ "{") (if_statement "if (*piVar4 != 0) {\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }" (if "if") (parenthesized_expression "(*piVar4 != 0)" (( "(") (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if (param_3 <= uVar3) {\n        return uVar3;\n      }\n      piVar2 = (int *)(param_2 + uVar3 * 4);\n      *piVar2 = *piVar4;\n      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }\n      piVar2 = (int *)param_1[1];\n    }" ({ "{") (if_statement "if (param_3 <= uVar3) {\n        return uVar3;\n      }" (if "if") (parenthesized_expression "(param_3 <= uVar3)" (( "(") (binary_expression "param_3 <= uVar3" (identifier "param_3") (<= "<=") (identifier "uVar3")) () ")")) (compound_statement "{\n        return uVar3;\n      }" ({ "{") (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "piVar2 = (int *)(param_2 + uVar3 * 4);" (assignment_expression "piVar2 = (int *)(param_2 + uVar3 * 4)" (identifier "piVar2") (= "=") (cast_expression "(int *)(param_2 + uVar3 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + uVar3 * 4)" (( "(") (binary_expression "param_2 + uVar3 * 4" (identifier "param_2") (+ "+") (binary_expression "uVar3 * 4" (identifier "uVar3") (* "*") (number_literal "4"))) () ")")))) (; ";")) (expression_statement "*piVar2 = *piVar4;" (assignment_expression "*piVar2 = *piVar4" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (for_statement "for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;\n          piVar1 = (int *)piVar1[1]) {\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }" (for "for") (( "(") (assignment_expression "piVar1 = (int *)piVar4[1]" (identifier "piVar1") (= "=") (cast_expression "(int *)piVar4[1]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")))) (; ";") (comma_expression "uVar3 = uVar3 + 1, piVar1 != (int *)0x0" (assignment_expression "uVar3 = uVar3 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 1" (identifier "uVar3") (+ "+") (number_literal "1"))) (, ",") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) (; ";") (assignment_expression "piVar1 = (int *)piVar1[1]" (identifier "piVar1") (= "=") (cast_expression "(int *)piVar1[1]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")))) () ")") (compound_statement "{\n        piVar2 = piVar2 + 1;\n        if (param_3 == uVar3) {\n          return param_3;\n        }\n        *piVar2 = *piVar1;\n      }" ({ "{") (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_3 == uVar3) {\n          return param_3;\n        }" (if "if") (parenthesized_expression "(param_3 == uVar3)" (( "(") (binary_expression "param_3 == uVar3" (identifier "param_3") (== "==") (identifier "uVar3")) () ")")) (compound_statement "{\n          return param_3;\n        }" ({ "{") (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))) (expression_statement "*piVar2 = *piVar1;" (assignment_expression "*piVar2 = *piVar1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (} "}"))) (expression_statement "piVar2 = (int *)param_1[1];" (assignment_expression "piVar2 = (int *)param_1[1]" (identifier "piVar2") (= "=") (cast_expression "(int *)param_1[1]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) (; ";")) (} "}"))) (expression_statement "piVar4 = piVar4 + 2;" (assignment_expression "piVar4 = piVar4 + 2" (identifier "piVar4") (= "=") (binary_expression "piVar4 + 2" (identifier "piVar4") (+ "+") (number_literal "2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar4 < piVar2)" (( "(") (binary_expression "piVar4 < piVar2" (identifier "piVar4") (< "<") (identifier "piVar2")) () ")")) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (for_statement initializer: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))) condition: (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) update: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (return_statement (identifier)))))

uint MASKED(undefined4 *param_1,int param_2,uint param_3)

{
  int *piVar1;
  int *piVar2;
  uint uVar3;
  int *piVar4;
  
  piVar4 = (int *)*param_1;
  piVar2 = (int *)param_1[1];
  uVar3 = 0;
  if (piVar2 <= piVar4) {
    return 0;
  }
  do {
    if (*piVar4 != 0) {
      if (param_3 <= uVar3) {
        return uVar3;
      }
      piVar2 = (int *)(param_2 + uVar3 * 4);
      *piVar2 = *piVar4;
      for (piVar1 = (int *)piVar4[1]; uVar3 = uVar3 + 1, piVar1 != (int *)0x0;
          piVar1 = (int *)piVar1[1]) {
        piVar2 = piVar2 + 1;
        if (param_3 == uVar3) {
          return param_3;
        }
        *piVar2 = *piVar1;
      }
      piVar2 = (int *)param_1[1];
    }
    piVar4 = piVar4 + 2;
  } while (piVar4 < piVar2);
  return uVar3;
}

