
char * platform_default_s(char *name)

{
  char *pcVar1;
  long lVar2;
  byte *pbVar3;
  undefined1 in_CF;
  undefined1 in_ZF;
  
  lVar2 = 0xb;
  pbVar3 = (byte *)"SerialLine";
  do {
    if (lVar2 == 0) break;
    lVar2 = lVar2 + -1;
    in_CF = (byte)*name < *pbVar3;
    in_ZF = *name == *pbVar3;
    name = (char *)((byte *)name + 1);
    pbVar3 = pbVar3 + 1;
  } while ((bool)in_ZF);
  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {
    return (char *)0x0;
  }
  pcVar1 = dupstr("/dev/ttyS0");
  return pcVar1;
}



undefined8 FUN_00144038(byte *param_1)

{
  undefined8 uVar1;
  long lVar2;
  byte *pbVar3;
  undefined1 in_CF;
  undefined1 in_ZF;
  
  lVar2 = 0xb;
  pbVar3 = (byte *)"SerialLine";
  do {
    if (lVar2 == 0) break;
    lVar2 = lVar2 + -1;
    in_CF = *param_1 < *pbVar3;
    in_ZF = *param_1 == *pbVar3;
    param_1 = param_1 + 1;
    pbVar3 = pbVar3 + 1;
  } while ((bool)in_ZF);
  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {
    return 0;
  }
  uVar1 = FUN_0012103d("/dev/ttyS0");
  return uVar1;
}


