
void string_need(string *s,int n)

{
  char *pcVar1;
  size_t size;
  int iVar2;
  
  pcVar1 = s->b;
  if (pcVar1 == (char *)0x0) {
    if (n < 0x20) {
      n = 0x20;
    }
    pcVar1 = (char *)xmalloc((long)n);
    s->b = pcVar1;
    s->p = pcVar1;
    s->e = pcVar1 + n;
    return;
  }
  if ((long)s->e - (long)s->p < (long)n) {
    iVar2 = (int)s->p - (int)pcVar1;
    if (0x3fffffff - iVar2 < n) {
                    /* WARNING: Subroutine does not return */
      xmalloc_failed(0x7fffffff);
    }
    size = (size_t)((n + iVar2) * 2);
    pcVar1 = (char *)xrealloc(pcVar1,size);
    s->b = pcVar1;
    s->p = pcVar1 + iVar2;
    s->e = pcVar1 + size;
  }
  return;
}



void FUN_002c2d40(long *param_1,int param_2)

{
  long lVar1;
  long lVar2;
  int iVar3;
  
  lVar1 = *param_1;
  if (lVar1 == 0) {
    if (param_2 < 0x20) {
      param_2 = 0x20;
    }
    lVar1 = FUN_002d9060((long)param_2);
    *param_1 = lVar1;
    param_1[1] = lVar1;
    param_1[2] = lVar1 + param_2;
    return;
  }
  if (param_1[2] - param_1[1] < (long)param_2) {
    iVar3 = (int)param_1[1] - (int)lVar1;
    if (0x3fffffff - iVar3 < param_2) {
                    /* WARNING: Subroutine does not return */
      FUN_002d8fe0(0x7fffffff);
    }
    lVar2 = (long)((param_2 + iVar3) * 2);
    lVar1 = FUN_002d90e0(lVar1,lVar2);
    *param_1 = lVar1;
    param_1[1] = iVar3 + lVar1;
    param_1[2] = lVar1 + lVar2;
  }
  return;
}


PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x002c2da0
MOV RAX,qword ptr [RBP + 0x8]
MOV RDX,qword ptr [RBP + 0x10]
MOVSXD RCX,ESI
SUB RDX,RAX
CMP RDX,RCX
JGE 0x002c2d9a
SUB RAX,RDI
MOV R12,RAX
MOV EAX,0x3fffffff
SUB EAX,R12D
CMP EAX,ESI
JL 0x002c2dca
LEA EBX,[RSI + R12*0x1]
MOVSXD R12,R12D
ADD EBX,EBX
MOVSXD RBX,EBX
MOV RSI,RBX
CALL 0x002d90e0
ADD R12,RAX
MOV qword ptr [RBP],RAX
ADD RAX,RBX
MOV qword ptr [RBP + 0x8],R12
MOV qword ptr [RBP + 0x10],RAX
POP RBX
POP RBP
POP R12
RET
CMP ESI,0x20
MOV EBX,0x20
CMOVL ESI,EBX
MOVSXD RBX,ESI
MOV RDI,RBX
CALL 0x002d9060
MOV qword ptr [RBP],RAX
MOV qword ptr [RBP + 0x8],RAX
ADD RAX,RBX
POP RBX
MOV qword ptr [RBP + 0x10],RAX
POP RBP
POP R12
RET
MOV EDI,0x7fffffff
CALL 0x002d8fe0
(translation_unit "void FUN_002c2d40(long *param_1,int param_2)\n\n{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_002c2d40(long *param_1,int param_2)\n\n{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_002c2d40(long *param_1,int param_2)" identifier (parameter_list "(long *param_1,int param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }" { (if_statement "if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }" if (parenthesized_expression "(param_2 < 0x20)" ( (binary_expression "param_2 < 0x20" identifier < number_literal) )) (compound_statement "{\n      param_2 = 0x20;\n    }" { (expression_statement "param_2 = 0x20;" (assignment_expression "param_2 = 0x20" identifier = number_literal) ;) })) (expression_statement "lVar1 = FUN_002d9060((long)param_2);" (assignment_expression "lVar1 = FUN_002d9060((long)param_2)" identifier = (call_expression "FUN_002d9060((long)param_2)" identifier (argument_list "((long)param_2)" ( (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*param_1 = lVar1;" (assignment_expression "*param_1 = lVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = lVar1;" (assignment_expression "param_1[1] = lVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = lVar1 + param_2;" (assignment_expression "param_1[2] = lVar1 + param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "lVar1 + param_2" identifier + identifier)) ;) (return_statement "return;" return ;) })) (if_statement "if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }" if (parenthesized_expression "(param_1[2] - param_1[1] < (long)param_2)" ( (binary_expression "param_1[2] - param_1[1] < (long)param_2" (binary_expression "param_1[2] - param_1[1]" (subscript_expression "param_1[2]" identifier [ number_literal ]) - (subscript_expression "param_1[1]" identifier [ number_literal ])) < (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) (compound_statement "{\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }" { (expression_statement "iVar3 = (int)param_1[1] - (int)lVar1;" (assignment_expression "iVar3 = (int)param_1[1] - (int)lVar1" identifier = (binary_expression "(int)param_1[1] - (int)lVar1" (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) - (cast_expression "(int)lVar1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (0x3fffffff - iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002d8fe0(0x7fffffff);\n    }" if (parenthesized_expression "(0x3fffffff - iVar3 < param_2)" ( (binary_expression "0x3fffffff - iVar3 < param_2" (binary_expression "0x3fffffff - iVar3" number_literal - identifier) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_002d8fe0(0x7fffffff);\n    }" { comment (expression_statement "FUN_002d8fe0(0x7fffffff);" (call_expression "FUN_002d8fe0(0x7fffffff)" identifier (argument_list "(0x7fffffff)" ( number_literal ))) ;) })) (expression_statement "lVar2 = (long)((param_2 + iVar3) * 2);" (assignment_expression "lVar2 = (long)((param_2 + iVar3) * 2)" identifier = (cast_expression "(long)((param_2 + iVar3) * 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "((param_2 + iVar3) * 2)" ( (binary_expression "(param_2 + iVar3) * 2" (parenthesized_expression "(param_2 + iVar3)" ( (binary_expression "param_2 + iVar3" identifier + identifier) )) * number_literal) )))) ;) (expression_statement "lVar1 = FUN_002d90e0(lVar1,lVar2);" (assignment_expression "lVar1 = FUN_002d90e0(lVar1,lVar2)" identifier = (call_expression "FUN_002d90e0(lVar1,lVar2)" identifier (argument_list "(lVar1,lVar2)" ( identifier , identifier )))) ;) (expression_statement "*param_1 = lVar1;" (assignment_expression "*param_1 = lVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = iVar3 + lVar1;" (assignment_expression "param_1[1] = iVar3 + lVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar3 + lVar1" identifier + identifier)) ;) (expression_statement "param_1[2] = lVar1 + lVar2;" (assignment_expression "param_1[2] = lVar1 + lVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "lVar1 + lVar2" identifier + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void string_need(string *s,int n)\n\n{\n  char *pcVar1;\n  size_t size;\n  int iVar2;\n  \n  pcVar1 = s->b;\n  if (pcVar1 == (char *)0x0) {\n    if (n < 0x20) {\n      n = 0x20;\n    }\n    pcVar1 = (char *)xmalloc((long)n);\n    s->b = pcVar1;\n    s->p = pcVar1;\n    s->e = pcVar1 + n;\n    return;\n  }\n  if ((long)s->e - (long)s->p < (long)n) {\n    iVar2 = (int)s->p - (int)pcVar1;\n    if (0x3fffffff - iVar2 < n) {\n                    /* WARNING: Subroutine does not return */\n      xmalloc_failed(0x7fffffff);\n    }\n    size = (size_t)((n + iVar2) * 2);\n    pcVar1 = (char *)xrealloc(pcVar1,size);\n    s->b = pcVar1;\n    s->p = pcVar1 + iVar2;\n    s->e = pcVar1 + size;\n  }\n  return;\n}\n\n" (function_definition "void string_need(string *s,int n)\n\n{\n  char *pcVar1;\n  size_t size;\n  int iVar2;\n  \n  pcVar1 = s->b;\n  if (pcVar1 == (char *)0x0) {\n    if (n < 0x20) {\n      n = 0x20;\n    }\n    pcVar1 = (char *)xmalloc((long)n);\n    s->b = pcVar1;\n    s->p = pcVar1;\n    s->e = pcVar1 + n;\n    return;\n  }\n  if ((long)s->e - (long)s->p < (long)n) {\n    iVar2 = (int)s->p - (int)pcVar1;\n    if (0x3fffffff - iVar2 < n) {\n                    /* WARNING: Subroutine does not return */\n      xmalloc_failed(0x7fffffff);\n    }\n    size = (size_t)((n + iVar2) * 2);\n    pcVar1 = (char *)xrealloc(pcVar1,size);\n    s->b = pcVar1;\n    s->p = pcVar1 + iVar2;\n    s->e = pcVar1 + size;\n  }\n  return;\n}" primitive_type (function_declarator "string_need(string *s,int n)" identifier (parameter_list "(string *s,int n)" ( (parameter_declaration "string *s" type_identifier (pointer_declarator "*s" * identifier)) , (parameter_declaration "int n" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  size_t size;\n  int iVar2;\n  \n  pcVar1 = s->b;\n  if (pcVar1 == (char *)0x0) {\n    if (n < 0x20) {\n      n = 0x20;\n    }\n    pcVar1 = (char *)xmalloc((long)n);\n    s->b = pcVar1;\n    s->p = pcVar1;\n    s->e = pcVar1 + n;\n    return;\n  }\n  if ((long)s->e - (long)s->p < (long)n) {\n    iVar2 = (int)s->p - (int)pcVar1;\n    if (0x3fffffff - iVar2 < n) {\n                    /* WARNING: Subroutine does not return */\n      xmalloc_failed(0x7fffffff);\n    }\n    size = (size_t)((n + iVar2) * 2);\n    pcVar1 = (char *)xrealloc(pcVar1,size);\n    s->b = pcVar1;\n    s->p = pcVar1 + iVar2;\n    s->e = pcVar1 + size;\n  }\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t size;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = s->b;" (assignment_expression "pcVar1 = s->b" identifier = (field_expression "s->b" identifier -> field_identifier)) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n    if (n < 0x20) {\n      n = 0x20;\n    }\n    pcVar1 = (char *)xmalloc((long)n);\n    s->b = pcVar1;\n    s->p = pcVar1;\n    s->e = pcVar1 + n;\n    return;\n  }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (n < 0x20) {\n      n = 0x20;\n    }\n    pcVar1 = (char *)xmalloc((long)n);\n    s->b = pcVar1;\n    s->p = pcVar1;\n    s->e = pcVar1 + n;\n    return;\n  }" { (if_statement "if (n < 0x20) {\n      n = 0x20;\n    }" if (parenthesized_expression "(n < 0x20)" ( (binary_expression "n < 0x20" identifier < number_literal) )) (compound_statement "{\n      n = 0x20;\n    }" { (expression_statement "n = 0x20;" (assignment_expression "n = 0x20" identifier = number_literal) ;) })) (expression_statement "pcVar1 = (char *)xmalloc((long)n);" (assignment_expression "pcVar1 = (char *)xmalloc((long)n)" identifier = (cast_expression "(char *)xmalloc((long)n)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc((long)n)" identifier (argument_list "((long)n)" ( (cast_expression "(long)n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))))) ;) (expression_statement "s->b = pcVar1;" (assignment_expression "s->b = pcVar1" (field_expression "s->b" identifier -> field_identifier) = identifier) ;) (expression_statement "s->p = pcVar1;" (assignment_expression "s->p = pcVar1" (field_expression "s->p" identifier -> field_identifier) = identifier) ;) (expression_statement "s->e = pcVar1 + n;" (assignment_expression "s->e = pcVar1 + n" (field_expression "s->e" identifier -> field_identifier) = (binary_expression "pcVar1 + n" identifier + identifier)) ;) (return_statement "return;" return ;) })) (if_statement "if ((long)s->e - (long)s->p < (long)n) {\n    iVar2 = (int)s->p - (int)pcVar1;\n    if (0x3fffffff - iVar2 < n) {\n                    /* WARNING: Subroutine does not return */\n      xmalloc_failed(0x7fffffff);\n    }\n    size = (size_t)((n + iVar2) * 2);\n    pcVar1 = (char *)xrealloc(pcVar1,size);\n    s->b = pcVar1;\n    s->p = pcVar1 + iVar2;\n    s->e = pcVar1 + size;\n  }" if (parenthesized_expression "((long)s->e - (long)s->p < (long)n)" ( (binary_expression "(long)s->e - (long)s->p < (long)n" (binary_expression "(long)s->e - (long)s->p" (cast_expression "(long)s->e" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "s->e" identifier -> field_identifier)) - (cast_expression "(long)s->p" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "s->p" identifier -> field_identifier))) < (cast_expression "(long)n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) (compound_statement "{\n    iVar2 = (int)s->p - (int)pcVar1;\n    if (0x3fffffff - iVar2 < n) {\n                    /* WARNING: Subroutine does not return */\n      xmalloc_failed(0x7fffffff);\n    }\n    size = (size_t)((n + iVar2) * 2);\n    pcVar1 = (char *)xrealloc(pcVar1,size);\n    s->b = pcVar1;\n    s->p = pcVar1 + iVar2;\n    s->e = pcVar1 + size;\n  }" { (expression_statement "iVar2 = (int)s->p - (int)pcVar1;" (assignment_expression "iVar2 = (int)s->p - (int)pcVar1" identifier = (binary_expression "(int)s->p - (int)pcVar1" (cast_expression "(int)s->p" ( (type_descriptor "int" primitive_type) ) (field_expression "s->p" identifier -> field_identifier)) - (cast_expression "(int)pcVar1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (0x3fffffff - iVar2 < n) {\n                    /* WARNING: Subroutine does not return */\n      xmalloc_failed(0x7fffffff);\n    }" if (parenthesized_expression "(0x3fffffff - iVar2 < n)" ( (binary_expression "0x3fffffff - iVar2 < n" (binary_expression "0x3fffffff - iVar2" number_literal - identifier) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      xmalloc_failed(0x7fffffff);\n    }" { comment (expression_statement "xmalloc_failed(0x7fffffff);" (call_expression "xmalloc_failed(0x7fffffff)" identifier (argument_list "(0x7fffffff)" ( number_literal ))) ;) })) (expression_statement "size = (size_t)((n + iVar2) * 2);" (assignment_expression "size = (size_t)((n + iVar2) * 2)" identifier = (cast_expression "(size_t)((n + iVar2) * 2)" ( (type_descriptor "size_t" primitive_type) ) (parenthesized_expression "((n + iVar2) * 2)" ( (binary_expression "(n + iVar2) * 2" (parenthesized_expression "(n + iVar2)" ( (binary_expression "n + iVar2" identifier + identifier) )) * number_literal) )))) ;) (expression_statement "pcVar1 = (char *)xrealloc(pcVar1,size);" (assignment_expression "pcVar1 = (char *)xrealloc(pcVar1,size)" identifier = (cast_expression "(char *)xrealloc(pcVar1,size)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc(pcVar1,size)" identifier (argument_list "(pcVar1,size)" ( identifier , identifier ))))) ;) (expression_statement "s->b = pcVar1;" (assignment_expression "s->b = pcVar1" (field_expression "s->b" identifier -> field_identifier) = identifier) ;) (expression_statement "s->p = pcVar1 + iVar2;" (assignment_expression "s->p = pcVar1 + iVar2" (field_expression "s->p" identifier -> field_identifier) = (binary_expression "pcVar1 + iVar2" identifier + identifier)) ;) (expression_statement "s->e = pcVar1 + size;" (assignment_expression "s->e = pcVar1 + size" (field_expression "s->e" identifier -> field_identifier) = (binary_expression "pcVar1 + size" identifier + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_002c2d40(long *param_1,int param_2)\n\n{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_002c2d40(long *param_1,int param_2)\n\n{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_002c2d40(long *param_1,int param_2)" identifier (parameter_list "(long *param_1,int param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }" { (if_statement "if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }" if (parenthesized_expression "(param_2 < 0x20)" ( (binary_expression "param_2 < 0x20" identifier < number_literal) )) (compound_statement "{\n      param_2 = 0x20;\n    }" { (expression_statement "param_2 = 0x20;" (assignment_expression "param_2 = 0x20" identifier = number_literal) ;) })) (expression_statement "lVar1 = FUN_002d9060((long)param_2);" (assignment_expression "lVar1 = FUN_002d9060((long)param_2)" identifier = (call_expression "FUN_002d9060((long)param_2)" identifier (argument_list "((long)param_2)" ( (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*param_1 = lVar1;" (assignment_expression "*param_1 = lVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = lVar1;" (assignment_expression "param_1[1] = lVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = lVar1 + param_2;" (assignment_expression "param_1[2] = lVar1 + param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "lVar1 + param_2" identifier + identifier)) ;) (return_statement "return;" return ;) })) (if_statement "if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }" if (parenthesized_expression "(param_1[2] - param_1[1] < (long)param_2)" ( (binary_expression "param_1[2] - param_1[1] < (long)param_2" (binary_expression "param_1[2] - param_1[1]" (subscript_expression "param_1[2]" identifier [ number_literal ]) - (subscript_expression "param_1[1]" identifier [ number_literal ])) < (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) (compound_statement "{\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }" { (expression_statement "iVar3 = (int)param_1[1] - (int)lVar1;" (assignment_expression "iVar3 = (int)param_1[1] - (int)lVar1" identifier = (binary_expression "(int)param_1[1] - (int)lVar1" (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) - (cast_expression "(int)lVar1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }" if (parenthesized_expression "(0x3fffffff - iVar3 < param_2)" ( (binary_expression "0x3fffffff - iVar3 < param_2" (binary_expression "0x3fffffff - iVar3" number_literal - identifier) < identifier) )) (compound_statement "{\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }" { (expression_statement "FUN_002d8fe0(0x7fffffff);" (call_expression "FUN_002d8fe0(0x7fffffff)" identifier (argument_list "(0x7fffffff)" ( number_literal ))) ;) })) (expression_statement "lVar2 = (long)((param_2 + iVar3) * 2);" (assignment_expression "lVar2 = (long)((param_2 + iVar3) * 2)" identifier = (cast_expression "(long)((param_2 + iVar3) * 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "((param_2 + iVar3) * 2)" ( (binary_expression "(param_2 + iVar3) * 2" (parenthesized_expression "(param_2 + iVar3)" ( (binary_expression "param_2 + iVar3" identifier + identifier) )) * number_literal) )))) ;) (expression_statement "lVar1 = FUN_002d90e0(lVar1,lVar2);" (assignment_expression "lVar1 = FUN_002d90e0(lVar1,lVar2)" identifier = (call_expression "FUN_002d90e0(lVar1,lVar2)" identifier (argument_list "(lVar1,lVar2)" ( identifier , identifier )))) ;) (expression_statement "*param_1 = lVar1;" (assignment_expression "*param_1 = lVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = iVar3 + lVar1;" (assignment_expression "param_1[1] = iVar3 + lVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar3 + lVar1" identifier + identifier)) ;) (expression_statement "param_1[2] = lVar1 + lVar2;" (assignment_expression "param_1[2] = lVar1 + lVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "lVar1 + lVar2" identifier + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + IDENT)) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ])) < (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression LIT - IDENT) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + IDENT)) ;) })) (return_statement return ;) })))
(function_definition "void FUN_002c2d40(long *param_1,int param_2)\n\n{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_002c2d40(long *param_1,int param_2)" (identifier "FUN_002c2d40") (parameter_list "(long *param_1,int param_2)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  int iVar3;\n  \n  lVar1 = *param_1;\n  if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }\n  if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }\n  return;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (lVar1 == 0) {\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }" (if "if") (parenthesized_expression "(lVar1 == 0)" (( "(") (binary_expression "lVar1 == 0" (identifier "lVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }\n    lVar1 = FUN_002d9060((long)param_2);\n    *param_1 = lVar1;\n    param_1[1] = lVar1;\n    param_1[2] = lVar1 + param_2;\n    return;\n  }" ({ "{") (if_statement "if (param_2 < 0x20) {\n      param_2 = 0x20;\n    }" (if "if") (parenthesized_expression "(param_2 < 0x20)" (( "(") (binary_expression "param_2 < 0x20" (identifier "param_2") (< "<") (number_literal "0x20")) () ")")) (compound_statement "{\n      param_2 = 0x20;\n    }" ({ "{") (expression_statement "param_2 = 0x20;" (assignment_expression "param_2 = 0x20" (identifier "param_2") (= "=") (number_literal "0x20")) (; ";")) (} "}"))) (expression_statement "lVar1 = FUN_002d9060((long)param_2);" (assignment_expression "lVar1 = FUN_002d9060((long)param_2)" (identifier "lVar1") (= "=") (call_expression "FUN_002d9060((long)param_2)" (identifier "FUN_002d9060") (argument_list "((long)param_2)" (( "(") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "*param_1 = lVar1;" (assignment_expression "*param_1 = lVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "lVar1")) (; ";")) (expression_statement "param_1[1] = lVar1;" (assignment_expression "param_1[1] = lVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "lVar1")) (; ";")) (expression_statement "param_1[2] = lVar1 + param_2;" (assignment_expression "param_1[2] = lVar1 + param_2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "lVar1 + param_2" (identifier "lVar1") (+ "+") (identifier "param_2"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (param_1[2] - param_1[1] < (long)param_2) {\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }" (if "if") (parenthesized_expression "(param_1[2] - param_1[1] < (long)param_2)" (( "(") (binary_expression "param_1[2] - param_1[1] < (long)param_2" (binary_expression "param_1[2] - param_1[1]" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (- "-") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (< "<") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2"))) () ")")) (compound_statement "{\n    iVar3 = (int)param_1[1] - (int)lVar1;\n    if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }\n    lVar2 = (long)((param_2 + iVar3) * 2);\n    lVar1 = FUN_002d90e0(lVar1,lVar2);\n    *param_1 = lVar1;\n    param_1[1] = iVar3 + lVar1;\n    param_1[2] = lVar1 + lVar2;\n  }" ({ "{") (expression_statement "iVar3 = (int)param_1[1] - (int)lVar1;" (assignment_expression "iVar3 = (int)param_1[1] - (int)lVar1" (identifier "iVar3") (= "=") (binary_expression "(int)param_1[1] - (int)lVar1" (cast_expression "(int)param_1[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (- "-") (cast_expression "(int)lVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar1")))) (; ";")) (if_statement "if (0x3fffffff - iVar3 < param_2) {\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }" (if "if") (parenthesized_expression "(0x3fffffff - iVar3 < param_2)" (( "(") (binary_expression "0x3fffffff - iVar3 < param_2" (binary_expression "0x3fffffff - iVar3" (number_literal "0x3fffffff") (- "-") (identifier "iVar3")) (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n                    \n      FUN_002d8fe0(0x7fffffff);\n    }" ({ "{") (expression_statement "FUN_002d8fe0(0x7fffffff);" (call_expression "FUN_002d8fe0(0x7fffffff)" (identifier "FUN_002d8fe0") (argument_list "(0x7fffffff)" (( "(") (number_literal "0x7fffffff") () ")"))) (; ";")) (} "}"))) (expression_statement "lVar2 = (long)((param_2 + iVar3) * 2);" (assignment_expression "lVar2 = (long)((param_2 + iVar3) * 2)" (identifier "lVar2") (= "=") (cast_expression "(long)((param_2 + iVar3) * 2)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "((param_2 + iVar3) * 2)" (( "(") (binary_expression "(param_2 + iVar3) * 2" (parenthesized_expression "(param_2 + iVar3)" (( "(") (binary_expression "param_2 + iVar3" (identifier "param_2") (+ "+") (identifier "iVar3")) () ")")) (* "*") (number_literal "2")) () ")")))) (; ";")) (expression_statement "lVar1 = FUN_002d90e0(lVar1,lVar2);" (assignment_expression "lVar1 = FUN_002d90e0(lVar1,lVar2)" (identifier "lVar1") (= "=") (call_expression "FUN_002d90e0(lVar1,lVar2)" (identifier "FUN_002d90e0") (argument_list "(lVar1,lVar2)" (( "(") (identifier "lVar1") (, ",") (identifier "lVar2") () ")")))) (; ";")) (expression_statement "*param_1 = lVar1;" (assignment_expression "*param_1 = lVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "lVar1")) (; ";")) (expression_statement "param_1[1] = iVar3 + lVar1;" (assignment_expression "param_1[1] = iVar3 + lVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar3 + lVar1" (identifier "iVar3") (+ "+") (identifier "lVar1"))) (; ";")) (expression_statement "param_1[2] = lVar1 + lVar2;" (assignment_expression "param_1[2] = lVar1 + lVar2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "lVar1 + lVar2" (identifier "lVar1") (+ "+") (identifier "lVar2"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *s,int var_2)

{
  char *var_1;
  size_t var_7;
  int var_4;
  
  var_1 = s->b;
  if (var_1 == (char *)0x0) {
    if (var_2 < 0x20) {
      var_2 = 0x20;
    }
    var_1 = (char *)var_3((long)var_2);
    s->b = var_1;
    s->p = var_1;
    s->e = var_1 + var_2;
    return;
  }
  if ((long)s->e - (long)s->p < (long)var_2) {
    var_4 = (int)s->p - (int)var_1;
    if (0x3fffffff - var_4 < var_2) {
                    /* WARNING: Subroutine does not return */
      var_5(0x7fffffff);
    }
    var_7 = (size_t)((var_2 + var_4) * 2);
    var_1 = (char *)var_6(var_1,var_7);
    s->b = var_1;
    s->p = var_1 + var_4;
    s->e = var_1 + var_7;
  }
  return;
}


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

void MASKED(long *param_1,int param_2)

{
  long lVar1;
  long lVar2;
  int iVar3;
  
  lVar1 = *param_1;
  if (lVar1 == 0) {
    if (param_2 < 0x20) {
      param_2 = 0x20;
    }
    lVar1 = FUN_002d9060((long)param_2);
    *param_1 = lVar1;
    param_1[1] = lVar1;
    param_1[2] = lVar1 + param_2;
    return;
  }
  if (param_1[2] - param_1[1] < (long)param_2) {
    iVar3 = (int)param_1[1] - (int)lVar1;
    if (0x3fffffff - iVar3 < param_2) {
                    /* WARNING: Subroutine does not return */
      FUN_002d8fe0(0x7fffffff);
    }
    lVar2 = (long)((param_2 + iVar3) * 2);
    lVar1 = FUN_002d90e0(lVar1,lVar2);
    *param_1 = lVar1;
    param_1[1] = iVar3 + lVar1;
    param_1[2] = lVar1 + lVar2;
  }
  return;
}

