
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

CURLcode gzip_init_writer(connectdata *conn,contenc_writer *writer)

{
  z_stream *z;
  int iVar1;
  CURLcode CVar2;
  byte *pbVar3;
  long lVar4;
  byte *pbVar5;
  undefined1 uVar6;
  undefined1 uVar7;
  byte bVar8;
  
  bVar8 = 0;
  uVar6 = 0;
  uVar7 = writer->downstream == (contenc_writer *)0x0;
  if ((bool)uVar7) {
    return CURLE_WRITE_ERROR;
  }
  z = (z_stream *)(writer + 1);
  writer[3].params = zalloc_cb;
  writer[4].handler = (content_encoding *)zfree_cb;
  pbVar3 = (byte *)zlibVersion();
  lVar4 = 8;
  pbVar5 = (byte *)"1.2.0.4";
  do {
    if (lVar4 == 0) break;
    lVar4 = lVar4 + -1;
    uVar6 = *pbVar3 < *pbVar5;
    uVar7 = *pbVar3 == *pbVar5;
    pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1;
    pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1;
  } while ((bool)uVar7);
  if (((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U) == 0) {
    iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70);
    if (iVar1 == 0) {
      *(undefined4 *)&writer->params = 6;
      CVar2 = CURLE_OK;
    }
    else {
      CVar2 = process_zlib_error(conn,z);
    }
  }
  else {
    iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);
    if (iVar1 == 0) {
      *(undefined4 *)((long)&writer->params + 4) = 8;
      *(undefined4 *)&writer->params = 1;
      CVar2 = CURLE_OK;
    }
    else {
      CVar2 = process_zlib_error(conn,z);
    }
  }
  return CVar2;
}



undefined8 FUN_001382f6(undefined8 param_1,long param_2)

{
  long lVar1;
  int iVar2;
  byte *pbVar3;
  undefined8 uVar4;
  long lVar5;
  byte *pbVar6;
  undefined1 uVar7;
  undefined1 uVar8;
  byte bVar9;
  
  bVar9 = 0;
  uVar7 = 0;
  uVar8 = *(long *)(param_2 + 8) == 0;
  if ((bool)uVar8) {
    return 0x17;
  }
  lVar1 = param_2 + 0x18;
  *(code **)(param_2 + 0x58) = FUN_00137ff3;
  *(code **)(param_2 + 0x60) = FUN_0013800b;
  pbVar3 = (byte *)zlibVersion();
  lVar5 = 8;
  pbVar6 = (byte *)"1.2.0.4";
  do {
    if (lVar5 == 0) break;
    lVar5 = lVar5 + -1;
    uVar7 = *pbVar3 < *pbVar6;
    uVar8 = *pbVar3 == *pbVar6;
    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;
    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;
  } while ((bool)uVar8);
  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {
    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);
    if (iVar2 == 0) {
      *(undefined4 *)(param_2 + 0x10) = 6;
      uVar4 = 0;
    }
    else {
      uVar4 = FUN_001381d1(param_1,lVar1);
    }
  }
  else {
    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);
    if (iVar2 == 0) {
      *(undefined4 *)(param_2 + 0x14) = 8;
      *(undefined4 *)(param_2 + 0x10) = 1;
      uVar4 = 0;
    }
    else {
      uVar4 = FUN_001381d1(param_1,lVar1);
    }
  }
  return uVar4;
}


