
int chacha20_prng_add_entropy(uchar *in,ulong inlen,prng_state *prng)

{
  byte bVar1;
  long lVar2;
  uint uVar3;
  int iVar4;
  ulong uVar5;
  ulong uVar6;
  ulong uVar7;
  long in_FS_OFFSET;
  uchar buf [40];
  
  lVar2 = *(long *)(in_FS_OFFSET + 0x28);
  if (prng == (prng_state *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);
  }
  if (in == (uchar *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);
  }
  if (inlen == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);
  }
  if (prng->ready == 0) {
    uVar7 = (prng->field_0).chacha.idx;
    uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3;
    uVar6 = uVar7;
    if (uVar3 == 0) goto LAB_00185d5b;
    uVar5 = uVar7;
    if (uVar3 != 1) {
      if (uVar3 != 2) {
        uVar6 = uVar7 + 1;
        bVar1 = *in;
        (prng->field_0).chacha.idx = uVar6;
        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =
             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;
      }
      bVar1 = in[uVar6 - uVar7];
      uVar5 = uVar6 + 1;
      (prng->field_0).chacha.idx = uVar5;
      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =
           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;
    }
    bVar1 = in[uVar5 - uVar7];
    uVar6 = uVar5 + 1;
    (prng->field_0).chacha.idx = uVar6;
    (prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1;
    for (; uVar6 != inlen + uVar7; uVar6 = uVar6 + 4) {
LAB_00185d5b:
      bVar1 = in[uVar6 - uVar7];
      (prng->field_0).chacha.idx = uVar6 + 1;
      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =
           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;
      bVar1 = in[(uVar6 + 1) - uVar7];
      (prng->field_0).chacha.idx = uVar6 + 2;
      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =
           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;
      bVar1 = in[(uVar6 + 2) - uVar7];
      (prng->field_0).chacha.idx = uVar6 + 3;
      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =
           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;
      bVar1 = in[(uVar6 + 3) - uVar7];
      (prng->field_0).chacha.idx = uVar6 + 4;
      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =
           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;
    }
    iVar4 = 0;
  }
  else {
    iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);
    if (iVar4 == 0) {
      uVar6 = 0;
      uVar3 = (uint)inlen & 3;
      if ((inlen & 3) == 0) goto LAB_00185ee7;
      if (uVar3 != 1) {
        if (uVar3 != 2) {
          buf[0] = buf[0] ^ *in;
        }
        uVar7 = (ulong)(uVar3 != 2);
        uVar6 = uVar7 + 1;
        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];
      }
      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];
      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {
LAB_00185ee7:
        bVar1 = in[uVar6 + 1];
        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];
        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;
        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];
        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];
      }
      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);
      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))
      {
        zeromem(buf,0x28);
      }
    }
  }
  if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar4;
}



ulong chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)

{
  byte *pbVar1;
  byte bVar2;
  uint uVar3;
  ulong uVar4;
  ulong uVar5;
  ulong uVar6;
  long in_FS_OFFSET;
  byte local_58 [32];
  undefined1 local_38 [8];
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_3 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);
  }
  if (param_1 == (byte *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);
  }
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);
  }
  if (*(short *)(param_3 + 0x44f0) == 0) {
    uVar6 = *(ulong *)(param_3 + 0xc0);
    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;
    uVar5 = uVar6;
    if (uVar3 == 0) goto LAB_00185d5b;
    uVar4 = uVar6;
    if (uVar3 != 1) {
      if (uVar3 != 2) {
        uVar5 = uVar6 + 1;
        bVar2 = *param_1;
        *(ulong *)(param_3 + 0xc0) = uVar5;
        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);
        *pbVar1 = *pbVar1 ^ bVar2;
      }
      bVar2 = param_1[uVar5 - uVar6];
      uVar4 = uVar5 + 1;
      *(ulong *)(param_3 + 0xc0) = uVar4;
      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
    }
    bVar2 = param_1[uVar4 - uVar6];
    uVar5 = uVar4 + 1;
    *(ulong *)(param_3 + 0xc0) = uVar5;
    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);
    *pbVar1 = *pbVar1 ^ bVar2;
    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {
LAB_00185d5b:
      bVar2 = param_1[uVar5 - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;
      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
      bVar2 = param_1[(uVar5 + 1) - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;
      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
      bVar2 = param_1[(uVar5 + 2) - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;
      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
      bVar2 = param_1[(uVar5 + 3) - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;
      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
    }
    uVar5 = 0;
  }
  else {
    uVar5 = chacha_keystream(param_3,local_58,0x28);
    if ((int)uVar5 == 0) {
      uVar5 = 0;
      uVar3 = (uint)param_2 & 3;
      if ((param_2 & 3) == 0) goto LAB_00185ee7;
      if (uVar3 != 1) {
        if (uVar3 != 2) {
          local_58[0] = local_58[0] ^ *param_1;
        }
        uVar6 = (ulong)(uVar3 != 2);
        uVar5 = uVar6 + 1;
        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];
      }
      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];
      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {
LAB_00185ee7:
        bVar2 = param_1[uVar5 + 1];
        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];
        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;
        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];
        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];
      }
      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);
      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {
        zeromem(local_58,0x28);
        uVar5 = uVar5 & 0xffffffff;
      }
    }
  }
  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar5;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
