
/* WARNING: Unknown calling convention */

int sftp_pkt_getuint32(sftp_packet *pkt,ulong *ret)

{
  uint uVar1;
  byte *pbVar2;
  
  uVar1 = pkt->savedpos;
  if (3 < pkt->length - uVar1) {
    pbVar2 = (byte *)(pkt->data + uVar1);
    *ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8;
    pkt->savedpos = uVar1 + 4;
    return 1;
  }
  return 0;
}



undefined4 FUN_00032850(int *param_1,uint *param_2)

{
  int iVar1;
  byte *pbVar2;
  
  iVar1 = param_1[3];
  if (3 < (uint)(param_1[1] - iVar1)) {
    pbVar2 = (byte *)(*param_1 + iVar1);
    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |
               (uint)pbVar2[2] << 8;
    param_1[3] = iVar1 + 4;
    return 1;
  }
  return 0;
}


lw v1,0xc(a0)
lw v0,0x4(a0)
subu v0,v0,v1
sltiu v0,v0,0x4
bne v0,zero,0x000328a8
_addiu t0,v1,0x4
lw a2,0x0(a0)
li v0,0x1
addu a2,a2,v1
lbu v1,0x0(a2)
lbu a3,0x1(a2)
lbu t1,0x3(a2)
lbu a2,0x2(a2)
sll v1,v1,0x18
sll a3,a3,0x10
or v1,v1,t1
sll a2,a2,0x8
or v1,v1,a3
or v1,v1,a2
sw v1,0x0(a1)
jr ra
_sw t0,0xc(a0)
jr ra
_or v0,zero,zero
(translation_unit "undefined4 FUN_00032850(int *param_1,uint *param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00032850(int *param_1,uint *param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00032850(int *param_1,uint *param_2)" identifier (parameter_list "(int *param_1,uint *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (expression_statement "iVar1 = param_1[3];" (assignment_expression "iVar1 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (if_statement "if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }" if (parenthesized_expression "(3 < (uint)(param_1[1] - iVar1))" ( (binary_expression "3 < (uint)(param_1[1] - iVar1)" number_literal < (call_expression "(uint)(param_1[1] - iVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - iVar1)" ( (binary_expression "param_1[1] - iVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier) )))) )) (compound_statement "{\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }" { (expression_statement "pbVar2 = (byte *)(*param_1 + iVar1);" (assignment_expression "pbVar2 = (byte *)(*param_1 + iVar1)" identifier = (cast_expression "(byte *)(*param_1 + iVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar1)" ( (binary_expression "*param_1 + iVar1" (pointer_expression "*param_1" * identifier) + identifier) )))) ;) (expression_statement "*param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;" (assignment_expression "*param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8" (pointer_expression "*param_2" * identifier) = (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (cast_expression "(uint)pbVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[1]" identifier [ number_literal ])) << number_literal)) | (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "param_1[3] = iVar1 + 4;" (assignment_expression "param_1[3] = iVar1 + 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) = (binary_expression "iVar1 + 4" identifier + number_literal)) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint sftp_pkt_getuint32(sftp_packet *pkt,ulong *ret)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  \n  uVar1 = pkt->savedpos;\n  if (3 < pkt->length - uVar1) {\n    pbVar2 = (byte *)(pkt->data + uVar1);\n    *ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8;\n    pkt->savedpos = uVar1 + 4;\n    return 1;\n  }\n  return 0;\n}\n\n" comment (function_definition "int sftp_pkt_getuint32(sftp_packet *pkt,ulong *ret)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  \n  uVar1 = pkt->savedpos;\n  if (3 < pkt->length - uVar1) {\n    pbVar2 = (byte *)(pkt->data + uVar1);\n    *ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8;\n    pkt->savedpos = uVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" primitive_type (function_declarator "sftp_pkt_getuint32(sftp_packet *pkt,ulong *ret)" identifier (parameter_list "(sftp_packet *pkt,ulong *ret)" ( (parameter_declaration "sftp_packet *pkt" type_identifier (pointer_declarator "*pkt" * identifier)) , (parameter_declaration "ulong *ret" type_identifier (pointer_declarator "*ret" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  byte *pbVar2;\n  \n  uVar1 = pkt->savedpos;\n  if (3 < pkt->length - uVar1) {\n    pbVar2 = (byte *)(pkt->data + uVar1);\n    *ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8;\n    pkt->savedpos = uVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (expression_statement "uVar1 = pkt->savedpos;" (assignment_expression "uVar1 = pkt->savedpos" identifier = (field_expression "pkt->savedpos" identifier -> field_identifier)) ;) (if_statement "if (3 < pkt->length - uVar1) {\n    pbVar2 = (byte *)(pkt->data + uVar1);\n    *ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8;\n    pkt->savedpos = uVar1 + 4;\n    return 1;\n  }" if (parenthesized_expression "(3 < pkt->length - uVar1)" ( (binary_expression "3 < pkt->length - uVar1" number_literal < (binary_expression "pkt->length - uVar1" (field_expression "pkt->length" identifier -> field_identifier) - identifier)) )) (compound_statement "{\n    pbVar2 = (byte *)(pkt->data + uVar1);\n    *ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8;\n    pkt->savedpos = uVar1 + 4;\n    return 1;\n  }" { (expression_statement "pbVar2 = (byte *)(pkt->data + uVar1);" (assignment_expression "pbVar2 = (byte *)(pkt->data + uVar1)" identifier = (cast_expression "(byte *)(pkt->data + uVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pkt->data + uVar1)" ( (binary_expression "pkt->data + uVar1" (field_expression "pkt->data" identifier -> field_identifier) + identifier) )))) ;) (expression_statement "*ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8;" (assignment_expression "*ret = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8" (pointer_expression "*ret" * identifier) = (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (cast_expression "(uint)pbVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[1]" identifier [ number_literal ])) << number_literal)) | (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "pkt->savedpos = uVar1 + 4;" (assignment_expression "pkt->savedpos = uVar1 + 4" (field_expression "pkt->savedpos" identifier -> field_identifier) = (binary_expression "uVar1 + 4" identifier + number_literal)) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00032850(int *param_1,uint *param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00032850(int *param_1,uint *param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00032850(int *param_1,uint *param_2)" identifier (parameter_list "(int *param_1,uint *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (expression_statement "iVar1 = param_1[3];" (assignment_expression "iVar1 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (if_statement "if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }" if (parenthesized_expression "(3 < (uint)(param_1[1] - iVar1))" ( (binary_expression "3 < (uint)(param_1[1] - iVar1)" number_literal < (call_expression "(uint)(param_1[1] - iVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - iVar1)" ( (binary_expression "param_1[1] - iVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier) )))) )) (compound_statement "{\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }" { (expression_statement "pbVar2 = (byte *)(*param_1 + iVar1);" (assignment_expression "pbVar2 = (byte *)(*param_1 + iVar1)" identifier = (cast_expression "(byte *)(*param_1 + iVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar1)" ( (binary_expression "*param_1 + iVar1" (pointer_expression "*param_1" * identifier) + identifier) )))) ;) (expression_statement "*param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;" (assignment_expression "*param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8" (pointer_expression "*param_2" * identifier) = (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (cast_expression "(uint)pbVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[1]" identifier [ number_literal ])) << number_literal)) | (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "param_1[3] = iVar1 + 4;" (assignment_expression "param_1[3] = iVar1 + 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) = (binary_expression "iVar1 + 4" identifier + number_literal)) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) << LIT) | (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT)) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00032850(int *param_1,uint *param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00032850(int *param_1,uint *param_2)" (identifier "FUN_00032850") (parameter_list "(int *param_1,uint *param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint *param_2" (type_identifier "uint") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  \n  iVar1 = param_1[3];\n  if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (expression_statement "iVar1 = param_1[3];" (assignment_expression "iVar1 = param_1[3]" (identifier "iVar1") (= "=") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]"))) (; ";")) (if_statement "if (3 < (uint)(param_1[1] - iVar1)) {\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }" (if "if") (parenthesized_expression "(3 < (uint)(param_1[1] - iVar1))" (( "(") (binary_expression "3 < (uint)(param_1[1] - iVar1)" (number_literal "3") (< "<") (call_expression "(uint)(param_1[1] - iVar1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] - iVar1)" (( "(") (binary_expression "param_1[1] - iVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (identifier "iVar1")) () ")")))) () ")")) (compound_statement "{\n    pbVar2 = (byte *)(*param_1 + iVar1);\n    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;\n    param_1[3] = iVar1 + 4;\n    return 1;\n  }" ({ "{") (expression_statement "pbVar2 = (byte *)(*param_1 + iVar1);" (assignment_expression "pbVar2 = (byte *)(*param_1 + iVar1)" (identifier "pbVar2") (= "=") (cast_expression "(byte *)(*param_1 + iVar1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + iVar1)" (( "(") (binary_expression "*param_1 + iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "iVar1")) () ")")))) (; ";")) (expression_statement "*param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8;" (assignment_expression "*param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |\n               (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar2")) (<< "<<") (number_literal "0x18")) (| "|") (cast_expression "(uint)pbVar2[3]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar2[3]" (identifier "pbVar2") ([ "[") (number_literal "3") (] "]")))) (| "|") (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar2[1]" (identifier "pbVar2") ([ "[") (number_literal "1") (] "]"))) (<< "<<") (number_literal "0x10"))) (| "|") (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar2[2]" (identifier "pbVar2") ([ "[") (number_literal "2") (] "]"))) (<< "<<") (number_literal "8")))) (; ";")) (expression_statement "param_1[3] = iVar1 + 4;" (assignment_expression "param_1[3] = iVar1 + 4" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(type_1 *pkt,type_2 *ret)

{
  type_3 var_1;
  type_4 *var_2;
  
  var_1 = pkt->savedpos;
  if (3 < pkt->length - var_1) {
    var_2 = (type_4 *)(pkt->data + var_1);
    *ret = (type_3)*var_2 << 0x18 | (type_3)var_2[3] | (type_3)var_2[1] << 0x10 | (type_3)var_2[2] << 8;
    pkt->savedpos = var_1 + 4;
    return 1;
  }
  return 0;
}


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

undefined4 MASKED(int *param_1,uint *param_2)

{
  int iVar1;
  byte *pbVar2;
  
  iVar1 = param_1[3];
  if (3 < (uint)(param_1[1] - iVar1)) {
    pbVar2 = (byte *)(*param_1 + iVar1);
    *param_2 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[3] | (uint)pbVar2[1] << 0x10 |
               (uint)pbVar2[2] << 8;
    param_1[3] = iVar1 + 4;
    return 1;
  }
  return 0;
}