MOV RSI,RDI
MOV ECX,0xb
LEA RDI,[0x174a33]
CMPSB.REPE RDI,RSI
SETA DL
SBB DL,0x0
MOV EAX,0x0
TEST DL,DL
JZ 0x00144059
RET
SUB RSP,0x8
LEA RDI,[0x1785e8]
CALL 0x0012103d
ADD RSP,0x8
RET
(translation_unit "undefined8 FUN_00144038(byte *param_1)\n\n{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}\n\n" (function_definition "undefined8 FUN_00144038(byte *param_1)\n\n{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}" type_identifier (function_declarator "FUN_00144038(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined1 in_CF;" type_identifier identifier ;) (declaration "undefined1 in_ZF;" type_identifier identifier ;) (expression_statement "lVar2 = 0xb;" (assignment_expression "lVar2 = 0xb" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)"SerialLine";" (assignment_expression "pbVar3 = (byte *)"SerialLine"" identifier = (cast_expression "(byte *)"SerialLine"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""SerialLine"" " string_content "))) ;) (do_statement "do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);" do (compound_statement "{\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  }" { (if_statement "if (lVar2 == 0) break;" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ;) (expression_statement "in_CF = *param_1 < *pbVar3;" (assignment_expression "in_CF = *param_1 < *pbVar3" identifier = (binary_expression "*param_1 < *pbVar3" (pointer_expression "*param_1" * identifier) < (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "in_ZF = *param_1 == *pbVar3;" (assignment_expression "in_ZF = *param_1 == *pbVar3" identifier = (binary_expression "*param_1 == *pbVar3" (pointer_expression "*param_1" * identifier) == (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bool)in_ZF)" ( (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (if_statement "if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }" if (parenthesized_expression "((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF)" ( (binary_expression "(!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" ( (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" ! (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)in_ZF" ! (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier))) )) != (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar1 = FUN_0012103d("/dev/ttyS0");" (assignment_expression "uVar1 = FUN_0012103d("/dev/ttyS0")" identifier = (call_expression "FUN_0012103d("/dev/ttyS0")" identifier (argument_list "("/dev/ttyS0")" ( (string_literal ""/dev/ttyS0"" " string_content ") )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "char * platform_default_s(char *name)\n\n{\n  char *pcVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = (byte)*name < *pbVar3;\n    in_ZF = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return (char *)0x0;\n  }\n  pcVar1 = dupstr("/dev/ttyS0");\n  return pcVar1;\n}\n\n" (function_definition "char * platform_default_s(char *name)\n\n{\n  char *pcVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = (byte)*name < *pbVar3;\n    in_ZF = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return (char *)0x0;\n  }\n  pcVar1 = dupstr("/dev/ttyS0");\n  return pcVar1;\n}" primitive_type (pointer_declarator "* platform_default_s(char *name)" * (function_declarator "platform_default_s(char *name)" identifier (parameter_list "(char *name)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = (byte)*name < *pbVar3;\n    in_ZF = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return (char *)0x0;\n  }\n  pcVar1 = dupstr("/dev/ttyS0");\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined1 in_CF;" type_identifier identifier ;) (declaration "undefined1 in_ZF;" type_identifier identifier ;) (expression_statement "lVar2 = 0xb;" (assignment_expression "lVar2 = 0xb" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)"SerialLine";" (assignment_expression "pbVar3 = (byte *)"SerialLine"" identifier = (cast_expression "(byte *)"SerialLine"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""SerialLine"" " string_content "))) ;) (do_statement "do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = (byte)*name < *pbVar3;\n    in_ZF = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);" do (compound_statement "{\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = (byte)*name < *pbVar3;\n    in_ZF = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  }" { (if_statement "if (lVar2 == 0) break;" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ;) (expression_statement "in_CF = (byte)*name < *pbVar3;" (assignment_expression "in_CF = (byte)*name < *pbVar3" identifier = (binary_expression "(byte)*name < *pbVar3" (binary_expression "(byte)*name" (parenthesized_expression "(byte)" ( identifier )) * identifier) < (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "in_ZF = *name == *pbVar3;" (assignment_expression "in_ZF = *name == *pbVar3" identifier = (binary_expression "*name == *pbVar3" (pointer_expression "*name" * identifier) == (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "name = (char *)((byte *)name + 1);" (assignment_expression "name = (char *)((byte *)name + 1)" identifier = (cast_expression "(char *)((byte *)name + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)name + 1)" ( (binary_expression "(byte *)name + 1" (cast_expression "(byte *)name" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bool)in_ZF)" ( (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (if_statement "if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return (char *)0x0;\n  }" if (parenthesized_expression "((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF)" ( (binary_expression "(!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" ( (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" ! (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)in_ZF" ! (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier))) )) != (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) )) (compound_statement "{\n    return (char *)0x0;\n  }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar1 = dupstr("/dev/ttyS0");" (assignment_expression "pcVar1 = dupstr("/dev/ttyS0")" identifier = (call_expression "dupstr("/dev/ttyS0")" identifier (argument_list "("/dev/ttyS0")" ( (string_literal ""/dev/ttyS0"" " string_content ") )))) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "undefined8 FUN_00144038(byte *param_1)\n\n{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}\n\n" (function_definition "undefined8 FUN_00144038(byte *param_1)\n\n{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}" type_identifier (function_declarator "FUN_00144038(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined1 in_CF;" type_identifier identifier ;) (declaration "undefined1 in_ZF;" type_identifier identifier ;) (expression_statement "lVar2 = 0xb;" (assignment_expression "lVar2 = 0xb" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)"SerialLine";" (assignment_expression "pbVar3 = (byte *)"SerialLine"" identifier = (cast_expression "(byte *)"SerialLine"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""SerialLine"" " string_content "))) ;) (do_statement "do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);" do (compound_statement "{\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  }" { (if_statement "if (lVar2 == 0) break;" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ;) (expression_statement "in_CF = *param_1 < *pbVar3;" (assignment_expression "in_CF = *param_1 < *pbVar3" identifier = (binary_expression "*param_1 < *pbVar3" (pointer_expression "*param_1" * identifier) < (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "in_ZF = *param_1 == *pbVar3;" (assignment_expression "in_ZF = *param_1 == *pbVar3" identifier = (binary_expression "*param_1 == *pbVar3" (pointer_expression "*param_1" * identifier) == (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bool)in_ZF)" ( (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (if_statement "if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }" if (parenthesized_expression "((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF)" ( (binary_expression "(!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" ( (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" ! (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)in_ZF" ! (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier))) )) != (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar1 = FUN_0012103d("/dev/ttyS0");" (assignment_expression "uVar1 = FUN_0012103d("/dev/ttyS0")" identifier = (call_expression "FUN_0012103d("/dev/ttyS0")" identifier (argument_list "("/dev/ttyS0")" ( (string_literal ""/dev/ttyS0"" " string_content ") )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (string_literal " string_content "))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE) ) IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! (cast_expression ( (type_descriptor TYPE) ) IDENT)) && (unary_expression ! (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) != (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined8 FUN_00144038(byte *param_1)\n\n{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}" (type_identifier "undefined8") (function_declarator "FUN_00144038(byte *param_1)" (identifier "FUN_00144038") (parameter_list "(byte *param_1)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  long lVar2;\n  byte *pbVar3;\n  undefined1 in_CF;\n  undefined1 in_ZF;\n  \n  lVar2 = 0xb;\n  pbVar3 = (byte *)"SerialLine";\n  do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);\n  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }\n  uVar1 = FUN_0012103d("/dev/ttyS0");\n  return uVar1;\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "undefined1 in_CF;" (type_identifier "undefined1") (identifier "in_CF") (; ";")) (declaration "undefined1 in_ZF;" (type_identifier "undefined1") (identifier "in_ZF") (; ";")) (expression_statement "lVar2 = 0xb;" (assignment_expression "lVar2 = 0xb" (identifier "lVar2") (= "=") (number_literal "0xb")) (; ";")) (expression_statement "pbVar3 = (byte *)"SerialLine";" (assignment_expression "pbVar3 = (byte *)"SerialLine"" (identifier "pbVar3") (= "=") (cast_expression "(byte *)"SerialLine"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""SerialLine"" (" """) (string_content "SerialLine") (" """)))) (; ";")) (do_statement "do {\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while ((bool)in_ZF);" (do "do") (compound_statement "{\n    if (lVar2 == 0) break;\n    lVar2 = lVar2 + -1;\n    in_CF = *param_1 < *pbVar3;\n    in_ZF = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  }" ({ "{") (if_statement "if (lVar2 == 0) break;" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" (identifier "lVar2") (= "=") (binary_expression "lVar2 + -1" (identifier "lVar2") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "in_CF = *param_1 < *pbVar3;" (assignment_expression "in_CF = *param_1 < *pbVar3" (identifier "in_CF") (= "=") (binary_expression "*param_1 < *pbVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")))) (; ";")) (expression_statement "in_ZF = *param_1 == *pbVar3;" (assignment_expression "in_ZF = *param_1 == *pbVar3" (identifier "in_ZF") (= "=") (binary_expression "*param_1 == *pbVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((bool)in_ZF)" (( "(") (cast_expression "(bool)in_ZF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_ZF")) () ")")) (; ";")) (if_statement "if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {\n    return 0;\n  }" (if "if") (parenthesized_expression "((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF)" (( "(") (binary_expression "(!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" (( "(") (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" (! "!") (cast_expression "(bool)in_CF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_CF"))) (&& "&&") (unary_expression "!(bool)in_ZF" (! "!") (cast_expression "(bool)in_ZF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_ZF")))) () ")")) (!= "!=") (cast_expression "(bool)in_CF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_CF"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar1 = FUN_0012103d("/dev/ttyS0");" (assignment_expression "uVar1 = FUN_0012103d("/dev/ttyS0")" (identifier "uVar1") (= "=") (call_expression "FUN_0012103d("/dev/ttyS0")" (identifier "FUN_0012103d") (argument_list "("/dev/ttyS0")" (( "(") (string_literal ""/dev/ttyS0"" (" """) (string_content "/dev/ttyS0") (" """)) () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

char * function_1(char *var_2)

{
  char *pcVar1;
  long var_1;
  type_1 *var_3;
  type_2 in_CF;
  type_2 in_ZF;
  
  var_1 = 0xb;
  var_3 = (type_1 *)"SerialLine";
  do {
    if (var_1 == 0) break;
    var_1 = var_1 + -1;
    in_CF = (type_1)*var_2 < *var_3;
    in_ZF = *var_2 == *var_3;
    var_2 = (char *)((type_1 *)var_2 + 1);
    var_3 = var_3 + 1;
  } while ((bool)in_ZF);
  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {
    return (char *)0x0;
  }
  pcVar1 = var_4("/dev/ttyS0");
  return pcVar1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (string_literal (string_content))))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (unary_expression argument: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))) (return_statement (identifier)))))

undefined8 MASKED(byte *param_1)

{
  undefined8 uVar1;
  long lVar2;
  byte *pbVar3;
  undefined1 in_CF;
  undefined1 in_ZF;
  
  lVar2 = 0xb;
  pbVar3 = (byte *)"SerialLine";
  do {
    if (lVar2 == 0) break;
    lVar2 = lVar2 + -1;
    in_CF = *param_1 < *pbVar3;
    in_ZF = *param_1 == *pbVar3;
    param_1 = param_1 + 1;
    pbVar3 = pbVar3 + 1;
  } while ((bool)in_ZF);
  if ((!(bool)in_CF && !(bool)in_ZF) != (bool)in_CF) {
    return 0;
  }
  uVar1 = FUN_0012103d("/dev/ttyS0");
  return uVar1;
}

