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

void __regparm3 add_usb_interface(char *d_name)

{
  int iVar1;
  char *pcVar2;
  list_head *plVar3;
  list_head *__ptr;
  int iVar4;
  ssize_t sVar5;
  char *pcVar6;
  int in_GS_OFFSET;
  char *pn;
  char driver [4096];
  char link [4096];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar2 = strchr(d_name,0x3a);
  plVar3 = (list_head *)strtoul(pcVar2 + 1,&pn,10);
  pcVar6 = pn;
  if ((pn != (char *)0x0) && (pn != pcVar2 + 1)) {
    __ptr = (list_head *)calloc(0x230,1);
    if (__ptr != (list_head *)0x0) {
      __ptr[2].next = plVar3;
      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);
      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {
        free(__ptr);
      }
      else {
        __ptr[2].prev = plVar3;
        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);
        if (0xfe < iVar4) {
          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);
        }
        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);
        __ptr[3].next = plVar3;
        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);
        __ptr[3].prev = plVar3;
        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);
        __ptr[4].next = plVar3;
        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);
        __ptr[4].prev = plVar3;
        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);
        __ptr[5].next = plVar3;
        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);
        __ptr[5].prev = plVar3;
        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);
        if (iVar4 - 1U < 0xfff) {
          sVar5 = readlink(link,driver,0x1000);
          if (-1 < sVar5) {
            if (sVar5 < 0xfff) {
              driver[sVar5] = '\0';
            }
            else {
              driver[0] = '\0';
            }
            pcVar6 = strrchr(driver,0x2f);
            if (pcVar6 != (char *)0x0) {
              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);
            }
          }
        }
        else {
          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);
        }
        plVar3 = interfacelist.prev;
        interfacelist.prev = __ptr;
        __ptr->next = &interfacelist;
        __ptr->prev = plVar3;
        plVar3->next = __ptr;
      }
    }
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void __regparm3 FUN_0001e840(char *param_1)

