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

char * bash_servicename_completion_function(char *text,int state)

{
  char cVar1;
  char *pcVar2;
  int __n;
  size_t sVar3;
  char *pcVar4;
  servent *psVar5;
  int iVar6;
  char **ppcVar7;
  
  if (state == 0) {
    if (bash_servicename_completion_function::sname != (char *)0x0) {
      free(bash_servicename_completion_function::sname);
    }
    sVar3 = strlen(text);
    pcVar4 = (char *)xmalloc(sVar3 + 1);
    bash_servicename_completion_function::sname = strcpy(pcVar4,text);
    bash_servicename_completion_function::snamelen =
         strlen(bash_servicename_completion_function::sname);
    setservent(0);
  }
  while( true ) {
    psVar5 = getservent();
    pcVar4 = bash_servicename_completion_function::sname;
    __n = bash_servicename_completion_function::snamelen;
    if (psVar5 == (servent *)0x0) {
      endservent();
      return (char *)0x0;
    }
    pcVar2 = psVar5->s_name;
    if ((bash_servicename_completion_function::snamelen == 0) ||
       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&
        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,
                         bash_servicename_completion_function::snamelen), iVar6 == 0)))) break;
    ppcVar7 = psVar5->s_aliases;
    pcVar2 = *ppcVar7;
    while (pcVar2 != (char *)0x0) {
      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {
        sVar3 = strlen(pcVar2);
        pcVar4 = (char *)xmalloc(sVar3 + 1);
        pcVar4 = strcpy(pcVar4,pcVar2);
        return pcVar4;
      }
      ppcVar7 = ppcVar7 + 1;
      pcVar2 = *ppcVar7;
    }
  }
  sVar3 = strlen(pcVar2);
  pcVar4 = (char *)xmalloc(sVar3 + 1);
  pcVar4 = strcpy(pcVar4,pcVar2);
  return pcVar4;
}



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

char * bash_servicename_completion_function(char *param_1,int param_2)

