
reg_errcode_t preorder(bin_tree_t *root,_func_reg_errcode_t_void_ptr_bin_tree_t_ptr *fn,void *extra)

{
  reg_errcode_t rVar1;
  bin_tree_t *pbVar2;
  bin_tree_t *pbVar3;
  bin_tree_t *pbVar4;
  
  do {
    do {
      pbVar4 = root;
      rVar1 = (*fn)(extra,pbVar4);
      if (rVar1 != _REG_NOERROR) {
        return rVar1;
      }
      root = pbVar4->left;
    } while (root != (bin_tree_t *)0x0);
    pbVar3 = pbVar4->right;
    while ((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))) {
      pbVar2 = pbVar4->parent;
      if (pbVar2 == (bin_tree_t *)0x0) {
        return _REG_NOERROR;
      }
      root = pbVar4;
      pbVar4 = pbVar2;
      pbVar3 = pbVar2->right;
    }
  } while( true );
}



void FUN_00046050(int *param_1,code *param_2,undefined4 param_3)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  int *piVar4;
  
  do {
    do {
      piVar4 = param_1;
      iVar1 = (*param_2)(param_3,piVar4);
      if (iVar1 != 0) {
        return;
      }
      param_1 = (int *)piVar4[1];
    } while (param_1 != (int *)0x0);
    piVar3 = (int *)piVar4[2];
    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {
      piVar2 = (int *)*piVar4;
      if (piVar2 == (int *)0x0) {
        return;
      }
      param_1 = piVar4;
      piVar4 = piVar2;
      piVar3 = (int *)piVar2[2];
    }
  } while( true );
}


addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
or s0,a0,zero
or s2,a1,zero
b 0x000460a0
_or s1,a2,zero
lw a0,0x0(s0)
beq a0,zero,0x000460d0
_or v1,s0,zero
or s0,a0,zero
lw a0,0x8(s0)
beq a0,v1,0x00046074
_nop
beq a0,zero,0x00046074
_nop
or v1,a0,zero
or s0,v1,zero
or a1,s0,zero
or a0,s1,zero
or t9,s2,zero
jalr t9
_nop
bne v0,zero,0x000460d4
_lw ra,0x24(sp)
lw v1,0x4(s0)
bne v1,zero,0x0004609c
_nop
b 0x00046088
_lw a0,0x8(s0)
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "void FUN_00046050(int *param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}\n\n" (function_definition "void FUN_00046050(int *param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}" primitive_type (function_declarator "FUN_00046050(int *param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (do_statement "do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );" do (compound_statement "{\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  }" { (do_statement "do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);" do (compound_statement "{\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    }" { (expression_statement "piVar4 = param_1;" (assignment_expression "piVar4 = param_1" identifier = identifier) ;) (expression_statement "iVar1 = (*param_2)(param_3,piVar4);" (assignment_expression "iVar1 = (*param_2)(param_3,piVar4)" identifier = (call_expression "(*param_2)(param_3,piVar4)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3,piVar4)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "param_1 = (int *)piVar4[1];" (assignment_expression "param_1 = (int *)piVar4[1]" identifier = (cast_expression "(int *)piVar4[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[1]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(param_1 != (int *)0x0)" ( (binary_expression "param_1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "piVar3 = (int *)piVar4[2];" (assignment_expression "piVar3 = (int *)piVar4[2]" identifier = (cast_expression "(int *)piVar4[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[2]" identifier [ number_literal ]))) ;) (while_statement "while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }" while (parenthesized_expression "((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0)))" ( (parenthesized_expression "(piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))" ( (binary_expression "piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0)" (binary_expression "piVar3 == param_1" identifier == identifier) || (parenthesized_expression "(param_1 = piVar3, piVar3 == (int *)0x0)" ( (comma_expression "param_1 = piVar3, piVar3 == (int *)0x0" (assignment_expression "param_1 = piVar3" identifier = identifier) , (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) )) (compound_statement "{\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }" { (expression_statement "piVar2 = (int *)*piVar4;" (assignment_expression "piVar2 = (int *)*piVar4" identifier = (cast_expression "(int *)*piVar4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n        return;\n      }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "param_1 = piVar4;" (assignment_expression "param_1 = piVar4" identifier = identifier) ;) (expression_statement "piVar4 = piVar2;" (assignment_expression "piVar4 = piVar2" identifier = identifier) ;) (expression_statement "piVar3 = (int *)piVar2[2];" (assignment_expression "piVar3 = (int *)piVar2[2]" identifier = (cast_expression "(int *)piVar2[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[2]" identifier [ number_literal ]))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "reg_errcode_t preorder(bin_tree_t *root,_func_reg_errcode_t_void_ptr_bin_tree_t_ptr *fn,void *extra)\n\n{\n  reg_errcode_t rVar1;\n  bin_tree_t *pbVar2;\n  bin_tree_t *pbVar3;\n  bin_tree_t *pbVar4;\n  \n  do {\n    do {\n      pbVar4 = root;\n      rVar1 = (*fn)(extra,pbVar4);\n      if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }\n      root = pbVar4->left;\n    } while (root != (bin_tree_t *)0x0);\n    pbVar3 = pbVar4->right;\n    while ((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))) {\n      pbVar2 = pbVar4->parent;\n      if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }\n      root = pbVar4;\n      pbVar4 = pbVar2;\n      pbVar3 = pbVar2->right;\n    }\n  } while( true );\n}\n\n" (function_definition "reg_errcode_t preorder(bin_tree_t *root,_func_reg_errcode_t_void_ptr_bin_tree_t_ptr *fn,void *extra)\n\n{\n  reg_errcode_t rVar1;\n  bin_tree_t *pbVar2;\n  bin_tree_t *pbVar3;\n  bin_tree_t *pbVar4;\n  \n  do {\n    do {\n      pbVar4 = root;\n      rVar1 = (*fn)(extra,pbVar4);\n      if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }\n      root = pbVar4->left;\n    } while (root != (bin_tree_t *)0x0);\n    pbVar3 = pbVar4->right;\n    while ((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))) {\n      pbVar2 = pbVar4->parent;\n      if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }\n      root = pbVar4;\n      pbVar4 = pbVar2;\n      pbVar3 = pbVar2->right;\n    }\n  } while( true );\n}" type_identifier (function_declarator "preorder(bin_tree_t *root,_func_reg_errcode_t_void_ptr_bin_tree_t_ptr *fn,void *extra)" identifier (parameter_list "(bin_tree_t *root,_func_reg_errcode_t_void_ptr_bin_tree_t_ptr *fn,void *extra)" ( (parameter_declaration "bin_tree_t *root" type_identifier (pointer_declarator "*root" * identifier)) , (parameter_declaration "_func_reg_errcode_t_void_ptr_bin_tree_t_ptr *fn" type_identifier (pointer_declarator "*fn" * identifier)) , (parameter_declaration "void *extra" primitive_type (pointer_declarator "*extra" * identifier)) ))) (compound_statement "{\n  reg_errcode_t rVar1;\n  bin_tree_t *pbVar2;\n  bin_tree_t *pbVar3;\n  bin_tree_t *pbVar4;\n  \n  do {\n    do {\n      pbVar4 = root;\n      rVar1 = (*fn)(extra,pbVar4);\n      if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }\n      root = pbVar4->left;\n    } while (root != (bin_tree_t *)0x0);\n    pbVar3 = pbVar4->right;\n    while ((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))) {\n      pbVar2 = pbVar4->parent;\n      if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }\n      root = pbVar4;\n      pbVar4 = pbVar2;\n      pbVar3 = pbVar2->right;\n    }\n  } while( true );\n}" { (declaration "reg_errcode_t rVar1;" type_identifier identifier ;) (declaration "bin_tree_t *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "bin_tree_t *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "bin_tree_t *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (do_statement "do {\n    do {\n      pbVar4 = root;\n      rVar1 = (*fn)(extra,pbVar4);\n      if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }\n      root = pbVar4->left;\n    } while (root != (bin_tree_t *)0x0);\n    pbVar3 = pbVar4->right;\n    while ((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))) {\n      pbVar2 = pbVar4->parent;\n      if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }\n      root = pbVar4;\n      pbVar4 = pbVar2;\n      pbVar3 = pbVar2->right;\n    }\n  } while( true );" do (compound_statement "{\n    do {\n      pbVar4 = root;\n      rVar1 = (*fn)(extra,pbVar4);\n      if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }\n      root = pbVar4->left;\n    } while (root != (bin_tree_t *)0x0);\n    pbVar3 = pbVar4->right;\n    while ((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))) {\n      pbVar2 = pbVar4->parent;\n      if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }\n      root = pbVar4;\n      pbVar4 = pbVar2;\n      pbVar3 = pbVar2->right;\n    }\n  }" { (do_statement "do {\n      pbVar4 = root;\n      rVar1 = (*fn)(extra,pbVar4);\n      if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }\n      root = pbVar4->left;\n    } while (root != (bin_tree_t *)0x0);" do (compound_statement "{\n      pbVar4 = root;\n      rVar1 = (*fn)(extra,pbVar4);\n      if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }\n      root = pbVar4->left;\n    }" { (expression_statement "pbVar4 = root;" (assignment_expression "pbVar4 = root" identifier = identifier) ;) (expression_statement "rVar1 = (*fn)(extra,pbVar4);" (assignment_expression "rVar1 = (*fn)(extra,pbVar4)" identifier = (call_expression "(*fn)(extra,pbVar4)" (parenthesized_expression "(*fn)" ( (pointer_expression "*fn" * identifier) )) (argument_list "(extra,pbVar4)" ( identifier , identifier )))) ;) (if_statement "if (rVar1 != _REG_NOERROR) {\n        return rVar1;\n      }" if (parenthesized_expression "(rVar1 != _REG_NOERROR)" ( (binary_expression "rVar1 != _REG_NOERROR" identifier != identifier) )) (compound_statement "{\n        return rVar1;\n      }" { (return_statement "return rVar1;" return identifier ;) })) (expression_statement "root = pbVar4->left;" (assignment_expression "root = pbVar4->left" identifier = (field_expression "pbVar4->left" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(root != (bin_tree_t *)0x0)" ( (binary_expression "root != (bin_tree_t *)0x0" identifier != (cast_expression "(bin_tree_t *)0x0" ( (type_descriptor "bin_tree_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "pbVar3 = pbVar4->right;" (assignment_expression "pbVar3 = pbVar4->right" identifier = (field_expression "pbVar4->right" identifier -> field_identifier)) ;) (while_statement "while ((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))) {\n      pbVar2 = pbVar4->parent;\n      if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }\n      root = pbVar4;\n      pbVar4 = pbVar2;\n      pbVar3 = pbVar2->right;\n    }" while (parenthesized_expression "((pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0)))" ( (parenthesized_expression "(pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0))" ( (binary_expression "pbVar3 == root || (root = pbVar3, pbVar3 == (bin_tree_t *)0x0)" (binary_expression "pbVar3 == root" identifier == identifier) || (parenthesized_expression "(root = pbVar3, pbVar3 == (bin_tree_t *)0x0)" ( (comma_expression "root = pbVar3, pbVar3 == (bin_tree_t *)0x0" (assignment_expression "root = pbVar3" identifier = identifier) , (binary_expression "pbVar3 == (bin_tree_t *)0x0" identifier == (cast_expression "(bin_tree_t *)0x0" ( (type_descriptor "bin_tree_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) )) (compound_statement "{\n      pbVar2 = pbVar4->parent;\n      if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }\n      root = pbVar4;\n      pbVar4 = pbVar2;\n      pbVar3 = pbVar2->right;\n    }" { (expression_statement "pbVar2 = pbVar4->parent;" (assignment_expression "pbVar2 = pbVar4->parent" identifier = (field_expression "pbVar4->parent" identifier -> field_identifier)) ;) (if_statement "if (pbVar2 == (bin_tree_t *)0x0) {\n        return _REG_NOERROR;\n      }" if (parenthesized_expression "(pbVar2 == (bin_tree_t *)0x0)" ( (binary_expression "pbVar2 == (bin_tree_t *)0x0" identifier == (cast_expression "(bin_tree_t *)0x0" ( (type_descriptor "bin_tree_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return _REG_NOERROR;\n      }" { (return_statement "return _REG_NOERROR;" return identifier ;) })) (expression_statement "root = pbVar4;" (assignment_expression "root = pbVar4" identifier = identifier) ;) (expression_statement "pbVar4 = pbVar2;" (assignment_expression "pbVar4 = pbVar2" identifier = identifier) ;) (expression_statement "pbVar3 = pbVar2->right;" (assignment_expression "pbVar3 = pbVar2->right" identifier = (field_expression "pbVar2->right" identifier -> field_identifier)) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "void FUN_00046050(int *param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}\n\n" (function_definition "void FUN_00046050(int *param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}" primitive_type (function_declarator "FUN_00046050(int *param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (do_statement "do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );" do (compound_statement "{\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  }" { (do_statement "do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);" do (compound_statement "{\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    }" { (expression_statement "piVar4 = param_1;" (assignment_expression "piVar4 = param_1" identifier = identifier) ;) (expression_statement "iVar1 = (*param_2)(param_3,piVar4);" (assignment_expression "iVar1 = (*param_2)(param_3,piVar4)" identifier = (call_expression "(*param_2)(param_3,piVar4)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3,piVar4)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "param_1 = (int *)piVar4[1];" (assignment_expression "param_1 = (int *)piVar4[1]" identifier = (cast_expression "(int *)piVar4[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[1]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(param_1 != (int *)0x0)" ( (binary_expression "param_1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "piVar3 = (int *)piVar4[2];" (assignment_expression "piVar3 = (int *)piVar4[2]" identifier = (cast_expression "(int *)piVar4[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[2]" identifier [ number_literal ]))) ;) (while_statement "while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }" while (parenthesized_expression "((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0)))" ( (parenthesized_expression "(piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))" ( (binary_expression "piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0)" (binary_expression "piVar3 == param_1" identifier == identifier) || (parenthesized_expression "(param_1 = piVar3, piVar3 == (int *)0x0)" ( (comma_expression "param_1 = piVar3, piVar3 == (int *)0x0" (assignment_expression "param_1 = piVar3" identifier = identifier) , (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) )) (compound_statement "{\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }" { (expression_statement "piVar2 = (int *)*piVar4;" (assignment_expression "piVar2 = (int *)*piVar4" identifier = (cast_expression "(int *)*piVar4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n        return;\n      }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "param_1 = piVar4;" (assignment_expression "param_1 = piVar4" identifier = identifier) ;) (expression_statement "piVar4 = piVar2;" (assignment_expression "piVar4 = piVar2" identifier = identifier) ;) (expression_statement "piVar3 = (int *)piVar2[2];" (assignment_expression "piVar3 = (int *)piVar2[2]" identifier = (cast_expression "(int *)piVar2[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[2]" identifier [ number_literal ]))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (do_statement do (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (while_statement while (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT == IDENT) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) })) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "void FUN_00046050(int *param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}" (primitive_type "void") (function_declarator "FUN_00046050(int *param_1,code *param_2,undefined4 param_3)" (identifier "FUN_00046050") (parameter_list "(int *param_1,code *param_2,undefined4 param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "code *param_2" (type_identifier "code") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int *piVar4;\n  \n  do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (do_statement "do {\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  } while( true );" (do "do") (compound_statement "{\n    do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);\n    piVar3 = (int *)piVar4[2];\n    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }\n  }" ({ "{") (do_statement "do {\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    } while (param_1 != (int *)0x0);" (do "do") (compound_statement "{\n      piVar4 = param_1;\n      iVar1 = (*param_2)(param_3,piVar4);\n      if (iVar1 != 0) {\n        return;\n      }\n      param_1 = (int *)piVar4[1];\n    }" ({ "{") (expression_statement "piVar4 = param_1;" (assignment_expression "piVar4 = param_1" (identifier "piVar4") (= "=") (identifier "param_1")) (; ";")) (expression_statement "iVar1 = (*param_2)(param_3,piVar4);" (assignment_expression "iVar1 = (*param_2)(param_3,piVar4)" (identifier "iVar1") (= "=") (call_expression "(*param_2)(param_3,piVar4)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(param_3,piVar4)" (( "(") (identifier "param_3") (, ",") (identifier "piVar4") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n        return;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "param_1 = (int *)piVar4[1];" (assignment_expression "param_1 = (int *)piVar4[1]" (identifier "param_1") (= "=") (cast_expression "(int *)piVar4[1]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 != (int *)0x0)" (( "(") (binary_expression "param_1 != (int *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (expression_statement "piVar3 = (int *)piVar4[2];" (assignment_expression "piVar3 = (int *)piVar4[2]" (identifier "piVar3") (= "=") (cast_expression "(int *)piVar4[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")))) (; ";")) (while_statement "while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }" (while "while") (parenthesized_expression "((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0)))" (( "(") (parenthesized_expression "(piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))" (( "(") (binary_expression "piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0)" (binary_expression "piVar3 == param_1" (identifier "piVar3") (== "==") (identifier "param_1")) (|| "||") (parenthesized_expression "(param_1 = piVar3, piVar3 == (int *)0x0)" (( "(") (comma_expression "param_1 = piVar3, piVar3 == (int *)0x0" (assignment_expression "param_1 = piVar3" (identifier "param_1") (= "=") (identifier "piVar3")) (, ",") (binary_expression "piVar3 == (int *)0x0" (identifier "piVar3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")"))) () ")")) () ")")) (compound_statement "{\n      piVar2 = (int *)*piVar4;\n      if (piVar2 == (int *)0x0) {\n        return;\n      }\n      param_1 = piVar4;\n      piVar4 = piVar2;\n      piVar3 = (int *)piVar2[2];\n    }" ({ "{") (expression_statement "piVar2 = (int *)*piVar4;" (assignment_expression "piVar2 = (int *)*piVar4" (identifier "piVar2") (= "=") (cast_expression "(int *)*piVar4" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")))) (; ";")) (if_statement "if (piVar2 == (int *)0x0) {\n        return;\n      }" (if "if") (parenthesized_expression "(piVar2 == (int *)0x0)" (( "(") (binary_expression "piVar2 == (int *)0x0" (identifier "piVar2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "param_1 = piVar4;" (assignment_expression "param_1 = piVar4" (identifier "param_1") (= "=") (identifier "piVar4")) (; ";")) (expression_statement "piVar4 = piVar2;" (assignment_expression "piVar4 = piVar2" (identifier "piVar4") (= "=") (identifier "piVar2")) (; ";")) (expression_statement "piVar3 = (int *)piVar2[2];" (assignment_expression "piVar3 = (int *)piVar2[2]" (identifier "piVar3") (= "=") (cast_expression "(int *)piVar2[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")))) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

type_1 function_1(type_2 *var_3,type_3 *fn,void *extra)

{
  type_1 var_1;
  type_2 *var_5;
  type_2 *var_4;
  type_2 *pbVar4;
  
  do {
    do {
      pbVar4 = var_3;
      var_1 = (*fn)(extra,pbVar4);
      if (var_1 != var_2) {
        return var_1;
      }
      var_3 = pbVar4->left;
    } while (var_3 != (type_2 *)0x0);
    var_4 = pbVar4->right;
    while ((var_4 == var_3 || (var_3 = var_4, var_4 == (type_2 *)0x0))) {
      var_5 = pbVar4->parent;
      if (var_5 == (type_2 *)0x0) {
        return var_2;
      }
      var_3 = pbVar4;
      pbVar4 = var_5;
      var_4 = var_5->right;
    }
  } while( true );
}


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

void MASKED(int *param_1,code *param_2,undefined4 param_3)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  int *piVar4;
  
  do {
    do {
      piVar4 = param_1;
      iVar1 = (*param_2)(param_3,piVar4);
      if (iVar1 != 0) {
        return;
      }
      param_1 = (int *)piVar4[1];
    } while (param_1 != (int *)0x0);
    piVar3 = (int *)piVar4[2];
    while ((piVar3 == param_1 || (param_1 = piVar3, piVar3 == (int *)0x0))) {
      piVar2 = (int *)*piVar4;
      if (piVar2 == (int *)0x0) {
        return;
      }
      param_1 = piVar4;
      piVar4 = piVar2;
      piVar3 = (int *)piVar2[2];
    }
  } while( true );
}

