
int32 pstm_lshd(pstm_int *a,int b)

{
  int32 iVar1;
  pstm_digit *ppVar2;
  pstm_digit *ppVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  if (0 < b) {
    iVar5 = b + a->used;
    if ((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)) {
      return iVar1;
    }
    iVar4 = a->used;
    iVar5 = iVar4 + b;
    iVar6 = iVar5 + -1;
    a->used = iVar5;
    if (b <= iVar6) {
      ppVar2 = a->dp + iVar5 + 0x3fffffff;
      ppVar3 = a->dp + iVar4 + 0x3fffffff;
      do {
        iVar6 = iVar6 + -1;
        *ppVar2 = *ppVar3;
        ppVar2 = ppVar2 + -1;
        ppVar3 = ppVar3 + -1;
      } while (b + -1 != iVar6);
    }
    iVar5 = 0;
    ppVar2 = a->dp;
    do {
      iVar5 = iVar5 + 1;
      *ppVar2 = 0;
      ppVar2 = ppVar2 + 1;
    } while (b != iVar5);
  }
  return 0;
}



int pstm_lshd(int *param_1,int param_2)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  
  if (0 < param_2) {
    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {
      return iVar1;
    }
    iVar4 = *param_1;
    iVar1 = iVar4 + param_2;
    iVar5 = iVar1 + -1;
    *param_1 = iVar1;
    if (param_2 <= iVar5) {
      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);
      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);
      do {
        iVar5 = iVar5 + -1;
        *puVar2 = *puVar3;
        puVar2 = puVar2 + -1;
        puVar3 = puVar3 + -1;
      } while (param_2 + -1 != iVar5);
    }
    iVar1 = 0;
    puVar2 = (undefined4 *)param_1[3];
    do {
      iVar1 = iVar1 + 1;
      *puVar2 = 0;
      puVar2 = puVar2 + 1;
    } while (param_2 != iVar1);
  }
  return 0;
}


