
/* DWARF original prototype: void copy(position_set * src, position_set * dst, position_set * src)
    */

int copy(EVP_PKEY_CTX *dst,EVP_PKEY_CTX *src)

{
  void *pvVar1;
  undefined4 *in_a2;
  int iVar2;
  
  iVar2 = *(int *)src;
  if ((int)in_a2[2] < iVar2) {
    (*(code *)PTR_free_0003f4d8)(*in_a2);
    pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8);
    iVar2 = *(int *)src;
    *in_a2 = pvVar1;
    in_a2[1] = iVar2;
  }
  else {
    in_a2[1] = iVar2;
    pvVar1 = (void *)0x0;
  }
  if (iVar2 == 0) {
    return (int)pvVar1;
  }
                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  iVar2 = (*(code *)PTR_memcpy_0003f4d0)(*in_a2,*(undefined4 *)dst,iVar2 << 3);
  return iVar2;
}



void FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)

{
  undefined4 uVar1;
  int iVar2;
  
  iVar2 = *param_2;
  if ((int)param_3[2] < iVar2) {
    (*(code *)PTR_free_0003f4d8)(*param_3);
    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);
    iVar2 = *param_2;
    *param_3 = uVar1;
    param_3[1] = iVar2;
  }
  else {
    param_3[1] = iVar2;
  }
  if (iVar2 == 0) {
    return;
  }
                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);
  return;
}


