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

CURLcode Curl_read(connectdata *conn,curl_socket_t sockfd,char *buf,size_t sizerequested,ssize_t *n)

{
  Curl_easy *pCVar1;
  _Bool _Var2;
  CURLcode CVar3;
  size_t __n;
  size_t sVar4;
  ulong __n_00;
  long in_FS_OFFSET;
  bool bVar5;
  CURLcode result;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  result = CURLE_RECV_ERROR;
  pCVar1 = conn->data;
  _Var2 = Curl_pipeline_wanted(pCVar1->multi,1);
  if ((_Var2) && (conn->bundle->multiuse == 1)) {
    bVar5 = conn->sock[1] == sockfd;
    *n = 0;
    __n_00 = conn->buf_len - conn->read_pos;
    if (sizerequested < __n_00) {
      __n_00 = sizerequested;
    }
    if (__n_00 != 0) {
      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);
      conn->read_pos = conn->read_pos + __n_00;
      (conn->bits).stream_was_rewound = false;
      *n = __n_00;
      CVar3 = CURLE_OK;
      goto LAB_0011a749;
    }
    sVar4 = 0x4000;
    if (sizerequested < 0x4001) {
      sVar4 = sizerequested;
    }
    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result);
    CVar3 = result;
    if ((long)__n < 0) goto LAB_0011a749;
    memcpy(buf,conn->master_buffer,__n);
    conn->buf_len = __n;
    conn->read_pos = __n;
  }
  else {
    bVar5 = conn->sock[1] == sockfd;
    *n = 0;
    if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {
      sizerequested = (pCVar1->set).buffer_size;
    }
    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);
    CVar3 = result;
    if ((long)__n < 0) goto LAB_0011a749;
  }
  *n = *n + __n;
  CVar3 = CURLE_OK;
LAB_0011a749:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return CVar3;
}



undefined4 FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)

{
  long lVar1;
  char cVar2;
  undefined4 uVar3;
  size_t __n;
  ulong uVar4;
  long in_FS_OFFSET;
  bool bVar5;
  undefined4 local_44;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_44 = 0x38;
  lVar1 = *param_1;
  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);
  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {
    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;
    *param_5 = 0;
    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {
      param_4 = *(ulong *)(lVar1 + 0xc38);
    }
    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)
    ;
    uVar3 = local_44;
    if ((long)__n < 0) goto LAB_0011a749;
  }
  else {
    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;
    *param_5 = 0;
    uVar4 = param_1[0xa5] - param_1[0xa4];
    if (param_4 < uVar4) {
      uVar4 = param_4;
    }
    if (uVar4 != 0) {
      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);
      param_1[0xa4] = param_1[0xa4] + uVar4;
      *(undefined1 *)((long)param_1 + 0x3b1) = 0;
      *param_5 = uVar4;
      uVar3 = 0;
      goto LAB_0011a749;
    }
    uVar4 = 0x4000;
    if (param_4 < 0x4001) {
      uVar4 = param_4;
    }
    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])
                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);
    uVar3 = local_44;
    if ((long)__n < 0) goto LAB_0011a749;
    memcpy(param_3,(void *)param_1[0xa3],__n);
    param_1[0xa5] = __n;
    param_1[0xa4] = __n;
  }
  *param_5 = *param_5 + __n;
  uVar3 = 0;
