
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

ld_plugin_status get_view(void *handle,void **viewp)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  char *fmt;
  void *pvVar5;
  ssize_t sVar6;
  int *piVar7;
  size_t __nbytes;
  void *__buf;
  __off64_t _Var8;
  size_t local_2c;
  
  __nbytes = *(size_t *)((int)handle + 0x28);
  iVar1 = *(int *)((int)handle + 0x20);
  iVar2 = *(int *)((int)handle + 0x24);
  _Var8 = *(__off64_t *)((int)handle + 0x20);
  iVar4 = *(int *)((int)handle + 0x2c);
  local_2c = __nbytes;
  if (called_plugin == (plugin_t *)0x0) {
    info_assert("../../ld/plugin.c",0x21a);
    local_2c = *(size_t *)((int)handle + 0x28);
    iVar4 = *(int *)((int)handle + 0x2c);
  }
  if (local_2c != __nbytes || iVar4 != 0) {
    uVar3 = *(undefined4 *)((int)handle + 0x14);
    fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);
    einfo(fmt,uVar3,local_2c);
  }
  if (((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))
     || (*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1)) {
    *(size_t *)((int)handle + 8) = __nbytes;
    *(int *)((int)handle + 0xc) = iVar1;
    *(int *)((int)handle + 0x10) = iVar2;
    *(undefined4 *)((int)handle + 0x1c) = 0;
    _Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0);
                    /* WARNING: Load size is inaccurate */
    if ((_Var8 < 0) ||
       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)) {
      return LDPS_ERR;
    }
    do {
      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);
      if (sVar6 == 0) break;
      if (sVar6 < 1) {
        piVar7 = __errno_location();
        if (*piVar7 != 4) {
          return LDPS_ERR;
        }
      }
      else {
        __buf = (void *)((int)__buf + sVar6);
        __nbytes = __nbytes - sVar6;
      }
    } while (__nbytes != 0);
    *(void **)((int)handle + 4) = pvVar5;
    *viewp = pvVar5;
  }
  else {
    *viewp = *(void **)((int)handle + 4);
  }
  return LDPS_OK;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 FUN_00033e10(undefined4 *param_1,int *param_2)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  undefined4 uVar5;
  void *pvVar6;
  ssize_t sVar7;
  int *piVar8;
  size_t __nbytes;
  void *__buf;
  __off64_t _Var9;
  size_t local_2c;
  
  __nbytes = param_1[10];
  iVar1 = (int)*(__off64_t *)(param_1 + 8);
  iVar2 = param_1[9];
  _Var9 = *(__off64_t *)(param_1 + 8);
  iVar4 = param_1[0xb];
  local_2c = __nbytes;
  if (DAT_000bbb68 == 0) {
    FUN_00031780("../../ld/plugin.c",0x21a);
    local_2c = param_1[10];
    iVar4 = param_1[0xb];
  }
  if (local_2c != __nbytes || iVar4 != 0) {
    uVar3 = param_1[5];
    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);
    FUN_00031730(uVar5,uVar3,local_2c);
  }
  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||
     (param_1[4] != iVar2 || param_1[3] != iVar1)) {
    param_1[2] = __nbytes;
    param_1[3] = iVar1;
    param_1[4] = iVar2;
    param_1[7] = 0;
    _Var9 = lseek64(param_1[6],_Var9,0);
    if ((_Var9 < 0) ||
       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {
      return 3;
    }
    do {
      sVar7 = read(param_1[6],__buf,__nbytes);
      if (sVar7 == 0) break;
      if (sVar7 < 1) {
        piVar8 = __errno_location();
        if (*piVar8 != 4) {
          return 3;
        }
      }
      else {
        __buf = (void *)((int)__buf + sVar7);
        __nbytes = __nbytes - sVar7;
      }
    } while (__nbytes != 0);
    param_1[1] = pvVar6;
    *param_2 = (int)pvVar6;
  }
  else {
    *param_2 = param_1[1];
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015a10
ADD EBX,0x871e7
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x30]
MOV EDI,dword ptr [EBP + 0x28]
MOV EDX,dword ptr [EBP + 0x20]
MOV ESI,dword ptr [EBX + 0xb68]
MOV ECX,dword ptr [EBP + 0x24]
MOV dword ptr [ESP + 0x4],EDI
MOV EAX,dword ptr [EBP + 0x2c]
MOV dword ptr [ESP],EDI
TEST ESI,ESI
JZ 0x00033f50
MOV ESI,dword ptr [ESP]
XOR ESI,EDI
OR ESI,EAX
JZ 0x00033e89
MOV EAX,dword ptr [EBP + 0x14]
MOV dword ptr [ESP + 0x8],EDX
SUB ESP,0x4
MOV dword ptr [ESP + 0x10],ECX
MOV ESI,EAX
LEA EAX,[EBX + 0xfff96eec]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000142e0
ADD ESP,0xc
PUSH dword ptr [ESP + 0x4]
PUSH ESI
PUSH EAX
CALL 0x00031730
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
MOV ECX,dword ptr [ESP + 0xc]
MOV EAX,dword ptr [EBP + 0x4]
MOV dword ptr [ESP],EAX
TEST EAX,EAX
JZ 0x00033e9c
CMP dword ptr [EBP + 0x8],EDI
JZ 0x00033f30
MOV dword ptr [EBP + 0x8],EDI
MOV dword ptr [EBP + 0xc],EDX
MOV dword ptr [EBP + 0x10],ECX
MOV dword ptr [EBP + 0x1c],0x0
PUSH 0x0
PUSH ECX
PUSH EDX
PUSH dword ptr [EBP + 0x18]
CALL 0x00014a20
ADD ESP,0x10
TEST EDX,EDX
JS 0x00033f08
SUB ESP,0x8
PUSH EDI
PUSH dword ptr [EBP]
CALL 0x000142b0
MOV dword ptr [ESP + 0x10],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00033f08
MOV EDI,EAX
MOV ESI,dword ptr [ESP + 0x4]
JMP 0x00033ee8
ADD EDI,EAX
SUB ESI,EAX
TEST ESI,ESI
JZ 0x00033f18
SUB ESP,0x4
PUSH ESI
PUSH EDI
PUSH dword ptr [EBP + 0x18]
CALL 0x000140e0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00033f18
JG 0x00033ee0
CALL 0x000147f0
CMP dword ptr [EAX],0x4
JZ 0x00033ee4
ADD ESP,0x1c
MOV EAX,0x3
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP]
MOV ECX,dword ptr [ESP + 0x34]
MOV dword ptr [EBP + 0x4],EAX
MOV dword ptr [ECX],EAX
XOR EAX,EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ESI,dword ptr [EBP + 0xc]
MOV EAX,dword ptr [EBP + 0x10]
XOR ESI,EDX
XOR EAX,ECX
OR EAX,ESI
JNZ 0x00033e9c
MOV EAX,dword ptr [ESP + 0x34]
MOV ECX,dword ptr [ESP]
MOV dword ptr [EAX],ECX
XOR EAX,EAX
JMP 0x00033f26
MOV dword ptr [ESP + 0x8],EDX
LEA EAX,[EBX + 0xfff970db]
SUB ESP,0x8
MOV dword ptr [ESP + 0x14],ECX
PUSH 0x21a
PUSH EAX
CALL 0x00031780
MOV EAX,dword ptr [EBP + 0x28]
MOV dword ptr [ESP + 0x10],EAX
ADD ESP,0x10
MOV EAX,dword ptr [EBP + 0x2c]
MOV EDX,dword ptr [ESP + 0x8]
MOV ECX,dword ptr [ESP + 0xc]
JMP 0x00033e47
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00033e10(undefined4 *param_1,int *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_00033e10(undefined4 *param_1,int *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00033e10(undefined4 *param_1,int *param_2)" identifier (parameter_list "(undefined4 *param_1,int *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "void *pvVar6;" primitive_type (pointer_declarator "*pvVar6" * identifier) ;) (declaration "ssize_t sVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "size_t __nbytes;" primitive_type identifier ;) (declaration "void *__buf;" primitive_type (pointer_declarator "*__buf" * identifier) ;) (declaration "__off64_t _Var9;" type_identifier identifier ;) (declaration "size_t local_2c;" primitive_type identifier ;) (expression_statement "__nbytes = param_1[10];" (assignment_expression "__nbytes = param_1[10]" identifier = (subscript_expression "param_1[10]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = (int)*(__off64_t *)(param_1 + 8);" (assignment_expression "iVar1 = (int)*(__off64_t *)(param_1 + 8)" identifier = (cast_expression "(int)*(__off64_t *)(param_1 + 8)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(__off64_t *)(param_1 + 8)" * (cast_expression "(__off64_t *)(param_1 + 8)" ( (type_descriptor "__off64_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))))) ;) (expression_statement "iVar2 = param_1[9];" (assignment_expression "iVar2 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) (expression_statement "_Var9 = *(__off64_t *)(param_1 + 8);" (assignment_expression "_Var9 = *(__off64_t *)(param_1 + 8)" identifier = (pointer_expression "*(__off64_t *)(param_1 + 8)" * (cast_expression "(__off64_t *)(param_1 + 8)" ( (type_descriptor "__off64_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = param_1[0xb];" (assignment_expression "iVar4 = param_1[0xb]" identifier = (subscript_expression "param_1[0xb]" identifier [ number_literal ])) ;) (expression_statement "local_2c = __nbytes;" (assignment_expression "local_2c = __nbytes" identifier = identifier) ;) (if_statement "if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }" if (parenthesized_expression "(DAT_000bbb68 == 0)" ( (binary_expression "DAT_000bbb68 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }" { (expression_statement "FUN_00031780("../../ld/plugin.c",0x21a);" (call_expression "FUN_00031780("../../ld/plugin.c",0x21a)" identifier (argument_list "("../../ld/plugin.c",0x21a)" ( (string_literal ""../../ld/plugin.c"" " string_content ") , number_literal ))) ;) (expression_statement "local_2c = param_1[10];" (assignment_expression "local_2c = param_1[10]" identifier = (subscript_expression "param_1[10]" identifier [ number_literal ])) ;) (expression_statement "iVar4 = param_1[0xb];" (assignment_expression "iVar4 = param_1[0xb]" identifier = (subscript_expression "param_1[0xb]" identifier [ number_literal ])) ;) })) (if_statement "if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }" if (parenthesized_expression "(local_2c != __nbytes || iVar4 != 0)" ( (binary_expression "local_2c != __nbytes || iVar4 != 0" (binary_expression "local_2c != __nbytes" identifier != identifier) || (binary_expression "iVar4 != 0" identifier != number_literal)) )) (compound_statement "{\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }" { (expression_statement "uVar3 = param_1[5];" (assignment_expression "uVar3 = param_1[5]" identifier = (subscript_expression "param_1[5]" identifier [ number_literal ])) ;) (expression_statement "uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);" (assignment_expression "uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" identifier = (call_expression "dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" identifier (argument_list "(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" ( number_literal , (string_literal ""%F%P: unsupported input file size: %s (%ld bytes)\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "FUN_00031730(uVar5,uVar3,local_2c);" (call_expression "FUN_00031730(uVar5,uVar3,local_2c)" identifier (argument_list "(uVar5,uVar3,local_2c)" ( identifier , identifier , identifier ))) ;) })) (if_statement "if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }" if (parenthesized_expression "(((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1))" ( (binary_expression "((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)" (parenthesized_expression "((param_1[1] == 0) || (param_1[2] != __nbytes))" ( (binary_expression "(param_1[1] == 0) || (param_1[2] != __nbytes)" (parenthesized_expression "(param_1[1] == 0)" ( (binary_expression "param_1[1] == 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "(param_1[2] != __nbytes)" ( (binary_expression "param_1[2] != __nbytes" (subscript_expression "param_1[2]" identifier [ number_literal ]) != identifier) ))) )) || (parenthesized_expression "(param_1[4] != iVar2 || param_1[3] != iVar1)" ( (binary_expression "param_1[4] != iVar2 || param_1[3] != iVar1" (binary_expression "param_1[4] != iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) != identifier) || (binary_expression "param_1[3] != iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) != identifier)) ))) )) (compound_statement "{\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }" { (expression_statement "param_1[2] = __nbytes;" (assignment_expression "param_1[2] = __nbytes" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[7] = 0;" (assignment_expression "param_1[7] = 0" (subscript_expression "param_1[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "_Var9 = lseek64(param_1[6],_Var9,0);" (assignment_expression "_Var9 = lseek64(param_1[6],_Var9,0)" identifier = (call_expression "lseek64(param_1[6],_Var9,0)" identifier (argument_list "(param_1[6],_Var9,0)" ( (subscript_expression "param_1[6]" identifier [ number_literal ]) , identifier , number_literal )))) ;) (if_statement "if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }" if (parenthesized_expression "((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0))" ( (binary_expression "(_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)" (parenthesized_expression "(_Var9 < 0)" ( (binary_expression "_Var9 < 0" identifier < number_literal) )) || (parenthesized_expression "(pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)" ( (comma_expression "pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0" (assignment_expression "pvVar6 = (void *)bfd_alloc(*param_1,__nbytes)" identifier = (cast_expression "(void *)bfd_alloc(*param_1,__nbytes)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(*param_1,__nbytes)" identifier (argument_list "(*param_1,__nbytes)" ( (pointer_expression "*param_1" * identifier) , identifier ))))) , (comma_expression "__buf = pvVar6, pvVar6 == (void *)0x0" (assignment_expression "__buf = pvVar6" identifier = identifier) , (binary_expression "pvVar6 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)))) ))) )) (compound_statement "{\n      return 3;\n    }" { (return_statement "return 3;" return number_literal ;) })) (do_statement "do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);" do (compound_statement "{\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    }" { (expression_statement "sVar7 = read(param_1[6],__buf,__nbytes);" (assignment_expression "sVar7 = read(param_1[6],__buf,__nbytes)" identifier = (call_expression "read(param_1[6],__buf,__nbytes)" identifier (argument_list "(param_1[6],__buf,__nbytes)" ( (subscript_expression "param_1[6]" identifier [ number_literal ]) , identifier , identifier )))) ;) (if_statement "if (sVar7 == 0) break;" if (parenthesized_expression "(sVar7 == 0)" ( (binary_expression "sVar7 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" if (parenthesized_expression "(sVar7 < 1)" ( (binary_expression "sVar7 < 1" identifier < number_literal) )) (compound_statement "{\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }" { (expression_statement "piVar8 = __errno_location();" (assignment_expression "piVar8 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar8 != 4) {\n          return 3;\n        }" if (parenthesized_expression "(*piVar8 != 4)" ( (binary_expression "*piVar8 != 4" (pointer_expression "*piVar8" * identifier) != number_literal) )) (compound_statement "{\n          return 3;\n        }" { (return_statement "return 3;" return number_literal ;) })) }) (else_clause "else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" else (compound_statement "{\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" { (expression_statement "__buf = (void *)((int)__buf + sVar7);" (assignment_expression "__buf = (void *)((int)__buf + sVar7)" identifier = (cast_expression "(void *)((int)__buf + sVar7)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__buf + sVar7)" ( (binary_expression "(int)__buf + sVar7" (cast_expression "(int)__buf" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "__nbytes = __nbytes - sVar7;" (assignment_expression "__nbytes = __nbytes - sVar7" identifier = (binary_expression "__nbytes - sVar7" identifier - identifier)) ;) }))) }) while (parenthesized_expression "(__nbytes != 0)" ( (binary_expression "__nbytes != 0" identifier != number_literal) )) ;) (expression_statement "param_1[1] = pvVar6;" (assignment_expression "param_1[1] = pvVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = (int)pvVar6;" (assignment_expression "*param_2 = (int)pvVar6" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pvVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) }) (else_clause "else {\n    *param_2 = param_1[1];\n  }" else (compound_statement "{\n    *param_2 = param_1[1];\n  }" { (expression_statement "*param_2 = param_1[1];" (assignment_expression "*param_2 = param_1[1]" (pointer_expression "*param_2" * identifier) = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nld_plugin_status get_view(void *handle,void **viewp)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  char *fmt;\n  void *pvVar5;\n  ssize_t sVar6;\n  int *piVar7;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var8;\n  size_t local_2c;\n  \n  __nbytes = *(size_t *)((int)handle + 0x28);\n  iVar1 = *(int *)((int)handle + 0x20);\n  iVar2 = *(int *)((int)handle + 0x24);\n  _Var8 = *(__off64_t *)((int)handle + 0x20);\n  iVar4 = *(int *)((int)handle + 0x2c);\n  local_2c = __nbytes;\n  if (called_plugin == (plugin_t *)0x0) {\n    info_assert("../../ld/plugin.c",0x21a);\n    local_2c = *(size_t *)((int)handle + 0x28);\n    iVar4 = *(int *)((int)handle + 0x2c);\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = *(undefined4 *)((int)handle + 0x14);\n    fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    einfo(fmt,uVar3,local_2c);\n  }\n  if (((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))\n     || (*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1)) {\n    *(size_t *)((int)handle + 8) = __nbytes;\n    *(int *)((int)handle + 0xc) = iVar1;\n    *(int *)((int)handle + 0x10) = iVar2;\n    *(undefined4 *)((int)handle + 0x1c) = 0;\n    _Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0);\n                    /* WARNING: Load size is inaccurate */\n    if ((_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)) {\n      return LDPS_ERR;\n    }\n    do {\n      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);\n      if (sVar6 == 0) break;\n      if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }\n    } while (__nbytes != 0);\n    *(void **)((int)handle + 4) = pvVar5;\n    *viewp = pvVar5;\n  }\n  else {\n    *viewp = *(void **)((int)handle + 4);\n  }\n  return LDPS_OK;\n}\n\n" comment comment (function_definition "ld_plugin_status get_view(void *handle,void **viewp)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  char *fmt;\n  void *pvVar5;\n  ssize_t sVar6;\n  int *piVar7;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var8;\n  size_t local_2c;\n  \n  __nbytes = *(size_t *)((int)handle + 0x28);\n  iVar1 = *(int *)((int)handle + 0x20);\n  iVar2 = *(int *)((int)handle + 0x24);\n  _Var8 = *(__off64_t *)((int)handle + 0x20);\n  iVar4 = *(int *)((int)handle + 0x2c);\n  local_2c = __nbytes;\n  if (called_plugin == (plugin_t *)0x0) {\n    info_assert("../../ld/plugin.c",0x21a);\n    local_2c = *(size_t *)((int)handle + 0x28);\n    iVar4 = *(int *)((int)handle + 0x2c);\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = *(undefined4 *)((int)handle + 0x14);\n    fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    einfo(fmt,uVar3,local_2c);\n  }\n  if (((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))\n     || (*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1)) {\n    *(size_t *)((int)handle + 8) = __nbytes;\n    *(int *)((int)handle + 0xc) = iVar1;\n    *(int *)((int)handle + 0x10) = iVar2;\n    *(undefined4 *)((int)handle + 0x1c) = 0;\n    _Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0);\n                    /* WARNING: Load size is inaccurate */\n    if ((_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)) {\n      return LDPS_ERR;\n    }\n    do {\n      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);\n      if (sVar6 == 0) break;\n      if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }\n    } while (__nbytes != 0);\n    *(void **)((int)handle + 4) = pvVar5;\n    *viewp = pvVar5;\n  }\n  else {\n    *viewp = *(void **)((int)handle + 4);\n  }\n  return LDPS_OK;\n}" type_identifier (function_declarator "get_view(void *handle,void **viewp)" identifier (parameter_list "(void *handle,void **viewp)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "void **viewp" primitive_type (pointer_declarator "**viewp" * (pointer_declarator "*viewp" * identifier))) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  char *fmt;\n  void *pvVar5;\n  ssize_t sVar6;\n  int *piVar7;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var8;\n  size_t local_2c;\n  \n  __nbytes = *(size_t *)((int)handle + 0x28);\n  iVar1 = *(int *)((int)handle + 0x20);\n  iVar2 = *(int *)((int)handle + 0x24);\n  _Var8 = *(__off64_t *)((int)handle + 0x20);\n  iVar4 = *(int *)((int)handle + 0x2c);\n  local_2c = __nbytes;\n  if (called_plugin == (plugin_t *)0x0) {\n    info_assert("../../ld/plugin.c",0x21a);\n    local_2c = *(size_t *)((int)handle + 0x28);\n    iVar4 = *(int *)((int)handle + 0x2c);\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = *(undefined4 *)((int)handle + 0x14);\n    fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    einfo(fmt,uVar3,local_2c);\n  }\n  if (((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))\n     || (*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1)) {\n    *(size_t *)((int)handle + 8) = __nbytes;\n    *(int *)((int)handle + 0xc) = iVar1;\n    *(int *)((int)handle + 0x10) = iVar2;\n    *(undefined4 *)((int)handle + 0x1c) = 0;\n    _Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0);\n                    /* WARNING: Load size is inaccurate */\n    if ((_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)) {\n      return LDPS_ERR;\n    }\n    do {\n      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);\n      if (sVar6 == 0) break;\n      if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }\n    } while (__nbytes != 0);\n    *(void **)((int)handle + 4) = pvVar5;\n    *viewp = pvVar5;\n  }\n  else {\n    *viewp = *(void **)((int)handle + 4);\n  }\n  return LDPS_OK;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *fmt;" primitive_type (pointer_declarator "*fmt" * identifier) ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "ssize_t sVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "size_t __nbytes;" primitive_type identifier ;) (declaration "void *__buf;" primitive_type (pointer_declarator "*__buf" * identifier) ;) (declaration "__off64_t _Var8;" type_identifier identifier ;) (declaration "size_t local_2c;" primitive_type identifier ;) (expression_statement "__nbytes = *(size_t *)((int)handle + 0x28);" (assignment_expression "__nbytes = *(size_t *)((int)handle + 0x28)" identifier = (pointer_expression "*(size_t *)((int)handle + 0x28)" * (cast_expression "(size_t *)((int)handle + 0x28)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x28)" ( (binary_expression "(int)handle + 0x28" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "iVar1 = *(int *)((int)handle + 0x20);" (assignment_expression "iVar1 = *(int *)((int)handle + 0x20)" identifier = (pointer_expression "*(int *)((int)handle + 0x20)" * (cast_expression "(int *)((int)handle + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x20)" ( (binary_expression "(int)handle + 0x20" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)((int)handle + 0x24);" (assignment_expression "iVar2 = *(int *)((int)handle + 0x24)" identifier = (pointer_expression "*(int *)((int)handle + 0x24)" * (cast_expression "(int *)((int)handle + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x24)" ( (binary_expression "(int)handle + 0x24" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "_Var8 = *(__off64_t *)((int)handle + 0x20);" (assignment_expression "_Var8 = *(__off64_t *)((int)handle + 0x20)" identifier = (pointer_expression "*(__off64_t *)((int)handle + 0x20)" * (cast_expression "(__off64_t *)((int)handle + 0x20)" ( (type_descriptor "__off64_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x20)" ( (binary_expression "(int)handle + 0x20" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)((int)handle + 0x2c);" (assignment_expression "iVar4 = *(int *)((int)handle + 0x2c)" identifier = (pointer_expression "*(int *)((int)handle + 0x2c)" * (cast_expression "(int *)((int)handle + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x2c)" ( (binary_expression "(int)handle + 0x2c" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "local_2c = __nbytes;" (assignment_expression "local_2c = __nbytes" identifier = identifier) ;) (if_statement "if (called_plugin == (plugin_t *)0x0) {\n    info_assert("../../ld/plugin.c",0x21a);\n    local_2c = *(size_t *)((int)handle + 0x28);\n    iVar4 = *(int *)((int)handle + 0x2c);\n  }" if (parenthesized_expression "(called_plugin == (plugin_t *)0x0)" ( (binary_expression "called_plugin == (plugin_t *)0x0" identifier == (cast_expression "(plugin_t *)0x0" ( (type_descriptor "plugin_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    info_assert("../../ld/plugin.c",0x21a);\n    local_2c = *(size_t *)((int)handle + 0x28);\n    iVar4 = *(int *)((int)handle + 0x2c);\n  }" { (expression_statement "info_assert("../../ld/plugin.c",0x21a);" (call_expression "info_assert("../../ld/plugin.c",0x21a)" identifier (argument_list "("../../ld/plugin.c",0x21a)" ( (string_literal ""../../ld/plugin.c"" " string_content ") , number_literal ))) ;) (expression_statement "local_2c = *(size_t *)((int)handle + 0x28);" (assignment_expression "local_2c = *(size_t *)((int)handle + 0x28)" identifier = (pointer_expression "*(size_t *)((int)handle + 0x28)" * (cast_expression "(size_t *)((int)handle + 0x28)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x28)" ( (binary_expression "(int)handle + 0x28" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)((int)handle + 0x2c);" (assignment_expression "iVar4 = *(int *)((int)handle + 0x2c)" identifier = (pointer_expression "*(int *)((int)handle + 0x2c)" * (cast_expression "(int *)((int)handle + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x2c)" ( (binary_expression "(int)handle + 0x2c" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) })) (if_statement "if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = *(undefined4 *)((int)handle + 0x14);\n    fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    einfo(fmt,uVar3,local_2c);\n  }" if (parenthesized_expression "(local_2c != __nbytes || iVar4 != 0)" ( (binary_expression "local_2c != __nbytes || iVar4 != 0" (binary_expression "local_2c != __nbytes" identifier != identifier) || (binary_expression "iVar4 != 0" identifier != number_literal)) )) (compound_statement "{\n    uVar3 = *(undefined4 *)((int)handle + 0x14);\n    fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    einfo(fmt,uVar3,local_2c);\n  }" { (expression_statement "uVar3 = *(undefined4 *)((int)handle + 0x14);" (assignment_expression "uVar3 = *(undefined4 *)((int)handle + 0x14)" identifier = (pointer_expression "*(undefined4 *)((int)handle + 0x14)" * (cast_expression "(undefined4 *)((int)handle + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x14)" ( (binary_expression "(int)handle + 0x14" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);" (assignment_expression "fmt = (char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" identifier (argument_list "(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" ( number_literal , (string_literal ""%F%P: unsupported input file size: %s (%ld bytes)\n"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "einfo(fmt,uVar3,local_2c);" (call_expression "einfo(fmt,uVar3,local_2c)" identifier (argument_list "(fmt,uVar3,local_2c)" ( identifier , identifier , identifier ))) ;) })) (if_statement "if (((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))\n     || (*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1)) {\n    *(size_t *)((int)handle + 8) = __nbytes;\n    *(int *)((int)handle + 0xc) = iVar1;\n    *(int *)((int)handle + 0x10) = iVar2;\n    *(undefined4 *)((int)handle + 0x1c) = 0;\n    _Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0);\n                    /* WARNING: Load size is inaccurate */\n    if ((_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)) {\n      return LDPS_ERR;\n    }\n    do {\n      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);\n      if (sVar6 == 0) break;\n      if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }\n    } while (__nbytes != 0);\n    *(void **)((int)handle + 4) = pvVar5;\n    *viewp = pvVar5;\n  }\n  else {\n    *viewp = *(void **)((int)handle + 4);\n  }" if (parenthesized_expression "(((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))\n     || (*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1))" ( (binary_expression "((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))\n     || (*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1)" (parenthesized_expression "((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes))" ( (binary_expression "(*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != __nbytes)" (parenthesized_expression "(*(void **)((int)handle + 4) == (void *)0x0)" ( (binary_expression "*(void **)((int)handle + 4) == (void *)0x0" (pointer_expression "*(void **)((int)handle + 4)" * (cast_expression "(void **)((int)handle + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*(size_t *)((int)handle + 8) != __nbytes)" ( (binary_expression "*(size_t *)((int)handle + 8) != __nbytes" (pointer_expression "*(size_t *)((int)handle + 8)" * (cast_expression "(size_t *)((int)handle + 8)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 8)" ( (binary_expression "(int)handle + 8" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != identifier) ))) )) || (parenthesized_expression "(*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1)" ( (binary_expression "*(int *)((int)handle + 0x10) != iVar2 || *(int *)((int)handle + 0xc) != iVar1" (binary_expression "*(int *)((int)handle + 0x10) != iVar2" (pointer_expression "*(int *)((int)handle + 0x10)" * (cast_expression "(int *)((int)handle + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x10)" ( (binary_expression "(int)handle + 0x10" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != identifier) || (binary_expression "*(int *)((int)handle + 0xc) != iVar1" (pointer_expression "*(int *)((int)handle + 0xc)" * (cast_expression "(int *)((int)handle + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0xc)" ( (binary_expression "(int)handle + 0xc" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != identifier)) ))) )) (compound_statement "{\n    *(size_t *)((int)handle + 8) = __nbytes;\n    *(int *)((int)handle + 0xc) = iVar1;\n    *(int *)((int)handle + 0x10) = iVar2;\n    *(undefined4 *)((int)handle + 0x1c) = 0;\n    _Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0);\n                    /* WARNING: Load size is inaccurate */\n    if ((_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)) {\n      return LDPS_ERR;\n    }\n    do {\n      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);\n      if (sVar6 == 0) break;\n      if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }\n    } while (__nbytes != 0);\n    *(void **)((int)handle + 4) = pvVar5;\n    *viewp = pvVar5;\n  }" { (expression_statement "*(size_t *)((int)handle + 8) = __nbytes;" (assignment_expression "*(size_t *)((int)handle + 8) = __nbytes" (pointer_expression "*(size_t *)((int)handle + 8)" * (cast_expression "(size_t *)((int)handle + 8)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 8)" ( (binary_expression "(int)handle + 8" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(int *)((int)handle + 0xc) = iVar1;" (assignment_expression "*(int *)((int)handle + 0xc) = iVar1" (pointer_expression "*(int *)((int)handle + 0xc)" * (cast_expression "(int *)((int)handle + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0xc)" ( (binary_expression "(int)handle + 0xc" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(int *)((int)handle + 0x10) = iVar2;" (assignment_expression "*(int *)((int)handle + 0x10) = iVar2" (pointer_expression "*(int *)((int)handle + 0x10)" * (cast_expression "(int *)((int)handle + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x10)" ( (binary_expression "(int)handle + 0x10" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)((int)handle + 0x1c) = 0;" (assignment_expression "*(undefined4 *)((int)handle + 0x1c) = 0" (pointer_expression "*(undefined4 *)((int)handle + 0x1c)" * (cast_expression "(undefined4 *)((int)handle + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x1c)" ( (binary_expression "(int)handle + 0x1c" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "_Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0);" (assignment_expression "_Var8 = lseek64(*(int *)((int)handle + 0x18),_Var8,0)" identifier = (call_expression "lseek64(*(int *)((int)handle + 0x18),_Var8,0)" identifier (argument_list "(*(int *)((int)handle + 0x18),_Var8,0)" ( (pointer_expression "*(int *)((int)handle + 0x18)" * (cast_expression "(int *)((int)handle + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x18)" ( (binary_expression "(int)handle + 0x18" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , identifier , number_literal )))) ;) comment (if_statement "if ((_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)) {\n      return LDPS_ERR;\n    }" if (parenthesized_expression "((_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0))" ( (binary_expression "(_Var8 < 0) ||\n       (pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)" (parenthesized_expression "(_Var8 < 0)" ( (binary_expression "_Var8 < 0" identifier < number_literal) )) || (parenthesized_expression "(pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0)" ( (comma_expression "pvVar5 = (void *)bfd_alloc(*handle,__nbytes), __buf = pvVar5, pvVar5 == (void *)0x0" (assignment_expression "pvVar5 = (void *)bfd_alloc(*handle,__nbytes)" identifier = (cast_expression "(void *)bfd_alloc(*handle,__nbytes)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(*handle,__nbytes)" identifier (argument_list "(*handle,__nbytes)" ( (pointer_expression "*handle" * identifier) , identifier ))))) , (comma_expression "__buf = pvVar5, pvVar5 == (void *)0x0" (assignment_expression "__buf = pvVar5" identifier = identifier) , (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)))) ))) )) (compound_statement "{\n      return LDPS_ERR;\n    }" { (return_statement "return LDPS_ERR;" return identifier ;) })) (do_statement "do {\n      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);\n      if (sVar6 == 0) break;\n      if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }\n    } while (__nbytes != 0);" do (compound_statement "{\n      sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);\n      if (sVar6 == 0) break;\n      if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }\n    }" { (expression_statement "sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes);" (assignment_expression "sVar6 = read(*(int *)((int)handle + 0x18),__buf,__nbytes)" identifier = (call_expression "read(*(int *)((int)handle + 0x18),__buf,__nbytes)" identifier (argument_list "(*(int *)((int)handle + 0x18),__buf,__nbytes)" ( (pointer_expression "*(int *)((int)handle + 0x18)" * (cast_expression "(int *)((int)handle + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x18)" ( (binary_expression "(int)handle + 0x18" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , identifier , identifier )))) ;) (if_statement "if (sVar6 == 0) break;" if (parenthesized_expression "(sVar6 == 0)" ( (binary_expression "sVar6 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (sVar6 < 1) {\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }" if (parenthesized_expression "(sVar6 < 1)" ( (binary_expression "sVar6 < 1" identifier < number_literal) )) (compound_statement "{\n        piVar7 = __errno_location();\n        if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }\n      }" { (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar7 != 4) {\n          return LDPS_ERR;\n        }" if (parenthesized_expression "(*piVar7 != 4)" ( (binary_expression "*piVar7 != 4" (pointer_expression "*piVar7" * identifier) != number_literal) )) (compound_statement "{\n          return LDPS_ERR;\n        }" { (return_statement "return LDPS_ERR;" return identifier ;) })) }) (else_clause "else {\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }" else (compound_statement "{\n        __buf = (void *)((int)__buf + sVar6);\n        __nbytes = __nbytes - sVar6;\n      }" { (expression_statement "__buf = (void *)((int)__buf + sVar6);" (assignment_expression "__buf = (void *)((int)__buf + sVar6)" identifier = (cast_expression "(void *)((int)__buf + sVar6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__buf + sVar6)" ( (binary_expression "(int)__buf + sVar6" (cast_expression "(int)__buf" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "__nbytes = __nbytes - sVar6;" (assignment_expression "__nbytes = __nbytes - sVar6" identifier = (binary_expression "__nbytes - sVar6" identifier - identifier)) ;) }))) }) while (parenthesized_expression "(__nbytes != 0)" ( (binary_expression "__nbytes != 0" identifier != number_literal) )) ;) (expression_statement "*(void **)((int)handle + 4) = pvVar5;" (assignment_expression "*(void **)((int)handle + 4) = pvVar5" (pointer_expression "*(void **)((int)handle + 4)" * (cast_expression "(void **)((int)handle + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*viewp = pvVar5;" (assignment_expression "*viewp = pvVar5" (pointer_expression "*viewp" * identifier) = identifier) ;) }) (else_clause "else {\n    *viewp = *(void **)((int)handle + 4);\n  }" else (compound_statement "{\n    *viewp = *(void **)((int)handle + 4);\n  }" { (expression_statement "*viewp = *(void **)((int)handle + 4);" (assignment_expression "*viewp = *(void **)((int)handle + 4)" (pointer_expression "*viewp" * identifier) = (pointer_expression "*(void **)((int)handle + 4)" * (cast_expression "(void **)((int)handle + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) }))) (return_statement "return LDPS_OK;" return identifier ;) })))
(translation_unit "undefined4 FUN_00033e10(undefined4 *param_1,int *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00033e10(undefined4 *param_1,int *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00033e10(undefined4 *param_1,int *param_2)" identifier (parameter_list "(undefined4 *param_1,int *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "void *pvVar6;" primitive_type (pointer_declarator "*pvVar6" * identifier) ;) (declaration "ssize_t sVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "size_t __nbytes;" primitive_type identifier ;) (declaration "void *__buf;" primitive_type (pointer_declarator "*__buf" * identifier) ;) (declaration "__off64_t _Var9;" type_identifier identifier ;) (declaration "size_t local_2c;" primitive_type identifier ;) (expression_statement "__nbytes = param_1[10];" (assignment_expression "__nbytes = param_1[10]" identifier = (subscript_expression "param_1[10]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = (int)*(__off64_t *)(param_1 + 8);" (assignment_expression "iVar1 = (int)*(__off64_t *)(param_1 + 8)" identifier = (cast_expression "(int)*(__off64_t *)(param_1 + 8)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(__off64_t *)(param_1 + 8)" * (cast_expression "(__off64_t *)(param_1 + 8)" ( (type_descriptor "__off64_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))))) ;) (expression_statement "iVar2 = param_1[9];" (assignment_expression "iVar2 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) (expression_statement "_Var9 = *(__off64_t *)(param_1 + 8);" (assignment_expression "_Var9 = *(__off64_t *)(param_1 + 8)" identifier = (pointer_expression "*(__off64_t *)(param_1 + 8)" * (cast_expression "(__off64_t *)(param_1 + 8)" ( (type_descriptor "__off64_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = param_1[0xb];" (assignment_expression "iVar4 = param_1[0xb]" identifier = (subscript_expression "param_1[0xb]" identifier [ number_literal ])) ;) (expression_statement "local_2c = __nbytes;" (assignment_expression "local_2c = __nbytes" identifier = identifier) ;) (if_statement "if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }" if (parenthesized_expression "(DAT_000bbb68 == 0)" ( (binary_expression "DAT_000bbb68 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }" { (expression_statement "FUN_00031780("../../ld/plugin.c",0x21a);" (call_expression "FUN_00031780("../../ld/plugin.c",0x21a)" identifier (argument_list "("../../ld/plugin.c",0x21a)" ( (string_literal ""../../ld/plugin.c"" " string_content ") , number_literal ))) ;) (expression_statement "local_2c = param_1[10];" (assignment_expression "local_2c = param_1[10]" identifier = (subscript_expression "param_1[10]" identifier [ number_literal ])) ;) (expression_statement "iVar4 = param_1[0xb];" (assignment_expression "iVar4 = param_1[0xb]" identifier = (subscript_expression "param_1[0xb]" identifier [ number_literal ])) ;) })) (if_statement "if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }" if (parenthesized_expression "(local_2c != __nbytes || iVar4 != 0)" ( (binary_expression "local_2c != __nbytes || iVar4 != 0" (binary_expression "local_2c != __nbytes" identifier != identifier) || (binary_expression "iVar4 != 0" identifier != number_literal)) )) (compound_statement "{\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }" { (expression_statement "uVar3 = param_1[5];" (assignment_expression "uVar3 = param_1[5]" identifier = (subscript_expression "param_1[5]" identifier [ number_literal ])) ;) (expression_statement "uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);" (assignment_expression "uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" identifier = (call_expression "dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" identifier (argument_list "(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" ( number_literal , (string_literal ""%F%P: unsupported input file size: %s (%ld bytes)\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "FUN_00031730(uVar5,uVar3,local_2c);" (call_expression "FUN_00031730(uVar5,uVar3,local_2c)" identifier (argument_list "(uVar5,uVar3,local_2c)" ( identifier , identifier , identifier ))) ;) })) (if_statement "if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }" if (parenthesized_expression "(((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1))" ( (binary_expression "((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)" (parenthesized_expression "((param_1[1] == 0) || (param_1[2] != __nbytes))" ( (binary_expression "(param_1[1] == 0) || (param_1[2] != __nbytes)" (parenthesized_expression "(param_1[1] == 0)" ( (binary_expression "param_1[1] == 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "(param_1[2] != __nbytes)" ( (binary_expression "param_1[2] != __nbytes" (subscript_expression "param_1[2]" identifier [ number_literal ]) != identifier) ))) )) || (parenthesized_expression "(param_1[4] != iVar2 || param_1[3] != iVar1)" ( (binary_expression "param_1[4] != iVar2 || param_1[3] != iVar1" (binary_expression "param_1[4] != iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) != identifier) || (binary_expression "param_1[3] != iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) != identifier)) ))) )) (compound_statement "{\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }" { (expression_statement "param_1[2] = __nbytes;" (assignment_expression "param_1[2] = __nbytes" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[7] = 0;" (assignment_expression "param_1[7] = 0" (subscript_expression "param_1[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "_Var9 = lseek64(param_1[6],_Var9,0);" (assignment_expression "_Var9 = lseek64(param_1[6],_Var9,0)" identifier = (call_expression "lseek64(param_1[6],_Var9,0)" identifier (argument_list "(param_1[6],_Var9,0)" ( (subscript_expression "param_1[6]" identifier [ number_literal ]) , identifier , number_literal )))) ;) (if_statement "if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }" if (parenthesized_expression "((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0))" ( (binary_expression "(_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)" (parenthesized_expression "(_Var9 < 0)" ( (binary_expression "_Var9 < 0" identifier < number_literal) )) || (parenthesized_expression "(pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)" ( (comma_expression "pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0" (assignment_expression "pvVar6 = (void *)bfd_alloc(*param_1,__nbytes)" identifier = (cast_expression "(void *)bfd_alloc(*param_1,__nbytes)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(*param_1,__nbytes)" identifier (argument_list "(*param_1,__nbytes)" ( (pointer_expression "*param_1" * identifier) , identifier ))))) , (comma_expression "__buf = pvVar6, pvVar6 == (void *)0x0" (assignment_expression "__buf = pvVar6" identifier = identifier) , (binary_expression "pvVar6 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)))) ))) )) (compound_statement "{\n      return 3;\n    }" { (return_statement "return 3;" return number_literal ;) })) (do_statement "do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);" do (compound_statement "{\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    }" { (expression_statement "sVar7 = read(param_1[6],__buf,__nbytes);" (assignment_expression "sVar7 = read(param_1[6],__buf,__nbytes)" identifier = (call_expression "read(param_1[6],__buf,__nbytes)" identifier (argument_list "(param_1[6],__buf,__nbytes)" ( (subscript_expression "param_1[6]" identifier [ number_literal ]) , identifier , identifier )))) ;) (if_statement "if (sVar7 == 0) break;" if (parenthesized_expression "(sVar7 == 0)" ( (binary_expression "sVar7 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" if (parenthesized_expression "(sVar7 < 1)" ( (binary_expression "sVar7 < 1" identifier < number_literal) )) (compound_statement "{\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }" { (expression_statement "piVar8 = __errno_location();" (assignment_expression "piVar8 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar8 != 4) {\n          return 3;\n        }" if (parenthesized_expression "(*piVar8 != 4)" ( (binary_expression "*piVar8 != 4" (pointer_expression "*piVar8" * identifier) != number_literal) )) (compound_statement "{\n          return 3;\n        }" { (return_statement "return 3;" return number_literal ;) })) }) (else_clause "else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" else (compound_statement "{\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" { (expression_statement "__buf = (void *)((int)__buf + sVar7);" (assignment_expression "__buf = (void *)((int)__buf + sVar7)" identifier = (cast_expression "(void *)((int)__buf + sVar7)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__buf + sVar7)" ( (binary_expression "(int)__buf + sVar7" (cast_expression "(int)__buf" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "__nbytes = __nbytes - sVar7;" (assignment_expression "__nbytes = __nbytes - sVar7" identifier = (binary_expression "__nbytes - sVar7" identifier - identifier)) ;) }))) }) while (parenthesized_expression "(__nbytes != 0)" ( (binary_expression "__nbytes != 0" identifier != number_literal) )) ;) (expression_statement "param_1[1] = pvVar6;" (assignment_expression "param_1[1] = pvVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = (int)pvVar6;" (assignment_expression "*param_2 = (int)pvVar6" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pvVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) }) (else_clause "else {\n    *param_2 = param_1[1];\n  }" else (compound_statement "{\n    *param_2 = param_1[1];\n  }" { (expression_statement "*param_2 = param_1[1];" (assignment_expression "*param_2 = param_1[1]" (pointer_expression "*param_2" * identifier) = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (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 = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT != IDENT) || (binary_expression IDENT != LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != IDENT) ))) )) || (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) != IDENT) || (binary_expression (subscript_expression IDENT [ LIT ]) != IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression (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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT ))))) , (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)))) ))) )) (compound_statement { (return_statement return LIT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) }))) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) }))) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00033e10(undefined4 *param_1,int *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00033e10(undefined4 *param_1,int *param_2)" (identifier "FUN_00033e10") (parameter_list "(undefined4 *param_1,int *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  void *pvVar6;\n  ssize_t sVar7;\n  int *piVar8;\n  size_t __nbytes;\n  void *__buf;\n  __off64_t _Var9;\n  size_t local_2c;\n  \n  __nbytes = param_1[10];\n  iVar1 = (int)*(__off64_t *)(param_1 + 8);\n  iVar2 = param_1[9];\n  _Var9 = *(__off64_t *)(param_1 + 8);\n  iVar4 = param_1[0xb];\n  local_2c = __nbytes;\n  if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }\n  if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }\n  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "void *pvVar6;" (primitive_type "void") (pointer_declarator "*pvVar6" (* "*") (identifier "pvVar6")) (; ";")) (declaration "ssize_t sVar7;" (primitive_type "ssize_t") (identifier "sVar7") (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (declaration "size_t __nbytes;" (primitive_type "size_t") (identifier "__nbytes") (; ";")) (declaration "void *__buf;" (primitive_type "void") (pointer_declarator "*__buf" (* "*") (identifier "__buf")) (; ";")) (declaration "__off64_t _Var9;" (type_identifier "__off64_t") (identifier "_Var9") (; ";")) (declaration "size_t local_2c;" (primitive_type "size_t") (identifier "local_2c") (; ";")) (expression_statement "__nbytes = param_1[10];" (assignment_expression "__nbytes = param_1[10]" (identifier "__nbytes") (= "=") (subscript_expression "param_1[10]" (identifier "param_1") ([ "[") (number_literal "10") (] "]"))) (; ";")) (expression_statement "iVar1 = (int)*(__off64_t *)(param_1 + 8);" (assignment_expression "iVar1 = (int)*(__off64_t *)(param_1 + 8)" (identifier "iVar1") (= "=") (cast_expression "(int)*(__off64_t *)(param_1 + 8)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(__off64_t *)(param_1 + 8)" (* "*") (cast_expression "(__off64_t *)(param_1 + 8)" (( "(") (type_descriptor "__off64_t *" (type_identifier "__off64_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))))) (; ";")) (expression_statement "iVar2 = param_1[9];" (assignment_expression "iVar2 = param_1[9]" (identifier "iVar2") (= "=") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]"))) (; ";")) (expression_statement "_Var9 = *(__off64_t *)(param_1 + 8);" (assignment_expression "_Var9 = *(__off64_t *)(param_1 + 8)" (identifier "_Var9") (= "=") (pointer_expression "*(__off64_t *)(param_1 + 8)" (* "*") (cast_expression "(__off64_t *)(param_1 + 8)" (( "(") (type_descriptor "__off64_t *" (type_identifier "__off64_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "iVar4 = param_1[0xb];" (assignment_expression "iVar4 = param_1[0xb]" (identifier "iVar4") (= "=") (subscript_expression "param_1[0xb]" (identifier "param_1") ([ "[") (number_literal "0xb") (] "]"))) (; ";")) (expression_statement "local_2c = __nbytes;" (assignment_expression "local_2c = __nbytes" (identifier "local_2c") (= "=") (identifier "__nbytes")) (; ";")) (if_statement "if (DAT_000bbb68 == 0) {\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }" (if "if") (parenthesized_expression "(DAT_000bbb68 == 0)" (( "(") (binary_expression "DAT_000bbb68 == 0" (identifier "DAT_000bbb68") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00031780("../../ld/plugin.c",0x21a);\n    local_2c = param_1[10];\n    iVar4 = param_1[0xb];\n  }" ({ "{") (expression_statement "FUN_00031780("../../ld/plugin.c",0x21a);" (call_expression "FUN_00031780("../../ld/plugin.c",0x21a)" (identifier "FUN_00031780") (argument_list "("../../ld/plugin.c",0x21a)" (( "(") (string_literal ""../../ld/plugin.c"" (" """) (string_content "../../ld/plugin.c") (" """)) (, ",") (number_literal "0x21a") () ")"))) (; ";")) (expression_statement "local_2c = param_1[10];" (assignment_expression "local_2c = param_1[10]" (identifier "local_2c") (= "=") (subscript_expression "param_1[10]" (identifier "param_1") ([ "[") (number_literal "10") (] "]"))) (; ";")) (expression_statement "iVar4 = param_1[0xb];" (assignment_expression "iVar4 = param_1[0xb]" (identifier "iVar4") (= "=") (subscript_expression "param_1[0xb]" (identifier "param_1") ([ "[") (number_literal "0xb") (] "]"))) (; ";")) (} "}"))) (if_statement "if (local_2c != __nbytes || iVar4 != 0) {\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }" (if "if") (parenthesized_expression "(local_2c != __nbytes || iVar4 != 0)" (( "(") (binary_expression "local_2c != __nbytes || iVar4 != 0" (binary_expression "local_2c != __nbytes" (identifier "local_2c") (!= "!=") (identifier "__nbytes")) (|| "||") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n    uVar3 = param_1[5];\n    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);\n    FUN_00031730(uVar5,uVar3,local_2c);\n  }" ({ "{") (expression_statement "uVar3 = param_1[5];" (assignment_expression "uVar3 = param_1[5]" (identifier "uVar3") (= "=") (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]"))) (; ";")) (expression_statement "uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);" (assignment_expression "uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" (identifier "uVar5") (= "=") (call_expression "dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" (identifier "dcgettext") (argument_list "(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5)" (( "(") (number_literal "0") (, ",") (string_literal ""%F%P: unsupported input file size: %s (%ld bytes)\n"" (" """) (string_content "%F%P: unsupported input file size: %s (%ld bytes)") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_00031730(uVar5,uVar3,local_2c);" (call_expression "FUN_00031730(uVar5,uVar3,local_2c)" (identifier "FUN_00031730") (argument_list "(uVar5,uVar3,local_2c)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar3") (, ",") (identifier "local_2c") () ")"))) (; ";")) (} "}"))) (if_statement "if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)) {\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }\n  else {\n    *param_2 = param_1[1];\n  }" (if "if") (parenthesized_expression "(((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1))" (( "(") (binary_expression "((param_1[1] == 0) || (param_1[2] != __nbytes)) ||\n     (param_1[4] != iVar2 || param_1[3] != iVar1)" (parenthesized_expression "((param_1[1] == 0) || (param_1[2] != __nbytes))" (( "(") (binary_expression "(param_1[1] == 0) || (param_1[2] != __nbytes)" (parenthesized_expression "(param_1[1] == 0)" (( "(") (binary_expression "param_1[1] == 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_1[2] != __nbytes)" (( "(") (binary_expression "param_1[2] != __nbytes" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (!= "!=") (identifier "__nbytes")) () ")"))) () ")")) (|| "||") (parenthesized_expression "(param_1[4] != iVar2 || param_1[3] != iVar1)" (( "(") (binary_expression "param_1[4] != iVar2 || param_1[3] != iVar1" (binary_expression "param_1[4] != iVar2" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (!= "!=") (identifier "iVar2")) (|| "||") (binary_expression "param_1[3] != iVar1" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (!= "!=") (identifier "iVar1"))) () ")"))) () ")")) (compound_statement "{\n    param_1[2] = __nbytes;\n    param_1[3] = iVar1;\n    param_1[4] = iVar2;\n    param_1[7] = 0;\n    _Var9 = lseek64(param_1[6],_Var9,0);\n    if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }\n    do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);\n    param_1[1] = pvVar6;\n    *param_2 = (int)pvVar6;\n  }" ({ "{") (expression_statement "param_1[2] = __nbytes;" (assignment_expression "param_1[2] = __nbytes" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "__nbytes")) (; ";")) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "param_1[7] = 0;" (assignment_expression "param_1[7] = 0" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "_Var9 = lseek64(param_1[6],_Var9,0);" (assignment_expression "_Var9 = lseek64(param_1[6],_Var9,0)" (identifier "_Var9") (= "=") (call_expression "lseek64(param_1[6],_Var9,0)" (identifier "lseek64") (argument_list "(param_1[6],_Var9,0)" (( "(") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (, ",") (identifier "_Var9") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if ((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {\n      return 3;\n    }" (if "if") (parenthesized_expression "((_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0))" (( "(") (binary_expression "(_Var9 < 0) ||\n       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)" (parenthesized_expression "(_Var9 < 0)" (( "(") (binary_expression "_Var9 < 0" (identifier "_Var9") (< "<") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)" (( "(") (comma_expression "pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0" (assignment_expression "pvVar6 = (void *)bfd_alloc(*param_1,__nbytes)" (identifier "pvVar6") (= "=") (cast_expression "(void *)bfd_alloc(*param_1,__nbytes)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "bfd_alloc(*param_1,__nbytes)" (identifier "bfd_alloc") (argument_list "(*param_1,__nbytes)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "__nbytes") () ")"))))) (, ",") (comma_expression "__buf = pvVar6, pvVar6 == (void *)0x0" (assignment_expression "__buf = pvVar6" (identifier "__buf") (= "=") (identifier "pvVar6")) (, ",") (binary_expression "pvVar6 == (void *)0x0" (identifier "pvVar6") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))))) () ")"))) () ")")) (compound_statement "{\n      return 3;\n    }" ({ "{") (return_statement "return 3;" (return "return") (number_literal "3") (; ";")) (} "}"))) (do_statement "do {\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    } while (__nbytes != 0);" (do "do") (compound_statement "{\n      sVar7 = read(param_1[6],__buf,__nbytes);\n      if (sVar7 == 0) break;\n      if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }\n    }" ({ "{") (expression_statement "sVar7 = read(param_1[6],__buf,__nbytes);" (assignment_expression "sVar7 = read(param_1[6],__buf,__nbytes)" (identifier "sVar7") (= "=") (call_expression "read(param_1[6],__buf,__nbytes)" (identifier "read") (argument_list "(param_1[6],__buf,__nbytes)" (( "(") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (, ",") (identifier "__buf") (, ",") (identifier "__nbytes") () ")")))) (; ";")) (if_statement "if (sVar7 == 0) break;" (if "if") (parenthesized_expression "(sVar7 == 0)" (( "(") (binary_expression "sVar7 == 0" (identifier "sVar7") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (sVar7 < 1) {\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }\n      else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" (if "if") (parenthesized_expression "(sVar7 < 1)" (( "(") (binary_expression "sVar7 < 1" (identifier "sVar7") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        piVar8 = __errno_location();\n        if (*piVar8 != 4) {\n          return 3;\n        }\n      }" ({ "{") (expression_statement "piVar8 = __errno_location();" (assignment_expression "piVar8 = __errno_location()" (identifier "piVar8") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar8 != 4) {\n          return 3;\n        }" (if "if") (parenthesized_expression "(*piVar8 != 4)" (( "(") (binary_expression "*piVar8 != 4" (pointer_expression "*piVar8" (* "*") (identifier "piVar8")) (!= "!=") (number_literal "4")) () ")")) (compound_statement "{\n          return 3;\n        }" ({ "{") (return_statement "return 3;" (return "return") (number_literal "3") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" (else "else") (compound_statement "{\n        __buf = (void *)((int)__buf + sVar7);\n        __nbytes = __nbytes - sVar7;\n      }" ({ "{") (expression_statement "__buf = (void *)((int)__buf + sVar7);" (assignment_expression "__buf = (void *)((int)__buf + sVar7)" (identifier "__buf") (= "=") (cast_expression "(void *)((int)__buf + sVar7)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__buf + sVar7)" (( "(") (binary_expression "(int)__buf + sVar7" (cast_expression "(int)__buf" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__buf")) (+ "+") (identifier "sVar7")) () ")")))) (; ";")) (expression_statement "__nbytes = __nbytes - sVar7;" (assignment_expression "__nbytes = __nbytes - sVar7" (identifier "__nbytes") (= "=") (binary_expression "__nbytes - sVar7" (identifier "__nbytes") (- "-") (identifier "sVar7"))) (; ";")) (} "}")))) (} "}")) (while "while") (parenthesized_expression "(__nbytes != 0)" (( "(") (binary_expression "__nbytes != 0" (identifier "__nbytes") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "param_1[1] = pvVar6;" (assignment_expression "param_1[1] = pvVar6" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "pvVar6")) (; ";")) (expression_statement "*param_2 = (int)pvVar6;" (assignment_expression "*param_2 = (int)pvVar6" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(int)pvVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar6"))) (; ";")) (} "}")) (else_clause "else {\n    *param_2 = param_1[1];\n  }" (else "else") (compound_statement "{\n    *param_2 = param_1[1];\n  }" ({ "{") (expression_statement "*param_2 = param_1[1];" (assignment_expression "*param_2 = param_1[1]" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (} "}")))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

type_1 function_1(void *handle,void **viewp)

{
  int var_9;
  int var_8;
  type_2 uVar3;
  int var_5;
  char *fmt;
  void *var_13;
  ssize_t var_15;
  int *piVar7;
  size_t var_4;
  void *__buf;
  type_3 var_11;
  size_t var_3;
  
  var_4 = *(size_t *)((int)handle + 0x28);
  var_9 = *(int *)((int)handle + 0x20);
  var_8 = *(int *)((int)handle + 0x24);
  var_11 = *(type_3 *)((int)handle + 0x20);
  var_5 = *(int *)((int)handle + 0x2c);
  var_3 = var_4;
  if (var_1 == (type_4 *)0x0) {
    var_2("../../ld/plugin.c",0x21a);
    var_3 = *(size_t *)((int)handle + 0x28);
    var_5 = *(int *)((int)handle + 0x2c);
  }
  if (var_3 != var_4 || var_5 != 0) {
    uVar3 = *(type_2 *)((int)handle + 0x14);
    fmt = (char *)var_6(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);
    var_7(fmt,uVar3,var_3);
  }
  if (((*(void **)((int)handle + 4) == (void *)0x0) || (*(size_t *)((int)handle + 8) != var_4))
     || (*(int *)((int)handle + 0x10) != var_8 || *(int *)((int)handle + 0xc) != var_9)) {
    *(size_t *)((int)handle + 8) = var_4;
    *(int *)((int)handle + 0xc) = var_9;
    *(int *)((int)handle + 0x10) = var_8;
    *(type_2 *)((int)handle + 0x1c) = 0;
    var_11 = var_10(*(int *)((int)handle + 0x18),var_11,0);
                    /* WARNING: Load size is inaccurate */
    if ((var_11 < 0) ||
       (var_13 = (void *)var_12(*handle,var_4), __buf = var_13, var_13 == (void *)0x0)) {
      return LDPS_ERR;
    }
    do {
      var_15 = var_14(*(int *)((int)handle + 0x18),__buf,var_4);
      if (var_15 == 0) break;
      if (var_15 < 1) {
        piVar7 = var_16();
        if (*piVar7 != 4) {
          return LDPS_ERR;
        }
      }
      else {
        __buf = (void *)((int)__buf + var_15);
        var_4 = var_4 - var_15;
      }
    } while (var_4 != 0);
    *(void **)((int)handle + 4) = var_13;
    *viewp = var_13;
  }
  else {
    *viewp = *(void **)((int)handle + 4);
  }
  return LDPS_OK;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 MASKED(undefined4 *param_1,int *param_2)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  undefined4 uVar5;
  void *pvVar6;
  ssize_t sVar7;
  int *piVar8;
  size_t __nbytes;
  void *__buf;
  __off64_t _Var9;
  size_t local_2c;
  
  __nbytes = param_1[10];
  iVar1 = (int)*(__off64_t *)(param_1 + 8);
  iVar2 = param_1[9];
  _Var9 = *(__off64_t *)(param_1 + 8);
  iVar4 = param_1[0xb];
  local_2c = __nbytes;
  if (DAT_000bbb68 == 0) {
    FUN_00031780("../../ld/plugin.c",0x21a);
    local_2c = param_1[10];
    iVar4 = param_1[0xb];
  }
  if (local_2c != __nbytes || iVar4 != 0) {
    uVar3 = param_1[5];
    uVar5 = dcgettext(0,"%F%P: unsupported input file size: %s (%ld bytes)\n",5);
    FUN_00031730(uVar5,uVar3,local_2c);
  }
  if (((param_1[1] == 0) || (param_1[2] != __nbytes)) ||
     (param_1[4] != iVar2 || param_1[3] != iVar1)) {
    param_1[2] = __nbytes;
    param_1[3] = iVar1;
    param_1[4] = iVar2;
    param_1[7] = 0;
    _Var9 = lseek64(param_1[6],_Var9,0);
    if ((_Var9 < 0) ||
       (pvVar6 = (void *)bfd_alloc(*param_1,__nbytes), __buf = pvVar6, pvVar6 == (void *)0x0)) {
      return 3;
    }
    do {
      sVar7 = read(param_1[6],__buf,__nbytes);
      if (sVar7 == 0) break;
      if (sVar7 < 1) {
        piVar8 = __errno_location();
        if (*piVar8 != 4) {
          return 3;
        }
      }
      else {
        __buf = (void *)((int)__buf + sVar7);
        __nbytes = __nbytes - sVar7;
      }
    } while (__nbytes != 0);
    param_1[1] = pvVar6;
    *param_2 = (int)pvVar6;
  }
  else {
    *param_2 = param_1[1];
  }
  return 0;
}

