
void reset_device(usbentry *dev)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  undefined4 *puVar4;
  DIR *d;
  usbentry *puVar5;
  int iVar6;
  int *piVar7;
  int *piVar8;
  int *piVar9;
  undefined *puVar10;
  code *pcVar11;
  char path [4096];
  
  puVar10 = PTR___stack_chk_guard_000220c0;
  iVar6 = dev->dev_num;
  piVar9 = (int *)dev->bus_num;
  piVar8 = (int *)(PTR_00022044 + 0x17a8);
  iVar1 = *(int *)PTR___stack_chk_guard_000220c0;
  (*(code *)PTR_snprintf_00022080)(path,0xfff);
  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,dev->product_name);
  piVar2 = (int *)(*(code *)PTR_open_000220a0)(path,1);
  if ((int)piVar2 < 0) {
    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();
    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);
    piVar2 = (int *)(PTR_00022044 + 0x17e8);
    (*(code *)PTR_printf_000220c8)();
  }
  else {
    piVar8 = (int *)0x0;
    piVar7 = (int *)&DAT_20005514;
    iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);
    if (iVar3 < 0) {
      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();
      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);
      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);
    }
    else {
      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);
    }
    (*(code *)PTR_close_00022070)();
  }
  if (iVar1 == *(int *)puVar10) {
    return;
  }
  puVar10 = PTR___stack_chk_fail_000220bc;
  (*(code *)PTR___stack_chk_fail_000220bc)();
  d = (DIR *)(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);
  if (d != (DIR *)0x0) {
    do {
      puVar5 = parse_devlist(d);
      if (puVar5 == (usbentry *)0x0) break;
      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))
      {
        pcVar11 = *(code **)(puVar10 + 0x10d58);
        goto LAB_000113f4;
      }
      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&
         (puVar5->product_id == *piVar9)) {
        pcVar11 = *(code **)(puVar10 + 0x10d58);
        goto LAB_000113f4;
      }
    } while ((iVar6 == 0) ||
            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0));
    pcVar11 = *(code **)(puVar10 + 0x10d58);
LAB_000113f4:
    (*pcVar11)(d);
  }
  return;
}



int * FUN_00011190(undefined4 *param_1)

{
  int *piVar1;
  int iVar2;
  undefined4 *puVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  int *piVar8;
  int *piVar9;
  undefined *puVar10;
  code *pcVar11;
  undefined1 auStack_1014 [4096];
  int *local_14;
  
  puVar10 = PTR___stack_chk_guard_000220c0;
  iVar6 = param_1[1];
  piVar9 = (int *)*param_1;
  piVar8 = (int *)(PTR_00022044 + 0x17a8);
  local_14 = *(int **)PTR___stack_chk_guard_000220c0;
  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);
  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);
  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);
  if ((int)piVar1 < 0) {
    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();
    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);
    piVar1 = (int *)(PTR_00022044 + 0x17e8);
    (*(code *)PTR_printf_000220c8)();
  }
  else {
    piVar8 = (int *)0x0;
    piVar7 = (int *)&DAT_20005514;
    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);
    if (iVar2 < 0) {
      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();
      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);
      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);
    }
    else {
      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);
    }
    (*(code *)PTR_close_00022070)();
  }
  if (local_14 == *(int **)puVar10) {
    return *(int **)puVar10;
  }
  puVar10 = PTR___stack_chk_fail_000220bc;
  (*(code *)PTR___stack_chk_fail_000220bc)();
  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);
  if (iVar2 == 0) {
    piVar4 = (int *)0x0;
  }
  else {
    do {
      piVar4 = (int *)FUN_00010f44(iVar2);
      if (piVar4 == (int *)0x0) break;
      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {
        pcVar11 = *(code **)(puVar10 + 0x10d58);
        goto LAB_000113f4;
      }
      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {
        pcVar11 = *(code **)(puVar10 + 0x10d58);
        goto LAB_000113f4;
      }
    } while ((iVar6 == 0) ||
            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));
    pcVar11 = *(code **)(puVar10 + 0x10d58);
LAB_000113f4:
    (*pcVar11)(iVar2);
  }
  return piVar4;
}


