
int chacha20poly1305_setiv_rfc7905
              (chacha20poly1305_state *st,uchar *iv,ulong ivlen,ulong64 sequence_number)

{
  ulong uVar1;
  long lVar2;
  int iVar3;
  long in_FS_OFFSET;
  uchar combined_iv [12];
  
  lVar2 = *(long *)(in_FS_OFFSET + 0x28);
  combined_iv[8] = '\0';
  combined_iv[9] = '\0';
  combined_iv[10] = '\0';
  combined_iv[0xb] = '\0';
  combined_iv[0] = '\0';
  combined_iv[1] = '\0';
  combined_iv[2] = '\0';
  combined_iv[3] = '\0';
  combined_iv[4] = '\0';
  combined_iv[5] = '\0';
  combined_iv[6] = '\0';
  combined_iv[7] = '\0';
  if (st == (chacha20poly1305_state *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);
  }
  if (iv == (uchar *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);
  }
  if (ivlen != 0xc) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);
  }
  combined_iv._9_2_ = (undefined2)(sequence_number >> 0x28);
  combined_iv._0_4_ = *(undefined4 *)iv;
  combined_iv[0xb] = (byte)(sequence_number >> 0x38) ^ iv[0xb];
  combined_iv._9_2_ = combined_iv._9_2_ ^ *(ushort *)(iv + 9);
  uVar1 = sequence_number << 0x18 ^ *(ulong *)(iv + 1);
  combined_iv._4_4_ = (undefined4)(uVar1 >> 0x18);
  combined_iv[8] = (uchar)(uVar1 >> 0x38);
  iVar3 = chacha20poly1305_setiv(st,combined_iv,0xc);
  if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



void chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)

{
  ulong uVar1;
  long in_FS_OFFSET;
  undefined4 local_1c;
  undefined4 uStack_18;
  undefined1 local_14;
  ushort uStack_13;
  byte bStack_11;
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  local_14 = 0;
  uStack_13 = 0;
  bStack_11 = 0;
  local_1c = 0;
  uStack_18 = 0;
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);
  }
  if (param_2 == (undefined4 *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);
  }
  if (param_3 != 0xc) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);
  }
  uStack_13 = (ushort)((ulong)param_4 >> 0x28);
  local_1c = *param_2;
  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);
  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);
  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);
  uStack_18 = (undefined4)(uVar1 >> 0x18);
  local_14 = (undefined1)(uVar1 >> 0x38);
  chacha20poly1305_setiv(param_1,&local_1c,0xc);
  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x14],0x0
