
int zlib_compress_block(void *handle,uchar *block,int len,uchar **outblock,int *outlen)

{
  Outbuf *out;
  uint len_00;
  
  out = *(Outbuf **)((long)handle + 8);
  out->outbuf = (uchar *)0x0;
  out->outsize = 0;
  out->outlen = 0;
  if (out->firstblock == 0) {
    if (out->comp_disabled != 0) {
      outbits(out,0,7);
LAB_00152816:
      if (0 < len) {
        do {
          len_00 = 0xffff;
          if (len < 0x10000) {
            len_00 = len;
          }
          outbits(out,0,3);
          if (out->noutbits != 0) {
            outbits(out,0,8 - out->noutbits);
          }
          outbits(out,(long)(int)len_00,0x10);
          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);
          lz77_compress((LZ77Context *)handle,block,len_00,0);
          len = len - len_00;
          block = block + (int)len_00;
        } while (0 < len);
      }
      outbits(out,2,3);
      goto LAB_00152830;
    }
  }
  else {
    outbits(out,0x9c78,0x10);
    out->firstblock = 0;
    if (out->comp_disabled != 0) goto LAB_00152816;
    outbits(out,2,3);
  }
  lz77_compress((LZ77Context *)handle,block,len,1);
  outbits(out,0,7);
  outbits(out,2,10);
  outbits(out,2,3);
LAB_00152830:
  out->comp_disabled = 0;
  *outblock = out->outbuf;
  *outlen = out->outlen;
  return 1;
}



undefined8
FUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)

{
  undefined8 *puVar1;
  uint uVar2;
  
  puVar1 = *(undefined8 **)(param_1 + 8);
  *puVar1 = 0;
  *(undefined4 *)((long)puVar1 + 0xc) = 0;
  *(undefined4 *)(puVar1 + 1) = 0;
  if (*(int *)((long)puVar1 + 0x1c) == 0) {
    if (*(int *)(puVar1 + 4) != 0) {
      FUN_0015132a(puVar1,0,7);
LAB_00152816:
      if (0 < (int)param_3) {
        do {
          uVar2 = 0xffff;
          if ((int)param_3 < 0x10000) {
            uVar2 = param_3;
          }
          FUN_0015132a(puVar1,0,3);
          if (*(int *)(puVar1 + 3) != 0) {
            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));
          }
          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);
          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);
          FUN_0015217d(param_1,param_2,uVar2,0);
          param_3 = param_3 - uVar2;
          param_2 = param_2 + (int)uVar2;
        } while (0 < (int)param_3);
      }
      FUN_0015132a(puVar1,2,3);
      goto LAB_00152830;
    }
  }
  else {
    FUN_0015132a(puVar1,0x9c78,0x10);
    *(undefined4 *)((long)puVar1 + 0x1c) = 0;
    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;
    FUN_0015132a(puVar1,2,3);
  }
  FUN_0015217d(param_1,param_2,param_3,1);
  FUN_0015132a(puVar1,0,7);
  FUN_0015132a(puVar1,2,10);
  FUN_0015132a(puVar1,2,3);
LAB_00152830:
  *(undefined4 *)(puVar1 + 4) = 0;
  *param_4 = *puVar1;
  *param_5 = *(undefined4 *)(puVar1 + 1);
  return 1;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