lui gp,0x3
addiu gp,gp,-0x7a5c
addu gp,gp,t9
addiu sp,sp,-0x30
sw s0,0x20(sp)
or s0,a2,zero
sw gp,0x18(sp)
sw s2,0x28(sp)
sw ra,0x2c(sp)
sw s1,0x24(sp)
lw a2,0x0(a1)
lw v0,0x8(s0)
slt v0,v0,a2
bne v0,zero,0x0001ebf8
_or s2,a0,zero
bne a2,zero,0x0001ec4c
_sw a2,0x4(s0)
lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7c68(gp)
or s1,a1,zero
jalr t9
_lw a0,0x0(s0)
li v1,0x8
lw gp,0x18(sp)
li a3,-0x1
lw a2,0x0(s1)
addiu a1,s0,0x8
lw v0,0x8(s0)
or a0,zero,zero
sw v1,0x10(sp)
lw t9,-0x7fc0(gp)
addiu t9,t9,-0x2378
bal 0x0001dc88
_subu a2,a2,v0
lw a2,0x0(s1)
lw gp,0x18(sp)
sw v0,0x0(s0)
beq a2,zero,0x0001ebe0
_sw a2,0x4(s0)
lw a1,0x0(s2)
sll a2,a2,0x3
lw a0,0x0(s0)
lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
lw t9,-0x7c70(gp)
jr t9
_addiu sp,sp,0x30
(translation_unit "void FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}\n\n" (function_definition "void FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}" primitive_type (function_declarator "FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)" identifier (parameter_list "(undefined4 *param_1,int *param_2,undefined4 *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }" if (parenthesized_expression "((int)param_3[2] < iVar2)" ( (binary_expression "(int)param_3[2] < iVar2" (cast_expression "(int)param_3[2]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_3[2]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }" { (expression_statement "(*(code *)PTR_free_0003f4d8)(*param_3);" (call_expression "(*(code *)PTR_free_0003f4d8)(*param_3)" (parenthesized_expression "(*(code *)PTR_free_0003f4d8)" ( (pointer_expression "*(code *)PTR_free_0003f4d8" * (cast_expression "(code *)PTR_free_0003f4d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_3)" ( (pointer_expression "*param_3" * identifier) ))) ;) (expression_statement "uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);" (assignment_expression "uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" identifier = (call_expression "FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" identifier (argument_list "(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" ( number_literal , (binary_expression "param_3 + 2" identifier + number_literal) , (binary_expression "*param_2 - param_3[2]" (pointer_expression "*param_2" * identifier) - (subscript_expression "param_3[2]" identifier [ number_literal ])) , number_literal , number_literal )))) ;) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*param_3 = uVar1;" (assignment_expression "*param_3 = uVar1" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = iVar2;" (assignment_expression "param_3[1] = iVar2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    param_3[1] = iVar2;\n  }" else (compound_statement "{\n    param_3[1] = iVar2;\n  }" { (expression_statement "param_3[1] = iVar2;" (assignment_expression "param_3[1] = iVar2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) }))) (if_statement "if (iVar2 == 0) {\n    return;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment comment (expression_statement "(*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);" (call_expression "(*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3)" (parenthesized_expression "(*(code *)PTR_memcpy_0003f4d0)" ( (pointer_expression "*(code *)PTR_memcpy_0003f4d0" * (cast_expression "(code *)PTR_memcpy_0003f4d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_3,*param_1,iVar2 << 3)" ( (pointer_expression "*param_3" * identifier) , (pointer_expression "*param_1" * identifier) , (binary_expression "iVar2 << 3" identifier << number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* DWARF original prototype: void copy(position_set * src, position_set * dst, position_set * src)\n    */\n\nint copy(EVP_PKEY_CTX *dst,EVP_PKEY_CTX *src)\n\n{\n  void *pvVar1;\n  undefined4 *in_a2;\n  int iVar2;\n  \n  iVar2 = *(int *)src;\n  if ((int)in_a2[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*in_a2);\n    pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8);\n    iVar2 = *(int *)src;\n    *in_a2 = pvVar1;\n    in_a2[1] = iVar2;\n  }\n  else {\n    in_a2[1] = iVar2;\n    pvVar1 = (void *)0x0;\n  }\n  if (iVar2 == 0) {\n    return (int)pvVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar2 = (*(code *)PTR_memcpy_0003f4d0)(*in_a2,*(undefined4 *)dst,iVar2 << 3);\n  return iVar2;\n}\n\n" comment (function_definition "int copy(EVP_PKEY_CTX *dst,EVP_PKEY_CTX *src)\n\n{\n  void *pvVar1;\n  undefined4 *in_a2;\n  int iVar2;\n  \n  iVar2 = *(int *)src;\n  if ((int)in_a2[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*in_a2);\n    pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8);\n    iVar2 = *(int *)src;\n    *in_a2 = pvVar1;\n    in_a2[1] = iVar2;\n  }\n  else {\n    in_a2[1] = iVar2;\n    pvVar1 = (void *)0x0;\n  }\n  if (iVar2 == 0) {\n    return (int)pvVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar2 = (*(code *)PTR_memcpy_0003f4d0)(*in_a2,*(undefined4 *)dst,iVar2 << 3);\n  return iVar2;\n}" primitive_type (function_declarator "copy(EVP_PKEY_CTX *dst,EVP_PKEY_CTX *src)" identifier (parameter_list "(EVP_PKEY_CTX *dst,EVP_PKEY_CTX *src)" ( (parameter_declaration "EVP_PKEY_CTX *dst" type_identifier (pointer_declarator "*dst" * identifier)) , (parameter_declaration "EVP_PKEY_CTX *src" type_identifier (pointer_declarator "*src" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  undefined4 *in_a2;\n  int iVar2;\n  \n  iVar2 = *(int *)src;\n  if ((int)in_a2[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*in_a2);\n    pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8);\n    iVar2 = *(int *)src;\n    *in_a2 = pvVar1;\n    in_a2[1] = iVar2;\n  }\n  else {\n    in_a2[1] = iVar2;\n    pvVar1 = (void *)0x0;\n  }\n  if (iVar2 == 0) {\n    return (int)pvVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar2 = (*(code *)PTR_memcpy_0003f4d0)(*in_a2,*(undefined4 *)dst,iVar2 << 3);\n  return iVar2;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "undefined4 *in_a2;" type_identifier (pointer_declarator "*in_a2" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = *(int *)src;" (assignment_expression "iVar2 = *(int *)src" identifier = (pointer_expression "*(int *)src" * (cast_expression "(int *)src" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if ((int)in_a2[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*in_a2);\n    pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8);\n    iVar2 = *(int *)src;\n    *in_a2 = pvVar1;\n    in_a2[1] = iVar2;\n  }\n  else {\n    in_a2[1] = iVar2;\n    pvVar1 = (void *)0x0;\n  }" if (parenthesized_expression "((int)in_a2[2] < iVar2)" ( (binary_expression "(int)in_a2[2] < iVar2" (cast_expression "(int)in_a2[2]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "in_a2[2]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    (*(code *)PTR_free_0003f4d8)(*in_a2);\n    pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8);\n    iVar2 = *(int *)src;\n    *in_a2 = pvVar1;\n    in_a2[1] = iVar2;\n  }" { (expression_statement "(*(code *)PTR_free_0003f4d8)(*in_a2);" (call_expression "(*(code *)PTR_free_0003f4d8)(*in_a2)" (parenthesized_expression "(*(code *)PTR_free_0003f4d8)" ( (pointer_expression "*(code *)PTR_free_0003f4d8" * (cast_expression "(code *)PTR_free_0003f4d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*in_a2)" ( (pointer_expression "*in_a2" * identifier) ))) ;) (expression_statement "pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8);" (assignment_expression "pvVar1 = xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8)" identifier = (call_expression "xpalloc((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8)" identifier (argument_list "((void *)0x0,in_a2 + 2,*(int *)src - in_a2[2],-1,8)" ( (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (binary_expression "in_a2 + 2" identifier + number_literal) , (binary_expression "*(int *)src - in_a2[2]" (pointer_expression "*(int *)src" * (cast_expression "(int *)src" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) - (subscript_expression "in_a2[2]" identifier [ number_literal ])) , number_literal , number_literal )))) ;) (expression_statement "iVar2 = *(int *)src;" (assignment_expression "iVar2 = *(int *)src" identifier = (pointer_expression "*(int *)src" * (cast_expression "(int *)src" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*in_a2 = pvVar1;" (assignment_expression "*in_a2 = pvVar1" (pointer_expression "*in_a2" * identifier) = identifier) ;) (expression_statement "in_a2[1] = iVar2;" (assignment_expression "in_a2[1] = iVar2" (subscript_expression "in_a2[1]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    in_a2[1] = iVar2;\n    pvVar1 = (void *)0x0;\n  }" else (compound_statement "{\n    in_a2[1] = iVar2;\n    pvVar1 = (void *)0x0;\n  }" { (expression_statement "in_a2[1] = iVar2;" (assignment_expression "in_a2[1] = iVar2" (subscript_expression "in_a2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pvVar1 = (void *)0x0;" (assignment_expression "pvVar1 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) (if_statement "if (iVar2 == 0) {\n    return (int)pvVar1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    return (int)pvVar1;\n  }" { (return_statement "return (int)pvVar1;" return (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) comment comment (expression_statement "iVar2 = (*(code *)PTR_memcpy_0003f4d0)(*in_a2,*(undefined4 *)dst,iVar2 << 3);" (assignment_expression "iVar2 = (*(code *)PTR_memcpy_0003f4d0)(*in_a2,*(undefined4 *)dst,iVar2 << 3)" identifier = (call_expression "(*(code *)PTR_memcpy_0003f4d0)(*in_a2,*(undefined4 *)dst,iVar2 << 3)" (parenthesized_expression "(*(code *)PTR_memcpy_0003f4d0)" ( (pointer_expression "*(code *)PTR_memcpy_0003f4d0" * (cast_expression "(code *)PTR_memcpy_0003f4d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*in_a2,*(undefined4 *)dst,iVar2 << 3)" ( (pointer_expression "*in_a2" * identifier) , (pointer_expression "*(undefined4 *)dst" * (cast_expression "(undefined4 *)dst" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , (binary_expression "iVar2 << 3" identifier << number_literal) )))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "void FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    \n                    \n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}\n\n" (function_definition "void FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    \n                    \n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}" primitive_type (function_declarator "FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)" identifier (parameter_list "(undefined4 *param_1,int *param_2,undefined4 *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    \n                    \n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }" if (parenthesized_expression "((int)param_3[2] < iVar2)" ( (binary_expression "(int)param_3[2] < iVar2" (cast_expression "(int)param_3[2]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_3[2]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }" { (expression_statement "(*(code *)PTR_free_0003f4d8)(*param_3);" (call_expression "(*(code *)PTR_free_0003f4d8)(*param_3)" (parenthesized_expression "(*(code *)PTR_free_0003f4d8)" ( (pointer_expression "*(code *)PTR_free_0003f4d8" * (cast_expression "(code *)PTR_free_0003f4d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_3)" ( (pointer_expression "*param_3" * identifier) ))) ;) (expression_statement "uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);" (assignment_expression "uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" identifier = (call_expression "FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" identifier (argument_list "(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" ( number_literal , (binary_expression "param_3 + 2" identifier + number_literal) , (binary_expression "*param_2 - param_3[2]" (pointer_expression "*param_2" * identifier) - (subscript_expression "param_3[2]" identifier [ number_literal ])) , number_literal , number_literal )))) ;) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*param_3 = uVar1;" (assignment_expression "*param_3 = uVar1" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = iVar2;" (assignment_expression "param_3[1] = iVar2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    param_3[1] = iVar2;\n  }" else (compound_statement "{\n    param_3[1] = iVar2;\n  }" { (expression_statement "param_3[1] = iVar2;" (assignment_expression "param_3[1] = iVar2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) }))) (if_statement "if (iVar2 == 0) {\n    return;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);" (call_expression "(*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3)" (parenthesized_expression "(*(code *)PTR_memcpy_0003f4d0)" ( (pointer_expression "*(code *)PTR_memcpy_0003f4d0" * (cast_expression "(code *)PTR_memcpy_0003f4d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_3,*param_1,iVar2 << 3)" ( (pointer_expression "*param_3" * identifier) , (pointer_expression "*param_1" * identifier) , (binary_expression "iVar2 << 3" identifier << number_literal) ))) ;) (return_statement "return;" return ;) })))
(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 (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < IDENT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (binary_expression IDENT + LIT) , (binary_expression (pointer_expression * IDENT) - (subscript_expression IDENT [ LIT ])) , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) , (pointer_expression * IDENT) , (binary_expression IDENT << LIT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    \n                    \n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0001eb9c(undefined4 *param_1,int *param_2,undefined4 *param_3)" (identifier "FUN_0001eb9c") (parameter_list "(undefined4 *param_1,int *param_2,undefined4 *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") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  iVar2 = *param_2;\n  if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }\n  if (iVar2 == 0) {\n    return;\n  }\n                    \n                    \n  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" (identifier "iVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if ((int)param_3[2] < iVar2) {\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }\n  else {\n    param_3[1] = iVar2;\n  }" (if "if") (parenthesized_expression "((int)param_3[2] < iVar2)" (( "(") (binary_expression "(int)param_3[2] < iVar2" (cast_expression "(int)param_3[2]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]"))) (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    (*(code *)PTR_free_0003f4d8)(*param_3);\n    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);\n    iVar2 = *param_2;\n    *param_3 = uVar1;\n    param_3[1] = iVar2;\n  }" ({ "{") (expression_statement "(*(code *)PTR_free_0003f4d8)(*param_3);" (call_expression "(*(code *)PTR_free_0003f4d8)(*param_3)" (parenthesized_expression "(*(code *)PTR_free_0003f4d8)" (( "(") (pointer_expression "*(code *)PTR_free_0003f4d8" (* "*") (cast_expression "(code *)PTR_free_0003f4d8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_0003f4d8"))) () ")")) (argument_list "(*param_3)" (( "(") (pointer_expression "*param_3" (* "*") (identifier "param_3")) () ")"))) (; ";")) (expression_statement "uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);" (assignment_expression "uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" (identifier "uVar1") (= "=") (call_expression "FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" (identifier "FUN_0001dc88") (argument_list "(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8)" (( "(") (number_literal "0") (, ",") (binary_expression "param_3 + 2" (identifier "param_3") (+ "+") (number_literal "2")) (, ",") (binary_expression "*param_2 - param_3[2]" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (- "-") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]"))) (, ",") (number_literal "0xffffffff") (, ",") (number_literal "8") () ")")))) (; ";")) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" (identifier "iVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "*param_3 = uVar1;" (assignment_expression "*param_3 = uVar1" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "param_3[1] = iVar2;" (assignment_expression "param_3[1] = iVar2" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (} "}")) (else_clause "else {\n    param_3[1] = iVar2;\n  }" (else "else") (compound_statement "{\n    param_3[1] = iVar2;\n  }" ({ "{") (expression_statement "param_3[1] = iVar2;" (assignment_expression "param_3[1] = iVar2" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (} "}")))) (if_statement "if (iVar2 == 0) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);" (call_expression "(*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3)" (parenthesized_expression "(*(code *)PTR_memcpy_0003f4d0)" (( "(") (pointer_expression "*(code *)PTR_memcpy_0003f4d0" (* "*") (cast_expression "(code *)PTR_memcpy_0003f4d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_0003f4d0"))) () ")")) (argument_list "(*param_3,*param_1,iVar2 << 3)" (( "(") (pointer_expression "*param_3" (* "*") (identifier "param_3")) (, ",") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (binary_expression "iVar2 << 3" (identifier "iVar2") (<< "<<") (number_literal "3")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* DWARF original prototype: void copy(position_set * src, position_set * dst, position_set * src)
    */

int function_1(type_1 *dst,type_1 *src)

{
  void *pvVar1;
  type_2 *var_3;
  int var_1;
  
  var_1 = *(int *)src;
  if ((int)var_3[2] < var_1) {
    (*(type_3 *)PTR_free_0003f4d8)(*var_3);
    pvVar1 = var_2((void *)0x0,var_3 + 2,*(int *)src - var_3[2],-1,8);
    var_1 = *(int *)src;
    *var_3 = pvVar1;
    var_3[1] = var_1;
  }
  else {
    var_3[1] = var_1;
    pvVar1 = (void *)0x0;
  }
  if (var_1 == 0) {
    return (int)pvVar1;
  }
                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  var_1 = (*(type_3 *)PTR_memcpy_0003f4d0)(*var_3,*(type_2 *)dst,var_1 << 3);
  return var_1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal))) (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)) (binary_expression left: (identifier) right: (number_literal))))) (return_statement))))

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

{
  undefined4 uVar1;
  int iVar2;
  
  iVar2 = *param_2;
  if ((int)param_3[2] < iVar2) {
    (*(code *)PTR_free_0003f4d8)(*param_3);
    uVar1 = FUN_0001dc88(0,param_3 + 2,*param_2 - param_3[2],0xffffffff,8);
    iVar2 = *param_2;
    *param_3 = uVar1;
    param_3[1] = iVar2;
  }
  else {
    param_3[1] = iVar2;
  }
  if (iVar2 == 0) {
    return;
  }
                    /* WARNING: Could not recover jumptable at 0x0001ec6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (*(code *)PTR_memcpy_0003f4d0)(*param_3,*param_1,iVar2 << 3);
  return;
}

