
int chacha20poly1305_add_aad(chacha20poly1305_state *st,uchar *in,ulong inlen)

{
  int iVar1;
  
  if (inlen == 0) {
    return 0;
  }
  if (st != (chacha20poly1305_state *)0x0) {
    iVar1 = 1;
    if (st->aadflg != 0) {
      iVar1 = poly1305_process(&st->poly,in,inlen);
      if (iVar1 == 0) {
        st->aadlen = st->aadlen + inlen;
        return 0;
      }
    }
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);
}



undefined8 chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)

{
  undefined8 uVar1;
  
  if (param_3 == 0) {
    return 0;
  }
  if (param_1 != 0) {
    uVar1 = 1;
    if (*(int *)(param_1 + 0x100) != 0) {
      uVar1 = poly1305_process(param_1,param_2,param_3);
      if ((int)uVar1 == 0) {
        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;
        return uVar1;
      }
    }
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);
}


TEST RDX,RDX
JZ 0x00136310
PUSH RBP
MOV RBP,RDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
TEST RDI,RDI
JZ 0x00136313
MOV EDX,dword ptr [RDI + 0x100]
MOV EAX,0x1
TEST EDX,EDX
JNZ 0x001362f0
ADD RSP,0x8
POP RBX
POP RBP
RET
MOV RDX,RBP
CALL 0x00114c30
TEST EAX,EAX
JNZ 0x001362e5
ADD qword ptr [RBX + 0xf0],RBP
ADD RSP,0x8
POP RBX
POP RBP
RET
XOR EAX,EAX
RET
MOV EDX,0x1a
LEA RSI,[0x1aaca0]
LEA RDI,[0x1c2da3]
CALL 0x00114270
(translation_unit "undefined8 chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}\n\n" (function_definition "undefined8 chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" type_identifier (function_declarator "chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,long param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (if_statement "if (param_3 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) (if_statement "if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x100) != 0)" ( (binary_expression "*(int *)(param_1 + 0x100) != 0" (pointer_expression "*(int *)(param_1 + 0x100)" * (cast_expression "(int *)(param_1 + 0x100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x100)" ( (binary_expression "param_1 + 0x100" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }" { (expression_statement "uVar1 = poly1305_process(param_1,param_2,param_3);" (assignment_expression "uVar1 = poly1305_process(param_1,param_2,param_3)" identifier = (call_expression "poly1305_process(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }" if (parenthesized_expression "((int)uVar1 == 0)" ( (binary_expression "(int)uVar1 == 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }" { (expression_statement "*(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;" (assignment_expression "*(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3" (pointer_expression "*(long *)(param_1 + 0xf0)" * (cast_expression "(long *)(param_1 + 0xf0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf0)" ( (binary_expression "param_1 + 0xf0" identifier + number_literal) )))) = (binary_expression "*(long *)(param_1 + 0xf0) + param_3" (pointer_expression "*(long *)(param_1 + 0xf0)" * (cast_expression "(long *)(param_1 + 0xf0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf0)" ( (binary_expression "param_1 + 0xf0" identifier + number_literal) )))) + identifier)) ;) (return_statement "return uVar1;" return identifier ;) })) })) (return_statement "return uVar1;" return identifier ;) })) comment (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" identifier (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" ( (string_literal ""st != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_add_aad.c"" " string_content ") , number_literal ))) ;) })))
(translation_unit "int chacha20poly1305_add_aad(chacha20poly1305_state *st,uchar *in,ulong inlen)\n\n{\n  int iVar1;\n  \n  if (inlen == 0) {\n    return 0;\n  }\n  if (st != (chacha20poly1305_state *)0x0) {\n    iVar1 = 1;\n    if (st->aadflg != 0) {\n      iVar1 = poly1305_process(&st->poly,in,inlen);\n      if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }\n    }\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}\n\n" (function_definition "int chacha20poly1305_add_aad(chacha20poly1305_state *st,uchar *in,ulong inlen)\n\n{\n  int iVar1;\n  \n  if (inlen == 0) {\n    return 0;\n  }\n  if (st != (chacha20poly1305_state *)0x0) {\n    iVar1 = 1;\n    if (st->aadflg != 0) {\n      iVar1 = poly1305_process(&st->poly,in,inlen);\n      if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }\n    }\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" primitive_type (function_declarator "chacha20poly1305_add_aad(chacha20poly1305_state *st,uchar *in,ulong inlen)" identifier (parameter_list "(chacha20poly1305_state *st,uchar *in,ulong inlen)" ( (parameter_declaration "chacha20poly1305_state *st" type_identifier (pointer_declarator "*st" * identifier)) , (parameter_declaration "uchar *in" type_identifier (pointer_declarator "*in" * identifier)) , (parameter_declaration "ulong inlen" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (inlen == 0) {\n    return 0;\n  }\n  if (st != (chacha20poly1305_state *)0x0) {\n    iVar1 = 1;\n    if (st->aadflg != 0) {\n      iVar1 = poly1305_process(&st->poly,in,inlen);\n      if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }\n    }\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (inlen == 0) {\n    return 0;\n  }" if (parenthesized_expression "(inlen == 0)" ( (binary_expression "inlen == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (st != (chacha20poly1305_state *)0x0) {\n    iVar1 = 1;\n    if (st->aadflg != 0) {\n      iVar1 = poly1305_process(&st->poly,in,inlen);\n      if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }\n    }\n    return iVar1;\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    iVar1 = 1;\n    if (st->aadflg != 0) {\n      iVar1 = poly1305_process(&st->poly,in,inlen);\n      if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }\n    }\n    return iVar1;\n  }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (st->aadflg != 0) {\n      iVar1 = poly1305_process(&st->poly,in,inlen);\n      if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }\n    }" if (parenthesized_expression "(st->aadflg != 0)" ( (binary_expression "st->aadflg != 0" (field_expression "st->aadflg" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n      iVar1 = poly1305_process(&st->poly,in,inlen);\n      if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }\n    }" { (expression_statement "iVar1 = poly1305_process(&st->poly,in,inlen);" (assignment_expression "iVar1 = poly1305_process(&st->poly,in,inlen)" identifier = (call_expression "poly1305_process(&st->poly,in,inlen)" identifier (argument_list "(&st->poly,in,inlen)" ( (pointer_expression "&st->poly" & (field_expression "st->poly" identifier -> field_identifier)) , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        st->aadlen = st->aadlen + inlen;\n        return 0;\n      }" { (expression_statement "st->aadlen = st->aadlen + inlen;" (assignment_expression "st->aadlen = st->aadlen + inlen" (field_expression "st->aadlen" identifier -> field_identifier) = (binary_expression "st->aadlen + inlen" (field_expression "st->aadlen" identifier -> field_identifier) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })) })) (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" identifier (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" ( (string_literal ""st != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_add_aad.c"" " string_content ") , number_literal ))) ;) })))
(translation_unit "undefined8 chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    \n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}\n\n" (function_definition "undefined8 chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    \n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" type_identifier (function_declarator "chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,long param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    \n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (if_statement "if (param_3 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) (if_statement "if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x100) != 0)" ( (binary_expression "*(int *)(param_1 + 0x100) != 0" (pointer_expression "*(int *)(param_1 + 0x100)" * (cast_expression "(int *)(param_1 + 0x100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x100)" ( (binary_expression "param_1 + 0x100" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }" { (expression_statement "uVar1 = poly1305_process(param_1,param_2,param_3);" (assignment_expression "uVar1 = poly1305_process(param_1,param_2,param_3)" identifier = (call_expression "poly1305_process(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }" if (parenthesized_expression "((int)uVar1 == 0)" ( (binary_expression "(int)uVar1 == 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }" { (expression_statement "*(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;" (assignment_expression "*(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3" (pointer_expression "*(long *)(param_1 + 0xf0)" * (cast_expression "(long *)(param_1 + 0xf0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf0)" ( (binary_expression "param_1 + 0xf0" identifier + number_literal) )))) = (binary_expression "*(long *)(param_1 + 0xf0) + param_3" (pointer_expression "*(long *)(param_1 + 0xf0)" * (cast_expression "(long *)(param_1 + 0xf0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf0)" ( (binary_expression "param_1 + 0xf0" identifier + number_literal) )))) + identifier)) ;) (return_statement "return uVar1;" return identifier ;) })) })) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" identifier (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" ( (string_literal ""st != NULL"" " string_content ") , (string_literal ""src/encauth/chachapoly/chacha20poly1305_add_aad.c"" " string_content ") , number_literal ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (return_statement return IDENT ;) })) })) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })))
(function_definition "undefined8 chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    \n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" (type_identifier "undefined8") (function_declarator "chacha20poly1305_add_aad(long param_1,undefined8 param_2,long param_3)" (identifier "chacha20poly1305_add_aad") (parameter_list "(long param_1,undefined8 param_2,long param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  \n  if (param_3 == 0) {\n    return 0;\n  }\n  if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }\n                    \n  crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (if_statement "if (param_3 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (param_1 != 0) {\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = 1;\n    if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }\n    return uVar1;\n  }" ({ "{") (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" (identifier "uVar1") (= "=") (number_literal "1")) (; ";")) (if_statement "if (*(int *)(param_1 + 0x100) != 0) {\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x100) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x100) != 0" (pointer_expression "*(int *)(param_1 + 0x100)" (* "*") (cast_expression "(int *)(param_1 + 0x100)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x100)" (( "(") (binary_expression "param_1 + 0x100" (identifier "param_1") (+ "+") (number_literal "0x100")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = poly1305_process(param_1,param_2,param_3);\n      if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }\n    }" ({ "{") (expression_statement "uVar1 = poly1305_process(param_1,param_2,param_3);" (assignment_expression "uVar1 = poly1305_process(param_1,param_2,param_3)" (identifier "uVar1") (= "=") (call_expression "poly1305_process(param_1,param_2,param_3)" (identifier "poly1305_process") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if ((int)uVar1 == 0) {\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }" (if "if") (parenthesized_expression "((int)uVar1 == 0)" (( "(") (binary_expression "(int)uVar1 == 0" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;\n        return uVar1;\n      }" ({ "{") (expression_statement "*(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;" (assignment_expression "*(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3" (pointer_expression "*(long *)(param_1 + 0xf0)" (* "*") (cast_expression "(long *)(param_1 + 0xf0)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf0)" (( "(") (binary_expression "param_1 + 0xf0" (identifier "param_1") (+ "+") (number_literal "0xf0")) () ")")))) (= "=") (binary_expression "*(long *)(param_1 + 0xf0) + param_3" (pointer_expression "*(long *)(param_1 + 0xf0)" (* "*") (cast_expression "(long *)(param_1 + 0xf0)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf0)" (( "(") (binary_expression "param_1 + 0xf0" (identifier "param_1") (+ "+") (number_literal "0xf0")) () ")")))) (+ "+") (identifier "param_3"))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);" (call_expression "crypt_argchk("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" (identifier "crypt_argchk") (argument_list "("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a)" (( "(") (string_literal ""st != NULL"" (" """) (string_content "st != NULL") (" """)) (, ",") (string_literal ""src/encauth/chachapoly/chacha20poly1305_add_aad.c"" (" """) (string_content "src/encauth/chachapoly/chacha20poly1305_add_aad.c") (" """)) (, ",") (number_literal "0x1a") () ")"))) (; ";")) (} "}")))

int function_1(type_1 *var_2,type_2 *in,type_3 var_1)

{
  int var_4;
  
  if (var_1 == 0) {
    return 0;
  }
  if (var_2 != (type_1 *)0x0) {
    var_4 = 1;
    if (var_2->aadflg != 0) {
      var_4 = var_3(&var_2->poly,in,var_1);
      if (var_4 == 0) {
        var_2->aadlen = var_2->aadlen + var_1;
        return 0;
      }
    }
    return var_4;
  }
                    /* WARNING: Subroutine does not return */
  var_5("st != NULL","src/encauth/chachapoly/chacha20poly1305_add_aad.c",0x1a);
}


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

undefined8 MASKED(long param_1,undefined8 param_2,long param_3)

{
  undefined8 uVar1;
  
  if (param_3 == 0) {
    return 0;
  }
  if (param_1 != 0) {
    uVar1 = 1;
    if (*(int *)(param_1 + 0x100) != 0) {
      uVar1 = poly1305_process(param_1,param_2,param_3);
      if ((int)uVar1 == 0) {
        *(long *)(param_1 + 0xf0) = *(long *)(param_1 + 0xf0) + param_3;
        return uVar1;
      }
    }
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  crypt_argchk("st != NULL","src/encauth/chachapoly/MASKED.c",0x1a);
}