{
  char cVar1;
  char *pcVar2;
  size_t sVar3;
  char *pcVar4;
  servent *psVar5;
  int iVar6;
  char **ppcVar7;
  
  if (param_2 == 0) {
    if (DAT_00151420 != (char *)0x0) {
      free(DAT_00151420);
    }
    sVar3 = strlen(param_1);
    pcVar4 = (char *)xmalloc(sVar3 + 1);
    DAT_00151420 = strcpy(pcVar4,param_1);
    DAT_0015141c = strlen(DAT_00151420);
    setservent(0);
  }
  while( true ) {
    psVar5 = getservent();
    pcVar4 = DAT_00151420;
    sVar3 = DAT_0015141c;
    if (psVar5 == (servent *)0x0) {
      endservent();
      return (char *)0x0;
    }
    pcVar2 = psVar5->s_name;
    if ((DAT_0015141c == 0) ||
       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&
        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;
    ppcVar7 = psVar5->s_aliases;
    pcVar2 = *ppcVar7;
    while (pcVar2 != (char *)0x0) {
      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {
        sVar3 = strlen(pcVar2);
        pcVar4 = (char *)xmalloc(sVar3 + 1);
        pcVar4 = strcpy(pcVar4,pcVar2);
        return pcVar4;
      }
      ppcVar7 = ppcVar7 + 1;
      pcVar2 = *ppcVar7;
    }
  }
  sVar3 = strlen(pcVar2);
  pcVar4 = (char *)xmalloc(sVar3 + 1);
  pcVar4 = strcpy(pcVar4,pcVar2);
  return pcVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0xb8f67
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x34]
MOV ESI,dword ptr [ESP + 0x30]
TEST EDI,EDI
JNZ 0x00091108
MOV EAX,dword ptr [EBX + 0x7420]
TEST EAX,EAX
JZ 0x000910c4
SUB ESP,0xc
PUSH EAX
CALL 0x0002f200
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP EDX
POP ECX
PUSH ESI
PUSH EAX
CALL 0x0002f580
MOV dword ptr [ESP],EAX
MOV dword ptr [EBX + 0x7420],EAX
CALL 0x0002f760
MOV dword ptr [ESP],0x0
MOV dword ptr [EBX + 0x741c],EAX
CALL 0x0002f860
ADD ESP,0x10
LEA ESI,[ESI]
CALL 0x0002f450
MOV ESI,EAX
TEST EAX,EAX
JZ 0x000911fe
MOV EDI,dword ptr [EBX + 0x741c]
MOV EDX,dword ptr [ESI]
TEST EDI,EDI
JZ 0x000911ca
MOV EAX,dword ptr [EBX + 0x7420]
MOV dword ptr [ESP + 0x8],EAX
MOVZX ECX,byte ptr [EAX]
CMP CL,byte ptr [EDX]
JZ 0x000911a0
MOV EBP,dword ptr [ESI + 0x4]
MOV ESI,dword ptr [EBP]
TEST ESI,ESI
JNZ 0x00091152
JMP 0x00091108
ADD EBP,0x4
MOV ESI,dword ptr [EBP]
TEST ESI,ESI
JZ 0x00091108
CMP CL,byte ptr [ESI]
JNZ 0x00091148
MOV byte ptr [ESP + 0x4],CL
SUB ESP,0x4
PUSH EDI
PUSH ESI
PUSH dword ptr [ESP + 0x14]
CALL 0x0002fc30
ADD ESP,0x10
MOVZX ECX,byte ptr [ESP + 0x4]
TEST EAX,EAX
JNZ 0x00091148
SUB ESP,0xc
PUSH ESI
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP EDI
POP EBP
PUSH ESI
PUSH EAX
CALL 0x0002f580
ADD ESP,0x10
ADD ESP,0x1c
MOV ESI,EAX
POP EBX
MOV EAX,ESI
POP ESI
POP EDI
POP EBP
RET
MOV byte ptr [ESP + 0xf],CL
SUB ESP,0x4
PUSH EDI
PUSH EDX
MOV dword ptr [ESP + 0x10],EDX
PUSH dword ptr [ESP + 0x14]
CALL 0x0002fc30
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x4]
MOVZX ECX,byte ptr [ESP + 0xf]
TEST EAX,EAX
JNZ 0x00091138
SUB ESP,0xc
PUSH EDX
MOV dword ptr [ESP + 0x14],EDX
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP EDX
POP ECX
MOV EDX,dword ptr [ESP + 0xc]
PUSH EDX
PUSH EAX
CALL 0x0002f580
ADD ESP,0x10
ADD ESP,0x1c
MOV ESI,EAX
POP EBX
MOV EAX,ESI
POP ESI
POP EDI
POP EBP
RET
CALL 0x0002fd90
ADD ESP,0x1c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * bash_servicename_completion_function(char *param_1,int param_2)\n\n{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}\n\n" comment (function_definition "char * bash_servicename_completion_function(char *param_1,int param_2)\n\n{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" primitive_type (pointer_declarator "* bash_servicename_completion_function(char *param_1,int param_2)" * (function_declarator "bash_servicename_completion_function(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "servent *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char **ppcVar7;" primitive_type (pointer_declarator "**ppcVar7" * (pointer_declarator "*ppcVar7" * identifier)) ;) (if_statement "if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }" { (if_statement "if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }" if (parenthesized_expression "(DAT_00151420 != (char *)0x0)" ( (binary_expression "DAT_00151420 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(DAT_00151420);\n    }" { (expression_statement "free(DAT_00151420);" (call_expression "free(DAT_00151420)" identifier (argument_list "(DAT_00151420)" ( identifier ))) ;) })) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "DAT_00151420 = strcpy(pcVar4,param_1);" (assignment_expression "DAT_00151420 = strcpy(pcVar4,param_1)" identifier = (call_expression "strcpy(pcVar4,param_1)" identifier (argument_list "(pcVar4,param_1)" ( identifier , identifier )))) ;) (expression_statement "DAT_0015141c = strlen(DAT_00151420);" (assignment_expression "DAT_0015141c = strlen(DAT_00151420)" identifier = (call_expression "strlen(DAT_00151420)" identifier (argument_list "(DAT_00151420)" ( identifier )))) ;) (expression_statement "setservent(0);" (call_expression "setservent(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (while_statement "while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" { (expression_statement "psVar5 = getservent();" (assignment_expression "psVar5 = getservent()" identifier = (call_expression "getservent()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = DAT_00151420;" (assignment_expression "pcVar4 = DAT_00151420" identifier = identifier) ;) (expression_statement "sVar3 = DAT_0015141c;" (assignment_expression "sVar3 = DAT_0015141c" identifier = identifier) ;) (if_statement "if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }" if (parenthesized_expression "(psVar5 == (servent *)0x0)" ( (binary_expression "psVar5 == (servent *)0x0" identifier == (cast_expression "(servent *)0x0" ( (type_descriptor "servent *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      endservent();\n      return (char *)0x0;\n    }" { (expression_statement "endservent();" (call_expression "endservent()" identifier (argument_list "()" ( ))) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar2 = psVar5->s_name;" (assignment_expression "pcVar2 = psVar5->s_name" identifier = (field_expression "psVar5->s_name" identifier -> field_identifier)) ;) (if_statement "if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;" if (parenthesized_expression "((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0))))" ( (binary_expression "(DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))" (parenthesized_expression "(DAT_0015141c == 0)" ( (binary_expression "DAT_0015141c == 0" identifier == number_literal) )) || (parenthesized_expression "((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))" ( (parenthesized_expression "(cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0))" ( (comma_expression "cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" (assignment_expression "cVar1 = *DAT_00151420" identifier = (pointer_expression "*DAT_00151420" * identifier)) , (binary_expression "cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" (binary_expression "cVar1 == *pcVar2" identifier == (pointer_expression "*pcVar2" * identifier)) && (parenthesized_expression "(iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" ( (comma_expression "iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0" (assignment_expression "iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c)" identifier = (call_expression "strncmp(DAT_00151420,pcVar2,DAT_0015141c)" identifier (argument_list "(DAT_00151420,pcVar2,DAT_0015141c)" ( identifier , identifier , identifier )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) )))) )) ))) )) (break_statement "break;" break ;)) (expression_statement "ppcVar7 = psVar5->s_aliases;" (assignment_expression "ppcVar7 = psVar5->s_aliases" identifier = (field_expression "psVar5->s_aliases" identifier -> field_identifier)) ;) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" identifier = (pointer_expression "*ppcVar7" * identifier)) ;) (while_statement "while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" while (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" { (if_statement "if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" if (parenthesized_expression "((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0))" ( (binary_expression "(cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)" (parenthesized_expression "(cVar1 == *pcVar2)" ( (binary_expression "cVar1 == *pcVar2" identifier == (pointer_expression "*pcVar2" * identifier)) )) && (parenthesized_expression "(iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)" ( (comma_expression "iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0" (assignment_expression "iVar6 = strncmp(pcVar4,pcVar2,sVar3)" identifier = (call_expression "strncmp(pcVar4,pcVar2,sVar3)" identifier (argument_list "(pcVar4,pcVar2,sVar3)" ( identifier , identifier , identifier )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" { (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (return_statement "return pcVar4;" return identifier ;) })) (expression_statement "ppcVar7 = ppcVar7 + 1;" (assignment_expression "ppcVar7 = ppcVar7 + 1" identifier = (binary_expression "ppcVar7 + 1" identifier + number_literal)) ;) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" identifier = (pointer_expression "*ppcVar7" * identifier)) ;) })) })) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (return_statement "return pcVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * bash_servicename_completion_function(char *text,int state)\n\n{\n  char cVar1;\n  char *pcVar2;\n  int __n;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (state == 0) {\n    if (bash_servicename_completion_function::sname != (char *)0x0) {\n      free(bash_servicename_completion_function::sname);\n    }\n    sVar3 = strlen(text);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    bash_servicename_completion_function::sname = strcpy(pcVar4,text);\n    bash_servicename_completion_function::snamelen =\n         strlen(bash_servicename_completion_function::sname);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = bash_servicename_completion_function::sname;\n    __n = bash_servicename_completion_function::snamelen;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}\n\n" comment comment (function_definition "char * bash_servicename_completion_function(char *text,int state)\n\n{\n  char cVar1;\n  char *pcVar2;\n  int __n;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (state == 0) {\n    if (bash_servicename_completion_function::sname != (char *)0x0) {\n      free(bash_servicename_completion_function::sname);\n    }\n    sVar3 = strlen(text);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    bash_servicename_completion_function::sname = strcpy(pcVar4,text);\n    bash_servicename_completion_function::snamelen =\n         strlen(bash_servicename_completion_function::sname);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = bash_servicename_completion_function::sname;\n    __n = bash_servicename_completion_function::snamelen;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" primitive_type (pointer_declarator "* bash_servicename_completion_function(char *text,int state)" * (function_declarator "bash_servicename_completion_function(char *text,int state)" identifier (parameter_list "(char *text,int state)" ( (parameter_declaration "char *text" primitive_type (pointer_declarator "*text" * identifier)) , (parameter_declaration "int state" primitive_type identifier) )))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  int __n;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (state == 0) {\n    if (bash_servicename_completion_function::sname != (char *)0x0) {\n      free(bash_servicename_completion_function::sname);\n    }\n    sVar3 = strlen(text);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    bash_servicename_completion_function::sname = strcpy(pcVar4,text);\n    bash_servicename_completion_function::snamelen =\n         strlen(bash_servicename_completion_function::sname);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = bash_servicename_completion_function::sname;\n    __n = bash_servicename_completion_function::snamelen;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int __n;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "servent *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char **ppcVar7;" primitive_type (pointer_declarator "**ppcVar7" * (pointer_declarator "*ppcVar7" * identifier)) ;) (if_statement "if (state == 0) {\n    if (bash_servicename_completion_function::sname != (char *)0x0) {\n      free(bash_servicename_completion_function::sname);\n    }\n    sVar3 = strlen(text);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    bash_servicename_completion_function::sname = strcpy(pcVar4,text);\n    bash_servicename_completion_function::snamelen =\n         strlen(bash_servicename_completion_function::sname);\n    setservent(0);\n  }" if (parenthesized_expression "(state == 0)" ( (binary_expression "state == 0" identifier == number_literal) )) (compound_statement "{\n    if (bash_servicename_completion_function::sname != (char *)0x0) {\n      free(bash_servicename_completion_function::sname);\n    }\n    sVar3 = strlen(text);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    bash_servicename_completion_function::sname = strcpy(pcVar4,text);\n    bash_servicename_completion_function::snamelen =\n         strlen(bash_servicename_completion_function::sname);\n    setservent(0);\n  }" { (if_statement "if (bash_servicename_completion_function::sname != (char *)0x0) {\n      free(bash_servicename_completion_function::sname);\n    }" if (parenthesized_expression "(bash_servicename_completion_function::sname != (char *)0x0)" ( (binary_expression "bash_servicename_completion_function::sname != (char *)0x0" identifier (ERROR "::sname" : : identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(bash_servicename_completion_function::sname);\n    }" { (labeled_statement "free(bash_servicename_completion_function::sname);" statement_identifier (ERROR "(bash_servicename_completion_function:" ( (type_descriptor "bash_servicename_completion_function" type_identifier) :) : (expression_statement "sname);" identifier (ERROR ")" )) ;)) })) (expression_statement "sVar3 = strlen(text);" (assignment_expression "sVar3 = strlen(text)" identifier = (call_expression "strlen(text)" identifier (argument_list "(text)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (labeled_statement "bash_servicename_completion_function::sname = strcpy(pcVar4,text);" statement_identifier : (ERROR ":" :) (expression_statement "sname = strcpy(pcVar4,text);" (assignment_expression "sname = strcpy(pcVar4,text)" identifier = (call_expression "strcpy(pcVar4,text)" identifier (argument_list "(pcVar4,text)" ( identifier , identifier )))) ;)) (labeled_statement "bash_servicename_completion_function::snamelen =\n         strlen(bash_servicename_completion_function::sname);" statement_identifier : (ERROR ":" :) (expression_statement "snamelen =\n         strlen(bash_servicename_completion_function::sname);" (assignment_expression "snamelen =\n         strlen(bash_servicename_completion_function::sname)" identifier = (call_expression "strlen(bash_servicename_completion_function::sname)" identifier (argument_list "(bash_servicename_completion_function::sname)" ( identifier (ERROR "::sname" : : identifier) )))) ;)) (expression_statement "setservent(0);" (call_expression "setservent(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (while_statement "while( true ) {\n    psVar5 = getservent();\n    pcVar4 = bash_servicename_completion_function::sname;\n    __n = bash_servicename_completion_function::snamelen;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    psVar5 = getservent();\n    pcVar4 = bash_servicename_completion_function::sname;\n    __n = bash_servicename_completion_function::snamelen;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" { (expression_statement "psVar5 = getservent();" (assignment_expression "psVar5 = getservent()" identifier = (call_expression "getservent()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = bash_servicename_completion_function::sname;" (assignment_expression "pcVar4 = bash_servicename_completion_function" identifier = identifier) (ERROR "::sname" : : identifier) ;) (expression_statement "__n = bash_servicename_completion_function::snamelen;" (assignment_expression "__n = bash_servicename_completion_function" identifier = identifier) (ERROR "::snamelen" : : identifier) ;) (if_statement "if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }" if (parenthesized_expression "(psVar5 == (servent *)0x0)" ( (binary_expression "psVar5 == (servent *)0x0" identifier == (cast_expression "(servent *)0x0" ( (type_descriptor "servent *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      endservent();\n      return (char *)0x0;\n    }" { (expression_statement "endservent();" (call_expression "endservent()" identifier (argument_list "()" ( ))) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar2 = psVar5->s_name;" (assignment_expression "pcVar2 = psVar5->s_name" identifier = (field_expression "psVar5->s_name" identifier -> field_identifier)) ;) (if_statement "if ((bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))) break;" if (parenthesized_expression "((bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0))))" ( (binary_expression "(bash_servicename_completion_function::snamelen == 0) ||\n       ((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))" (parenthesized_expression "(bash_servicename_completion_function::snamelen == 0)" ( (binary_expression "bash_servicename_completion_function::snamelen == 0" identifier (ERROR "::snamelen" : : identifier) == number_literal) )) || (parenthesized_expression "((cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)))" ( (parenthesized_expression "(cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0))" ( (comma_expression "cVar1 = *bash_servicename_completion_function::sname, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)" (assignment_expression "cVar1 = *bash_servicename_completion_function" identifier = (pointer_expression "*bash_servicename_completion_function" * identifier)) (ERROR "::sname" : : identifier) , (binary_expression "cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)" (binary_expression "cVar1 == *pcVar2" identifier == (pointer_expression "*pcVar2" * identifier)) && (parenthesized_expression "(iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0)" ( (comma_expression "iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen), iVar6 == 0" (assignment_expression "iVar6 = strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen)" identifier = (call_expression "strncmp(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen)" identifier (argument_list "(bash_servicename_completion_function::sname,pcVar2,\n                         bash_servicename_completion_function::snamelen)" ( identifier (ERROR "::sname" : : identifier) , identifier , identifier (ERROR "::snamelen" : : identifier) )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) )))) )) ))) )) (break_statement "break;" break ;)) (expression_statement "ppcVar7 = psVar5->s_aliases;" (assignment_expression "ppcVar7 = psVar5->s_aliases" identifier = (field_expression "psVar5->s_aliases" identifier -> field_identifier)) ;) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" identifier = (pointer_expression "*ppcVar7" * identifier)) ;) (while_statement "while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" while (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" { (if_statement "if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" if (parenthesized_expression "((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0))" ( (binary_expression "(cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)" (parenthesized_expression "(cVar1 == *pcVar2)" ( (binary_expression "cVar1 == *pcVar2" identifier == (pointer_expression "*pcVar2" * identifier)) )) && (parenthesized_expression "(iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0)" ( (comma_expression "iVar6 = strncmp(pcVar4,pcVar2,__n), iVar6 == 0" (assignment_expression "iVar6 = strncmp(pcVar4,pcVar2,__n)" identifier = (call_expression "strncmp(pcVar4,pcVar2,__n)" identifier (argument_list "(pcVar4,pcVar2,__n)" ( identifier , identifier , identifier )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" { (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (return_statement "return pcVar4;" return identifier ;) })) (expression_statement "ppcVar7 = ppcVar7 + 1;" (assignment_expression "ppcVar7 = ppcVar7 + 1" identifier = (binary_expression "ppcVar7 + 1" identifier + number_literal)) ;) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" identifier = (pointer_expression "*ppcVar7" * identifier)) ;) })) })) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (return_statement "return pcVar4;" return identifier ;) })))
(translation_unit "char * bash_servicename_completion_function(char *param_1,int param_2)\n\n{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}\n\n" (function_definition "char * bash_servicename_completion_function(char *param_1,int param_2)\n\n{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" primitive_type (pointer_declarator "* bash_servicename_completion_function(char *param_1,int param_2)" * (function_declarator "bash_servicename_completion_function(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "servent *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char **ppcVar7;" primitive_type (pointer_declarator "**ppcVar7" * (pointer_declarator "*ppcVar7" * identifier)) ;) (if_statement "if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }" { (if_statement "if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }" if (parenthesized_expression "(DAT_00151420 != (char *)0x0)" ( (binary_expression "DAT_00151420 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(DAT_00151420);\n    }" { (expression_statement "free(DAT_00151420);" (call_expression "free(DAT_00151420)" identifier (argument_list "(DAT_00151420)" ( identifier ))) ;) })) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "DAT_00151420 = strcpy(pcVar4,param_1);" (assignment_expression "DAT_00151420 = strcpy(pcVar4,param_1)" identifier = (call_expression "strcpy(pcVar4,param_1)" identifier (argument_list "(pcVar4,param_1)" ( identifier , identifier )))) ;) (expression_statement "DAT_0015141c = strlen(DAT_00151420);" (assignment_expression "DAT_0015141c = strlen(DAT_00151420)" identifier = (call_expression "strlen(DAT_00151420)" identifier (argument_list "(DAT_00151420)" ( identifier )))) ;) (expression_statement "setservent(0);" (call_expression "setservent(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (while_statement "while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" { (expression_statement "psVar5 = getservent();" (assignment_expression "psVar5 = getservent()" identifier = (call_expression "getservent()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = DAT_00151420;" (assignment_expression "pcVar4 = DAT_00151420" identifier = identifier) ;) (expression_statement "sVar3 = DAT_0015141c;" (assignment_expression "sVar3 = DAT_0015141c" identifier = identifier) ;) (if_statement "if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }" if (parenthesized_expression "(psVar5 == (servent *)0x0)" ( (binary_expression "psVar5 == (servent *)0x0" identifier == (cast_expression "(servent *)0x0" ( (type_descriptor "servent *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      endservent();\n      return (char *)0x0;\n    }" { (expression_statement "endservent();" (call_expression "endservent()" identifier (argument_list "()" ( ))) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar2 = psVar5->s_name;" (assignment_expression "pcVar2 = psVar5->s_name" identifier = (field_expression "psVar5->s_name" identifier -> field_identifier)) ;) (if_statement "if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;" if (parenthesized_expression "((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0))))" ( (binary_expression "(DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))" (parenthesized_expression "(DAT_0015141c == 0)" ( (binary_expression "DAT_0015141c == 0" identifier == number_literal) )) || (parenthesized_expression "((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))" ( (parenthesized_expression "(cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0))" ( (comma_expression "cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" (assignment_expression "cVar1 = *DAT_00151420" identifier = (pointer_expression "*DAT_00151420" * identifier)) , (binary_expression "cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" (binary_expression "cVar1 == *pcVar2" identifier == (pointer_expression "*pcVar2" * identifier)) && (parenthesized_expression "(iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" ( (comma_expression "iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0" (assignment_expression "iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c)" identifier = (call_expression "strncmp(DAT_00151420,pcVar2,DAT_0015141c)" identifier (argument_list "(DAT_00151420,pcVar2,DAT_0015141c)" ( identifier , identifier , identifier )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) )))) )) ))) )) (break_statement "break;" break ;)) (expression_statement "ppcVar7 = psVar5->s_aliases;" (assignment_expression "ppcVar7 = psVar5->s_aliases" identifier = (field_expression "psVar5->s_aliases" identifier -> field_identifier)) ;) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" identifier = (pointer_expression "*ppcVar7" * identifier)) ;) (while_statement "while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" while (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" { (if_statement "if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" if (parenthesized_expression "((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0))" ( (binary_expression "(cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)" (parenthesized_expression "(cVar1 == *pcVar2)" ( (binary_expression "cVar1 == *pcVar2" identifier == (pointer_expression "*pcVar2" * identifier)) )) && (parenthesized_expression "(iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)" ( (comma_expression "iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0" (assignment_expression "iVar6 = strncmp(pcVar4,pcVar2,sVar3)" identifier = (call_expression "strncmp(pcVar4,pcVar2,sVar3)" identifier (argument_list "(pcVar4,pcVar2,sVar3)" ( identifier , identifier , identifier )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" { (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (return_statement "return pcVar4;" return identifier ;) })) (expression_statement "ppcVar7 = ppcVar7 + 1;" (assignment_expression "ppcVar7 = ppcVar7 + 1" identifier = (binary_expression "ppcVar7 + 1" identifier + number_literal)) ;) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" identifier = (pointer_expression "*ppcVar7" * identifier)) ;) })) })) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (return_statement "return pcVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 ( ))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (field_expression IDENT -> field_identifier)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * IDENT)) , (binary_expression (binary_expression IDENT == (pointer_expression * IDENT)) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression IDENT == LIT)) )))) )) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * IDENT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (return_statement return IDENT ;) })))
(function_definition "char * bash_servicename_completion_function(char *param_1,int param_2)\n\n{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" (primitive_type "char") (pointer_declarator "* bash_servicename_completion_function(char *param_1,int param_2)" (* "*") (function_declarator "bash_servicename_completion_function(char *param_1,int param_2)" (identifier "bash_servicename_completion_function") (parameter_list "(char *param_1,int param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")")))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  servent *psVar5;\n  int iVar6;\n  char **ppcVar7;\n  \n  if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }\n  while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }\n  sVar3 = strlen(pcVar2);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  pcVar4 = strcpy(pcVar4,pcVar2);\n  return pcVar4;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "servent *psVar5;" (type_identifier "servent") (pointer_declarator "*psVar5" (* "*") (identifier "psVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "char **ppcVar7;" (primitive_type "char") (pointer_declarator "**ppcVar7" (* "*") (pointer_declarator "*ppcVar7" (* "*") (identifier "ppcVar7"))) (; ";")) (if_statement "if (param_2 == 0) {\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }\n    sVar3 = strlen(param_1);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    DAT_00151420 = strcpy(pcVar4,param_1);\n    DAT_0015141c = strlen(DAT_00151420);\n    setservent(0);\n  }" ({ "{") (if_statement "if (DAT_00151420 != (char *)0x0) {\n      free(DAT_00151420);\n    }" (if "if") (parenthesized_expression "(DAT_00151420 != (char *)0x0)" (( "(") (binary_expression "DAT_00151420 != (char *)0x0" (identifier "DAT_00151420") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      free(DAT_00151420);\n    }" ({ "{") (expression_statement "free(DAT_00151420);" (call_expression "free(DAT_00151420)" (identifier "free") (argument_list "(DAT_00151420)" (( "(") (identifier "DAT_00151420") () ")"))) (; ";")) (} "}"))) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" (identifier "sVar3") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" (identifier "pcVar4") (= "=") (cast_expression "(char *)xmalloc(sVar3 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar3 + 1)" (identifier "xmalloc") (argument_list "(sVar3 + 1)" (( "(") (binary_expression "sVar3 + 1" (identifier "sVar3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "DAT_00151420 = strcpy(pcVar4,param_1);" (assignment_expression "DAT_00151420 = strcpy(pcVar4,param_1)" (identifier "DAT_00151420") (= "=") (call_expression "strcpy(pcVar4,param_1)" (identifier "strcpy") (argument_list "(pcVar4,param_1)" (( "(") (identifier "pcVar4") (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "DAT_0015141c = strlen(DAT_00151420);" (assignment_expression "DAT_0015141c = strlen(DAT_00151420)" (identifier "DAT_0015141c") (= "=") (call_expression "strlen(DAT_00151420)" (identifier "strlen") (argument_list "(DAT_00151420)" (( "(") (identifier "DAT_00151420") () ")")))) (; ";")) (expression_statement "setservent(0);" (call_expression "setservent(0)" (identifier "setservent") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (} "}"))) (while_statement "while( true ) {\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    psVar5 = getservent();\n    pcVar4 = DAT_00151420;\n    sVar3 = DAT_0015141c;\n    if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }\n    pcVar2 = psVar5->s_name;\n    if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;\n    ppcVar7 = psVar5->s_aliases;\n    pcVar2 = *ppcVar7;\n    while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }\n  }" ({ "{") (expression_statement "psVar5 = getservent();" (assignment_expression "psVar5 = getservent()" (identifier "psVar5") (= "=") (call_expression "getservent()" (identifier "getservent") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar4 = DAT_00151420;" (assignment_expression "pcVar4 = DAT_00151420" (identifier "pcVar4") (= "=") (identifier "DAT_00151420")) (; ";")) (expression_statement "sVar3 = DAT_0015141c;" (assignment_expression "sVar3 = DAT_0015141c" (identifier "sVar3") (= "=") (identifier "DAT_0015141c")) (; ";")) (if_statement "if (psVar5 == (servent *)0x0) {\n      endservent();\n      return (char *)0x0;\n    }" (if "if") (parenthesized_expression "(psVar5 == (servent *)0x0)" (( "(") (binary_expression "psVar5 == (servent *)0x0" (identifier "psVar5") (== "==") (cast_expression "(servent *)0x0" (( "(") (type_descriptor "servent *" (type_identifier "servent") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      endservent();\n      return (char *)0x0;\n    }" ({ "{") (expression_statement "endservent();" (call_expression "endservent()" (identifier "endservent") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return (char *)0x0;" (return "return") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "pcVar2 = psVar5->s_name;" (assignment_expression "pcVar2 = psVar5->s_name" (identifier "pcVar2") (= "=") (field_expression "psVar5->s_name" (identifier "psVar5") (-> "->") (field_identifier "s_name"))) (; ";")) (if_statement "if ((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;" (if "if") (parenthesized_expression "((DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0))))" (( "(") (binary_expression "(DAT_0015141c == 0) ||\n       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))" (parenthesized_expression "(DAT_0015141c == 0)" (( "(") (binary_expression "DAT_0015141c == 0" (identifier "DAT_0015141c") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))" (( "(") (parenthesized_expression "(cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0))" (( "(") (comma_expression "cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" (assignment_expression "cVar1 = *DAT_00151420" (identifier "cVar1") (= "=") (pointer_expression "*DAT_00151420" (* "*") (identifier "DAT_00151420"))) (, ",") (binary_expression "cVar1 == *pcVar2 &&\n        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" (binary_expression "cVar1 == *pcVar2" (identifier "cVar1") (== "==") (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2"))) (&& "&&") (parenthesized_expression "(iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)" (( "(") (comma_expression "iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0" (assignment_expression "iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c)" (identifier "iVar6") (= "=") (call_expression "strncmp(DAT_00151420,pcVar2,DAT_0015141c)" (identifier "strncmp") (argument_list "(DAT_00151420,pcVar2,DAT_0015141c)" (( "(") (identifier "DAT_00151420") (, ",") (identifier "pcVar2") (, ",") (identifier "DAT_0015141c") () ")")))) (, ",") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0"))) () ")")))) () ")")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "ppcVar7 = psVar5->s_aliases;" (assignment_expression "ppcVar7 = psVar5->s_aliases" (identifier "ppcVar7") (= "=") (field_expression "psVar5->s_aliases" (identifier "psVar5") (-> "->") (field_identifier "s_aliases"))) (; ";")) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" (identifier "pcVar2") (= "=") (pointer_expression "*ppcVar7" (* "*") (identifier "ppcVar7"))) (; ";")) (while_statement "while (pcVar2 != (char *)0x0) {\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" (while "while") (parenthesized_expression "(pcVar2 != (char *)0x0)" (( "(") (binary_expression "pcVar2 != (char *)0x0" (identifier "pcVar2") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }\n      ppcVar7 = ppcVar7 + 1;\n      pcVar2 = *ppcVar7;\n    }" ({ "{") (if_statement "if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" (if "if") (parenthesized_expression "((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0))" (( "(") (binary_expression "(cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)" (parenthesized_expression "(cVar1 == *pcVar2)" (( "(") (binary_expression "cVar1 == *pcVar2" (identifier "cVar1") (== "==") (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2"))) () ")")) (&& "&&") (parenthesized_expression "(iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)" (( "(") (comma_expression "iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0" (assignment_expression "iVar6 = strncmp(pcVar4,pcVar2,sVar3)" (identifier "iVar6") (= "=") (call_expression "strncmp(pcVar4,pcVar2,sVar3)" (identifier "strncmp") (argument_list "(pcVar4,pcVar2,sVar3)" (( "(") (identifier "pcVar4") (, ",") (identifier "pcVar2") (, ",") (identifier "sVar3") () ")")))) (, ",") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        sVar3 = strlen(pcVar2);\n        pcVar4 = (char *)xmalloc(sVar3 + 1);\n        pcVar4 = strcpy(pcVar4,pcVar2);\n        return pcVar4;\n      }" ({ "{") (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" (identifier "sVar3") (= "=") (call_expression "strlen(pcVar2)" (identifier "strlen") (argument_list "(pcVar2)" (( "(") (identifier "pcVar2") () ")")))) (; ";")) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" (identifier "pcVar4") (= "=") (cast_expression "(char *)xmalloc(sVar3 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar3 + 1)" (identifier "xmalloc") (argument_list "(sVar3 + 1)" (( "(") (binary_expression "sVar3 + 1" (identifier "sVar3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" (identifier "pcVar4") (= "=") (call_expression "strcpy(pcVar4,pcVar2)" (identifier "strcpy") (argument_list "(pcVar4,pcVar2)" (( "(") (identifier "pcVar4") (, ",") (identifier "pcVar2") () ")")))) (; ";")) (return_statement "return pcVar4;" (return "return") (identifier "pcVar4") (; ";")) (} "}"))) (expression_statement "ppcVar7 = ppcVar7 + 1;" (assignment_expression "ppcVar7 = ppcVar7 + 1" (identifier "ppcVar7") (= "=") (binary_expression "ppcVar7 + 1" (identifier "ppcVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pcVar2 = *ppcVar7;" (assignment_expression "pcVar2 = *ppcVar7" (identifier "pcVar2") (= "=") (pointer_expression "*ppcVar7" (* "*") (identifier "ppcVar7"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" (identifier "sVar3") (= "=") (call_expression "strlen(pcVar2)" (identifier "strlen") (argument_list "(pcVar2)" (( "(") (identifier "pcVar2") () ")")))) (; ";")) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" (identifier "pcVar4") (= "=") (cast_expression "(char *)xmalloc(sVar3 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar3 + 1)" (identifier "xmalloc") (argument_list "(sVar3 + 1)" (( "(") (binary_expression "sVar3 + 1" (identifier "sVar3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" (identifier "pcVar4") (= "=") (call_expression "strcpy(pcVar4,pcVar2)" (identifier "strcpy") (argument_list "(pcVar4,pcVar2)" (( "(") (identifier "pcVar4") (, ",") (identifier "pcVar2") () ")")))) (; ";")) (return_statement "return pcVar4;" (return "return") (identifier "pcVar4") (; ";")) (} "}")))

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

char * function_1(char *text,int var_1)

{
  char var_10;
  char *var_13;
  int __n;
  size_t var_4;
  char *pcVar4;
  type_1 *var_8;
  int var_12;
  char **var_14;
  
  if (var_1 == 0) {
    if (function_1::sname != (char *)0x0) {
      free(function_1::sname);
    }
    var_4 = var_2(text);
    pcVar4 = (char *)var_3(var_4 + 1);
    bash_servicename_completion_function::sname = var_5(pcVar4,text);
    bash_servicename_completion_function::snamelen =
         var_2(function_1::sname);
    var_6(0);
  }
  while( true ) {
    var_8 = var_7();
    pcVar4 = function_1::sname;
    __n = function_1::snamelen;
    if (var_8 == (type_1 *)0x0) {
      var_9();
      return (char *)0x0;
    }
    var_13 = var_8->s_name;
    if ((function_1::snamelen == 0) ||
       ((var_10 = *function_1::sname, var_10 == *var_13 &&
        (var_12 = var_11(function_1::sname,var_13,
                         function_1::snamelen), var_12 == 0)))) break;
    var_14 = var_8->s_aliases;
    var_13 = *var_14;
    while (var_13 != (char *)0x0) {
      if ((var_10 == *var_13) && (var_12 = var_11(pcVar4,var_13,__n), var_12 == 0)) {
        var_4 = var_2(var_13);
        pcVar4 = (char *)var_3(var_4 + 1);
        pcVar4 = var_5(pcVar4,var_13);
        return pcVar4;
      }
      var_14 = var_14 + 1;
      var_13 = *var_14;
    }
  }
  var_4 = var_2(var_13);
  pcVar4 = (char *)var_3(var_4 + 1);
  pcVar4 = var_5(pcVar4,var_13);
  return pcVar4;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (pointer_declarator declarator: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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 (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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 (call_expression function: (identifier) arguments: (argument_list))) (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (field_expression argument: (identifier) field: (field_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))) right: (binary_expression left: (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))))))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (field_expression argument: (identifier) field: (field_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (identifier)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (return_statement (identifier)))))

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

char * MASKED(char *param_1,int param_2)

{
  char cVar1;
  char *pcVar2;
  size_t sVar3;
  char *pcVar4;
  servent *psVar5;
  int iVar6;
  char **ppcVar7;
  
  if (param_2 == 0) {
    if (DAT_00151420 != (char *)0x0) {
      free(DAT_00151420);
    }
    sVar3 = strlen(param_1);
    pcVar4 = (char *)xmalloc(sVar3 + 1);
    DAT_00151420 = strcpy(pcVar4,param_1);
    DAT_0015141c = strlen(DAT_00151420);
    setservent(0);
  }
  while( true ) {
    psVar5 = getservent();
    pcVar4 = DAT_00151420;
    sVar3 = DAT_0015141c;
    if (psVar5 == (servent *)0x0) {
      endservent();
      return (char *)0x0;
    }
    pcVar2 = psVar5->s_name;
    if ((DAT_0015141c == 0) ||
       ((cVar1 = *DAT_00151420, cVar1 == *pcVar2 &&
        (iVar6 = strncmp(DAT_00151420,pcVar2,DAT_0015141c), iVar6 == 0)))) break;
    ppcVar7 = psVar5->s_aliases;
    pcVar2 = *ppcVar7;
    while (pcVar2 != (char *)0x0) {
      if ((cVar1 == *pcVar2) && (iVar6 = strncmp(pcVar4,pcVar2,sVar3), iVar6 == 0)) {
        sVar3 = strlen(pcVar2);
        pcVar4 = (char *)xmalloc(sVar3 + 1);
        pcVar4 = strcpy(pcVar4,pcVar2);
        return pcVar4;
      }
      ppcVar7 = ppcVar7 + 1;
      pcVar2 = *ppcVar7;
    }
  }
  sVar3 = strlen(pcVar2);
  pcVar4 = (char *)xmalloc(sVar3 + 1);
  pcVar4 = strcpy(pcVar4,pcVar2);
  return pcVar4;
}

