
int omac_file(int cipher,uchar *key,ulong keylen,char *filename,uchar *out,ulong *outlen)

{
  long lVar1;
  int iVar2;
  int iVar3;
  uchar *in;
  FILE *__stream;
  size_t inlen;
  long in_FS_OFFSET;
  omac_state omac;
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  if (key == (uchar *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);
  }
  if (filename == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);
  }
  if (out == (uchar *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);
  }
  if (outlen == (ulong *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);
  }
  in = (uchar *)malloc(0x2000);
  if (in == (uchar *)0x0) {
    iVar2 = 0xd;
  }
  else {
    iVar2 = omac_init(&omac,cipher,key,keylen);
    if (iVar2 == 0) {
      __stream = fopen(filename,"rb");
      if (__stream == (FILE *)0x0) {
        iVar2 = 0x11;
      }
      else {
        do {
          inlen = fread(in,1,0x2000,__stream);
          iVar2 = omac_process(&omac,in,inlen);
          if (iVar2 != 0) {
            fclose(__stream);
            goto LAB_0015a2dd;
          }
        } while (inlen == 0x2000);
        iVar2 = 1;
        iVar3 = fclose(__stream);
        if (iVar3 == 0) {
          iVar2 = omac_done(&omac,out,outlen);
        }
LAB_0015a2dd:
        zeromem(in,0x2000);
      }
    }
    free(in);
  }
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



int omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,
             long param_6)