lui gp,0x2
addiu gp,gp,-0x7180
addu gp,gp,t9
addiu sp,sp,-0x1038
lw a2,-0x7fcc(gp)
lw v1,0x4(a0)
li a1,0xfff
lw a3,0x0(a0)
sw s2,0x1030(sp)
addiu a2,a2,0x17a8
lw s2,-0x7f50(gp)
lw t9,-0x7f90(gp)
sw s0,0x1028(sp)
addiu s0,sp,0x24
sw ra,0x1034(sp)
sw gp,0x18(sp)
sw s1,0x102c(sp)
or s1,a0,zero
lw v0,0x0(s2)
or a0,s0,zero
sw v1,0x10(sp)
sw v0,0x1024(sp)
jalr t9
_nop
addiu a1,s1,0x90
lw gp,0x18(sp)
lw a0,-0x7fcc(gp)
lw t9,-0x7f48(gp)
jalr t9
_addiu a0,a0,0x17c0
li a1,0x1
lw gp,0x18(sp)
lw t9,-0x7f70(gp)
jalr t9
_or a0,s0,zero
bltz v0,0x000112cc
_lw gp,0x18(sp)
lui a1,0x2000
lw t9,-0x7f58(gp)
or a2,zero,zero
addiu a1,a1,0x5514
or a0,v0,zero
jalr t9
_or s0,v0,zero
bltz v0,0x00011290
_lw gp,0x18(sp)
lw a0,-0x7fcc(gp)
lw t9,-0x7f64(gp)
jalr t9
_addiu a0,a0,0x17e4
lw gp,0x18(sp)
lw t9,-0x7fa0(gp)
jalr t9
_or a0,s0,zero
lw gp,0x18(sp)
lw v1,0x1024(sp)
lw v0,0x0(s2)
bne v1,v0,0x00011308
_lw ra,0x1034(sp)
lw s2,0x1030(sp)
lw s1,0x102c(sp)
lw s0,0x1028(sp)
jr ra
_addiu sp,sp,0x1038
lw t9,-0x7f94(gp)
jalr t9
_nop
lw gp,0x18(sp)
lw t9,-0x7f68(gp)
jalr t9
_lw a0,0x0(v0)
lw gp,0x18(sp)
or a1,v0,zero
lw a0,-0x7fcc(gp)
lw t9,-0x7f48(gp)
jalr t9
_addiu a0,a0,0x17d4
b 0x0001125c
_lw gp,0x18(sp)
lw t9,-0x7f94(gp)
jalr t9
_nop
lw gp,0x18(sp)
lw t9,-0x7f68(gp)
jalr t9
_lw a0,0x0(v0)
lw gp,0x18(sp)
or a1,v0,zero
lw a0,-0x7fcc(gp)
lw t9,-0x7f48(gp)
jalr t9
_addiu a0,a0,0x17e8
b 0x0001126c
_lw gp,0x18(sp)
lw t9,-0x7f54(gp)
jalr t9
_nop
(translation_unit "int * FUN_00011190(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}\n\n" (function_definition "int * FUN_00011190(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}" primitive_type (pointer_declarator "* FUN_00011190(undefined4 *param_1)" * (function_declarator "FUN_00011190(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "code *pcVar11;" type_identifier (pointer_declarator "*pcVar11" * identifier) ;) (declaration "undefined1 auStack_1014 [4096];" type_identifier (array_declarator "auStack_1014 [4096]" identifier [ number_literal ]) ;) (declaration "int *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (expression_statement "puVar10 = PTR___stack_chk_guard_000220c0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000220c0" identifier = identifier) ;) (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar9 = (int *)*param_1;" (assignment_expression "piVar9 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "piVar8 = (int *)(PTR_00022044 + 0x17a8);" (assignment_expression "piVar8 = (int *)(PTR_00022044 + 0x17a8)" identifier = (cast_expression "(int *)(PTR_00022044 + 0x17a8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_00022044 + 0x17a8)" ( (binary_expression "PTR_00022044 + 0x17a8" identifier + number_literal) )))) ;) (expression_statement "local_14 = *(int **)PTR___stack_chk_guard_000220c0;" (assignment_expression "local_14 = *(int **)PTR___stack_chk_guard_000220c0" identifier = (pointer_expression "*(int **)PTR___stack_chk_guard_000220c0" * (cast_expression "(int **)PTR___stack_chk_guard_000220c0" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "(*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);" (call_expression "(*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff)" (parenthesized_expression "(*(code *)PTR_snprintf_00022080)" ( (pointer_expression "*(code *)PTR_snprintf_00022080" * (cast_expression "(code *)PTR_snprintf_00022080" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_1014,0xfff)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17c0,param_1 + 0x24)" ( (binary_expression "PTR_00022044 + 0x17c0" identifier + number_literal) , (binary_expression "param_1 + 0x24" identifier + number_literal) ))) ;) (expression_statement "piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);" (assignment_expression "piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1)" identifier = (cast_expression "(int *)(*(code *)PTR_open_000220a0)(auStack_1014,1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_open_000220a0)(auStack_1014,1)" (parenthesized_expression "(*(code *)PTR_open_000220a0)" ( (pointer_expression "*(code *)PTR_open_000220a0" * (cast_expression "(code *)PTR_open_000220a0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_1014,1)" ( identifier , number_literal ))))) ;) (if_statement "if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" if (parenthesized_expression "((int)piVar1 < 0)" ( (binary_expression "(int)piVar1 < 0" (cast_expression "(int)piVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }" { (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" ( (pointer_expression "*(code *)PTR___errno_location_0002207c" * (cast_expression "(code *)PTR___errno_location_0002207c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" identifier = (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar3)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" ( (pointer_expression "*(code *)PTR_strerror_000220a8" * (cast_expression "(code *)PTR_strerror_000220a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar3)" ( (pointer_expression "*puVar3" * identifier) ))))) ;) (expression_statement "piVar1 = (int *)(PTR_00022044 + 0x17e8);" (assignment_expression "piVar1 = (int *)(PTR_00022044 + 0x17e8)" identifier = (cast_expression "(int *)(PTR_00022044 + 0x17e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_00022044 + 0x17e8)" ( (binary_expression "PTR_00022044 + 0x17e8" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)();" (call_expression "(*(code *)PTR_printf_000220c8)()" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) }) (else_clause "else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" else (compound_statement "{\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" { (expression_statement "piVar8 = (int *)0x0;" (assignment_expression "piVar8 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "piVar7 = (int *)&DAT_20005514;" (assignment_expression "piVar7 = (int *)&DAT_20005514" identifier = (cast_expression "(int *)&DAT_20005514" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_20005514" & identifier))) ;) (expression_statement "iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);" (assignment_expression "iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1)" identifier = (call_expression "(*(code *)PTR_ioctl_000220b8)(piVar1)" (parenthesized_expression "(*(code *)PTR_ioctl_000220b8)" ( (pointer_expression "*(code *)PTR_ioctl_000220b8" * (cast_expression "(code *)PTR_ioctl_000220b8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }" { (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" ( (pointer_expression "*(code *)PTR___errno_location_0002207c" * (cast_expression "(code *)PTR___errno_location_0002207c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" identifier = (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar3)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" ( (pointer_expression "*(code *)PTR_strerror_000220a8" * (cast_expression "(code *)PTR_strerror_000220a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar3)" ( (pointer_expression "*puVar3" * identifier) ))))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17d4)" ( (binary_expression "PTR_00022044 + 0x17d4" identifier + number_literal) ))) ;) }) (else_clause "else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" else (compound_statement "{\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" { (expression_statement "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);" (call_expression "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4)" (parenthesized_expression "(*(code *)PTR_puts_000220ac)" ( (pointer_expression "*(code *)PTR_puts_000220ac" * (cast_expression "(code *)PTR_puts_000220ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17e4)" ( (binary_expression "PTR_00022044 + 0x17e4" identifier + number_literal) ))) ;) }))) (expression_statement "(*(code *)PTR_close_00022070)();" (call_expression "(*(code *)PTR_close_00022070)()" (parenthesized_expression "(*(code *)PTR_close_00022070)" ( (pointer_expression "*(code *)PTR_close_00022070" * (cast_expression "(code *)PTR_close_00022070" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) }))) (if_statement "if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }" if (parenthesized_expression "(local_14 == *(int **)puVar10)" ( (binary_expression "local_14 == *(int **)puVar10" identifier == (pointer_expression "*(int **)puVar10" * (cast_expression "(int **)puVar10" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    return *(int **)puVar10;\n  }" { (return_statement "return *(int **)puVar10;" return (pointer_expression "*(int **)puVar10" * (cast_expression "(int **)puVar10" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) ;) })) (expression_statement "puVar10 = PTR___stack_chk_fail_000220bc;" (assignment_expression "puVar10 = PTR___stack_chk_fail_000220bc" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_000220bc)();" (call_expression "(*(code *)PTR___stack_chk_fail_000220bc)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000220bc)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000220bc" * (cast_expression "(code *)PTR___stack_chk_fail_000220bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);" (assignment_expression "iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" identifier = (call_expression "(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d54))" ( (pointer_expression "**(code **)(puVar10 + 0x10d54)" * (pointer_expression "*(code **)(puVar10 + 0x10d54)" * (cast_expression "(code **)(puVar10 + 0x10d54)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d54)" ( (binary_expression "puVar10 + 0x10d54" identifier + number_literal) ))))) )) (argument_list "(*(int *)(puVar10 + 0x10d30) + 0x17fc)" ( (binary_expression "*(int *)(puVar10 + 0x10d30) + 0x17fc" (pointer_expression "*(int *)(puVar10 + 0x10d30)" * (cast_expression "(int *)(puVar10 + 0x10d30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar10 + 0x10d30)" ( (binary_expression "puVar10 + 0x10d30" identifier + number_literal) )))) + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar4 = (int *)0x0;\n  }" { (expression_statement "piVar4 = (int *)0x0;" (assignment_expression "piVar4 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" else (compound_statement "{\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" { (do_statement "do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));" do (compound_statement "{\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    }" { (expression_statement "piVar4 = (int *)FUN_00010f44(iVar2);" (assignment_expression "piVar4 = (int *)FUN_00010f44(iVar2)" identifier = (cast_expression "(int *)FUN_00010f44(iVar2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00010f44(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))))) ;) (if_statement "if (piVar4 == (int *)0x0) break;" if (parenthesized_expression "(piVar4 == (int *)0x0)" ( (binary_expression "piVar4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (if_statement "if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" if (parenthesized_expression "(((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7))" ( (binary_expression "((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)" (parenthesized_expression "((piVar1 != (int *)0x0) && (*piVar4 == *piVar1))" ( (binary_expression "(piVar1 != (int *)0x0) && (*piVar4 == *piVar1)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*piVar4 == *piVar1)" ( (binary_expression "*piVar4 == *piVar1" (pointer_expression "*piVar4" * identifier) == (pointer_expression "*piVar1" * identifier)) ))) )) && (parenthesized_expression "(piVar4[1] == *piVar7)" ( (binary_expression "piVar4[1] == *piVar7" (subscript_expression "piVar4[1]" identifier [ number_literal ]) == (pointer_expression "*piVar7" * identifier)) ))) )) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" { (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000113f4;" goto statement_identifier ;) })) (if_statement "if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" if (parenthesized_expression "(((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9))" ( (binary_expression "((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)" (parenthesized_expression "((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8))" ( (binary_expression "(piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)" (parenthesized_expression "(piVar8 != (int *)0x0)" ( (binary_expression "piVar8 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(piVar4[2] == *piVar8)" ( (binary_expression "piVar4[2] == *piVar8" (subscript_expression "piVar4[2]" identifier [ number_literal ]) == (pointer_expression "*piVar8" * identifier)) ))) )) && (parenthesized_expression "(piVar4[3] == *piVar9)" ( (binary_expression "piVar4[3] == *piVar9" (subscript_expression "piVar4[3]" identifier [ number_literal ]) == (pointer_expression "*piVar9" * identifier)) ))) )) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" { (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000113f4;" goto statement_identifier ;) })) }) while (parenthesized_expression "((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0))" ( (binary_expression "(iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0)" (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0)" ( (comma_expression "iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0" (assignment_expression "iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6)" identifier = (call_expression "(**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d78))" ( (pointer_expression "**(code **)(puVar10 + 0x10d78)" * (pointer_expression "*(code **)(puVar10 + 0x10d78)" * (cast_expression "(code **)(puVar10 + 0x10d78)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d78)" ( (binary_expression "puVar10 + 0x10d78" identifier + number_literal) ))))) )) (argument_list "(piVar4 + 0x24,iVar6)" ( (binary_expression "piVar4 + 0x24" identifier + number_literal) , identifier )))) , (binary_expression "iVar5 != 0" identifier != number_literal)) ))) )) ;) (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (labeled_statement "LAB_000113f4:\n    (*pcVar11)(iVar2);" statement_identifier : (expression_statement "(*pcVar11)(iVar2);" (call_expression "(*pcVar11)(iVar2)" (parenthesized_expression "(*pcVar11)" ( (pointer_expression "*pcVar11" * identifier) )) (argument_list "(iVar2)" ( identifier ))) ;)) }))) (return_statement "return piVar4;" return identifier ;) })))
(translation_unit "void reset_device(usbentry *dev)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  DIR *d;\n  usbentry *puVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  char path [4096];\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = dev->dev_num;\n  piVar9 = (int *)dev->bus_num;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  iVar1 = *(int *)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(path,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,dev->product_name);\n  piVar2 = (int *)(*(code *)PTR_open_000220a0)(path,1);\n  if ((int)piVar2 < 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n    piVar2 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);\n    if (iVar3 < 0) {\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (iVar1 == *(int *)puVar10) {\n    return;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  d = (DIR *)(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (d != (DIR *)0x0) {\n    do {\n      puVar5 = parse_devlist(d);\n      if (puVar5 == (usbentry *)0x0) break;\n      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(d);\n  }\n  return;\n}\n\n" (function_definition "void reset_device(usbentry *dev)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  DIR *d;\n  usbentry *puVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  char path [4096];\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = dev->dev_num;\n  piVar9 = (int *)dev->bus_num;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  iVar1 = *(int *)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(path,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,dev->product_name);\n  piVar2 = (int *)(*(code *)PTR_open_000220a0)(path,1);\n  if ((int)piVar2 < 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n    piVar2 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);\n    if (iVar3 < 0) {\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (iVar1 == *(int *)puVar10) {\n    return;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  d = (DIR *)(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (d != (DIR *)0x0) {\n    do {\n      puVar5 = parse_devlist(d);\n      if (puVar5 == (usbentry *)0x0) break;\n      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(d);\n  }\n  return;\n}" primitive_type (function_declarator "reset_device(usbentry *dev)" identifier (parameter_list "(usbentry *dev)" ( (parameter_declaration "usbentry *dev" type_identifier (pointer_declarator "*dev" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  DIR *d;\n  usbentry *puVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  char path [4096];\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = dev->dev_num;\n  piVar9 = (int *)dev->bus_num;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  iVar1 = *(int *)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(path,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,dev->product_name);\n  piVar2 = (int *)(*(code *)PTR_open_000220a0)(path,1);\n  if ((int)piVar2 < 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n    piVar2 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);\n    if (iVar3 < 0) {\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (iVar1 == *(int *)puVar10) {\n    return;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  d = (DIR *)(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (d != (DIR *)0x0) {\n    do {\n      puVar5 = parse_devlist(d);\n      if (puVar5 == (usbentry *)0x0) break;\n      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(d);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "DIR *d;" type_identifier (pointer_declarator "*d" * identifier) ;) (declaration "usbentry *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "code *pcVar11;" type_identifier (pointer_declarator "*pcVar11" * identifier) ;) (declaration "char path [4096];" primitive_type (array_declarator "path [4096]" identifier [ number_literal ]) ;) (expression_statement "puVar10 = PTR___stack_chk_guard_000220c0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000220c0" identifier = identifier) ;) (expression_statement "iVar6 = dev->dev_num;" (assignment_expression "iVar6 = dev->dev_num" identifier = (field_expression "dev->dev_num" identifier -> field_identifier)) ;) (expression_statement "piVar9 = (int *)dev->bus_num;" (assignment_expression "piVar9 = (int *)dev->bus_num" identifier = (cast_expression "(int *)dev->bus_num" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "dev->bus_num" identifier -> field_identifier))) ;) (expression_statement "piVar8 = (int *)(PTR_00022044 + 0x17a8);" (assignment_expression "piVar8 = (int *)(PTR_00022044 + 0x17a8)" identifier = (cast_expression "(int *)(PTR_00022044 + 0x17a8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_00022044 + 0x17a8)" ( (binary_expression "PTR_00022044 + 0x17a8" identifier + number_literal) )))) ;) (expression_statement "iVar1 = *(int *)PTR___stack_chk_guard_000220c0;" (assignment_expression "iVar1 = *(int *)PTR___stack_chk_guard_000220c0" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000220c0" * (cast_expression "(int *)PTR___stack_chk_guard_000220c0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "(*(code *)PTR_snprintf_00022080)(path,0xfff);" (call_expression "(*(code *)PTR_snprintf_00022080)(path,0xfff)" (parenthesized_expression "(*(code *)PTR_snprintf_00022080)" ( (pointer_expression "*(code *)PTR_snprintf_00022080" * (cast_expression "(code *)PTR_snprintf_00022080" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(path,0xfff)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,dev->product_name);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,dev->product_name)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17c0,dev->product_name)" ( (binary_expression "PTR_00022044 + 0x17c0" identifier + number_literal) , (field_expression "dev->product_name" identifier -> field_identifier) ))) ;) (expression_statement "piVar2 = (int *)(*(code *)PTR_open_000220a0)(path,1);" (assignment_expression "piVar2 = (int *)(*(code *)PTR_open_000220a0)(path,1)" identifier = (cast_expression "(int *)(*(code *)PTR_open_000220a0)(path,1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_open_000220a0)(path,1)" (parenthesized_expression "(*(code *)PTR_open_000220a0)" ( (pointer_expression "*(code *)PTR_open_000220a0" * (cast_expression "(code *)PTR_open_000220a0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(path,1)" ( identifier , number_literal ))))) ;) (if_statement "if ((int)piVar2 < 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n    piVar2 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);\n    if (iVar3 < 0) {\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" if (parenthesized_expression "((int)piVar2 < 0)" ( (binary_expression "(int)piVar2 < 0" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n    piVar2 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" ( (pointer_expression "*(code *)PTR___errno_location_0002207c" * (cast_expression "(code *)PTR___errno_location_0002207c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4)" identifier = (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar4)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" ( (pointer_expression "*(code *)PTR_strerror_000220a8" * (cast_expression "(code *)PTR_strerror_000220a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar4)" ( (pointer_expression "*puVar4" * identifier) ))))) ;) (expression_statement "piVar2 = (int *)(PTR_00022044 + 0x17e8);" (assignment_expression "piVar2 = (int *)(PTR_00022044 + 0x17e8)" identifier = (cast_expression "(int *)(PTR_00022044 + 0x17e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_00022044 + 0x17e8)" ( (binary_expression "PTR_00022044 + 0x17e8" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)();" (call_expression "(*(code *)PTR_printf_000220c8)()" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) }) (else_clause "else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);\n    if (iVar3 < 0) {\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" else (compound_statement "{\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);\n    if (iVar3 < 0) {\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" { (expression_statement "piVar8 = (int *)0x0;" (assignment_expression "piVar8 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "piVar7 = (int *)&DAT_20005514;" (assignment_expression "piVar7 = (int *)&DAT_20005514" identifier = (cast_expression "(int *)&DAT_20005514" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_20005514" & identifier))) ;) (expression_statement "iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2);" (assignment_expression "iVar3 = (*(code *)PTR_ioctl_000220b8)(piVar2)" identifier = (call_expression "(*(code *)PTR_ioctl_000220b8)(piVar2)" (parenthesized_expression "(*(code *)PTR_ioctl_000220b8)" ( (pointer_expression "*(code *)PTR_ioctl_000220b8" * (cast_expression "(code *)PTR_ioctl_000220b8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar2)" ( identifier )))) ;) (if_statement "if (iVar3 < 0) {\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n      puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" ( (pointer_expression "*(code *)PTR___errno_location_0002207c" * (cast_expression "(code *)PTR___errno_location_0002207c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar4)" identifier = (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar4)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" ( (pointer_expression "*(code *)PTR_strerror_000220a8" * (cast_expression "(code *)PTR_strerror_000220a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar4)" ( (pointer_expression "*puVar4" * identifier) ))))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17d4)" ( (binary_expression "PTR_00022044 + 0x17d4" identifier + number_literal) ))) ;) }) (else_clause "else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" else (compound_statement "{\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" { (expression_statement "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);" (call_expression "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4)" (parenthesized_expression "(*(code *)PTR_puts_000220ac)" ( (pointer_expression "*(code *)PTR_puts_000220ac" * (cast_expression "(code *)PTR_puts_000220ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17e4)" ( (binary_expression "PTR_00022044 + 0x17e4" identifier + number_literal) ))) ;) }))) (expression_statement "(*(code *)PTR_close_00022070)();" (call_expression "(*(code *)PTR_close_00022070)()" (parenthesized_expression "(*(code *)PTR_close_00022070)" ( (pointer_expression "*(code *)PTR_close_00022070" * (cast_expression "(code *)PTR_close_00022070" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar1 == *(int *)puVar10) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)puVar10)" ( (binary_expression "iVar1 == *(int *)puVar10" identifier == (pointer_expression "*(int *)puVar10" * (cast_expression "(int *)puVar10" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar10 = PTR___stack_chk_fail_000220bc;" (assignment_expression "puVar10 = PTR___stack_chk_fail_000220bc" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_000220bc)();" (call_expression "(*(code *)PTR___stack_chk_fail_000220bc)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000220bc)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000220bc" * (cast_expression "(code *)PTR___stack_chk_fail_000220bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "d = (DIR *)(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);" (assignment_expression "d = (DIR *)(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" identifier = (cast_expression "(DIR *)(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" ( (type_descriptor "DIR *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d54))" ( (pointer_expression "**(code **)(puVar10 + 0x10d54)" * (pointer_expression "*(code **)(puVar10 + 0x10d54)" * (cast_expression "(code **)(puVar10 + 0x10d54)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d54)" ( (binary_expression "puVar10 + 0x10d54" identifier + number_literal) ))))) )) (argument_list "(*(int *)(puVar10 + 0x10d30) + 0x17fc)" ( (binary_expression "*(int *)(puVar10 + 0x10d30) + 0x17fc" (pointer_expression "*(int *)(puVar10 + 0x10d30)" * (cast_expression "(int *)(puVar10 + 0x10d30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar10 + 0x10d30)" ( (binary_expression "puVar10 + 0x10d30" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if (d != (DIR *)0x0) {\n    do {\n      puVar5 = parse_devlist(d);\n      if (puVar5 == (usbentry *)0x0) break;\n      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(d);\n  }" if (parenthesized_expression "(d != (DIR *)0x0)" ( (binary_expression "d != (DIR *)0x0" identifier != (cast_expression "(DIR *)0x0" ( (type_descriptor "DIR *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      puVar5 = parse_devlist(d);\n      if (puVar5 == (usbentry *)0x0) break;\n      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(d);\n  }" { (do_statement "do {\n      puVar5 = parse_devlist(d);\n      if (puVar5 == (usbentry *)0x0) break;\n      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0));" do (compound_statement "{\n      puVar5 = parse_devlist(d);\n      if (puVar5 == (usbentry *)0x0) break;\n      if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    }" { (expression_statement "puVar5 = parse_devlist(d);" (assignment_expression "puVar5 = parse_devlist(d)" identifier = (call_expression "parse_devlist(d)" identifier (argument_list "(d)" ( identifier )))) ;) (if_statement "if (puVar5 == (usbentry *)0x0) break;" if (parenthesized_expression "(puVar5 == (usbentry *)0x0)" ( (binary_expression "puVar5 == (usbentry *)0x0" identifier == (cast_expression "(usbentry *)0x0" ( (type_descriptor "usbentry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (if_statement "if (((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))\n      {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" if (parenthesized_expression "(((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7))" ( (binary_expression "((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)) && (puVar5->dev_num == *piVar7)" (parenthesized_expression "((piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2))" ( (binary_expression "(piVar2 != (int *)0x0) && (puVar5->bus_num == *piVar2)" (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(puVar5->bus_num == *piVar2)" ( (binary_expression "puVar5->bus_num == *piVar2" (field_expression "puVar5->bus_num" identifier -> field_identifier) == (pointer_expression "*piVar2" * identifier)) ))) )) && (parenthesized_expression "(puVar5->dev_num == *piVar7)" ( (binary_expression "puVar5->dev_num == *piVar7" (field_expression "puVar5->dev_num" identifier -> field_identifier) == (pointer_expression "*piVar7" * identifier)) ))) )) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" { (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000113f4;" goto statement_identifier ;) })) (if_statement "if (((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" if (parenthesized_expression "(((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9))" ( (binary_expression "((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)) &&\n         (puVar5->product_id == *piVar9)" (parenthesized_expression "((piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8))" ( (binary_expression "(piVar8 != (int *)0x0) && (puVar5->vendor_id == *piVar8)" (parenthesized_expression "(piVar8 != (int *)0x0)" ( (binary_expression "piVar8 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(puVar5->vendor_id == *piVar8)" ( (binary_expression "puVar5->vendor_id == *piVar8" (field_expression "puVar5->vendor_id" identifier -> field_identifier) == (pointer_expression "*piVar8" * identifier)) ))) )) && (parenthesized_expression "(puVar5->product_id == *piVar9)" ( (binary_expression "puVar5->product_id == *piVar9" (field_expression "puVar5->product_id" identifier -> field_identifier) == (pointer_expression "*piVar9" * identifier)) ))) )) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" { (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000113f4;" goto statement_identifier ;) })) }) while (parenthesized_expression "((iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0))" ( (binary_expression "(iVar6 == 0) ||\n            (iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0)" (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0)" ( (comma_expression "iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6), iVar1 != 0" (assignment_expression "iVar1 = (**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6)" identifier = (call_expression "(**(code **)(puVar10 + 0x10d78))(puVar5->product_name,iVar6)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d78))" ( (pointer_expression "**(code **)(puVar10 + 0x10d78)" * (pointer_expression "*(code **)(puVar10 + 0x10d78)" * (cast_expression "(code **)(puVar10 + 0x10d78)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d78)" ( (binary_expression "puVar10 + 0x10d78" identifier + number_literal) ))))) )) (argument_list "(puVar5->product_name,iVar6)" ( (field_expression "puVar5->product_name" identifier -> field_identifier) , identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) ;) (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (labeled_statement "LAB_000113f4:\n    (*pcVar11)(d);" statement_identifier : (expression_statement "(*pcVar11)(d);" (call_expression "(*pcVar11)(d)" (parenthesized_expression "(*pcVar11)" ( (pointer_expression "*pcVar11" * identifier) )) (argument_list "(d)" ( identifier ))) ;)) })) (return_statement "return;" return ;) })))
(translation_unit "int * FUN_00011190(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}\n\n" (function_definition "int * FUN_00011190(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}" primitive_type (pointer_declarator "* FUN_00011190(undefined4 *param_1)" * (function_declarator "FUN_00011190(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "code *pcVar11;" type_identifier (pointer_declarator "*pcVar11" * identifier) ;) (declaration "undefined1 auStack_1014 [4096];" type_identifier (array_declarator "auStack_1014 [4096]" identifier [ number_literal ]) ;) (declaration "int *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (expression_statement "puVar10 = PTR___stack_chk_guard_000220c0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000220c0" identifier = identifier) ;) (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar9 = (int *)*param_1;" (assignment_expression "piVar9 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "piVar8 = (int *)(PTR_00022044 + 0x17a8);" (assignment_expression "piVar8 = (int *)(PTR_00022044 + 0x17a8)" identifier = (cast_expression "(int *)(PTR_00022044 + 0x17a8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_00022044 + 0x17a8)" ( (binary_expression "PTR_00022044 + 0x17a8" identifier + number_literal) )))) ;) (expression_statement "local_14 = *(int **)PTR___stack_chk_guard_000220c0;" (assignment_expression "local_14 = *(int **)PTR___stack_chk_guard_000220c0" identifier = (pointer_expression "*(int **)PTR___stack_chk_guard_000220c0" * (cast_expression "(int **)PTR___stack_chk_guard_000220c0" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "(*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);" (call_expression "(*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff)" (parenthesized_expression "(*(code *)PTR_snprintf_00022080)" ( (pointer_expression "*(code *)PTR_snprintf_00022080" * (cast_expression "(code *)PTR_snprintf_00022080" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_1014,0xfff)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17c0,param_1 + 0x24)" ( (binary_expression "PTR_00022044 + 0x17c0" identifier + number_literal) , (binary_expression "param_1 + 0x24" identifier + number_literal) ))) ;) (expression_statement "piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);" (assignment_expression "piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1)" identifier = (cast_expression "(int *)(*(code *)PTR_open_000220a0)(auStack_1014,1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_open_000220a0)(auStack_1014,1)" (parenthesized_expression "(*(code *)PTR_open_000220a0)" ( (pointer_expression "*(code *)PTR_open_000220a0" * (cast_expression "(code *)PTR_open_000220a0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_1014,1)" ( identifier , number_literal ))))) ;) (if_statement "if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" if (parenthesized_expression "((int)piVar1 < 0)" ( (binary_expression "(int)piVar1 < 0" (cast_expression "(int)piVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }" { (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" ( (pointer_expression "*(code *)PTR___errno_location_0002207c" * (cast_expression "(code *)PTR___errno_location_0002207c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" identifier = (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar3)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" ( (pointer_expression "*(code *)PTR_strerror_000220a8" * (cast_expression "(code *)PTR_strerror_000220a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar3)" ( (pointer_expression "*puVar3" * identifier) ))))) ;) (expression_statement "piVar1 = (int *)(PTR_00022044 + 0x17e8);" (assignment_expression "piVar1 = (int *)(PTR_00022044 + 0x17e8)" identifier = (cast_expression "(int *)(PTR_00022044 + 0x17e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_00022044 + 0x17e8)" ( (binary_expression "PTR_00022044 + 0x17e8" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)();" (call_expression "(*(code *)PTR_printf_000220c8)()" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) }) (else_clause "else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" else (compound_statement "{\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" { (expression_statement "piVar8 = (int *)0x0;" (assignment_expression "piVar8 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "piVar7 = (int *)&DAT_20005514;" (assignment_expression "piVar7 = (int *)&DAT_20005514" identifier = (cast_expression "(int *)&DAT_20005514" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_20005514" & identifier))) ;) (expression_statement "iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);" (assignment_expression "iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1)" identifier = (call_expression "(*(code *)PTR_ioctl_000220b8)(piVar1)" (parenthesized_expression "(*(code *)PTR_ioctl_000220b8)" ( (pointer_expression "*(code *)PTR_ioctl_000220b8" * (cast_expression "(code *)PTR_ioctl_000220b8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }" { (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" ( (pointer_expression "*(code *)PTR___errno_location_0002207c" * (cast_expression "(code *)PTR___errno_location_0002207c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" identifier = (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar3)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" ( (pointer_expression "*(code *)PTR_strerror_000220a8" * (cast_expression "(code *)PTR_strerror_000220a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar3)" ( (pointer_expression "*puVar3" * identifier) ))))) ;) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" ( (pointer_expression "*(code *)PTR_printf_000220c8" * (cast_expression "(code *)PTR_printf_000220c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17d4)" ( (binary_expression "PTR_00022044 + 0x17d4" identifier + number_literal) ))) ;) }) (else_clause "else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" else (compound_statement "{\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" { (expression_statement "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);" (call_expression "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4)" (parenthesized_expression "(*(code *)PTR_puts_000220ac)" ( (pointer_expression "*(code *)PTR_puts_000220ac" * (cast_expression "(code *)PTR_puts_000220ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_00022044 + 0x17e4)" ( (binary_expression "PTR_00022044 + 0x17e4" identifier + number_literal) ))) ;) }))) (expression_statement "(*(code *)PTR_close_00022070)();" (call_expression "(*(code *)PTR_close_00022070)()" (parenthesized_expression "(*(code *)PTR_close_00022070)" ( (pointer_expression "*(code *)PTR_close_00022070" * (cast_expression "(code *)PTR_close_00022070" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) }))) (if_statement "if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }" if (parenthesized_expression "(local_14 == *(int **)puVar10)" ( (binary_expression "local_14 == *(int **)puVar10" identifier == (pointer_expression "*(int **)puVar10" * (cast_expression "(int **)puVar10" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    return *(int **)puVar10;\n  }" { (return_statement "return *(int **)puVar10;" return (pointer_expression "*(int **)puVar10" * (cast_expression "(int **)puVar10" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) ;) })) (expression_statement "puVar10 = PTR___stack_chk_fail_000220bc;" (assignment_expression "puVar10 = PTR___stack_chk_fail_000220bc" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_000220bc)();" (call_expression "(*(code *)PTR___stack_chk_fail_000220bc)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000220bc)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000220bc" * (cast_expression "(code *)PTR___stack_chk_fail_000220bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);" (assignment_expression "iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" identifier = (call_expression "(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d54))" ( (pointer_expression "**(code **)(puVar10 + 0x10d54)" * (pointer_expression "*(code **)(puVar10 + 0x10d54)" * (cast_expression "(code **)(puVar10 + 0x10d54)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d54)" ( (binary_expression "puVar10 + 0x10d54" identifier + number_literal) ))))) )) (argument_list "(*(int *)(puVar10 + 0x10d30) + 0x17fc)" ( (binary_expression "*(int *)(puVar10 + 0x10d30) + 0x17fc" (pointer_expression "*(int *)(puVar10 + 0x10d30)" * (cast_expression "(int *)(puVar10 + 0x10d30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar10 + 0x10d30)" ( (binary_expression "puVar10 + 0x10d30" identifier + number_literal) )))) + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar4 = (int *)0x0;\n  }" { (expression_statement "piVar4 = (int *)0x0;" (assignment_expression "piVar4 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" else (compound_statement "{\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" { (do_statement "do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));" do (compound_statement "{\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    }" { (expression_statement "piVar4 = (int *)FUN_00010f44(iVar2);" (assignment_expression "piVar4 = (int *)FUN_00010f44(iVar2)" identifier = (cast_expression "(int *)FUN_00010f44(iVar2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00010f44(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))))) ;) (if_statement "if (piVar4 == (int *)0x0) break;" if (parenthesized_expression "(piVar4 == (int *)0x0)" ( (binary_expression "piVar4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (if_statement "if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" if (parenthesized_expression "(((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7))" ( (binary_expression "((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)" (parenthesized_expression "((piVar1 != (int *)0x0) && (*piVar4 == *piVar1))" ( (binary_expression "(piVar1 != (int *)0x0) && (*piVar4 == *piVar1)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*piVar4 == *piVar1)" ( (binary_expression "*piVar4 == *piVar1" (pointer_expression "*piVar4" * identifier) == (pointer_expression "*piVar1" * identifier)) ))) )) && (parenthesized_expression "(piVar4[1] == *piVar7)" ( (binary_expression "piVar4[1] == *piVar7" (subscript_expression "piVar4[1]" identifier [ number_literal ]) == (pointer_expression "*piVar7" * identifier)) ))) )) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" { (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000113f4;" goto statement_identifier ;) })) (if_statement "if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" if (parenthesized_expression "(((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9))" ( (binary_expression "((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)" (parenthesized_expression "((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8))" ( (binary_expression "(piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)" (parenthesized_expression "(piVar8 != (int *)0x0)" ( (binary_expression "piVar8 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(piVar4[2] == *piVar8)" ( (binary_expression "piVar4[2] == *piVar8" (subscript_expression "piVar4[2]" identifier [ number_literal ]) == (pointer_expression "*piVar8" * identifier)) ))) )) && (parenthesized_expression "(piVar4[3] == *piVar9)" ( (binary_expression "piVar4[3] == *piVar9" (subscript_expression "piVar4[3]" identifier [ number_literal ]) == (pointer_expression "*piVar9" * identifier)) ))) )) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" { (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000113f4;" goto statement_identifier ;) })) }) while (parenthesized_expression "((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0))" ( (binary_expression "(iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0)" (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0)" ( (comma_expression "iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0" (assignment_expression "iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6)" identifier = (call_expression "(**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d78))" ( (pointer_expression "**(code **)(puVar10 + 0x10d78)" * (pointer_expression "*(code **)(puVar10 + 0x10d78)" * (cast_expression "(code **)(puVar10 + 0x10d78)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d78)" ( (binary_expression "puVar10 + 0x10d78" identifier + number_literal) ))))) )) (argument_list "(piVar4 + 0x24,iVar6)" ( (binary_expression "piVar4 + 0x24" identifier + number_literal) , identifier )))) , (binary_expression "iVar5 != 0" identifier != number_literal)) ))) )) ;) (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" identifier = (pointer_expression "*(code **)(puVar10 + 0x10d58)" * (cast_expression "(code **)(puVar10 + 0x10d58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x10d58)" ( (binary_expression "puVar10 + 0x10d58" identifier + number_literal) ))))) ;) (labeled_statement "LAB_000113f4:\n    (*pcVar11)(iVar2);" statement_identifier : (expression_statement "(*pcVar11)(iVar2);" (call_expression "(*pcVar11)(iVar2)" (parenthesized_expression "(*pcVar11)" ( (pointer_expression "*pcVar11" * identifier) )) (argument_list "(iVar2)" ( identifier ))) ;)) }))) (return_statement "return piVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) ))))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) )) (compound_statement { (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT)) ))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (pointer_expression * IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (pointer_expression * IDENT)) ))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (pointer_expression * IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (binary_expression IDENT + LIT) , IDENT )))) , (binary_expression IDENT != LIT)) ))) )) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (labeled_statement statement_identifier : (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT ))) ;)) }))) (return_statement return IDENT ;) })))
(function_definition "int * FUN_00011190(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}" (primitive_type "int") (pointer_declarator "* FUN_00011190(undefined4 *param_1)" (* "*") (function_declarator "FUN_00011190(undefined4 *param_1)" (identifier "FUN_00011190") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_1014 [4096];\n  int *local_14;\n  \n  puVar10 = PTR___stack_chk_guard_000220c0;\n  iVar6 = param_1[1];\n  piVar9 = (int *)*param_1;\n  piVar8 = (int *)(PTR_00022044 + 0x17a8);\n  local_14 = *(int **)PTR___stack_chk_guard_000220c0;\n  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);\n  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);\n  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);\n  if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }\n  if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }\n  puVar10 = PTR___stack_chk_fail_000220bc;\n  (*(code *)PTR___stack_chk_fail_000220bc)();\n  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);\n  if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }\n  return piVar4;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (declaration "int *piVar9;" (primitive_type "int") (pointer_declarator "*piVar9" (* "*") (identifier "piVar9")) (; ";")) (declaration "undefined *puVar10;" (type_identifier "undefined") (pointer_declarator "*puVar10" (* "*") (identifier "puVar10")) (; ";")) (declaration "code *pcVar11;" (type_identifier "code") (pointer_declarator "*pcVar11" (* "*") (identifier "pcVar11")) (; ";")) (declaration "undefined1 auStack_1014 [4096];" (type_identifier "undefined1") (array_declarator "auStack_1014 [4096]" (identifier "auStack_1014") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "int *local_14;" (primitive_type "int") (pointer_declarator "*local_14" (* "*") (identifier "local_14")) (; ";")) (expression_statement "puVar10 = PTR___stack_chk_guard_000220c0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000220c0" (identifier "puVar10") (= "=") (identifier "PTR___stack_chk_guard_000220c0")) (; ";")) (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" (identifier "iVar6") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar9 = (int *)*param_1;" (assignment_expression "piVar9 = (int *)*param_1" (identifier "piVar9") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "piVar8 = (int *)(PTR_00022044 + 0x17a8);" (assignment_expression "piVar8 = (int *)(PTR_00022044 + 0x17a8)" (identifier "piVar8") (= "=") (cast_expression "(int *)(PTR_00022044 + 0x17a8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_00022044 + 0x17a8)" (( "(") (binary_expression "PTR_00022044 + 0x17a8" (identifier "PTR_00022044") (+ "+") (number_literal "0x17a8")) () ")")))) (; ";")) (expression_statement "local_14 = *(int **)PTR___stack_chk_guard_000220c0;" (assignment_expression "local_14 = *(int **)PTR___stack_chk_guard_000220c0" (identifier "local_14") (= "=") (pointer_expression "*(int **)PTR___stack_chk_guard_000220c0" (* "*") (cast_expression "(int **)PTR___stack_chk_guard_000220c0" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR___stack_chk_guard_000220c0")))) (; ";")) (expression_statement "(*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);" (call_expression "(*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff)" (parenthesized_expression "(*(code *)PTR_snprintf_00022080)" (( "(") (pointer_expression "*(code *)PTR_snprintf_00022080" (* "*") (cast_expression "(code *)PTR_snprintf_00022080" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_snprintf_00022080"))) () ")")) (argument_list "(auStack_1014,0xfff)" (( "(") (identifier "auStack_1014") (, ",") (number_literal "0xfff") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" (( "(") (pointer_expression "*(code *)PTR_printf_000220c8" (* "*") (cast_expression "(code *)PTR_printf_000220c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_printf_000220c8"))) () ")")) (argument_list "(PTR_00022044 + 0x17c0,param_1 + 0x24)" (( "(") (binary_expression "PTR_00022044 + 0x17c0" (identifier "PTR_00022044") (+ "+") (number_literal "0x17c0")) (, ",") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")"))) (; ";")) (expression_statement "piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);" (assignment_expression "piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1)" (identifier "piVar1") (= "=") (cast_expression "(int *)(*(code *)PTR_open_000220a0)(auStack_1014,1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_open_000220a0)(auStack_1014,1)" (parenthesized_expression "(*(code *)PTR_open_000220a0)" (( "(") (pointer_expression "*(code *)PTR_open_000220a0" (* "*") (cast_expression "(code *)PTR_open_000220a0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_open_000220a0"))) () ")")) (argument_list "(auStack_1014,1)" (( "(") (identifier "auStack_1014") (, ",") (number_literal "1") () ")"))))) (; ";")) (if_statement "if ((int)piVar1 < 0) {\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }\n  else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" (if "if") (parenthesized_expression "((int)piVar1 < 0)" (( "(") (binary_expression "(int)piVar1 < 0" (cast_expression "(int)piVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar1")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n    piVar1 = (int *)(PTR_00022044 + 0x17e8);\n    (*(code *)PTR_printf_000220c8)();\n  }" ({ "{") (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0002207c" (* "*") (cast_expression "(code *)PTR___errno_location_0002207c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0002207c"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" (identifier "piVar7") (= "=") (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar3)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" (( "(") (pointer_expression "*(code *)PTR_strerror_000220a8" (* "*") (cast_expression "(code *)PTR_strerror_000220a8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strerror_000220a8"))) () ")")) (argument_list "(*puVar3)" (( "(") (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) () ")"))))) (; ";")) (expression_statement "piVar1 = (int *)(PTR_00022044 + 0x17e8);" (assignment_expression "piVar1 = (int *)(PTR_00022044 + 0x17e8)" (identifier "piVar1") (= "=") (cast_expression "(int *)(PTR_00022044 + 0x17e8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_00022044 + 0x17e8)" (( "(") (binary_expression "PTR_00022044 + 0x17e8" (identifier "PTR_00022044") (+ "+") (number_literal "0x17e8")) () ")")))) (; ";")) (expression_statement "(*(code *)PTR_printf_000220c8)();" (call_expression "(*(code *)PTR_printf_000220c8)()" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" (( "(") (pointer_expression "*(code *)PTR_printf_000220c8" (* "*") (cast_expression "(code *)PTR_printf_000220c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_printf_000220c8"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" (else "else") (compound_statement "{\n    piVar8 = (int *)0x0;\n    piVar7 = (int *)&DAT_20005514;\n    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);\n    if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }\n    (*(code *)PTR_close_00022070)();\n  }" ({ "{") (expression_statement "piVar8 = (int *)0x0;" (assignment_expression "piVar8 = (int *)0x0" (identifier "piVar8") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "piVar7 = (int *)&DAT_20005514;" (assignment_expression "piVar7 = (int *)&DAT_20005514" (identifier "piVar7") (= "=") (cast_expression "(int *)&DAT_20005514" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_20005514" (& "&") (identifier "DAT_20005514")))) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);" (assignment_expression "iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_ioctl_000220b8)(piVar1)" (parenthesized_expression "(*(code *)PTR_ioctl_000220b8)" (( "(") (pointer_expression "*(code *)PTR_ioctl_000220b8" (* "*") (cast_expression "(code *)PTR_ioctl_000220b8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ioctl_000220b8"))) () ")")) (argument_list "(piVar1)" (( "(") (identifier "piVar1") () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }\n    else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();\n      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);\n      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);\n    }" ({ "{") (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)()" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002207c)()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0002207c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002207c)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0002207c" (* "*") (cast_expression "(code *)PTR___errno_location_0002207c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0002207c"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);" (assignment_expression "piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" (identifier "piVar7") (= "=") (cast_expression "(int *)(*(code *)PTR_strerror_000220a8)(*puVar3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_strerror_000220a8)(*puVar3)" (parenthesized_expression "(*(code *)PTR_strerror_000220a8)" (( "(") (pointer_expression "*(code *)PTR_strerror_000220a8" (* "*") (cast_expression "(code *)PTR_strerror_000220a8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strerror_000220a8"))) () ")")) (argument_list "(*puVar3)" (( "(") (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) () ")"))))) (; ";")) (expression_statement "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);" (call_expression "(*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4)" (parenthesized_expression "(*(code *)PTR_printf_000220c8)" (( "(") (pointer_expression "*(code *)PTR_printf_000220c8" (* "*") (cast_expression "(code *)PTR_printf_000220c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_printf_000220c8"))) () ")")) (argument_list "(PTR_00022044 + 0x17d4)" (( "(") (binary_expression "PTR_00022044 + 0x17d4" (identifier "PTR_00022044") (+ "+") (number_literal "0x17d4")) () ")"))) (; ";")) (} "}")) (else_clause "else {\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" (else "else") (compound_statement "{\n      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);\n    }" ({ "{") (expression_statement "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);" (call_expression "(*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4)" (parenthesized_expression "(*(code *)PTR_puts_000220ac)" (( "(") (pointer_expression "*(code *)PTR_puts_000220ac" (* "*") (cast_expression "(code *)PTR_puts_000220ac" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_puts_000220ac"))) () ")")) (argument_list "(PTR_00022044 + 0x17e4)" (( "(") (binary_expression "PTR_00022044 + 0x17e4" (identifier "PTR_00022044") (+ "+") (number_literal "0x17e4")) () ")"))) (; ";")) (} "}")))) (expression_statement "(*(code *)PTR_close_00022070)();" (call_expression "(*(code *)PTR_close_00022070)()" (parenthesized_expression "(*(code *)PTR_close_00022070)" (( "(") (pointer_expression "*(code *)PTR_close_00022070" (* "*") (cast_expression "(code *)PTR_close_00022070" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_00022070"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_14 == *(int **)puVar10) {\n    return *(int **)puVar10;\n  }" (if "if") (parenthesized_expression "(local_14 == *(int **)puVar10)" (( "(") (binary_expression "local_14 == *(int **)puVar10" (identifier "local_14") (== "==") (pointer_expression "*(int **)puVar10" (* "*") (cast_expression "(int **)puVar10" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "puVar10")))) () ")")) (compound_statement "{\n    return *(int **)puVar10;\n  }" ({ "{") (return_statement "return *(int **)puVar10;" (return "return") (pointer_expression "*(int **)puVar10" (* "*") (cast_expression "(int **)puVar10" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "puVar10"))) (; ";")) (} "}"))) (expression_statement "puVar10 = PTR___stack_chk_fail_000220bc;" (assignment_expression "puVar10 = PTR___stack_chk_fail_000220bc" (identifier "puVar10") (= "=") (identifier "PTR___stack_chk_fail_000220bc")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_000220bc)();" (call_expression "(*(code *)PTR___stack_chk_fail_000220bc)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000220bc)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_000220bc" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_000220bc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_000220bc"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);" (assignment_expression "iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" (identifier "iVar2") (= "=") (call_expression "(**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d54))" (( "(") (pointer_expression "**(code **)(puVar10 + 0x10d54)" (* "*") (pointer_expression "*(code **)(puVar10 + 0x10d54)" (* "*") (cast_expression "(code **)(puVar10 + 0x10d54)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x10d54)" (( "(") (binary_expression "puVar10 + 0x10d54" (identifier "puVar10") (+ "+") (number_literal "0x10d54")) () ")"))))) () ")")) (argument_list "(*(int *)(puVar10 + 0x10d30) + 0x17fc)" (( "(") (binary_expression "*(int *)(puVar10 + 0x10d30) + 0x17fc" (pointer_expression "*(int *)(puVar10 + 0x10d30)" (* "*") (cast_expression "(int *)(puVar10 + 0x10d30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar10 + 0x10d30)" (( "(") (binary_expression "puVar10 + 0x10d30" (identifier "puVar10") (+ "+") (number_literal "0x10d30")) () ")")))) (+ "+") (number_literal "0x17fc")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    piVar4 = (int *)0x0;\n  }\n  else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar4 = (int *)0x0;\n  }" ({ "{") (expression_statement "piVar4 = (int *)0x0;" (assignment_expression "piVar4 = (int *)0x0" (identifier "piVar4") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" (else "else") (compound_statement "{\n    do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));\n    pcVar11 = *(code **)(puVar10 + 0x10d58);\nLAB_000113f4:\n    (*pcVar11)(iVar2);\n  }" ({ "{") (do_statement "do {\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    } while ((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));" (do "do") (compound_statement "{\n      piVar4 = (int *)FUN_00010f44(iVar2);\n      if (piVar4 == (int *)0x0) break;\n      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }\n    }" ({ "{") (expression_statement "piVar4 = (int *)FUN_00010f44(iVar2);" (assignment_expression "piVar4 = (int *)FUN_00010f44(iVar2)" (identifier "piVar4") (= "=") (cast_expression "(int *)FUN_00010f44(iVar2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00010f44(iVar2)" (identifier "FUN_00010f44") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))))) (; ";")) (if_statement "if (piVar4 == (int *)0x0) break;" (if "if") (parenthesized_expression "(piVar4 == (int *)0x0)" (( "(") (binary_expression "piVar4 == (int *)0x0" (identifier "piVar4") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" (if "if") (parenthesized_expression "(((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7))" (( "(") (binary_expression "((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)" (parenthesized_expression "((piVar1 != (int *)0x0) && (*piVar4 == *piVar1))" (( "(") (binary_expression "(piVar1 != (int *)0x0) && (*piVar4 == *piVar1)" (parenthesized_expression "(piVar1 != (int *)0x0)" (( "(") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(*piVar4 == *piVar1)" (( "(") (binary_expression "*piVar4 == *piVar1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (== "==") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(piVar4[1] == *piVar7)" (( "(") (binary_expression "piVar4[1] == *piVar7" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (== "==") (pointer_expression "*piVar7" (* "*") (identifier "piVar7"))) () ")"))) () ")")) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" ({ "{") (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" (identifier "pcVar11") (= "=") (pointer_expression "*(code **)(puVar10 + 0x10d58)" (* "*") (cast_expression "(code **)(puVar10 + 0x10d58)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x10d58)" (( "(") (binary_expression "puVar10 + 0x10d58" (identifier "puVar10") (+ "+") (number_literal "0x10d58")) () ")"))))) (; ";")) (goto_statement "goto LAB_000113f4;" (goto "goto") (statement_identifier "LAB_000113f4") (; ";")) (} "}"))) (if_statement "if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" (if "if") (parenthesized_expression "(((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9))" (( "(") (binary_expression "((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)" (parenthesized_expression "((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8))" (( "(") (binary_expression "(piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)" (parenthesized_expression "(piVar8 != (int *)0x0)" (( "(") (binary_expression "piVar8 != (int *)0x0" (identifier "piVar8") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(piVar4[2] == *piVar8)" (( "(") (binary_expression "piVar4[2] == *piVar8" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (== "==") (pointer_expression "*piVar8" (* "*") (identifier "piVar8"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(piVar4[3] == *piVar9)" (( "(") (binary_expression "piVar4[3] == *piVar9" (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]")) (== "==") (pointer_expression "*piVar9" (* "*") (identifier "piVar9"))) () ")"))) () ")")) (compound_statement "{\n        pcVar11 = *(code **)(puVar10 + 0x10d58);\n        goto LAB_000113f4;\n      }" ({ "{") (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" (identifier "pcVar11") (= "=") (pointer_expression "*(code **)(puVar10 + 0x10d58)" (* "*") (cast_expression "(code **)(puVar10 + 0x10d58)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x10d58)" (( "(") (binary_expression "puVar10 + 0x10d58" (identifier "puVar10") (+ "+") (number_literal "0x10d58")) () ")"))))) (; ";")) (goto_statement "goto LAB_000113f4;" (goto "goto") (statement_identifier "LAB_000113f4") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "((iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0))" (( "(") (binary_expression "(iVar6 == 0) ||\n            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0)" (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0)" (( "(") (comma_expression "iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0" (assignment_expression "iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6)" (identifier "iVar5") (= "=") (call_expression "(**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6)" (parenthesized_expression "(**(code **)(puVar10 + 0x10d78))" (( "(") (pointer_expression "**(code **)(puVar10 + 0x10d78)" (* "*") (pointer_expression "*(code **)(puVar10 + 0x10d78)" (* "*") (cast_expression "(code **)(puVar10 + 0x10d78)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x10d78)" (( "(") (binary_expression "puVar10 + 0x10d78" (identifier "puVar10") (+ "+") (number_literal "0x10d78")) () ")"))))) () ")")) (argument_list "(piVar4 + 0x24,iVar6)" (( "(") (binary_expression "piVar4 + 0x24" (identifier "piVar4") (+ "+") (number_literal "0x24")) (, ",") (identifier "iVar6") () ")")))) (, ",") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (; ";")) (expression_statement "pcVar11 = *(code **)(puVar10 + 0x10d58);" (assignment_expression "pcVar11 = *(code **)(puVar10 + 0x10d58)" (identifier "pcVar11") (= "=") (pointer_expression "*(code **)(puVar10 + 0x10d58)" (* "*") (cast_expression "(code **)(puVar10 + 0x10d58)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x10d58)" (( "(") (binary_expression "puVar10 + 0x10d58" (identifier "puVar10") (+ "+") (number_literal "0x10d58")) () ")"))))) (; ";")) (labeled_statement "LAB_000113f4:\n    (*pcVar11)(iVar2);" (statement_identifier "LAB_000113f4") (: ":") (expression_statement "(*pcVar11)(iVar2);" (call_expression "(*pcVar11)(iVar2)" (parenthesized_expression "(*pcVar11)" (( "(") (pointer_expression "*pcVar11" (* "*") (identifier "pcVar11")) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";"))) (} "}")))) (return_statement "return piVar4;" (return "return") (identifier "piVar4") (; ";")) (} "}")))

void function_1(type_1 *dev)

{
  int var_3;
  int *var_8;
  int var_2;
  type_2 *puVar4;
  type_3 *var_5;
  type_1 *var_7;
  int var_10;
  int *piVar7;
  int *var_9;
  int *piVar9;
  type_4 *var_4;
  type_5 *pcVar11;
  char path [4096];
  
  var_4 = PTR___stack_chk_guard_000220c0;
  var_10 = dev->dev_num;
  piVar9 = (int *)dev->bus_num;
  var_9 = (int *)(var_1 + 0x17a8);
  var_3 = *(int *)PTR___stack_chk_guard_000220c0;
  (*(type_5 *)PTR_snprintf_00022080)(path,0xfff);
  (*(type_5 *)PTR_printf_000220c8)(var_1 + 0x17c0,dev->product_name);
  var_8 = (int *)(*(type_5 *)PTR_open_000220a0)(path,1);
  if ((int)var_8 < 0) {
    puVar4 = (type_2 *)(*(type_5 *)PTR___errno_location_0002207c)();
    piVar7 = (int *)(*(type_5 *)PTR_strerror_000220a8)(*puVar4);
    var_8 = (int *)(var_1 + 0x17e8);
    (*(type_5 *)PTR_printf_000220c8)();
  }
  else {
    var_9 = (int *)0x0;
    piVar7 = (int *)&DAT_20005514;
    var_2 = (*(type_5 *)PTR_ioctl_000220b8)(var_8);
    if (var_2 < 0) {
      puVar4 = (type_2 *)(*(type_5 *)PTR___errno_location_0002207c)();
      piVar7 = (int *)(*(type_5 *)PTR_strerror_000220a8)(*puVar4);
      (*(type_5 *)PTR_printf_000220c8)(var_1 + 0x17d4);
    }
    else {
      (*(type_5 *)PTR_puts_000220ac)(var_1 + 0x17e4);
    }
    (*(type_5 *)PTR_close_00022070)();
  }
  if (var_3 == *(int *)var_4) {
    return;
  }
  var_4 = PTR___stack_chk_fail_000220bc;
  (*(type_5 *)PTR___stack_chk_fail_000220bc)();
  var_5 = (type_3 *)(**(type_5 **)(var_4 + 0x10d54))(*(int *)(var_4 + 0x10d30) + 0x17fc);
  if (var_5 != (type_3 *)0x0) {
    do {
      var_7 = var_6(var_5);
      if (var_7 == (type_1 *)0x0) break;
      if (((var_8 != (int *)0x0) && (var_7->bus_num == *var_8)) && (var_7->dev_num == *piVar7))
      {
        pcVar11 = *(type_5 **)(var_4 + 0x10d58);
        goto LAB_000113f4;
      }
      if (((var_9 != (int *)0x0) && (var_7->vendor_id == *var_9)) &&
         (var_7->product_id == *piVar9)) {
        pcVar11 = *(type_5 **)(var_4 + 0x10d58);
        goto LAB_000113f4;
      }
    } while ((var_10 == 0) ||
            (var_3 = (**(type_5 **)(var_4 + 0x10d78))(var_7->product_name,var_10), var_3 != 0));
    pcVar11 = *(type_5 **)(var_4 + 0x10d58);
LAB_000113f4:
    (*pcVar11)(var_5);
  }
  return;
}


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

int * MASKED(undefined4 *param_1)

{
  int *piVar1;
  int iVar2;
  undefined4 *puVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  int *piVar8;
  int *piVar9;
  undefined *puVar10;
  code *pcVar11;
  undefined1 auStack_1014 [4096];
  int *local_14;
  
  puVar10 = PTR___stack_chk_guard_000220c0;
  iVar6 = param_1[1];
  piVar9 = (int *)*param_1;
  piVar8 = (int *)(PTR_00022044 + 0x17a8);
  local_14 = *(int **)PTR___stack_chk_guard_000220c0;
  (*(code *)PTR_snprintf_00022080)(auStack_1014,0xfff);
  (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17c0,param_1 + 0x24);
  piVar1 = (int *)(*(code *)PTR_open_000220a0)(auStack_1014,1);
  if ((int)piVar1 < 0) {
    puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();
    piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);
    piVar1 = (int *)(PTR_00022044 + 0x17e8);
    (*(code *)PTR_printf_000220c8)();
  }
  else {
    piVar8 = (int *)0x0;
    piVar7 = (int *)&DAT_20005514;
    iVar2 = (*(code *)PTR_ioctl_000220b8)(piVar1);
    if (iVar2 < 0) {
      puVar3 = (undefined4 *)(*(code *)PTR___errno_location_0002207c)();
      piVar7 = (int *)(*(code *)PTR_strerror_000220a8)(*puVar3);
      (*(code *)PTR_printf_000220c8)(PTR_00022044 + 0x17d4);
    }
    else {
      (*(code *)PTR_puts_000220ac)(PTR_00022044 + 0x17e4);
    }
    (*(code *)PTR_close_00022070)();
  }
  if (local_14 == *(int **)puVar10) {
    return *(int **)puVar10;
  }
  puVar10 = PTR___stack_chk_fail_000220bc;
  (*(code *)PTR___stack_chk_fail_000220bc)();
  iVar2 = (**(code **)(puVar10 + 0x10d54))(*(int *)(puVar10 + 0x10d30) + 0x17fc);
  if (iVar2 == 0) {
    piVar4 = (int *)0x0;
  }
  else {
    do {
      piVar4 = (int *)FUN_00010f44(iVar2);
      if (piVar4 == (int *)0x0) break;
      if (((piVar1 != (int *)0x0) && (*piVar4 == *piVar1)) && (piVar4[1] == *piVar7)) {
        pcVar11 = *(code **)(puVar10 + 0x10d58);
        goto LAB_000113f4;
      }
      if (((piVar8 != (int *)0x0) && (piVar4[2] == *piVar8)) && (piVar4[3] == *piVar9)) {
        pcVar11 = *(code **)(puVar10 + 0x10d58);
        goto LAB_000113f4;
      }
    } while ((iVar6 == 0) ||
            (iVar5 = (**(code **)(puVar10 + 0x10d78))(piVar4 + 0x24,iVar6), iVar5 != 0));
    pcVar11 = *(code **)(puVar10 + 0x10d58);
LAB_000113f4:
    (*pcVar11)(iVar2);
  }
  return piVar4;
}