CMP qword ptr [RSI + 0x8],0x0
JZ 0x001383be
PUSH R12
PUSH RBP
PUSH RBX
LEA R12,[RSI + 0x18]
MOV RBX,RSI
MOV RBP,RDI
LEA RAX,[0x137ff3]
MOV qword ptr [RSI + 0x58],RAX
LEA RAX,[0x13800b]
MOV qword ptr [RSI + 0x60],RAX
CALL 0x0010d330
MOV RSI,RAX
MOV ECX,0x8
LEA RDI,[0x171dfe]
CMPSB.REPE RDI,RSI
SETA AL
SBB AL,0x0
TEST AL,0x80
JNZ 0x0013837f
MOV ECX,0x70
LEA RDX,[0x171e06]
MOV ESI,0x2f
MOV RDI,R12
CALL 0x0010dd70
TEST EAX,EAX
JNZ 0x00138372
MOV dword ptr [RBX + 0x10],0x6
MOV EAX,0x0
POP RBX
POP RBP
POP R12
RET
MOV RSI,R12
MOV RDI,RBP
CALL 0x001381d1
JMP 0x0013836d
MOV ECX,0x70
LEA RDX,[0x171e06]
MOV ESI,0xfffffff1
MOV RDI,R12
CALL 0x0010dd70
TEST EAX,EAX
JNZ 0x001383b1
MOV dword ptr [RBX + 0x14],0x8
MOV dword ptr [RBX + 0x10],0x1
MOV EAX,0x0
JMP 0x0013836d
MOV RSI,R12
MOV RDI,RBP
CALL 0x001381d1
JMP 0x0013836d
MOV EAX,0x17
RET
(translation_unit "undefined8 FUN_001382f6(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}\n\n" (function_definition "undefined8 FUN_001382f6(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_001382f6(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "undefined1 uVar7;" type_identifier identifier ;) (declaration "undefined1 uVar8;" type_identifier identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar8 = *(long *)(param_2 + 8) == 0;" (assignment_expression "uVar8 = *(long *)(param_2 + 8) == 0" identifier = (binary_expression "*(long *)(param_2 + 8) == 0" (pointer_expression "*(long *)(param_2 + 8)" * (cast_expression "(long *)(param_2 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal)) ;) (if_statement "if ((bool)uVar8) {\n    return 0x17;\n  }" if (parenthesized_expression "((bool)uVar8)" ( (cast_expression "(bool)uVar8" ( (type_descriptor "bool" primitive_type) ) identifier) )) (compound_statement "{\n    return 0x17;\n  }" { (return_statement "return 0x17;" return number_literal ;) })) (expression_statement "lVar1 = param_2 + 0x18;" (assignment_expression "lVar1 = param_2 + 0x18" identifier = (binary_expression "param_2 + 0x18" identifier + number_literal)) ;) (expression_statement "*(code **)(param_2 + 0x58) = FUN_00137ff3;" (assignment_expression "*(code **)(param_2 + 0x58) = FUN_00137ff3" (pointer_expression "*(code **)(param_2 + 0x58)" * (cast_expression "(code **)(param_2 + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x58)" ( (binary_expression "param_2 + 0x58" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(code **)(param_2 + 0x60) = FUN_0013800b;" (assignment_expression "*(code **)(param_2 + 0x60) = FUN_0013800b" (pointer_expression "*(code **)(param_2 + 0x60)" * (cast_expression "(code **)(param_2 + 0x60)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x60)" ( (binary_expression "param_2 + 0x60" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar3 = (byte *)zlibVersion();" (assignment_expression "pbVar3 = (byte *)zlibVersion()" identifier = (cast_expression "(byte *)zlibVersion()" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "zlibVersion()" identifier (argument_list "()" ( ))))) ;) (expression_statement "lVar5 = 8;" (assignment_expression "lVar5 = 8" identifier = number_literal) ;) (expression_statement "pbVar6 = (byte *)"1.2.0.4";" (assignment_expression "pbVar6 = (byte *)"1.2.0.4"" identifier = (cast_expression "(byte *)"1.2.0.4"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""1.2.0.4"" " string_content "))) ;) (do_statement "do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);" do (compound_statement "{\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  }" { (if_statement "if (lVar5 == 0) break;" if (parenthesized_expression "(lVar5 == 0)" ( (binary_expression "lVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar5 = lVar5 + -1;" (assignment_expression "lVar5 = lVar5 + -1" identifier = (binary_expression "lVar5 + -1" identifier + number_literal)) ;) (expression_statement "uVar7 = *pbVar3 < *pbVar6;" (assignment_expression "uVar7 = *pbVar3 < *pbVar6" identifier = (binary_expression "*pbVar3 < *pbVar6" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "uVar8 = *pbVar3 == *pbVar6;" (assignment_expression "uVar8 = *pbVar3 == *pbVar6" identifier = (binary_expression "*pbVar3 == *pbVar6" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar3 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar3 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar6 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "((bool)uVar8)" ( (cast_expression "(bool)uVar8" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (if_statement "if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" if (parenthesized_expression "(((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0)" ( (binary_expression "((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0" (parenthesized_expression "((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U)" ( (binary_expression "(!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U" (binary_expression "(!(bool)uVar7 && !(bool)uVar8) - uVar7" (parenthesized_expression "(!(bool)uVar7 && !(bool)uVar8)" ( (binary_expression "!(bool)uVar7 && !(bool)uVar8" (unary_expression "!(bool)uVar7" ! (cast_expression "(bool)uVar7" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)uVar8" ! (cast_expression "(bool)uVar8" ( (type_descriptor "bool" primitive_type) ) identifier))) )) - identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" { (expression_statement "iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);" (assignment_expression "iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70)" identifier = (call_expression "inflateInit2_(lVar1,0x2f,"1.2.11",0x70)" identifier (argument_list "(lVar1,0x2f,"1.2.11",0x70)" ( identifier , number_literal , (string_literal ""1.2.11"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }" { (expression_statement "*(undefined4 *)(param_2 + 0x10) = 6;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = 6" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" else (compound_statement "{\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" { (expression_statement "uVar4 = FUN_001381d1(param_1,lVar1);" (assignment_expression "uVar4 = FUN_001381d1(param_1,lVar1)" identifier = (call_expression "FUN_001381d1(param_1,lVar1)" identifier (argument_list "(param_1,lVar1)" ( identifier , identifier )))) ;) }))) }) (else_clause "else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" else (compound_statement "{\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" { (expression_statement "iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);" (assignment_expression "iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70)" identifier = (call_expression "inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70)" identifier (argument_list "(lVar1,0xfffffff1,"1.2.11",0x70)" ( identifier , number_literal , (string_literal ""1.2.11"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }" { (expression_statement "*(undefined4 *)(param_2 + 0x14) = 8;" (assignment_expression "*(undefined4 *)(param_2 + 0x14) = 8" (pointer_expression "*(undefined4 *)(param_2 + 0x14)" * (cast_expression "(undefined4 *)(param_2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x14)" ( (binary_expression "param_2 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_2 + 0x10) = 1;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = 1" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" else (compound_statement "{\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" { (expression_statement "uVar4 = FUN_001381d1(param_1,lVar1);" (assignment_expression "uVar4 = FUN_001381d1(param_1,lVar1)" identifier = (call_expression "FUN_001381d1(param_1,lVar1)" identifier (argument_list "(param_1,lVar1)" ( identifier , identifier )))) ;) }))) }))) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode gzip_init_writer(connectdata *conn,contenc_writer *writer)\n\n{\n  z_stream *z;\n  int iVar1;\n  CURLcode CVar2;\n  byte *pbVar3;\n  long lVar4;\n  byte *pbVar5;\n  undefined1 uVar6;\n  undefined1 uVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar6 = 0;\n  uVar7 = writer->downstream == (contenc_writer *)0x0;\n  if ((bool)uVar7) {\n    return CURLE_WRITE_ERROR;\n  }\n  z = (z_stream *)(writer + 1);\n  writer[3].params = zalloc_cb;\n  writer[4].handler = (content_encoding *)zfree_cb;\n  pbVar3 = (byte *)zlibVersion();\n  lVar4 = 8;\n  pbVar5 = (byte *)"1.2.0.4";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    uVar6 = *pbVar3 < *pbVar5;\n    uVar7 = *pbVar3 == *pbVar5;\n    pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1;\n    pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1;\n  } while ((bool)uVar7);\n  if (((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U) == 0) {\n    iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)&writer->params = 6;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }\n  else {\n    iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }\n  return CVar2;\n}\n\n" comment (function_definition "CURLcode gzip_init_writer(connectdata *conn,contenc_writer *writer)\n\n{\n  z_stream *z;\n  int iVar1;\n  CURLcode CVar2;\n  byte *pbVar3;\n  long lVar4;\n  byte *pbVar5;\n  undefined1 uVar6;\n  undefined1 uVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar6 = 0;\n  uVar7 = writer->downstream == (contenc_writer *)0x0;\n  if ((bool)uVar7) {\n    return CURLE_WRITE_ERROR;\n  }\n  z = (z_stream *)(writer + 1);\n  writer[3].params = zalloc_cb;\n  writer[4].handler = (content_encoding *)zfree_cb;\n  pbVar3 = (byte *)zlibVersion();\n  lVar4 = 8;\n  pbVar5 = (byte *)"1.2.0.4";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    uVar6 = *pbVar3 < *pbVar5;\n    uVar7 = *pbVar3 == *pbVar5;\n    pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1;\n    pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1;\n  } while ((bool)uVar7);\n  if (((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U) == 0) {\n    iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)&writer->params = 6;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }\n  else {\n    iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }\n  return CVar2;\n}" type_identifier (function_declarator "gzip_init_writer(connectdata *conn,contenc_writer *writer)" identifier (parameter_list "(connectdata *conn,contenc_writer *writer)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "contenc_writer *writer" type_identifier (pointer_declarator "*writer" * identifier)) ))) (compound_statement "{\n  z_stream *z;\n  int iVar1;\n  CURLcode CVar2;\n  byte *pbVar3;\n  long lVar4;\n  byte *pbVar5;\n  undefined1 uVar6;\n  undefined1 uVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar6 = 0;\n  uVar7 = writer->downstream == (contenc_writer *)0x0;\n  if ((bool)uVar7) {\n    return CURLE_WRITE_ERROR;\n  }\n  z = (z_stream *)(writer + 1);\n  writer[3].params = zalloc_cb;\n  writer[4].handler = (content_encoding *)zfree_cb;\n  pbVar3 = (byte *)zlibVersion();\n  lVar4 = 8;\n  pbVar5 = (byte *)"1.2.0.4";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    uVar6 = *pbVar3 < *pbVar5;\n    uVar7 = *pbVar3 == *pbVar5;\n    pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1;\n    pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1;\n  } while ((bool)uVar7);\n  if (((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U) == 0) {\n    iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)&writer->params = 6;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }\n  else {\n    iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }\n  return CVar2;\n}" { (declaration "z_stream *z;" type_identifier (pointer_declarator "*z" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "CURLcode CVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "undefined1 uVar6;" type_identifier identifier ;) (declaration "undefined1 uVar7;" type_identifier identifier ;) (declaration "byte bVar8;" type_identifier identifier ;) (expression_statement "bVar8 = 0;" (assignment_expression "bVar8 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar7 = writer->downstream == (contenc_writer *)0x0;" (assignment_expression "uVar7 = writer->downstream == (contenc_writer *)0x0" identifier = (binary_expression "writer->downstream == (contenc_writer *)0x0" (field_expression "writer->downstream" identifier -> field_identifier) == (cast_expression "(contenc_writer *)0x0" ( (type_descriptor "contenc_writer *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (if_statement "if ((bool)uVar7) {\n    return CURLE_WRITE_ERROR;\n  }" if (parenthesized_expression "((bool)uVar7)" ( (cast_expression "(bool)uVar7" ( (type_descriptor "bool" primitive_type) ) identifier) )) (compound_statement "{\n    return CURLE_WRITE_ERROR;\n  }" { (return_statement "return CURLE_WRITE_ERROR;" return identifier ;) })) (expression_statement "z = (z_stream *)(writer + 1);" (assignment_expression "z = (z_stream *)(writer + 1)" identifier = (cast_expression "(z_stream *)(writer + 1)" ( (type_descriptor "z_stream *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(writer + 1)" ( (binary_expression "writer + 1" identifier + number_literal) )))) ;) (expression_statement "writer[3].params = zalloc_cb;" (assignment_expression "writer[3].params = zalloc_cb" (field_expression "writer[3].params" (subscript_expression "writer[3]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "writer[4].handler = (content_encoding *)zfree_cb;" (assignment_expression "writer[4].handler = (content_encoding *)zfree_cb" (field_expression "writer[4].handler" (subscript_expression "writer[4]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(content_encoding *)zfree_cb" ( (type_descriptor "content_encoding *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar3 = (byte *)zlibVersion();" (assignment_expression "pbVar3 = (byte *)zlibVersion()" identifier = (cast_expression "(byte *)zlibVersion()" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "zlibVersion()" identifier (argument_list "()" ( ))))) ;) (expression_statement "lVar4 = 8;" (assignment_expression "lVar4 = 8" identifier = number_literal) ;) (expression_statement "pbVar5 = (byte *)"1.2.0.4";" (assignment_expression "pbVar5 = (byte *)"1.2.0.4"" identifier = (cast_expression "(byte *)"1.2.0.4"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""1.2.0.4"" " string_content "))) ;) (do_statement "do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    uVar6 = *pbVar3 < *pbVar5;\n    uVar7 = *pbVar3 == *pbVar5;\n    pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1;\n    pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1;\n  } while ((bool)uVar7);" do (compound_statement "{\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    uVar6 = *pbVar3 < *pbVar5;\n    uVar7 = *pbVar3 == *pbVar5;\n    pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1;\n    pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1;\n  }" { (if_statement "if (lVar4 == 0) break;" if (parenthesized_expression "(lVar4 == 0)" ( (binary_expression "lVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar4 = lVar4 + -1;" (assignment_expression "lVar4 = lVar4 + -1" identifier = (binary_expression "lVar4 + -1" identifier + number_literal)) ;) (expression_statement "uVar6 = *pbVar3 < *pbVar5;" (assignment_expression "uVar6 = *pbVar3 < *pbVar5" identifier = (binary_expression "*pbVar3 < *pbVar5" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "uVar7 = *pbVar3 == *pbVar5;" (assignment_expression "uVar7 = *pbVar3 == *pbVar5" identifier = (binary_expression "*pbVar3 == *pbVar5" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1;" (assignment_expression "pbVar3 = pbVar3 + (ulong)bVar8 * -2 + 1" identifier = (binary_expression "pbVar3 + (ulong)bVar8 * -2 + 1" (binary_expression "pbVar3 + (ulong)bVar8 * -2" identifier + (binary_expression "(ulong)bVar8 * -2" (cast_expression "(ulong)bVar8" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (ulong)bVar8 * -2 + 1" identifier = (binary_expression "pbVar5 + (ulong)bVar8 * -2 + 1" (binary_expression "pbVar5 + (ulong)bVar8 * -2" identifier + (binary_expression "(ulong)bVar8 * -2" (cast_expression "(ulong)bVar8" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "((bool)uVar7)" ( (cast_expression "(bool)uVar7" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (if_statement "if (((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U) == 0) {\n    iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)&writer->params = 6;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }\n  else {\n    iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }" if (parenthesized_expression "(((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U) == 0)" ( (binary_expression "((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U) == 0" (parenthesized_expression "((!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U)" ( (binary_expression "(!(bool)uVar6 && !(bool)uVar7) - uVar6 & 0x80U" (binary_expression "(!(bool)uVar6 && !(bool)uVar7) - uVar6" (parenthesized_expression "(!(bool)uVar6 && !(bool)uVar7)" ( (binary_expression "!(bool)uVar6 && !(bool)uVar7" (unary_expression "!(bool)uVar6" ! (cast_expression "(bool)uVar6" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)uVar7" ! (cast_expression "(bool)uVar7" ( (type_descriptor "bool" primitive_type) ) identifier))) )) - identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)&writer->params = 6;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }" { (expression_statement "iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70);" (assignment_expression "iVar1 = inflateInit2_(z,0x2f,"1.2.11",0x70)" identifier = (call_expression "inflateInit2_(z,0x2f,"1.2.11",0x70)" identifier (argument_list "(z,0x2f,"1.2.11",0x70)" ( identifier , number_literal , (string_literal ""1.2.11"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      *(undefined4 *)&writer->params = 6;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)&writer->params = 6;\n      CVar2 = CURLE_OK;\n    }" { (expression_statement "*(undefined4 *)&writer->params = 6;" (assignment_expression "*(undefined4 *)&writer->params = 6" (pointer_expression "*(undefined4 *)&writer->params" * (cast_expression "(undefined4 *)&writer->params" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&writer->params" & (field_expression "writer->params" identifier -> field_identifier)))) = number_literal) ;) (expression_statement "CVar2 = CURLE_OK;" (assignment_expression "CVar2 = CURLE_OK" identifier = identifier) ;) }) (else_clause "else {\n      CVar2 = process_zlib_error(conn,z);\n    }" else (compound_statement "{\n      CVar2 = process_zlib_error(conn,z);\n    }" { (expression_statement "CVar2 = process_zlib_error(conn,z);" (assignment_expression "CVar2 = process_zlib_error(conn,z)" identifier = (call_expression "process_zlib_error(conn,z)" identifier (argument_list "(conn,z)" ( identifier , identifier )))) ;) }))) }) (else_clause "else {\n    iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }" else (compound_statement "{\n    iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);\n    if (iVar1 == 0) {\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }\n  }" { (expression_statement "iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70);" (assignment_expression "iVar1 = inflateInit2_(z,0xfffffff1,"1.2.11",0x70)" identifier = (call_expression "inflateInit2_(z,0xfffffff1,"1.2.11",0x70)" identifier (argument_list "(z,0xfffffff1,"1.2.11",0x70)" ( identifier , number_literal , (string_literal ""1.2.11"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }\n    else {\n      CVar2 = process_zlib_error(conn,z);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)((long)&writer->params + 4) = 8;\n      *(undefined4 *)&writer->params = 1;\n      CVar2 = CURLE_OK;\n    }" { (expression_statement "*(undefined4 *)((long)&writer->params + 4) = 8;" (assignment_expression "*(undefined4 *)((long)&writer->params + 4) = 8" (pointer_expression "*(undefined4 *)((long)&writer->params + 4)" * (cast_expression "(undefined4 *)((long)&writer->params + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)&writer->params + 4)" ( (binary_expression "(long)&writer->params + 4" (cast_expression "(long)&writer->params" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&writer->params" & (field_expression "writer->params" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)&writer->params = 1;" (assignment_expression "*(undefined4 *)&writer->params = 1" (pointer_expression "*(undefined4 *)&writer->params" * (cast_expression "(undefined4 *)&writer->params" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&writer->params" & (field_expression "writer->params" identifier -> field_identifier)))) = number_literal) ;) (expression_statement "CVar2 = CURLE_OK;" (assignment_expression "CVar2 = CURLE_OK" identifier = identifier) ;) }) (else_clause "else {\n      CVar2 = process_zlib_error(conn,z);\n    }" else (compound_statement "{\n      CVar2 = process_zlib_error(conn,z);\n    }" { (expression_statement "CVar2 = process_zlib_error(conn,z);" (assignment_expression "CVar2 = process_zlib_error(conn,z)" identifier = (call_expression "process_zlib_error(conn,z)" identifier (argument_list "(conn,z)" ( identifier , identifier )))) ;) }))) }))) (return_statement "return CVar2;" return identifier ;) })))
(translation_unit "undefined8 FUN_001382f6(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}\n\n" (function_definition "undefined8 FUN_001382f6(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_001382f6(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "undefined1 uVar7;" type_identifier identifier ;) (declaration "undefined1 uVar8;" type_identifier identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar8 = *(long *)(param_2 + 8) == 0;" (assignment_expression "uVar8 = *(long *)(param_2 + 8) == 0" identifier = (binary_expression "*(long *)(param_2 + 8) == 0" (pointer_expression "*(long *)(param_2 + 8)" * (cast_expression "(long *)(param_2 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal)) ;) (if_statement "if ((bool)uVar8) {\n    return 0x17;\n  }" if (parenthesized_expression "((bool)uVar8)" ( (cast_expression "(bool)uVar8" ( (type_descriptor "bool" primitive_type) ) identifier) )) (compound_statement "{\n    return 0x17;\n  }" { (return_statement "return 0x17;" return number_literal ;) })) (expression_statement "lVar1 = param_2 + 0x18;" (assignment_expression "lVar1 = param_2 + 0x18" identifier = (binary_expression "param_2 + 0x18" identifier + number_literal)) ;) (expression_statement "*(code **)(param_2 + 0x58) = FUN_00137ff3;" (assignment_expression "*(code **)(param_2 + 0x58) = FUN_00137ff3" (pointer_expression "*(code **)(param_2 + 0x58)" * (cast_expression "(code **)(param_2 + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x58)" ( (binary_expression "param_2 + 0x58" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(code **)(param_2 + 0x60) = FUN_0013800b;" (assignment_expression "*(code **)(param_2 + 0x60) = FUN_0013800b" (pointer_expression "*(code **)(param_2 + 0x60)" * (cast_expression "(code **)(param_2 + 0x60)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x60)" ( (binary_expression "param_2 + 0x60" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar3 = (byte *)zlibVersion();" (assignment_expression "pbVar3 = (byte *)zlibVersion()" identifier = (cast_expression "(byte *)zlibVersion()" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "zlibVersion()" identifier (argument_list "()" ( ))))) ;) (expression_statement "lVar5 = 8;" (assignment_expression "lVar5 = 8" identifier = number_literal) ;) (expression_statement "pbVar6 = (byte *)"1.2.0.4";" (assignment_expression "pbVar6 = (byte *)"1.2.0.4"" identifier = (cast_expression "(byte *)"1.2.0.4"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""1.2.0.4"" " string_content "))) ;) (do_statement "do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);" do (compound_statement "{\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  }" { (if_statement "if (lVar5 == 0) break;" if (parenthesized_expression "(lVar5 == 0)" ( (binary_expression "lVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar5 = lVar5 + -1;" (assignment_expression "lVar5 = lVar5 + -1" identifier = (binary_expression "lVar5 + -1" identifier + number_literal)) ;) (expression_statement "uVar7 = *pbVar3 < *pbVar6;" (assignment_expression "uVar7 = *pbVar3 < *pbVar6" identifier = (binary_expression "*pbVar3 < *pbVar6" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "uVar8 = *pbVar3 == *pbVar6;" (assignment_expression "uVar8 = *pbVar3 == *pbVar6" identifier = (binary_expression "*pbVar3 == *pbVar6" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar3 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar3 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar6 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "((bool)uVar8)" ( (cast_expression "(bool)uVar8" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (if_statement "if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" if (parenthesized_expression "(((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0)" ( (binary_expression "((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0" (parenthesized_expression "((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U)" ( (binary_expression "(!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U" (binary_expression "(!(bool)uVar7 && !(bool)uVar8) - uVar7" (parenthesized_expression "(!(bool)uVar7 && !(bool)uVar8)" ( (binary_expression "!(bool)uVar7 && !(bool)uVar8" (unary_expression "!(bool)uVar7" ! (cast_expression "(bool)uVar7" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)uVar8" ! (cast_expression "(bool)uVar8" ( (type_descriptor "bool" primitive_type) ) identifier))) )) - identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" { (expression_statement "iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);" (assignment_expression "iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70)" identifier = (call_expression "inflateInit2_(lVar1,0x2f,"1.2.11",0x70)" identifier (argument_list "(lVar1,0x2f,"1.2.11",0x70)" ( identifier , number_literal , (string_literal ""1.2.11"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }" { (expression_statement "*(undefined4 *)(param_2 + 0x10) = 6;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = 6" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" else (compound_statement "{\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" { (expression_statement "uVar4 = FUN_001381d1(param_1,lVar1);" (assignment_expression "uVar4 = FUN_001381d1(param_1,lVar1)" identifier = (call_expression "FUN_001381d1(param_1,lVar1)" identifier (argument_list "(param_1,lVar1)" ( identifier , identifier )))) ;) }))) }) (else_clause "else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" else (compound_statement "{\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" { (expression_statement "iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);" (assignment_expression "iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70)" identifier = (call_expression "inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70)" identifier (argument_list "(lVar1,0xfffffff1,"1.2.11",0x70)" ( identifier , number_literal , (string_literal ""1.2.11"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }" { (expression_statement "*(undefined4 *)(param_2 + 0x14) = 8;" (assignment_expression "*(undefined4 *)(param_2 + 0x14) = 8" (pointer_expression "*(undefined4 *)(param_2 + 0x14)" * (cast_expression "(undefined4 *)(param_2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x14)" ( (binary_expression "param_2 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_2 + 0x10) = 1;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = 1" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" else (compound_statement "{\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" { (expression_statement "uVar4 = FUN_001381d1(param_1,lVar1);" (assignment_expression "uVar4 = FUN_001381d1(param_1,lVar1)" identifier = (call_expression "FUN_001381d1(param_1,lVar1)" identifier (argument_list "(param_1,lVar1)" ( identifier , identifier )))) ;) }))) }))) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT)) ;) (if_statement if (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE) ) IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (string_literal " string_content "))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) }) while (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE) ) IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! (cast_expression ( (type_descriptor TYPE) ) IDENT)) && (unary_expression ! (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) - IDENT) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) }))) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8 FUN_001382f6(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}" (type_identifier "undefined8") (function_declarator "FUN_001382f6(undefined8 param_1,long param_2)" (identifier "FUN_001382f6") (parameter_list "(undefined8 param_1,long param_2)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  byte *pbVar3;\n  undefined8 uVar4;\n  long lVar5;\n  byte *pbVar6;\n  undefined1 uVar7;\n  undefined1 uVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  uVar7 = 0;\n  uVar8 = *(long *)(param_2 + 8) == 0;\n  if ((bool)uVar8) {\n    return 0x17;\n  }\n  lVar1 = param_2 + 0x18;\n  *(code **)(param_2 + 0x58) = FUN_00137ff3;\n  *(code **)(param_2 + 0x60) = FUN_0013800b;\n  pbVar3 = (byte *)zlibVersion();\n  lVar5 = 8;\n  pbVar6 = (byte *)"1.2.0.4";\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);\n  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  return uVar4;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "undefined1 uVar7;" (type_identifier "undefined1") (identifier "uVar7") (; ";")) (declaration "undefined1 uVar8;" (type_identifier "undefined1") (identifier "uVar8") (; ";")) (declaration "byte bVar9;" (type_identifier "byte") (identifier "bVar9") (; ";")) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" (identifier "bVar9") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar8 = *(long *)(param_2 + 8) == 0;" (assignment_expression "uVar8 = *(long *)(param_2 + 8) == 0" (identifier "uVar8") (= "=") (binary_expression "*(long *)(param_2 + 8) == 0" (pointer_expression "*(long *)(param_2 + 8)" (* "*") (cast_expression "(long *)(param_2 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (== "==") (number_literal "0"))) (; ";")) (if_statement "if ((bool)uVar8) {\n    return 0x17;\n  }" (if "if") (parenthesized_expression "((bool)uVar8)" (( "(") (cast_expression "(bool)uVar8" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "uVar8")) () ")")) (compound_statement "{\n    return 0x17;\n  }" ({ "{") (return_statement "return 0x17;" (return "return") (number_literal "0x17") (; ";")) (} "}"))) (expression_statement "lVar1 = param_2 + 0x18;" (assignment_expression "lVar1 = param_2 + 0x18" (identifier "lVar1") (= "=") (binary_expression "param_2 + 0x18" (identifier "param_2") (+ "+") (number_literal "0x18"))) (; ";")) (expression_statement "*(code **)(param_2 + 0x58) = FUN_00137ff3;" (assignment_expression "*(code **)(param_2 + 0x58) = FUN_00137ff3" (pointer_expression "*(code **)(param_2 + 0x58)" (* "*") (cast_expression "(code **)(param_2 + 0x58)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x58)" (( "(") (binary_expression "param_2 + 0x58" (identifier "param_2") (+ "+") (number_literal "0x58")) () ")")))) (= "=") (identifier "FUN_00137ff3")) (; ";")) (expression_statement "*(code **)(param_2 + 0x60) = FUN_0013800b;" (assignment_expression "*(code **)(param_2 + 0x60) = FUN_0013800b" (pointer_expression "*(code **)(param_2 + 0x60)" (* "*") (cast_expression "(code **)(param_2 + 0x60)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x60)" (( "(") (binary_expression "param_2 + 0x60" (identifier "param_2") (+ "+") (number_literal "0x60")) () ")")))) (= "=") (identifier "FUN_0013800b")) (; ";")) (expression_statement "pbVar3 = (byte *)zlibVersion();" (assignment_expression "pbVar3 = (byte *)zlibVersion()" (identifier "pbVar3") (= "=") (cast_expression "(byte *)zlibVersion()" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "zlibVersion()" (identifier "zlibVersion") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "lVar5 = 8;" (assignment_expression "lVar5 = 8" (identifier "lVar5") (= "=") (number_literal "8")) (; ";")) (expression_statement "pbVar6 = (byte *)"1.2.0.4";" (assignment_expression "pbVar6 = (byte *)"1.2.0.4"" (identifier "pbVar6") (= "=") (cast_expression "(byte *)"1.2.0.4"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""1.2.0.4"" (" """) (string_content "1.2.0.4") (" """)))) (; ";")) (do_statement "do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while ((bool)uVar8);" (do "do") (compound_statement "{\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    uVar7 = *pbVar3 < *pbVar6;\n    uVar8 = *pbVar3 == *pbVar6;\n    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  }" ({ "{") (if_statement "if (lVar5 == 0) break;" (if "if") (parenthesized_expression "(lVar5 == 0)" (( "(") (binary_expression "lVar5 == 0" (identifier "lVar5") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar5 = lVar5 + -1;" (assignment_expression "lVar5 = lVar5 + -1" (identifier "lVar5") (= "=") (binary_expression "lVar5 + -1" (identifier "lVar5") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar7 = *pbVar3 < *pbVar6;" (assignment_expression "uVar7 = *pbVar3 < *pbVar6" (identifier "uVar7") (= "=") (binary_expression "*pbVar3 < *pbVar6" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (< "<") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) (; ";")) (expression_statement "uVar8 = *pbVar3 == *pbVar6;" (assignment_expression "uVar8 = *pbVar3 == *pbVar6" (identifier "uVar8") (= "=") (binary_expression "*pbVar3 == *pbVar6" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (== "==") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) (; ";")) (expression_statement "pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar3 + (ulong)bVar9 * -2" (identifier "pbVar3") (+ "+") (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar6 + (ulong)bVar9 * -2" (identifier "pbVar6") (+ "+") (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((bool)uVar8)" (( "(") (cast_expression "(bool)uVar8" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "uVar8")) () ")")) (; ";")) (if_statement "if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }\n  else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" (if "if") (parenthesized_expression "(((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0)" (( "(") (binary_expression "((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0" (parenthesized_expression "((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U)" (( "(") (binary_expression "(!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U" (binary_expression "(!(bool)uVar7 && !(bool)uVar8) - uVar7" (parenthesized_expression "(!(bool)uVar7 && !(bool)uVar8)" (( "(") (binary_expression "!(bool)uVar7 && !(bool)uVar8" (unary_expression "!(bool)uVar7" (! "!") (cast_expression "(bool)uVar7" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "uVar7"))) (&& "&&") (unary_expression "!(bool)uVar8" (! "!") (cast_expression "(bool)uVar8" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "uVar8")))) () ")")) (- "-") (identifier "uVar7")) (& "&") (number_literal "0x80U")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" ({ "{") (expression_statement "iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);" (assignment_expression "iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70)" (identifier "iVar2") (= "=") (call_expression "inflateInit2_(lVar1,0x2f,"1.2.11",0x70)" (identifier "inflateInit2_") (argument_list "(lVar1,0x2f,"1.2.11",0x70)" (( "(") (identifier "lVar1") (, ",") (number_literal "0x2f") (, ",") (string_literal ""1.2.11"" (" """) (string_content "1.2.11") (" """)) (, ",") (number_literal "0x70") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined4 *)(param_2 + 0x10) = 6;\n      uVar4 = 0;\n    }" ({ "{") (expression_statement "*(undefined4 *)(param_2 + 0x10) = 6;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = 6" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "6")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" (else "else") (compound_statement "{\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" ({ "{") (expression_statement "uVar4 = FUN_001381d1(param_1,lVar1);" (assignment_expression "uVar4 = FUN_001381d1(param_1,lVar1)" (identifier "uVar4") (= "=") (call_expression "FUN_001381d1(param_1,lVar1)" (identifier "FUN_001381d1") (argument_list "(param_1,lVar1)" (( "(") (identifier "param_1") (, ",") (identifier "lVar1") () ")")))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" (else "else") (compound_statement "{\n    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);\n    if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }\n  }" ({ "{") (expression_statement "iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);" (assignment_expression "iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70)" (identifier "iVar2") (= "=") (call_expression "inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70)" (identifier "inflateInit2_") (argument_list "(lVar1,0xfffffff1,"1.2.11",0x70)" (( "(") (identifier "lVar1") (, ",") (number_literal "0xfffffff1") (, ",") (string_literal ""1.2.11"" (" """) (string_content "1.2.11") (" """)) (, ",") (number_literal "0x70") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined4 *)(param_2 + 0x14) = 8;\n      *(undefined4 *)(param_2 + 0x10) = 1;\n      uVar4 = 0;\n    }" ({ "{") (expression_statement "*(undefined4 *)(param_2 + 0x14) = 8;" (assignment_expression "*(undefined4 *)(param_2 + 0x14) = 8" (pointer_expression "*(undefined4 *)(param_2 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x14)" (( "(") (binary_expression "param_2 + 0x14" (identifier "param_2") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "8")) (; ";")) (expression_statement "*(undefined4 *)(param_2 + 0x10) = 1;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = 1" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" (else "else") (compound_statement "{\n      uVar4 = FUN_001381d1(param_1,lVar1);\n    }" ({ "{") (expression_statement "uVar4 = FUN_001381d1(param_1,lVar1);" (assignment_expression "uVar4 = FUN_001381d1(param_1,lVar1)" (identifier "uVar4") (= "=") (call_expression "FUN_001381d1(param_1,lVar1)" (identifier "FUN_001381d1") (argument_list "(param_1,lVar1)" (( "(") (identifier "param_1") (, ",") (identifier "lVar1") () ")")))) (; ";")) (} "}")))) (} "}")))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(type_2 *conn,type_3 *var_1)

{
  type_4 *z;
  int var_8;
  type_1 CVar2;
  type_5 *var_4;
  long var_3;
  type_5 *var_5;
  type_6 var_6;
  type_6 uVar7;
  type_5 bVar8;
  
  bVar8 = 0;
  var_6 = 0;
  uVar7 = var_1->downstream == (type_3 *)0x0;
  if ((bool)uVar7) {
    return CURLE_WRITE_ERROR;
  }
  z = (type_4 *)(var_1 + 1);
  var_1[3].params = zalloc_cb;
  var_1[4].handler = (type_7 *)zfree_cb;
  var_4 = (type_5 *)var_2();
  var_3 = 8;
  var_5 = (type_5 *)"1.2.0.4";
  do {
    if (var_3 == 0) break;
    var_3 = var_3 + -1;
    var_6 = *var_4 < *var_5;
    uVar7 = *var_4 == *var_5;
    var_4 = var_4 + (type_8)bVar8 * -2 + 1;
    var_5 = var_5 + (type_8)bVar8 * -2 + 1;
  } while ((bool)uVar7);
  if (((!(bool)var_6 && !(bool)uVar7) - var_6 & 0x80U) == 0) {
    var_8 = var_7(z,0x2f,"1.2.11",0x70);
    if (var_8 == 0) {
      *(type_9 *)&var_1->params = 6;
      CVar2 = CURLE_OK;
    }
    else {
      CVar2 = var_9(conn,z);
    }
  }
  else {
    var_8 = var_7(z,0xfffffff1,"1.2.11",0x70);
    if (var_8 == 0) {
      *(type_9 *)((long)&var_1->params + 4) = 8;
      *(type_9 *)&var_1->params = 1;
      CVar2 = CURLE_OK;
    }
    else {
      CVar2 = var_9(conn,z);
    }
  }
  return CVar2;
}


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

undefined8 MASKED(undefined8 param_1,long param_2)

{
  long lVar1;
  int iVar2;
  byte *pbVar3;
  undefined8 uVar4;
  long lVar5;
  byte *pbVar6;
  undefined1 uVar7;
  undefined1 uVar8;
  byte bVar9;
  
  bVar9 = 0;
  uVar7 = 0;
  uVar8 = *(long *)(param_2 + 8) == 0;
  if ((bool)uVar8) {
    return 0x17;
  }
  lVar1 = param_2 + 0x18;
  *(code **)(param_2 + 0x58) = FUN_00137ff3;
  *(code **)(param_2 + 0x60) = FUN_0013800b;
  pbVar3 = (byte *)zlibVersion();
  lVar5 = 8;
  pbVar6 = (byte *)"1.2.0.4";
  do {
    if (lVar5 == 0) break;
    lVar5 = lVar5 + -1;
    uVar7 = *pbVar3 < *pbVar6;
    uVar8 = *pbVar3 == *pbVar6;
    pbVar3 = pbVar3 + (ulong)bVar9 * -2 + 1;
    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;
  } while ((bool)uVar8);
  if (((!(bool)uVar7 && !(bool)uVar8) - uVar7 & 0x80U) == 0) {
    iVar2 = inflateInit2_(lVar1,0x2f,"1.2.11",0x70);
    if (iVar2 == 0) {
      *(undefined4 *)(param_2 + 0x10) = 6;
      uVar4 = 0;
    }
    else {
      uVar4 = FUN_001381d1(param_1,lVar1);
    }
  }
  else {
    iVar2 = inflateInit2_(lVar1,0xfffffff1,"1.2.11",0x70);
    if (iVar2 == 0) {
      *(undefined4 *)(param_2 + 0x14) = 8;
      *(undefined4 *)(param_2 + 0x10) = 1;
      uVar4 = 0;
    }
    else {
      uVar4 = FUN_001381d1(param_1,lVar1);
    }
  }
  return uVar4;
}

