
int u32tochar(ulong x,char *s)

{
  char cVar1;
  char cVar2;
  
  cVar2 = (char)x;
  if (x < 0x100) {
    *s = cVar2;
    s[1] = '\0';
    return 1;
  }
  cVar1 = (char)(x >> 8);
  if (x < 0x10000) {
    *s = cVar1;
    s[1] = cVar2;
    s[2] = '\0';
    return 2;
  }
  s[2] = cVar1;
  s[3] = cVar2;
  *s = (char)(x >> 0x18);
  s[1] = (char)(x >> 0x10);
  s[4] = '\0';
  return 4;
}



undefined4 u32tochar(uint param_1,undefined1 *param_2)

{
  undefined1 uVar1;
  undefined1 uVar2;
  
  uVar2 = (undefined1)param_1;
  if (param_1 < 0x100) {
    *param_2 = uVar2;
    param_2[1] = 0;
    return 1;
  }
  uVar1 = (undefined1)(param_1 >> 8);
  if (param_1 < 0x10000) {
    *param_2 = uVar1;
    param_2[1] = uVar2;
    param_2[2] = 0;
    return 2;
  }
  param_2[2] = uVar1;
  param_2[3] = uVar2;
  *param_2 = (char)(param_1 >> 0x18);
  param_2[1] = (char)(param_1 >> 0x10);
  param_2[4] = 0;
  return 4;
}