lui gp,0xe
addiu gp,gp,0x7ec4
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
blez a1,0x0005135c
_or v0,zero,zero
or s1,a1,zero
lw a1,0x0(a0)
addu a1,s1,a1
lw v0,0x4(a0)
slt v0,v0,a1
beq v0,zero,0x000512e8
_or s0,a0,zero
lw t9,-0x7b18(gp)
bal 0x000508e0
_nop
lw gp,0x10(sp)
bne v0,zero,0x00051360
_lw ra,0x24(sp)
lw a0,0x0(s0)
addu v0,a0,s1
addiu a2,v0,-0x1
slt v1,a2,s1
bne v1,zero,0x00051340
_sw v0,0x0(s0)
lw v1,0xc(s0)
lui a1,0x3fff
ori a1,a1,0xffff
addu v0,v0,a1
sll v0,v0,0x2
addu v0,v1,v0
addu a0,a0,a1
sll a0,a0,0x2
addu v1,v1,a0
addiu a0,s1,-0x1
addiu v1,v1,-0x4
addiu v0,v0,-0x4
lw a1,0x4(v1)
addiu a2,a2,-0x1
bne a0,a2,0x00051328
_sw a1,0x4(v0)
lw v1,0xc(s0)
or v0,zero,zero
addiu v1,v1,0x4
addiu v0,v0,0x1
bne s1,v0,0x00051348
_sw zero,-0x4(v1)
or v0,zero,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "int pstm_lshd(int *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}\n\n" (function_definition "int pstm_lshd(int *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}" primitive_type (function_declarator "pstm_lshd(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }" { (if_statement "if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }" if (parenthesized_expression "((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0))" ( (binary_expression "(param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)" (parenthesized_expression "(param_1[1] < param_2 + *param_1)" ( (binary_expression "param_1[1] < param_2 + *param_1" (subscript_expression "param_1[1]" identifier [ number_literal ]) < (binary_expression "param_2 + *param_1" identifier + (pointer_expression "*param_1" * identifier))) )) && (parenthesized_expression "(iVar1 = pstm_grow(), iVar1 != 0)" ( (comma_expression "iVar1 = pstm_grow(), iVar1 != 0" (assignment_expression "iVar1 = pstm_grow()" identifier = (call_expression "pstm_grow()" identifier (argument_list "()" ( )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar1 = iVar4 + param_2;" (assignment_expression "iVar1 = iVar4 + param_2" identifier = (binary_expression "iVar4 + param_2" identifier + identifier)) ;) (expression_statement "iVar5 = iVar1 + -1;" (assignment_expression "iVar5 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }" if (parenthesized_expression "(param_2 <= iVar5)" ( (binary_expression "param_2 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }" { (expression_statement "puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);" (assignment_expression "puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4)" identifier = (cast_expression "(undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[3] + (iVar1 + 0x3fffffff) * 4)" ( (binary_expression "param_1[3] + (iVar1 + 0x3fffffff) * 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) + (binary_expression "(iVar1 + 0x3fffffff) * 4" (parenthesized_expression "(iVar1 + 0x3fffffff)" ( (binary_expression "iVar1 + 0x3fffffff" identifier + number_literal) )) * number_literal)) )))) ;) (expression_statement "puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);" (assignment_expression "puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4)" identifier = (cast_expression "(undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[3] + (iVar4 + 0x3fffffff) * 4)" ( (binary_expression "param_1[3] + (iVar4 + 0x3fffffff) * 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) + (binary_expression "(iVar4 + 0x3fffffff) * 4" (parenthesized_expression "(iVar4 + 0x3fffffff)" ( (binary_expression "iVar4 + 0x3fffffff" identifier + number_literal) )) * number_literal)) )))) ;) (do_statement "do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);" do (compound_statement "{\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      }" { (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "*puVar2 = *puVar3;" (assignment_expression "*puVar2 = *puVar3" (pointer_expression "*puVar2" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "puVar2 = puVar2 + -1;" (assignment_expression "puVar2 = puVar2 + -1" identifier = (binary_expression "puVar2 + -1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar3 + -1;" (assignment_expression "puVar3 = puVar3 + -1" identifier = (binary_expression "puVar3 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 + -1 != iVar5)" ( (binary_expression "param_2 + -1 != iVar5" (binary_expression "param_2 + -1" identifier + number_literal) != identifier) )) ;) })) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)param_1[3];" (assignment_expression "puVar2 = (undefined4 *)param_1[3]" identifier = (cast_expression "(undefined4 *)param_1[3]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != iVar1)" ( (binary_expression "param_2 != iVar1" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int32 pstm_lshd(pstm_int *a,int b)\n\n{\n  int32 iVar1;\n  pstm_digit *ppVar2;\n  pstm_digit *ppVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  \n  if (0 < b) {\n    iVar5 = b + a->used;\n    if ((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = a->used;\n    iVar5 = iVar4 + b;\n    iVar6 = iVar5 + -1;\n    a->used = iVar5;\n    if (b <= iVar6) {\n      ppVar2 = a->dp + iVar5 + 0x3fffffff;\n      ppVar3 = a->dp + iVar4 + 0x3fffffff;\n      do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);\n    }\n    iVar5 = 0;\n    ppVar2 = a->dp;\n    do {\n      iVar5 = iVar5 + 1;\n      *ppVar2 = 0;\n      ppVar2 = ppVar2 + 1;\n    } while (b != iVar5);\n  }\n  return 0;\n}\n\n" (function_definition "int32 pstm_lshd(pstm_int *a,int b)\n\n{\n  int32 iVar1;\n  pstm_digit *ppVar2;\n  pstm_digit *ppVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  \n  if (0 < b) {\n    iVar5 = b + a->used;\n    if ((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = a->used;\n    iVar5 = iVar4 + b;\n    iVar6 = iVar5 + -1;\n    a->used = iVar5;\n    if (b <= iVar6) {\n      ppVar2 = a->dp + iVar5 + 0x3fffffff;\n      ppVar3 = a->dp + iVar4 + 0x3fffffff;\n      do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);\n    }\n    iVar5 = 0;\n    ppVar2 = a->dp;\n    do {\n      iVar5 = iVar5 + 1;\n      *ppVar2 = 0;\n      ppVar2 = ppVar2 + 1;\n    } while (b != iVar5);\n  }\n  return 0;\n}" type_identifier (function_declarator "pstm_lshd(pstm_int *a,int b)" identifier (parameter_list "(pstm_int *a,int b)" ( (parameter_declaration "pstm_int *a" type_identifier (pointer_declarator "*a" * identifier)) , (parameter_declaration "int b" primitive_type identifier) ))) (compound_statement "{\n  int32 iVar1;\n  pstm_digit *ppVar2;\n  pstm_digit *ppVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  \n  if (0 < b) {\n    iVar5 = b + a->used;\n    if ((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = a->used;\n    iVar5 = iVar4 + b;\n    iVar6 = iVar5 + -1;\n    a->used = iVar5;\n    if (b <= iVar6) {\n      ppVar2 = a->dp + iVar5 + 0x3fffffff;\n      ppVar3 = a->dp + iVar4 + 0x3fffffff;\n      do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);\n    }\n    iVar5 = 0;\n    ppVar2 = a->dp;\n    do {\n      iVar5 = iVar5 + 1;\n      *ppVar2 = 0;\n      ppVar2 = ppVar2 + 1;\n    } while (b != iVar5);\n  }\n  return 0;\n}" { (declaration "int32 iVar1;" type_identifier identifier ;) (declaration "pstm_digit *ppVar2;" type_identifier (pointer_declarator "*ppVar2" * identifier) ;) (declaration "pstm_digit *ppVar3;" type_identifier (pointer_declarator "*ppVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (if_statement "if (0 < b) {\n    iVar5 = b + a->used;\n    if ((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = a->used;\n    iVar5 = iVar4 + b;\n    iVar6 = iVar5 + -1;\n    a->used = iVar5;\n    if (b <= iVar6) {\n      ppVar2 = a->dp + iVar5 + 0x3fffffff;\n      ppVar3 = a->dp + iVar4 + 0x3fffffff;\n      do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);\n    }\n    iVar5 = 0;\n    ppVar2 = a->dp;\n    do {\n      iVar5 = iVar5 + 1;\n      *ppVar2 = 0;\n      ppVar2 = ppVar2 + 1;\n    } while (b != iVar5);\n  }" if (parenthesized_expression "(0 < b)" ( (binary_expression "0 < b" number_literal < identifier) )) (compound_statement "{\n    iVar5 = b + a->used;\n    if ((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = a->used;\n    iVar5 = iVar4 + b;\n    iVar6 = iVar5 + -1;\n    a->used = iVar5;\n    if (b <= iVar6) {\n      ppVar2 = a->dp + iVar5 + 0x3fffffff;\n      ppVar3 = a->dp + iVar4 + 0x3fffffff;\n      do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);\n    }\n    iVar5 = 0;\n    ppVar2 = a->dp;\n    do {\n      iVar5 = iVar5 + 1;\n      *ppVar2 = 0;\n      ppVar2 = ppVar2 + 1;\n    } while (b != iVar5);\n  }" { (expression_statement "iVar5 = b + a->used;" (assignment_expression "iVar5 = b + a->used" identifier = (binary_expression "b + a->used" identifier + (field_expression "a->used" identifier -> field_identifier))) ;) (if_statement "if ((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)) {\n      return iVar1;\n    }" if (parenthesized_expression "((a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0))" ( (binary_expression "(a->alloc < iVar5) && (iVar1 = pstm_grow(a,iVar5), iVar1 != 0)" (parenthesized_expression "(a->alloc < iVar5)" ( (binary_expression "a->alloc < iVar5" (field_expression "a->alloc" identifier -> field_identifier) < identifier) )) && (parenthesized_expression "(iVar1 = pstm_grow(a,iVar5), iVar1 != 0)" ( (comma_expression "iVar1 = pstm_grow(a,iVar5), iVar1 != 0" (assignment_expression "iVar1 = pstm_grow(a,iVar5)" identifier = (call_expression "pstm_grow(a,iVar5)" identifier (argument_list "(a,iVar5)" ( identifier , identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar4 = a->used;" (assignment_expression "iVar4 = a->used" identifier = (field_expression "a->used" identifier -> field_identifier)) ;) (expression_statement "iVar5 = iVar4 + b;" (assignment_expression "iVar5 = iVar4 + b" identifier = (binary_expression "iVar4 + b" identifier + identifier)) ;) (expression_statement "iVar6 = iVar5 + -1;" (assignment_expression "iVar6 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "a->used = iVar5;" (assignment_expression "a->used = iVar5" (field_expression "a->used" identifier -> field_identifier) = identifier) ;) (if_statement "if (b <= iVar6) {\n      ppVar2 = a->dp + iVar5 + 0x3fffffff;\n      ppVar3 = a->dp + iVar4 + 0x3fffffff;\n      do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);\n    }" if (parenthesized_expression "(b <= iVar6)" ( (binary_expression "b <= iVar6" identifier <= identifier) )) (compound_statement "{\n      ppVar2 = a->dp + iVar5 + 0x3fffffff;\n      ppVar3 = a->dp + iVar4 + 0x3fffffff;\n      do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);\n    }" { (expression_statement "ppVar2 = a->dp + iVar5 + 0x3fffffff;" (assignment_expression "ppVar2 = a->dp + iVar5 + 0x3fffffff" identifier = (binary_expression "a->dp + iVar5 + 0x3fffffff" (binary_expression "a->dp + iVar5" (field_expression "a->dp" identifier -> field_identifier) + identifier) + number_literal)) ;) (expression_statement "ppVar3 = a->dp + iVar4 + 0x3fffffff;" (assignment_expression "ppVar3 = a->dp + iVar4 + 0x3fffffff" identifier = (binary_expression "a->dp + iVar4 + 0x3fffffff" (binary_expression "a->dp + iVar4" (field_expression "a->dp" identifier -> field_identifier) + identifier) + number_literal)) ;) (do_statement "do {\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      } while (b + -1 != iVar6);" do (compound_statement "{\n        iVar6 = iVar6 + -1;\n        *ppVar2 = *ppVar3;\n        ppVar2 = ppVar2 + -1;\n        ppVar3 = ppVar3 + -1;\n      }" { (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "*ppVar2 = *ppVar3;" (assignment_expression "*ppVar2 = *ppVar3" (pointer_expression "*ppVar2" * identifier) = (pointer_expression "*ppVar3" * identifier)) ;) (expression_statement "ppVar2 = ppVar2 + -1;" (assignment_expression "ppVar2 = ppVar2 + -1" identifier = (binary_expression "ppVar2 + -1" identifier + number_literal)) ;) (expression_statement "ppVar3 = ppVar3 + -1;" (assignment_expression "ppVar3 = ppVar3 + -1" identifier = (binary_expression "ppVar3 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(b + -1 != iVar6)" ( (binary_expression "b + -1 != iVar6" (binary_expression "b + -1" identifier + number_literal) != identifier) )) ;) })) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "ppVar2 = a->dp;" (assignment_expression "ppVar2 = a->dp" identifier = (field_expression "a->dp" identifier -> field_identifier)) ;) (do_statement "do {\n      iVar5 = iVar5 + 1;\n      *ppVar2 = 0;\n      ppVar2 = ppVar2 + 1;\n    } while (b != iVar5);" do (compound_statement "{\n      iVar5 = iVar5 + 1;\n      *ppVar2 = 0;\n      ppVar2 = ppVar2 + 1;\n    }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "*ppVar2 = 0;" (assignment_expression "*ppVar2 = 0" (pointer_expression "*ppVar2" * identifier) = number_literal) ;) (expression_statement "ppVar2 = ppVar2 + 1;" (assignment_expression "ppVar2 = ppVar2 + 1" identifier = (binary_expression "ppVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(b != iVar5)" ( (binary_expression "b != iVar5" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int pstm_lshd(int *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}\n\n" (function_definition "int pstm_lshd(int *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}" primitive_type (function_declarator "pstm_lshd(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }" { (if_statement "if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }" if (parenthesized_expression "((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0))" ( (binary_expression "(param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)" (parenthesized_expression "(param_1[1] < param_2 + *param_1)" ( (binary_expression "param_1[1] < param_2 + *param_1" (subscript_expression "param_1[1]" identifier [ number_literal ]) < (binary_expression "param_2 + *param_1" identifier + (pointer_expression "*param_1" * identifier))) )) && (parenthesized_expression "(iVar1 = pstm_grow(), iVar1 != 0)" ( (comma_expression "iVar1 = pstm_grow(), iVar1 != 0" (assignment_expression "iVar1 = pstm_grow()" identifier = (call_expression "pstm_grow()" identifier (argument_list "()" ( )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar1 = iVar4 + param_2;" (assignment_expression "iVar1 = iVar4 + param_2" identifier = (binary_expression "iVar4 + param_2" identifier + identifier)) ;) (expression_statement "iVar5 = iVar1 + -1;" (assignment_expression "iVar5 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }" if (parenthesized_expression "(param_2 <= iVar5)" ( (binary_expression "param_2 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }" { (expression_statement "puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);" (assignment_expression "puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4)" identifier = (cast_expression "(undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[3] + (iVar1 + 0x3fffffff) * 4)" ( (binary_expression "param_1[3] + (iVar1 + 0x3fffffff) * 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) + (binary_expression "(iVar1 + 0x3fffffff) * 4" (parenthesized_expression "(iVar1 + 0x3fffffff)" ( (binary_expression "iVar1 + 0x3fffffff" identifier + number_literal) )) * number_literal)) )))) ;) (expression_statement "puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);" (assignment_expression "puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4)" identifier = (cast_expression "(undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[3] + (iVar4 + 0x3fffffff) * 4)" ( (binary_expression "param_1[3] + (iVar4 + 0x3fffffff) * 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) + (binary_expression "(iVar4 + 0x3fffffff) * 4" (parenthesized_expression "(iVar4 + 0x3fffffff)" ( (binary_expression "iVar4 + 0x3fffffff" identifier + number_literal) )) * number_literal)) )))) ;) (do_statement "do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);" do (compound_statement "{\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      }" { (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "*puVar2 = *puVar3;" (assignment_expression "*puVar2 = *puVar3" (pointer_expression "*puVar2" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "puVar2 = puVar2 + -1;" (assignment_expression "puVar2 = puVar2 + -1" identifier = (binary_expression "puVar2 + -1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar3 + -1;" (assignment_expression "puVar3 = puVar3 + -1" identifier = (binary_expression "puVar3 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 + -1 != iVar5)" ( (binary_expression "param_2 + -1 != iVar5" (binary_expression "param_2 + -1" identifier + number_literal) != identifier) )) ;) })) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)param_1[3];" (assignment_expression "puVar2 = (undefined4 *)param_1[3]" identifier = (cast_expression "(undefined4 *)param_1[3]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != iVar1)" ( (binary_expression "param_2 != iVar1" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (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 IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < (binary_expression IDENT + (pointer_expression * IDENT))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT)) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) != IDENT) )) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (return_statement return LIT ;) })))
(function_definition "int pstm_lshd(int *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}" (primitive_type "int") (function_declarator "pstm_lshd(int *param_1,int param_2)" (identifier "pstm_lshd") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (if_statement "if (0 < param_2) {\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }" (if "if") (parenthesized_expression "(0 < param_2)" (( "(") (binary_expression "0 < param_2" (number_literal "0") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }\n    iVar4 = *param_1;\n    iVar1 = iVar4 + param_2;\n    iVar5 = iVar1 + -1;\n    *param_1 = iVar1;\n    if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }\n    iVar1 = 0;\n    puVar2 = (undefined4 *)param_1[3];\n    do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);\n  }" ({ "{") (if_statement "if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {\n      return iVar1;\n    }" (if "if") (parenthesized_expression "((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0))" (( "(") (binary_expression "(param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)" (parenthesized_expression "(param_1[1] < param_2 + *param_1)" (( "(") (binary_expression "param_1[1] < param_2 + *param_1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (< "<") (binary_expression "param_2 + *param_1" (identifier "param_2") (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = pstm_grow(), iVar1 != 0)" (( "(") (comma_expression "iVar1 = pstm_grow(), iVar1 != 0" (assignment_expression "iVar1 = pstm_grow()" (identifier "iVar1") (= "=") (call_expression "pstm_grow()" (identifier "pstm_grow") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      return iVar1;\n    }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" (identifier "iVar4") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "iVar1 = iVar4 + param_2;" (assignment_expression "iVar1 = iVar4 + param_2" (identifier "iVar1") (= "=") (binary_expression "iVar4 + param_2" (identifier "iVar4") (+ "+") (identifier "param_2"))) (; ";")) (expression_statement "iVar5 = iVar1 + -1;" (assignment_expression "iVar5 = iVar1 + -1" (identifier "iVar5") (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (param_2 <= iVar5) {\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }" (if "if") (parenthesized_expression "(param_2 <= iVar5)" (( "(") (binary_expression "param_2 <= iVar5" (identifier "param_2") (<= "<=") (identifier "iVar5")) () ")")) (compound_statement "{\n      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);\n      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);\n      do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);\n    }" ({ "{") (expression_statement "puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);" (assignment_expression "puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[3] + (iVar1 + 0x3fffffff) * 4)" (( "(") (binary_expression "param_1[3] + (iVar1 + 0x3fffffff) * 4" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (+ "+") (binary_expression "(iVar1 + 0x3fffffff) * 4" (parenthesized_expression "(iVar1 + 0x3fffffff)" (( "(") (binary_expression "iVar1 + 0x3fffffff" (identifier "iVar1") (+ "+") (number_literal "0x3fffffff")) () ")")) (* "*") (number_literal "4"))) () ")")))) (; ";")) (expression_statement "puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);" (assignment_expression "puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[3] + (iVar4 + 0x3fffffff) * 4)" (( "(") (binary_expression "param_1[3] + (iVar4 + 0x3fffffff) * 4" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (+ "+") (binary_expression "(iVar4 + 0x3fffffff) * 4" (parenthesized_expression "(iVar4 + 0x3fffffff)" (( "(") (binary_expression "iVar4 + 0x3fffffff" (identifier "iVar4") (+ "+") (number_literal "0x3fffffff")) () ")")) (* "*") (number_literal "4"))) () ")")))) (; ";")) (do_statement "do {\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      } while (param_2 + -1 != iVar5);" (do "do") (compound_statement "{\n        iVar5 = iVar5 + -1;\n        *puVar2 = *puVar3;\n        puVar2 = puVar2 + -1;\n        puVar3 = puVar3 + -1;\n      }" ({ "{") (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + -1" (identifier "iVar5") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*puVar2 = *puVar3;" (assignment_expression "*puVar2 = *puVar3" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (expression_statement "puVar2 = puVar2 + -1;" (assignment_expression "puVar2 = puVar2 + -1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + -1" (identifier "puVar2") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "puVar3 = puVar3 + -1;" (assignment_expression "puVar3 = puVar3 + -1" (identifier "puVar3") (= "=") (binary_expression "puVar3 + -1" (identifier "puVar3") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 + -1 != iVar5)" (( "(") (binary_expression "param_2 + -1 != iVar5" (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1")) (!= "!=") (identifier "iVar5")) () ")")) (; ";")) (} "}"))) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2 = (undefined4 *)param_1[3];" (assignment_expression "puVar2 = (undefined4 *)param_1[3]" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)param_1[3]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")))) (; ";")) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    } while (param_2 != iVar1);" (do "do") (compound_statement "{\n      iVar1 = iVar1 + 1;\n      *puVar2 = 0;\n      puVar2 = puVar2 + 1;\n    }" ({ "{") (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != iVar1)" (( "(") (binary_expression "param_2 != iVar1" (identifier "param_2") (!= "!=") (identifier "iVar1")) () ")")) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))
(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: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))) (do_statement body: (compound_statement (expression_statement (assignment_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)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (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 (number_literal)))))

int MASKED(int *param_1,int param_2)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  
  if (0 < param_2) {
    if ((param_1[1] < param_2 + *param_1) && (iVar1 = pstm_grow(), iVar1 != 0)) {
      return iVar1;
    }
    iVar4 = *param_1;
    iVar1 = iVar4 + param_2;
    iVar5 = iVar1 + -1;
    *param_1 = iVar1;
    if (param_2 <= iVar5) {
      puVar2 = (undefined4 *)(param_1[3] + (iVar1 + 0x3fffffff) * 4);
      puVar3 = (undefined4 *)(param_1[3] + (iVar4 + 0x3fffffff) * 4);
      do {
        iVar5 = iVar5 + -1;
        *puVar2 = *puVar3;
        puVar2 = puVar2 + -1;
        puVar3 = puVar3 + -1;
      } while (param_2 + -1 != iVar5);
    }
    iVar1 = 0;
    puVar2 = (undefined4 *)param_1[3];
    do {
      iVar1 = iVar1 + 1;
      *puVar2 = 0;
      puVar2 = puVar2 + 1;
    } while (param_2 != iVar1);
  }
  return 0;
}