{
  int iVar1;
  int iVar2;
  void *__ptr;
  FILE *__stream;
  size_t sVar3;
  long in_FS_OFFSET;
  undefined1 local_12f8 [4792];
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);
  }
  if (param_4 == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);
  }
  if (param_5 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);
  }
  if (param_6 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);
  }
  __ptr = malloc(0x2000);
  if (__ptr == (void *)0x0) {
    iVar1 = 0xd;
  }
  else {
    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);
    if (iVar1 == 0) {
      __stream = fopen(param_4,"rb");
      if (__stream == (FILE *)0x0) {
        iVar1 = 0x11;
      }
      else {
        do {
          sVar3 = fread(__ptr,1,0x2000,__stream);
          iVar1 = omac_process(local_12f8,__ptr,sVar3);
          if (iVar1 != 0) {
            fclose(__stream);
            goto LAB_0015a2dd;
          }
        } while (sVar3 == 0x2000);
        iVar1 = 1;
        iVar2 = fclose(__stream);
        if (iVar2 == 0) {
          iVar1 = omac_done(local_12f8,param_5,param_6);
        }
LAB_0015a2dd:
        zeromem(__ptr,0x2000);
      }
    }
    free(__ptr);
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x12e8
MOV qword ptr [RSP + 0x8],R8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x12d8],RAX
XOR EAX,EAX
TEST RSI,RSI
JZ 0x0015a34f
MOV R13,RCX
TEST RCX,RCX
JZ 0x0015a337
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0015a37f
MOV R15,R9
TEST R9,R9
JZ 0x0015a367
MOV EBP,EDI
MOV EDI,0x2000
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RSI
CALL 0x001141b0
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0015a2f0
LEA R12,[RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
MOV ESI,EBP
MOV RDI,R12
CALL 0x001139d0
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0015a280
MOV RDI,RBX
CALL 0x00113130
MOV RCX,qword ptr [RSP + 0x12d8]
XOR RCX,qword ptr FS:[0x28]
MOV EAX,EBP
JNZ 0x0015a332
ADD RSP,0x12e8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV RDI,R13
LEA RSI,[0x1ae813]
CALL 0x001148a0
MOV R13,RAX
TEST RAX,RAX
JNZ 0x0015a2a9
JMP 0x0015a328
CMP R14,0x2000
JNZ 0x0015a300
MOV RCX,R13
MOV EDX,0x2000
MOV ESI,0x1
MOV RDI,RBX
CALL 0x00113480
MOV RSI,RBX
MOV RDI,R12
MOV RDX,RAX
MOV R14,RAX
CALL 0x00114920
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0015a2a0
MOV RDI,R13
CALL 0x00113700
MOV ESI,0x2000
MOV RDI,RBX
CALL 0x00114e00
JMP 0x0015a247
MOV EBP,0xd
JMP 0x0015a24f
MOV RDI,R13
MOV EBP,0x1
CALL 0x00113700
TEST EAX,EAX
JNZ 0x0015a2dd
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
MOV RDI,R12
CALL 0x00113470
MOV EBP,EAX
JMP 0x0015a2dd
MOV EBP,0x11
JMP 0x0015a247
CALL 0x00113880
MOV EDX,0x31
LEA RSI,[0x1bbe7f]
LEA RDI,[0x1bbe98]
CALL 0x00114270
MOV EDX,0x30
LEA RSI,[0x1bbe7f]
LEA RDI,[0x1c5e5d]
CALL 0x00114270
MOV EDX,0x33
LEA RSI,[0x1bbe7f]
LEA RDI,[0x1ae804]
CALL 0x00114270
MOV EDX,0x32
LEA RSI,[0x1bbe7f]
LEA RDI,[0x1a87a1]
CALL 0x00114270
(translation_unit "int omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(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 omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)" identifier (parameter_list "(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "long param_5" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_6" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(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 "int iVar2;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 local_12f8 [4792];" type_identifier (array_declarator "local_12f8 [4792]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" { comment (expression_statement "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);" (call_expression "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30)" identifier (argument_list "("key != NULL","src/mac/omac/omac_file.c",0x30)" ( (string_literal ""key != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_4 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" if (parenthesized_expression "(param_4 == (char *)0x0)" ( (binary_expression "param_4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" { comment (expression_statement "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);" (call_expression "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31)" identifier (argument_list "("filename != NULL","src/mac/omac/omac_file.c",0x31)" ( (string_literal ""filename != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_5 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" { comment (expression_statement "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);" (call_expression "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32)" identifier (argument_list "("out != NULL","src/mac/omac/omac_file.c",0x32)" ( (string_literal ""out != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_6 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" if (parenthesized_expression "(param_6 == 0)" ( (binary_expression "param_6 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" { comment (expression_statement "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);" (call_expression "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33)" identifier (argument_list "("outlen != NULL","src/mac/omac/omac_file.c",0x33)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "__ptr = malloc(0x2000);" (assignment_expression "__ptr = malloc(0x2000)" identifier = (call_expression "malloc(0x2000)" identifier (argument_list "(0x2000)" ( number_literal )))) ;) (if_statement "if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" if (parenthesized_expression "(__ptr == (void *)0x0)" ( (binary_expression "__ptr == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = 0xd;\n  }" { (expression_statement "iVar1 = 0xd;" (assignment_expression "iVar1 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" else (compound_statement "{\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" { (expression_statement "iVar1 = omac_init(local_12f8,param_1,param_2,param_3);" (assignment_expression "iVar1 = omac_init(local_12f8,param_1,param_2,param_3)" identifier = (call_expression "omac_init(local_12f8,param_1,param_2,param_3)" identifier (argument_list "(local_12f8,param_1,param_2,param_3)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }" { (expression_statement "__stream = fopen(param_4,"rb");" (assignment_expression "__stream = fopen(param_4,"rb")" identifier = (call_expression "fopen(param_4,"rb")" identifier (argument_list "(param_4,"rb")" ( identifier , (string_literal ""rb"" " string_content ") )))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar1 = 0x11;\n      }" { (expression_statement "iVar1 = 0x11;" (assignment_expression "iVar1 = 0x11" identifier = number_literal) ;) }) (else_clause "else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" else (compound_statement "{\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" { (do_statement "do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);" do (compound_statement "{\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        }" { (expression_statement "sVar3 = fread(__ptr,1,0x2000,__stream);" (assignment_expression "sVar3 = fread(__ptr,1,0x2000,__stream)" identifier = (call_expression "fread(__ptr,1,0x2000,__stream)" identifier (argument_list "(__ptr,1,0x2000,__stream)" ( identifier , number_literal , number_literal , identifier )))) ;) (expression_statement "iVar1 = omac_process(local_12f8,__ptr,sVar3);" (assignment_expression "iVar1 = omac_process(local_12f8,__ptr,sVar3)" identifier = (call_expression "omac_process(local_12f8,__ptr,sVar3)" identifier (argument_list "(local_12f8,__ptr,sVar3)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" { (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (goto_statement "goto LAB_0015a2dd;" goto statement_identifier ;) })) }) while (parenthesized_expression "(sVar3 == 0x2000)" ( (binary_expression "sVar3 == 0x2000" identifier == number_literal) )) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (expression_statement "iVar2 = fclose(__stream);" (assignment_expression "iVar2 = fclose(__stream)" identifier = (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }" { (expression_statement "iVar1 = omac_done(local_12f8,param_5,param_6);" (assignment_expression "iVar1 = omac_done(local_12f8,param_5,param_6)" identifier = (call_expression "omac_done(local_12f8,param_5,param_6)" identifier (argument_list "(local_12f8,param_5,param_6)" ( identifier , identifier , identifier )))) ;) })) (labeled_statement "LAB_0015a2dd:\n        zeromem(__ptr,0x2000);" statement_identifier : (expression_statement "zeromem(__ptr,0x2000);" (call_expression "zeromem(__ptr,0x2000)" identifier (argument_list "(__ptr,0x2000)" ( identifier , number_literal ))) ;)) }))) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }))) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(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 "int omac_file(int cipher,uchar *key,ulong keylen,char *filename,uchar *out,ulong *outlen)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  uchar *in;\n  FILE *__stream;\n  size_t inlen;\n  long in_FS_OFFSET;\n  omac_state omac;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  if (key == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  in = (uchar *)malloc(0x2000);\n  if (in == (uchar *)0x0) {\n    iVar2 = 0xd;\n  }\n  else {\n    iVar2 = omac_init(&omac,cipher,key,keylen);\n    if (iVar2 == 0) {\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }\n    free(in);\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" (function_definition "int omac_file(int cipher,uchar *key,ulong keylen,char *filename,uchar *out,ulong *outlen)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  uchar *in;\n  FILE *__stream;\n  size_t inlen;\n  long in_FS_OFFSET;\n  omac_state omac;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  if (key == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  in = (uchar *)malloc(0x2000);\n  if (in == (uchar *)0x0) {\n    iVar2 = 0xd;\n  }\n  else {\n    iVar2 = omac_init(&omac,cipher,key,keylen);\n    if (iVar2 == 0) {\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }\n    free(in);\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 "omac_file(int cipher,uchar *key,ulong keylen,char *filename,uchar *out,ulong *outlen)" identifier (parameter_list "(int cipher,uchar *key,ulong keylen,char *filename,uchar *out,ulong *outlen)" ( (parameter_declaration "int cipher" primitive_type identifier) , (parameter_declaration "uchar *key" type_identifier (pointer_declarator "*key" * identifier)) , (parameter_declaration "ulong keylen" type_identifier identifier) , (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) , (parameter_declaration "uchar *out" type_identifier (pointer_declarator "*out" * identifier)) , (parameter_declaration "ulong *outlen" type_identifier (pointer_declarator "*outlen" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  uchar *in;\n  FILE *__stream;\n  size_t inlen;\n  long in_FS_OFFSET;\n  omac_state omac;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  if (key == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  in = (uchar *)malloc(0x2000);\n  if (in == (uchar *)0x0) {\n    iVar2 = 0xd;\n  }\n  else {\n    iVar2 = omac_init(&omac,cipher,key,keylen);\n    if (iVar2 == 0) {\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }\n    free(in);\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 "int iVar3;" primitive_type identifier ;) (declaration "uchar *in;" type_identifier (pointer_declarator "*in" * identifier) ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "size_t inlen;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "omac_state omac;" type_identifier identifier ;) (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) ))))) ;) (if_statement "if (key == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" if (parenthesized_expression "(key == (uchar *)0x0)" ( (binary_expression "key == (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("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" { comment (expression_statement "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);" (call_expression "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30)" identifier (argument_list "("key != NULL","src/mac/omac/omac_file.c",0x30)" ( (string_literal ""key != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" if (parenthesized_expression "(filename == (char *)0x0)" ( (binary_expression "filename == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" { comment (expression_statement "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);" (call_expression "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31)" identifier (argument_list "("filename != NULL","src/mac/omac/omac_file.c",0x31)" ( (string_literal ""filename != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" if (parenthesized_expression "(out == (uchar *)0x0)" ( (binary_expression "out == (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("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" { comment (expression_statement "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);" (call_expression "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32)" identifier (argument_list "("out != NULL","src/mac/omac/omac_file.c",0x32)" ( (string_literal ""out != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" if (parenthesized_expression "(outlen == (ulong *)0x0)" ( (binary_expression "outlen == (ulong *)0x0" identifier == (cast_expression "(ulong *)0x0" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" { comment (expression_statement "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);" (call_expression "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33)" identifier (argument_list "("outlen != NULL","src/mac/omac/omac_file.c",0x33)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "in = (uchar *)malloc(0x2000);" (assignment_expression "in = (uchar *)malloc(0x2000)" identifier = (cast_expression "(uchar *)malloc(0x2000)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(0x2000)" identifier (argument_list "(0x2000)" ( number_literal ))))) ;) (if_statement "if (in == (uchar *)0x0) {\n    iVar2 = 0xd;\n  }\n  else {\n    iVar2 = omac_init(&omac,cipher,key,keylen);\n    if (iVar2 == 0) {\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }\n    free(in);\n  }" if (parenthesized_expression "(in == (uchar *)0x0)" ( (binary_expression "in == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = 0xd;\n  }" { (expression_statement "iVar2 = 0xd;" (assignment_expression "iVar2 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = omac_init(&omac,cipher,key,keylen);\n    if (iVar2 == 0) {\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }\n    free(in);\n  }" else (compound_statement "{\n    iVar2 = omac_init(&omac,cipher,key,keylen);\n    if (iVar2 == 0) {\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }\n    free(in);\n  }" { (expression_statement "iVar2 = omac_init(&omac,cipher,key,keylen);" (assignment_expression "iVar2 = omac_init(&omac,cipher,key,keylen)" identifier = (call_expression "omac_init(&omac,cipher,key,keylen)" identifier (argument_list "(&omac,cipher,key,keylen)" ( (pointer_expression "&omac" & identifier) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      __stream = fopen(filename,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }\n    }" { (expression_statement "__stream = fopen(filename,"rb");" (assignment_expression "__stream = fopen(filename,"rb")" identifier = (call_expression "fopen(filename,"rb")" identifier (argument_list "(filename,"rb")" ( identifier , (string_literal ""rb"" " string_content ") )))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n        iVar2 = 0x11;\n      }\n      else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar2 = 0x11;\n      }" { (expression_statement "iVar2 = 0x11;" (assignment_expression "iVar2 = 0x11" identifier = number_literal) ;) }) (else_clause "else {\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }" else (compound_statement "{\n        do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);\n        iVar2 = 1;\n        iVar3 = fclose(__stream);\n        if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }\nLAB_0015a2dd:\n        zeromem(in,0x2000);\n      }" { (do_statement "do {\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (inlen == 0x2000);" do (compound_statement "{\n          inlen = fread(in,1,0x2000,__stream);\n          iVar2 = omac_process(&omac,in,inlen);\n          if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        }" { (expression_statement "inlen = fread(in,1,0x2000,__stream);" (assignment_expression "inlen = fread(in,1,0x2000,__stream)" identifier = (call_expression "fread(in,1,0x2000,__stream)" identifier (argument_list "(in,1,0x2000,__stream)" ( identifier , number_literal , number_literal , identifier )))) ;) (expression_statement "iVar2 = omac_process(&omac,in,inlen);" (assignment_expression "iVar2 = omac_process(&omac,in,inlen)" identifier = (call_expression "omac_process(&omac,in,inlen)" identifier (argument_list "(&omac,in,inlen)" ( (pointer_expression "&omac" & identifier) , identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" { (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (goto_statement "goto LAB_0015a2dd;" goto statement_identifier ;) })) }) while (parenthesized_expression "(inlen == 0x2000)" ( (binary_expression "inlen == 0x2000" identifier == number_literal) )) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (expression_statement "iVar3 = fclose(__stream);" (assignment_expression "iVar3 = fclose(__stream)" identifier = (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar3 == 0) {\n          iVar2 = omac_done(&omac,out,outlen);\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar2 = omac_done(&omac,out,outlen);\n        }" { (expression_statement "iVar2 = omac_done(&omac,out,outlen);" (assignment_expression "iVar2 = omac_done(&omac,out,outlen)" identifier = (call_expression "omac_done(&omac,out,outlen)" identifier (argument_list "(&omac,out,outlen)" ( (pointer_expression "&omac" & identifier) , identifier , identifier )))) ;) })) (labeled_statement "LAB_0015a2dd:\n        zeromem(in,0x2000);" statement_identifier : (expression_statement "zeromem(in,0x2000);" (call_expression "zeromem(in,0x2000)" identifier (argument_list "(in,0x2000)" ( identifier , number_literal ))) ;)) }))) })) (expression_statement "free(in);" (call_expression "free(in)" identifier (argument_list "(in)" ( identifier ))) ;) }))) (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 omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "int omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)" identifier (parameter_list "(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "long param_5" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_6" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 local_12f8 [4792];" type_identifier (array_declarator "local_12f8 [4792]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" { (expression_statement "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);" (call_expression "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30)" identifier (argument_list "("key != NULL","src/mac/omac/omac_file.c",0x30)" ( (string_literal ""key != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_4 == (char *)0x0) {\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" if (parenthesized_expression "(param_4 == (char *)0x0)" ( (binary_expression "param_4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" { (expression_statement "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);" (call_expression "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31)" identifier (argument_list "("filename != NULL","src/mac/omac/omac_file.c",0x31)" ( (string_literal ""filename != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_5 == 0) {\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" { (expression_statement "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);" (call_expression "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32)" identifier (argument_list "("out != NULL","src/mac/omac/omac_file.c",0x32)" ( (string_literal ""out != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_6 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" if (parenthesized_expression "(param_6 == 0)" ( (binary_expression "param_6 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" { (expression_statement "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);" (call_expression "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33)" identifier (argument_list "("outlen != NULL","src/mac/omac/omac_file.c",0x33)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/mac/omac/omac_file.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "__ptr = malloc(0x2000);" (assignment_expression "__ptr = malloc(0x2000)" identifier = (call_expression "malloc(0x2000)" identifier (argument_list "(0x2000)" ( number_literal )))) ;) (if_statement "if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" if (parenthesized_expression "(__ptr == (void *)0x0)" ( (binary_expression "__ptr == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = 0xd;\n  }" { (expression_statement "iVar1 = 0xd;" (assignment_expression "iVar1 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" else (compound_statement "{\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" { (expression_statement "iVar1 = omac_init(local_12f8,param_1,param_2,param_3);" (assignment_expression "iVar1 = omac_init(local_12f8,param_1,param_2,param_3)" identifier = (call_expression "omac_init(local_12f8,param_1,param_2,param_3)" identifier (argument_list "(local_12f8,param_1,param_2,param_3)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }" { (expression_statement "__stream = fopen(param_4,"rb");" (assignment_expression "__stream = fopen(param_4,"rb")" identifier = (call_expression "fopen(param_4,"rb")" identifier (argument_list "(param_4,"rb")" ( identifier , (string_literal ""rb"" " string_content ") )))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar1 = 0x11;\n      }" { (expression_statement "iVar1 = 0x11;" (assignment_expression "iVar1 = 0x11" identifier = number_literal) ;) }) (else_clause "else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" else (compound_statement "{\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" { (do_statement "do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);" do (compound_statement "{\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        }" { (expression_statement "sVar3 = fread(__ptr,1,0x2000,__stream);" (assignment_expression "sVar3 = fread(__ptr,1,0x2000,__stream)" identifier = (call_expression "fread(__ptr,1,0x2000,__stream)" identifier (argument_list "(__ptr,1,0x2000,__stream)" ( identifier , number_literal , number_literal , identifier )))) ;) (expression_statement "iVar1 = omac_process(local_12f8,__ptr,sVar3);" (assignment_expression "iVar1 = omac_process(local_12f8,__ptr,sVar3)" identifier = (call_expression "omac_process(local_12f8,__ptr,sVar3)" identifier (argument_list "(local_12f8,__ptr,sVar3)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" { (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (goto_statement "goto LAB_0015a2dd;" goto statement_identifier ;) })) }) while (parenthesized_expression "(sVar3 == 0x2000)" ( (binary_expression "sVar3 == 0x2000" identifier == number_literal) )) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (expression_statement "iVar2 = fclose(__stream);" (assignment_expression "iVar2 = fclose(__stream)" identifier = (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }" { (expression_statement "iVar1 = omac_done(local_12f8,param_5,param_6);" (assignment_expression "iVar1 = omac_done(local_12f8,param_5,param_6)" identifier = (call_expression "omac_done(local_12f8,param_5,param_6)" identifier (argument_list "(local_12f8,param_5,param_6)" ( identifier , identifier , identifier )))) ;) })) (labeled_statement "LAB_0015a2dd:\n        zeromem(__ptr,0x2000);" statement_identifier : (expression_statement "zeromem(__ptr,0x2000);" (call_expression "zeromem(__ptr,0x2000)" identifier (argument_list "(__ptr,0x2000)" ( identifier , number_literal ))) ;)) }))) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }))) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(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 IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE 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 TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) 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) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression 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 IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;)) }))) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (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 omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "int") (function_declarator "omac_file(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)" (identifier "omac_file") (parameter_list "(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,\n             long param_6)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) (, ",") (parameter_declaration "char *param_4" (primitive_type "char") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "long param_5" (sized_type_specifier "long" (long "long")) (identifier "param_5")) (, ",") (parameter_declaration "long param_6" (sized_type_specifier "long" (long "long")) (identifier "param_6")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  void *__ptr;\n  FILE *__stream;\n  size_t sVar3;\n  long in_FS_OFFSET;\n  undefined1 local_12f8 [4792];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }\n  if (param_4 == (char *)0x0) {\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }\n  if (param_5 == 0) {\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }\n  if (param_6 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }\n  __ptr = malloc(0x2000);\n  if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "FILE *__stream;" (type_identifier "FILE") (pointer_declarator "*__stream" (* "*") (identifier "__stream")) (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 local_12f8 [4792];" (type_identifier "undefined1") (array_declarator "local_12f8 [4792]" (identifier "local_12f8") ([ "[") (number_literal "4792") (] "]")) (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (param_2 == 0) {\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);\n  }" ({ "{") (expression_statement "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30);" (call_expression "crypt_argchk("key != NULL","src/mac/omac/omac_file.c",0x30)" (identifier "crypt_argchk") (argument_list "("key != NULL","src/mac/omac/omac_file.c",0x30)" (( "(") (string_literal ""key != NULL"" (" """) (string_content "key != NULL") (" """)) (, ",") (string_literal ""src/mac/omac/omac_file.c"" (" """) (string_content "src/mac/omac/omac_file.c") (" """)) (, ",") (number_literal "0x30") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_4 == (char *)0x0) {\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" (if "if") (parenthesized_expression "(param_4 == (char *)0x0)" (( "(") (binary_expression "param_4 == (char *)0x0" (identifier "param_4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);\n  }" ({ "{") (expression_statement "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31);" (call_expression "crypt_argchk("filename != NULL","src/mac/omac/omac_file.c",0x31)" (identifier "crypt_argchk") (argument_list "("filename != NULL","src/mac/omac/omac_file.c",0x31)" (( "(") (string_literal ""filename != NULL"" (" """) (string_content "filename != NULL") (" """)) (, ",") (string_literal ""src/mac/omac/omac_file.c"" (" """) (string_content "src/mac/omac/omac_file.c") (" """)) (, ",") (number_literal "0x31") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_5 == 0) {\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);\n  }" ({ "{") (expression_statement "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32);" (call_expression "crypt_argchk("out != NULL","src/mac/omac/omac_file.c",0x32)" (identifier "crypt_argchk") (argument_list "("out != NULL","src/mac/omac/omac_file.c",0x32)" (( "(") (string_literal ""out != NULL"" (" """) (string_content "out != NULL") (" """)) (, ",") (string_literal ""src/mac/omac/omac_file.c"" (" """) (string_content "src/mac/omac/omac_file.c") (" """)) (, ",") (number_literal "0x32") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_6 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" (if "if") (parenthesized_expression "(param_6 == 0)" (( "(") (binary_expression "param_6 == 0" (identifier "param_6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);\n  }" ({ "{") (expression_statement "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33);" (call_expression "crypt_argchk("outlen != NULL","src/mac/omac/omac_file.c",0x33)" (identifier "crypt_argchk") (argument_list "("outlen != NULL","src/mac/omac/omac_file.c",0x33)" (( "(") (string_literal ""outlen != NULL"" (" """) (string_content "outlen != NULL") (" """)) (, ",") (string_literal ""src/mac/omac/omac_file.c"" (" """) (string_content "src/mac/omac/omac_file.c") (" """)) (, ",") (number_literal "0x33") () ")"))) (; ";")) (} "}"))) (expression_statement "__ptr = malloc(0x2000);" (assignment_expression "__ptr = malloc(0x2000)" (identifier "__ptr") (= "=") (call_expression "malloc(0x2000)" (identifier "malloc") (argument_list "(0x2000)" (( "(") (number_literal "0x2000") () ")")))) (; ";")) (if_statement "if (__ptr == (void *)0x0) {\n    iVar1 = 0xd;\n  }\n  else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" (if "if") (parenthesized_expression "(__ptr == (void *)0x0)" (( "(") (binary_expression "__ptr == (void *)0x0" (identifier "__ptr") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar1 = 0xd;\n  }" ({ "{") (expression_statement "iVar1 = 0xd;" (assignment_expression "iVar1 = 0xd" (identifier "iVar1") (= "=") (number_literal "0xd")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" (else "else") (compound_statement "{\n    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);\n    if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }\n    free(__ptr);\n  }" ({ "{") (expression_statement "iVar1 = omac_init(local_12f8,param_1,param_2,param_3);" (assignment_expression "iVar1 = omac_init(local_12f8,param_1,param_2,param_3)" (identifier "iVar1") (= "=") (call_expression "omac_init(local_12f8,param_1,param_2,param_3)" (identifier "omac_init") (argument_list "(local_12f8,param_1,param_2,param_3)" (( "(") (identifier "local_12f8") (, ",") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      __stream = fopen(param_4,"rb");\n      if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }\n    }" ({ "{") (expression_statement "__stream = fopen(param_4,"rb");" (assignment_expression "__stream = fopen(param_4,"rb")" (identifier "__stream") (= "=") (call_expression "fopen(param_4,"rb")" (identifier "fopen") (argument_list "(param_4,"rb")" (( "(") (identifier "param_4") (, ",") (string_literal ""rb"" (" """) (string_content "rb") (" """)) () ")")))) (; ";")) (if_statement "if (__stream == (FILE *)0x0) {\n        iVar1 = 0x11;\n      }\n      else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" (if "if") (parenthesized_expression "(__stream == (FILE *)0x0)" (( "(") (binary_expression "__stream == (FILE *)0x0" (identifier "__stream") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        iVar1 = 0x11;\n      }" ({ "{") (expression_statement "iVar1 = 0x11;" (assignment_expression "iVar1 = 0x11" (identifier "iVar1") (= "=") (number_literal "0x11")) (; ";")) (} "}")) (else_clause "else {\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" (else "else") (compound_statement "{\n        do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);\n        iVar1 = 1;\n        iVar2 = fclose(__stream);\n        if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }\nLAB_0015a2dd:\n        zeromem(__ptr,0x2000);\n      }" ({ "{") (do_statement "do {\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        } while (sVar3 == 0x2000);" (do "do") (compound_statement "{\n          sVar3 = fread(__ptr,1,0x2000,__stream);\n          iVar1 = omac_process(local_12f8,__ptr,sVar3);\n          if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }\n        }" ({ "{") (expression_statement "sVar3 = fread(__ptr,1,0x2000,__stream);" (assignment_expression "sVar3 = fread(__ptr,1,0x2000,__stream)" (identifier "sVar3") (= "=") (call_expression "fread(__ptr,1,0x2000,__stream)" (identifier "fread") (argument_list "(__ptr,1,0x2000,__stream)" (( "(") (identifier "__ptr") (, ",") (number_literal "1") (, ",") (number_literal "0x2000") (, ",") (identifier "__stream") () ")")))) (; ";")) (expression_statement "iVar1 = omac_process(local_12f8,__ptr,sVar3);" (assignment_expression "iVar1 = omac_process(local_12f8,__ptr,sVar3)" (identifier "iVar1") (= "=") (call_expression "omac_process(local_12f8,__ptr,sVar3)" (identifier "omac_process") (argument_list "(local_12f8,__ptr,sVar3)" (( "(") (identifier "local_12f8") (, ",") (identifier "__ptr") (, ",") (identifier "sVar3") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            fclose(__stream);\n            goto LAB_0015a2dd;\n          }" ({ "{") (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" (identifier "fclose") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")"))) (; ";")) (goto_statement "goto LAB_0015a2dd;" (goto "goto") (statement_identifier "LAB_0015a2dd") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(sVar3 == 0x2000)" (( "(") (binary_expression "sVar3 == 0x2000" (identifier "sVar3") (== "==") (number_literal "0x2000")) () ")")) (; ";")) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar2 = fclose(__stream);" (assignment_expression "iVar2 = fclose(__stream)" (identifier "iVar2") (= "=") (call_expression "fclose(__stream)" (identifier "fclose") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          iVar1 = omac_done(local_12f8,param_5,param_6);\n        }" ({ "{") (expression_statement "iVar1 = omac_done(local_12f8,param_5,param_6);" (assignment_expression "iVar1 = omac_done(local_12f8,param_5,param_6)" (identifier "iVar1") (= "=") (call_expression "omac_done(local_12f8,param_5,param_6)" (identifier "omac_done") (argument_list "(local_12f8,param_5,param_6)" (( "(") (identifier "local_12f8") (, ",") (identifier "param_5") (, ",") (identifier "param_6") () ")")))) (; ";")) (} "}"))) (labeled_statement "LAB_0015a2dd:\n        zeromem(__ptr,0x2000);" (statement_identifier "LAB_0015a2dd") (: ":") (expression_statement "zeromem(__ptr,0x2000);" (call_expression "zeromem(__ptr,0x2000)" (identifier "zeromem") (argument_list "(__ptr,0x2000)" (( "(") (identifier "__ptr") (, ",") (number_literal "0x2000") () ")"))) (; ";"))) (} "}")))) (} "}"))) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (== "==") (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 "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(int cipher,type_1 *var_2,type_2 keylen,char *var_4,type_1 *var_5,type_2 *var_6)

{
  long var_21;
  int var_10;
  int var_17;
  type_1 *var_8;
  type_3 *var_12;
  size_t var_16;
  long var_1;
  type_4 omac;
  
  var_21 = *(long *)(var_1 + 0x28);
  if (var_2 == (type_1 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("key != NULL","src/mac/omac/omac_file.c",0x30);
  }
  if (var_4 == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("filename != NULL","src/mac/omac/omac_file.c",0x31);
  }
  if (var_5 == (type_1 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("out != NULL","src/mac/omac/omac_file.c",0x32);
  }
  if (var_6 == (type_2 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("outlen != NULL","src/mac/omac/omac_file.c",0x33);
  }
  var_8 = (type_1 *)var_7(0x2000);
  if (var_8 == (type_1 *)0x0) {
    var_10 = 0xd;
  }
  else {
    var_10 = var_9(&omac,cipher,var_2,keylen);
    if (var_10 == 0) {
      var_12 = var_11(var_4,"rb");
      if (var_12 == (type_3 *)0x0) {
        var_10 = 0x11;
      }
      else {
        do {
          var_16 = var_13(var_8,1,0x2000,var_12);
          var_10 = var_14(&omac,var_8,var_16);
          if (var_10 != 0) {
            var_15(var_12);
            goto LAB_0015a2dd;
          }
        } while (var_16 == 0x2000);
        var_10 = 1;
        var_17 = var_15(var_12);
        if (var_17 == 0) {
          var_10 = var_18(&omac,var_5,var_6);
        }
LAB_0015a2dd:
        var_19(var_8,0x2000);
      }
    }
    var_20(var_8);
  }
  if (var_21 == *(long *)(var_1 + 0x28)) {
    return var_10;
  }
                    /* WARNING: Subroutine does not return */
  var_22();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) 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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (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: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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: (identifier) arguments: (argument_list (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (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 (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (identifier))))) (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: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (goto_statement label: (statement_identifier))))) condition: (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: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (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(undefined4 param_1,long param_2,undefined8 param_3,char *param_4,long param_5,
             long param_6)

{
  int iVar1;
  int iVar2;
  void *__ptr;
  FILE *__stream;
  size_t sVar3;
  long in_FS_OFFSET;
  undefined1 local_12f8 [4792];
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("key != NULL","src/mac/omac/MASKED.c",0x30);
  }
  if (param_4 == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("filename != NULL","src/mac/omac/MASKED.c",0x31);
  }
  if (param_5 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("out != NULL","src/mac/omac/MASKED.c",0x32);
  }
  if (param_6 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/mac/omac/MASKED.c",0x33);
  }
  __ptr = malloc(0x2000);
  if (__ptr == (void *)0x0) {
    iVar1 = 0xd;
  }
  else {
    iVar1 = omac_init(local_12f8,param_1,param_2,param_3);
    if (iVar1 == 0) {
      __stream = fopen(param_4,"rb");
      if (__stream == (FILE *)0x0) {
        iVar1 = 0x11;
      }
      else {
        do {
          sVar3 = fread(__ptr,1,0x2000,__stream);
          iVar1 = omac_process(local_12f8,__ptr,sVar3);
          if (iVar1 != 0) {
            fclose(__stream);
            goto LAB_0015a2dd;
          }
        } while (sVar3 == 0x2000);
        iVar1 = 1;
        iVar2 = fclose(__stream);
        if (iVar2 == 0) {
          iVar1 = omac_done(local_12f8,param_5,param_6);
        }
LAB_0015a2dd:
        zeromem(__ptr,0x2000);
      }
    }
    free(__ptr);
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