MOV R13,RSI
MOV EBP,EDX
MOV qword ptr [RSP],RCX
MOV qword ptr [RSP + 0x8],R8
MOV RBX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX],0x0
MOV dword ptr [RBX + 0xc],0x0
MOV dword ptr [RBX + 0x8],0x0
CMP dword ptr [RBX + 0x1c],0x0
JNZ 0x001527d1
CMP dword ptr [RBX + 0x20],0x0
JNZ 0x00152804
MOV ECX,0x1
MOV EDX,EBP
MOV RSI,R13
MOV RDI,R15
CALL 0x0015217d
MOV EDX,0x7
MOV ESI,0x0
MOV RDI,RBX
CALL 0x0015132a
MOV EDX,0xa
MOV ESI,0x2
MOV RDI,RBX
CALL 0x0015132a
MOV EDX,0x3
MOV ESI,0x2
MOV RDI,RBX
CALL 0x0015132a
JMP 0x00152830
MOV EDX,0x10
MOV ESI,0x9c78
MOV RDI,RBX
CALL 0x0015132a
MOV dword ptr [RBX + 0x1c],0x0
CMP dword ptr [RBX + 0x20],0x0
JNZ 0x00152816
MOV EDX,0x3
MOV ESI,0x2
MOV RDI,RBX
CALL 0x0015132a
JMP 0x00152787
MOV EDX,0x7
MOV ESI,0x0
MOV RDI,RBX
CALL 0x0015132a
TEST EBP,EBP
JG 0x001528c0
MOV EDX,0x3
MOV ESI,0x2
MOV RDI,RBX
CALL 0x0015132a
MOV dword ptr [RBX + 0x20],0x0
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RSP]
MOV qword ptr [RCX],RAX
MOV EAX,dword ptr [RBX + 0x8]
MOV RCX,qword ptr [RSP + 0x8]
MOV dword ptr [RCX],EAX
MOV EAX,0x1
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV EDX,0x8
SUB EDX,EAX
MOV ESI,0x0
MOV RDI,RBX
CALL 0x0015132a
MOVSXD R14,R12D
MOV EDX,0x10
MOV RSI,R14
MOV RDI,RBX
CALL 0x0015132a
MOV ESI,R12D
XOR ESI,0xffff
MOVSXD RSI,ESI
MOV EDX,0x10
MOV RDI,RBX
CALL 0x0015132a
MOV ECX,0x0
MOV EDX,R12D
MOV RSI,R13
MOV RDI,R15
CALL 0x0015217d
SUB EBP,R12D
ADD R13,R14
TEST EBP,EBP
JLE 0x0015281e
CMP EBP,0xffff
MOV R12D,0xffff
CMOVLE R12D,EBP
MOV EDX,0x3
MOV ESI,0x0
MOV RDI,RBX
CALL 0x0015132a
MOV EAX,dword ptr [RBX + 0x18]
TEST EAX,EAX
JZ 0x00152873
JMP 0x0015285f
(translation_unit "undefined8\nFUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)\n\n{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}\n\n" (function_definition "undefined8\nFUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)\n\n{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}" type_identifier (function_declarator "FUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)" identifier (parameter_list "(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined8 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "puVar1 = *(undefined8 **)(param_1 + 8);" (assignment_expression "puVar1 = *(undefined8 **)(param_1 + 8)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 8)" * (cast_expression "(undefined8 **)(param_1 + 8)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "*(undefined4 *)((long)puVar1 + 0xc) = 0;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0xc) = 0" (pointer_expression "*(undefined4 *)((long)puVar1 + 0xc)" * (cast_expression "(undefined4 *)((long)puVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0xc)" ( (binary_expression "(long)puVar1 + 0xc" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(puVar1 + 1) = 0;" (assignment_expression "*(undefined4 *)(puVar1 + 1) = 0" (pointer_expression "*(undefined4 *)(puVar1 + 1)" * (cast_expression "(undefined4 *)(puVar1 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" if (parenthesized_expression "(*(int *)((long)puVar1 + 0x1c) == 0)" ( (binary_expression "*(int *)((long)puVar1 + 0x1c) == 0" (pointer_expression "*(int *)((long)puVar1 + 0x1c)" * (cast_expression "(int *)((long)puVar1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }" { (if_statement "if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }" if (parenthesized_expression "(*(int *)(puVar1 + 4) != 0)" ( (binary_expression "*(int *)(puVar1 + 4) != 0" (pointer_expression "*(int *)(puVar1 + 4)" * (cast_expression "(int *)(puVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }" { (expression_statement "FUN_0015132a(puVar1,0,7);" (call_expression "FUN_0015132a(puVar1,0,7)" identifier (argument_list "(puVar1,0,7)" ( identifier , number_literal , number_literal ))) ;) (labeled_statement "LAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" statement_identifier : (if_statement "if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" if (parenthesized_expression "(0 < (int)param_3)" ( (binary_expression "0 < (int)param_3" number_literal < (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" { (do_statement "do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);" do (compound_statement "{\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        }" { (expression_statement "uVar2 = 0xffff;" (assignment_expression "uVar2 = 0xffff" identifier = number_literal) ;) (if_statement "if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }" if (parenthesized_expression "((int)param_3 < 0x10000)" ( (binary_expression "(int)param_3 < 0x10000" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n            uVar2 = param_3;\n          }" { (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" identifier = identifier) ;) })) (expression_statement "FUN_0015132a(puVar1,0,3);" (call_expression "FUN_0015132a(puVar1,0,3)" identifier (argument_list "(puVar1,0,3)" ( identifier , number_literal , number_literal ))) ;) (if_statement "if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }" if (parenthesized_expression "(*(int *)(puVar1 + 3) != 0)" ( (binary_expression "*(int *)(puVar1 + 3) != 0" (pointer_expression "*(int *)(puVar1 + 3)" * (cast_expression "(int *)(puVar1 + 3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }" { (expression_statement "FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));" (call_expression "FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3))" identifier (argument_list "(puVar1,0,8 - *(int *)(puVar1 + 3))" ( identifier , number_literal , (binary_expression "8 - *(int *)(puVar1 + 3)" number_literal - (pointer_expression "*(int *)(puVar1 + 3)" * (cast_expression "(int *)(puVar1 + 3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))))) ))) ;) })) (expression_statement "FUN_0015132a(puVar1,(long)(int)uVar2,0x10);" (call_expression "FUN_0015132a(puVar1,(long)(int)uVar2,0x10)" identifier (argument_list "(puVar1,(long)(int)uVar2,0x10)" ( identifier , (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);" (call_expression "FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10)" identifier (argument_list "(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10)" ( identifier , (cast_expression "(long)(int)(uVar2 ^ 0xffff)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uVar2 ^ 0xffff)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 ^ 0xffff)" ( (binary_expression "uVar2 ^ 0xffff" identifier ^ number_literal) )))) , number_literal ))) ;) (expression_statement "FUN_0015217d(param_1,param_2,uVar2,0);" (call_expression "FUN_0015217d(param_1,param_2,uVar2,0)" identifier (argument_list "(param_1,param_2,uVar2,0)" ( identifier , identifier , identifier , number_literal ))) ;) (expression_statement "param_3 = param_3 - uVar2;" (assignment_expression "param_3 = param_3 - uVar2" identifier = (binary_expression "param_3 - uVar2" identifier - identifier)) ;) (expression_statement "param_2 = param_2 + (int)uVar2;" (assignment_expression "param_2 = param_2 + (int)uVar2" identifier = (binary_expression "param_2 + (int)uVar2" identifier + (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(0 < (int)param_3)" ( (binary_expression "0 < (int)param_3" number_literal < (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) }))) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" identifier (argument_list "(puVar1,2,3)" ( identifier , number_literal , number_literal ))) ;) (goto_statement "goto LAB_00152830;" goto statement_identifier ;) })) }) (else_clause "else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" else (compound_statement "{\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" { (expression_statement "FUN_0015132a(puVar1,0x9c78,0x10);" (call_expression "FUN_0015132a(puVar1,0x9c78,0x10)" identifier (argument_list "(puVar1,0x9c78,0x10)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 0;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 0" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" * (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (if_statement "if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;" if (parenthesized_expression "(*(int *)(puVar1 + 4) != 0)" ( (binary_expression "*(int *)(puVar1 + 4) != 0" (pointer_expression "*(int *)(puVar1 + 4)" * (cast_expression "(int *)(puVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) != number_literal) )) (goto_statement "goto LAB_00152816;" goto statement_identifier ;)) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" identifier (argument_list "(puVar1,2,3)" ( identifier , number_literal , number_literal ))) ;) }))) (expression_statement "FUN_0015217d(param_1,param_2,param_3,1);" (call_expression "FUN_0015217d(param_1,param_2,param_3,1)" identifier (argument_list "(param_1,param_2,param_3,1)" ( identifier , identifier , identifier , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,0,7);" (call_expression "FUN_0015132a(puVar1,0,7)" identifier (argument_list "(puVar1,0,7)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,2,10);" (call_expression "FUN_0015132a(puVar1,2,10)" identifier (argument_list "(puVar1,2,10)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" identifier (argument_list "(puVar1,2,3)" ( identifier , number_literal , number_literal ))) ;) (labeled_statement "LAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(puVar1 + 4) = 0;" (assignment_expression "*(undefined4 *)(puVar1 + 4) = 0" (pointer_expression "*(undefined4 *)(puVar1 + 4)" * (cast_expression "(undefined4 *)(puVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "*param_4 = *puVar1;" (assignment_expression "*param_4 = *puVar1" (pointer_expression "*param_4" * identifier) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "*param_5 = *(undefined4 *)(puVar1 + 1);" (assignment_expression "*param_5 = *(undefined4 *)(puVar1 + 1)" (pointer_expression "*param_5" * identifier) = (pointer_expression "*(undefined4 *)(puVar1 + 1)" * (cast_expression "(undefined4 *)(puVar1 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "int zlib_compress_block(void *handle,uchar *block,int len,uchar **outblock,int *outlen)\n\n{\n  Outbuf *out;\n  uint len_00;\n  \n  out = *(Outbuf **)((long)handle + 8);\n  out->outbuf = (uchar *)0x0;\n  out->outsize = 0;\n  out->outlen = 0;\n  if (out->firstblock == 0) {\n    if (out->comp_disabled != 0) {\n      outbits(out,0,7);\nLAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }\n      outbits(out,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    outbits(out,0x9c78,0x10);\n    out->firstblock = 0;\n    if (out->comp_disabled != 0) goto LAB_00152816;\n    outbits(out,2,3);\n  }\n  lz77_compress((LZ77Context *)handle,block,len,1);\n  outbits(out,0,7);\n  outbits(out,2,10);\n  outbits(out,2,3);\nLAB_00152830:\n  out->comp_disabled = 0;\n  *outblock = out->outbuf;\n  *outlen = out->outlen;\n  return 1;\n}\n\n" (function_definition "int zlib_compress_block(void *handle,uchar *block,int len,uchar **outblock,int *outlen)\n\n{\n  Outbuf *out;\n  uint len_00;\n  \n  out = *(Outbuf **)((long)handle + 8);\n  out->outbuf = (uchar *)0x0;\n  out->outsize = 0;\n  out->outlen = 0;\n  if (out->firstblock == 0) {\n    if (out->comp_disabled != 0) {\n      outbits(out,0,7);\nLAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }\n      outbits(out,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    outbits(out,0x9c78,0x10);\n    out->firstblock = 0;\n    if (out->comp_disabled != 0) goto LAB_00152816;\n    outbits(out,2,3);\n  }\n  lz77_compress((LZ77Context *)handle,block,len,1);\n  outbits(out,0,7);\n  outbits(out,2,10);\n  outbits(out,2,3);\nLAB_00152830:\n  out->comp_disabled = 0;\n  *outblock = out->outbuf;\n  *outlen = out->outlen;\n  return 1;\n}" primitive_type (function_declarator "zlib_compress_block(void *handle,uchar *block,int len,uchar **outblock,int *outlen)" identifier (parameter_list "(void *handle,uchar *block,int len,uchar **outblock,int *outlen)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "uchar *block" type_identifier (pointer_declarator "*block" * identifier)) , (parameter_declaration "int len" primitive_type identifier) , (parameter_declaration "uchar **outblock" type_identifier (pointer_declarator "**outblock" * (pointer_declarator "*outblock" * identifier))) , (parameter_declaration "int *outlen" primitive_type (pointer_declarator "*outlen" * identifier)) ))) (compound_statement "{\n  Outbuf *out;\n  uint len_00;\n  \n  out = *(Outbuf **)((long)handle + 8);\n  out->outbuf = (uchar *)0x0;\n  out->outsize = 0;\n  out->outlen = 0;\n  if (out->firstblock == 0) {\n    if (out->comp_disabled != 0) {\n      outbits(out,0,7);\nLAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }\n      outbits(out,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    outbits(out,0x9c78,0x10);\n    out->firstblock = 0;\n    if (out->comp_disabled != 0) goto LAB_00152816;\n    outbits(out,2,3);\n  }\n  lz77_compress((LZ77Context *)handle,block,len,1);\n  outbits(out,0,7);\n  outbits(out,2,10);\n  outbits(out,2,3);\nLAB_00152830:\n  out->comp_disabled = 0;\n  *outblock = out->outbuf;\n  *outlen = out->outlen;\n  return 1;\n}" { (declaration "Outbuf *out;" type_identifier (pointer_declarator "*out" * identifier) ;) (declaration "uint len_00;" type_identifier identifier ;) (expression_statement "out = *(Outbuf **)((long)handle + 8);" (assignment_expression "out = *(Outbuf **)((long)handle + 8)" identifier = (pointer_expression "*(Outbuf **)((long)handle + 8)" * (cast_expression "(Outbuf **)((long)handle + 8)" ( (type_descriptor "Outbuf **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((long)handle + 8)" ( (binary_expression "(long)handle + 8" (cast_expression "(long)handle" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (expression_statement "out->outbuf = (uchar *)0x0;" (assignment_expression "out->outbuf = (uchar *)0x0" (field_expression "out->outbuf" identifier -> field_identifier) = (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "out->outsize = 0;" (assignment_expression "out->outsize = 0" (field_expression "out->outsize" identifier -> field_identifier) = number_literal) ;) (expression_statement "out->outlen = 0;" (assignment_expression "out->outlen = 0" (field_expression "out->outlen" identifier -> field_identifier) = number_literal) ;) (if_statement "if (out->firstblock == 0) {\n    if (out->comp_disabled != 0) {\n      outbits(out,0,7);\nLAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }\n      outbits(out,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    outbits(out,0x9c78,0x10);\n    out->firstblock = 0;\n    if (out->comp_disabled != 0) goto LAB_00152816;\n    outbits(out,2,3);\n  }" if (parenthesized_expression "(out->firstblock == 0)" ( (binary_expression "out->firstblock == 0" (field_expression "out->firstblock" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    if (out->comp_disabled != 0) {\n      outbits(out,0,7);\nLAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }\n      outbits(out,2,3);\n      goto LAB_00152830;\n    }\n  }" { (if_statement "if (out->comp_disabled != 0) {\n      outbits(out,0,7);\nLAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }\n      outbits(out,2,3);\n      goto LAB_00152830;\n    }" if (parenthesized_expression "(out->comp_disabled != 0)" ( (binary_expression "out->comp_disabled != 0" (field_expression "out->comp_disabled" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n      outbits(out,0,7);\nLAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }\n      outbits(out,2,3);\n      goto LAB_00152830;\n    }" { (expression_statement "outbits(out,0,7);" (call_expression "outbits(out,0,7)" identifier (argument_list "(out,0,7)" ( identifier , number_literal , number_literal ))) ;) (labeled_statement "LAB_00152816:\n      if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }" statement_identifier : (if_statement "if (0 < len) {\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }" if (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) (compound_statement "{\n        do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);\n      }" { (do_statement "do {\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        } while (0 < len);" do (compound_statement "{\n          len_00 = 0xffff;\n          if (len < 0x10000) {\n            len_00 = len;\n          }\n          outbits(out,0,3);\n          if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }\n          outbits(out,(long)(int)len_00,0x10);\n          outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);\n          lz77_compress((LZ77Context *)handle,block,len_00,0);\n          len = len - len_00;\n          block = block + (int)len_00;\n        }" { (expression_statement "len_00 = 0xffff;" (assignment_expression "len_00 = 0xffff" identifier = number_literal) ;) (if_statement "if (len < 0x10000) {\n            len_00 = len;\n          }" if (parenthesized_expression "(len < 0x10000)" ( (binary_expression "len < 0x10000" identifier < number_literal) )) (compound_statement "{\n            len_00 = len;\n          }" { (expression_statement "len_00 = len;" (assignment_expression "len_00 = len" identifier = identifier) ;) })) (expression_statement "outbits(out,0,3);" (call_expression "outbits(out,0,3)" identifier (argument_list "(out,0,3)" ( identifier , number_literal , number_literal ))) ;) (if_statement "if (out->noutbits != 0) {\n            outbits(out,0,8 - out->noutbits);\n          }" if (parenthesized_expression "(out->noutbits != 0)" ( (binary_expression "out->noutbits != 0" (field_expression "out->noutbits" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n            outbits(out,0,8 - out->noutbits);\n          }" { (expression_statement "outbits(out,0,8 - out->noutbits);" (call_expression "outbits(out,0,8 - out->noutbits)" identifier (argument_list "(out,0,8 - out->noutbits)" ( identifier , number_literal , (binary_expression "8 - out->noutbits" number_literal - (field_expression "out->noutbits" identifier -> field_identifier)) ))) ;) })) (expression_statement "outbits(out,(long)(int)len_00,0x10);" (call_expression "outbits(out,(long)(int)len_00,0x10)" identifier (argument_list "(out,(long)(int)len_00,0x10)" ( identifier , (cast_expression "(long)(int)len_00" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)len_00" ( (type_descriptor "int" primitive_type) ) identifier)) , number_literal ))) ;) (expression_statement "outbits(out,(long)(int)(len_00 ^ 0xffff),0x10);" (call_expression "outbits(out,(long)(int)(len_00 ^ 0xffff),0x10)" identifier (argument_list "(out,(long)(int)(len_00 ^ 0xffff),0x10)" ( identifier , (cast_expression "(long)(int)(len_00 ^ 0xffff)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(len_00 ^ 0xffff)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(len_00 ^ 0xffff)" ( (binary_expression "len_00 ^ 0xffff" identifier ^ number_literal) )))) , number_literal ))) ;) (expression_statement "lz77_compress((LZ77Context *)handle,block,len_00,0);" (call_expression "lz77_compress((LZ77Context *)handle,block,len_00,0)" identifier (argument_list "((LZ77Context *)handle,block,len_00,0)" ( (cast_expression "(LZ77Context *)handle" ( (type_descriptor "LZ77Context *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier , number_literal ))) ;) (expression_statement "len = len - len_00;" (assignment_expression "len = len - len_00" identifier = (binary_expression "len - len_00" identifier - identifier)) ;) (expression_statement "block = block + (int)len_00;" (assignment_expression "block = block + (int)len_00" identifier = (binary_expression "block + (int)len_00" identifier + (cast_expression "(int)len_00" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) ;) }))) (expression_statement "outbits(out,2,3);" (call_expression "outbits(out,2,3)" identifier (argument_list "(out,2,3)" ( identifier , number_literal , number_literal ))) ;) (goto_statement "goto LAB_00152830;" goto statement_identifier ;) })) }) (else_clause "else {\n    outbits(out,0x9c78,0x10);\n    out->firstblock = 0;\n    if (out->comp_disabled != 0) goto LAB_00152816;\n    outbits(out,2,3);\n  }" else (compound_statement "{\n    outbits(out,0x9c78,0x10);\n    out->firstblock = 0;\n    if (out->comp_disabled != 0) goto LAB_00152816;\n    outbits(out,2,3);\n  }" { (expression_statement "outbits(out,0x9c78,0x10);" (call_expression "outbits(out,0x9c78,0x10)" identifier (argument_list "(out,0x9c78,0x10)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "out->firstblock = 0;" (assignment_expression "out->firstblock = 0" (field_expression "out->firstblock" identifier -> field_identifier) = number_literal) ;) (if_statement "if (out->comp_disabled != 0) goto LAB_00152816;" if (parenthesized_expression "(out->comp_disabled != 0)" ( (binary_expression "out->comp_disabled != 0" (field_expression "out->comp_disabled" identifier -> field_identifier) != number_literal) )) (goto_statement "goto LAB_00152816;" goto statement_identifier ;)) (expression_statement "outbits(out,2,3);" (call_expression "outbits(out,2,3)" identifier (argument_list "(out,2,3)" ( identifier , number_literal , number_literal ))) ;) }))) (expression_statement "lz77_compress((LZ77Context *)handle,block,len,1);" (call_expression "lz77_compress((LZ77Context *)handle,block,len,1)" identifier (argument_list "((LZ77Context *)handle,block,len,1)" ( (cast_expression "(LZ77Context *)handle" ( (type_descriptor "LZ77Context *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier , number_literal ))) ;) (expression_statement "outbits(out,0,7);" (call_expression "outbits(out,0,7)" identifier (argument_list "(out,0,7)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "outbits(out,2,10);" (call_expression "outbits(out,2,10)" identifier (argument_list "(out,2,10)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "outbits(out,2,3);" (call_expression "outbits(out,2,3)" identifier (argument_list "(out,2,3)" ( identifier , number_literal , number_literal ))) ;) (labeled_statement "LAB_00152830:\n  out->comp_disabled = 0;" statement_identifier : (expression_statement "out->comp_disabled = 0;" (assignment_expression "out->comp_disabled = 0" (field_expression "out->comp_disabled" identifier -> field_identifier) = number_literal) ;)) (expression_statement "*outblock = out->outbuf;" (assignment_expression "*outblock = out->outbuf" (pointer_expression "*outblock" * identifier) = (field_expression "out->outbuf" identifier -> field_identifier)) ;) (expression_statement "*outlen = out->outlen;" (assignment_expression "*outlen = out->outlen" (pointer_expression "*outlen" * identifier) = (field_expression "out->outlen" identifier -> field_identifier)) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined8\nFUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)\n\n{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}\n\n" (function_definition "undefined8\nFUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)\n\n{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}" type_identifier (function_declarator "FUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)" identifier (parameter_list "(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined8 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "puVar1 = *(undefined8 **)(param_1 + 8);" (assignment_expression "puVar1 = *(undefined8 **)(param_1 + 8)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 8)" * (cast_expression "(undefined8 **)(param_1 + 8)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "*(undefined4 *)((long)puVar1 + 0xc) = 0;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0xc) = 0" (pointer_expression "*(undefined4 *)((long)puVar1 + 0xc)" * (cast_expression "(undefined4 *)((long)puVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0xc)" ( (binary_expression "(long)puVar1 + 0xc" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(puVar1 + 1) = 0;" (assignment_expression "*(undefined4 *)(puVar1 + 1) = 0" (pointer_expression "*(undefined4 *)(puVar1 + 1)" * (cast_expression "(undefined4 *)(puVar1 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" if (parenthesized_expression "(*(int *)((long)puVar1 + 0x1c) == 0)" ( (binary_expression "*(int *)((long)puVar1 + 0x1c) == 0" (pointer_expression "*(int *)((long)puVar1 + 0x1c)" * (cast_expression "(int *)((long)puVar1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }" { (if_statement "if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }" if (parenthesized_expression "(*(int *)(puVar1 + 4) != 0)" ( (binary_expression "*(int *)(puVar1 + 4) != 0" (pointer_expression "*(int *)(puVar1 + 4)" * (cast_expression "(int *)(puVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }" { (expression_statement "FUN_0015132a(puVar1,0,7);" (call_expression "FUN_0015132a(puVar1,0,7)" identifier (argument_list "(puVar1,0,7)" ( identifier , number_literal , number_literal ))) ;) (labeled_statement "LAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" statement_identifier : (if_statement "if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" if (parenthesized_expression "(0 < (int)param_3)" ( (binary_expression "0 < (int)param_3" number_literal < (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" { (do_statement "do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);" do (compound_statement "{\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        }" { (expression_statement "uVar2 = 0xffff;" (assignment_expression "uVar2 = 0xffff" identifier = number_literal) ;) (if_statement "if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }" if (parenthesized_expression "((int)param_3 < 0x10000)" ( (binary_expression "(int)param_3 < 0x10000" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n            uVar2 = param_3;\n          }" { (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" identifier = identifier) ;) })) (expression_statement "FUN_0015132a(puVar1,0,3);" (call_expression "FUN_0015132a(puVar1,0,3)" identifier (argument_list "(puVar1,0,3)" ( identifier , number_literal , number_literal ))) ;) (if_statement "if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }" if (parenthesized_expression "(*(int *)(puVar1 + 3) != 0)" ( (binary_expression "*(int *)(puVar1 + 3) != 0" (pointer_expression "*(int *)(puVar1 + 3)" * (cast_expression "(int *)(puVar1 + 3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }" { (expression_statement "FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));" (call_expression "FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3))" identifier (argument_list "(puVar1,0,8 - *(int *)(puVar1 + 3))" ( identifier , number_literal , (binary_expression "8 - *(int *)(puVar1 + 3)" number_literal - (pointer_expression "*(int *)(puVar1 + 3)" * (cast_expression "(int *)(puVar1 + 3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))))) ))) ;) })) (expression_statement "FUN_0015132a(puVar1,(long)(int)uVar2,0x10);" (call_expression "FUN_0015132a(puVar1,(long)(int)uVar2,0x10)" identifier (argument_list "(puVar1,(long)(int)uVar2,0x10)" ( identifier , (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);" (call_expression "FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10)" identifier (argument_list "(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10)" ( identifier , (cast_expression "(long)(int)(uVar2 ^ 0xffff)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uVar2 ^ 0xffff)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 ^ 0xffff)" ( (binary_expression "uVar2 ^ 0xffff" identifier ^ number_literal) )))) , number_literal ))) ;) (expression_statement "FUN_0015217d(param_1,param_2,uVar2,0);" (call_expression "FUN_0015217d(param_1,param_2,uVar2,0)" identifier (argument_list "(param_1,param_2,uVar2,0)" ( identifier , identifier , identifier , number_literal ))) ;) (expression_statement "param_3 = param_3 - uVar2;" (assignment_expression "param_3 = param_3 - uVar2" identifier = (binary_expression "param_3 - uVar2" identifier - identifier)) ;) (expression_statement "param_2 = param_2 + (int)uVar2;" (assignment_expression "param_2 = param_2 + (int)uVar2" identifier = (binary_expression "param_2 + (int)uVar2" identifier + (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(0 < (int)param_3)" ( (binary_expression "0 < (int)param_3" number_literal < (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) }))) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" identifier (argument_list "(puVar1,2,3)" ( identifier , number_literal , number_literal ))) ;) (goto_statement "goto LAB_00152830;" goto statement_identifier ;) })) }) (else_clause "else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" else (compound_statement "{\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" { (expression_statement "FUN_0015132a(puVar1,0x9c78,0x10);" (call_expression "FUN_0015132a(puVar1,0x9c78,0x10)" identifier (argument_list "(puVar1,0x9c78,0x10)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 0;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 0" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" * (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (if_statement "if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;" if (parenthesized_expression "(*(int *)(puVar1 + 4) != 0)" ( (binary_expression "*(int *)(puVar1 + 4) != 0" (pointer_expression "*(int *)(puVar1 + 4)" * (cast_expression "(int *)(puVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) != number_literal) )) (goto_statement "goto LAB_00152816;" goto statement_identifier ;)) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" identifier (argument_list "(puVar1,2,3)" ( identifier , number_literal , number_literal ))) ;) }))) (expression_statement "FUN_0015217d(param_1,param_2,param_3,1);" (call_expression "FUN_0015217d(param_1,param_2,param_3,1)" identifier (argument_list "(param_1,param_2,param_3,1)" ( identifier , identifier , identifier , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,0,7);" (call_expression "FUN_0015132a(puVar1,0,7)" identifier (argument_list "(puVar1,0,7)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,2,10);" (call_expression "FUN_0015132a(puVar1,2,10)" identifier (argument_list "(puVar1,2,10)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" identifier (argument_list "(puVar1,2,3)" ( identifier , number_literal , number_literal ))) ;) (labeled_statement "LAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(puVar1 + 4) = 0;" (assignment_expression "*(undefined4 *)(puVar1 + 4) = 0" (pointer_expression "*(undefined4 *)(puVar1 + 4)" * (cast_expression "(undefined4 *)(puVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "*param_4 = *puVar1;" (assignment_expression "*param_4 = *puVar1" (pointer_expression "*param_4" * identifier) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "*param_5 = *(undefined4 *)(puVar1 + 1);" (assignment_expression "*param_5 = *(undefined4 *)(puVar1 + 1)" (pointer_expression "*param_5" * identifier) = (pointer_expression "*(undefined4 *)(puVar1 + 1)" * (cast_expression "(undefined4 *)(puVar1 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression LIT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT ^ LIT) )))) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) }) while (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (return_statement return LIT ;) })))
(function_definition "undefined8\nFUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)\n\n{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}" (type_identifier "undefined8") (function_declarator "FUN_00152743(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)" (identifier "FUN_00152743") (parameter_list "(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 *param_4" (type_identifier "undefined8") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined4 *param_5" (type_identifier "undefined4") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  undefined8 *puVar1;\n  uint uVar2;\n  \n  puVar1 = *(undefined8 **)(param_1 + 8);\n  *puVar1 = 0;\n  *(undefined4 *)((long)puVar1 + 0xc) = 0;\n  *(undefined4 *)(puVar1 + 1) = 0;\n  if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }\n  FUN_0015217d(param_1,param_2,param_3,1);\n  FUN_0015132a(puVar1,0,7);\n  FUN_0015132a(puVar1,2,10);\n  FUN_0015132a(puVar1,2,3);\nLAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;\n  *param_4 = *puVar1;\n  *param_5 = *(undefined4 *)(puVar1 + 1);\n  return 1;\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "puVar1 = *(undefined8 **)(param_1 + 8);" (assignment_expression "puVar1 = *(undefined8 **)(param_1 + 8)" (identifier "puVar1") (= "=") (pointer_expression "*(undefined8 **)(param_1 + 8)" (* "*") (cast_expression "(undefined8 **)(param_1 + 8)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)((long)puVar1 + 0xc) = 0;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0xc) = 0" (pointer_expression "*(undefined4 *)((long)puVar1 + 0xc)" (* "*") (cast_expression "(undefined4 *)((long)puVar1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar1 + 0xc)" (( "(") (binary_expression "(long)puVar1 + 0xc" (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1")) (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(puVar1 + 1) = 0;" (assignment_expression "*(undefined4 *)(puVar1 + 1) = 0" (pointer_expression "*(undefined4 *)(puVar1 + 1)" (* "*") (cast_expression "(undefined4 *)(puVar1 + 1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(int *)((long)puVar1 + 0x1c) == 0) {\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }\n  else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" (if "if") (parenthesized_expression "(*(int *)((long)puVar1 + 0x1c) == 0)" (( "(") (binary_expression "*(int *)((long)puVar1 + 0x1c) == 0" (pointer_expression "*(int *)((long)puVar1 + 0x1c)" (* "*") (cast_expression "(int *)((long)puVar1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar1 + 0x1c)" (( "(") (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x1c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }\n  }" ({ "{") (if_statement "if (*(int *)(puVar1 + 4) != 0) {\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }" (if "if") (parenthesized_expression "(*(int *)(puVar1 + 4) != 0)" (( "(") (binary_expression "*(int *)(puVar1 + 4) != 0" (pointer_expression "*(int *)(puVar1 + 4)" (* "*") (cast_expression "(int *)(puVar1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 4)" (( "(") (binary_expression "puVar1 + 4" (identifier "puVar1") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0015132a(puVar1,0,7);\nLAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }\n      FUN_0015132a(puVar1,2,3);\n      goto LAB_00152830;\n    }" ({ "{") (expression_statement "FUN_0015132a(puVar1,0,7);" (call_expression "FUN_0015132a(puVar1,0,7)" (identifier "FUN_0015132a") (argument_list "(puVar1,0,7)" (( "(") (identifier "puVar1") (, ",") (number_literal "0") (, ",") (number_literal "7") () ")"))) (; ";")) (labeled_statement "LAB_00152816:\n      if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" (statement_identifier "LAB_00152816") (: ":") (if_statement "if (0 < (int)param_3) {\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" (if "if") (parenthesized_expression "(0 < (int)param_3)" (( "(") (binary_expression "0 < (int)param_3" (number_literal "0") (< "<") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3"))) () ")")) (compound_statement "{\n        do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);\n      }" ({ "{") (do_statement "do {\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        } while (0 < (int)param_3);" (do "do") (compound_statement "{\n          uVar2 = 0xffff;\n          if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }\n          FUN_0015132a(puVar1,0,3);\n          if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }\n          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);\n          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);\n          FUN_0015217d(param_1,param_2,uVar2,0);\n          param_3 = param_3 - uVar2;\n          param_2 = param_2 + (int)uVar2;\n        }" ({ "{") (expression_statement "uVar2 = 0xffff;" (assignment_expression "uVar2 = 0xffff" (identifier "uVar2") (= "=") (number_literal "0xffff")) (; ";")) (if_statement "if ((int)param_3 < 0x10000) {\n            uVar2 = param_3;\n          }" (if "if") (parenthesized_expression "((int)param_3 < 0x10000)" (( "(") (binary_expression "(int)param_3 < 0x10000" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (< "<") (number_literal "0x10000")) () ")")) (compound_statement "{\n            uVar2 = param_3;\n          }" ({ "{") (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" (identifier "uVar2") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "FUN_0015132a(puVar1,0,3);" (call_expression "FUN_0015132a(puVar1,0,3)" (identifier "FUN_0015132a") (argument_list "(puVar1,0,3)" (( "(") (identifier "puVar1") (, ",") (number_literal "0") (, ",") (number_literal "3") () ")"))) (; ";")) (if_statement "if (*(int *)(puVar1 + 3) != 0) {\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }" (if "if") (parenthesized_expression "(*(int *)(puVar1 + 3) != 0)" (( "(") (binary_expression "*(int *)(puVar1 + 3) != 0" (pointer_expression "*(int *)(puVar1 + 3)" (* "*") (cast_expression "(int *)(puVar1 + 3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 3)" (( "(") (binary_expression "puVar1 + 3" (identifier "puVar1") (+ "+") (number_literal "3")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));\n          }" ({ "{") (expression_statement "FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));" (call_expression "FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3))" (identifier "FUN_0015132a") (argument_list "(puVar1,0,8 - *(int *)(puVar1 + 3))" (( "(") (identifier "puVar1") (, ",") (number_literal "0") (, ",") (binary_expression "8 - *(int *)(puVar1 + 3)" (number_literal "8") (- "-") (pointer_expression "*(int *)(puVar1 + 3)" (* "*") (cast_expression "(int *)(puVar1 + 3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 3)" (( "(") (binary_expression "puVar1 + 3" (identifier "puVar1") (+ "+") (number_literal "3")) () ")"))))) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0015132a(puVar1,(long)(int)uVar2,0x10);" (call_expression "FUN_0015132a(puVar1,(long)(int)uVar2,0x10)" (identifier "FUN_0015132a") (argument_list "(puVar1,(long)(int)uVar2,0x10)" (( "(") (identifier "puVar1") (, ",") (cast_expression "(long)(int)uVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2"))) (, ",") (number_literal "0x10") () ")"))) (; ";")) (expression_statement "FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);" (call_expression "FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10)" (identifier "FUN_0015132a") (argument_list "(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10)" (( "(") (identifier "puVar1") (, ",") (cast_expression "(long)(int)(uVar2 ^ 0xffff)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(uVar2 ^ 0xffff)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar2 ^ 0xffff)" (( "(") (binary_expression "uVar2 ^ 0xffff" (identifier "uVar2") (^ "^") (number_literal "0xffff")) () ")")))) (, ",") (number_literal "0x10") () ")"))) (; ";")) (expression_statement "FUN_0015217d(param_1,param_2,uVar2,0);" (call_expression "FUN_0015217d(param_1,param_2,uVar2,0)" (identifier "FUN_0015217d") (argument_list "(param_1,param_2,uVar2,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "uVar2") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "param_3 = param_3 - uVar2;" (assignment_expression "param_3 = param_3 - uVar2" (identifier "param_3") (= "=") (binary_expression "param_3 - uVar2" (identifier "param_3") (- "-") (identifier "uVar2"))) (; ";")) (expression_statement "param_2 = param_2 + (int)uVar2;" (assignment_expression "param_2 = param_2 + (int)uVar2" (identifier "param_2") (= "=") (binary_expression "param_2 + (int)uVar2" (identifier "param_2") (+ "+") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0 < (int)param_3)" (( "(") (binary_expression "0 < (int)param_3" (number_literal "0") (< "<") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3"))) () ")")) (; ";")) (} "}")))) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" (identifier "FUN_0015132a") (argument_list "(puVar1,2,3)" (( "(") (identifier "puVar1") (, ",") (number_literal "2") (, ",") (number_literal "3") () ")"))) (; ";")) (goto_statement "goto LAB_00152830;" (goto "goto") (statement_identifier "LAB_00152830") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" (else "else") (compound_statement "{\n    FUN_0015132a(puVar1,0x9c78,0x10);\n    *(undefined4 *)((long)puVar1 + 0x1c) = 0;\n    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;\n    FUN_0015132a(puVar1,2,3);\n  }" ({ "{") (expression_statement "FUN_0015132a(puVar1,0x9c78,0x10);" (call_expression "FUN_0015132a(puVar1,0x9c78,0x10)" (identifier "FUN_0015132a") (argument_list "(puVar1,0x9c78,0x10)" (( "(") (identifier "puVar1") (, ",") (number_literal "0x9c78") (, ",") (number_literal "0x10") () ")"))) (; ";")) (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 0;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 0" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar1 + 0x1c)" (( "(") (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;" (if "if") (parenthesized_expression "(*(int *)(puVar1 + 4) != 0)" (( "(") (binary_expression "*(int *)(puVar1 + 4) != 0" (pointer_expression "*(int *)(puVar1 + 4)" (* "*") (cast_expression "(int *)(puVar1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 4)" (( "(") (binary_expression "puVar1 + 4" (identifier "puVar1") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00152816;" (goto "goto") (statement_identifier "LAB_00152816") (; ";"))) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" (identifier "FUN_0015132a") (argument_list "(puVar1,2,3)" (( "(") (identifier "puVar1") (, ",") (number_literal "2") (, ",") (number_literal "3") () ")"))) (; ";")) (} "}")))) (expression_statement "FUN_0015217d(param_1,param_2,param_3,1);" (call_expression "FUN_0015217d(param_1,param_2,param_3,1)" (identifier "FUN_0015217d") (argument_list "(param_1,param_2,param_3,1)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "FUN_0015132a(puVar1,0,7);" (call_expression "FUN_0015132a(puVar1,0,7)" (identifier "FUN_0015132a") (argument_list "(puVar1,0,7)" (( "(") (identifier "puVar1") (, ",") (number_literal "0") (, ",") (number_literal "7") () ")"))) (; ";")) (expression_statement "FUN_0015132a(puVar1,2,10);" (call_expression "FUN_0015132a(puVar1,2,10)" (identifier "FUN_0015132a") (argument_list "(puVar1,2,10)" (( "(") (identifier "puVar1") (, ",") (number_literal "2") (, ",") (number_literal "10") () ")"))) (; ";")) (expression_statement "FUN_0015132a(puVar1,2,3);" (call_expression "FUN_0015132a(puVar1,2,3)" (identifier "FUN_0015132a") (argument_list "(puVar1,2,3)" (( "(") (identifier "puVar1") (, ",") (number_literal "2") (, ",") (number_literal "3") () ")"))) (; ";")) (labeled_statement "LAB_00152830:\n  *(undefined4 *)(puVar1 + 4) = 0;" (statement_identifier "LAB_00152830") (: ":") (expression_statement "*(undefined4 *)(puVar1 + 4) = 0;" (assignment_expression "*(undefined4 *)(puVar1 + 4) = 0" (pointer_expression "*(undefined4 *)(puVar1 + 4)" (* "*") (cast_expression "(undefined4 *)(puVar1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 4)" (( "(") (binary_expression "puVar1 + 4" (identifier "puVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (number_literal "0")) (; ";"))) (expression_statement "*param_4 = *puVar1;" (assignment_expression "*param_4 = *puVar1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (expression_statement "*param_5 = *(undefined4 *)(puVar1 + 1);" (assignment_expression "*param_5 = *(undefined4 *)(puVar1 + 1)" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (pointer_expression "*(undefined4 *)(puVar1 + 1)" (* "*") (cast_expression "(undefined4 *)(puVar1 + 1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

int function_1(void *handle,type_1 *var_5,int var_2,type_1 **outblock,int *outlen)

{
  type_2 *out;
  type_3 var_3;
  
  out = *(type_2 **)((long)handle + 8);
  out->outbuf = (type_1 *)0x0;
  out->outsize = 0;
  out->outlen = 0;
  if (out->firstblock == 0) {
    if (out->comp_disabled != 0) {
      var_1(out,0,7);
LAB_00152816:
      if (0 < var_2) {
        do {
          var_3 = 0xffff;
          if (var_2 < 0x10000) {
            var_3 = var_2;
          }
          var_1(out,0,3);
          if (out->noutbits != 0) {
            var_1(out,0,8 - out->noutbits);
          }
          var_1(out,(long)(int)var_3,0x10);
          var_1(out,(long)(int)(var_3 ^ 0xffff),0x10);
          var_4((type_4 *)handle,var_5,var_3,0);
          var_2 = var_2 - var_3;
          var_5 = var_5 + (int)var_3;
        } while (0 < var_2);
      }
      var_1(out,2,3);
      goto LAB_00152830;
    }
  }
  else {
    var_1(out,0x9c78,0x10);
    out->firstblock = 0;
    if (out->comp_disabled != 0) goto LAB_00152816;
    var_1(out,2,3);
  }
  var_4((type_4 *)handle,var_5,var_2,1);
  var_1(out,0,7);
  var_1(out,2,10);
  var_1(out,2,3);
LAB_00152830:
  out->comp_disabled = 0;
  *outblock = out->outbuf;
  *outlen = out->outlen;
  return 1;
}


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

undefined8
MASKED(long param_1,long param_2,uint param_3,undefined8 *param_4,undefined4 *param_5)

{
  undefined8 *puVar1;
  uint uVar2;
  
  puVar1 = *(undefined8 **)(param_1 + 8);
  *puVar1 = 0;
  *(undefined4 *)((long)puVar1 + 0xc) = 0;
  *(undefined4 *)(puVar1 + 1) = 0;
  if (*(int *)((long)puVar1 + 0x1c) == 0) {
    if (*(int *)(puVar1 + 4) != 0) {
      FUN_0015132a(puVar1,0,7);
LAB_00152816:
      if (0 < (int)param_3) {
        do {
          uVar2 = 0xffff;
          if ((int)param_3 < 0x10000) {
            uVar2 = param_3;
          }
          FUN_0015132a(puVar1,0,3);
          if (*(int *)(puVar1 + 3) != 0) {
            FUN_0015132a(puVar1,0,8 - *(int *)(puVar1 + 3));
          }
          FUN_0015132a(puVar1,(long)(int)uVar2,0x10);
          FUN_0015132a(puVar1,(long)(int)(uVar2 ^ 0xffff),0x10);
          FUN_0015217d(param_1,param_2,uVar2,0);
          param_3 = param_3 - uVar2;
          param_2 = param_2 + (int)uVar2;
        } while (0 < (int)param_3);
      }
      FUN_0015132a(puVar1,2,3);
      goto LAB_00152830;
    }
  }
  else {
    FUN_0015132a(puVar1,0x9c78,0x10);
    *(undefined4 *)((long)puVar1 + 0x1c) = 0;
    if (*(int *)(puVar1 + 4) != 0) goto LAB_00152816;
    FUN_0015132a(puVar1,2,3);
  }
  FUN_0015217d(param_1,param_2,param_3,1);
  FUN_0015132a(puVar1,0,7);
  FUN_0015132a(puVar1,2,10);
  FUN_0015132a(puVar1,2,3);
LAB_00152830:
  *(undefined4 *)(puVar1 + 4) = 0;
  *param_4 = *puVar1;
  *param_5 = *(undefined4 *)(puVar1 + 1);
  return 1;
}