LAB_0011a749:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar3;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R15D,ESI
MOV R13,RDX
MOV RBP,RCX
MOV R12,R8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x4],0x38
MOV R14,qword ptr [RDI]
MOV RDI,qword ptr [R14 + 0xd8]
MOV ESI,0x1
CALL 0x00134bea
TEST AL,AL
JZ 0x0011a6fa
MOV RAX,qword ptr [RBX + 0x850]
CMP dword ptr [RAX],0x1
JZ 0x0011a7a0
CMP dword ptr [RBX + 0x25c],R15D
SETZ SIL
MOVZX ESI,SIL
MOV qword ptr [R12],0x0
CMP qword ptr [R14 + 0xc38],RBP
MOV RCX,RBP
CMOVBE RCX,qword ptr [R14 + 0xc38]
MOVSXD RAX,ESI
ADD RAX,0x4e
LEA R8,[RSP + 0x4]
MOV RDX,R13
MOV RDI,RBX
CALL qword ptr [RBX + RAX*0x8]
MOV RBP,RAX
TEST RAX,RAX
JS 0x0011a79a
ADD qword ptr [R12],RBP
MOV EAX,0x0
MOV RDI,qword ptr [RSP + 0x8]
XOR RDI,qword ptr FS:[0x28]
JNZ 0x0011a82d
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
ADD RAX,qword ptr [RBX + 0x518]
MOV RSI,RAX
MOV RDX,R14
MOV RDI,R13
CALL 0x0010dca0
ADD qword ptr [RBX + 0x520],R14
MOV byte ptr [RBX + 0x3b1],0x0
MOV qword ptr [R12],R14
MOV EAX,0x0
JMP 0x0011a749
MOV EAX,dword ptr [RSP + 0x4]
JMP 0x0011a749
CMP dword ptr [RBX + 0x25c],R15D
SETZ SIL
MOVZX ESI,SIL
MOV qword ptr [R12],0x0
MOV RAX,qword ptr [RBX + 0x520]
MOV RDX,qword ptr [RBX + 0x528]
SUB RDX,RAX
CMP RDX,RBP
CMOVA RDX,RBP
MOV R14,RDX
TEST RDX,RDX
JNZ 0x0011a76c
CMP RBP,0x4000
MOV ECX,0x4000
CMOVBE RCX,RBP
MOV RDX,qword ptr [RBX + 0x518]
MOVSXD RAX,ESI
ADD RAX,0x4e
LEA R8,[RSP + 0x4]
MOV RDI,RBX
CALL qword ptr [RBX + RAX*0x8]
MOV RBP,RAX
TEST RAX,RAX
JS 0x0011a79a
MOV RSI,qword ptr [RBX + 0x518]
MOV RDX,RAX
MOV RDI,R13
CALL 0x0010dca0
MOV qword ptr [RBX + 0x528],RBP
MOV qword ptr [RBX + 0x520],RBP
JMP 0x0011a740
CALL 0x0010e1c0
(translation_unit "undefined4 FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)\n\n{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)\n\n{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)" identifier (parameter_list "(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ulong param_4" type_identifier identifier) , (parameter_declaration "size_t *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar3;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_44 = 0x38;" (assignment_expression "local_44 = 0x38" identifier = number_literal) ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);" (assignment_expression "cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1)" identifier = (call_expression "FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1)" identifier (argument_list "(*(undefined8 *)(lVar1 + 0xd8),1)" ( (pointer_expression "*(undefined8 *)(lVar1 + 0xd8)" * (cast_expression "(undefined8 *)(lVar1 + 0xd8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xd8)" ( (binary_expression "lVar1 + 0xd8" identifier + number_literal) )))) , number_literal )))) ;) (if_statement "if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" if (parenthesized_expression "((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1))" ( (binary_expression "(cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)" (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(*(int *)param_1[0x10a] != 1)" ( (binary_expression "*(int *)param_1[0x10a] != 1" (pointer_expression "*(int *)param_1[0x10a]" * (cast_expression "(int *)param_1[0x10a]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[0x10a]" identifier [ number_literal ]))) != number_literal) ))) )) (compound_statement "{\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }" { (expression_statement "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;" (assignment_expression "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2" identifier = (binary_expression "*(int *)((long)param_1 + 0x25c) == param_2" (pointer_expression "*(int *)((long)param_1 + 0x25c)" * (cast_expression "(int *)((long)param_1 + 0x25c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x25c)" ( (binary_expression "(long)param_1 + 0x25c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == identifier)) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) (if_statement "if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }" if (parenthesized_expression "(*(ulong *)(lVar1 + 0xc38) <= param_4)" ( (binary_expression "*(ulong *)(lVar1 + 0xc38) <= param_4" (pointer_expression "*(ulong *)(lVar1 + 0xc38)" * (cast_expression "(ulong *)(lVar1 + 0xc38)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xc38)" ( (binary_expression "lVar1 + 0xc38" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }" { (expression_statement "param_4 = *(ulong *)(lVar1 + 0xc38);" (assignment_expression "param_4 = *(ulong *)(lVar1 + 0xc38)" identifier = (pointer_expression "*(ulong *)(lVar1 + 0xc38)" * (cast_expression "(ulong *)(lVar1 + 0xc38)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xc38)" ( (binary_expression "lVar1 + 0xc38" identifier + number_literal) ))))) ;) })) (expression_statement "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;" (assignment_expression "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)" identifier = (call_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)" (parenthesized_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])" ( (pointer_expression "*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" * (cast_expression "(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[(long)(int)(uint)bVar5 + 0x4e]" identifier [ (binary_expression "(long)(int)(uint)bVar5 + 0x4e" (cast_expression "(long)(int)(uint)bVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uint)bVar5" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier))) + number_literal) ]))) )) (argument_list "(param_1,bVar5,param_3,param_4,&local_44)" ( identifier , identifier , identifier , identifier , (pointer_expression "&local_44" & identifier) )))) ;) (expression_statement "uVar3 = local_44;" (assignment_expression "uVar3 = local_44" identifier = identifier) ;) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" if (parenthesized_expression "((long)__n < 0)" ( (binary_expression "(long)__n < 0" (cast_expression "(long)__n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) < number_literal) )) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;)) }) (else_clause "else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" else (compound_statement "{\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" { (expression_statement "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;" (assignment_expression "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2" identifier = (binary_expression "*(int *)((long)param_1 + 0x25c) == param_2" (pointer_expression "*(int *)((long)param_1 + 0x25c)" * (cast_expression "(int *)((long)param_1 + 0x25c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x25c)" ( (binary_expression "(long)param_1 + 0x25c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == identifier)) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) (expression_statement "uVar4 = param_1[0xa5] - param_1[0xa4];" (assignment_expression "uVar4 = param_1[0xa5] - param_1[0xa4]" identifier = (binary_expression "param_1[0xa5] - param_1[0xa4]" (subscript_expression "param_1[0xa5]" identifier [ number_literal ]) - (subscript_expression "param_1[0xa4]" identifier [ number_literal ]))) ;) (if_statement "if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }" if (parenthesized_expression "(param_4 < uVar4)" ( (binary_expression "param_4 < uVar4" identifier < identifier) )) (compound_statement "{\n      uVar4 = param_4;\n    }" { (expression_statement "uVar4 = param_4;" (assignment_expression "uVar4 = param_4" identifier = identifier) ;) })) (if_statement "if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }" { (expression_statement "memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);" (call_expression "memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4)" identifier (argument_list "(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4)" ( identifier , (cast_expression "(void *)(param_1[0xa4] + param_1[0xa3])" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0xa4] + param_1[0xa3])" ( (binary_expression "param_1[0xa4] + param_1[0xa3]" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) + (subscript_expression "param_1[0xa3]" identifier [ number_literal ])) ))) , identifier ))) ;) (expression_statement "param_1[0xa4] = param_1[0xa4] + uVar4;" (assignment_expression "param_1[0xa4] = param_1[0xa4] + uVar4" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) = (binary_expression "param_1[0xa4] + uVar4" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "*(undefined1 *)((long)param_1 + 0x3b1) = 0;" (assignment_expression "*(undefined1 *)((long)param_1 + 0x3b1) = 0" (pointer_expression "*(undefined1 *)((long)param_1 + 0x3b1)" * (cast_expression "(undefined1 *)((long)param_1 + 0x3b1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x3b1)" ( (binary_expression "(long)param_1 + 0x3b1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*param_5 = uVar4;" (assignment_expression "*param_5 = uVar4" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;) })) (expression_statement "uVar4 = 0x4000;" (assignment_expression "uVar4 = 0x4000" identifier = number_literal) ;) (if_statement "if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }" if (parenthesized_expression "(param_4 < 0x4001)" ( (binary_expression "param_4 < 0x4001" identifier < number_literal) )) (compound_statement "{\n      uVar4 = param_4;\n    }" { (expression_statement "uVar4 = param_4;" (assignment_expression "uVar4 = param_4" identifier = identifier) ;) })) (expression_statement "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);" (assignment_expression "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44)" identifier = (call_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44)" (parenthesized_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])" ( (pointer_expression "*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" * (cast_expression "(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[(long)(int)(uint)bVar5 + 0x4e]" identifier [ (binary_expression "(long)(int)(uint)bVar5 + 0x4e" (cast_expression "(long)(int)(uint)bVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uint)bVar5" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier))) + number_literal) ]))) )) (argument_list "(param_1,bVar5,param_1[0xa3],uVar4,&local_44)" ( identifier , identifier , (subscript_expression "param_1[0xa3]" identifier [ number_literal ]) , identifier , (pointer_expression "&local_44" & identifier) )))) ;) (expression_statement "uVar3 = local_44;" (assignment_expression "uVar3 = local_44" identifier = identifier) ;) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" if (parenthesized_expression "((long)__n < 0)" ( (binary_expression "(long)__n < 0" (cast_expression "(long)__n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) < number_literal) )) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;)) (expression_statement "memcpy(param_3,(void *)param_1[0xa3],__n);" (call_expression "memcpy(param_3,(void *)param_1[0xa3],__n)" identifier (argument_list "(param_3,(void *)param_1[0xa3],__n)" ( identifier , (cast_expression "(void *)param_1[0xa3]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[0xa3]" identifier [ number_literal ])) , identifier ))) ;) (expression_statement "param_1[0xa5] = __n;" (assignment_expression "param_1[0xa5] = __n" (subscript_expression "param_1[0xa5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0xa4] = __n;" (assignment_expression "param_1[0xa4] = __n" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "*param_5 = *param_5 + __n;" (assignment_expression "*param_5 = *param_5 + __n" (pointer_expression "*param_5" * identifier) = (binary_expression "*param_5 + __n" (pointer_expression "*param_5" * identifier) + identifier)) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode Curl_read(connectdata *conn,curl_socket_t sockfd,char *buf,size_t sizerequested,ssize_t *n)\n\n{\n  Curl_easy *pCVar1;\n  _Bool _Var2;\n  CURLcode CVar3;\n  size_t __n;\n  size_t sVar4;\n  ulong __n_00;\n  long in_FS_OFFSET;\n  bool bVar5;\n  CURLcode result;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  result = CURLE_RECV_ERROR;\n  pCVar1 = conn->data;\n  _Var2 = Curl_pipeline_wanted(pCVar1->multi,1);\n  if ((_Var2) && (conn->bundle->multiuse == 1)) {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    __n_00 = conn->buf_len - conn->read_pos;\n    if (sizerequested < __n_00) {\n      __n_00 = sizerequested;\n    }\n    if (__n_00 != 0) {\n      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);\n      conn->read_pos = conn->read_pos + __n_00;\n      (conn->bits).stream_was_rewound = false;\n      *n = __n_00;\n      CVar3 = CURLE_OK;\n      goto LAB_0011a749;\n    }\n    sVar4 = 0x4000;\n    if (sizerequested < 0x4001) {\n      sVar4 = sizerequested;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(buf,conn->master_buffer,__n);\n    conn->buf_len = __n;\n    conn->read_pos = __n;\n  }\n  else {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {\n      sizerequested = (pCVar1->set).buffer_size;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  *n = *n + __n;\n  CVar3 = CURLE_OK;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return CVar3;\n}\n\n" comment (function_definition "CURLcode Curl_read(connectdata *conn,curl_socket_t sockfd,char *buf,size_t sizerequested,ssize_t *n)\n\n{\n  Curl_easy *pCVar1;\n  _Bool _Var2;\n  CURLcode CVar3;\n  size_t __n;\n  size_t sVar4;\n  ulong __n_00;\n  long in_FS_OFFSET;\n  bool bVar5;\n  CURLcode result;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  result = CURLE_RECV_ERROR;\n  pCVar1 = conn->data;\n  _Var2 = Curl_pipeline_wanted(pCVar1->multi,1);\n  if ((_Var2) && (conn->bundle->multiuse == 1)) {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    __n_00 = conn->buf_len - conn->read_pos;\n    if (sizerequested < __n_00) {\n      __n_00 = sizerequested;\n    }\n    if (__n_00 != 0) {\n      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);\n      conn->read_pos = conn->read_pos + __n_00;\n      (conn->bits).stream_was_rewound = false;\n      *n = __n_00;\n      CVar3 = CURLE_OK;\n      goto LAB_0011a749;\n    }\n    sVar4 = 0x4000;\n    if (sizerequested < 0x4001) {\n      sVar4 = sizerequested;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(buf,conn->master_buffer,__n);\n    conn->buf_len = __n;\n    conn->read_pos = __n;\n  }\n  else {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {\n      sizerequested = (pCVar1->set).buffer_size;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  *n = *n + __n;\n  CVar3 = CURLE_OK;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return CVar3;\n}" type_identifier (function_declarator "Curl_read(connectdata *conn,curl_socket_t sockfd,char *buf,size_t sizerequested,ssize_t *n)" identifier (parameter_list "(connectdata *conn,curl_socket_t sockfd,char *buf,size_t sizerequested,ssize_t *n)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "curl_socket_t sockfd" type_identifier identifier) , (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "size_t sizerequested" primitive_type identifier) , (parameter_declaration "ssize_t *n" primitive_type (pointer_declarator "*n" * identifier)) ))) (compound_statement "{\n  Curl_easy *pCVar1;\n  _Bool _Var2;\n  CURLcode CVar3;\n  size_t __n;\n  size_t sVar4;\n  ulong __n_00;\n  long in_FS_OFFSET;\n  bool bVar5;\n  CURLcode result;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  result = CURLE_RECV_ERROR;\n  pCVar1 = conn->data;\n  _Var2 = Curl_pipeline_wanted(pCVar1->multi,1);\n  if ((_Var2) && (conn->bundle->multiuse == 1)) {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    __n_00 = conn->buf_len - conn->read_pos;\n    if (sizerequested < __n_00) {\n      __n_00 = sizerequested;\n    }\n    if (__n_00 != 0) {\n      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);\n      conn->read_pos = conn->read_pos + __n_00;\n      (conn->bits).stream_was_rewound = false;\n      *n = __n_00;\n      CVar3 = CURLE_OK;\n      goto LAB_0011a749;\n    }\n    sVar4 = 0x4000;\n    if (sizerequested < 0x4001) {\n      sVar4 = sizerequested;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(buf,conn->master_buffer,__n);\n    conn->buf_len = __n;\n    conn->read_pos = __n;\n  }\n  else {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {\n      sizerequested = (pCVar1->set).buffer_size;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  *n = *n + __n;\n  CVar3 = CURLE_OK;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return CVar3;\n}" { (declaration "Curl_easy *pCVar1;" type_identifier (pointer_declarator "*pCVar1" * identifier) ;) (declaration "_Bool _Var2;" type_identifier identifier ;) (declaration "CURLcode CVar3;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "ulong __n_00;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "CURLcode result;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "result = CURLE_RECV_ERROR;" (assignment_expression "result = CURLE_RECV_ERROR" identifier = identifier) ;) (expression_statement "pCVar1 = conn->data;" (assignment_expression "pCVar1 = conn->data" identifier = (field_expression "conn->data" identifier -> field_identifier)) ;) (expression_statement "_Var2 = Curl_pipeline_wanted(pCVar1->multi,1);" (assignment_expression "_Var2 = Curl_pipeline_wanted(pCVar1->multi,1)" identifier = (call_expression "Curl_pipeline_wanted(pCVar1->multi,1)" identifier (argument_list "(pCVar1->multi,1)" ( (field_expression "pCVar1->multi" identifier -> field_identifier) , number_literal )))) ;) (if_statement "if ((_Var2) && (conn->bundle->multiuse == 1)) {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    __n_00 = conn->buf_len - conn->read_pos;\n    if (sizerequested < __n_00) {\n      __n_00 = sizerequested;\n    }\n    if (__n_00 != 0) {\n      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);\n      conn->read_pos = conn->read_pos + __n_00;\n      (conn->bits).stream_was_rewound = false;\n      *n = __n_00;\n      CVar3 = CURLE_OK;\n      goto LAB_0011a749;\n    }\n    sVar4 = 0x4000;\n    if (sizerequested < 0x4001) {\n      sVar4 = sizerequested;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(buf,conn->master_buffer,__n);\n    conn->buf_len = __n;\n    conn->read_pos = __n;\n  }\n  else {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {\n      sizerequested = (pCVar1->set).buffer_size;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }" if (parenthesized_expression "((_Var2) && (conn->bundle->multiuse == 1))" ( (binary_expression "(_Var2) && (conn->bundle->multiuse == 1)" (parenthesized_expression "(_Var2)" ( identifier )) && (parenthesized_expression "(conn->bundle->multiuse == 1)" ( (binary_expression "conn->bundle->multiuse == 1" (field_expression "conn->bundle->multiuse" (field_expression "conn->bundle" identifier -> field_identifier) -> field_identifier) == number_literal) ))) )) (compound_statement "{\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    __n_00 = conn->buf_len - conn->read_pos;\n    if (sizerequested < __n_00) {\n      __n_00 = sizerequested;\n    }\n    if (__n_00 != 0) {\n      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);\n      conn->read_pos = conn->read_pos + __n_00;\n      (conn->bits).stream_was_rewound = false;\n      *n = __n_00;\n      CVar3 = CURLE_OK;\n      goto LAB_0011a749;\n    }\n    sVar4 = 0x4000;\n    if (sizerequested < 0x4001) {\n      sVar4 = sizerequested;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(buf,conn->master_buffer,__n);\n    conn->buf_len = __n;\n    conn->read_pos = __n;\n  }" { (expression_statement "bVar5 = conn->sock[1] == sockfd;" (assignment_expression "bVar5 = conn->sock[1] == sockfd" identifier = (binary_expression "conn->sock[1] == sockfd" (subscript_expression "conn->sock[1]" (field_expression "conn->sock" identifier -> field_identifier) [ number_literal ]) == identifier)) ;) (expression_statement "*n = 0;" (assignment_expression "*n = 0" (pointer_expression "*n" * identifier) = number_literal) ;) (expression_statement "__n_00 = conn->buf_len - conn->read_pos;" (assignment_expression "__n_00 = conn->buf_len - conn->read_pos" identifier = (binary_expression "conn->buf_len - conn->read_pos" (field_expression "conn->buf_len" identifier -> field_identifier) - (field_expression "conn->read_pos" identifier -> field_identifier))) ;) (if_statement "if (sizerequested < __n_00) {\n      __n_00 = sizerequested;\n    }" if (parenthesized_expression "(sizerequested < __n_00)" ( (binary_expression "sizerequested < __n_00" identifier < identifier) )) (compound_statement "{\n      __n_00 = sizerequested;\n    }" { (expression_statement "__n_00 = sizerequested;" (assignment_expression "__n_00 = sizerequested" identifier = identifier) ;) })) (if_statement "if (__n_00 != 0) {\n      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);\n      conn->read_pos = conn->read_pos + __n_00;\n      (conn->bits).stream_was_rewound = false;\n      *n = __n_00;\n      CVar3 = CURLE_OK;\n      goto LAB_0011a749;\n    }" if (parenthesized_expression "(__n_00 != 0)" ( (binary_expression "__n_00 != 0" identifier != number_literal) )) (compound_statement "{\n      memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);\n      conn->read_pos = conn->read_pos + __n_00;\n      (conn->bits).stream_was_rewound = false;\n      *n = __n_00;\n      CVar3 = CURLE_OK;\n      goto LAB_0011a749;\n    }" { (expression_statement "memcpy(buf,conn->master_buffer + conn->read_pos,__n_00);" (call_expression "memcpy(buf,conn->master_buffer + conn->read_pos,__n_00)" identifier (argument_list "(buf,conn->master_buffer + conn->read_pos,__n_00)" ( identifier , (binary_expression "conn->master_buffer + conn->read_pos" (field_expression "conn->master_buffer" identifier -> field_identifier) + (field_expression "conn->read_pos" identifier -> field_identifier)) , identifier ))) ;) (expression_statement "conn->read_pos = conn->read_pos + __n_00;" (assignment_expression "conn->read_pos = conn->read_pos + __n_00" (field_expression "conn->read_pos" identifier -> field_identifier) = (binary_expression "conn->read_pos + __n_00" (field_expression "conn->read_pos" identifier -> field_identifier) + identifier)) ;) (expression_statement "(conn->bits).stream_was_rewound = false;" (assignment_expression "(conn->bits).stream_was_rewound = false" (field_expression "(conn->bits).stream_was_rewound" (parenthesized_expression "(conn->bits)" ( (field_expression "conn->bits" identifier -> field_identifier) )) . field_identifier) = false) ;) (expression_statement "*n = __n_00;" (assignment_expression "*n = __n_00" (pointer_expression "*n" * identifier) = identifier) ;) (expression_statement "CVar3 = CURLE_OK;" (assignment_expression "CVar3 = CURLE_OK" identifier = identifier) ;) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;) })) (expression_statement "sVar4 = 0x4000;" (assignment_expression "sVar4 = 0x4000" identifier = number_literal) ;) (if_statement "if (sizerequested < 0x4001) {\n      sVar4 = sizerequested;\n    }" if (parenthesized_expression "(sizerequested < 0x4001)" ( (binary_expression "sizerequested < 0x4001" identifier < number_literal) )) (compound_statement "{\n      sVar4 = sizerequested;\n    }" { (expression_statement "sVar4 = sizerequested;" (assignment_expression "sVar4 = sizerequested" identifier = identifier) ;) })) (expression_statement "__n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result);" (assignment_expression "__n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result)" identifier = (call_expression "(*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result)" (parenthesized_expression "(*conn->recv[(int)(uint)bVar5])" ( (pointer_expression "*conn->recv[(int)(uint)bVar5]" * (subscript_expression "conn->recv[(int)(uint)bVar5]" (field_expression "conn->recv" identifier -> field_identifier) [ (cast_expression "(int)(uint)bVar5" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier)) ])) )) (argument_list "(conn,SUB14(bVar5,0),conn->master_buffer,sVar4,&result)" ( identifier , (call_expression "SUB14(bVar5,0)" identifier (argument_list "(bVar5,0)" ( identifier , number_literal ))) , (field_expression "conn->master_buffer" identifier -> field_identifier) , identifier , (pointer_expression "&result" & identifier) )))) ;) (expression_statement "CVar3 = result;" (assignment_expression "CVar3 = result" identifier = identifier) ;) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" if (parenthesized_expression "((long)__n < 0)" ( (binary_expression "(long)__n < 0" (cast_expression "(long)__n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) < number_literal) )) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;)) (expression_statement "memcpy(buf,conn->master_buffer,__n);" (call_expression "memcpy(buf,conn->master_buffer,__n)" identifier (argument_list "(buf,conn->master_buffer,__n)" ( identifier , (field_expression "conn->master_buffer" identifier -> field_identifier) , identifier ))) ;) (expression_statement "conn->buf_len = __n;" (assignment_expression "conn->buf_len = __n" (field_expression "conn->buf_len" identifier -> field_identifier) = identifier) ;) (expression_statement "conn->read_pos = __n;" (assignment_expression "conn->read_pos = __n" (field_expression "conn->read_pos" identifier -> field_identifier) = identifier) ;) }) (else_clause "else {\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {\n      sizerequested = (pCVar1->set).buffer_size;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }" else (compound_statement "{\n    bVar5 = conn->sock[1] == sockfd;\n    *n = 0;\n    if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {\n      sizerequested = (pCVar1->set).buffer_size;\n    }\n    __n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);\n    CVar3 = result;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }" { (expression_statement "bVar5 = conn->sock[1] == sockfd;" (assignment_expression "bVar5 = conn->sock[1] == sockfd" identifier = (binary_expression "conn->sock[1] == sockfd" (subscript_expression "conn->sock[1]" (field_expression "conn->sock" identifier -> field_identifier) [ number_literal ]) == identifier)) ;) (expression_statement "*n = 0;" (assignment_expression "*n = 0" (pointer_expression "*n" * identifier) = number_literal) ;) (if_statement "if ((ulong)(pCVar1->set).buffer_size <= sizerequested) {\n      sizerequested = (pCVar1->set).buffer_size;\n    }" if (parenthesized_expression "((ulong)(pCVar1->set).buffer_size <= sizerequested)" ( (binary_expression "(ulong)(pCVar1->set).buffer_size <= sizerequested" (field_expression "(ulong)(pCVar1->set).buffer_size" (call_expression "(ulong)(pCVar1->set)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(pCVar1->set)" ( (field_expression "pCVar1->set" identifier -> field_identifier) ))) . field_identifier) <= identifier) )) (compound_statement "{\n      sizerequested = (pCVar1->set).buffer_size;\n    }" { (expression_statement "sizerequested = (pCVar1->set).buffer_size;" (assignment_expression "sizerequested = (pCVar1->set).buffer_size" identifier = (field_expression "(pCVar1->set).buffer_size" (parenthesized_expression "(pCVar1->set)" ( (field_expression "pCVar1->set" identifier -> field_identifier) )) . field_identifier)) ;) })) (expression_statement "__n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result);" (assignment_expression "__n = (*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result)" identifier = (call_expression "(*conn->recv[(int)(uint)bVar5])(conn,SUB14(bVar5,0),buf,sizerequested,&result)" (parenthesized_expression "(*conn->recv[(int)(uint)bVar5])" ( (pointer_expression "*conn->recv[(int)(uint)bVar5]" * (subscript_expression "conn->recv[(int)(uint)bVar5]" (field_expression "conn->recv" identifier -> field_identifier) [ (cast_expression "(int)(uint)bVar5" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier)) ])) )) (argument_list "(conn,SUB14(bVar5,0),buf,sizerequested,&result)" ( identifier , (call_expression "SUB14(bVar5,0)" identifier (argument_list "(bVar5,0)" ( identifier , number_literal ))) , identifier , identifier , (pointer_expression "&result" & identifier) )))) ;) (expression_statement "CVar3 = result;" (assignment_expression "CVar3 = result" identifier = identifier) ;) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" if (parenthesized_expression "((long)__n < 0)" ( (binary_expression "(long)__n < 0" (cast_expression "(long)__n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) < number_literal) )) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;)) }))) (expression_statement "*n = *n + __n;" (assignment_expression "*n = *n + __n" (pointer_expression "*n" * identifier) = (binary_expression "*n + __n" (pointer_expression "*n" * identifier) + identifier)) ;) (expression_statement "CVar3 = CURLE_OK;" (assignment_expression "CVar3 = CURLE_OK" identifier = identifier) ;) (labeled_statement "LAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return CVar3;" return identifier ;) })))
(translation_unit "undefined4 FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)\n\n{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)\n\n{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)" identifier (parameter_list "(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ulong param_4" type_identifier identifier) , (parameter_declaration "size_t *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar3;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_44 = 0x38;" (assignment_expression "local_44 = 0x38" identifier = number_literal) ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);" (assignment_expression "cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1)" identifier = (call_expression "FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1)" identifier (argument_list "(*(undefined8 *)(lVar1 + 0xd8),1)" ( (pointer_expression "*(undefined8 *)(lVar1 + 0xd8)" * (cast_expression "(undefined8 *)(lVar1 + 0xd8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xd8)" ( (binary_expression "lVar1 + 0xd8" identifier + number_literal) )))) , number_literal )))) ;) (if_statement "if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" if (parenthesized_expression "((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1))" ( (binary_expression "(cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)" (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(*(int *)param_1[0x10a] != 1)" ( (binary_expression "*(int *)param_1[0x10a] != 1" (pointer_expression "*(int *)param_1[0x10a]" * (cast_expression "(int *)param_1[0x10a]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[0x10a]" identifier [ number_literal ]))) != number_literal) ))) )) (compound_statement "{\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }" { (expression_statement "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;" (assignment_expression "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2" identifier = (binary_expression "*(int *)((long)param_1 + 0x25c) == param_2" (pointer_expression "*(int *)((long)param_1 + 0x25c)" * (cast_expression "(int *)((long)param_1 + 0x25c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x25c)" ( (binary_expression "(long)param_1 + 0x25c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == identifier)) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) (if_statement "if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }" if (parenthesized_expression "(*(ulong *)(lVar1 + 0xc38) <= param_4)" ( (binary_expression "*(ulong *)(lVar1 + 0xc38) <= param_4" (pointer_expression "*(ulong *)(lVar1 + 0xc38)" * (cast_expression "(ulong *)(lVar1 + 0xc38)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xc38)" ( (binary_expression "lVar1 + 0xc38" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }" { (expression_statement "param_4 = *(ulong *)(lVar1 + 0xc38);" (assignment_expression "param_4 = *(ulong *)(lVar1 + 0xc38)" identifier = (pointer_expression "*(ulong *)(lVar1 + 0xc38)" * (cast_expression "(ulong *)(lVar1 + 0xc38)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xc38)" ( (binary_expression "lVar1 + 0xc38" identifier + number_literal) ))))) ;) })) (expression_statement "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;" (assignment_expression "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)" identifier = (call_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)" (parenthesized_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])" ( (pointer_expression "*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" * (cast_expression "(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[(long)(int)(uint)bVar5 + 0x4e]" identifier [ (binary_expression "(long)(int)(uint)bVar5 + 0x4e" (cast_expression "(long)(int)(uint)bVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uint)bVar5" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier))) + number_literal) ]))) )) (argument_list "(param_1,bVar5,param_3,param_4,&local_44)" ( identifier , identifier , identifier , identifier , (pointer_expression "&local_44" & identifier) )))) ;) (expression_statement "uVar3 = local_44;" (assignment_expression "uVar3 = local_44" identifier = identifier) ;) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" if (parenthesized_expression "((long)__n < 0)" ( (binary_expression "(long)__n < 0" (cast_expression "(long)__n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) < number_literal) )) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;)) }) (else_clause "else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" else (compound_statement "{\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" { (expression_statement "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;" (assignment_expression "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2" identifier = (binary_expression "*(int *)((long)param_1 + 0x25c) == param_2" (pointer_expression "*(int *)((long)param_1 + 0x25c)" * (cast_expression "(int *)((long)param_1 + 0x25c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x25c)" ( (binary_expression "(long)param_1 + 0x25c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == identifier)) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) (expression_statement "uVar4 = param_1[0xa5] - param_1[0xa4];" (assignment_expression "uVar4 = param_1[0xa5] - param_1[0xa4]" identifier = (binary_expression "param_1[0xa5] - param_1[0xa4]" (subscript_expression "param_1[0xa5]" identifier [ number_literal ]) - (subscript_expression "param_1[0xa4]" identifier [ number_literal ]))) ;) (if_statement "if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }" if (parenthesized_expression "(param_4 < uVar4)" ( (binary_expression "param_4 < uVar4" identifier < identifier) )) (compound_statement "{\n      uVar4 = param_4;\n    }" { (expression_statement "uVar4 = param_4;" (assignment_expression "uVar4 = param_4" identifier = identifier) ;) })) (if_statement "if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }" { (expression_statement "memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);" (call_expression "memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4)" identifier (argument_list "(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4)" ( identifier , (cast_expression "(void *)(param_1[0xa4] + param_1[0xa3])" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0xa4] + param_1[0xa3])" ( (binary_expression "param_1[0xa4] + param_1[0xa3]" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) + (subscript_expression "param_1[0xa3]" identifier [ number_literal ])) ))) , identifier ))) ;) (expression_statement "param_1[0xa4] = param_1[0xa4] + uVar4;" (assignment_expression "param_1[0xa4] = param_1[0xa4] + uVar4" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) = (binary_expression "param_1[0xa4] + uVar4" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "*(undefined1 *)((long)param_1 + 0x3b1) = 0;" (assignment_expression "*(undefined1 *)((long)param_1 + 0x3b1) = 0" (pointer_expression "*(undefined1 *)((long)param_1 + 0x3b1)" * (cast_expression "(undefined1 *)((long)param_1 + 0x3b1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x3b1)" ( (binary_expression "(long)param_1 + 0x3b1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*param_5 = uVar4;" (assignment_expression "*param_5 = uVar4" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;) })) (expression_statement "uVar4 = 0x4000;" (assignment_expression "uVar4 = 0x4000" identifier = number_literal) ;) (if_statement "if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }" if (parenthesized_expression "(param_4 < 0x4001)" ( (binary_expression "param_4 < 0x4001" identifier < number_literal) )) (compound_statement "{\n      uVar4 = param_4;\n    }" { (expression_statement "uVar4 = param_4;" (assignment_expression "uVar4 = param_4" identifier = identifier) ;) })) (expression_statement "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);" (assignment_expression "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44)" identifier = (call_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44)" (parenthesized_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])" ( (pointer_expression "*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" * (cast_expression "(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[(long)(int)(uint)bVar5 + 0x4e]" identifier [ (binary_expression "(long)(int)(uint)bVar5 + 0x4e" (cast_expression "(long)(int)(uint)bVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uint)bVar5" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier))) + number_literal) ]))) )) (argument_list "(param_1,bVar5,param_1[0xa3],uVar4,&local_44)" ( identifier , identifier , (subscript_expression "param_1[0xa3]" identifier [ number_literal ]) , identifier , (pointer_expression "&local_44" & identifier) )))) ;) (expression_statement "uVar3 = local_44;" (assignment_expression "uVar3 = local_44" identifier = identifier) ;) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" if (parenthesized_expression "((long)__n < 0)" ( (binary_expression "(long)__n < 0" (cast_expression "(long)__n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) < number_literal) )) (goto_statement "goto LAB_0011a749;" goto statement_identifier ;)) (expression_statement "memcpy(param_3,(void *)param_1[0xa3],__n);" (call_expression "memcpy(param_3,(void *)param_1[0xa3],__n)" identifier (argument_list "(param_3,(void *)param_1[0xa3],__n)" ( identifier , (cast_expression "(void *)param_1[0xa3]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[0xa3]" identifier [ number_literal ])) , identifier ))) ;) (expression_statement "param_1[0xa5] = __n;" (assignment_expression "param_1[0xa5] = __n" (subscript_expression "param_1[0xa5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0xa4] = __n;" (assignment_expression "param_1[0xa4] = __n" (subscript_expression "param_1[0xa4]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "*param_5 = *param_5 + __n;" (assignment_expression "*param_5 = *param_5 + __n" (pointer_expression "*param_5" * identifier) = (binary_expression "*param_5 + __n" (pointer_expression "*param_5" * identifier) + identifier)) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (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) )))) == IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT))) + LIT) ]))) )) (argument_list ( IDENT , IDENT , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) < LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (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) )))) == IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (subscript_expression IDENT [ LIT ])) ))) , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (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 * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT))) + LIT) ]))) )) (argument_list ( IDENT , IDENT , (subscript_expression IDENT [ LIT ]) , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) < LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)\n\n{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar3;\n}" (type_identifier "undefined4") (function_declarator "FUN_0011a69d(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)" (identifier "FUN_0011a69d") (parameter_list "(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "void *param_3" (primitive_type "void") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "ulong param_4" (type_identifier "ulong") (identifier "param_4")) (, ",") (parameter_declaration "size_t *param_5" (primitive_type "size_t") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  long lVar1;\n  char cVar2;\n  undefined4 uVar3;\n  size_t __n;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  bool bVar5;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0x38;\n  lVar1 = *param_1;\n  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);\n  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }\n  *param_5 = *param_5 + __n;\n  uVar3 = 0;\nLAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar3;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "bool bVar5;" (primitive_type "bool") (identifier "bVar5") (; ";")) (declaration "undefined4 local_44;" (type_identifier "undefined4") (identifier "local_44") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "local_44 = 0x38;" (assignment_expression "local_44 = 0x38" (identifier "local_44") (= "=") (number_literal "0x38")) (; ";")) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);" (assignment_expression "cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1)" (identifier "cVar2") (= "=") (call_expression "FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1)" (identifier "FUN_00134bea") (argument_list "(*(undefined8 *)(lVar1 + 0xd8),1)" (( "(") (pointer_expression "*(undefined8 *)(lVar1 + 0xd8)" (* "*") (cast_expression "(undefined8 *)(lVar1 + 0xd8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0xd8)" (( "(") (binary_expression "lVar1 + 0xd8" (identifier "lVar1") (+ "+") (number_literal "0xd8")) () ")")))) (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }\n  else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" (if "if") (parenthesized_expression "((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1))" (( "(") (binary_expression "(cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)" (parenthesized_expression "(cVar2 == '\0')" (( "(") (binary_expression "cVar2 == '\0'" (identifier "cVar2") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(*(int *)param_1[0x10a] != 1)" (( "(") (binary_expression "*(int *)param_1[0x10a] != 1" (pointer_expression "*(int *)param_1[0x10a]" (* "*") (cast_expression "(int *)param_1[0x10a]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[0x10a]" (identifier "param_1") ([ "[") (number_literal "0x10a") (] "]")))) (!= "!=") (number_literal "1")) () ")"))) () ")")) (compound_statement "{\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n  }" ({ "{") (expression_statement "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;" (assignment_expression "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2" (identifier "bVar5") (= "=") (binary_expression "*(int *)((long)param_1 + 0x25c) == param_2" (pointer_expression "*(int *)((long)param_1 + 0x25c)" (* "*") (cast_expression "(int *)((long)param_1 + 0x25c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0x25c)" (( "(") (binary_expression "(long)param_1 + 0x25c" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0x25c")) () ")")))) (== "==") (identifier "param_2"))) (; ";")) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(ulong *)(lVar1 + 0xc38) <= param_4) {\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }" (if "if") (parenthesized_expression "(*(ulong *)(lVar1 + 0xc38) <= param_4)" (( "(") (binary_expression "*(ulong *)(lVar1 + 0xc38) <= param_4" (pointer_expression "*(ulong *)(lVar1 + 0xc38)" (* "*") (cast_expression "(ulong *)(lVar1 + 0xc38)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0xc38)" (( "(") (binary_expression "lVar1 + 0xc38" (identifier "lVar1") (+ "+") (number_literal "0xc38")) () ")")))) (<= "<=") (identifier "param_4")) () ")")) (compound_statement "{\n      param_4 = *(ulong *)(lVar1 + 0xc38);\n    }" ({ "{") (expression_statement "param_4 = *(ulong *)(lVar1 + 0xc38);" (assignment_expression "param_4 = *(ulong *)(lVar1 + 0xc38)" (identifier "param_4") (= "=") (pointer_expression "*(ulong *)(lVar1 + 0xc38)" (* "*") (cast_expression "(ulong *)(lVar1 + 0xc38)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0xc38)" (( "(") (binary_expression "lVar1 + 0xc38" (identifier "lVar1") (+ "+") (number_literal "0xc38")) () ")"))))) (; ";")) (} "}"))) (expression_statement "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)\n    ;" (assignment_expression "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)" (identifier "__n") (= "=") (call_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)" (parenthesized_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])" (( "(") (pointer_expression "*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" (* "*") (cast_expression "(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[(long)(int)(uint)bVar5 + 0x4e]" (identifier "param_1") ([ "[") (binary_expression "(long)(int)(uint)bVar5 + 0x4e" (cast_expression "(long)(int)(uint)bVar5" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(uint)bVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(uint)bVar5" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar5")))) (+ "+") (number_literal "0x4e")) (] "]")))) () ")")) (argument_list "(param_1,bVar5,param_3,param_4,&local_44)" (( "(") (identifier "param_1") (, ",") (identifier "bVar5") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (pointer_expression "&local_44" (& "&") (identifier "local_44")) () ")")))) (; ";")) (expression_statement "uVar3 = local_44;" (assignment_expression "uVar3 = local_44" (identifier "uVar3") (= "=") (identifier "local_44")) (; ";")) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" (if "if") (parenthesized_expression "((long)__n < 0)" (( "(") (binary_expression "(long)__n < 0" (cast_expression "(long)__n" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__n")) (< "<") (number_literal "0")) () ")")) (goto_statement "goto LAB_0011a749;" (goto "goto") (statement_identifier "LAB_0011a749") (; ";"))) (} "}")) (else_clause "else {\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" (else "else") (compound_statement "{\n    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;\n    *param_5 = 0;\n    uVar4 = param_1[0xa5] - param_1[0xa4];\n    if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }\n    if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }\n    uVar4 = 0x4000;\n    if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }\n    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);\n    uVar3 = local_44;\n    if ((long)__n < 0) goto LAB_0011a749;\n    memcpy(param_3,(void *)param_1[0xa3],__n);\n    param_1[0xa5] = __n;\n    param_1[0xa4] = __n;\n  }" ({ "{") (expression_statement "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;" (assignment_expression "bVar5 = *(int *)((long)param_1 + 0x25c) == param_2" (identifier "bVar5") (= "=") (binary_expression "*(int *)((long)param_1 + 0x25c) == param_2" (pointer_expression "*(int *)((long)param_1 + 0x25c)" (* "*") (cast_expression "(int *)((long)param_1 + 0x25c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0x25c)" (( "(") (binary_expression "(long)param_1 + 0x25c" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0x25c")) () ")")))) (== "==") (identifier "param_2"))) (; ";")) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = param_1[0xa5] - param_1[0xa4];" (assignment_expression "uVar4 = param_1[0xa5] - param_1[0xa4]" (identifier "uVar4") (= "=") (binary_expression "param_1[0xa5] - param_1[0xa4]" (subscript_expression "param_1[0xa5]" (identifier "param_1") ([ "[") (number_literal "0xa5") (] "]")) (- "-") (subscript_expression "param_1[0xa4]" (identifier "param_1") ([ "[") (number_literal "0xa4") (] "]")))) (; ";")) (if_statement "if (param_4 < uVar4) {\n      uVar4 = param_4;\n    }" (if "if") (parenthesized_expression "(param_4 < uVar4)" (( "(") (binary_expression "param_4 < uVar4" (identifier "param_4") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n      uVar4 = param_4;\n    }" ({ "{") (expression_statement "uVar4 = param_4;" (assignment_expression "uVar4 = param_4" (identifier "uVar4") (= "=") (identifier "param_4")) (; ";")) (} "}"))) (if_statement "if (uVar4 != 0) {\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }" (if "if") (parenthesized_expression "(uVar4 != 0)" (( "(") (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);\n      param_1[0xa4] = param_1[0xa4] + uVar4;\n      *(undefined1 *)((long)param_1 + 0x3b1) = 0;\n      *param_5 = uVar4;\n      uVar3 = 0;\n      goto LAB_0011a749;\n    }" ({ "{") (expression_statement "memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);" (call_expression "memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4)" (identifier "memcpy") (argument_list "(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4)" (( "(") (identifier "param_3") (, ",") (cast_expression "(void *)(param_1[0xa4] + param_1[0xa3])" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[0xa4] + param_1[0xa3])" (( "(") (binary_expression "param_1[0xa4] + param_1[0xa3]" (subscript_expression "param_1[0xa4]" (identifier "param_1") ([ "[") (number_literal "0xa4") (] "]")) (+ "+") (subscript_expression "param_1[0xa3]" (identifier "param_1") ([ "[") (number_literal "0xa3") (] "]"))) () ")"))) (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "param_1[0xa4] = param_1[0xa4] + uVar4;" (assignment_expression "param_1[0xa4] = param_1[0xa4] + uVar4" (subscript_expression "param_1[0xa4]" (identifier "param_1") ([ "[") (number_literal "0xa4") (] "]")) (= "=") (binary_expression "param_1[0xa4] + uVar4" (subscript_expression "param_1[0xa4]" (identifier "param_1") ([ "[") (number_literal "0xa4") (] "]")) (+ "+") (identifier "uVar4"))) (; ";")) (expression_statement "*(undefined1 *)((long)param_1 + 0x3b1) = 0;" (assignment_expression "*(undefined1 *)((long)param_1 + 0x3b1) = 0" (pointer_expression "*(undefined1 *)((long)param_1 + 0x3b1)" (* "*") (cast_expression "(undefined1 *)((long)param_1 + 0x3b1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0x3b1)" (( "(") (binary_expression "(long)param_1 + 0x3b1" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0x3b1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_5 = uVar4;" (assignment_expression "*param_5 = uVar4" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_0011a749;" (goto "goto") (statement_identifier "LAB_0011a749") (; ";")) (} "}"))) (expression_statement "uVar4 = 0x4000;" (assignment_expression "uVar4 = 0x4000" (identifier "uVar4") (= "=") (number_literal "0x4000")) (; ";")) (if_statement "if (param_4 < 0x4001) {\n      uVar4 = param_4;\n    }" (if "if") (parenthesized_expression "(param_4 < 0x4001)" (( "(") (binary_expression "param_4 < 0x4001" (identifier "param_4") (< "<") (number_literal "0x4001")) () ")")) (compound_statement "{\n      uVar4 = param_4;\n    }" ({ "{") (expression_statement "uVar4 = param_4;" (assignment_expression "uVar4 = param_4" (identifier "uVar4") (= "=") (identifier "param_4")) (; ";")) (} "}"))) (expression_statement "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);" (assignment_expression "__n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44)" (identifier "__n") (= "=") (call_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])\n                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44)" (parenthesized_expression "(*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])" (( "(") (pointer_expression "*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" (* "*") (cast_expression "(code *)param_1[(long)(int)(uint)bVar5 + 0x4e]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[(long)(int)(uint)bVar5 + 0x4e]" (identifier "param_1") ([ "[") (binary_expression "(long)(int)(uint)bVar5 + 0x4e" (cast_expression "(long)(int)(uint)bVar5" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(uint)bVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(uint)bVar5" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar5")))) (+ "+") (number_literal "0x4e")) (] "]")))) () ")")) (argument_list "(param_1,bVar5,param_1[0xa3],uVar4,&local_44)" (( "(") (identifier "param_1") (, ",") (identifier "bVar5") (, ",") (subscript_expression "param_1[0xa3]" (identifier "param_1") ([ "[") (number_literal "0xa3") (] "]")) (, ",") (identifier "uVar4") (, ",") (pointer_expression "&local_44" (& "&") (identifier "local_44")) () ")")))) (; ";")) (expression_statement "uVar3 = local_44;" (assignment_expression "uVar3 = local_44" (identifier "uVar3") (= "=") (identifier "local_44")) (; ";")) (if_statement "if ((long)__n < 0) goto LAB_0011a749;" (if "if") (parenthesized_expression "((long)__n < 0)" (( "(") (binary_expression "(long)__n < 0" (cast_expression "(long)__n" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__n")) (< "<") (number_literal "0")) () ")")) (goto_statement "goto LAB_0011a749;" (goto "goto") (statement_identifier "LAB_0011a749") (; ";"))) (expression_statement "memcpy(param_3,(void *)param_1[0xa3],__n);" (call_expression "memcpy(param_3,(void *)param_1[0xa3],__n)" (identifier "memcpy") (argument_list "(param_3,(void *)param_1[0xa3],__n)" (( "(") (identifier "param_3") (, ",") (cast_expression "(void *)param_1[0xa3]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[0xa3]" (identifier "param_1") ([ "[") (number_literal "0xa3") (] "]"))) (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "param_1[0xa5] = __n;" (assignment_expression "param_1[0xa5] = __n" (subscript_expression "param_1[0xa5]" (identifier "param_1") ([ "[") (number_literal "0xa5") (] "]")) (= "=") (identifier "__n")) (; ";")) (expression_statement "param_1[0xa4] = __n;" (assignment_expression "param_1[0xa4] = __n" (subscript_expression "param_1[0xa4]" (identifier "param_1") ([ "[") (number_literal "0xa4") (] "]")) (= "=") (identifier "__n")) (; ";")) (} "}")))) (expression_statement "*param_5 = *param_5 + __n;" (assignment_expression "*param_5 = *param_5 + __n" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (binary_expression "*param_5 + __n" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (+ "+") (identifier "__n"))) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0011a749:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (statement_identifier "LAB_0011a749") (: ":") (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (!= "!=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

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

type_1 function_1(type_2 *conn,type_3 var_3,char *buf,size_t var_4,ssize_t *n)

{
  type_4 *pCVar1;
  type_5 _Var2;
  type_1 CVar3;
  size_t var_8;
  size_t sVar4;
  type_6 var_5;
  long var_1;
  bool bVar5;
  type_1 result;
  long var_9;
  
  var_9 = *(long *)(var_1 + 0x28);
  result = CURLE_RECV_ERROR;
  pCVar1 = conn->data;
  _Var2 = var_2(pCVar1->multi,1);
  if ((_Var2) && (conn->bundle->multiuse == 1)) {
    bVar5 = conn->sock[1] == var_3;
    *n = 0;
    var_5 = conn->buf_len - conn->read_pos;
    if (var_4 < var_5) {
      var_5 = var_4;
    }
    if (var_5 != 0) {
      var_6(buf,conn->master_buffer + conn->read_pos,var_5);
      conn->read_pos = conn->read_pos + var_5;
      (conn->bits).stream_was_rewound = false;
      *n = var_5;
      CVar3 = CURLE_OK;
      goto LAB_0011a749;
    }
    sVar4 = 0x4000;
    if (var_4 < 0x4001) {
      sVar4 = var_4;
    }
    var_8 = (*conn->recv[(int)(type_7)bVar5])(conn,var_7(bVar5,0),conn->master_buffer,sVar4,&result);
    CVar3 = result;
    if ((long)var_8 < 0) goto LAB_0011a749;
    var_6(buf,conn->master_buffer,var_8);
    conn->buf_len = var_8;
    conn->read_pos = var_8;
  }
  else {
    bVar5 = conn->sock[1] == var_3;
    *n = 0;
    if ((type_6)(pCVar1->set).buffer_size <= var_4) {
      var_4 = (pCVar1->set).buffer_size;
    }
    var_8 = (*conn->recv[(int)(type_7)bVar5])(conn,var_7(bVar5,0),buf,var_4,&result);
    CVar3 = result;
    if ((long)var_8 < 0) goto LAB_0011a749;
  }
  *n = *n + var_8;
  CVar3 = CURLE_OK;
LAB_0011a749:
  if (var_9 != *(long *)(var_1 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_10();
  }
  return CVar3;
}


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

undefined4 MASKED(long *param_1,int param_2,void *param_3,ulong param_4,size_t *param_5)

{
  long lVar1;
  char cVar2;
  undefined4 uVar3;
  size_t __n;
  ulong uVar4;
  long in_FS_OFFSET;
  bool bVar5;
  undefined4 local_44;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_44 = 0x38;
  lVar1 = *param_1;
  cVar2 = FUN_00134bea(*(undefined8 *)(lVar1 + 0xd8),1);
  if ((cVar2 == '\0') || (*(int *)param_1[0x10a] != 1)) {
    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;
    *param_5 = 0;
    if (*(ulong *)(lVar1 + 0xc38) <= param_4) {
      param_4 = *(ulong *)(lVar1 + 0xc38);
    }
    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])(param_1,bVar5,param_3,param_4,&local_44)
    ;
    uVar3 = local_44;
    if ((long)__n < 0) goto LAB_0011a749;
  }
  else {
    bVar5 = *(int *)((long)param_1 + 0x25c) == param_2;
    *param_5 = 0;
    uVar4 = param_1[0xa5] - param_1[0xa4];
    if (param_4 < uVar4) {
      uVar4 = param_4;
    }
    if (uVar4 != 0) {
      memcpy(param_3,(void *)(param_1[0xa4] + param_1[0xa3]),uVar4);
      param_1[0xa4] = param_1[0xa4] + uVar4;
      *(undefined1 *)((long)param_1 + 0x3b1) = 0;
      *param_5 = uVar4;
      uVar3 = 0;
      goto LAB_0011a749;
    }
    uVar4 = 0x4000;
    if (param_4 < 0x4001) {
      uVar4 = param_4;
    }
    __n = (*(code *)param_1[(long)(int)(uint)bVar5 + 0x4e])
                    (param_1,bVar5,param_1[0xa3],uVar4,&local_44);
    uVar3 = local_44;
    if ((long)__n < 0) goto LAB_0011a749;
    memcpy(param_3,(void *)param_1[0xa3],__n);
    param_1[0xa5] = __n;
    param_1[0xa4] = __n;
  }
  *param_5 = *param_5 + __n;
  uVar3 = 0;
LAB_0011a749:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar3;
}