MOV qword ptr [RSP + 0xc],0x0
TEST RDI,RDI
JZ 0x00136a79
TEST RSI,RSI
JZ 0x00136aae
CMP RDX,0xc
JNZ 0x00136a96
MOVZX EDX,byte ptr [RSI]
MOV RAX,RCX
MOV qword ptr [RSP + 0x10],RCX
SHR RAX,0x38
MOV RCX,qword ptr [RSI + 0x1]
XOR AL,byte ptr [RSI + 0xb]
MOV byte ptr [RSP + 0xc],DL
MOVZX ESI,word ptr [RSI + 0x9]
MOV EDX,0xc
XOR word ptr [RSP + 0x15],SI
LEA RSI,[RSP + 0xc]
XOR qword ptr [RSP + 0xd],RCX
MOV byte ptr [RSP + 0x17],AL
CALL 0x00113b50
MOV RCX,qword ptr [RSP + 0x18]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00136a91
ADD RSP,0x28
RET
MOV EDX,0x1b
LEA RSI,[0x1aae08]
LEA RDI,[0x1c2da3]
CALL 0x00114270
CALL 0x00113880
MOV EDX,0x1d
LEA RSI,[0x1aae08]
LEA RDI,[0x1aae40]
CALL 0x00114270
MOV EDX,0x1c
LEA RSI,[0x1aae08]
LEA RDI,[0x1aada9]
CALL 0x00114270
(translation_unit "void chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)\n\n{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "void chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)\n\n{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)" identifier (parameter_list "(long param_1,undefined4 *param_2,long param_3,long param_4)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined4 local_1c;" type_identifier identifier ;) (declaration "undefined4 uStack_18;" type_identifier identifier ;) (declaration "undefined1 local_14;" type_identifier identifier ;) (declaration "ushort uStack_13;" type_identifier identifier ;) (declaration "byte bStack_11;" type_identifier identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(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) ))))) ;) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" identifier = number_literal) ;) (expression_statement "uStack_13 = 0;" (assignment_expression "uStack_13 = 0" identifier = number_literal) ;) (expression_statement "bStack_11 = 0;" (assignment_expression "bStack_11 = 0" identifier = number_literal) ;) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "uStack_18 = 0;" (assignment_expression "uStack_18 = 0" identifier = number_literal) ;) (if_statement "if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" { comment (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" identifier (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" ( (string_literal ""st != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" if (parenthesized_expression "(param_2 == (undefined4 *)0x0)" ( (binary_expression "param_2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" { comment (expression_statement "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);" (call_expression "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" identifier (argument_list "("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" ( (string_literal ""iv != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_3 != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" if (parenthesized_expression "(param_3 != 0xc)" ( (binary_expression "param_3 != 0xc" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" { comment (expression_statement "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);" (call_expression "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" identifier (argument_list "("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" ( (string_literal ""ivlen == 12"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "uStack_13 = (ushort)((ulong)param_4 >> 0x28);" (assignment_expression "uStack_13 = (ushort)((ulong)param_4 >> 0x28)" identifier = (call_expression "(ushort)((ulong)param_4 >> 0x28)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((ulong)param_4 >> 0x28)" ( (binary_expression "(ulong)param_4 >> 0x28" (cast_expression "(ulong)param_4" ( (type_descriptor "ulong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_1c = *param_2;" (assignment_expression "local_1c = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);" (assignment_expression "bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb)" identifier = (binary_expression "(byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb)" (call_expression "(byte)((ulong)param_4 >> 0x38)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((ulong)param_4 >> 0x38)" ( (binary_expression "(ulong)param_4 >> 0x38" (cast_expression "(ulong)param_4" ( (type_descriptor "ulong" type_identifier) ) identifier) >> number_literal) ))) ^ (pointer_expression "*(byte *)((long)param_2 + 0xb)" * (cast_expression "(byte *)((long)param_2 + 0xb)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_2 + 0xb)" ( (binary_expression "(long)param_2 + 0xb" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))))) ;) (expression_statement "uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);" (assignment_expression "uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9)" identifier = (binary_expression "uStack_13 ^ *(ushort *)((long)param_2 + 9)" identifier ^ (pointer_expression "*(ushort *)((long)param_2 + 9)" * (cast_expression "(ushort *)((long)param_2 + 9)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_2 + 9)" ( (binary_expression "(long)param_2 + 9" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))))) ;) (expression_statement "uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);" (assignment_expression "uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1)" identifier = (binary_expression "param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1)" (binary_expression "param_4 << 0x18" identifier << number_literal) ^ (pointer_expression "*(ulong *)((long)param_2 + 1)" * (cast_expression "(ulong *)((long)param_2 + 1)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_2 + 1)" ( (binary_expression "(long)param_2 + 1" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))))) ;) (expression_statement "uStack_18 = (undefined4)(uVar1 >> 0x18);" (assignment_expression "uStack_18 = (undefined4)(uVar1 >> 0x18)" identifier = (call_expression "(undefined4)(uVar1 >> 0x18)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "(uVar1 >> 0x18)" ( (binary_expression "uVar1 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "local_14 = (undefined1)(uVar1 >> 0x38);" (assignment_expression "local_14 = (undefined1)(uVar1 >> 0x38)" identifier = (call_expression "(undefined1)(uVar1 >> 0x38)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar1 >> 0x38)" ( (binary_expression "uVar1 >> 0x38" identifier >> number_literal) )))) ;) (expression_statement "chacha20poly1305_setiv(param_1,&local_1c,0xc);" (call_expression "chacha20poly1305_setiv(param_1,&local_1c,0xc)" identifier (argument_list "(param_1,&local_1c,0xc)" ( identifier , (pointer_expression "&local_1c" & identifier) , number_literal ))) ;) (if_statement "if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 == *(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    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int chacha20poly1305_setiv_rfc7905\n              (chacha20poly1305_state *st,uchar *iv,ulong ivlen,ulong64 sequence_number)\n\n{\n  ulong uVar1;\n  long lVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  uchar combined_iv [12];\n  \n  lVar2 = *(long *)(in_FS_OFFSET + 0x28);\n  combined_iv[8] = '\0';\n  combined_iv[9] = '\0';\n  combined_iv[10] = '\0';\n  combined_iv[0xb] = '\0';\n  combined_iv[0] = '\0';\n  combined_iv[1] = '\0';\n  combined_iv[2] = '\0';\n  combined_iv[3] = '\0';\n  combined_iv[4] = '\0';\n  combined_iv[5] = '\0';\n  combined_iv[6] = '\0';\n  combined_iv[7] = '\0';\n  if (st == (chacha20poly1305_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (iv == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (ivlen != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  combined_iv._9_2_ = (undefined2)(sequence_number >> 0x28);\n  combined_iv._0_4_ = *(undefined4 *)iv;\n  combined_iv[0xb] = (byte)(sequence_number >> 0x38) ^ iv[0xb];\n  combined_iv._9_2_ = combined_iv._9_2_ ^ *(ushort *)(iv + 9);\n  uVar1 = sequence_number << 0x18 ^ *(ulong *)(iv + 1);\n  combined_iv._4_4_ = (undefined4)(uVar1 >> 0x18);\n  combined_iv[8] = (uchar)(uVar1 >> 0x38);\n  iVar3 = chacha20poly1305_setiv(st,combined_iv,0xc);\n  if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int chacha20poly1305_setiv_rfc7905\n              (chacha20poly1305_state *st,uchar *iv,ulong ivlen,ulong64 sequence_number)\n\n{\n  ulong uVar1;\n  long lVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  uchar combined_iv [12];\n  \n  lVar2 = *(long *)(in_FS_OFFSET + 0x28);\n  combined_iv[8] = '\0';\n  combined_iv[9] = '\0';\n  combined_iv[10] = '\0';\n  combined_iv[0xb] = '\0';\n  combined_iv[0] = '\0';\n  combined_iv[1] = '\0';\n  combined_iv[2] = '\0';\n  combined_iv[3] = '\0';\n  combined_iv[4] = '\0';\n  combined_iv[5] = '\0';\n  combined_iv[6] = '\0';\n  combined_iv[7] = '\0';\n  if (st == (chacha20poly1305_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (iv == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (ivlen != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  combined_iv._9_2_ = (undefined2)(sequence_number >> 0x28);\n  combined_iv._0_4_ = *(undefined4 *)iv;\n  combined_iv[0xb] = (byte)(sequence_number >> 0x38) ^ iv[0xb];\n  combined_iv._9_2_ = combined_iv._9_2_ ^ *(ushort *)(iv + 9);\n  uVar1 = sequence_number << 0x18 ^ *(ulong *)(iv + 1);\n  combined_iv._4_4_ = (undefined4)(uVar1 >> 0x18);\n  combined_iv[8] = (uchar)(uVar1 >> 0x38);\n  iVar3 = chacha20poly1305_setiv(st,combined_iv,0xc);\n  if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "chacha20poly1305_setiv_rfc7905\n              (chacha20poly1305_state *st,uchar *iv,ulong ivlen,ulong64 sequence_number)" identifier (parameter_list "(chacha20poly1305_state *st,uchar *iv,ulong ivlen,ulong64 sequence_number)" ( (parameter_declaration "chacha20poly1305_state *st" type_identifier (pointer_declarator "*st" * identifier)) , (parameter_declaration "uchar *iv" type_identifier (pointer_declarator "*iv" * identifier)) , (parameter_declaration "ulong ivlen" type_identifier identifier) , (parameter_declaration "ulong64 sequence_number" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  long lVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  uchar combined_iv [12];\n  \n  lVar2 = *(long *)(in_FS_OFFSET + 0x28);\n  combined_iv[8] = '\0';\n  combined_iv[9] = '\0';\n  combined_iv[10] = '\0';\n  combined_iv[0xb] = '\0';\n  combined_iv[0] = '\0';\n  combined_iv[1] = '\0';\n  combined_iv[2] = '\0';\n  combined_iv[3] = '\0';\n  combined_iv[4] = '\0';\n  combined_iv[5] = '\0';\n  combined_iv[6] = '\0';\n  combined_iv[7] = '\0';\n  if (st == (chacha20poly1305_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (iv == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (ivlen != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  combined_iv._9_2_ = (undefined2)(sequence_number >> 0x28);\n  combined_iv._0_4_ = *(undefined4 *)iv;\n  combined_iv[0xb] = (byte)(sequence_number >> 0x38) ^ iv[0xb];\n  combined_iv._9_2_ = combined_iv._9_2_ ^ *(ushort *)(iv + 9);\n  uVar1 = sequence_number << 0x18 ^ *(ulong *)(iv + 1);\n  combined_iv._4_4_ = (undefined4)(uVar1 >> 0x18);\n  combined_iv[8] = (uchar)(uVar1 >> 0x38);\n  iVar3 = chacha20poly1305_setiv(st,combined_iv,0xc);\n  if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "uchar combined_iv [12];" type_identifier (array_declarator "combined_iv [12]" 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) ))))) ;) (expression_statement "combined_iv[8] = '\0';" (assignment_expression "combined_iv[8] = '\0'" (subscript_expression "combined_iv[8]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[9] = '\0';" (assignment_expression "combined_iv[9] = '\0'" (subscript_expression "combined_iv[9]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[10] = '\0';" (assignment_expression "combined_iv[10] = '\0'" (subscript_expression "combined_iv[10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[0xb] = '\0';" (assignment_expression "combined_iv[0xb] = '\0'" (subscript_expression "combined_iv[0xb]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[0] = '\0';" (assignment_expression "combined_iv[0] = '\0'" (subscript_expression "combined_iv[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[1] = '\0';" (assignment_expression "combined_iv[1] = '\0'" (subscript_expression "combined_iv[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[2] = '\0';" (assignment_expression "combined_iv[2] = '\0'" (subscript_expression "combined_iv[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[3] = '\0';" (assignment_expression "combined_iv[3] = '\0'" (subscript_expression "combined_iv[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[4] = '\0';" (assignment_expression "combined_iv[4] = '\0'" (subscript_expression "combined_iv[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[5] = '\0';" (assignment_expression "combined_iv[5] = '\0'" (subscript_expression "combined_iv[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[6] = '\0';" (assignment_expression "combined_iv[6] = '\0'" (subscript_expression "combined_iv[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "combined_iv[7] = '\0';" (assignment_expression "combined_iv[7] = '\0'" (subscript_expression "combined_iv[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (st == (chacha20poly1305_state *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" if (parenthesized_expression "(st == (chacha20poly1305_state *)0x0)" ( (binary_expression "st == (chacha20poly1305_state *)0x0" identifier == (cast_expression "(chacha20poly1305_state *)0x0" ( (type_descriptor "chacha20poly1305_state *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" { comment (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" identifier (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" ( (string_literal ""st != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (iv == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" if (parenthesized_expression "(iv == (uchar *)0x0)" ( (binary_expression "iv == (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("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" { comment (expression_statement "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);" (call_expression "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" identifier (argument_list "("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" ( (string_literal ""iv != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (ivlen != 0xc) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" if (parenthesized_expression "(ivlen != 0xc)" ( (binary_expression "ivlen != 0xc" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" { comment (expression_statement "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);" (call_expression "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" identifier (argument_list "("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" ( (string_literal ""ivlen == 12"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "combined_iv._9_2_ = (undefined2)(sequence_number >> 0x28);" (assignment_expression "combined_iv._9_2_ = (undefined2)(sequence_number >> 0x28)" (field_expression "combined_iv._9_2_" identifier . field_identifier) = (call_expression "(undefined2)(sequence_number >> 0x28)" (parenthesized_expression "(undefined2)" ( identifier )) (argument_list "(sequence_number >> 0x28)" ( (binary_expression "sequence_number >> 0x28" identifier >> number_literal) )))) ;) (expression_statement "combined_iv._0_4_ = *(undefined4 *)iv;" (assignment_expression "combined_iv._0_4_ = *(undefined4 *)iv" (field_expression "combined_iv._0_4_" identifier . field_identifier) = (pointer_expression "*(undefined4 *)iv" * (cast_expression "(undefined4 *)iv" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "combined_iv[0xb] = (byte)(sequence_number >> 0x38) ^ iv[0xb];" (assignment_expression "combined_iv[0xb] = (byte)(sequence_number >> 0x38) ^ iv[0xb]" (subscript_expression "combined_iv[0xb]" identifier [ number_literal ]) = (binary_expression "(byte)(sequence_number >> 0x38) ^ iv[0xb]" (call_expression "(byte)(sequence_number >> 0x38)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(sequence_number >> 0x38)" ( (binary_expression "sequence_number >> 0x38" identifier >> number_literal) ))) ^ (subscript_expression "iv[0xb]" identifier [ number_literal ]))) ;) (expression_statement "combined_iv._9_2_ = combined_iv._9_2_ ^ *(ushort *)(iv + 9);" (assignment_expression "combined_iv._9_2_ = combined_iv._9_2_ ^ *(ushort *)(iv + 9)" (field_expression "combined_iv._9_2_" identifier . field_identifier) = (binary_expression "combined_iv._9_2_ ^ *(ushort *)(iv + 9)" (field_expression "combined_iv._9_2_" identifier . field_identifier) ^ (pointer_expression "*(ushort *)(iv + 9)" * (cast_expression "(ushort *)(iv + 9)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iv + 9)" ( (binary_expression "iv + 9" identifier + number_literal) )))))) ;) (expression_statement "uVar1 = sequence_number << 0x18 ^ *(ulong *)(iv + 1);" (assignment_expression "uVar1 = sequence_number << 0x18 ^ *(ulong *)(iv + 1)" identifier = (binary_expression "sequence_number << 0x18 ^ *(ulong *)(iv + 1)" (binary_expression "sequence_number << 0x18" identifier << number_literal) ^ (pointer_expression "*(ulong *)(iv + 1)" * (cast_expression "(ulong *)(iv + 1)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iv + 1)" ( (binary_expression "iv + 1" identifier + number_literal) )))))) ;) (expression_statement "combined_iv._4_4_ = (undefined4)(uVar1 >> 0x18);" (assignment_expression "combined_iv._4_4_ = (undefined4)(uVar1 >> 0x18)" (field_expression "combined_iv._4_4_" identifier . field_identifier) = (call_expression "(undefined4)(uVar1 >> 0x18)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "(uVar1 >> 0x18)" ( (binary_expression "uVar1 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "combined_iv[8] = (uchar)(uVar1 >> 0x38);" (assignment_expression "combined_iv[8] = (uchar)(uVar1 >> 0x38)" (subscript_expression "combined_iv[8]" identifier [ number_literal ]) = (call_expression "(uchar)(uVar1 >> 0x38)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "(uVar1 >> 0x38)" ( (binary_expression "uVar1 >> 0x38" identifier >> number_literal) )))) ;) (expression_statement "iVar3 = chacha20poly1305_setiv(st,combined_iv,0xc);" (assignment_expression "iVar3 = chacha20poly1305_setiv(st,combined_iv,0xc)" identifier = (call_expression "chacha20poly1305_setiv(st,combined_iv,0xc)" identifier (argument_list "(st,combined_iv,0xc)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\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    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)\n\n{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "void chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)\n\n{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)" identifier (parameter_list "(long param_1,undefined4 *param_2,long param_3,long param_4)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined4 local_1c;" type_identifier identifier ;) (declaration "undefined4 uStack_18;" type_identifier identifier ;) (declaration "undefined1 local_14;" type_identifier identifier ;) (declaration "ushort uStack_13;" type_identifier identifier ;) (declaration "byte bStack_11;" type_identifier identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(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) ))))) ;) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" identifier = number_literal) ;) (expression_statement "uStack_13 = 0;" (assignment_expression "uStack_13 = 0" identifier = number_literal) ;) (expression_statement "bStack_11 = 0;" (assignment_expression "bStack_11 = 0" identifier = number_literal) ;) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "uStack_18 = 0;" (assignment_expression "uStack_18 = 0" identifier = number_literal) ;) (if_statement "if (param_1 == 0) {\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" { (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" identifier (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" ( (string_literal ""st != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" if (parenthesized_expression "(param_2 == (undefined4 *)0x0)" ( (binary_expression "param_2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" { (expression_statement "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);" (call_expression "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" identifier (argument_list "("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" ( (string_literal ""iv != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_3 != 0xc) {\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" if (parenthesized_expression "(param_3 != 0xc)" ( (binary_expression "param_3 != 0xc" identifier != number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" { (expression_statement "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);" (call_expression "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" identifier (argument_list "("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" ( (string_literal ""ivlen == 12"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "uStack_13 = (ushort)((ulong)param_4 >> 0x28);" (assignment_expression "uStack_13 = (ushort)((ulong)param_4 >> 0x28)" identifier = (call_expression "(ushort)((ulong)param_4 >> 0x28)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((ulong)param_4 >> 0x28)" ( (binary_expression "(ulong)param_4 >> 0x28" (cast_expression "(ulong)param_4" ( (type_descriptor "ulong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_1c = *param_2;" (assignment_expression "local_1c = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);" (assignment_expression "bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb)" identifier = (binary_expression "(byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb)" (call_expression "(byte)((ulong)param_4 >> 0x38)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((ulong)param_4 >> 0x38)" ( (binary_expression "(ulong)param_4 >> 0x38" (cast_expression "(ulong)param_4" ( (type_descriptor "ulong" type_identifier) ) identifier) >> number_literal) ))) ^ (pointer_expression "*(byte *)((long)param_2 + 0xb)" * (cast_expression "(byte *)((long)param_2 + 0xb)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_2 + 0xb)" ( (binary_expression "(long)param_2 + 0xb" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))))) ;) (expression_statement "uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);" (assignment_expression "uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9)" identifier = (binary_expression "uStack_13 ^ *(ushort *)((long)param_2 + 9)" identifier ^ (pointer_expression "*(ushort *)((long)param_2 + 9)" * (cast_expression "(ushort *)((long)param_2 + 9)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_2 + 9)" ( (binary_expression "(long)param_2 + 9" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))))) ;) (expression_statement "uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);" (assignment_expression "uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1)" identifier = (binary_expression "param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1)" (binary_expression "param_4 << 0x18" identifier << number_literal) ^ (pointer_expression "*(ulong *)((long)param_2 + 1)" * (cast_expression "(ulong *)((long)param_2 + 1)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_2 + 1)" ( (binary_expression "(long)param_2 + 1" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))))) ;) (expression_statement "uStack_18 = (undefined4)(uVar1 >> 0x18);" (assignment_expression "uStack_18 = (undefined4)(uVar1 >> 0x18)" identifier = (call_expression "(undefined4)(uVar1 >> 0x18)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "(uVar1 >> 0x18)" ( (binary_expression "uVar1 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "local_14 = (undefined1)(uVar1 >> 0x38);" (assignment_expression "local_14 = (undefined1)(uVar1 >> 0x38)" identifier = (call_expression "(undefined1)(uVar1 >> 0x38)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar1 >> 0x38)" ( (binary_expression "uVar1 >> 0x38" identifier >> number_literal) )))) ;) (expression_statement "chacha20poly1305_setiv(param_1,&local_1c,0xc);" (call_expression "chacha20poly1305_setiv(param_1,&local_1c,0xc)" identifier (argument_list "(param_1,&local_1c,0xc)" ( identifier , (pointer_expression "&local_1c" & identifier) , number_literal ))) ;) (if_statement "if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 == *(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    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_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 ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) ^ (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT ^ (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) ^ (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_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 { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)\n\n{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "void") (function_declarator "chacha20poly1305_setiv_rfc7905(long param_1,undefined4 *param_2,long param_3,long param_4)" (identifier "chacha20poly1305_setiv_rfc7905") (parameter_list "(long param_1,undefined4 *param_2,long param_3,long param_4)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) (, ",") (parameter_declaration "long param_4" (sized_type_specifier "long" (long "long")) (identifier "param_4")) () ")"))) (compound_statement "{\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined4 local_1c;\n  undefined4 uStack_18;\n  undefined1 local_14;\n  ushort uStack_13;\n  byte bStack_11;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  local_14 = 0;\n  uStack_13 = 0;\n  bStack_11 = 0;\n  local_1c = 0;\n  uStack_18 = 0;\n  if (param_1 == 0) {\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }\n  if (param_2 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }\n  if (param_3 != 0xc) {\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }\n  uStack_13 = (ushort)((ulong)param_4 >> 0x28);\n  local_1c = *param_2;\n  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);\n  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);\n  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);\n  uStack_18 = (undefined4)(uVar1 >> 0x18);\n  local_14 = (undefined1)(uVar1 >> 0x38);\n  chacha20poly1305_setiv(param_1,&local_1c,0xc);\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined4 local_1c;" (type_identifier "undefined4") (identifier "local_1c") (; ";")) (declaration "undefined4 uStack_18;" (type_identifier "undefined4") (identifier "uStack_18") (; ";")) (declaration "undefined1 local_14;" (type_identifier "undefined1") (identifier "local_14") (; ";")) (declaration "ushort uStack_13;" (type_identifier "ushort") (identifier "uStack_13") (; ";")) (declaration "byte bStack_11;" (type_identifier "byte") (identifier "bStack_11") (; ";")) (declaration "long local_10;" (sized_type_specifier "long" (long "long")) (identifier "local_10") (; ";")) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_10") (= "=") (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")) () ")"))))) (; ";")) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" (identifier "local_14") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_13 = 0;" (assignment_expression "uStack_13 = 0" (identifier "uStack_13") (= "=") (number_literal "0")) (; ";")) (expression_statement "bStack_11 = 0;" (assignment_expression "bStack_11 = 0" (identifier "bStack_11") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" (identifier "local_1c") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_18 = 0;" (assignment_expression "uStack_18 = 0" (identifier "uStack_18") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 == 0) {\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);\n  }" ({ "{") (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" (identifier "crypt_argchk") (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b)" (( "(") (string_literal ""st != NULL"" (" """) (string_content "st != NULL") (" """)) (, ",") (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" (" """) (string_content "src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c") (" """)) (, ",") (number_literal "0x1b") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" (if "if") (parenthesized_expression "(param_2 == (undefined4 *)0x0)" (( "(") (binary_expression "param_2 == (undefined4 *)0x0" (identifier "param_2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);\n  }" ({ "{") (expression_statement "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);" (call_expression "crypt_argchk("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" (identifier "crypt_argchk") (argument_list "("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c)" (( "(") (string_literal ""iv != NULL"" (" """) (string_content "iv != NULL") (" """)) (, ",") (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" (" """) (string_content "src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c") (" """)) (, ",") (number_literal "0x1c") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_3 != 0xc) {\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" (if "if") (parenthesized_expression "(param_3 != 0xc)" (( "(") (binary_expression "param_3 != 0xc" (identifier "param_3") (!= "!=") (number_literal "0xc")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);\n  }" ({ "{") (expression_statement "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);" (call_expression "crypt_argchk("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" (identifier "crypt_argchk") (argument_list "("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d)" (( "(") (string_literal ""ivlen == 12"" (" """) (string_content "ivlen == 12") (" """)) (, ",") (string_literal ""src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c"" (" """) (string_content "src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c") (" """)) (, ",") (number_literal "0x1d") () ")"))) (; ";")) (} "}"))) (expression_statement "uStack_13 = (ushort)((ulong)param_4 >> 0x28);" (assignment_expression "uStack_13 = (ushort)((ulong)param_4 >> 0x28)" (identifier "uStack_13") (= "=") (call_expression "(ushort)((ulong)param_4 >> 0x28)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "((ulong)param_4 >> 0x28)" (( "(") (binary_expression "(ulong)param_4 >> 0x28" (cast_expression "(ulong)param_4" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "param_4")) (>> ">>") (number_literal "0x28")) () ")")))) (; ";")) (expression_statement "local_1c = *param_2;" (assignment_expression "local_1c = *param_2" (identifier "local_1c") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);" (assignment_expression "bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb)" (identifier "bStack_11") (= "=") (binary_expression "(byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb)" (call_expression "(byte)((ulong)param_4 >> 0x38)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "((ulong)param_4 >> 0x38)" (( "(") (binary_expression "(ulong)param_4 >> 0x38" (cast_expression "(ulong)param_4" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "param_4")) (>> ">>") (number_literal "0x38")) () ")"))) (^ "^") (pointer_expression "*(byte *)((long)param_2 + 0xb)" (* "*") (cast_expression "(byte *)((long)param_2 + 0xb)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_2 + 0xb)" (( "(") (binary_expression "(long)param_2 + 0xb" (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) (+ "+") (number_literal "0xb")) () ")")))))) (; ";")) (expression_statement "uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);" (assignment_expression "uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9)" (identifier "uStack_13") (= "=") (binary_expression "uStack_13 ^ *(ushort *)((long)param_2 + 9)" (identifier "uStack_13") (^ "^") (pointer_expression "*(ushort *)((long)param_2 + 9)" (* "*") (cast_expression "(ushort *)((long)param_2 + 9)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_2 + 9)" (( "(") (binary_expression "(long)param_2 + 9" (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) (+ "+") (number_literal "9")) () ")")))))) (; ";")) (expression_statement "uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);" (assignment_expression "uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1)" (identifier "uVar1") (= "=") (binary_expression "param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1)" (binary_expression "param_4 << 0x18" (identifier "param_4") (<< "<<") (number_literal "0x18")) (^ "^") (pointer_expression "*(ulong *)((long)param_2 + 1)" (* "*") (cast_expression "(ulong *)((long)param_2 + 1)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_2 + 1)" (( "(") (binary_expression "(long)param_2 + 1" (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) (+ "+") (number_literal "1")) () ")")))))) (; ";")) (expression_statement "uStack_18 = (undefined4)(uVar1 >> 0x18);" (assignment_expression "uStack_18 = (undefined4)(uVar1 >> 0x18)" (identifier "uStack_18") (= "=") (call_expression "(undefined4)(uVar1 >> 0x18)" (parenthesized_expression "(undefined4)" (( "(") (identifier "undefined4") () ")")) (argument_list "(uVar1 >> 0x18)" (( "(") (binary_expression "uVar1 >> 0x18" (identifier "uVar1") (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "local_14 = (undefined1)(uVar1 >> 0x38);" (assignment_expression "local_14 = (undefined1)(uVar1 >> 0x38)" (identifier "local_14") (= "=") (call_expression "(undefined1)(uVar1 >> 0x38)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "(uVar1 >> 0x38)" (( "(") (binary_expression "uVar1 >> 0x38" (identifier "uVar1") (>> ">>") (number_literal "0x38")) () ")")))) (; ";")) (expression_statement "chacha20poly1305_setiv(param_1,&local_1c,0xc);" (call_expression "chacha20poly1305_setiv(param_1,&local_1c,0xc)" (identifier "chacha20poly1305_setiv") (argument_list "(param_1,&local_1c,0xc)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_1c" (& "&") (identifier "local_1c")) (, ",") (number_literal "0xc") () ")"))) (; ";")) (if_statement "if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_10 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_10 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_10") (== "==") (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    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

{
  type_3 var_7;
  long var_9;
  int iVar3;
  long var_1;
  type_2 combined_iv [12];
  
  var_9 = *(long *)(var_1 + 0x28);
  combined_iv[8] = '\0';
  combined_iv[9] = '\0';
  combined_iv[10] = '\0';
  combined_iv[0xb] = '\0';
  combined_iv[0] = '\0';
  combined_iv[1] = '\0';
  combined_iv[2] = '\0';
  combined_iv[3] = '\0';
  combined_iv[4] = '\0';
  combined_iv[5] = '\0';
  combined_iv[6] = '\0';
  combined_iv[7] = '\0';
  if (var_2 == (type_1 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("st != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1b);
  }
  if (var_4 == (type_2 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("iv != NULL","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1c);
  }
  if (var_5 != 0xc) {
                    /* WARNING: Subroutine does not return */
    var_3("ivlen == 12","src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c",0x1d);
  }
  combined_iv._9_2_ = (undefined2)(var_6 >> 0x28);
  combined_iv._0_4_ = *(type_5 *)var_4;
  combined_iv[0xb] = (byte)(var_6 >> 0x38) ^ var_4[0xb];
  combined_iv._9_2_ = combined_iv._9_2_ ^ *(type_6 *)(var_4 + 9);
  var_7 = var_6 << 0x18 ^ *(type_3 *)(var_4 + 1);
  combined_iv._4_4_ = (type_5)(var_7 >> 0x18);
  combined_iv[8] = (type_2)(var_7 >> 0x38);
  iVar3 = var_8(var_2,combined_iv,0xc);
  if (var_9 == *(long *)(var_1 + 0x28)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) 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)) (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))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_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)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_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: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (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 (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (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 (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

void MASKED(long param_1,undefined4 *param_2,long param_3,long param_4)

{
  ulong uVar1;
  long in_FS_OFFSET;
  undefined4 local_1c;
  undefined4 uStack_18;
  undefined1 local_14;
  ushort uStack_13;
  byte bStack_11;
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  local_14 = 0;
  uStack_13 = 0;
  bStack_11 = 0;
  local_1c = 0;
  uStack_18 = 0;
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("st != NULL","src/encauth/chachapoly/MASKED.c",0x1b);
  }
  if (param_2 == (undefined4 *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("iv != NULL","src/encauth/chachapoly/MASKED.c",0x1c);
  }
  if (param_3 != 0xc) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("ivlen == 12","src/encauth/chachapoly/MASKED.c",0x1d);
  }
  uStack_13 = (ushort)((ulong)param_4 >> 0x28);
  local_1c = *param_2;
  bStack_11 = (byte)((ulong)param_4 >> 0x38) ^ *(byte *)((long)param_2 + 0xb);
  uStack_13 = uStack_13 ^ *(ushort *)((long)param_2 + 9);
  uVar1 = param_4 << 0x18 ^ *(ulong *)((long)param_2 + 1);
  uStack_18 = (undefined4)(uVar1 >> 0x18);
  local_14 = (undefined1)(uVar1 >> 0x38);
  chacha20poly1305_setiv(param_1,&local_1c,0xc);
  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