sltiu v0,a0,0x100
bne v0,zero,0x000de778
_seb a2,a0
lui v1,0x1
srl v0,a0,0x8
sltu v1,a0,v1
beq v1,zero,0x000de790
_seb v0,v0
li v1,0x2
sb v0,0x0(a1)
sb a2,0x1(a1)
li v0,0x2
addu a1,a1,v1
jr ra
_sb zero,0x0(a1)
li v1,0x1
sb a2,0x0(a1)
li v0,0x1
addu a1,a1,v1
jr ra
_sb zero,0x0(a1)
srl v1,a0,0x18
sb v0,0x2(a1)
srl a0,a0,0x10
sb a2,0x3(a1)
sb v1,0x0(a1)
li v1,0x4
sb a0,0x1(a1)
li v0,0x4
addu a1,a1,v1
jr ra
_sb zero,0x0(a1)
(translation_unit "undefined4 u32tochar(uint param_1,undefined1 *param_2)\n\n{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}\n\n" (function_definition "undefined4 u32tochar(uint param_1,undefined1 *param_2)\n\n{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}" type_identifier (function_declarator "u32tochar(uint param_1,undefined1 *param_2)" identifier (parameter_list "(uint param_1,undefined1 *param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "undefined1 uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = (undefined1)param_1;" (assignment_expression "uVar2 = (undefined1)param_1" identifier = (cast_expression "(undefined1)param_1" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (if_statement "if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }" if (parenthesized_expression "(param_1 < 0x100)" ( (binary_expression "param_1 < 0x100" identifier < number_literal) )) (compound_statement "{\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }" { (expression_statement "*param_2 = uVar2;" (assignment_expression "*param_2 = uVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar1 = (undefined1)(param_1 >> 8);" (assignment_expression "uVar1 = (undefined1)(param_1 >> 8)" identifier = (call_expression "(undefined1)(param_1 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(param_1 >> 8)" ( (binary_expression "param_1 >> 8" identifier >> number_literal) )))) ;) (if_statement "if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }" if (parenthesized_expression "(param_1 < 0x10000)" ( (binary_expression "param_1 < 0x10000" identifier < number_literal) )) (compound_statement "{\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }" { (expression_statement "*param_2 = uVar1;" (assignment_expression "*param_2 = uVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "param_2[1] = uVar2;" (assignment_expression "param_2[1] = uVar2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "param_2[2] = uVar1;" (assignment_expression "param_2[2] = uVar1" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[3] = uVar2;" (assignment_expression "param_2[3] = uVar2" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = (char)(param_1 >> 0x18);" (assignment_expression "*param_2 = (char)(param_1 >> 0x18)" (pointer_expression "*param_2" * identifier) = (cast_expression "(char)(param_1 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_1 >> 0x18)" ( (binary_expression "param_1 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "param_2[1] = (char)(param_1 >> 0x10);" (assignment_expression "param_2[1] = (char)(param_1 >> 0x10)" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (cast_expression "(char)(param_1 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_1 >> 0x10)" ( (binary_expression "param_1 >> 0x10" identifier >> number_literal) )))) ;) (expression_statement "param_2[4] = 0;" (assignment_expression "param_2[4] = 0" (subscript_expression "param_2[4]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 4;" return number_literal ;) })))
(translation_unit "int u32tochar(ulong x,char *s)\n\n{\n  char cVar1;\n  char cVar2;\n  \n  cVar2 = (char)x;\n  if (x < 0x100) {\n    *s = cVar2;\n    s[1] = '\0';\n    return 1;\n  }\n  cVar1 = (char)(x >> 8);\n  if (x < 0x10000) {\n    *s = cVar1;\n    s[1] = cVar2;\n    s[2] = '\0';\n    return 2;\n  }\n  s[2] = cVar1;\n  s[3] = cVar2;\n  *s = (char)(x >> 0x18);\n  s[1] = (char)(x >> 0x10);\n  s[4] = '\0';\n  return 4;\n}\n\n" (function_definition "int u32tochar(ulong x,char *s)\n\n{\n  char cVar1;\n  char cVar2;\n  \n  cVar2 = (char)x;\n  if (x < 0x100) {\n    *s = cVar2;\n    s[1] = '\0';\n    return 1;\n  }\n  cVar1 = (char)(x >> 8);\n  if (x < 0x10000) {\n    *s = cVar1;\n    s[1] = cVar2;\n    s[2] = '\0';\n    return 2;\n  }\n  s[2] = cVar1;\n  s[3] = cVar2;\n  *s = (char)(x >> 0x18);\n  s[1] = (char)(x >> 0x10);\n  s[4] = '\0';\n  return 4;\n}" primitive_type (function_declarator "u32tochar(ulong x,char *s)" identifier (parameter_list "(ulong x,char *s)" ( (parameter_declaration "ulong x" type_identifier identifier) , (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  char cVar2;\n  \n  cVar2 = (char)x;\n  if (x < 0x100) {\n    *s = cVar2;\n    s[1] = '\0';\n    return 1;\n  }\n  cVar1 = (char)(x >> 8);\n  if (x < 0x10000) {\n    *s = cVar1;\n    s[1] = cVar2;\n    s[2] = '\0';\n    return 2;\n  }\n  s[2] = cVar1;\n  s[3] = cVar2;\n  *s = (char)(x >> 0x18);\n  s[1] = (char)(x >> 0x10);\n  s[4] = '\0';\n  return 4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (expression_statement "cVar2 = (char)x;" (assignment_expression "cVar2 = (char)x" identifier = (cast_expression "(char)x" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if (x < 0x100) {\n    *s = cVar2;\n    s[1] = '\0';\n    return 1;\n  }" if (parenthesized_expression "(x < 0x100)" ( (binary_expression "x < 0x100" identifier < number_literal) )) (compound_statement "{\n    *s = cVar2;\n    s[1] = '\0';\n    return 1;\n  }" { (expression_statement "*s = cVar2;" (assignment_expression "*s = cVar2" (pointer_expression "*s" * identifier) = identifier) ;) (expression_statement "s[1] = '\0';" (assignment_expression "s[1] = '\0'" (subscript_expression "s[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "cVar1 = (char)(x >> 8);" (assignment_expression "cVar1 = (char)(x >> 8)" identifier = (cast_expression "(char)(x >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(x >> 8)" ( (binary_expression "x >> 8" identifier >> number_literal) )))) ;) (if_statement "if (x < 0x10000) {\n    *s = cVar1;\n    s[1] = cVar2;\n    s[2] = '\0';\n    return 2;\n  }" if (parenthesized_expression "(x < 0x10000)" ( (binary_expression "x < 0x10000" identifier < number_literal) )) (compound_statement "{\n    *s = cVar1;\n    s[1] = cVar2;\n    s[2] = '\0';\n    return 2;\n  }" { (expression_statement "*s = cVar1;" (assignment_expression "*s = cVar1" (pointer_expression "*s" * identifier) = identifier) ;) (expression_statement "s[1] = cVar2;" (assignment_expression "s[1] = cVar2" (subscript_expression "s[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "s[2] = '\0';" (assignment_expression "s[2] = '\0'" (subscript_expression "s[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "s[2] = cVar1;" (assignment_expression "s[2] = cVar1" (subscript_expression "s[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "s[3] = cVar2;" (assignment_expression "s[3] = cVar2" (subscript_expression "s[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*s = (char)(x >> 0x18);" (assignment_expression "*s = (char)(x >> 0x18)" (pointer_expression "*s" * identifier) = (cast_expression "(char)(x >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(x >> 0x18)" ( (binary_expression "x >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "s[1] = (char)(x >> 0x10);" (assignment_expression "s[1] = (char)(x >> 0x10)" (subscript_expression "s[1]" identifier [ number_literal ]) = (cast_expression "(char)(x >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(x >> 0x10)" ( (binary_expression "x >> 0x10" identifier >> number_literal) )))) ;) (expression_statement "s[4] = '\0';" (assignment_expression "s[4] = '\0'" (subscript_expression "s[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return 4;" return number_literal ;) })))
(translation_unit "undefined4 u32tochar(uint param_1,undefined1 *param_2)\n\n{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}\n\n" (function_definition "undefined4 u32tochar(uint param_1,undefined1 *param_2)\n\n{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}" type_identifier (function_declarator "u32tochar(uint param_1,undefined1 *param_2)" identifier (parameter_list "(uint param_1,undefined1 *param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "undefined1 uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = (undefined1)param_1;" (assignment_expression "uVar2 = (undefined1)param_1" identifier = (cast_expression "(undefined1)param_1" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (if_statement "if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }" if (parenthesized_expression "(param_1 < 0x100)" ( (binary_expression "param_1 < 0x100" identifier < number_literal) )) (compound_statement "{\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }" { (expression_statement "*param_2 = uVar2;" (assignment_expression "*param_2 = uVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar1 = (undefined1)(param_1 >> 8);" (assignment_expression "uVar1 = (undefined1)(param_1 >> 8)" identifier = (call_expression "(undefined1)(param_1 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(param_1 >> 8)" ( (binary_expression "param_1 >> 8" identifier >> number_literal) )))) ;) (if_statement "if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }" if (parenthesized_expression "(param_1 < 0x10000)" ( (binary_expression "param_1 < 0x10000" identifier < number_literal) )) (compound_statement "{\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }" { (expression_statement "*param_2 = uVar1;" (assignment_expression "*param_2 = uVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "param_2[1] = uVar2;" (assignment_expression "param_2[1] = uVar2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "param_2[2] = uVar1;" (assignment_expression "param_2[2] = uVar1" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[3] = uVar2;" (assignment_expression "param_2[3] = uVar2" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = (char)(param_1 >> 0x18);" (assignment_expression "*param_2 = (char)(param_1 >> 0x18)" (pointer_expression "*param_2" * identifier) = (cast_expression "(char)(param_1 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_1 >> 0x18)" ( (binary_expression "param_1 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "param_2[1] = (char)(param_1 >> 0x10);" (assignment_expression "param_2[1] = (char)(param_1 >> 0x10)" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (cast_expression "(char)(param_1 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_1 >> 0x10)" ( (binary_expression "param_1 >> 0x10" identifier >> number_literal) )))) ;) (expression_statement "param_2[4] = 0;" (assignment_expression "param_2[4] = 0" (subscript_expression "param_2[4]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 4;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 u32tochar(uint param_1,undefined1 *param_2)\n\n{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}" (type_identifier "undefined4") (function_declarator "u32tochar(uint param_1,undefined1 *param_2)" (identifier "u32tochar") (parameter_list "(uint param_1,undefined1 *param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "undefined1 *param_2" (type_identifier "undefined1") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined1 uVar1;\n  undefined1 uVar2;\n  \n  uVar2 = (undefined1)param_1;\n  if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }\n  uVar1 = (undefined1)(param_1 >> 8);\n  if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }\n  param_2[2] = uVar1;\n  param_2[3] = uVar2;\n  *param_2 = (char)(param_1 >> 0x18);\n  param_2[1] = (char)(param_1 >> 0x10);\n  param_2[4] = 0;\n  return 4;\n}" ({ "{") (declaration "undefined1 uVar1;" (type_identifier "undefined1") (identifier "uVar1") (; ";")) (declaration "undefined1 uVar2;" (type_identifier "undefined1") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = (undefined1)param_1;" (assignment_expression "uVar2 = (undefined1)param_1" (identifier "uVar2") (= "=") (cast_expression "(undefined1)param_1" (( "(") (type_descriptor "undefined1" (type_identifier "undefined1")) () ")") (identifier "param_1"))) (; ";")) (if_statement "if (param_1 < 0x100) {\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }" (if "if") (parenthesized_expression "(param_1 < 0x100)" (( "(") (binary_expression "param_1 < 0x100" (identifier "param_1") (< "<") (number_literal "0x100")) () ")")) (compound_statement "{\n    *param_2 = uVar2;\n    param_2[1] = 0;\n    return 1;\n  }" ({ "{") (expression_statement "*param_2 = uVar2;" (assignment_expression "*param_2 = uVar2" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "uVar1 = (undefined1)(param_1 >> 8);" (assignment_expression "uVar1 = (undefined1)(param_1 >> 8)" (identifier "uVar1") (= "=") (call_expression "(undefined1)(param_1 >> 8)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "(param_1 >> 8)" (( "(") (binary_expression "param_1 >> 8" (identifier "param_1") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (if_statement "if (param_1 < 0x10000) {\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }" (if "if") (parenthesized_expression "(param_1 < 0x10000)" (( "(") (binary_expression "param_1 < 0x10000" (identifier "param_1") (< "<") (number_literal "0x10000")) () ")")) (compound_statement "{\n    *param_2 = uVar1;\n    param_2[1] = uVar2;\n    param_2[2] = 0;\n    return 2;\n  }" ({ "{") (expression_statement "*param_2 = uVar1;" (assignment_expression "*param_2 = uVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "param_2[1] = uVar2;" (assignment_expression "param_2[1] = uVar2" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (expression_statement "param_2[2] = uVar1;" (assignment_expression "param_2[2] = uVar1" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "param_2[3] = uVar2;" (assignment_expression "param_2[3] = uVar2" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*param_2 = (char)(param_1 >> 0x18);" (assignment_expression "*param_2 = (char)(param_1 >> 0x18)" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(char)(param_1 >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(param_1 >> 0x18)" (( "(") (binary_expression "param_1 >> 0x18" (identifier "param_1") (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "param_2[1] = (char)(param_1 >> 0x10);" (assignment_expression "param_2[1] = (char)(param_1 >> 0x10)" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (cast_expression "(char)(param_1 >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(param_1 >> 0x10)" (( "(") (binary_expression "param_1 >> 0x10" (identifier "param_1") (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "param_2[4] = 0;" (assignment_expression "param_2[4] = 0" (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return 4;" (return "return") (number_literal "4") (; ";")) (} "}")))

int function_1(type_1 var_1,char *s)

{
  char cVar1;
  char cVar2;
  
  cVar2 = (char)var_1;
  if (var_1 < 0x100) {
    *s = cVar2;
    s[1] = '\0';
    return 1;
  }
  cVar1 = (char)(var_1 >> 8);
  if (var_1 < 0x10000) {
    *s = cVar1;
    s[1] = cVar2;
    s[2] = '\0';
    return 2;
  }
  s[2] = cVar1;
  s[3] = cVar2;
  *s = (char)(var_1 >> 0x18);
  s[1] = (char)(var_1 >> 0x10);
  s[4] = '\0';
  return 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: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (return_statement (number_literal)))))

undefined4 MASKED(uint param_1,undefined1 *param_2)

{
  undefined1 uVar1;
  undefined1 uVar2;
  
  uVar2 = (undefined1)param_1;
  if (param_1 < 0x100) {
    *param_2 = uVar2;
    param_2[1] = 0;
    return 1;
  }
  uVar1 = (undefined1)(param_1 >> 8);
  if (param_1 < 0x10000) {
    *param_2 = uVar1;
    param_2[1] = uVar2;
    param_2[2] = 0;
    return 2;
  }
  param_2[2] = uVar1;
  param_2[3] = uVar2;
  *param_2 = (char)(param_1 >> 0x18);
  param_2[1] = (char)(param_1 >> 0x10);
  param_2[4] = 0;
  return 4;
}