{
  undefined *puVar1;
  char *pcVar2;
  ulong uVar3;
  undefined4 *__ptr;
  int iVar4;
  undefined4 uVar5;
  ssize_t sVar6;
  char *pcVar7;
  int in_GS_OFFSET;
  char *local_2024;
  char local_2020 [4096];
  char local_1020 [4096];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1e84b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar2 = strchr(param_1,0x3a);
  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);
  pcVar7 = local_2024;
  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {
    __ptr = (undefined4 *)calloc(0x230,1);
    if (__ptr != (undefined4 *)0x0) {
      __ptr[4] = uVar3;
      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);
      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {
        free(__ptr);
      }
      else {
        __ptr[5] = uVar3;
        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);
        if (0xfe < iVar4) {
          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);
        }
        uVar5 = FUN_0001e740();
        __ptr[6] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[7] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[8] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[9] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[10] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[0xb] = uVar5;
        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",
                               param_1);
        if (iVar4 - 1U < 0xfff) {
          sVar6 = readlink(local_1020,local_2020,0x1000);
          if (-1 < sVar6) {
            if (sVar6 < 0xfff) {
              local_2020[sVar6] = '\0';
            }
            else {
              local_2020[0] = '\0';
            }
            pcVar7 = strrchr(local_2020,0x2f);
            if (pcVar7 != (char *)0x0) {
              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);
            }
          }
        }
        else {
          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);
        }
        puVar1 = PTR_LOOP_000381ec;
        PTR_LOOP_000381ec = (undefined *)__ptr;
        *__ptr = &PTR_LOOP_000381e8;
        __ptr[1] = puVar1;
        *(undefined4 **)puVar1 = __ptr;
      }
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00021500();
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x00016850
ADD EBX,0x197b5
SUB ESP,0x2034
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2024],EAX
XOR EAX,EAX
PUSH 0x3a
PUSH EDI
CALL 0x00016210
ADD ESP,0xc
PUSH 0xa
LEA ESI,[EAX + 0x1]
LEA EBP,[ESP + 0x20]
PUSH EBP
PUSH ESI
CALL 0x00016200
MOV EDX,dword ptr [ESP + 0x28]
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EDX,EDX
JZ 0x0001ea6c
CMP EDX,ESI
MOV dword ptr [ESP + 0xc],EDX
JZ 0x0001ea6c
SUB ESP,0x8
PUSH 0x1
PUSH 0x230
CALL 0x00016460
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0001ea6c
MOV EDX,dword ptr [ESP + 0xc]
MOV ECX,dword ptr [ESP + 0x8]
SUB ESP,0x4
ADD EDX,0x1
MOV dword ptr [EAX + 0x10],ECX
PUSH 0xa
PUSH EBP
PUSH EDX
MOV dword ptr [ESP + 0x18],EDX
CALL 0x00016200
MOV ECX,dword ptr [ESP + 0x28]
ADD ESP,0x10
TEST ECX,ECX
JZ 0x0001eab0
MOV EDX,dword ptr [ESP + 0x8]
CMP ECX,EDX
JZ 0x0001eab0
LEA EDX,[ESI + 0x30]
LEA EBP,[EBX + 0xfffeaf15]
MOV dword ptr [ESI + 0x14],EAX
PUSH EDI
PUSH EBP
PUSH 0xff
PUSH EDX
MOV dword ptr [ESP + 0x18],EDX
CALL 0x00016290
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
CMP EAX,0xfe
JG 0x0001ea90
MOV ECX,0xa
LEA EDX,[EBX + 0xffff099f]
MOV EAX,EDI
CALL 0x0001e740
MOV ECX,0x10
LEA EDX,[EBX + 0xffff09b1]
MOV dword ptr [ESI + 0x18],EAX
MOV EAX,EDI
CALL 0x0001e740
MOV ECX,0x10
LEA EDX,[EBX + 0xffff09c1]
MOV dword ptr [ESI + 0x1c],EAX
MOV EAX,EDI
CALL 0x0001e740
MOV ECX,0x10
LEA EDX,[EBX + 0xffff09d2]
MOV dword ptr [ESI + 0x20],EAX
MOV EAX,EDI
CALL 0x0001e740
MOV ECX,0x10
LEA EDX,[EBX + 0xffff09e5]
MOV dword ptr [ESI + 0x24],EAX
MOV EAX,EDI
CALL 0x0001e740
MOV ECX,0x10
LEA EDX,[EBX + 0xffff09f8]
MOV dword ptr [ESI + 0x28],EAX
MOV EAX,EDI
CALL 0x0001e740
SUB ESP,0x4
MOV dword ptr [ESI + 0x2c],EAX
LEA EAX,[EBX + 0xffff0c28]
PUSH EDI
PUSH EAX
LEA EAX,[EBX + 0xffff0a06]
PUSH EAX
PUSH 0x1000
PUSH 0x1
PUSH 0x1000
LEA EDX,[ESP + 0x1038]
PUSH EDX
MOV dword ptr [ESP + 0x28],EDX
CALL 0x00016050
ADD ESP,0x20
LEA ECX,[EAX + -0x1]
CMP ECX,0xffe
JA 0x0001ea40
SUB ESP,0x4
PUSH 0x1000
LEA EDI,[ESP + 0x24]
PUSH EDI
MOV EDX,dword ptr [ESP + 0x14]
PUSH EDX
CALL 0x000160e0
ADD ESP,0x10
TEST EAX,EAX
JS 0x0001ea53
CMP EAX,0xffe
JLE 0x0001eac0
MOV byte ptr [ESP + 0x1c],0x0
SUB ESP,0x8
PUSH 0x2f
PUSH EDI
CALL 0x00016360
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001ea53
ADD EAX,0x1
PUSH EAX
LEA EAX,[ESI + 0x12f]
PUSH EBP
PUSH 0xff
PUSH EAX
CALL 0x00016290
ADD ESP,0x10
JMP 0x0001ea53
PUSH EAX
LEA EAX,[EBX + 0xffff0b0c]
PUSH EDI
PUSH EAX
PUSH 0x1
CALL 0x000162e0
ADD ESP,0x10
MOV EAX,dword ptr [EBX + 0x1ec]
LEA EDX,[EBX + 0x1e8]
MOV dword ptr [EBX + 0x1ec],ESI
MOV dword ptr [ESI],EDX
MOV dword ptr [ESI + 0x4],EAX
MOV dword ptr [EAX],ESI
MOV EAX,dword ptr [ESP + 0x201c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0001eaca
ADD ESP,0x202c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xffff0ba0]
PUSH EDI
PUSH EDX
PUSH EAX
PUSH 0x1
CALL 0x000162e0
ADD ESP,0x10
JMP 0x0001e924
SUB ESP,0xc
PUSH ESI
CALL 0x00016090
ADD ESP,0x10
JMP 0x0001ea6c
MOV byte ptr [ESP + EAX*0x1 + 0x1c],0x0
JMP 0x0001ea0d
CALL 0x00021500
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0001e840(char *param_1)\n\n{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00021500();\n}\n\n" comment (function_definition "void __regparm3 FUN_0001e840(char *param_1)\n\n{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00021500();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001e840(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00021500();\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "ssize_t sVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_2024;" primitive_type (pointer_declarator "*local_2024" * identifier) ;) (declaration "char local_2020 [4096];" primitive_type (array_declarator "local_2020 [4096]" identifier [ number_literal ]) ;) (declaration "char local_1020 [4096];" primitive_type (array_declarator "local_1020 [4096]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1e84b;" (assignment_expression "uStack_14 = 0x1e84b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = strchr(param_1,0x3a);" (assignment_expression "pcVar2 = strchr(param_1,0x3a)" identifier = (call_expression "strchr(param_1,0x3a)" identifier (argument_list "(param_1,0x3a)" ( identifier , number_literal )))) ;) (expression_statement "uVar3 = strtoul(pcVar2 + 1,&local_2024,10);" (assignment_expression "uVar3 = strtoul(pcVar2 + 1,&local_2024,10)" identifier = (call_expression "strtoul(pcVar2 + 1,&local_2024,10)" identifier (argument_list "(pcVar2 + 1,&local_2024,10)" ( (binary_expression "pcVar2 + 1" identifier + number_literal) , (pointer_expression "&local_2024" & identifier) , number_literal )))) ;) (expression_statement "pcVar7 = local_2024;" (assignment_expression "pcVar7 = local_2024" identifier = identifier) ;) (if_statement "if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }" if (parenthesized_expression "((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1))" ( (binary_expression "(local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)" (parenthesized_expression "(local_2024 != (char *)0x0)" ( (binary_expression "local_2024 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(local_2024 != pcVar2 + 1)" ( (binary_expression "local_2024 != pcVar2 + 1" identifier != (binary_expression "pcVar2 + 1" identifier + number_literal)) ))) )) (compound_statement "{\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }" { (expression_statement "__ptr = (undefined4 *)calloc(0x230,1);" (assignment_expression "__ptr = (undefined4 *)calloc(0x230,1)" identifier = (cast_expression "(undefined4 *)calloc(0x230,1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "calloc(0x230,1)" identifier (argument_list "(0x230,1)" ( number_literal , number_literal ))))) ;) (if_statement "if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }" if (parenthesized_expression "(__ptr != (undefined4 *)0x0)" ( (binary_expression "__ptr != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }" { (expression_statement "__ptr[4] = uVar3;" (assignment_expression "__ptr[4] = uVar3" (subscript_expression "__ptr[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar3 = strtoul(pcVar7 + 1,&local_2024,10);" (assignment_expression "uVar3 = strtoul(pcVar7 + 1,&local_2024,10)" identifier = (call_expression "strtoul(pcVar7 + 1,&local_2024,10)" identifier (argument_list "(pcVar7 + 1,&local_2024,10)" ( (binary_expression "pcVar7 + 1" identifier + number_literal) , (pointer_expression "&local_2024" & identifier) , number_literal )))) ;) (if_statement "if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" if (parenthesized_expression "((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1))" ( (binary_expression "(local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)" (parenthesized_expression "(local_2024 == (char *)0x0)" ( (binary_expression "local_2024 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(local_2024 == pcVar7 + 1)" ( (binary_expression "local_2024 == pcVar7 + 1" identifier == (binary_expression "pcVar7 + 1" identifier + number_literal)) ))) )) (compound_statement "{\n        free(__ptr);\n      }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }) (else_clause "else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" else (compound_statement "{\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" { (expression_statement "__ptr[5] = uVar3;" (assignment_expression "__ptr[5] = uVar3" (subscript_expression "__ptr[5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);" (assignment_expression "iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1)" identifier = (call_expression "snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1)" identifier (argument_list "((char *)(__ptr + 0xc),0xff,"%s",param_1)" ( (cast_expression "(char *)(__ptr + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__ptr + 0xc)" ( (binary_expression "__ptr + 0xc" identifier + number_literal) ))) , number_literal , (string_literal ""%s"" " string_content ") , identifier )))) ;) (if_statement "if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }" if (parenthesized_expression "(0xfe < iVar4)" ( (binary_expression "0xfe < iVar4" number_literal < identifier) )) (compound_statement "{\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }" { (expression_statement "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);" (call_expression "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1)" identifier (argument_list "(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1)" ( number_literal , (string_literal ""warning: \'%s\' truncated to \'%s\'\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence ") , (binary_expression "__ptr + 0xc" identifier + number_literal) , identifier ))) ;) })) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[6] = uVar5;" (assignment_expression "__ptr[6] = uVar5" (subscript_expression "__ptr[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[7] = uVar5;" (assignment_expression "__ptr[7] = uVar5" (subscript_expression "__ptr[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[8] = uVar5;" (assignment_expression "__ptr[8] = uVar5" (subscript_expression "__ptr[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[9] = uVar5;" (assignment_expression "__ptr[9] = uVar5" (subscript_expression "__ptr[9]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[10] = uVar5;" (assignment_expression "__ptr[10] = uVar5" (subscript_expression "__ptr[10]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[0xb] = uVar5;" (assignment_expression "__ptr[0xb] = uVar5" (subscript_expression "__ptr[0xb]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);" (assignment_expression "iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" identifier = (call_expression "__snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" identifier (argument_list "(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""%s/%s/driver"" " string_content ") , (string_literal ""/sys/bus/usb/devices"" " string_content ") , identifier )))) ;) (if_statement "if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" if (parenthesized_expression "(iVar4 - 1U < 0xfff)" ( (binary_expression "iVar4 - 1U < 0xfff" (binary_expression "iVar4 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }" { (expression_statement "sVar6 = readlink(local_1020,local_2020,0x1000);" (assignment_expression "sVar6 = readlink(local_1020,local_2020,0x1000)" identifier = (call_expression "readlink(local_1020,local_2020,0x1000)" identifier (argument_list "(local_1020,local_2020,0x1000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }" if (parenthesized_expression "(-1 < sVar6)" ( (binary_expression "-1 < sVar6" number_literal < identifier) )) (compound_statement "{\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }" { (if_statement "if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }" if (parenthesized_expression "(sVar6 < 0xfff)" ( (binary_expression "sVar6 < 0xfff" identifier < number_literal) )) (compound_statement "{\n              local_2020[sVar6] = '\0';\n            }" { (expression_statement "local_2020[sVar6] = '\0';" (assignment_expression "local_2020[sVar6] = '\0'" (subscript_expression "local_2020[sVar6]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n              local_2020[0] = '\0';\n            }" else (compound_statement "{\n              local_2020[0] = '\0';\n            }" { (expression_statement "local_2020[0] = '\0';" (assignment_expression "local_2020[0] = '\0'" (subscript_expression "local_2020[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }))) (expression_statement "pcVar7 = strrchr(local_2020,0x2f);" (assignment_expression "pcVar7 = strrchr(local_2020,0x2f)" identifier = (call_expression "strrchr(local_2020,0x2f)" identifier (argument_list "(local_2020,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }" if (parenthesized_expression "(pcVar7 != (char *)0x0)" ( (binary_expression "pcVar7 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }" { (expression_statement "snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);" (call_expression "snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1)" identifier (argument_list "((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1)" ( (cast_expression "(char *)((int)__ptr + 0x12f)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__ptr + 0x12f)" ( (binary_expression "(int)__ptr + 0x12f" (cast_expression "(int)__ptr" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , number_literal , (string_literal ""%s"" " string_content ") , (binary_expression "pcVar7 + 1" identifier + number_literal) ))) ;) })) })) }) (else_clause "else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" else (compound_statement "{\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" { (expression_statement "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);" (call_expression "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4)" identifier (argument_list "(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4)" ( number_literal , (string_literal ""Can not read driver link for \'%s\': %d\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) }))) (expression_statement "puVar1 = PTR_LOOP_000381ec;" (assignment_expression "puVar1 = PTR_LOOP_000381ec" identifier = identifier) ;) (expression_statement "PTR_LOOP_000381ec = (undefined *)__ptr;" (assignment_expression "PTR_LOOP_000381ec = (undefined *)__ptr" identifier = (cast_expression "(undefined *)__ptr" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "*__ptr = &PTR_LOOP_000381e8;" (assignment_expression "*__ptr = &PTR_LOOP_000381e8" (pointer_expression "*__ptr" * identifier) = (pointer_expression "&PTR_LOOP_000381e8" & identifier)) ;) (expression_statement "__ptr[1] = puVar1;" (assignment_expression "__ptr[1] = puVar1" (subscript_expression "__ptr[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined4 **)puVar1 = __ptr;" (assignment_expression "*(undefined4 **)puVar1 = __ptr" (pointer_expression "*(undefined4 **)puVar1" * (cast_expression "(undefined4 **)puVar1" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) }))) })) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_00021500();" (call_expression "FUN_00021500()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 add_usb_interface(char *d_name)\n\n{\n  int iVar1;\n  char *pcVar2;\n  list_head *plVar3;\n  list_head *__ptr;\n  int iVar4;\n  ssize_t sVar5;\n  char *pcVar6;\n  int in_GS_OFFSET;\n  char *pn;\n  char driver [4096];\n  char link [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(d_name,0x3a);\n  plVar3 = (list_head *)strtoul(pcVar2 + 1,&pn,10);\n  pcVar6 = pn;\n  if ((pn != (char *)0x0) && (pn != pcVar2 + 1)) {\n    __ptr = (list_head *)calloc(0x230,1);\n    if (__ptr != (list_head *)0x0) {\n      __ptr[2].next = plVar3;\n      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);\n      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void __regparm3 add_usb_interface(char *d_name)\n\n{\n  int iVar1;\n  char *pcVar2;\n  list_head *plVar3;\n  list_head *__ptr;\n  int iVar4;\n  ssize_t sVar5;\n  char *pcVar6;\n  int in_GS_OFFSET;\n  char *pn;\n  char driver [4096];\n  char link [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(d_name,0x3a);\n  plVar3 = (list_head *)strtoul(pcVar2 + 1,&pn,10);\n  pcVar6 = pn;\n  if ((pn != (char *)0x0) && (pn != pcVar2 + 1)) {\n    __ptr = (list_head *)calloc(0x230,1);\n    if (__ptr != (list_head *)0x0) {\n      __ptr[2].next = plVar3;\n      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);\n      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "add_usb_interface(char *d_name)" identifier (parameter_list "(char *d_name)" ( (parameter_declaration "char *d_name" primitive_type (pointer_declarator "*d_name" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  list_head *plVar3;\n  list_head *__ptr;\n  int iVar4;\n  ssize_t sVar5;\n  char *pcVar6;\n  int in_GS_OFFSET;\n  char *pn;\n  char driver [4096];\n  char link [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(d_name,0x3a);\n  plVar3 = (list_head *)strtoul(pcVar2 + 1,&pn,10);\n  pcVar6 = pn;\n  if ((pn != (char *)0x0) && (pn != pcVar2 + 1)) {\n    __ptr = (list_head *)calloc(0x230,1);\n    if (__ptr != (list_head *)0x0) {\n      __ptr[2].next = plVar3;\n      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);\n      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "list_head *plVar3;" type_identifier (pointer_declarator "*plVar3" * identifier) ;) (declaration "list_head *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "ssize_t sVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *pn;" primitive_type (pointer_declarator "*pn" * identifier) ;) (declaration "char driver [4096];" primitive_type (array_declarator "driver [4096]" identifier [ number_literal ]) ;) (declaration "char link [4096];" primitive_type (array_declarator "link [4096]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = strchr(d_name,0x3a);" (assignment_expression "pcVar2 = strchr(d_name,0x3a)" identifier = (call_expression "strchr(d_name,0x3a)" identifier (argument_list "(d_name,0x3a)" ( identifier , number_literal )))) ;) (expression_statement "plVar3 = (list_head *)strtoul(pcVar2 + 1,&pn,10);" (assignment_expression "plVar3 = (list_head *)strtoul(pcVar2 + 1,&pn,10)" identifier = (cast_expression "(list_head *)strtoul(pcVar2 + 1,&pn,10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "strtoul(pcVar2 + 1,&pn,10)" identifier (argument_list "(pcVar2 + 1,&pn,10)" ( (binary_expression "pcVar2 + 1" identifier + number_literal) , (pointer_expression "&pn" & identifier) , number_literal ))))) ;) (expression_statement "pcVar6 = pn;" (assignment_expression "pcVar6 = pn" identifier = identifier) ;) (if_statement "if ((pn != (char *)0x0) && (pn != pcVar2 + 1)) {\n    __ptr = (list_head *)calloc(0x230,1);\n    if (__ptr != (list_head *)0x0) {\n      __ptr[2].next = plVar3;\n      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);\n      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }\n    }\n  }" if (parenthesized_expression "((pn != (char *)0x0) && (pn != pcVar2 + 1))" ( (binary_expression "(pn != (char *)0x0) && (pn != pcVar2 + 1)" (parenthesized_expression "(pn != (char *)0x0)" ( (binary_expression "pn != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(pn != pcVar2 + 1)" ( (binary_expression "pn != pcVar2 + 1" identifier != (binary_expression "pcVar2 + 1" identifier + number_literal)) ))) )) (compound_statement "{\n    __ptr = (list_head *)calloc(0x230,1);\n    if (__ptr != (list_head *)0x0) {\n      __ptr[2].next = plVar3;\n      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);\n      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }\n    }\n  }" { (expression_statement "__ptr = (list_head *)calloc(0x230,1);" (assignment_expression "__ptr = (list_head *)calloc(0x230,1)" identifier = (cast_expression "(list_head *)calloc(0x230,1)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "calloc(0x230,1)" identifier (argument_list "(0x230,1)" ( number_literal , number_literal ))))) ;) (if_statement "if (__ptr != (list_head *)0x0) {\n      __ptr[2].next = plVar3;\n      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);\n      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }\n    }" if (parenthesized_expression "(__ptr != (list_head *)0x0)" ( (binary_expression "__ptr != (list_head *)0x0" identifier != (cast_expression "(list_head *)0x0" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      __ptr[2].next = plVar3;\n      plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);\n      if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }\n    }" { (expression_statement "__ptr[2].next = plVar3;" (assignment_expression "__ptr[2].next = plVar3" (field_expression "__ptr[2].next" (subscript_expression "__ptr[2]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10);" (assignment_expression "plVar3 = (list_head *)strtoul(pcVar6 + 1,&pn,10)" identifier = (cast_expression "(list_head *)strtoul(pcVar6 + 1,&pn,10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "strtoul(pcVar6 + 1,&pn,10)" identifier (argument_list "(pcVar6 + 1,&pn,10)" ( (binary_expression "pcVar6 + 1" identifier + number_literal) , (pointer_expression "&pn" & identifier) , number_literal ))))) ;) (if_statement "if ((pn == (char *)0x0) || (pn == pcVar6 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }" if (parenthesized_expression "((pn == (char *)0x0) || (pn == pcVar6 + 1))" ( (binary_expression "(pn == (char *)0x0) || (pn == pcVar6 + 1)" (parenthesized_expression "(pn == (char *)0x0)" ( (binary_expression "pn == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(pn == pcVar6 + 1)" ( (binary_expression "pn == pcVar6 + 1" identifier == (binary_expression "pcVar6 + 1" identifier + number_literal)) ))) )) (compound_statement "{\n        free(__ptr);\n      }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }) (else_clause "else {\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }" else (compound_statement "{\n        __ptr[2].prev = plVar3;\n        iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);\n        __ptr[3].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);\n        __ptr[3].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);\n        __ptr[4].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);\n        __ptr[4].prev = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);\n        __ptr[5].next = plVar3;\n        plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);\n        __ptr[5].prev = plVar3;\n        iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);\n        if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }\n        plVar3 = interfacelist.prev;\n        interfacelist.prev = __ptr;\n        __ptr->next = &interfacelist;\n        __ptr->prev = plVar3;\n        plVar3->next = __ptr;\n      }" { (expression_statement "__ptr[2].prev = plVar3;" (assignment_expression "__ptr[2].prev = plVar3" (field_expression "__ptr[2].prev" (subscript_expression "__ptr[2]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name);" (assignment_expression "iVar4 = snprintf((char *)(__ptr + 6),0xff,"%s",d_name)" identifier = (call_expression "snprintf((char *)(__ptr + 6),0xff,"%s",d_name)" identifier (argument_list "((char *)(__ptr + 6),0xff,"%s",d_name)" ( (cast_expression "(char *)(__ptr + 6)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__ptr + 6)" ( (binary_expression "__ptr + 6" identifier + number_literal) ))) , number_literal , (string_literal ""%s"" " string_content ") , identifier )))) ;) (if_statement "if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }" if (parenthesized_expression "(0xfe < iVar4)" ( (binary_expression "0xfe < iVar4" number_literal < identifier) )) (compound_statement "{\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);\n        }" { (expression_statement "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name);" (call_expression "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name)" identifier (argument_list "(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 6,d_name)" ( number_literal , (string_literal ""warning: \'%s\' truncated to \'%s\'\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence ") , (binary_expression "__ptr + 6" identifier + number_literal) , identifier ))) ;) })) (expression_statement "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10);" (assignment_expression "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10)" identifier = (cast_expression "(list_head *)read_sysfs_file_int(d_name,"bAlternateSetting",10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "read_sysfs_file_int(d_name,"bAlternateSetting",10)" identifier (argument_list "(d_name,"bAlternateSetting",10)" ( identifier , (string_literal ""bAlternateSetting"" " string_content ") , number_literal ))))) ;) (expression_statement "__ptr[3].next = plVar3;" (assignment_expression "__ptr[3].next = plVar3" (field_expression "__ptr[3].next" (subscript_expression "__ptr[3]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10);" (assignment_expression "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10)" identifier = (cast_expression "(list_head *)read_sysfs_file_int(d_name,"bInterfaceClass",0x10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "read_sysfs_file_int(d_name,"bInterfaceClass",0x10)" identifier (argument_list "(d_name,"bInterfaceClass",0x10)" ( identifier , (string_literal ""bInterfaceClass"" " string_content ") , number_literal ))))) ;) (expression_statement "__ptr[3].prev = plVar3;" (assignment_expression "__ptr[3].prev = plVar3" (field_expression "__ptr[3].prev" (subscript_expression "__ptr[3]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10);" (assignment_expression "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10)" identifier = (cast_expression "(list_head *)read_sysfs_file_int(d_name,"bInterfaceNumber",0x10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "read_sysfs_file_int(d_name,"bInterfaceNumber",0x10)" identifier (argument_list "(d_name,"bInterfaceNumber",0x10)" ( identifier , (string_literal ""bInterfaceNumber"" " string_content ") , number_literal ))))) ;) (expression_statement "__ptr[4].next = plVar3;" (assignment_expression "__ptr[4].next = plVar3" (field_expression "__ptr[4].next" (subscript_expression "__ptr[4]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10);" (assignment_expression "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10)" identifier = (cast_expression "(list_head *)read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "read_sysfs_file_int(d_name,"bInterfaceProtocol",0x10)" identifier (argument_list "(d_name,"bInterfaceProtocol",0x10)" ( identifier , (string_literal ""bInterfaceProtocol"" " string_content ") , number_literal ))))) ;) (expression_statement "__ptr[4].prev = plVar3;" (assignment_expression "__ptr[4].prev = plVar3" (field_expression "__ptr[4].prev" (subscript_expression "__ptr[4]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10);" (assignment_expression "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10)" identifier = (cast_expression "(list_head *)read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "read_sysfs_file_int(d_name,"bInterfaceSubClass",0x10)" identifier (argument_list "(d_name,"bInterfaceSubClass",0x10)" ( identifier , (string_literal ""bInterfaceSubClass"" " string_content ") , number_literal ))))) ;) (expression_statement "__ptr[5].next = plVar3;" (assignment_expression "__ptr[5].next = plVar3" (field_expression "__ptr[5].next" (subscript_expression "__ptr[5]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10);" (assignment_expression "plVar3 = (list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10)" identifier = (cast_expression "(list_head *)read_sysfs_file_int(d_name,"bNumEndpoints",0x10)" ( (type_descriptor "list_head *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "read_sysfs_file_int(d_name,"bNumEndpoints",0x10)" identifier (argument_list "(d_name,"bNumEndpoints",0x10)" ( identifier , (string_literal ""bNumEndpoints"" " string_content ") , number_literal ))))) ;) (expression_statement "__ptr[5].prev = plVar3;" (assignment_expression "__ptr[5].prev = plVar3" (field_expression "__ptr[5].prev" (subscript_expression "__ptr[5]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);" (assignment_expression "iVar4 = __snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name)" identifier = (call_expression "__snprintf_chk(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name)" identifier (argument_list "(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""%s/%s/driver"" " string_content ") , (string_literal ""/sys/bus/usb/devices"" " string_content ") , identifier )))) ;) (if_statement "if (iVar4 - 1U < 0xfff) {\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }" if (parenthesized_expression "(iVar4 - 1U < 0xfff)" ( (binary_expression "iVar4 - 1U < 0xfff" (binary_expression "iVar4 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n          sVar5 = readlink(link,driver,0x1000);\n          if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }\n        }" { (expression_statement "sVar5 = readlink(link,driver,0x1000);" (assignment_expression "sVar5 = readlink(link,driver,0x1000)" identifier = (call_expression "readlink(link,driver,0x1000)" identifier (argument_list "(link,driver,0x1000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (-1 < sVar5) {\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }" if (parenthesized_expression "(-1 < sVar5)" ( (binary_expression "-1 < sVar5" number_literal < identifier) )) (compound_statement "{\n            if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }\n            pcVar6 = strrchr(driver,0x2f);\n            if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }\n          }" { (if_statement "if (sVar5 < 0xfff) {\n              driver[sVar5] = '\0';\n            }\n            else {\n              driver[0] = '\0';\n            }" if (parenthesized_expression "(sVar5 < 0xfff)" ( (binary_expression "sVar5 < 0xfff" identifier < number_literal) )) (compound_statement "{\n              driver[sVar5] = '\0';\n            }" { (expression_statement "driver[sVar5] = '\0';" (assignment_expression "driver[sVar5] = '\0'" (subscript_expression "driver[sVar5]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n              driver[0] = '\0';\n            }" else (compound_statement "{\n              driver[0] = '\0';\n            }" { (expression_statement "driver[0] = '\0';" (assignment_expression "driver[0] = '\0'" (subscript_expression "driver[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }))) (expression_statement "pcVar6 = strrchr(driver,0x2f);" (assignment_expression "pcVar6 = strrchr(driver,0x2f)" identifier = (call_expression "strrchr(driver,0x2f)" identifier (argument_list "(driver,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar6 != (char *)0x0) {\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }" if (parenthesized_expression "(pcVar6 != (char *)0x0)" ( (binary_expression "pcVar6 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n              snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);\n            }" { (expression_statement "snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1);" (call_expression "snprintf((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1)" identifier (argument_list "((char *)((int)&__ptr[0x25].prev + 3),0xff,"%s",pcVar6 + 1)" ( (cast_expression "(char *)((int)&__ptr[0x25].prev + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&__ptr[0x25].prev + 3)" ( (binary_expression "(int)&__ptr[0x25].prev + 3" (cast_expression "(int)&__ptr[0x25].prev" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&__ptr[0x25].prev" & (field_expression "__ptr[0x25].prev" (subscript_expression "__ptr[0x25]" identifier [ number_literal ]) . field_identifier))) + number_literal) ))) , number_literal , (string_literal ""%s"" " string_content ") , (binary_expression "pcVar6 + 1" identifier + number_literal) ))) ;) })) })) }) (else_clause "else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }" else (compound_statement "{\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);\n        }" { (expression_statement "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4);" (call_expression "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4)" identifier (argument_list "(1,"Can not read driver link for \'%s\': %d\n",d_name,iVar4)" ( number_literal , (string_literal ""Can not read driver link for \'%s\': %d\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) }))) (expression_statement "plVar3 = interfacelist.prev;" (assignment_expression "plVar3 = interfacelist.prev" identifier = (field_expression "interfacelist.prev" identifier . field_identifier)) ;) (expression_statement "interfacelist.prev = __ptr;" (assignment_expression "interfacelist.prev = __ptr" (field_expression "interfacelist.prev" identifier . field_identifier) = identifier) ;) (expression_statement "__ptr->next = &interfacelist;" (assignment_expression "__ptr->next = &interfacelist" (field_expression "__ptr->next" identifier -> field_identifier) = (pointer_expression "&interfacelist" & identifier)) ;) (expression_statement "__ptr->prev = plVar3;" (assignment_expression "__ptr->prev = plVar3" (field_expression "__ptr->prev" identifier -> field_identifier) = identifier) ;) (expression_statement "plVar3->next = __ptr;" (assignment_expression "plVar3->next = __ptr" (field_expression "plVar3->next" identifier -> field_identifier) = identifier) ;) }))) })) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_0001e840(char *param_1)\n\n{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021500();\n}\n\n" (function_definition "void __regparm3 FUN_0001e840(char *param_1)\n\n{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021500();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001e840(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021500();\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "ssize_t sVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_2024;" primitive_type (pointer_declarator "*local_2024" * identifier) ;) (declaration "char local_2020 [4096];" primitive_type (array_declarator "local_2020 [4096]" identifier [ number_literal ]) ;) (declaration "char local_1020 [4096];" primitive_type (array_declarator "local_1020 [4096]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1e84b;" (assignment_expression "uStack_14 = 0x1e84b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = strchr(param_1,0x3a);" (assignment_expression "pcVar2 = strchr(param_1,0x3a)" identifier = (call_expression "strchr(param_1,0x3a)" identifier (argument_list "(param_1,0x3a)" ( identifier , number_literal )))) ;) (expression_statement "uVar3 = strtoul(pcVar2 + 1,&local_2024,10);" (assignment_expression "uVar3 = strtoul(pcVar2 + 1,&local_2024,10)" identifier = (call_expression "strtoul(pcVar2 + 1,&local_2024,10)" identifier (argument_list "(pcVar2 + 1,&local_2024,10)" ( (binary_expression "pcVar2 + 1" identifier + number_literal) , (pointer_expression "&local_2024" & identifier) , number_literal )))) ;) (expression_statement "pcVar7 = local_2024;" (assignment_expression "pcVar7 = local_2024" identifier = identifier) ;) (if_statement "if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }" if (parenthesized_expression "((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1))" ( (binary_expression "(local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)" (parenthesized_expression "(local_2024 != (char *)0x0)" ( (binary_expression "local_2024 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(local_2024 != pcVar2 + 1)" ( (binary_expression "local_2024 != pcVar2 + 1" identifier != (binary_expression "pcVar2 + 1" identifier + number_literal)) ))) )) (compound_statement "{\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }" { (expression_statement "__ptr = (undefined4 *)calloc(0x230,1);" (assignment_expression "__ptr = (undefined4 *)calloc(0x230,1)" identifier = (cast_expression "(undefined4 *)calloc(0x230,1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "calloc(0x230,1)" identifier (argument_list "(0x230,1)" ( number_literal , number_literal ))))) ;) (if_statement "if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }" if (parenthesized_expression "(__ptr != (undefined4 *)0x0)" ( (binary_expression "__ptr != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }" { (expression_statement "__ptr[4] = uVar3;" (assignment_expression "__ptr[4] = uVar3" (subscript_expression "__ptr[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar3 = strtoul(pcVar7 + 1,&local_2024,10);" (assignment_expression "uVar3 = strtoul(pcVar7 + 1,&local_2024,10)" identifier = (call_expression "strtoul(pcVar7 + 1,&local_2024,10)" identifier (argument_list "(pcVar7 + 1,&local_2024,10)" ( (binary_expression "pcVar7 + 1" identifier + number_literal) , (pointer_expression "&local_2024" & identifier) , number_literal )))) ;) (if_statement "if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" if (parenthesized_expression "((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1))" ( (binary_expression "(local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)" (parenthesized_expression "(local_2024 == (char *)0x0)" ( (binary_expression "local_2024 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(local_2024 == pcVar7 + 1)" ( (binary_expression "local_2024 == pcVar7 + 1" identifier == (binary_expression "pcVar7 + 1" identifier + number_literal)) ))) )) (compound_statement "{\n        free(__ptr);\n      }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }) (else_clause "else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" else (compound_statement "{\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" { (expression_statement "__ptr[5] = uVar3;" (assignment_expression "__ptr[5] = uVar3" (subscript_expression "__ptr[5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);" (assignment_expression "iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1)" identifier = (call_expression "snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1)" identifier (argument_list "((char *)(__ptr + 0xc),0xff,"%s",param_1)" ( (cast_expression "(char *)(__ptr + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__ptr + 0xc)" ( (binary_expression "__ptr + 0xc" identifier + number_literal) ))) , number_literal , (string_literal ""%s"" " string_content ") , identifier )))) ;) (if_statement "if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }" if (parenthesized_expression "(0xfe < iVar4)" ( (binary_expression "0xfe < iVar4" number_literal < identifier) )) (compound_statement "{\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }" { (expression_statement "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);" (call_expression "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1)" identifier (argument_list "(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1)" ( number_literal , (string_literal ""warning: \'%s\' truncated to \'%s\'\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence ") , (binary_expression "__ptr + 0xc" identifier + number_literal) , identifier ))) ;) })) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[6] = uVar5;" (assignment_expression "__ptr[6] = uVar5" (subscript_expression "__ptr[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[7] = uVar5;" (assignment_expression "__ptr[7] = uVar5" (subscript_expression "__ptr[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[8] = uVar5;" (assignment_expression "__ptr[8] = uVar5" (subscript_expression "__ptr[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[9] = uVar5;" (assignment_expression "__ptr[9] = uVar5" (subscript_expression "__ptr[9]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[10] = uVar5;" (assignment_expression "__ptr[10] = uVar5" (subscript_expression "__ptr[10]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" identifier = (call_expression "FUN_0001e740()" identifier (argument_list "()" ( )))) ;) (expression_statement "__ptr[0xb] = uVar5;" (assignment_expression "__ptr[0xb] = uVar5" (subscript_expression "__ptr[0xb]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);" (assignment_expression "iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" identifier = (call_expression "__snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" identifier (argument_list "(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""%s/%s/driver"" " string_content ") , (string_literal ""/sys/bus/usb/devices"" " string_content ") , identifier )))) ;) (if_statement "if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" if (parenthesized_expression "(iVar4 - 1U < 0xfff)" ( (binary_expression "iVar4 - 1U < 0xfff" (binary_expression "iVar4 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }" { (expression_statement "sVar6 = readlink(local_1020,local_2020,0x1000);" (assignment_expression "sVar6 = readlink(local_1020,local_2020,0x1000)" identifier = (call_expression "readlink(local_1020,local_2020,0x1000)" identifier (argument_list "(local_1020,local_2020,0x1000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }" if (parenthesized_expression "(-1 < sVar6)" ( (binary_expression "-1 < sVar6" number_literal < identifier) )) (compound_statement "{\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }" { (if_statement "if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }" if (parenthesized_expression "(sVar6 < 0xfff)" ( (binary_expression "sVar6 < 0xfff" identifier < number_literal) )) (compound_statement "{\n              local_2020[sVar6] = '\0';\n            }" { (expression_statement "local_2020[sVar6] = '\0';" (assignment_expression "local_2020[sVar6] = '\0'" (subscript_expression "local_2020[sVar6]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n              local_2020[0] = '\0';\n            }" else (compound_statement "{\n              local_2020[0] = '\0';\n            }" { (expression_statement "local_2020[0] = '\0';" (assignment_expression "local_2020[0] = '\0'" (subscript_expression "local_2020[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }))) (expression_statement "pcVar7 = strrchr(local_2020,0x2f);" (assignment_expression "pcVar7 = strrchr(local_2020,0x2f)" identifier = (call_expression "strrchr(local_2020,0x2f)" identifier (argument_list "(local_2020,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }" if (parenthesized_expression "(pcVar7 != (char *)0x0)" ( (binary_expression "pcVar7 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }" { (expression_statement "snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);" (call_expression "snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1)" identifier (argument_list "((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1)" ( (cast_expression "(char *)((int)__ptr + 0x12f)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__ptr + 0x12f)" ( (binary_expression "(int)__ptr + 0x12f" (cast_expression "(int)__ptr" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , number_literal , (string_literal ""%s"" " string_content ") , (binary_expression "pcVar7 + 1" identifier + number_literal) ))) ;) })) })) }) (else_clause "else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" else (compound_statement "{\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" { (expression_statement "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);" (call_expression "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4)" identifier (argument_list "(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4)" ( number_literal , (string_literal ""Can not read driver link for \'%s\': %d\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) }))) (expression_statement "puVar1 = PTR_LOOP_000381ec;" (assignment_expression "puVar1 = PTR_LOOP_000381ec" identifier = identifier) ;) (expression_statement "PTR_LOOP_000381ec = (undefined *)__ptr;" (assignment_expression "PTR_LOOP_000381ec = (undefined *)__ptr" identifier = (cast_expression "(undefined *)__ptr" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "*__ptr = &PTR_LOOP_000381e8;" (assignment_expression "*__ptr = &PTR_LOOP_000381e8" (pointer_expression "*__ptr" * identifier) = (pointer_expression "&PTR_LOOP_000381e8" & identifier)) ;) (expression_statement "__ptr[1] = puVar1;" (assignment_expression "__ptr[1] = puVar1" (subscript_expression "__ptr[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined4 **)puVar1 = __ptr;" (assignment_expression "*(undefined4 **)puVar1 = __ptr" (pointer_expression "*(undefined4 **)puVar1" * (cast_expression "(undefined4 **)puVar1" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) }))) })) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00021500();" (call_expression "FUN_00021500()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (pointer_expression & IDENT) , LIT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (pointer_expression & IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression IDENT == (binary_expression IDENT + LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , LIT , (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence ") , (binary_expression IDENT + LIT) , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (string_literal " string_content ") , (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' escape_sequence ')) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))) , LIT , (string_literal " string_content ") , (binary_expression IDENT + LIT) ))) ;) })) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , IDENT , IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) = IDENT) ;) }))) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_0001e840(char *param_1)\n\n{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021500();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001e840(char *param_1)" (identifier "FUN_0001e840") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  char *pcVar2;\n  ulong uVar3;\n  undefined4 *__ptr;\n  int iVar4;\n  undefined4 uVar5;\n  ssize_t sVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char *local_2024;\n  char local_2020 [4096];\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e84b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = strchr(param_1,0x3a);\n  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);\n  pcVar7 = local_2024;\n  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021500();\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "undefined4 *__ptr;" (type_identifier "undefined4") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "ssize_t sVar6;" (primitive_type "ssize_t") (identifier "sVar6") (; ";")) (declaration "char *pcVar7;" (primitive_type "char") (pointer_declarator "*pcVar7" (* "*") (identifier "pcVar7")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *local_2024;" (primitive_type "char") (pointer_declarator "*local_2024" (* "*") (identifier "local_2024")) (; ";")) (declaration "char local_2020 [4096];" (primitive_type "char") (array_declarator "local_2020 [4096]" (identifier "local_2020") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "char local_1020 [4096];" (primitive_type "char") (array_declarator "local_1020 [4096]" (identifier "local_1020") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1e84b;" (assignment_expression "uStack_14 = 0x1e84b" (identifier "uStack_14") (= "=") (number_literal "0x1e84b")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "pcVar2 = strchr(param_1,0x3a);" (assignment_expression "pcVar2 = strchr(param_1,0x3a)" (identifier "pcVar2") (= "=") (call_expression "strchr(param_1,0x3a)" (identifier "strchr") (argument_list "(param_1,0x3a)" (( "(") (identifier "param_1") (, ",") (number_literal "0x3a") () ")")))) (; ";")) (expression_statement "uVar3 = strtoul(pcVar2 + 1,&local_2024,10);" (assignment_expression "uVar3 = strtoul(pcVar2 + 1,&local_2024,10)" (identifier "uVar3") (= "=") (call_expression "strtoul(pcVar2 + 1,&local_2024,10)" (identifier "strtoul") (argument_list "(pcVar2 + 1,&local_2024,10)" (( "(") (binary_expression "pcVar2 + 1" (identifier "pcVar2") (+ "+") (number_literal "1")) (, ",") (pointer_expression "&local_2024" (& "&") (identifier "local_2024")) (, ",") (number_literal "10") () ")")))) (; ";")) (expression_statement "pcVar7 = local_2024;" (assignment_expression "pcVar7 = local_2024" (identifier "pcVar7") (= "=") (identifier "local_2024")) (; ";")) (if_statement "if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1))" (( "(") (binary_expression "(local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)" (parenthesized_expression "(local_2024 != (char *)0x0)" (( "(") (binary_expression "local_2024 != (char *)0x0" (identifier "local_2024") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(local_2024 != pcVar2 + 1)" (( "(") (binary_expression "local_2024 != pcVar2 + 1" (identifier "local_2024") (!= "!=") (binary_expression "pcVar2 + 1" (identifier "pcVar2") (+ "+") (number_literal "1"))) () ")"))) () ")")) (compound_statement "{\n    __ptr = (undefined4 *)calloc(0x230,1);\n    if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }\n  }" ({ "{") (expression_statement "__ptr = (undefined4 *)calloc(0x230,1);" (assignment_expression "__ptr = (undefined4 *)calloc(0x230,1)" (identifier "__ptr") (= "=") (cast_expression "(undefined4 *)calloc(0x230,1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "calloc(0x230,1)" (identifier "calloc") (argument_list "(0x230,1)" (( "(") (number_literal "0x230") (, ",") (number_literal "1") () ")"))))) (; ";")) (if_statement "if (__ptr != (undefined4 *)0x0) {\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }" (if "if") (parenthesized_expression "(__ptr != (undefined4 *)0x0)" (( "(") (binary_expression "__ptr != (undefined4 *)0x0" (identifier "__ptr") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      __ptr[4] = uVar3;\n      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);\n      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }\n    }" ({ "{") (expression_statement "__ptr[4] = uVar3;" (assignment_expression "__ptr[4] = uVar3" (subscript_expression "__ptr[4]" (identifier "__ptr") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "uVar3 = strtoul(pcVar7 + 1,&local_2024,10);" (assignment_expression "uVar3 = strtoul(pcVar7 + 1,&local_2024,10)" (identifier "uVar3") (= "=") (call_expression "strtoul(pcVar7 + 1,&local_2024,10)" (identifier "strtoul") (argument_list "(pcVar7 + 1,&local_2024,10)" (( "(") (binary_expression "pcVar7 + 1" (identifier "pcVar7") (+ "+") (number_literal "1")) (, ",") (pointer_expression "&local_2024" (& "&") (identifier "local_2024")) (, ",") (number_literal "10") () ")")))) (; ";")) (if_statement "if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {\n        free(__ptr);\n      }\n      else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" (if "if") (parenthesized_expression "((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1))" (( "(") (binary_expression "(local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)" (parenthesized_expression "(local_2024 == (char *)0x0)" (( "(") (binary_expression "local_2024 == (char *)0x0" (identifier "local_2024") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(local_2024 == pcVar7 + 1)" (( "(") (binary_expression "local_2024 == pcVar7 + 1" (identifier "local_2024") (== "==") (binary_expression "pcVar7 + 1" (identifier "pcVar7") (+ "+") (number_literal "1"))) () ")"))) () ")")) (compound_statement "{\n        free(__ptr);\n      }" ({ "{") (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (} "}")) (else_clause "else {\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" (else "else") (compound_statement "{\n        __ptr[5] = uVar3;\n        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);\n        if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }\n        uVar5 = FUN_0001e740();\n        __ptr[6] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[7] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[8] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[9] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[10] = uVar5;\n        uVar5 = FUN_0001e740();\n        __ptr[0xb] = uVar5;\n        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);\n        if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }\n        puVar1 = PTR_LOOP_000381ec;\n        PTR_LOOP_000381ec = (undefined *)__ptr;\n        *__ptr = &PTR_LOOP_000381e8;\n        __ptr[1] = puVar1;\n        *(undefined4 **)puVar1 = __ptr;\n      }" ({ "{") (expression_statement "__ptr[5] = uVar3;" (assignment_expression "__ptr[5] = uVar3" (subscript_expression "__ptr[5]" (identifier "__ptr") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);" (assignment_expression "iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1)" (identifier "iVar4") (= "=") (call_expression "snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1)" (identifier "snprintf") (argument_list "((char *)(__ptr + 0xc),0xff,"%s",param_1)" (( "(") (cast_expression "(char *)(__ptr + 0xc)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__ptr + 0xc)" (( "(") (binary_expression "__ptr + 0xc" (identifier "__ptr") (+ "+") (number_literal "0xc")) () ")"))) (, ",") (number_literal "0xff") (, ",") (string_literal ""%s"" (" """) (string_content "%s") (" """)) (, ",") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (0xfe < iVar4) {\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }" (if "if") (parenthesized_expression "(0xfe < iVar4)" (( "(") (binary_expression "0xfe < iVar4" (number_literal "0xfe") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);\n        }" ({ "{") (expression_statement "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);" (call_expression "__printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1)" (identifier "__printf_chk") (argument_list "(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1)" (( "(") (number_literal "1") (, ",") (string_literal ""warning: \'%s\' truncated to \'%s\'\n"" (" """) (string_content "warning: ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content " truncated to ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (escape_sequence "\n") (" """)) (, ",") (binary_expression "__ptr + 0xc" (identifier "__ptr") (+ "+") (number_literal "0xc")) (, ",") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" (identifier "uVar5") (= "=") (call_expression "FUN_0001e740()" (identifier "FUN_0001e740") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__ptr[6] = uVar5;" (assignment_expression "__ptr[6] = uVar5" (subscript_expression "__ptr[6]" (identifier "__ptr") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" (identifier "uVar5") (= "=") (call_expression "FUN_0001e740()" (identifier "FUN_0001e740") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__ptr[7] = uVar5;" (assignment_expression "__ptr[7] = uVar5" (subscript_expression "__ptr[7]" (identifier "__ptr") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" (identifier "uVar5") (= "=") (call_expression "FUN_0001e740()" (identifier "FUN_0001e740") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__ptr[8] = uVar5;" (assignment_expression "__ptr[8] = uVar5" (subscript_expression "__ptr[8]" (identifier "__ptr") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" (identifier "uVar5") (= "=") (call_expression "FUN_0001e740()" (identifier "FUN_0001e740") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__ptr[9] = uVar5;" (assignment_expression "__ptr[9] = uVar5" (subscript_expression "__ptr[9]" (identifier "__ptr") ([ "[") (number_literal "9") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" (identifier "uVar5") (= "=") (call_expression "FUN_0001e740()" (identifier "FUN_0001e740") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__ptr[10] = uVar5;" (assignment_expression "__ptr[10] = uVar5" (subscript_expression "__ptr[10]" (identifier "__ptr") ([ "[") (number_literal "10") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0001e740();" (assignment_expression "uVar5 = FUN_0001e740()" (identifier "uVar5") (= "=") (call_expression "FUN_0001e740()" (identifier "FUN_0001e740") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__ptr[0xb] = uVar5;" (assignment_expression "__ptr[0xb] = uVar5" (subscript_expression "__ptr[0xb]" (identifier "__ptr") ([ "[") (number_literal "0xb") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1);" (assignment_expression "iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" (identifier "iVar4") (= "=") (call_expression "__snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" (identifier "__snprintf_chk") (argument_list "(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",\n                               param_1)" (( "(") (identifier "local_1020") (, ",") (number_literal "0x1000") (, ",") (number_literal "1") (, ",") (number_literal "0x1000") (, ",") (string_literal ""%s/%s/driver"" (" """) (string_content "%s/%s/driver") (" """)) (, ",") (string_literal ""/sys/bus/usb/devices"" (" """) (string_content "/sys/bus/usb/devices") (" """)) (, ",") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar4 - 1U < 0xfff) {\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }\n        else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" (if "if") (parenthesized_expression "(iVar4 - 1U < 0xfff)" (( "(") (binary_expression "iVar4 - 1U < 0xfff" (binary_expression "iVar4 - 1U" (identifier "iVar4") (- "-") (number_literal "1U")) (< "<") (number_literal "0xfff")) () ")")) (compound_statement "{\n          sVar6 = readlink(local_1020,local_2020,0x1000);\n          if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }\n        }" ({ "{") (expression_statement "sVar6 = readlink(local_1020,local_2020,0x1000);" (assignment_expression "sVar6 = readlink(local_1020,local_2020,0x1000)" (identifier "sVar6") (= "=") (call_expression "readlink(local_1020,local_2020,0x1000)" (identifier "readlink") (argument_list "(local_1020,local_2020,0x1000)" (( "(") (identifier "local_1020") (, ",") (identifier "local_2020") (, ",") (number_literal "0x1000") () ")")))) (; ";")) (if_statement "if (-1 < sVar6) {\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }" (if "if") (parenthesized_expression "(-1 < sVar6)" (( "(") (binary_expression "-1 < sVar6" (number_literal "-1") (< "<") (identifier "sVar6")) () ")")) (compound_statement "{\n            if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }\n            pcVar7 = strrchr(local_2020,0x2f);\n            if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }\n          }" ({ "{") (if_statement "if (sVar6 < 0xfff) {\n              local_2020[sVar6] = '\0';\n            }\n            else {\n              local_2020[0] = '\0';\n            }" (if "if") (parenthesized_expression "(sVar6 < 0xfff)" (( "(") (binary_expression "sVar6 < 0xfff" (identifier "sVar6") (< "<") (number_literal "0xfff")) () ")")) (compound_statement "{\n              local_2020[sVar6] = '\0';\n            }" ({ "{") (expression_statement "local_2020[sVar6] = '\0';" (assignment_expression "local_2020[sVar6] = '\0'" (subscript_expression "local_2020[sVar6]" (identifier "local_2020") ([ "[") (identifier "sVar6") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}")) (else_clause "else {\n              local_2020[0] = '\0';\n            }" (else "else") (compound_statement "{\n              local_2020[0] = '\0';\n            }" ({ "{") (expression_statement "local_2020[0] = '\0';" (assignment_expression "local_2020[0] = '\0'" (subscript_expression "local_2020[0]" (identifier "local_2020") ([ "[") (number_literal "0") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}")))) (expression_statement "pcVar7 = strrchr(local_2020,0x2f);" (assignment_expression "pcVar7 = strrchr(local_2020,0x2f)" (identifier "pcVar7") (= "=") (call_expression "strrchr(local_2020,0x2f)" (identifier "strrchr") (argument_list "(local_2020,0x2f)" (( "(") (identifier "local_2020") (, ",") (number_literal "0x2f") () ")")))) (; ";")) (if_statement "if (pcVar7 != (char *)0x0) {\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }" (if "if") (parenthesized_expression "(pcVar7 != (char *)0x0)" (( "(") (binary_expression "pcVar7 != (char *)0x0" (identifier "pcVar7") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);\n            }" ({ "{") (expression_statement "snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);" (call_expression "snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1)" (identifier "snprintf") (argument_list "((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1)" (( "(") (cast_expression "(char *)((int)__ptr + 0x12f)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__ptr + 0x12f)" (( "(") (binary_expression "(int)__ptr + 0x12f" (cast_expression "(int)__ptr" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__ptr")) (+ "+") (number_literal "0x12f")) () ")"))) (, ",") (number_literal "0xff") (, ",") (string_literal ""%s"" (" """) (string_content "%s") (" """)) (, ",") (binary_expression "pcVar7 + 1" (identifier "pcVar7") (+ "+") (number_literal "1")) () ")"))) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" (else "else") (compound_statement "{\n          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);\n        }" ({ "{") (expression_statement "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);" (call_expression "__printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4)" (identifier "__printf_chk") (argument_list "(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4)" (( "(") (number_literal "1") (, ",") (string_literal ""Can not read driver link for \'%s\': %d\n"" (" """) (string_content "Can not read driver link for ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content ": %d") (escape_sequence "\n") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "iVar4") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar1 = PTR_LOOP_000381ec;" (assignment_expression "puVar1 = PTR_LOOP_000381ec" (identifier "puVar1") (= "=") (identifier "PTR_LOOP_000381ec")) (; ";")) (expression_statement "PTR_LOOP_000381ec = (undefined *)__ptr;" (assignment_expression "PTR_LOOP_000381ec = (undefined *)__ptr" (identifier "PTR_LOOP_000381ec") (= "=") (cast_expression "(undefined *)__ptr" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "__ptr"))) (; ";")) (expression_statement "*__ptr = &PTR_LOOP_000381e8;" (assignment_expression "*__ptr = &PTR_LOOP_000381e8" (pointer_expression "*__ptr" (* "*") (identifier "__ptr")) (= "=") (pointer_expression "&PTR_LOOP_000381e8" (& "&") (identifier "PTR_LOOP_000381e8"))) (; ";")) (expression_statement "__ptr[1] = puVar1;" (assignment_expression "__ptr[1] = puVar1" (subscript_expression "__ptr[1]" (identifier "__ptr") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "puVar1")) (; ";")) (expression_statement "*(undefined4 **)puVar1 = __ptr;" (assignment_expression "*(undefined4 **)puVar1 = __ptr" (pointer_expression "*(undefined4 **)puVar1" (* "*") (cast_expression "(undefined4 **)puVar1" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "puVar1"))) (= "=") (identifier "__ptr")) (; ";")) (} "}")))) (} "}"))) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00021500();" (call_expression "FUN_00021500()" (identifier "FUN_00021500") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void __regparm3 function_1(char *d_name)

{
  int var_18;
  char *var_4;
  type_1 *plVar3;
  type_1 *var_7;
  int var_11;
  ssize_t var_16;
  char *var_8;
  int var_1;
  char *var_5;
  char driver [4096];
  char link [4096];
  
  var_18 = *(int *)(var_1 + 0x14);
  var_4 = var_2(d_name,0x3a);
  plVar3 = (type_1 *)var_3(var_4 + 1,&var_5,10);
  var_8 = var_5;
  if ((var_5 != (char *)0x0) && (var_5 != var_4 + 1)) {
    var_7 = (type_1 *)var_6(0x230,1);
    if (var_7 != (type_1 *)0x0) {
      var_7[2].next = plVar3;
      plVar3 = (type_1 *)var_3(var_8 + 1,&var_5,10);
      if ((var_5 == (char *)0x0) || (var_5 == var_8 + 1)) {
        var_9(var_7);
      }
      else {
        var_7[2].prev = plVar3;
        var_11 = var_10((char *)(var_7 + 6),0xff,"%s",d_name);
        if (0xfe < var_11) {
          var_12(1,"warning: \'%s\' truncated to \'%s\'\n",var_7 + 6,d_name);
        }
        plVar3 = (type_1 *)var_13(d_name,"bAlternateSetting",10);
        var_7[3].next = plVar3;
        plVar3 = (type_1 *)var_13(d_name,"bInterfaceClass",0x10);
        var_7[3].prev = plVar3;
        plVar3 = (type_1 *)var_13(d_name,"bInterfaceNumber",0x10);
        var_7[4].next = plVar3;
        plVar3 = (type_1 *)var_13(d_name,"bInterfaceProtocol",0x10);
        var_7[4].prev = plVar3;
        plVar3 = (type_1 *)var_13(d_name,"bInterfaceSubClass",0x10);
        var_7[5].next = plVar3;
        plVar3 = (type_1 *)var_13(d_name,"bNumEndpoints",0x10);
        var_7[5].prev = plVar3;
        var_11 = var_14(link,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",d_name);
        if (var_11 - 1U < 0xfff) {
          var_16 = var_15(link,driver,0x1000);
          if (-1 < var_16) {
            if (var_16 < 0xfff) {
              driver[var_16] = '\0';
            }
            else {
              driver[0] = '\0';
            }
            var_8 = var_17(driver,0x2f);
            if (var_8 != (char *)0x0) {
              var_10((char *)((int)&var_7[0x25].prev + 3),0xff,"%s",var_8 + 1);
            }
          }
        }
        else {
          var_12(1,"Can not read driver link for \'%s\': %d\n",d_name,var_11);
        }
        plVar3 = interfacelist.prev;
        interfacelist.prev = var_7;
        var_7->next = &interfacelist;
        var_7->prev = plVar3;
        plVar3->next = var_7;
      }
    }
  }
  if (var_18 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_19();
}


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

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

void __regparm3 MASKED(char *param_1)

{
  undefined *puVar1;
  char *pcVar2;
  ulong uVar3;
  undefined4 *__ptr;
  int iVar4;
  undefined4 uVar5;
  ssize_t sVar6;
  char *pcVar7;
  int in_GS_OFFSET;
  char *local_2024;
  char local_2020 [4096];
  char local_1020 [4096];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1e84b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar2 = strchr(param_1,0x3a);
  uVar3 = strtoul(pcVar2 + 1,&local_2024,10);
  pcVar7 = local_2024;
  if ((local_2024 != (char *)0x0) && (local_2024 != pcVar2 + 1)) {
    __ptr = (undefined4 *)calloc(0x230,1);
    if (__ptr != (undefined4 *)0x0) {
      __ptr[4] = uVar3;
      uVar3 = strtoul(pcVar7 + 1,&local_2024,10);
      if ((local_2024 == (char *)0x0) || (local_2024 == pcVar7 + 1)) {
        free(__ptr);
      }
      else {
        __ptr[5] = uVar3;
        iVar4 = snprintf((char *)(__ptr + 0xc),0xff,"%s",param_1);
        if (0xfe < iVar4) {
          __printf_chk(1,"warning: \'%s\' truncated to \'%s\'\n",__ptr + 0xc,param_1);
        }
        uVar5 = FUN_0001e740();
        __ptr[6] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[7] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[8] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[9] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[10] = uVar5;
        uVar5 = FUN_0001e740();
        __ptr[0xb] = uVar5;
        iVar4 = __snprintf_chk(local_1020,0x1000,1,0x1000,"%s/%s/driver","/sys/bus/usb/devices",
                               param_1);
        if (iVar4 - 1U < 0xfff) {
          sVar6 = readlink(local_1020,local_2020,0x1000);
          if (-1 < sVar6) {
            if (sVar6 < 0xfff) {
              local_2020[sVar6] = '\0';
            }
            else {
              local_2020[0] = '\0';
            }
            pcVar7 = strrchr(local_2020,0x2f);
            if (pcVar7 != (char *)0x0) {
              snprintf((char *)((int)__ptr + 0x12f),0xff,"%s",pcVar7 + 1);
            }
          }
        }
        else {
          __printf_chk(1,"Can not read driver link for \'%s\': %d\n",param_1,iVar4);
        }
        puVar1 = PTR_LOOP_000381ec;
        PTR_LOOP_000381ec = (undefined *)__ptr;
        *__ptr = &PTR_LOOP_000381e8;
        __ptr[1] = puVar1;
        *(undefined4 **)puVar1 = __ptr;
      }
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00021500();
}

