
/* std::codecvt<char, char, __mbstate_t>::do_length(__mbstate_t&, char const*, char const*, unsigned
   long) const */

ulong __thiscall
std::codecvt<char,char,__mbstate_t>::do_length
          (codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,
          ulong param_4)

{
  if ((ulong)((long)param_3 - (long)param_2) <= param_4) {
    param_4 = (long)param_3 - (long)param_2;
  }
  return param_4;
}



ulong FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)

{
  if ((ulong)(param_4 - param_3) <= param_5) {
    param_5 = param_4 - param_3;
  }
  return param_5;
}


SUB RCX,RDX
MOV RAX,R8
CMP RCX,R8
CMOVBE RAX,RCX
RET
(translation_unit "ulong FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)\n\n{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}\n\n" (function_definition "ulong FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)\n\n{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}" type_identifier (function_declarator "FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_5" type_identifier identifier) ))) (compound_statement "{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}" { (if_statement "if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }" if (parenthesized_expression "((ulong)(param_4 - param_3) <= param_5)" ( (binary_expression "(ulong)(param_4 - param_3) <= param_5" (call_expression "(ulong)(param_4 - param_3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_4 - param_3)" ( (binary_expression "param_4 - param_3" identifier - identifier) ))) <= identifier) )) (compound_statement "{\n    param_5 = param_4 - param_3;\n  }" { (expression_statement "param_5 = param_4 - param_3;" (assignment_expression "param_5 = param_4 - param_3" identifier = (binary_expression "param_4 - param_3" identifier - identifier)) ;) })) (return_statement "return param_5;" return identifier ;) })))
(translation_unit "/* std::codecvt<char, char, __mbstate_t>::do_length(__mbstate_t&, char const*, char const*, unsigned\n   long) const */\n\nulong __thiscall\nstd::codecvt<char,char,__mbstate_t>::do_length\n          (codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  if ((ulong)((long)param_3 - (long)param_2) <= param_4) {\n    param_4 = (long)param_3 - (long)param_2;\n  }\n  return param_4;\n}\n\n" comment (declaration "ulong __thiscall\nstd::codecvt<char,char,__mbstate_t>::do_length\n          (codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  if ((ulong)((long)param_3 - (long)param_2) <= param_4) {\n    param_4 = (long)param_3 - (long)param_2;" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::" identifier : :) identifier (ERROR "<char" < primitive_type) , identifier , (init_declarator "__mbstate_t>::do_length\n          (codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  if ((ulong)((long)param_3 - (long)param_2) <= param_4) {\n    param_4 = (long)param_3 - (long)param_2" (function_declarator "__mbstate_t>::do_length\n          (codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  if ((ulong)((long)param_3 - (long)param_2" (function_declarator "__mbstate_t>::do_length\n          (codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  if ((ulong)" (function_declarator "__mbstate_t>::do_length\n          (codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)" identifier (ERROR ">::do_length" > : : identifier) (parameter_list "(codecvt<char,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)" ( (parameter_declaration "codecvt" type_identifier) (ERROR "<char" < primitive_type) , (parameter_declaration "char" primitive_type) , (parameter_declaration "__mbstate_t> *this" type_identifier (ERROR ">" >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "__mbstate_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ulong param_4" type_identifier identifier) ))) (ERROR "{\n  if (" { if () (parameter_list "(ulong)" ( (parameter_declaration "ulong" type_identifier) ))) (ERROR "(" () (parameter_list "(long)" ( (parameter_declaration "long" (sized_type_specifier "long" long)) )) (call_expression "param_3 - (long)" identifier (ERROR "-" -) (argument_list "(long)" ( identifier ))) identifier) (ERROR ") <= param_4) {\n    param_4" ) <= identifier ) { identifier) = (binary_expression "(long)param_3 - (long)param_2" (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (ERROR "}" }) (return_statement "return param_4;" return identifier ;) (ERROR "}" }))
(translation_unit "ulong FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)\n\n{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}\n\n" (function_definition "ulong FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)\n\n{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}" type_identifier (function_declarator "FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_5" type_identifier identifier) ))) (compound_statement "{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}" { (if_statement "if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }" if (parenthesized_expression "((ulong)(param_4 - param_3) <= param_5)" ( (binary_expression "(ulong)(param_4 - param_3) <= param_5" (call_expression "(ulong)(param_4 - param_3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_4 - param_3)" ( (binary_expression "param_4 - param_3" identifier - identifier) ))) <= identifier) )) (compound_statement "{\n    param_5 = param_4 - param_3;\n  }" { (expression_statement "param_5 = param_4 - param_3;" (assignment_expression "param_5 = param_4 - param_3" identifier = (binary_expression "param_4 - param_3" identifier - identifier)) ;) })) (return_statement "return param_5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - IDENT) ))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)\n\n{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}" (type_identifier "ulong") (function_declarator "FUN_002c09c0(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)" (identifier "FUN_002c09c0") (parameter_list "(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) (, ",") (parameter_declaration "long param_4" (sized_type_specifier "long" (long "long")) (identifier "param_4")) (, ",") (parameter_declaration "ulong param_5" (type_identifier "ulong") (identifier "param_5")) () ")"))) (compound_statement "{\n  if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }\n  return param_5;\n}" ({ "{") (if_statement "if ((ulong)(param_4 - param_3) <= param_5) {\n    param_5 = param_4 - param_3;\n  }" (if "if") (parenthesized_expression "((ulong)(param_4 - param_3) <= param_5)" (( "(") (binary_expression "(ulong)(param_4 - param_3) <= param_5" (call_expression "(ulong)(param_4 - param_3)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(param_4 - param_3)" (( "(") (binary_expression "param_4 - param_3" (identifier "param_4") (- "-") (identifier "param_3")) () ")"))) (<= "<=") (identifier "param_5")) () ")")) (compound_statement "{\n    param_5 = param_4 - param_3;\n  }" ({ "{") (expression_statement "param_5 = param_4 - param_3;" (assignment_expression "param_5 = param_4 - param_3" (identifier "param_5") (= "=") (binary_expression "param_4 - param_3" (identifier "param_4") (- "-") (identifier "param_3"))) (; ";")) (} "}"))) (return_statement "return param_5;" (return "return") (identifier "param_5") (; ";")) (} "}")))

/* std::codecvt<char, char, __mbstate_t>::do_length(__mbstate_t&, char const*, char const*, unsigned
   long) const */

type_1 __thiscall
std::type_2<char,char,function_1>::do_length
          (type_2<char,char,function_1> *this,function_1 *param_1,char *function_2,char *var_1,
          type_1 param_4)

{
  if ((type_1)((long)var_1 - (long)function_2) <= param_4) {
    param_4 = (long)var_1 - (long)function_2;
  }
  return param_4;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (return_statement (identifier)))))

ulong MASKED(undefined8 param_1,undefined8 param_2,long param_3,long param_4,ulong param_5)

{
  if ((ulong)(param_4 - param_3) <= param_5) {
    param_5 = param_4 - param_3;
  }
  return param_5;
}

