
uchar * __regparm3 SHA3Final(SHA3Context *p)

{
  uint uVar1;
  uint uVar2;
  SHA3Context *pSVar3;
  uint uVar4;
  int in_GS_OFFSET;
  uchar c2;
  uchar c1;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (p->nLoaded == p->nRate - 1) {
    c1 = 0x86;
    SHA3Update(p,&c1,1);
  }
  else {
    c2 = '\x06';
    c1 = 0x80;
    SHA3Update(p,&c2,1);
    p->nLoaded = p->nRate - 1;
    SHA3Update(p,&c1,1);
  }
  uVar1 = p->nRate;
  pSVar3 = p;
  if (uVar1 != 0) {
    pSVar3 = (SHA3Context *)((int)&p->u + uVar1);
    uVar2 = p->ixMask;
    uVar4 = 0;
    do {
      (pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];
      uVar4 = uVar4 + 1;
    } while (uVar4 != uVar1);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return (uchar *)pSVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



int __regparm3 FUN_0001ae50(int param_1)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {
    FUN_0001ad60();
  }
  else {
    FUN_0001ad60();
    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;
    FUN_0001ad60();
  }
  uVar2 = *(uint *)(param_1 + 0x640);
  iVar4 = param_1;
  if (uVar2 != 0) {
    iVar4 = param_1 + uVar2;
    uVar3 = *(uint *)(param_1 + 0x648);
    uVar5 = 0;
    do {
      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));
      uVar5 = uVar5 + 1;
    } while (uVar5 != uVar2);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00116110();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
MOV EBX,EAX
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV EAX,dword ptr [EBX + 0x640]
SUB EAX,0x1
CMP dword ptr [EBX + 0x644],EAX
JZ 0x0001af00
LEA EDX,[ESP + 0xa]
MOV ECX,0x1
MOV EAX,EBX
MOV byte ptr [ESP + 0xa],0x6
MOV byte ptr [ESP + 0xb],0x80
CALL 0x0001ad60
MOV EAX,dword ptr [EBX + 0x640]
LEA EDX,[ESP + 0xb]
MOV ECX,0x1
SUB EAX,0x1
MOV dword ptr [EBX + 0x644],EAX
MOV EAX,EBX
CALL 0x0001ad60
MOV ESI,dword ptr [EBX + 0x640]
MOV EAX,EBX
TEST ESI,ESI
JZ 0x0001aee2
LEA EDI,[EBX + ESI*0x1]
MOV EBP,dword ptr [EBX + 0x648]
XOR EDX,EDX
MOV EAX,EDI
LEA ESI,[ESI]
MOV ECX,EBP
XOR ECX,EDX
MOVZX ECX,byte ptr [EBX + ECX*0x1]
MOV byte ptr [EDI + EDX*0x1],CL
ADD EDX,0x1
CMP EDX,ESI
JNZ 0x0001aed0
MOV EDI,dword ptr [ESP + 0xc]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x0001af17
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EDX,[ESP + 0xb]
MOV ECX,0x1
MOV EAX,EBX
MOV byte ptr [ESP + 0xb],0x86
CALL 0x0001ad60
JMP 0x0001aeb3
CALL 0x00116110
(translation_unit "int __regparm3 FUN_0001ae50(int param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}\n\n" (function_definition "int __regparm3 FUN_0001ae50(int param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001ae50(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1)" ( (binary_expression "*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x644)" * (cast_expression "(int *)(param_1 + 0x644)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x644)" ( (binary_expression "param_1 + 0x644" identifier + number_literal) )))) == (binary_expression "*(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x640)" * (cast_expression "(int *)(param_1 + 0x640)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x640)" ( (binary_expression "param_1 + 0x640" identifier + number_literal) )))) + number_literal)) )) (compound_statement "{\n    FUN_0001ad60();\n  }" { (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" else (compound_statement "{\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" { (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;" (assignment_expression "*(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x644)" * (cast_expression "(int *)(param_1 + 0x644)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x644)" ( (binary_expression "param_1 + 0x644" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x640)" * (cast_expression "(int *)(param_1 + 0x640)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x640)" ( (binary_expression "param_1 + 0x640" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "uVar2 = *(uint *)(param_1 + 0x640);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x640)" identifier = (pointer_expression "*(uint *)(param_1 + 0x640)" * (cast_expression "(uint *)(param_1 + 0x640)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x640)" ( (binary_expression "param_1 + 0x640" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = param_1;" (assignment_expression "iVar4 = param_1" identifier = identifier) ;) (if_statement "if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }" { (expression_statement "iVar4 = param_1 + uVar2;" (assignment_expression "iVar4 = param_1 + uVar2" identifier = (binary_expression "param_1 + uVar2" identifier + identifier)) ;) (expression_statement "uVar3 = *(uint *)(param_1 + 0x648);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x648)" identifier = (pointer_expression "*(uint *)(param_1 + 0x648)" * (cast_expression "(uint *)(param_1 + 0x648)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x648)" ( (binary_expression "param_1 + 0x648" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);" do (compound_statement "{\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    }" { (expression_statement "*(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));" (assignment_expression "*(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5))" (pointer_expression "*(undefined1 *)(iVar4 + uVar5)" * (cast_expression "(undefined1 *)(iVar4 + uVar5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + uVar5)" ( (binary_expression "iVar4 + uVar5" identifier + identifier) )))) = (pointer_expression "*(undefined1 *)(param_1 + (uVar3 ^ uVar5))" * (cast_expression "(undefined1 *)(param_1 + (uVar3 ^ uVar5))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + (uVar3 ^ uVar5))" ( (binary_expression "param_1 + (uVar3 ^ uVar5)" identifier + (parenthesized_expression "(uVar3 ^ uVar5)" ( (binary_expression "uVar3 ^ uVar5" identifier ^ identifier) ))) ))))) ;) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != uVar2)" ( (binary_expression "uVar5 != uVar2" identifier != identifier) )) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) comment (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "uchar * __regparm3 SHA3Final(SHA3Context *p)\n\n{\n  uint uVar1;\n  uint uVar2;\n  SHA3Context *pSVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  uchar c2;\n  uchar c1;\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (p->nLoaded == p->nRate - 1) {\n    c1 = 0x86;\n    SHA3Update(p,&c1,1);\n  }\n  else {\n    c2 = '\x06';\n    c1 = 0x80;\n    SHA3Update(p,&c2,1);\n    p->nLoaded = p->nRate - 1;\n    SHA3Update(p,&c1,1);\n  }\n  uVar1 = p->nRate;\n  pSVar3 = p;\n  if (uVar1 != 0) {\n    pSVar3 = (SHA3Context *)((int)&p->u + uVar1);\n    uVar2 = p->ixMask;\n    uVar4 = 0;\n    do {\n      (pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];\n      uVar4 = uVar4 + 1;\n    } while (uVar4 != uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return (uchar *)pSVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" (ERROR "uchar * __regparm3 SHA3Final(SHA3Context *p)" (binary_expression "uchar * __regparm3 SHA3Final(SHA3Context *p)" identifier * (ERROR "__regparm3" identifier) (call_expression "SHA3Final(SHA3Context *p)" identifier (argument_list "(SHA3Context *p)" ( (binary_expression "SHA3Context *p" identifier * identifier) ))))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  SHA3Context *pSVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  uchar c2;\n  uchar c1;\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (p->nLoaded == p->nRate - 1) {\n    c1 = 0x86;\n    SHA3Update(p,&c1,1);\n  }\n  else {\n    c2 = '\x06';\n    c1 = 0x80;\n    SHA3Update(p,&c2,1);\n    p->nLoaded = p->nRate - 1;\n    SHA3Update(p,&c1,1);\n  }\n  uVar1 = p->nRate;\n  pSVar3 = p;\n  if (uVar1 != 0) {\n    pSVar3 = (SHA3Context *)((int)&p->u + uVar1);\n    uVar2 = p->ixMask;\n    uVar4 = 0;\n    do {\n      (pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];\n      uVar4 = uVar4 + 1;\n    } while (uVar4 != uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return (uchar *)pSVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "SHA3Context *pSVar3;" type_identifier (pointer_declarator "*pSVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar c2;" type_identifier identifier ;) (declaration "uchar c1;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (p->nLoaded == p->nRate - 1) {\n    c1 = 0x86;\n    SHA3Update(p,&c1,1);\n  }\n  else {\n    c2 = '\x06';\n    c1 = 0x80;\n    SHA3Update(p,&c2,1);\n    p->nLoaded = p->nRate - 1;\n    SHA3Update(p,&c1,1);\n  }" if (parenthesized_expression "(p->nLoaded == p->nRate - 1)" ( (binary_expression "p->nLoaded == p->nRate - 1" (field_expression "p->nLoaded" identifier -> field_identifier) == (binary_expression "p->nRate - 1" (field_expression "p->nRate" identifier -> field_identifier) - number_literal)) )) (compound_statement "{\n    c1 = 0x86;\n    SHA3Update(p,&c1,1);\n  }" { (expression_statement "c1 = 0x86;" (assignment_expression "c1 = 0x86" identifier = number_literal) ;) (expression_statement "SHA3Update(p,&c1,1);" (call_expression "SHA3Update(p,&c1,1)" identifier (argument_list "(p,&c1,1)" ( identifier , (pointer_expression "&c1" & identifier) , number_literal ))) ;) }) (else_clause "else {\n    c2 = '\x06';\n    c1 = 0x80;\n    SHA3Update(p,&c2,1);\n    p->nLoaded = p->nRate - 1;\n    SHA3Update(p,&c1,1);\n  }" else (compound_statement "{\n    c2 = '\x06';\n    c1 = 0x80;\n    SHA3Update(p,&c2,1);\n    p->nLoaded = p->nRate - 1;\n    SHA3Update(p,&c1,1);\n  }" { (expression_statement "c2 = '\x06';" (assignment_expression "c2 = '\x06'" identifier = (char_literal "'\x06'" ' escape_sequence ')) ;) (expression_statement "c1 = 0x80;" (assignment_expression "c1 = 0x80" identifier = number_literal) ;) (expression_statement "SHA3Update(p,&c2,1);" (call_expression "SHA3Update(p,&c2,1)" identifier (argument_list "(p,&c2,1)" ( identifier , (pointer_expression "&c2" & identifier) , number_literal ))) ;) (expression_statement "p->nLoaded = p->nRate - 1;" (assignment_expression "p->nLoaded = p->nRate - 1" (field_expression "p->nLoaded" identifier -> field_identifier) = (binary_expression "p->nRate - 1" (field_expression "p->nRate" identifier -> field_identifier) - number_literal)) ;) (expression_statement "SHA3Update(p,&c1,1);" (call_expression "SHA3Update(p,&c1,1)" identifier (argument_list "(p,&c1,1)" ( identifier , (pointer_expression "&c1" & identifier) , number_literal ))) ;) }))) (expression_statement "uVar1 = p->nRate;" (assignment_expression "uVar1 = p->nRate" identifier = (field_expression "p->nRate" identifier -> field_identifier)) ;) (expression_statement "pSVar3 = p;" (assignment_expression "pSVar3 = p" identifier = identifier) ;) (if_statement "if (uVar1 != 0) {\n    pSVar3 = (SHA3Context *)((int)&p->u + uVar1);\n    uVar2 = p->ixMask;\n    uVar4 = 0;\n    do {\n      (pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];\n      uVar4 = uVar4 + 1;\n    } while (uVar4 != uVar1);\n  }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    pSVar3 = (SHA3Context *)((int)&p->u + uVar1);\n    uVar2 = p->ixMask;\n    uVar4 = 0;\n    do {\n      (pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];\n      uVar4 = uVar4 + 1;\n    } while (uVar4 != uVar1);\n  }" { (expression_statement "pSVar3 = (SHA3Context *)((int)&p->u + uVar1);" (assignment_expression "pSVar3 = (SHA3Context *)((int)&p->u + uVar1)" identifier = (cast_expression "(SHA3Context *)((int)&p->u + uVar1)" ( (type_descriptor "SHA3Context *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->u + uVar1)" ( (binary_expression "(int)&p->u + uVar1" (cast_expression "(int)&p->u" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->u" & (field_expression "p->u" identifier -> field_identifier))) + identifier) )))) ;) (expression_statement "uVar2 = p->ixMask;" (assignment_expression "uVar2 = p->ixMask" identifier = (field_expression "p->ixMask" identifier -> field_identifier)) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      (pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];\n      uVar4 = uVar4 + 1;\n    } while (uVar4 != uVar1);" do (compound_statement "{\n      (pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];\n      uVar4 = uVar4 + 1;\n    }" { (expression_statement "(pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4];" (assignment_expression "(pSVar3->u).x[uVar4] = (p->u).x[uVar2 ^ uVar4]" (subscript_expression "(pSVar3->u).x[uVar4]" (field_expression "(pSVar3->u).x" (parenthesized_expression "(pSVar3->u)" ( (field_expression "pSVar3->u" identifier -> field_identifier) )) . field_identifier) [ identifier ]) = (subscript_expression "(p->u).x[uVar2 ^ uVar4]" (field_expression "(p->u).x" (parenthesized_expression "(p->u)" ( (field_expression "p->u" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar2 ^ uVar4" identifier ^ identifier) ])) ;) (expression_statement "uVar4 = uVar4 + 1;" (assignment_expression "uVar4 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != uVar1)" ( (binary_expression "uVar4 != uVar1" identifier != identifier) )) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return (uchar *)pSVar3;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return (uchar *)pSVar3;\n  }" { (return_statement "return (uchar *)pSVar3;" return (cast_expression "(uchar *)pSVar3" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))
(translation_unit "int __regparm3 FUN_0001ae50(int param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00116110();\n}\n\n" (function_definition "int __regparm3 FUN_0001ae50(int param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00116110();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001ae50(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00116110();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1)" ( (binary_expression "*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x644)" * (cast_expression "(int *)(param_1 + 0x644)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x644)" ( (binary_expression "param_1 + 0x644" identifier + number_literal) )))) == (binary_expression "*(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x640)" * (cast_expression "(int *)(param_1 + 0x640)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x640)" ( (binary_expression "param_1 + 0x640" identifier + number_literal) )))) + number_literal)) )) (compound_statement "{\n    FUN_0001ad60();\n  }" { (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" else (compound_statement "{\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" { (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;" (assignment_expression "*(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x644)" * (cast_expression "(int *)(param_1 + 0x644)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x644)" ( (binary_expression "param_1 + 0x644" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x640)" * (cast_expression "(int *)(param_1 + 0x640)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x640)" ( (binary_expression "param_1 + 0x640" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "uVar2 = *(uint *)(param_1 + 0x640);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x640)" identifier = (pointer_expression "*(uint *)(param_1 + 0x640)" * (cast_expression "(uint *)(param_1 + 0x640)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x640)" ( (binary_expression "param_1 + 0x640" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = param_1;" (assignment_expression "iVar4 = param_1" identifier = identifier) ;) (if_statement "if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }" { (expression_statement "iVar4 = param_1 + uVar2;" (assignment_expression "iVar4 = param_1 + uVar2" identifier = (binary_expression "param_1 + uVar2" identifier + identifier)) ;) (expression_statement "uVar3 = *(uint *)(param_1 + 0x648);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x648)" identifier = (pointer_expression "*(uint *)(param_1 + 0x648)" * (cast_expression "(uint *)(param_1 + 0x648)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x648)" ( (binary_expression "param_1 + 0x648" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);" do (compound_statement "{\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    }" { (expression_statement "*(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));" (assignment_expression "*(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5))" (pointer_expression "*(undefined1 *)(iVar4 + uVar5)" * (cast_expression "(undefined1 *)(iVar4 + uVar5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + uVar5)" ( (binary_expression "iVar4 + uVar5" identifier + identifier) )))) = (pointer_expression "*(undefined1 *)(param_1 + (uVar3 ^ uVar5))" * (cast_expression "(undefined1 *)(param_1 + (uVar3 ^ uVar5))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + (uVar3 ^ uVar5))" ( (binary_expression "param_1 + (uVar3 ^ uVar5)" identifier + (parenthesized_expression "(uVar3 ^ uVar5)" ( (binary_expression "uVar3 ^ uVar5" identifier ^ identifier) ))) ))))) ;) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != uVar2)" ( (binary_expression "uVar5 != uVar2" identifier != identifier) )) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT ^ IDENT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int __regparm3 FUN_0001ae50(int param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00116110();\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001ae50(int param_1)" (identifier "FUN_0001ae50") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }\n  uVar2 = *(uint *)(param_1 + 0x640);\n  iVar4 = param_1;\n  if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00116110();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {\n    FUN_0001ad60();\n  }\n  else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1)" (( "(") (binary_expression "*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x644)" (* "*") (cast_expression "(int *)(param_1 + 0x644)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x644)" (( "(") (binary_expression "param_1 + 0x644" (identifier "param_1") (+ "+") (number_literal "0x644")) () ")")))) (== "==") (binary_expression "*(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x640)" (* "*") (cast_expression "(int *)(param_1 + 0x640)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x640)" (( "(") (binary_expression "param_1 + 0x640" (identifier "param_1") (+ "+") (number_literal "0x640")) () ")")))) (+ "+") (number_literal "-1"))) () ")")) (compound_statement "{\n    FUN_0001ad60();\n  }" ({ "{") (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" (identifier "FUN_0001ad60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" (else "else") (compound_statement "{\n    FUN_0001ad60();\n    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;\n    FUN_0001ad60();\n  }" ({ "{") (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" (identifier "FUN_0001ad60") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;" (assignment_expression "*(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x644)" (* "*") (cast_expression "(int *)(param_1 + 0x644)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x644)" (( "(") (binary_expression "param_1 + 0x644" (identifier "param_1") (+ "+") (number_literal "0x644")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x640) + -1" (pointer_expression "*(int *)(param_1 + 0x640)" (* "*") (cast_expression "(int *)(param_1 + 0x640)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x640)" (( "(") (binary_expression "param_1 + 0x640" (identifier "param_1") (+ "+") (number_literal "0x640")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "FUN_0001ad60();" (call_expression "FUN_0001ad60()" (identifier "FUN_0001ad60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (expression_statement "uVar2 = *(uint *)(param_1 + 0x640);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x640)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 0x640)" (* "*") (cast_expression "(uint *)(param_1 + 0x640)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x640)" (( "(") (binary_expression "param_1 + 0x640" (identifier "param_1") (+ "+") (number_literal "0x640")) () ")"))))) (; ";")) (expression_statement "iVar4 = param_1;" (assignment_expression "iVar4 = param_1" (identifier "iVar4") (= "=") (identifier "param_1")) (; ";")) (if_statement "if (uVar2 != 0) {\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }" (if "if") (parenthesized_expression "(uVar2 != 0)" (( "(") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar4 = param_1 + uVar2;\n    uVar3 = *(uint *)(param_1 + 0x648);\n    uVar5 = 0;\n    do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);\n  }" ({ "{") (expression_statement "iVar4 = param_1 + uVar2;" (assignment_expression "iVar4 = param_1 + uVar2" (identifier "iVar4") (= "=") (binary_expression "param_1 + uVar2" (identifier "param_1") (+ "+") (identifier "uVar2"))) (; ";")) (expression_statement "uVar3 = *(uint *)(param_1 + 0x648);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x648)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(param_1 + 0x648)" (* "*") (cast_expression "(uint *)(param_1 + 0x648)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x648)" (( "(") (binary_expression "param_1 + 0x648" (identifier "param_1") (+ "+") (number_literal "0x648")) () ")"))))) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    } while (uVar5 != uVar2);" (do "do") (compound_statement "{\n      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));\n      uVar5 = uVar5 + 1;\n    }" ({ "{") (expression_statement "*(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));" (assignment_expression "*(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5))" (pointer_expression "*(undefined1 *)(iVar4 + uVar5)" (* "*") (cast_expression "(undefined1 *)(iVar4 + uVar5)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + uVar5)" (( "(") (binary_expression "iVar4 + uVar5" (identifier "iVar4") (+ "+") (identifier "uVar5")) () ")")))) (= "=") (pointer_expression "*(undefined1 *)(param_1 + (uVar3 ^ uVar5))" (* "*") (cast_expression "(undefined1 *)(param_1 + (uVar3 ^ uVar5))" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + (uVar3 ^ uVar5))" (( "(") (binary_expression "param_1 + (uVar3 ^ uVar5)" (identifier "param_1") (+ "+") (parenthesized_expression "(uVar3 ^ uVar5)" (( "(") (binary_expression "uVar3 ^ uVar5" (identifier "uVar3") (^ "^") (identifier "uVar5")) () ")"))) () ")"))))) (; ";")) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 != uVar2)" (( "(") (binary_expression "uVar5 != uVar2" (identifier "uVar5") (!= "!=") (identifier "uVar2")) () ")")) (; ";")) (} "}"))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar4;\n  }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" (identifier "FUN_00116110") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

type_3 * __regparm3 SHA3Final(type_2 *p)

{
  type_1 var_3;
  type_1 var_4;
  type_2 *pSVar3;
  type_1 var_5;
  int var_1;
  type_3 c2;
  type_3 c1;
  int var_6;
  
  var_6 = *(int *)(var_1 + 0x14);
  if (p->nLoaded == p->nRate - 1) {
    c1 = 0x86;
    var_2(p,&c1,1);
  }
  else {
    c2 = '\x06';
    c1 = 0x80;
    var_2(p,&c2,1);
    p->nLoaded = p->nRate - 1;
    var_2(p,&c1,1);
  }
  var_3 = p->nRate;
  pSVar3 = p;
  if (var_3 != 0) {
    pSVar3 = (type_2 *)((int)&p->u + var_3);
    var_4 = p->ixMask;
    var_5 = 0;
    do {
      (pSVar3->u).x[var_5] = (p->u).x[var_4 ^ var_5];
      var_5 = var_5 + 1;
    } while (var_5 != var_3);
  }
  if (var_6 == *(int *)(var_1 + 0x14)) {
    return (type_3 *)pSVar3;
  }
                    /* WARNING: Subroutine does not return */
  var_7();
}


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

int __regparm3 MASKED(int param_1)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(param_1 + 0x644) == *(int *)(param_1 + 0x640) + -1) {
    FUN_0001ad60();
  }
  else {
    FUN_0001ad60();
    *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x640) + -1;
    FUN_0001ad60();
  }
  uVar2 = *(uint *)(param_1 + 0x640);
  iVar4 = param_1;
  if (uVar2 != 0) {
    iVar4 = param_1 + uVar2;
    uVar3 = *(uint *)(param_1 + 0x648);
    uVar5 = 0;
    do {
      *(undefined1 *)(iVar4 + uVar5) = *(undefined1 *)(param_1 + (uVar3 ^ uVar5));
      uVar5 = uVar5 + 1;
    } while (uVar5 != uVar2);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00116110();
}