TEST RDX,RDX
JZ 0x00186008
MOV RBP,RDI
TEST RDI,RDI
JZ 0x00185ff0
MOV R12,RSI
TEST RSI,RSI
JZ 0x00185fd8
CMP word ptr [RDX + 0x44f0],0x0
MOV RBX,RDX
JNZ 0x00185e48
MOV RCX,qword ptr [RDX + 0xc0]
MOV R10,-0x3333333333333333
LEA RSI,[RSI + RCX*0x1]
SUB RBP,RCX
MOV RAX,RSI
SUB RAX,RCX
AND EAX,0x3
JZ 0x00185d5b
CMP RAX,0x1
JZ 0x00185d21
CMP RAX,0x2
JZ 0x00185cf0
LEA R8,[RCX + 0x1]
MOV RAX,RCX
MOVZX R9D,byte ptr [RBP + RCX*0x1]
MOV qword ptr [RDX + 0xc0],R8
MUL R10
SHR RDX,0x5
LEA RDI,[RDX + RDX*0x4]
SHL RDI,0x3
SUB RCX,RDI
XOR byte ptr [RBX + RCX*0x1 + 0x98],R9B
MOV RCX,R8
MOV RAX,RCX
MOVZX R11D,byte ptr [RBP + RCX*0x1]
LEA R13,[RCX + 0x1]
MUL R10
MOV qword ptr [RBX + 0xc0],R13
SHR RDX,0x5
LEA R12,[RDX + RDX*0x4]
SHL R12,0x3
SUB RCX,R12
XOR byte ptr [RBX + RCX*0x1 + 0x98],R11B
MOV RCX,R13
MOV RAX,RCX
MOVZX R9D,byte ptr [RBP + RCX*0x1]
LEA R8,[RCX + 0x1]
MUL R10
MOV qword ptr [RBX + 0xc0],R8
SHR RDX,0x5
LEA RDI,[RDX + RDX*0x4]
SHL RDI,0x3
SUB RCX,RDI
XOR byte ptr [RBX + RCX*0x1 + 0x98],R9B
MOV RCX,R8
CMP R8,RSI
JZ 0x00185e23
MOV RAX,RCX
LEA R13,[RCX + 0x1]
MOVZX R11D,byte ptr [RBP + RCX*0x1]
LEA RDI,[RCX + 0x2]
MUL R10
MOV RAX,RCX
MOV qword ptr [RBX + 0xc0],R13
SHR RDX,0x5
LEA R12,[RDX + RDX*0x4]
SHL R12,0x3
SUB RAX,R12
LEA R12,[RCX + 0x3]
XOR byte ptr [RBX + RAX*0x1 + 0x98],R11B
MOV RAX,R13
MOVZX R8D,byte ptr [RCX + RBP*0x1 + 0x1]
MUL R10
MOV RAX,RDI
MOV qword ptr [RBX + 0xc0],RDI
SHR RDX,0x5
LEA R11,[RDX + RDX*0x4]
MUL R10
MOV RAX,R12
SHL R11,0x3
SUB R13,R11
XOR byte ptr [RBX + R13*0x1 + 0x98],R8B
MOVZX R13D,byte ptr [RCX + RBP*0x1 + 0x2]
SHR RDX,0x5
MOV qword ptr [RBX + 0xc0],R12
LEA R9,[RDX + RDX*0x4]
MUL R10
SHL R9,0x3
SUB RDI,R9
XOR byte ptr [RBX + RDI*0x1 + 0x98],R13B
LEA RDI,[RCX + 0x4]
MOVZX R8D,byte ptr [RCX + RBP*0x1 + 0x3]
ADD RCX,0x4
SHR RDX,0x5
MOV qword ptr [RBX + 0xc0],RDI
LEA R11,[RDX + RDX*0x4]
SHL R11,0x3
SUB R12,R11
XOR byte ptr [RBX + R12*0x1 + 0x98],R8B
CMP RCX,RSI
JNZ 0x00185d5b
XOR EAX,EAX
MOV RSI,qword ptr [RSP + 0x38]
XOR RSI,qword ptr FS:[0x28]
JNZ 0x00185fd3
ADD RSP,0x48
POP RBX
POP RBP
POP R12
POP R13
RET
LEA R13,[RSP + 0x10]
MOV EDX,0x28
MOV RDI,RBX
MOV RSI,R13
CALL 0x00113fa0
TEST EAX,EAX
JNZ 0x00185e25
MOV R10,-0x3333333333333333
MOV RSI,R12
XOR ECX,ECX
AND ESI,0x3
JZ 0x00185ee7
CMP RSI,0x1
JZ 0x00185eb7
CMP RSI,0x2
JZ 0x00185e90
MOVZX R9D,byte ptr [RBP]
XOR byte ptr [RSP + RCX*0x1 + 0x10],R9B
MOV ECX,0x1
MOV RAX,RCX
MOVZX R11D,byte ptr [RBP + RCX*0x1]
MUL R10
MOV RAX,RCX
ADD RCX,0x1
SHR RDX,0x5
LEA R8,[RDX + RDX*0x4]
SHL R8,0x3
SUB RAX,R8
XOR byte ptr [RSP + RAX*0x1 + 0x10],R11B
MOV RAX,RCX
MOVZX R8D,byte ptr [RBP + RCX*0x1]
MUL R10
MOV RAX,RCX
ADD RCX,0x1
SHR RDX,0x5
LEA R9,[RDX + RDX*0x4]
SHL R9,0x3
SUB RAX,R9
XOR byte ptr [RSP + RAX*0x1 + 0x10],R8B
CMP R12,RCX
JZ 0x00185f81
MOV RAX,RCX
LEA RSI,[RCX + 0x1]
MOVZX R9D,byte ptr [RBP + RCX*0x1]
LEA R11,[RCX + 0x2]
MUL R10
MOV RAX,RCX
SHR RDX,0x5
LEA RDI,[RDX + RDX*0x4]
SHL RDI,0x3
SUB RAX,RDI
MOVZX EDI,byte ptr [RBP + RCX*0x1 + 0x1]
XOR byte ptr [RSP + RAX*0x1 + 0x10],R9B
MOV RAX,RSI
MUL R10
MOV RAX,R11
SHR RDX,0x5
LEA R8,[RDX + RDX*0x4]
MUL R10
SHL R8,0x3
SUB RSI,R8
LEA R8,[RCX + 0x3]
MOV RAX,R8
XOR byte ptr [RSP + RSI*0x1 + 0x10],DIL
MOVZX ESI,byte ptr [RBP + RCX*0x1 + 0x2]
SHR RDX,0x5
LEA R9,[RDX + RDX*0x4]
MUL R10
SHL R9,0x3
SUB R11,R9
XOR byte ptr [RSP + R11*0x1 + 0x10],SIL
MOVZX R11D,byte ptr [RBP + RCX*0x1 + 0x3]
ADD RCX,0x4
SHR RDX,0x5
LEA RDI,[RDX + RDX*0x4]
SHL RDI,0x3
SUB R8,RDI
XOR byte ptr [RSP + R8*0x1 + 0x10],R11B
CMP R12,RCX
JNZ 0x00185ee7
MOV ECX,0x14
MOV EDX,0x20
MOV RSI,R13
MOV RDI,RBX
CALL 0x00113290
TEST EAX,EAX
JNZ 0x00185e25
XOR ECX,ECX
LEA RSI,[R13 + 0x20]
MOV EDX,0x8
MOV RDI,RBX
CALL 0x00114800
TEST EAX,EAX
JNZ 0x00185e25
MOV ESI,0x28
MOV RDI,R13
MOV dword ptr [RSP + 0xc],EAX
CALL 0x00114e00
MOV EAX,dword ptr [RSP + 0xc]
JMP 0x00185e25
CALL 0x00113880
MOV EDX,0x3e
LEA RSI,[0x1c706f]
LEA RDI,[0x1c7084]
CALL 0x00114270
MOV EDX,0x3d
LEA RSI,[0x1c706f]
LEA RDI,[0x1a8790]
CALL 0x00114270
MOV EDX,0x3c
LEA RSI,[0x1c706f]
LEA RDI,[0x1bfb0d]
CALL 0x00114270
(translation_unit "ulong chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar5;\n}\n\n" (function_definition "ulong chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar5;\n}" type_identifier (function_declarator "chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)" identifier (parameter_list "(byte *param_1,ulong param_2,long param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar5;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "byte local_58 [32];" type_identifier (array_declarator "local_58 [32]" identifier [ number_literal ]) ;) (declaration "undefined1 local_38 [8];" type_identifier (array_declarator "local_38 [8]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" { comment (expression_statement "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);" (call_expression "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c)" identifier (argument_list "("prng != NULL","src/prngs/chacha20.c",0x3c)" ( (string_literal ""prng != NULL"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_1 == (byte *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" if (parenthesized_expression "(param_1 == (byte *)0x0)" ( (binary_expression "param_1 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" { comment (expression_statement "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);" (call_expression "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d)" identifier (argument_list "("in != NULL","src/prngs/chacha20.c",0x3d)" ( (string_literal ""in != NULL"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" { comment (expression_statement "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);" (call_expression "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e)" identifier (argument_list "("inlen > 0","src/prngs/chacha20.c",0x3e)" ( (string_literal ""inlen > 0"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "(*(short *)(param_3 + 0x44f0) == 0)" ( (binary_expression "*(short *)(param_3 + 0x44f0) == 0" (pointer_expression "*(short *)(param_3 + 0x44f0)" * (cast_expression "(short *)(param_3 + 0x44f0)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x44f0)" ( (binary_expression "param_3 + 0x44f0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }" { (expression_statement "uVar6 = *(ulong *)(param_3 + 0xc0);" (assignment_expression "uVar6 = *(ulong *)(param_3 + 0xc0)" identifier = (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;" (assignment_expression "uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3" identifier = (binary_expression "(int)(param_2 + uVar6) - (int)uVar6 & 3" (binary_expression "(int)(param_2 + uVar6) - (int)uVar6" (cast_expression "(int)(param_2 + uVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 + uVar6)" ( (binary_expression "param_2 + uVar6" identifier + identifier) ))) - (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier)) & number_literal)) ;) (expression_statement "uVar5 = uVar6;" (assignment_expression "uVar5 = uVar6" identifier = identifier) ;) (if_statement "if (uVar3 == 0) goto LAB_00185d5b;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00185d5b;" goto statement_identifier ;)) (expression_statement "uVar4 = uVar6;" (assignment_expression "uVar4 = uVar6" identifier = identifier) ;) (if_statement "if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" if (parenthesized_expression "(uVar3 != 1)" ( (binary_expression "uVar3 != 1" identifier != number_literal) )) (compound_statement "{\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" { (if_statement "if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }" if (parenthesized_expression "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )) (compound_statement "{\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }" { (expression_statement "uVar5 = uVar6 + 1;" (assignment_expression "uVar5 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) (expression_statement "bVar2 = *param_1;" (assignment_expression "bVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar6 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar6 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar6 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar6 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) })) (expression_statement "bVar2 = param_1[uVar5 - uVar6];" (assignment_expression "bVar2 = param_1[uVar5 - uVar6]" identifier = (subscript_expression "param_1[uVar5 - uVar6]" identifier [ (binary_expression "uVar5 - uVar6" identifier - identifier) ])) ;) (expression_statement "uVar4 = uVar5 + 1;" (assignment_expression "uVar4 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar4;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar4" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar5 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar5 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar5 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar5 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) })) (expression_statement "bVar2 = param_1[uVar4 - uVar6];" (assignment_expression "bVar2 = param_1[uVar4 - uVar6]" identifier = (subscript_expression "param_1[uVar4 - uVar6]" identifier [ (binary_expression "uVar4 - uVar6" identifier - identifier) ])) ;) (expression_statement "uVar5 = uVar4 + 1;" (assignment_expression "uVar5 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar4 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar4 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar4 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar4 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (for_statement "for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" for ( ; (binary_expression "uVar5 != param_2 + uVar6" identifier != (binary_expression "param_2 + uVar6" identifier + identifier)) ; (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" { (labeled_statement "LAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];" statement_identifier : (expression_statement "bVar2 = param_1[uVar5 - uVar6];" (assignment_expression "bVar2 = param_1[uVar5 - uVar6]" identifier = (subscript_expression "param_1[uVar5 - uVar6]" identifier [ (binary_expression "uVar5 - uVar6" identifier - identifier) ])) ;)) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 1;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 1" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar5 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar5 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar5 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar5 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (expression_statement "bVar2 = param_1[(uVar5 + 1) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 1) - uVar6]" identifier = (subscript_expression "param_1[(uVar5 + 1) - uVar6]" identifier [ (binary_expression "(uVar5 + 1) - uVar6" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 2;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 2" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 2" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 1) % 0x28)" ( (binary_expression "param_3 + 0x98 + (uVar5 + 1) % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (expression_statement "bVar2 = param_1[(uVar5 + 2) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 2) - uVar6]" identifier = (subscript_expression "param_1[(uVar5 + 2) - uVar6]" identifier [ (binary_expression "(uVar5 + 2) - uVar6" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 3;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 3" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 3" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 2) % 0x28)" ( (binary_expression "param_3 + 0x98 + (uVar5 + 2) % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (expression_statement "bVar2 = param_1[(uVar5 + 3) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 3) - uVar6]" identifier = (subscript_expression "param_1[(uVar5 + 3) - uVar6]" identifier [ (binary_expression "(uVar5 + 3) - uVar6" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 4;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 4" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 3) % 0x28)" ( (binary_expression "param_3 + 0x98 + (uVar5 + 3) % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) })) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" { (expression_statement "uVar5 = chacha_keystream(param_3,local_58,0x28);" (assignment_expression "uVar5 = chacha_keystream(param_3,local_58,0x28)" identifier = (call_expression "chacha_keystream(param_3,local_58,0x28)" identifier (argument_list "(param_3,local_58,0x28)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }" if (parenthesized_expression "((int)uVar5 == 0)" ( (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar3 = (uint)param_2 & 3;" (assignment_expression "uVar3 = (uint)param_2 & 3" identifier = (binary_expression "(uint)param_2 & 3" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((param_2 & 3) == 0) goto LAB_00185ee7;" if (parenthesized_expression "((param_2 & 3) == 0)" ( (binary_expression "(param_2 & 3) == 0" (parenthesized_expression "(param_2 & 3)" ( (binary_expression "param_2 & 3" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00185ee7;" goto statement_identifier ;)) (if_statement "if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }" if (parenthesized_expression "(uVar3 != 1)" ( (binary_expression "uVar3 != 1" identifier != number_literal) )) (compound_statement "{\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }" { (if_statement "if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }" if (parenthesized_expression "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )) (compound_statement "{\n          local_58[0] = local_58[0] ^ *param_1;\n        }" { (expression_statement "local_58[0] = local_58[0] ^ *param_1;" (assignment_expression "local_58[0] = local_58[0] ^ *param_1" (subscript_expression "local_58[0]" identifier [ number_literal ]) = (binary_expression "local_58[0] ^ *param_1" (subscript_expression "local_58[0]" identifier [ number_literal ]) ^ (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "uVar6 = (ulong)(uVar3 != 2);" (assignment_expression "uVar6 = (ulong)(uVar3 != 2)" identifier = (call_expression "(ulong)(uVar3 != 2)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )))) ;) (expression_statement "uVar5 = uVar6 + 1;" (assignment_expression "uVar5 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) (expression_statement "local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];" (assignment_expression "local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6]" (subscript_expression "local_58[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) = (binary_expression "local_58[uVar6 % 0x28] ^ param_1[uVar6]" (subscript_expression "local_58[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "param_1[uVar6]" identifier [ identifier ]))) ;) })) (expression_statement "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];" (assignment_expression "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) = (binary_expression "local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "param_1[uVar5]" identifier [ identifier ]))) ;) (for_statement "for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }" for ( (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ; (binary_expression "param_2 != uVar5" identifier != identifier) ; (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }" { (labeled_statement "LAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];" statement_identifier : (expression_statement "bVar2 = param_1[uVar5 + 1];" (assignment_expression "bVar2 = param_1[uVar5 + 1]" identifier = (subscript_expression "param_1[uVar5 + 1]" identifier [ (binary_expression "uVar5 + 1" identifier + number_literal) ])) ;)) (expression_statement "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];" (assignment_expression "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) = (binary_expression "local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "param_1[uVar5]" identifier [ identifier ]))) ;) (expression_statement "local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;" (assignment_expression "local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2" (subscript_expression "local_58[(uVar5 + 1) % 0x28]" identifier [ (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) % number_literal) ]) = (binary_expression "local_58[(uVar5 + 1) % 0x28] ^ bVar2" (subscript_expression "local_58[(uVar5 + 1) % 0x28]" identifier [ (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) % number_literal) ]) ^ identifier)) ;) (expression_statement "local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];" (assignment_expression "local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2]" (subscript_expression "local_58[(uVar5 + 2) % 0x28]" identifier [ (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) % number_literal) ]) = (binary_expression "local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2]" (subscript_expression "local_58[(uVar5 + 2) % 0x28]" identifier [ (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) % number_literal) ]) ^ (subscript_expression "param_1[uVar5 + 2]" identifier [ (binary_expression "uVar5 + 2" identifier + number_literal) ]))) ;) (expression_statement "local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];" (assignment_expression "local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3]" (subscript_expression "local_58[(uVar5 + 3) % 0x28]" identifier [ (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) % number_literal) ]) = (binary_expression "local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3]" (subscript_expression "local_58[(uVar5 + 3) % 0x28]" identifier [ (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) % number_literal) ]) ^ (subscript_expression "param_1[uVar5 + 3]" identifier [ (binary_expression "uVar5 + 3" identifier + number_literal) ]))) ;) })) (expression_statement "uVar5 = chacha_setup(param_3,local_58,0x20,0x14);" (assignment_expression "uVar5 = chacha_setup(param_3,local_58,0x20,0x14)" identifier = (call_expression "chacha_setup(param_3,local_58,0x20,0x14)" identifier (argument_list "(param_3,local_58,0x20,0x14)" ( identifier , identifier , number_literal , number_literal )))) ;) (if_statement "if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }" if (parenthesized_expression "(((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0))" ( (binary_expression "((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)" (parenthesized_expression "((int)uVar5 == 0)" ( (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) && (parenthesized_expression "(uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)" ( (comma_expression "uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0" (assignment_expression "uVar5 = chacha_ivctr64(param_3,local_38,8,0)" identifier = (call_expression "chacha_ivctr64(param_3,local_38,8,0)" identifier (argument_list "(param_3,local_38,8,0)" ( identifier , identifier , number_literal , number_literal )))) , (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal)) ))) )) (compound_statement "{\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }" { (expression_statement "zeromem(local_58,0x28);" (call_expression "zeromem(local_58,0x28)" identifier (argument_list "(local_58,0x28)" ( identifier , number_literal ))) ;) (expression_statement "uVar5 = uVar5 & 0xffffffff;" (assignment_expression "uVar5 = uVar5 & 0xffffffff" identifier = (binary_expression "uVar5 & 0xffffffff" identifier & number_literal)) ;) })) })) }))) (if_statement "if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_30 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit "int chacha20_prng_add_entropy(uchar *in,ulong inlen,prng_state *prng)\n\n{\n  byte bVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  ulong uVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long in_FS_OFFSET;\n  uchar buf [40];\n  \n  lVar2 = *(long *)(in_FS_OFFSET + 0x28);\n  if (prng == (prng_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (in == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (inlen == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (prng->ready == 0) {\n    uVar7 = (prng->field_0).chacha.idx;\n    uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3;\n    uVar6 = uVar7;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar5 = uVar7;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }\n      bVar1 = in[uVar6 - uVar7];\n      uVar5 = uVar6 + 1;\n      (prng->field_0).chacha.idx = uVar5;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n    }\n    bVar1 = in[uVar5 - uVar7];\n    uVar6 = uVar5 + 1;\n    (prng->field_0).chacha.idx = uVar6;\n    (prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1;\n    for (; uVar6 != inlen + uVar7; uVar6 = uVar6 + 4) {\nLAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 1;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 1) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 2;\n      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 2) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 3;\n      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 3) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 4;\n      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;\n    }\n    iVar4 = 0;\n  }\n  else {\n    iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);\n    if (iVar4 == 0) {\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }\n  }\n  if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar4;\n}\n\n" (function_definition "int chacha20_prng_add_entropy(uchar *in,ulong inlen,prng_state *prng)\n\n{\n  byte bVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  ulong uVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long in_FS_OFFSET;\n  uchar buf [40];\n  \n  lVar2 = *(long *)(in_FS_OFFSET + 0x28);\n  if (prng == (prng_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (in == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (inlen == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (prng->ready == 0) {\n    uVar7 = (prng->field_0).chacha.idx;\n    uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3;\n    uVar6 = uVar7;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar5 = uVar7;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }\n      bVar1 = in[uVar6 - uVar7];\n      uVar5 = uVar6 + 1;\n      (prng->field_0).chacha.idx = uVar5;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n    }\n    bVar1 = in[uVar5 - uVar7];\n    uVar6 = uVar5 + 1;\n    (prng->field_0).chacha.idx = uVar6;\n    (prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1;\n    for (; uVar6 != inlen + uVar7; uVar6 = uVar6 + 4) {\nLAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 1;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 1) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 2;\n      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 2) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 3;\n      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 3) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 4;\n      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;\n    }\n    iVar4 = 0;\n  }\n  else {\n    iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);\n    if (iVar4 == 0) {\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }\n  }\n  if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar4;\n}" primitive_type (function_declarator "chacha20_prng_add_entropy(uchar *in,ulong inlen,prng_state *prng)" identifier (parameter_list "(uchar *in,ulong inlen,prng_state *prng)" ( (parameter_declaration "uchar *in" type_identifier (pointer_declarator "*in" * identifier)) , (parameter_declaration "ulong inlen" type_identifier identifier) , (parameter_declaration "prng_state *prng" type_identifier (pointer_declarator "*prng" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  ulong uVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long in_FS_OFFSET;\n  uchar buf [40];\n  \n  lVar2 = *(long *)(in_FS_OFFSET + 0x28);\n  if (prng == (prng_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (in == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (inlen == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (prng->ready == 0) {\n    uVar7 = (prng->field_0).chacha.idx;\n    uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3;\n    uVar6 = uVar7;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar5 = uVar7;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }\n      bVar1 = in[uVar6 - uVar7];\n      uVar5 = uVar6 + 1;\n      (prng->field_0).chacha.idx = uVar5;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n    }\n    bVar1 = in[uVar5 - uVar7];\n    uVar6 = uVar5 + 1;\n    (prng->field_0).chacha.idx = uVar6;\n    (prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1;\n    for (; uVar6 != inlen + uVar7; uVar6 = uVar6 + 4) {\nLAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 1;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 1) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 2;\n      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 2) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 3;\n      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 3) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 4;\n      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;\n    }\n    iVar4 = 0;\n  }\n  else {\n    iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);\n    if (iVar4 == 0) {\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }\n  }\n  if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "uchar buf [40];" type_identifier (array_declarator "buf [40]" identifier [ number_literal ]) ;) (expression_statement "lVar2 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar2 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (prng == (prng_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" if (parenthesized_expression "(prng == (prng_state *)0x0)" ( (binary_expression "prng == (prng_state *)0x0" identifier == (cast_expression "(prng_state *)0x0" ( (type_descriptor "prng_state *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" { comment (expression_statement "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);" (call_expression "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c)" identifier (argument_list "("prng != NULL","src/prngs/chacha20.c",0x3c)" ( (string_literal ""prng != NULL"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (in == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" if (parenthesized_expression "(in == (uchar *)0x0)" ( (binary_expression "in == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" { comment (expression_statement "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);" (call_expression "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d)" identifier (argument_list "("in != NULL","src/prngs/chacha20.c",0x3d)" ( (string_literal ""in != NULL"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (inlen == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" if (parenthesized_expression "(inlen == 0)" ( (binary_expression "inlen == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" { comment (expression_statement "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);" (call_expression "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e)" identifier (argument_list "("inlen > 0","src/prngs/chacha20.c",0x3e)" ( (string_literal ""inlen > 0"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (prng->ready == 0) {\n    uVar7 = (prng->field_0).chacha.idx;\n    uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3;\n    uVar6 = uVar7;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar5 = uVar7;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }\n      bVar1 = in[uVar6 - uVar7];\n      uVar5 = uVar6 + 1;\n      (prng->field_0).chacha.idx = uVar5;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n    }\n    bVar1 = in[uVar5 - uVar7];\n    uVar6 = uVar5 + 1;\n    (prng->field_0).chacha.idx = uVar6;\n    (prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1;\n    for (; uVar6 != inlen + uVar7; uVar6 = uVar6 + 4) {\nLAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 1;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 1) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 2;\n      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 2) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 3;\n      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 3) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 4;\n      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;\n    }\n    iVar4 = 0;\n  }\n  else {\n    iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);\n    if (iVar4 == 0) {\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }\n  }" if (parenthesized_expression "(prng->ready == 0)" ( (binary_expression "prng->ready == 0" (field_expression "prng->ready" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    uVar7 = (prng->field_0).chacha.idx;\n    uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3;\n    uVar6 = uVar7;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar5 = uVar7;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }\n      bVar1 = in[uVar6 - uVar7];\n      uVar5 = uVar6 + 1;\n      (prng->field_0).chacha.idx = uVar5;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n    }\n    bVar1 = in[uVar5 - uVar7];\n    uVar6 = uVar5 + 1;\n    (prng->field_0).chacha.idx = uVar6;\n    (prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1;\n    for (; uVar6 != inlen + uVar7; uVar6 = uVar6 + 4) {\nLAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 1;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 1) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 2;\n      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 2) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 3;\n      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 3) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 4;\n      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;\n    }\n    iVar4 = 0;\n  }" { (expression_statement "uVar7 = (prng->field_0).chacha.idx;" (assignment_expression "uVar7 = (prng->field_0).chacha.idx" identifier = (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (expression_statement "uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3;" (assignment_expression "uVar3 = (int)(inlen + uVar7) - (int)uVar7 & 3" identifier = (binary_expression "(int)(inlen + uVar7) - (int)uVar7 & 3" (binary_expression "(int)(inlen + uVar7) - (int)uVar7" (cast_expression "(int)(inlen + uVar7)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(inlen + uVar7)" ( (binary_expression "inlen + uVar7" identifier + identifier) ))) - (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) & number_literal)) ;) (expression_statement "uVar6 = uVar7;" (assignment_expression "uVar6 = uVar7" identifier = identifier) ;) (if_statement "if (uVar3 == 0) goto LAB_00185d5b;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00185d5b;" goto statement_identifier ;)) (expression_statement "uVar5 = uVar7;" (assignment_expression "uVar5 = uVar7" identifier = identifier) ;) (if_statement "if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }\n      bVar1 = in[uVar6 - uVar7];\n      uVar5 = uVar6 + 1;\n      (prng->field_0).chacha.idx = uVar5;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n    }" if (parenthesized_expression "(uVar3 != 1)" ( (binary_expression "uVar3 != 1" identifier != number_literal) )) (compound_statement "{\n      if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }\n      bVar1 = in[uVar6 - uVar7];\n      uVar5 = uVar6 + 1;\n      (prng->field_0).chacha.idx = uVar5;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n    }" { (if_statement "if (uVar3 != 2) {\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }" if (parenthesized_expression "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )) (compound_statement "{\n        uVar6 = uVar7 + 1;\n        bVar1 = *in;\n        (prng->field_0).chacha.idx = uVar6;\n        (prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;\n      }" { (expression_statement "uVar6 = uVar7 + 1;" (assignment_expression "uVar6 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = *in;" (assignment_expression "bVar1 = *in" identifier = (pointer_expression "*in" * identifier)) ;) (expression_statement "(prng->field_0).chacha.idx = uVar6;" (assignment_expression "(prng->field_0).chacha.idx = uVar6" (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) (expression_statement "(prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1;" (assignment_expression "(prng->field_0).dummy[uVar7 % 0x28 + 0x98] =\n             (prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar7 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar7 % 0x28 + 0x98" (binary_expression "uVar7 % 0x28" identifier % number_literal) + number_literal) ]) = (binary_expression "(prng->field_0).dummy[uVar7 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar7 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar7 % 0x28 + 0x98" (binary_expression "uVar7 % 0x28" identifier % number_literal) + number_literal) ]) ^ identifier)) ;) })) (expression_statement "bVar1 = in[uVar6 - uVar7];" (assignment_expression "bVar1 = in[uVar6 - uVar7]" identifier = (subscript_expression "in[uVar6 - uVar7]" identifier [ (binary_expression "uVar6 - uVar7" identifier - identifier) ])) ;) (expression_statement "uVar5 = uVar6 + 1;" (assignment_expression "uVar5 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) (expression_statement "(prng->field_0).chacha.idx = uVar5;" (assignment_expression "(prng->field_0).chacha.idx = uVar5" (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) (expression_statement "(prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;" (assignment_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar6 % 0x28 + 0x98" (binary_expression "uVar6 % 0x28" identifier % number_literal) + number_literal) ]) = (binary_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar6 % 0x28 + 0x98" (binary_expression "uVar6 % 0x28" identifier % number_literal) + number_literal) ]) ^ identifier)) ;) })) (expression_statement "bVar1 = in[uVar5 - uVar7];" (assignment_expression "bVar1 = in[uVar5 - uVar7]" identifier = (subscript_expression "in[uVar5 - uVar7]" identifier [ (binary_expression "uVar5 - uVar7" identifier - identifier) ])) ;) (expression_statement "uVar6 = uVar5 + 1;" (assignment_expression "uVar6 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "(prng->field_0).chacha.idx = uVar6;" (assignment_expression "(prng->field_0).chacha.idx = uVar6" (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) (expression_statement "(prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1;" (assignment_expression "(prng->field_0).dummy[uVar5 % 0x28 + 0x98] = (prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar5 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar5 % 0x28 + 0x98" (binary_expression "uVar5 % 0x28" identifier % number_literal) + number_literal) ]) = (binary_expression "(prng->field_0).dummy[uVar5 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar5 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar5 % 0x28 + 0x98" (binary_expression "uVar5 % 0x28" identifier % number_literal) + number_literal) ]) ^ identifier)) ;) (for_statement "for (; uVar6 != inlen + uVar7; uVar6 = uVar6 + 4) {\nLAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 1;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 1) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 2;\n      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 2) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 3;\n      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 3) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 4;\n      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;\n    }" for ( ; (binary_expression "uVar6 != inlen + uVar7" identifier != (binary_expression "inlen + uVar7" identifier + identifier)) ; (assignment_expression "uVar6 = uVar6 + 4" identifier = (binary_expression "uVar6 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 1;\n      (prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 1) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 2;\n      (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 2) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 3;\n      (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;\n      bVar1 = in[(uVar6 + 3) - uVar7];\n      (prng->field_0).chacha.idx = uVar6 + 4;\n      (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;\n    }" { (labeled_statement "LAB_00185d5b:\n      bVar1 = in[uVar6 - uVar7];" statement_identifier : (expression_statement "bVar1 = in[uVar6 - uVar7];" (assignment_expression "bVar1 = in[uVar6 - uVar7]" identifier = (subscript_expression "in[uVar6 - uVar7]" identifier [ (binary_expression "uVar6 - uVar7" identifier - identifier) ])) ;)) (expression_statement "(prng->field_0).chacha.idx = uVar6 + 1;" (assignment_expression "(prng->field_0).chacha.idx = uVar6 + 1" (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) (expression_statement "(prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1;" (assignment_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98] =\n           (prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar6 % 0x28 + 0x98" (binary_expression "uVar6 % 0x28" identifier % number_literal) + number_literal) ]) = (binary_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[uVar6 % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "uVar6 % 0x28 + 0x98" (binary_expression "uVar6 % 0x28" identifier % number_literal) + number_literal) ]) ^ identifier)) ;) (expression_statement "bVar1 = in[(uVar6 + 1) - uVar7];" (assignment_expression "bVar1 = in[(uVar6 + 1) - uVar7]" identifier = (subscript_expression "in[(uVar6 + 1) - uVar7]" identifier [ (binary_expression "(uVar6 + 1) - uVar7" (parenthesized_expression "(uVar6 + 1)" ( (binary_expression "uVar6 + 1" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "(prng->field_0).chacha.idx = uVar6 + 2;" (assignment_expression "(prng->field_0).chacha.idx = uVar6 + 2" (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (binary_expression "uVar6 + 2" identifier + number_literal)) ;) (expression_statement "(prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1;" (assignment_expression "(prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "(uVar6 + 1) % 0x28 + 0x98" (binary_expression "(uVar6 + 1) % 0x28" (parenthesized_expression "(uVar6 + 1)" ( (binary_expression "uVar6 + 1" identifier + number_literal) )) % number_literal) + number_literal) ]) = (binary_expression "(prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[(uVar6 + 1) % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "(uVar6 + 1) % 0x28 + 0x98" (binary_expression "(uVar6 + 1) % 0x28" (parenthesized_expression "(uVar6 + 1)" ( (binary_expression "uVar6 + 1" identifier + number_literal) )) % number_literal) + number_literal) ]) ^ identifier)) ;) (expression_statement "bVar1 = in[(uVar6 + 2) - uVar7];" (assignment_expression "bVar1 = in[(uVar6 + 2) - uVar7]" identifier = (subscript_expression "in[(uVar6 + 2) - uVar7]" identifier [ (binary_expression "(uVar6 + 2) - uVar7" (parenthesized_expression "(uVar6 + 2)" ( (binary_expression "uVar6 + 2" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "(prng->field_0).chacha.idx = uVar6 + 3;" (assignment_expression "(prng->field_0).chacha.idx = uVar6 + 3" (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (binary_expression "uVar6 + 3" identifier + number_literal)) ;) (expression_statement "(prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1;" (assignment_expression "(prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "(uVar6 + 2) % 0x28 + 0x98" (binary_expression "(uVar6 + 2) % 0x28" (parenthesized_expression "(uVar6 + 2)" ( (binary_expression "uVar6 + 2" identifier + number_literal) )) % number_literal) + number_literal) ]) = (binary_expression "(prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[(uVar6 + 2) % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "(uVar6 + 2) % 0x28 + 0x98" (binary_expression "(uVar6 + 2) % 0x28" (parenthesized_expression "(uVar6 + 2)" ( (binary_expression "uVar6 + 2" identifier + number_literal) )) % number_literal) + number_literal) ]) ^ identifier)) ;) (expression_statement "bVar1 = in[(uVar6 + 3) - uVar7];" (assignment_expression "bVar1 = in[(uVar6 + 3) - uVar7]" identifier = (subscript_expression "in[(uVar6 + 3) - uVar7]" identifier [ (binary_expression "(uVar6 + 3) - uVar7" (parenthesized_expression "(uVar6 + 3)" ( (binary_expression "uVar6 + 3" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "(prng->field_0).chacha.idx = uVar6 + 4;" (assignment_expression "(prng->field_0).chacha.idx = uVar6 + 4" (field_expression "(prng->field_0).chacha.idx" (field_expression "(prng->field_0).chacha" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (binary_expression "uVar6 + 4" identifier + number_literal)) ;) (expression_statement "(prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1;" (assignment_expression "(prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] =\n           (prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "(uVar6 + 3) % 0x28 + 0x98" (binary_expression "(uVar6 + 3) % 0x28" (parenthesized_expression "(uVar6 + 3)" ( (binary_expression "uVar6 + 3" identifier + number_literal) )) % number_literal) + number_literal) ]) = (binary_expression "(prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98] ^ bVar1" (subscript_expression "(prng->field_0).dummy[(uVar6 + 3) % 0x28 + 0x98]" (field_expression "(prng->field_0).dummy" (parenthesized_expression "(prng->field_0)" ( (field_expression "prng->field_0" identifier -> field_identifier) )) . field_identifier) [ (binary_expression "(uVar6 + 3) % 0x28 + 0x98" (binary_expression "(uVar6 + 3) % 0x28" (parenthesized_expression "(uVar6 + 3)" ( (binary_expression "uVar6 + 3" identifier + number_literal) )) % number_literal) + number_literal) ]) ^ identifier)) ;) })) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);\n    if (iVar4 == 0) {\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }\n  }" else (compound_statement "{\n    iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);\n    if (iVar4 == 0) {\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }\n  }" { (expression_statement "iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28);" (assignment_expression "iVar4 = chacha_keystream((chacha_state *)prng,buf,0x28)" identifier = (call_expression "chacha_keystream((chacha_state *)prng,buf,0x28)" identifier (argument_list "((chacha_state *)prng,buf,0x28)" ( (cast_expression "(chacha_state *)prng" ( (type_descriptor "chacha_state *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal )))) ;) (if_statement "if (iVar4 == 0) {\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar6 = 0;\n      uVar3 = (uint)inlen & 3;\n      if ((inlen & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }\n      buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n      for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }\n      iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);\n      if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }\n    }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar3 = (uint)inlen & 3;" (assignment_expression "uVar3 = (uint)inlen & 3" identifier = (binary_expression "(uint)inlen & 3" (cast_expression "(uint)inlen" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((inlen & 3) == 0) goto LAB_00185ee7;" if (parenthesized_expression "((inlen & 3) == 0)" ( (binary_expression "(inlen & 3) == 0" (parenthesized_expression "(inlen & 3)" ( (binary_expression "inlen & 3" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00185ee7;" goto statement_identifier ;)) (if_statement "if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }" if (parenthesized_expression "(uVar3 != 1)" ( (binary_expression "uVar3 != 1" identifier != number_literal) )) (compound_statement "{\n        if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }\n        uVar7 = (ulong)(uVar3 != 2);\n        uVar6 = uVar7 + 1;\n        buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];\n      }" { (if_statement "if (uVar3 != 2) {\n          buf[0] = buf[0] ^ *in;\n        }" if (parenthesized_expression "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )) (compound_statement "{\n          buf[0] = buf[0] ^ *in;\n        }" { (expression_statement "buf[0] = buf[0] ^ *in;" (assignment_expression "buf[0] = buf[0] ^ *in" (subscript_expression "buf[0]" identifier [ number_literal ]) = (binary_expression "buf[0] ^ *in" (subscript_expression "buf[0]" identifier [ number_literal ]) ^ (pointer_expression "*in" * identifier))) ;) })) (expression_statement "uVar7 = (ulong)(uVar3 != 2);" (assignment_expression "uVar7 = (ulong)(uVar3 != 2)" identifier = (call_expression "(ulong)(uVar3 != 2)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )))) ;) (expression_statement "uVar6 = uVar7 + 1;" (assignment_expression "uVar6 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) (expression_statement "buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7];" (assignment_expression "buf[uVar7 % 0x28] = buf[uVar7 % 0x28] ^ in[uVar7]" (subscript_expression "buf[uVar7 % 0x28]" identifier [ (binary_expression "uVar7 % 0x28" identifier % number_literal) ]) = (binary_expression "buf[uVar7 % 0x28] ^ in[uVar7]" (subscript_expression "buf[uVar7 % 0x28]" identifier [ (binary_expression "uVar7 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "in[uVar7]" identifier [ identifier ]))) ;) })) (expression_statement "buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];" (assignment_expression "buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6]" (subscript_expression "buf[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) = (binary_expression "buf[uVar6 % 0x28] ^ in[uVar6]" (subscript_expression "buf[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "in[uVar6]" identifier [ identifier ]))) ;) (for_statement "for (uVar6 = uVar6 + 1; inlen != uVar6; uVar6 = uVar6 + 4) {\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }" for ( (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ; (binary_expression "inlen != uVar6" identifier != identifier) ; (assignment_expression "uVar6 = uVar6 + 4" identifier = (binary_expression "uVar6 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00185ee7:\n        bVar1 = in[uVar6 + 1];\n        buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];\n        buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;\n        buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];\n        buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];\n      }" { (labeled_statement "LAB_00185ee7:\n        bVar1 = in[uVar6 + 1];" statement_identifier : (expression_statement "bVar1 = in[uVar6 + 1];" (assignment_expression "bVar1 = in[uVar6 + 1]" identifier = (subscript_expression "in[uVar6 + 1]" identifier [ (binary_expression "uVar6 + 1" identifier + number_literal) ])) ;)) (expression_statement "buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6];" (assignment_expression "buf[uVar6 % 0x28] = buf[uVar6 % 0x28] ^ in[uVar6]" (subscript_expression "buf[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) = (binary_expression "buf[uVar6 % 0x28] ^ in[uVar6]" (subscript_expression "buf[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "in[uVar6]" identifier [ identifier ]))) ;) (expression_statement "buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1;" (assignment_expression "buf[(uVar6 + 1) % 0x28] = buf[(uVar6 + 1) % 0x28] ^ bVar1" (subscript_expression "buf[(uVar6 + 1) % 0x28]" identifier [ (binary_expression "(uVar6 + 1) % 0x28" (parenthesized_expression "(uVar6 + 1)" ( (binary_expression "uVar6 + 1" identifier + number_literal) )) % number_literal) ]) = (binary_expression "buf[(uVar6 + 1) % 0x28] ^ bVar1" (subscript_expression "buf[(uVar6 + 1) % 0x28]" identifier [ (binary_expression "(uVar6 + 1) % 0x28" (parenthesized_expression "(uVar6 + 1)" ( (binary_expression "uVar6 + 1" identifier + number_literal) )) % number_literal) ]) ^ identifier)) ;) (expression_statement "buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2];" (assignment_expression "buf[(uVar6 + 2) % 0x28] = buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2]" (subscript_expression "buf[(uVar6 + 2) % 0x28]" identifier [ (binary_expression "(uVar6 + 2) % 0x28" (parenthesized_expression "(uVar6 + 2)" ( (binary_expression "uVar6 + 2" identifier + number_literal) )) % number_literal) ]) = (binary_expression "buf[(uVar6 + 2) % 0x28] ^ in[uVar6 + 2]" (subscript_expression "buf[(uVar6 + 2) % 0x28]" identifier [ (binary_expression "(uVar6 + 2) % 0x28" (parenthesized_expression "(uVar6 + 2)" ( (binary_expression "uVar6 + 2" identifier + number_literal) )) % number_literal) ]) ^ (subscript_expression "in[uVar6 + 2]" identifier [ (binary_expression "uVar6 + 2" identifier + number_literal) ]))) ;) (expression_statement "buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3];" (assignment_expression "buf[(uVar6 + 3) % 0x28] = buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3]" (subscript_expression "buf[(uVar6 + 3) % 0x28]" identifier [ (binary_expression "(uVar6 + 3) % 0x28" (parenthesized_expression "(uVar6 + 3)" ( (binary_expression "uVar6 + 3" identifier + number_literal) )) % number_literal) ]) = (binary_expression "buf[(uVar6 + 3) % 0x28] ^ in[uVar6 + 3]" (subscript_expression "buf[(uVar6 + 3) % 0x28]" identifier [ (binary_expression "(uVar6 + 3) % 0x28" (parenthesized_expression "(uVar6 + 3)" ( (binary_expression "uVar6 + 3" identifier + number_literal) )) % number_literal) ]) ^ (subscript_expression "in[uVar6 + 3]" identifier [ (binary_expression "uVar6 + 3" identifier + number_literal) ]))) ;) })) (expression_statement "iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14);" (assignment_expression "iVar4 = chacha_setup((chacha_state *)prng,buf,0x20,0x14)" identifier = (call_expression "chacha_setup((chacha_state *)prng,buf,0x20,0x14)" identifier (argument_list "((chacha_state *)prng,buf,0x20,0x14)" ( (cast_expression "(chacha_state *)prng" ( (type_descriptor "chacha_state *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal , number_literal )))) ;) (if_statement "if ((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))\n      {\n        zeromem(buf,0x28);\n      }" if (parenthesized_expression "((iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0))" ( (binary_expression "(iVar4 == 0) && (iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0)" (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0)" ( (comma_expression "iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0), iVar4 == 0" (assignment_expression "iVar4 = chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0)" identifier = (call_expression "chacha_ivctr64((chacha_state *)prng,buf + 0x20,8,0)" identifier (argument_list "((chacha_state *)prng,buf + 0x20,8,0)" ( (cast_expression "(chacha_state *)prng" ( (type_descriptor "chacha_state *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "buf + 0x20" identifier + number_literal) , number_literal , number_literal )))) , (binary_expression "iVar4 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        zeromem(buf,0x28);\n      }" { (expression_statement "zeromem(buf,0x28);" (call_expression "zeromem(buf,0x28)" identifier (argument_list "(buf,0x28)" ( identifier , number_literal ))) ;) })) })) }))) (if_statement "if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(lVar2 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar2 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "ulong chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar5;\n}\n\n" (function_definition "ulong chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar5;\n}" type_identifier (function_declarator "chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)" identifier (parameter_list "(byte *param_1,ulong param_2,long param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar5;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "byte local_58 [32];" type_identifier (array_declarator "local_58 [32]" identifier [ number_literal ]) ;) (declaration "undefined1 local_38 [8];" type_identifier (array_declarator "local_38 [8]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" { (expression_statement "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);" (call_expression "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c)" identifier (argument_list "("prng != NULL","src/prngs/chacha20.c",0x3c)" ( (string_literal ""prng != NULL"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_1 == (byte *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" if (parenthesized_expression "(param_1 == (byte *)0x0)" ( (binary_expression "param_1 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" { (expression_statement "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);" (call_expression "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d)" identifier (argument_list "("in != NULL","src/prngs/chacha20.c",0x3d)" ( (string_literal ""in != NULL"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 == 0) {\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" { (expression_statement "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);" (call_expression "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e)" identifier (argument_list "("inlen > 0","src/prngs/chacha20.c",0x3e)" ( (string_literal ""inlen > 0"" " string_content ") , (string_literal ""src/prngs/chacha20.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "(*(short *)(param_3 + 0x44f0) == 0)" ( (binary_expression "*(short *)(param_3 + 0x44f0) == 0" (pointer_expression "*(short *)(param_3 + 0x44f0)" * (cast_expression "(short *)(param_3 + 0x44f0)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x44f0)" ( (binary_expression "param_3 + 0x44f0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }" { (expression_statement "uVar6 = *(ulong *)(param_3 + 0xc0);" (assignment_expression "uVar6 = *(ulong *)(param_3 + 0xc0)" identifier = (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;" (assignment_expression "uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3" identifier = (binary_expression "(int)(param_2 + uVar6) - (int)uVar6 & 3" (binary_expression "(int)(param_2 + uVar6) - (int)uVar6" (cast_expression "(int)(param_2 + uVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 + uVar6)" ( (binary_expression "param_2 + uVar6" identifier + identifier) ))) - (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier)) & number_literal)) ;) (expression_statement "uVar5 = uVar6;" (assignment_expression "uVar5 = uVar6" identifier = identifier) ;) (if_statement "if (uVar3 == 0) goto LAB_00185d5b;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00185d5b;" goto statement_identifier ;)) (expression_statement "uVar4 = uVar6;" (assignment_expression "uVar4 = uVar6" identifier = identifier) ;) (if_statement "if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" if (parenthesized_expression "(uVar3 != 1)" ( (binary_expression "uVar3 != 1" identifier != number_literal) )) (compound_statement "{\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" { (if_statement "if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }" if (parenthesized_expression "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )) (compound_statement "{\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }" { (expression_statement "uVar5 = uVar6 + 1;" (assignment_expression "uVar5 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) (expression_statement "bVar2 = *param_1;" (assignment_expression "bVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar6 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar6 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar6 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar6 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) })) (expression_statement "bVar2 = param_1[uVar5 - uVar6];" (assignment_expression "bVar2 = param_1[uVar5 - uVar6]" identifier = (subscript_expression "param_1[uVar5 - uVar6]" identifier [ (binary_expression "uVar5 - uVar6" identifier - identifier) ])) ;) (expression_statement "uVar4 = uVar5 + 1;" (assignment_expression "uVar4 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar4;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar4" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar5 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar5 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar5 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar5 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) })) (expression_statement "bVar2 = param_1[uVar4 - uVar6];" (assignment_expression "bVar2 = param_1[uVar4 - uVar6]" identifier = (subscript_expression "param_1[uVar4 - uVar6]" identifier [ (binary_expression "uVar4 - uVar6" identifier - identifier) ])) ;) (expression_statement "uVar5 = uVar4 + 1;" (assignment_expression "uVar5 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = identifier) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar4 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar4 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar4 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar4 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (for_statement "for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" for ( ; (binary_expression "uVar5 != param_2 + uVar6" identifier != (binary_expression "param_2 + uVar6" identifier + identifier)) ; (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" { (labeled_statement "LAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];" statement_identifier : (expression_statement "bVar2 = param_1[uVar5 - uVar6];" (assignment_expression "bVar2 = param_1[uVar5 - uVar6]" identifier = (subscript_expression "param_1[uVar5 - uVar6]" identifier [ (binary_expression "uVar5 - uVar6" identifier - identifier) ])) ;)) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 1;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 1" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + uVar5 % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + uVar5 % 0x28)" ( (binary_expression "param_3 + 0x98 + uVar5 % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "uVar5 % 0x28" identifier % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (expression_statement "bVar2 = param_1[(uVar5 + 1) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 1) - uVar6]" identifier = (subscript_expression "param_1[(uVar5 + 1) - uVar6]" identifier [ (binary_expression "(uVar5 + 1) - uVar6" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 2;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 2" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 2" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 1) % 0x28)" ( (binary_expression "param_3 + 0x98 + (uVar5 + 1) % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (expression_statement "bVar2 = param_1[(uVar5 + 2) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 2) - uVar6]" identifier = (subscript_expression "param_1[(uVar5 + 2) - uVar6]" identifier [ (binary_expression "(uVar5 + 2) - uVar6" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 3;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 3" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 3" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 2) % 0x28)" ( (binary_expression "param_3 + 0x98 + (uVar5 + 2) % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) (expression_statement "bVar2 = param_1[(uVar5 + 3) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 3) - uVar6]" identifier = (subscript_expression "param_1[(uVar5 + 3) - uVar6]" identifier [ (binary_expression "(uVar5 + 3) - uVar6" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) - identifier) ])) ;) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 4;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 4" (pointer_expression "*(ulong *)(param_3 + 0xc0)" * (cast_expression "(ulong *)(param_3 + 0xc0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc0)" ( (binary_expression "param_3 + 0xc0" identifier + number_literal) )))) = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28)" identifier = (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 3) % 0x28)" ( (binary_expression "param_3 + 0x98 + (uVar5 + 3) % 0x28" (binary_expression "param_3 + 0x98" identifier + number_literal) + (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) % number_literal)) )))) ;) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" * identifier) ^ identifier)) ;) })) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" { (expression_statement "uVar5 = chacha_keystream(param_3,local_58,0x28);" (assignment_expression "uVar5 = chacha_keystream(param_3,local_58,0x28)" identifier = (call_expression "chacha_keystream(param_3,local_58,0x28)" identifier (argument_list "(param_3,local_58,0x28)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }" if (parenthesized_expression "((int)uVar5 == 0)" ( (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar3 = (uint)param_2 & 3;" (assignment_expression "uVar3 = (uint)param_2 & 3" identifier = (binary_expression "(uint)param_2 & 3" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((param_2 & 3) == 0) goto LAB_00185ee7;" if (parenthesized_expression "((param_2 & 3) == 0)" ( (binary_expression "(param_2 & 3) == 0" (parenthesized_expression "(param_2 & 3)" ( (binary_expression "param_2 & 3" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00185ee7;" goto statement_identifier ;)) (if_statement "if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }" if (parenthesized_expression "(uVar3 != 1)" ( (binary_expression "uVar3 != 1" identifier != number_literal) )) (compound_statement "{\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }" { (if_statement "if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }" if (parenthesized_expression "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )) (compound_statement "{\n          local_58[0] = local_58[0] ^ *param_1;\n        }" { (expression_statement "local_58[0] = local_58[0] ^ *param_1;" (assignment_expression "local_58[0] = local_58[0] ^ *param_1" (subscript_expression "local_58[0]" identifier [ number_literal ]) = (binary_expression "local_58[0] ^ *param_1" (subscript_expression "local_58[0]" identifier [ number_literal ]) ^ (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "uVar6 = (ulong)(uVar3 != 2);" (assignment_expression "uVar6 = (ulong)(uVar3 != 2)" identifier = (call_expression "(ulong)(uVar3 != 2)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar3 != 2)" ( (binary_expression "uVar3 != 2" identifier != number_literal) )))) ;) (expression_statement "uVar5 = uVar6 + 1;" (assignment_expression "uVar5 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) (expression_statement "local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];" (assignment_expression "local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6]" (subscript_expression "local_58[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) = (binary_expression "local_58[uVar6 % 0x28] ^ param_1[uVar6]" (subscript_expression "local_58[uVar6 % 0x28]" identifier [ (binary_expression "uVar6 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "param_1[uVar6]" identifier [ identifier ]))) ;) })) (expression_statement "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];" (assignment_expression "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) = (binary_expression "local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "param_1[uVar5]" identifier [ identifier ]))) ;) (for_statement "for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }" for ( (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ; (binary_expression "param_2 != uVar5" identifier != identifier) ; (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }" { (labeled_statement "LAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];" statement_identifier : (expression_statement "bVar2 = param_1[uVar5 + 1];" (assignment_expression "bVar2 = param_1[uVar5 + 1]" identifier = (subscript_expression "param_1[uVar5 + 1]" identifier [ (binary_expression "uVar5 + 1" identifier + number_literal) ])) ;)) (expression_statement "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];" (assignment_expression "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) = (binary_expression "local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" identifier [ (binary_expression "uVar5 % 0x28" identifier % number_literal) ]) ^ (subscript_expression "param_1[uVar5]" identifier [ identifier ]))) ;) (expression_statement "local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;" (assignment_expression "local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2" (subscript_expression "local_58[(uVar5 + 1) % 0x28]" identifier [ (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) % number_literal) ]) = (binary_expression "local_58[(uVar5 + 1) % 0x28] ^ bVar2" (subscript_expression "local_58[(uVar5 + 1) % 0x28]" identifier [ (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" ( (binary_expression "uVar5 + 1" identifier + number_literal) )) % number_literal) ]) ^ identifier)) ;) (expression_statement "local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];" (assignment_expression "local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2]" (subscript_expression "local_58[(uVar5 + 2) % 0x28]" identifier [ (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) % number_literal) ]) = (binary_expression "local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2]" (subscript_expression "local_58[(uVar5 + 2) % 0x28]" identifier [ (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" ( (binary_expression "uVar5 + 2" identifier + number_literal) )) % number_literal) ]) ^ (subscript_expression "param_1[uVar5 + 2]" identifier [ (binary_expression "uVar5 + 2" identifier + number_literal) ]))) ;) (expression_statement "local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];" (assignment_expression "local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3]" (subscript_expression "local_58[(uVar5 + 3) % 0x28]" identifier [ (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) % number_literal) ]) = (binary_expression "local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3]" (subscript_expression "local_58[(uVar5 + 3) % 0x28]" identifier [ (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" ( (binary_expression "uVar5 + 3" identifier + number_literal) )) % number_literal) ]) ^ (subscript_expression "param_1[uVar5 + 3]" identifier [ (binary_expression "uVar5 + 3" identifier + number_literal) ]))) ;) })) (expression_statement "uVar5 = chacha_setup(param_3,local_58,0x20,0x14);" (assignment_expression "uVar5 = chacha_setup(param_3,local_58,0x20,0x14)" identifier = (call_expression "chacha_setup(param_3,local_58,0x20,0x14)" identifier (argument_list "(param_3,local_58,0x20,0x14)" ( identifier , identifier , number_literal , number_literal )))) ;) (if_statement "if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }" if (parenthesized_expression "(((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0))" ( (binary_expression "((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)" (parenthesized_expression "((int)uVar5 == 0)" ( (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) && (parenthesized_expression "(uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)" ( (comma_expression "uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0" (assignment_expression "uVar5 = chacha_ivctr64(param_3,local_38,8,0)" identifier = (call_expression "chacha_ivctr64(param_3,local_38,8,0)" identifier (argument_list "(param_3,local_38,8,0)" ( identifier , identifier , number_literal , number_literal )))) , (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal)) ))) )) (compound_statement "{\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }" { (expression_statement "zeromem(local_58,0x28);" (call_expression "zeromem(local_58,0x28)" identifier (argument_list "(local_58,0x28)" ( identifier , number_literal ))) ;) (expression_statement "uVar5 = uVar5 & 0xffffffff;" (assignment_expression "uVar5 = uVar5 & 0xffffffff" identifier = (binary_expression "uVar5 & 0xffffffff" identifier & number_literal)) ;) })) })) }))) (if_statement "if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_30 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (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 = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) & LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT % LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - IDENT) ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT % LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - IDENT) ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT % LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) (for_statement for ( ; (binary_expression IDENT != (binary_expression IDENT + IDENT)) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - IDENT) ])) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT % LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - IDENT) ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - IDENT) ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - IDENT) ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) ^ (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT % LIT) ]) = (binary_expression (subscript_expression IDENT [ (binary_expression IDENT % LIT) ]) ^ (subscript_expression IDENT [ IDENT ]))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT % LIT) ]) = (binary_expression (subscript_expression IDENT [ (binary_expression IDENT % LIT) ]) ^ (subscript_expression IDENT [ IDENT ]))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression IDENT + LIT)) ; (binary_expression IDENT != IDENT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT + LIT) ])) ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT % LIT) ]) = (binary_expression (subscript_expression IDENT [ (binary_expression IDENT % LIT) ]) ^ (subscript_expression IDENT [ IDENT ]))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT) ]) = (binary_expression (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT) ]) ^ IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT) ]) = (binary_expression (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT) ]) ^ (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT) ]) = (binary_expression (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT) ]) ^ (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT )))) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) })) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "ulong chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar5;\n}" (type_identifier "ulong") (function_declarator "chacha20_prng_add_entropy(byte *param_1,ulong param_2,long param_3)" (identifier "chacha20_prng_add_entropy") (parameter_list "(byte *param_1,ulong param_2,long param_3)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  byte local_58 [32];\n  undefined1 local_38 [8];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_3 == 0) {\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }\n  if (param_1 == (byte *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }\n  if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar5;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (declaration "ulong uVar6;" (type_identifier "ulong") (identifier "uVar6") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "byte local_58 [32];" (type_identifier "byte") (array_declarator "local_58 [32]" (identifier "local_58") ([ "[") (number_literal "32") (] "]")) (; ";")) (declaration "undefined1 local_38 [8];" (type_identifier "undefined1") (array_declarator "local_38 [8]" (identifier "local_38") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "long local_30;" (sized_type_specifier "long" (long "long")) (identifier "local_30") (; ";")) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (param_3 == 0) {\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);\n  }" ({ "{") (expression_statement "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);" (call_expression "crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c)" (identifier "crypt_argchk") (argument_list "("prng != NULL","src/prngs/chacha20.c",0x3c)" (( "(") (string_literal ""prng != NULL"" (" """) (string_content "prng != NULL") (" """)) (, ",") (string_literal ""src/prngs/chacha20.c"" (" """) (string_content "src/prngs/chacha20.c") (" """)) (, ",") (number_literal "0x3c") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_1 == (byte *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" (if "if") (parenthesized_expression "(param_1 == (byte *)0x0)" (( "(") (binary_expression "param_1 == (byte *)0x0" (identifier "param_1") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);\n  }" ({ "{") (expression_statement "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);" (call_expression "crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d)" (identifier "crypt_argchk") (argument_list "("in != NULL","src/prngs/chacha20.c",0x3d)" (( "(") (string_literal ""in != NULL"" (" """) (string_content "in != NULL") (" """)) (, ",") (string_literal ""src/prngs/chacha20.c"" (" """) (string_content "src/prngs/chacha20.c") (" """)) (, ",") (number_literal "0x3d") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 == 0) {\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);\n  }" ({ "{") (expression_statement "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);" (call_expression "crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e)" (identifier "crypt_argchk") (argument_list "("inlen > 0","src/prngs/chacha20.c",0x3e)" (( "(") (string_literal ""inlen > 0"" (" """) (string_content "inlen > 0") (" """)) (, ",") (string_literal ""src/prngs/chacha20.c"" (" """) (string_content "src/prngs/chacha20.c") (" """)) (, ",") (number_literal "0x3e") () ")"))) (; ";")) (} "}"))) (if_statement "if (*(short *)(param_3 + 0x44f0) == 0) {\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }\n  else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(*(short *)(param_3 + 0x44f0) == 0)" (( "(") (binary_expression "*(short *)(param_3 + 0x44f0) == 0" (pointer_expression "*(short *)(param_3 + 0x44f0)" (* "*") (cast_expression "(short *)(param_3 + 0x44f0)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x44f0)" (( "(") (binary_expression "param_3 + 0x44f0" (identifier "param_3") (+ "+") (number_literal "0x44f0")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar6 = *(ulong *)(param_3 + 0xc0);\n    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;\n    uVar5 = uVar6;\n    if (uVar3 == 0) goto LAB_00185d5b;\n    uVar4 = uVar6;\n    if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    bVar2 = param_1[uVar4 - uVar6];\n    uVar5 = uVar4 + 1;\n    *(ulong *)(param_3 + 0xc0) = uVar5;\n    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);\n    *pbVar1 = *pbVar1 ^ bVar2;\n    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }\n    uVar5 = 0;\n  }" ({ "{") (expression_statement "uVar6 = *(ulong *)(param_3 + 0xc0);" (assignment_expression "uVar6 = *(ulong *)(param_3 + 0xc0)" (identifier "uVar6") (= "=") (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")"))))) (; ";")) (expression_statement "uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;" (assignment_expression "uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3" (identifier "uVar3") (= "=") (binary_expression "(int)(param_2 + uVar6) - (int)uVar6 & 3" (binary_expression "(int)(param_2 + uVar6) - (int)uVar6" (cast_expression "(int)(param_2 + uVar6)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(param_2 + uVar6)" (( "(") (binary_expression "param_2 + uVar6" (identifier "param_2") (+ "+") (identifier "uVar6")) () ")"))) (- "-") (cast_expression "(int)uVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar6"))) (& "&") (number_literal "3"))) (; ";")) (expression_statement "uVar5 = uVar6;" (assignment_expression "uVar5 = uVar6" (identifier "uVar5") (= "=") (identifier "uVar6")) (; ";")) (if_statement "if (uVar3 == 0) goto LAB_00185d5b;" (if "if") (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00185d5b;" (goto "goto") (statement_identifier "LAB_00185d5b") (; ";"))) (expression_statement "uVar4 = uVar6;" (assignment_expression "uVar4 = uVar6" (identifier "uVar4") (= "=") (identifier "uVar6")) (; ";")) (if_statement "if (uVar3 != 1) {\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" (if "if") (parenthesized_expression "(uVar3 != 1)" (( "(") (binary_expression "uVar3 != 1" (identifier "uVar3") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }\n      bVar2 = param_1[uVar5 - uVar6];\n      uVar4 = uVar5 + 1;\n      *(ulong *)(param_3 + 0xc0) = uVar4;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" ({ "{") (if_statement "if (uVar3 != 2) {\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }" (if "if") (parenthesized_expression "(uVar3 != 2)" (( "(") (binary_expression "uVar3 != 2" (identifier "uVar3") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n        uVar5 = uVar6 + 1;\n        bVar2 = *param_1;\n        *(ulong *)(param_3 + 0xc0) = uVar5;\n        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);\n        *pbVar1 = *pbVar1 ^ bVar2;\n      }" ({ "{") (expression_statement "uVar5 = uVar6 + 1;" (assignment_expression "uVar5 = uVar6 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar6 + 1" (identifier "uVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "bVar2 = *param_1;" (assignment_expression "bVar2 = *param_1" (identifier "bVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5" (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(param_3 + 0x98 + uVar6 % 0x28)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x98 + uVar6 % 0x28)" (( "(") (binary_expression "param_3 + 0x98 + uVar6 % 0x28" (binary_expression "param_3 + 0x98" (identifier "param_3") (+ "+") (number_literal "0x98")) (+ "+") (binary_expression "uVar6 % 0x28" (identifier "uVar6") (% "%") (number_literal "0x28"))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (identifier "bVar2"))) (; ";")) (} "}"))) (expression_statement "bVar2 = param_1[uVar5 - uVar6];" (assignment_expression "bVar2 = param_1[uVar5 - uVar6]" (identifier "bVar2") (= "=") (subscript_expression "param_1[uVar5 - uVar6]" (identifier "param_1") ([ "[") (binary_expression "uVar5 - uVar6" (identifier "uVar5") (- "-") (identifier "uVar6")) (] "]"))) (; ";")) (expression_statement "uVar4 = uVar5 + 1;" (assignment_expression "uVar4 = uVar5 + 1" (identifier "uVar4") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar4;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar4" (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(param_3 + 0x98 + uVar5 % 0x28)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x98 + uVar5 % 0x28)" (( "(") (binary_expression "param_3 + 0x98 + uVar5 % 0x28" (binary_expression "param_3 + 0x98" (identifier "param_3") (+ "+") (number_literal "0x98")) (+ "+") (binary_expression "uVar5 % 0x28" (identifier "uVar5") (% "%") (number_literal "0x28"))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (identifier "bVar2"))) (; ";")) (} "}"))) (expression_statement "bVar2 = param_1[uVar4 - uVar6];" (assignment_expression "bVar2 = param_1[uVar4 - uVar6]" (identifier "bVar2") (= "=") (subscript_expression "param_1[uVar4 - uVar6]" (identifier "param_1") ([ "[") (binary_expression "uVar4 - uVar6" (identifier "uVar4") (- "-") (identifier "uVar6")) (] "]"))) (; ";")) (expression_statement "uVar5 = uVar4 + 1;" (assignment_expression "uVar5 = uVar4 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5" (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(param_3 + 0x98 + uVar4 % 0x28)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x98 + uVar4 % 0x28)" (( "(") (binary_expression "param_3 + 0x98 + uVar4 % 0x28" (binary_expression "param_3 + 0x98" (identifier "param_3") (+ "+") (number_literal "0x98")) (+ "+") (binary_expression "uVar4 % 0x28" (identifier "uVar4") (% "%") (number_literal "0x28"))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (identifier "bVar2"))) (; ";")) (for_statement "for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" (for "for") (( "(") (; ";") (binary_expression "uVar5 != param_2 + uVar6" (identifier "uVar5") (!= "!=") (binary_expression "param_2 + uVar6" (identifier "param_2") (+ "+") (identifier "uVar6"))) (; ";") (assignment_expression "uVar5 = uVar5 + 4" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 4" (identifier "uVar5") (+ "+") (number_literal "4"))) () ")") (compound_statement "{\nLAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;\n      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 1) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 2) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n      bVar2 = param_1[(uVar5 + 3) - uVar6];\n      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;\n      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);\n      *pbVar1 = *pbVar1 ^ bVar2;\n    }" ({ "{") (labeled_statement "LAB_00185d5b:\n      bVar2 = param_1[uVar5 - uVar6];" (statement_identifier "LAB_00185d5b") (: ":") (expression_statement "bVar2 = param_1[uVar5 - uVar6];" (assignment_expression "bVar2 = param_1[uVar5 - uVar6]" (identifier "bVar2") (= "=") (subscript_expression "param_1[uVar5 - uVar6]" (identifier "param_1") ([ "[") (binary_expression "uVar5 - uVar6" (identifier "uVar5") (- "-") (identifier "uVar6")) (] "]"))) (; ";"))) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 1;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 1" (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(param_3 + 0x98 + uVar5 % 0x28)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x98 + uVar5 % 0x28)" (( "(") (binary_expression "param_3 + 0x98 + uVar5 % 0x28" (binary_expression "param_3 + 0x98" (identifier "param_3") (+ "+") (number_literal "0x98")) (+ "+") (binary_expression "uVar5 % 0x28" (identifier "uVar5") (% "%") (number_literal "0x28"))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (identifier "bVar2"))) (; ";")) (expression_statement "bVar2 = param_1[(uVar5 + 1) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 1) - uVar6]" (identifier "bVar2") (= "=") (subscript_expression "param_1[(uVar5 + 1) - uVar6]" (identifier "param_1") ([ "[") (binary_expression "(uVar5 + 1) - uVar6" (parenthesized_expression "(uVar5 + 1)" (( "(") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1")) () ")")) (- "-") (identifier "uVar6")) (] "]"))) (; ";")) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 2;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 2" (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (binary_expression "uVar5 + 2" (identifier "uVar5") (+ "+") (number_literal "2"))) (; ";")) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 1) % 0x28)" (( "(") (binary_expression "param_3 + 0x98 + (uVar5 + 1) % 0x28" (binary_expression "param_3 + 0x98" (identifier "param_3") (+ "+") (number_literal "0x98")) (+ "+") (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" (( "(") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1")) () ")")) (% "%") (number_literal "0x28"))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (identifier "bVar2"))) (; ";")) (expression_statement "bVar2 = param_1[(uVar5 + 2) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 2) - uVar6]" (identifier "bVar2") (= "=") (subscript_expression "param_1[(uVar5 + 2) - uVar6]" (identifier "param_1") ([ "[") (binary_expression "(uVar5 + 2) - uVar6" (parenthesized_expression "(uVar5 + 2)" (( "(") (binary_expression "uVar5 + 2" (identifier "uVar5") (+ "+") (number_literal "2")) () ")")) (- "-") (identifier "uVar6")) (] "]"))) (; ";")) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 3;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 3" (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (binary_expression "uVar5 + 3" (identifier "uVar5") (+ "+") (number_literal "3"))) (; ";")) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 2) % 0x28)" (( "(") (binary_expression "param_3 + 0x98 + (uVar5 + 2) % 0x28" (binary_expression "param_3 + 0x98" (identifier "param_3") (+ "+") (number_literal "0x98")) (+ "+") (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" (( "(") (binary_expression "uVar5 + 2" (identifier "uVar5") (+ "+") (number_literal "2")) () ")")) (% "%") (number_literal "0x28"))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (identifier "bVar2"))) (; ";")) (expression_statement "bVar2 = param_1[(uVar5 + 3) - uVar6];" (assignment_expression "bVar2 = param_1[(uVar5 + 3) - uVar6]" (identifier "bVar2") (= "=") (subscript_expression "param_1[(uVar5 + 3) - uVar6]" (identifier "param_1") ([ "[") (binary_expression "(uVar5 + 3) - uVar6" (parenthesized_expression "(uVar5 + 3)" (( "(") (binary_expression "uVar5 + 3" (identifier "uVar5") (+ "+") (number_literal "3")) () ")")) (- "-") (identifier "uVar6")) (] "]"))) (; ";")) (expression_statement "*(ulong *)(param_3 + 0xc0) = uVar5 + 4;" (assignment_expression "*(ulong *)(param_3 + 0xc0) = uVar5 + 4" (pointer_expression "*(ulong *)(param_3 + 0xc0)" (* "*") (cast_expression "(ulong *)(param_3 + 0xc0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc0)" (( "(") (binary_expression "param_3 + 0xc0" (identifier "param_3") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (binary_expression "uVar5 + 4" (identifier "uVar5") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);" (assignment_expression "pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x98 + (uVar5 + 3) % 0x28)" (( "(") (binary_expression "param_3 + 0x98 + (uVar5 + 3) % 0x28" (binary_expression "param_3 + 0x98" (identifier "param_3") (+ "+") (number_literal "0x98")) (+ "+") (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" (( "(") (binary_expression "uVar5 + 3" (identifier "uVar5") (+ "+") (number_literal "3")) () ")")) (% "%") (number_literal "0x28"))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ bVar2;" (assignment_expression "*pbVar1 = *pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (identifier "bVar2"))) (; ";")) (} "}"))) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    uVar5 = chacha_keystream(param_3,local_58,0x28);\n    if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }\n  }" ({ "{") (expression_statement "uVar5 = chacha_keystream(param_3,local_58,0x28);" (assignment_expression "uVar5 = chacha_keystream(param_3,local_58,0x28)" (identifier "uVar5") (= "=") (call_expression "chacha_keystream(param_3,local_58,0x28)" (identifier "chacha_keystream") (argument_list "(param_3,local_58,0x28)" (( "(") (identifier "param_3") (, ",") (identifier "local_58") (, ",") (number_literal "0x28") () ")")))) (; ";")) (if_statement "if ((int)uVar5 == 0) {\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }" (if "if") (parenthesized_expression "((int)uVar5 == 0)" (( "(") (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar5 = 0;\n      uVar3 = (uint)param_2 & 3;\n      if ((param_2 & 3) == 0) goto LAB_00185ee7;\n      if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }\n      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }\n      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);\n      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }\n    }" ({ "{") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = (uint)param_2 & 3;" (assignment_expression "uVar3 = (uint)param_2 & 3" (identifier "uVar3") (= "=") (binary_expression "(uint)param_2 & 3" (cast_expression "(uint)param_2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_2")) (& "&") (number_literal "3"))) (; ";")) (if_statement "if ((param_2 & 3) == 0) goto LAB_00185ee7;" (if "if") (parenthesized_expression "((param_2 & 3) == 0)" (( "(") (binary_expression "(param_2 & 3) == 0" (parenthesized_expression "(param_2 & 3)" (( "(") (binary_expression "param_2 & 3" (identifier "param_2") (& "&") (number_literal "3")) () ")")) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00185ee7;" (goto "goto") (statement_identifier "LAB_00185ee7") (; ";"))) (if_statement "if (uVar3 != 1) {\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }" (if "if") (parenthesized_expression "(uVar3 != 1)" (( "(") (binary_expression "uVar3 != 1" (identifier "uVar3") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n        if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }\n        uVar6 = (ulong)(uVar3 != 2);\n        uVar5 = uVar6 + 1;\n        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];\n      }" ({ "{") (if_statement "if (uVar3 != 2) {\n          local_58[0] = local_58[0] ^ *param_1;\n        }" (if "if") (parenthesized_expression "(uVar3 != 2)" (( "(") (binary_expression "uVar3 != 2" (identifier "uVar3") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n          local_58[0] = local_58[0] ^ *param_1;\n        }" ({ "{") (expression_statement "local_58[0] = local_58[0] ^ *param_1;" (assignment_expression "local_58[0] = local_58[0] ^ *param_1" (subscript_expression "local_58[0]" (identifier "local_58") ([ "[") (number_literal "0") (] "]")) (= "=") (binary_expression "local_58[0] ^ *param_1" (subscript_expression "local_58[0]" (identifier "local_58") ([ "[") (number_literal "0") (] "]")) (^ "^") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "uVar6 = (ulong)(uVar3 != 2);" (assignment_expression "uVar6 = (ulong)(uVar3 != 2)" (identifier "uVar6") (= "=") (call_expression "(ulong)(uVar3 != 2)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(uVar3 != 2)" (( "(") (binary_expression "uVar3 != 2" (identifier "uVar3") (!= "!=") (number_literal "2")) () ")")))) (; ";")) (expression_statement "uVar5 = uVar6 + 1;" (assignment_expression "uVar5 = uVar6 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar6 + 1" (identifier "uVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];" (assignment_expression "local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6]" (subscript_expression "local_58[uVar6 % 0x28]" (identifier "local_58") ([ "[") (binary_expression "uVar6 % 0x28" (identifier "uVar6") (% "%") (number_literal "0x28")) (] "]")) (= "=") (binary_expression "local_58[uVar6 % 0x28] ^ param_1[uVar6]" (subscript_expression "local_58[uVar6 % 0x28]" (identifier "local_58") ([ "[") (binary_expression "uVar6 % 0x28" (identifier "uVar6") (% "%") (number_literal "0x28")) (] "]")) (^ "^") (subscript_expression "param_1[uVar6]" (identifier "param_1") ([ "[") (identifier "uVar6") (] "]")))) (; ";")) (} "}"))) (expression_statement "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];" (assignment_expression "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" (identifier "local_58") ([ "[") (binary_expression "uVar5 % 0x28" (identifier "uVar5") (% "%") (number_literal "0x28")) (] "]")) (= "=") (binary_expression "local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" (identifier "local_58") ([ "[") (binary_expression "uVar5 % 0x28" (identifier "uVar5") (% "%") (number_literal "0x28")) (] "]")) (^ "^") (subscript_expression "param_1[uVar5]" (identifier "param_1") ([ "[") (identifier "uVar5") (] "]")))) (; ";")) (for_statement "for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }" (for "for") (( "(") (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";") (binary_expression "param_2 != uVar5" (identifier "param_2") (!= "!=") (identifier "uVar5")) (; ";") (assignment_expression "uVar5 = uVar5 + 4" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 4" (identifier "uVar5") (+ "+") (number_literal "4"))) () ")") (compound_statement "{\nLAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];\n        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];\n        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;\n        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];\n        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];\n      }" ({ "{") (labeled_statement "LAB_00185ee7:\n        bVar2 = param_1[uVar5 + 1];" (statement_identifier "LAB_00185ee7") (: ":") (expression_statement "bVar2 = param_1[uVar5 + 1];" (assignment_expression "bVar2 = param_1[uVar5 + 1]" (identifier "bVar2") (= "=") (subscript_expression "param_1[uVar5 + 1]" (identifier "param_1") ([ "[") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1")) (] "]"))) (; ";"))) (expression_statement "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];" (assignment_expression "local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" (identifier "local_58") ([ "[") (binary_expression "uVar5 % 0x28" (identifier "uVar5") (% "%") (number_literal "0x28")) (] "]")) (= "=") (binary_expression "local_58[uVar5 % 0x28] ^ param_1[uVar5]" (subscript_expression "local_58[uVar5 % 0x28]" (identifier "local_58") ([ "[") (binary_expression "uVar5 % 0x28" (identifier "uVar5") (% "%") (number_literal "0x28")) (] "]")) (^ "^") (subscript_expression "param_1[uVar5]" (identifier "param_1") ([ "[") (identifier "uVar5") (] "]")))) (; ";")) (expression_statement "local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;" (assignment_expression "local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2" (subscript_expression "local_58[(uVar5 + 1) % 0x28]" (identifier "local_58") ([ "[") (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" (( "(") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1")) () ")")) (% "%") (number_literal "0x28")) (] "]")) (= "=") (binary_expression "local_58[(uVar5 + 1) % 0x28] ^ bVar2" (subscript_expression "local_58[(uVar5 + 1) % 0x28]" (identifier "local_58") ([ "[") (binary_expression "(uVar5 + 1) % 0x28" (parenthesized_expression "(uVar5 + 1)" (( "(") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1")) () ")")) (% "%") (number_literal "0x28")) (] "]")) (^ "^") (identifier "bVar2"))) (; ";")) (expression_statement "local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];" (assignment_expression "local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2]" (subscript_expression "local_58[(uVar5 + 2) % 0x28]" (identifier "local_58") ([ "[") (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" (( "(") (binary_expression "uVar5 + 2" (identifier "uVar5") (+ "+") (number_literal "2")) () ")")) (% "%") (number_literal "0x28")) (] "]")) (= "=") (binary_expression "local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2]" (subscript_expression "local_58[(uVar5 + 2) % 0x28]" (identifier "local_58") ([ "[") (binary_expression "(uVar5 + 2) % 0x28" (parenthesized_expression "(uVar5 + 2)" (( "(") (binary_expression "uVar5 + 2" (identifier "uVar5") (+ "+") (number_literal "2")) () ")")) (% "%") (number_literal "0x28")) (] "]")) (^ "^") (subscript_expression "param_1[uVar5 + 2]" (identifier "param_1") ([ "[") (binary_expression "uVar5 + 2" (identifier "uVar5") (+ "+") (number_literal "2")) (] "]")))) (; ";")) (expression_statement "local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];" (assignment_expression "local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3]" (subscript_expression "local_58[(uVar5 + 3) % 0x28]" (identifier "local_58") ([ "[") (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" (( "(") (binary_expression "uVar5 + 3" (identifier "uVar5") (+ "+") (number_literal "3")) () ")")) (% "%") (number_literal "0x28")) (] "]")) (= "=") (binary_expression "local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3]" (subscript_expression "local_58[(uVar5 + 3) % 0x28]" (identifier "local_58") ([ "[") (binary_expression "(uVar5 + 3) % 0x28" (parenthesized_expression "(uVar5 + 3)" (( "(") (binary_expression "uVar5 + 3" (identifier "uVar5") (+ "+") (number_literal "3")) () ")")) (% "%") (number_literal "0x28")) (] "]")) (^ "^") (subscript_expression "param_1[uVar5 + 3]" (identifier "param_1") ([ "[") (binary_expression "uVar5 + 3" (identifier "uVar5") (+ "+") (number_literal "3")) (] "]")))) (; ";")) (} "}"))) (expression_statement "uVar5 = chacha_setup(param_3,local_58,0x20,0x14);" (assignment_expression "uVar5 = chacha_setup(param_3,local_58,0x20,0x14)" (identifier "uVar5") (= "=") (call_expression "chacha_setup(param_3,local_58,0x20,0x14)" (identifier "chacha_setup") (argument_list "(param_3,local_58,0x20,0x14)" (( "(") (identifier "param_3") (, ",") (identifier "local_58") (, ",") (number_literal "0x20") (, ",") (number_literal "0x14") () ")")))) (; ";")) (if_statement "if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }" (if "if") (parenthesized_expression "(((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0))" (( "(") (binary_expression "((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)" (parenthesized_expression "((int)uVar5 == 0)" (( "(") (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)" (( "(") (comma_expression "uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0" (assignment_expression "uVar5 = chacha_ivctr64(param_3,local_38,8,0)" (identifier "uVar5") (= "=") (call_expression "chacha_ivctr64(param_3,local_38,8,0)" (identifier "chacha_ivctr64") (argument_list "(param_3,local_38,8,0)" (( "(") (identifier "param_3") (, ",") (identifier "local_38") (, ",") (number_literal "8") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "(int)uVar5 == 0" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        zeromem(local_58,0x28);\n        uVar5 = uVar5 & 0xffffffff;\n      }" ({ "{") (expression_statement "zeromem(local_58,0x28);" (call_expression "zeromem(local_58,0x28)" (identifier "zeromem") (argument_list "(local_58,0x28)" (( "(") (identifier "local_58") (, ",") (number_literal "0x28") () ")"))) (; ";")) (expression_statement "uVar5 = uVar5 & 0xffffffff;" (assignment_expression "uVar5 = uVar5 & 0xffffffff" (identifier "uVar5") (= "=") (binary_expression "uVar5 & 0xffffffff" (identifier "uVar5") (& "&") (number_literal "0xffffffff"))) (; ";")) (} "}"))) (} "}"))) (} "}")))) (if_statement "if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_30 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_30 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (!= "!=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}")))

int function_1(type_1 *var_4,type_2 var_5,type_3 *var_2)

{
  type_4 var_8;
  long var_17;
  type_5 var_7;
  int var_12;
  type_2 var_10;
  type_2 var_9;
  type_2 var_6;
  long var_1;
  type_1 var_15 [40];
  
  var_17 = *(long *)(var_1 + 0x28);
  if (var_2 == (type_3 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("prng != NULL","src/prngs/chacha20.c",0x3c);
  }
  if (var_4 == (type_1 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("in != NULL","src/prngs/chacha20.c",0x3d);
  }
  if (var_5 == 0) {
                    /* WARNING: Subroutine does not return */
    var_3("inlen > 0","src/prngs/chacha20.c",0x3e);
  }
  if (var_2->ready == 0) {
    var_6 = (var_2->field_0).chacha.idx;
    var_7 = (int)(var_5 + var_6) - (int)var_6 & 3;
    var_9 = var_6;
    if (var_7 == 0) goto LAB_00185d5b;
    var_10 = var_6;
    if (var_7 != 1) {
      if (var_7 != 2) {
        var_9 = var_6 + 1;
        var_8 = *var_4;
        (var_2->field_0).chacha.idx = var_9;
        (var_2->field_0).dummy[var_6 % 0x28 + 0x98] =
             (var_2->field_0).dummy[var_6 % 0x28 + 0x98] ^ var_8;
      }
      var_8 = var_4[var_9 - var_6];
      var_10 = var_9 + 1;
      (var_2->field_0).chacha.idx = var_10;
      (var_2->field_0).dummy[var_9 % 0x28 + 0x98] =
           (var_2->field_0).dummy[var_9 % 0x28 + 0x98] ^ var_8;
    }
    var_8 = var_4[var_10 - var_6];
    var_9 = var_10 + 1;
    (var_2->field_0).chacha.idx = var_9;
    (var_2->field_0).dummy[var_10 % 0x28 + 0x98] = (var_2->field_0).dummy[var_10 % 0x28 + 0x98] ^ var_8;
    for (; var_9 != var_5 + var_6; var_9 = var_9 + 4) {
LAB_00185d5b:
      var_8 = var_4[var_9 - var_6];
      (var_2->field_0).chacha.idx = var_9 + 1;
      (var_2->field_0).dummy[var_9 % 0x28 + 0x98] =
           (var_2->field_0).dummy[var_9 % 0x28 + 0x98] ^ var_8;
      var_8 = var_4[(var_9 + 1) - var_6];
      (var_2->field_0).chacha.idx = var_9 + 2;
      (var_2->field_0).dummy[(var_9 + 1) % 0x28 + 0x98] =
           (var_2->field_0).dummy[(var_9 + 1) % 0x28 + 0x98] ^ var_8;
      var_8 = var_4[(var_9 + 2) - var_6];
      (var_2->field_0).chacha.idx = var_9 + 3;
      (var_2->field_0).dummy[(var_9 + 2) % 0x28 + 0x98] =
           (var_2->field_0).dummy[(var_9 + 2) % 0x28 + 0x98] ^ var_8;
      var_8 = var_4[(var_9 + 3) - var_6];
      (var_2->field_0).chacha.idx = var_9 + 4;
      (var_2->field_0).dummy[(var_9 + 3) % 0x28 + 0x98] =
           (var_2->field_0).dummy[(var_9 + 3) % 0x28 + 0x98] ^ var_8;
    }
    var_12 = 0;
  }
  else {
    var_12 = var_11((type_6 *)var_2,var_15,0x28);
    if (var_12 == 0) {
      var_9 = 0;
      var_7 = (type_5)var_5 & 3;
      if ((var_5 & 3) == 0) goto LAB_00185ee7;
      if (var_7 != 1) {
        if (var_7 != 2) {
          var_15[0] = var_15[0] ^ *var_4;
        }
        var_6 = (type_2)(var_7 != 2);
        var_9 = var_6 + 1;
        var_15[var_6 % 0x28] = var_15[var_6 % 0x28] ^ var_4[var_6];
      }
      var_15[var_9 % 0x28] = var_15[var_9 % 0x28] ^ var_4[var_9];
      for (var_9 = var_9 + 1; var_5 != var_9; var_9 = var_9 + 4) {
LAB_00185ee7:
        var_8 = var_4[var_9 + 1];
        var_15[var_9 % 0x28] = var_15[var_9 % 0x28] ^ var_4[var_9];
        var_15[(var_9 + 1) % 0x28] = var_15[(var_9 + 1) % 0x28] ^ var_8;
        var_15[(var_9 + 2) % 0x28] = var_15[(var_9 + 2) % 0x28] ^ var_4[var_9 + 2];
        var_15[(var_9 + 3) % 0x28] = var_15[(var_9 + 3) % 0x28] ^ var_4[var_9 + 3];
      }
      var_12 = var_13((type_6 *)var_2,var_15,0x20,0x14);
      if ((var_12 == 0) && (var_12 = var_14((type_6 *)var_2,var_15 + 0x20,8,0), var_12 == 0))
      {
        var_16(var_15,0x28);
      }
    }
  }
  if (var_17 != *(long *)(var_1 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_18();
  }
  return var_12;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (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: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (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: (number_literal))))) right: (identifier))) (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: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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: (number_literal))))) right: (identifier))) (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: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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: (number_literal))))) right: (identifier))) (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: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (for_statement condition: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))) update: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (identifier)))))) (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: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (identifier))))) (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: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (identifier))))) (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: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (identifier))))) (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: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (subscript_expression argument: (identifier) index: (identifier))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (subscript_expression argument: (identifier) index: (identifier))))) (for_statement initializer: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (subscript_expression argument: (identifier) index: (identifier))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal)))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

ulong MASKED(byte *param_1,ulong param_2,long param_3)

{
  byte *pbVar1;
  byte bVar2;
  uint uVar3;
  ulong uVar4;
  ulong uVar5;
  ulong uVar6;
  long in_FS_OFFSET;
  byte local_58 [32];
  undefined1 local_38 [8];
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_3 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("prng != NULL","src/prngs/chacha20.c",0x3c);
  }
  if (param_1 == (byte *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("in != NULL","src/prngs/chacha20.c",0x3d);
  }
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("inlen > 0","src/prngs/chacha20.c",0x3e);
  }
  if (*(short *)(param_3 + 0x44f0) == 0) {
    uVar6 = *(ulong *)(param_3 + 0xc0);
    uVar3 = (int)(param_2 + uVar6) - (int)uVar6 & 3;
    uVar5 = uVar6;
    if (uVar3 == 0) goto LAB_00185d5b;
    uVar4 = uVar6;
    if (uVar3 != 1) {
      if (uVar3 != 2) {
        uVar5 = uVar6 + 1;
        bVar2 = *param_1;
        *(ulong *)(param_3 + 0xc0) = uVar5;
        pbVar1 = (byte *)(param_3 + 0x98 + uVar6 % 0x28);
        *pbVar1 = *pbVar1 ^ bVar2;
      }
      bVar2 = param_1[uVar5 - uVar6];
      uVar4 = uVar5 + 1;
      *(ulong *)(param_3 + 0xc0) = uVar4;
      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
    }
    bVar2 = param_1[uVar4 - uVar6];
    uVar5 = uVar4 + 1;
    *(ulong *)(param_3 + 0xc0) = uVar5;
    pbVar1 = (byte *)(param_3 + 0x98 + uVar4 % 0x28);
    *pbVar1 = *pbVar1 ^ bVar2;
    for (; uVar5 != param_2 + uVar6; uVar5 = uVar5 + 4) {
LAB_00185d5b:
      bVar2 = param_1[uVar5 - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 1;
      pbVar1 = (byte *)(param_3 + 0x98 + uVar5 % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
      bVar2 = param_1[(uVar5 + 1) - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 2;
      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 1) % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
      bVar2 = param_1[(uVar5 + 2) - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 3;
      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 2) % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
      bVar2 = param_1[(uVar5 + 3) - uVar6];
      *(ulong *)(param_3 + 0xc0) = uVar5 + 4;
      pbVar1 = (byte *)(param_3 + 0x98 + (uVar5 + 3) % 0x28);
      *pbVar1 = *pbVar1 ^ bVar2;
    }
    uVar5 = 0;
  }
  else {
    uVar5 = chacha_keystream(param_3,local_58,0x28);
    if ((int)uVar5 == 0) {
      uVar5 = 0;
      uVar3 = (uint)param_2 & 3;
      if ((param_2 & 3) == 0) goto LAB_00185ee7;
      if (uVar3 != 1) {
        if (uVar3 != 2) {
          local_58[0] = local_58[0] ^ *param_1;
        }
        uVar6 = (ulong)(uVar3 != 2);
        uVar5 = uVar6 + 1;
        local_58[uVar6 % 0x28] = local_58[uVar6 % 0x28] ^ param_1[uVar6];
      }
      local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];
      for (uVar5 = uVar5 + 1; param_2 != uVar5; uVar5 = uVar5 + 4) {
LAB_00185ee7:
        bVar2 = param_1[uVar5 + 1];
        local_58[uVar5 % 0x28] = local_58[uVar5 % 0x28] ^ param_1[uVar5];
        local_58[(uVar5 + 1) % 0x28] = local_58[(uVar5 + 1) % 0x28] ^ bVar2;
        local_58[(uVar5 + 2) % 0x28] = local_58[(uVar5 + 2) % 0x28] ^ param_1[uVar5 + 2];
        local_58[(uVar5 + 3) % 0x28] = local_58[(uVar5 + 3) % 0x28] ^ param_1[uVar5 + 3];
      }
      uVar5 = chacha_setup(param_3,local_58,0x20,0x14);
      if (((int)uVar5 == 0) && (uVar5 = chacha_ivctr64(param_3,local_38,8,0), (int)uVar5 == 0)) {
        zeromem(local_58,0x28);
        uVar5 = uVar5 & 0xffffffff;
      }
    }
  }
  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar5;
}

