
/* WARNING: Unknown calling convention */

int adler32_test(void)

{
  long lVar1;
  int iVar2;
  long in_FS_OFFSET;
  adler32_state ctx;
  uchar adler32 [4];
  uchar out [4];
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  adler32[0] = '\x1b';
  adler32[1] = 0xe8;
  adler32[2] = '\x04';
  adler32[3] = 0xba;
  adler32_init(&ctx);
  adler32_update(&ctx,(uchar *)"libtomcrypt",0xb);
  adler32_finish(&ctx,out,4);
  iVar2 = compare_testvector(adler32,4,out,4,"adler32",0);
  if (iVar2 != 0) {
    iVar2 = 5;
  }
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



int adler32_test(void)

{
  int iVar1;
  long in_FS_OFFSET;
  undefined1 local_2c [4];
  undefined4 local_28;
  undefined1 local_24 [4];
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  local_28 = 0xba04e81b;
  adler32_init(local_2c);
  adler32_update(local_2c,"libtomcrypt",0xb);
  adler32_finish(local_2c,local_24,4);
  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);
  if (iVar1 != 0) {
    iVar1 = 5;
  }
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
LEA RBX,[RSP + 0xc]
LEA RBP,[RSP + 0x14]
MOV dword ptr [RSP + 0x10],0xba04e81b
MOV RDI,RBX
CALL 0x00114080
MOV EDX,0xb
LEA RSI,[0x1bdc81]
MOV RDI,RBX
CALL 0x001130b0
MOV EDX,0x4
MOV RSI,RBP
MOV RDI,RBX
CALL 0x001138f0
XOR R9D,R9D
MOV ECX,0x4
MOV RDX,RBP
LEA RDI,[RSP + 0x10]
LEA R8,[0x1bdc8d]
MOV ESI,0x4
CALL 0x001143c0
MOV EDX,0x5
TEST EAX,EAX
CMOVNZ EAX,EDX
MOV RCX,qword ptr [RSP + 0x18]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00162cd6
ADD RSP,0x28
POP RBX
POP RBP
RET
CALL 0x00113880
(translation_unit "int adler32_test(void)\n\n{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int adler32_test(void)\n\n{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "adler32_test(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 local_2c [4];" type_identifier (array_declarator "local_2c [4]" identifier [ number_literal ]) ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined1 local_24 [4];" type_identifier (array_declarator "local_24 [4]" identifier [ number_literal ]) ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(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_28 = 0xba04e81b;" (assignment_expression "local_28 = 0xba04e81b" identifier = number_literal) ;) (expression_statement "adler32_init(local_2c);" (call_expression "adler32_init(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;) (expression_statement "adler32_update(local_2c,"libtomcrypt",0xb);" (call_expression "adler32_update(local_2c,"libtomcrypt",0xb)" identifier (argument_list "(local_2c,"libtomcrypt",0xb)" ( identifier , (string_literal ""libtomcrypt"" " string_content ") , number_literal ))) ;) (expression_statement "adler32_finish(local_2c,local_24,4);" (call_expression "adler32_finish(local_2c,local_24,4)" identifier (argument_list "(local_2c,local_24,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);" (assignment_expression "iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0)" identifier = (call_expression "compare_testvector(&local_28,4,local_24,4,"adler32",0)" identifier (argument_list "(&local_28,4,local_24,4,"adler32",0)" ( (pointer_expression "&local_28" & identifier) , number_literal , identifier , number_literal , (string_literal ""adler32"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = 5;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = 5;\n  }" { (expression_statement "iVar1 = 5;" (assignment_expression "iVar1 = 5" identifier = number_literal) ;) })) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(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 iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint adler32_test(void)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  adler32_state ctx;\n  uchar adler32 [4];\n  uchar out [4];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  adler32[0] = '\x1b';\n  adler32[1] = 0xe8;\n  adler32[2] = '\x04';\n  adler32[3] = 0xba;\n  adler32_init(&ctx);\n  adler32_update(&ctx,(uchar *)"libtomcrypt",0xb);\n  adler32_finish(&ctx,out,4);\n  iVar2 = compare_testvector(adler32,4,out,4,"adler32",0);\n  if (iVar2 != 0) {\n    iVar2 = 5;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" comment (function_definition "int adler32_test(void)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  adler32_state ctx;\n  uchar adler32 [4];\n  uchar out [4];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  adler32[0] = '\x1b';\n  adler32[1] = 0xe8;\n  adler32[2] = '\x04';\n  adler32[3] = 0xba;\n  adler32_init(&ctx);\n  adler32_update(&ctx,(uchar *)"libtomcrypt",0xb);\n  adler32_finish(&ctx,out,4);\n  iVar2 = compare_testvector(adler32,4,out,4,"adler32",0);\n  if (iVar2 != 0) {\n    iVar2 = 5;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "adler32_test(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  adler32_state ctx;\n  uchar adler32 [4];\n  uchar out [4];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  adler32[0] = '\x1b';\n  adler32[1] = 0xe8;\n  adler32[2] = '\x04';\n  adler32[3] = 0xba;\n  adler32_init(&ctx);\n  adler32_update(&ctx,(uchar *)"libtomcrypt",0xb);\n  adler32_finish(&ctx,out,4);\n  iVar2 = compare_testvector(adler32,4,out,4,"adler32",0);\n  if (iVar2 != 0) {\n    iVar2 = 5;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "adler32_state ctx;" type_identifier identifier ;) (declaration "uchar adler32 [4];" type_identifier (array_declarator "adler32 [4]" identifier [ number_literal ]) ;) (declaration "uchar out [4];" type_identifier (array_declarator "out [4]" identifier [ number_literal ]) ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(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 "adler32[0] = '\x1b';" (assignment_expression "adler32[0] = '\x1b'" (subscript_expression "adler32[0]" identifier [ number_literal ]) = (char_literal "'\x1b'" ' escape_sequence ')) ;) (expression_statement "adler32[1] = 0xe8;" (assignment_expression "adler32[1] = 0xe8" (subscript_expression "adler32[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "adler32[2] = '\x04';" (assignment_expression "adler32[2] = '\x04'" (subscript_expression "adler32[2]" identifier [ number_literal ]) = (char_literal "'\x04'" ' escape_sequence ')) ;) (expression_statement "adler32[3] = 0xba;" (assignment_expression "adler32[3] = 0xba" (subscript_expression "adler32[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "adler32_init(&ctx);" (call_expression "adler32_init(&ctx)" identifier (argument_list "(&ctx)" ( (pointer_expression "&ctx" & identifier) ))) ;) (expression_statement "adler32_update(&ctx,(uchar *)"libtomcrypt",0xb);" (call_expression "adler32_update(&ctx,(uchar *)"libtomcrypt",0xb)" identifier (argument_list "(&ctx,(uchar *)"libtomcrypt",0xb)" ( (pointer_expression "&ctx" & identifier) , (cast_expression "(uchar *)"libtomcrypt"" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""libtomcrypt"" " string_content ")) , number_literal ))) ;) (expression_statement "adler32_finish(&ctx,out,4);" (call_expression "adler32_finish(&ctx,out,4)" identifier (argument_list "(&ctx,out,4)" ( (pointer_expression "&ctx" & identifier) , identifier , number_literal ))) ;) (expression_statement "iVar2 = compare_testvector(adler32,4,out,4,"adler32",0);" (assignment_expression "iVar2 = compare_testvector(adler32,4,out,4,"adler32",0)" identifier = (call_expression "compare_testvector(adler32,4,out,4,"adler32",0)" identifier (argument_list "(adler32,4,out,4,"adler32",0)" ( identifier , number_literal , identifier , number_literal , (string_literal ""adler32"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n    iVar2 = 5;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = 5;\n  }" { (expression_statement "iVar2 = 5;" (assignment_expression "iVar2 = 5" identifier = number_literal) ;) })) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(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 iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int adler32_test(void)\n\n{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "int adler32_test(void)\n\n{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "adler32_test(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 local_2c [4];" type_identifier (array_declarator "local_2c [4]" identifier [ number_literal ]) ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined1 local_24 [4];" type_identifier (array_declarator "local_24 [4]" identifier [ number_literal ]) ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(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_28 = 0xba04e81b;" (assignment_expression "local_28 = 0xba04e81b" identifier = number_literal) ;) (expression_statement "adler32_init(local_2c);" (call_expression "adler32_init(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;) (expression_statement "adler32_update(local_2c,"libtomcrypt",0xb);" (call_expression "adler32_update(local_2c,"libtomcrypt",0xb)" identifier (argument_list "(local_2c,"libtomcrypt",0xb)" ( identifier , (string_literal ""libtomcrypt"" " string_content ") , number_literal ))) ;) (expression_statement "adler32_finish(local_2c,local_24,4);" (call_expression "adler32_finish(local_2c,local_24,4)" identifier (argument_list "(local_2c,local_24,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);" (assignment_expression "iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0)" identifier = (call_expression "compare_testvector(&local_28,4,local_24,4,"adler32",0)" identifier (argument_list "(&local_28,4,local_24,4,"adler32",0)" ( (pointer_expression "&local_28" & identifier) , number_literal , identifier , number_literal , (string_literal ""adler32"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = 5;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = 5;\n  }" { (expression_statement "iVar1 = 5;" (assignment_expression "iVar1 = 5" identifier = number_literal) ;) })) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(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 iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) (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 TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , IDENT , LIT , (string_literal " string_content ") , 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 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 IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int adler32_test(void)\n\n{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "int") (function_declarator "adler32_test(void)" (identifier "adler32_test") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  long in_FS_OFFSET;\n  undefined1 local_2c [4];\n  undefined4 local_28;\n  undefined1 local_24 [4];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_28 = 0xba04e81b;\n  adler32_init(local_2c);\n  adler32_update(local_2c,"libtomcrypt",0xb);\n  adler32_finish(local_2c,local_24,4);\n  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);\n  if (iVar1 != 0) {\n    iVar1 = 5;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 local_2c [4];" (type_identifier "undefined1") (array_declarator "local_2c [4]" (identifier "local_2c") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (declaration "undefined1 local_24 [4];" (type_identifier "undefined1") (array_declarator "local_24 [4]" (identifier "local_24") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "long local_20;" (sized_type_specifier "long" (long "long")) (identifier "local_20") (; ";")) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (= "=") (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_28 = 0xba04e81b;" (assignment_expression "local_28 = 0xba04e81b" (identifier "local_28") (= "=") (number_literal "0xba04e81b")) (; ";")) (expression_statement "adler32_init(local_2c);" (call_expression "adler32_init(local_2c)" (identifier "adler32_init") (argument_list "(local_2c)" (( "(") (identifier "local_2c") () ")"))) (; ";")) (expression_statement "adler32_update(local_2c,"libtomcrypt",0xb);" (call_expression "adler32_update(local_2c,"libtomcrypt",0xb)" (identifier "adler32_update") (argument_list "(local_2c,"libtomcrypt",0xb)" (( "(") (identifier "local_2c") (, ",") (string_literal ""libtomcrypt"" (" """) (string_content "libtomcrypt") (" """)) (, ",") (number_literal "0xb") () ")"))) (; ";")) (expression_statement "adler32_finish(local_2c,local_24,4);" (call_expression "adler32_finish(local_2c,local_24,4)" (identifier "adler32_finish") (argument_list "(local_2c,local_24,4)" (( "(") (identifier "local_2c") (, ",") (identifier "local_24") (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);" (assignment_expression "iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0)" (identifier "iVar1") (= "=") (call_expression "compare_testvector(&local_28,4,local_24,4,"adler32",0)" (identifier "compare_testvector") (argument_list "(&local_28,4,local_24,4,"adler32",0)" (( "(") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (number_literal "4") (, ",") (identifier "local_24") (, ",") (number_literal "4") (, ",") (string_literal ""adler32"" (" """) (string_content "adler32") (" """)) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar1 = 5;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = 5;\n  }" ({ "{") (expression_statement "iVar1 = 5;" (assignment_expression "iVar1 = 5" (identifier "iVar1") (= "=") (number_literal "5")) (; ";")) (} "}"))) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (== "==") (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 iVar1;\n  }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(void)

{
  long var_7;
  int var_6;
  long var_1;
  type_1 ctx;
  type_2 adler32 [4];
  type_2 out [4];
  
  var_7 = *(long *)(var_1 + 0x28);
  adler32[0] = '\x1b';
  adler32[1] = 0xe8;
  adler32[2] = '\x04';
  adler32[3] = 0xba;
  var_2(&ctx);
  var_3(&ctx,(type_2 *)"libtomcrypt",0xb);
  var_4(&ctx,out,4);
  var_6 = var_5(adler32,4,out,4,"adler32",0);
  if (var_6 != 0) {
    var_6 = 5;
  }
  if (var_7 == *(long *)(var_1 + 0x28)) {
    return var_6;
  }
                    /* WARNING: Subroutine does not return */
  var_8();
}


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

int MASKED(void)

{
  int iVar1;
  long in_FS_OFFSET;
  undefined1 local_2c [4];
  undefined4 local_28;
  undefined1 local_24 [4];
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  local_28 = 0xba04e81b;
  adler32_init(local_2c);
  adler32_update(local_2c,"libtomcrypt",0xb);
  adler32_finish(local_2c,local_24,4);
  iVar1 = compare_testvector(&local_28,4,local_24,4,"adler32",0);
  if (iVar1 != 0) {
    iVar1 = 5;
  }
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

