#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char const *);
char *strdup(char const *);
int /*<<< orphan*/ system(char *);
int main(int argc, char const *argv[]) {
  FILE *ciphertext, *session_key, *plaintext;
  char *ciphertext_filename = (char *)malloc(sizeof(char) * 64);
  char *sesskey_filename = (char *)malloc(sizeof(char) * 64);
  char *pubkey_filename = (char *)malloc(sizeof(char) * 64);
  char *signature_filename = (char *)malloc(sizeof(char) * 64);
  int ciphertext_set = 0;
  int sesskey_set = 0;
  int pubkey_set = 0;
  int signature_set = 0;
  int i;
  for (i = 0; i < argc; i++) {
    char *test = strdup(argv[i]);
    char const *v1 = "-c";
    char const *v2 = "--ciphertext";
    char const *v3 = "-s";
    char const *v4 = "--session";
    char const *v5 = "-p";
    char const *v6 = "--pubkey";
    char const *v7 = "-g";
    char const *v8 = "--signature";
    if (strcmp(test, v1) == 0 || strcmp(test, v2) == 0) {
      memcpy(ciphertext_filename, argv[++i], sizeof(char) * 64);
      ciphertext_set = 1;
    }
    if (strcmp(test, v3) == 0 || strcmp(test, v4) == 0) {
      memcpy(sesskey_filename, argv[++i], sizeof(char) * 64);
      sesskey_set = 1;
    }
    if (strcmp(test, v5) == 0 || strcmp(test, v6) == 0) {
      memcpy(pubkey_filename, argv[++i], sizeof(char) * 64);
      pubkey_set = 1;
    }
    if (strcmp(test, v7) == 0 || strcmp(test, v8) == 0) {
      memcpy(signature_filename, argv[++i], sizeof(char) * 64);
      signature_set = 1;
    }
  }
  if (ciphertext_set == 0) {
    fprintf(stderr, "Error: ciphertext filename not set\n");
    exit(EXIT_FAILURE);
  }
  if (sesskey_set == 0) {
    fprintf(stderr, "Error: Session Key filename not set\n");
    exit(EXIT_FAILURE);
  }
  if (pubkey_set == 0) {
    fprintf(stderr, "Error: Public Key filename not set\n");
    exit(EXIT_FAILURE);
  }
  if (signature_set == 0) {
    fprintf(stderr, "Error: signature filename not set\n");
    exit(EXIT_FAILURE);
  }
  char cmd[500];
  sprintf(cmd,
          "openssl des -d -in %s -out plaintext.txt -pass file:./sesskey.txt",
          ciphertext_filename);
  system(cmd);
  sprintf(
      cmd,
      "openssl rsautl -verify -inkey %s -pubin -keyform PEM -in %s > verihash",
      pubkey_filename, signature_filename);
  system(cmd);
  sprintf(cmd, "openssl dgst -sha256 -binary plaintext.txt > verihash2");
  system(cmd);
  FILE *hash1, *hash2;
  hash1 = fopen("verihash", "r");
  hash2 = fopen("verihash2", "r");
  if (!hash1) {
    fprintf(stderr, "verihash couldnt open\n");
  }
  if (!hash2) {
    fprintf(stderr, "verihash2 couldnt open\n");
  }
  char c1, c2;
  int same = 1;
  int lp = 0;
  int rp = 0;
  while (1) {
    c1 = fgetc(hash1);
    c2 = fgetc(hash2);
    if (c1 != c2) {
      fprintf(stderr, "diffchars c1: %c, c2: %c\n", c1, c2);
      same = 0;
      break;
    }
    if (c1 == EOF || c2 == EOF)
      break;
  }
  if (same) {
    fprintf(stderr, "Verification Success\n");
  } else {
    fprintf(stderr, "Verification Failed\n");
  }
  system("rm verihash verihash2");
  free(ciphertext_filename);
  free(sesskey_filename);
  free(pubkey_filename);
  free(signature_filename);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    142a <main+0x27a>
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10d0 <strdup@plt>
mov    %rax,-0x68(%rbp)
lea    0xdb4(%rip),%rax
mov    %rax,-0x70(%rbp)
lea    0xdac(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    0xdae(%rip),%rax
mov    %rax,-0x80(%rbp)
lea    0xda6(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    0xda2(%rip),%rax
mov    %rax,-0x90(%rbp)
lea    0xd97(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    0xd92(%rip),%rax
mov    %rax,-0xa0(%rbp)
lea    0xd87(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x70(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     12da <main+0x12a>
mov    -0x68(%rbp),%rdi
mov    -0x78(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1303 <main+0x153>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x5c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0x40,%edx
call   1080 <memcpy@plt>
movl   $0x1,-0x4c(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x80(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1334 <main+0x184>
mov    -0x68(%rbp),%rdi
mov    -0x88(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    135d <main+0x1ad>
mov    -0x38(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x5c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0x40,%edx
call   1080 <memcpy@plt>
movl   $0x1,-0x50(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x90(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1391 <main+0x1e1>
mov    -0x68(%rbp),%rdi
mov    -0x98(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13ba <main+0x20a>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x5c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0x40,%edx
call   1080 <memcpy@plt>
movl   $0x1,-0x54(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0xa0(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     13ee <main+0x23e>
mov    -0x68(%rbp),%rdi
mov    -0xa8(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1417 <main+0x267>
mov    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x5c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0x40,%edx
call   1080 <memcpy@plt>
movl   $0x1,-0x58(%rbp)
jmp    141c <main+0x26c>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1224 <main+0x74>
cmpl   $0x0,-0x4c(%rbp)
jne    1459 <main+0x2a9>
mov    0x2b9d(%rip),%rax
mov    (%rax),%edi
lea    0xbf4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2b7e(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
cmpl   $0x0,-0x50(%rbp)
jne    1488 <main+0x2d8>
mov    0x2b6e(%rip),%rax
mov    (%rax),%edi
lea    0xbe9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2b4f(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
cmpl   $0x0,-0x54(%rbp)
jne    14b7 <main+0x307>
mov    0x2b3f(%rip),%rax
mov    (%rax),%edi
lea    0xbdf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2b20(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
cmpl   $0x0,-0x58(%rbp)
jne    14e6 <main+0x336>
mov    0x2b10(%rip),%rax
mov    (%rax),%edi
lea    0xbd4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2af1(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
lea    -0x2a0(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xbd0(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0x2a0(%rbp),%rdi
call   1040 <system@plt>
lea    -0x2a0(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
lea    0xbe9(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0x2a0(%rbp),%rdi
call   1040 <system@plt>
lea    -0x2a0(%rbp),%rdi
lea    0xc0f(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0x2a0(%rbp),%rdi
call   1040 <system@plt>
lea    0xbec(%rip),%rdi
lea    0xc25(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x2a8(%rbp)
lea    0xc08(%rip),%rdi
lea    0xc0b(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x2b0(%rbp)
cmpq   $0x0,-0x2a8(%rbp)
jne    15ae <main+0x3fe>
mov    0x2a3a(%rip),%rax
mov    (%rax),%edi
lea    0xbe3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpq   $0x0,-0x2b0(%rbp)
jne    15d3 <main+0x423>
mov    0x2a15(%rip),%rax
mov    (%rax),%edi
lea    0xbd5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x2b8(%rbp)
movl   $0x0,-0x2bc(%rbp)
movl   $0x0,-0x2c0(%rbp)
mov    -0x2a8(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x2b1(%rbp)
mov    -0x2b0(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x2b2(%rbp)
movsbl -0x2b1(%rbp),%eax
movsbl -0x2b2(%rbp),%ecx
cmp    %ecx,%eax
je     165f <main+0x4af>
mov    0x29a6(%rip),%rax
mov    (%rax),%edi
movsbl -0x2b1(%rbp),%edx
movsbl -0x2b2(%rbp),%ecx
lea    0xb70(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x2b8(%rbp)
jmp    169b <main+0x4eb>
movsbl -0x2b1(%rbp),%eax
mov    0x297b(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1691 <main+0x4e1>
movsbl -0x2b2(%rbp),%eax
mov    0x2962(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1696 <main+0x4e6>
jmp    169b <main+0x4eb>
jmp    15f1 <main+0x441>
cmpl   $0x0,-0x2b8(%rbp)
je     16c4 <main+0x514>
mov    0x2929(%rip),%rax
mov    (%rax),%edi
lea    0xb1b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    16db <main+0x52b>
mov    0x290d(%rip),%rax
mov    (%rax),%edi
lea    0xb15(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
lea    0xb1c(%rip),%rdi
call   1040 <system@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x228,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,0x10(%rsp)
test   %ebp,%ebp
jle    1559 <main+0x3a9>
movl   $0x0,0xc(%rsp)
xor    %r15d,%r15d
movl   $0x0,0x4(%rsp)
movl   $0x0,0x8(%rsp)
xor    %r12d,%r12d
jmp    1260 <main+0xb0>
nopw   0x0(%rax,%rax,1)
movslq %r12d,%rax
add    $0x1,%r12d
mov    0x8(%rbx,%rax,8),%rsi
mov    0x10(%rsp),%rdi
mov    $0x40,%edx
call   1080 <memcpy@plt>
movl   $0x1,0x8(%rsp)
add    $0x1,%r12d
cmp    %ebp,%r12d
jge    1380 <main+0x1d0>
movslq %r12d,%r13
mov    (%rbx,%r13,8),%rdi
call   10d0 <strdup@plt>
mov    %rax,%r14
mov    %rax,%rdi
lea    0xd87(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1297 <main+0xe7>
mov    %r14,%rdi
lea    0xd76(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    12b7 <main+0x107>
lea    0x1(%r13),%r12d
mov    0x8(%rbx,%r13,8),%rsi
mov    0x20(%rsp),%rdi
mov    $0x40,%edx
call   1080 <memcpy@plt>
movl   $0x1,0xc(%rsp)
mov    %r14,%rdi
lea    0xd4f(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12df <main+0x12f>
mov    %r14,%rdi
lea    0xd3e(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1300 <main+0x150>
movslq %r12d,%rax
add    $0x1,%r12d
mov    0x8(%rbx,%rax,8),%rsi
mov    0x28(%rsp),%rdi
mov    $0x40,%edx
call   1080 <memcpy@plt>
mov    $0x1,%r15d
mov    %r14,%rdi
lea    0xd13(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1328 <main+0x178>
mov    %r14,%rdi
lea    0xd02(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    134b <main+0x19b>
movslq %r12d,%rax
add    $0x1,%r12d
mov    0x8(%rbx,%rax,8),%rsi
mov    0x18(%rsp),%rdi
mov    $0x40,%edx
call   1080 <memcpy@plt>
movl   $0x1,0x4(%rsp)
mov    %r14,%rdi
lea    0xcd4(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1230 <main+0x80>
mov    %r14,%rdi
lea    0xcbf(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1253 <main+0xa3>
jmp    1230 <main+0x80>
cmpl   $0x0,0xc(%rsp)
je     1559 <main+0x3a9>
test   %r15d,%r15d
je     156b <main+0x3bb>
cmpl   $0x0,0x4(%rsp)
je     157d <main+0x3cd>
cmpl   $0x0,0x8(%rsp)
je     158f <main+0x3df>
lea    0xd17(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    0x20(%rsp),%rdx
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xd36(%rip),%rsi
mov    %rbx,%rdi
mov    0x18(%rsp),%rdx
mov    0x10(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
movabs $0x32687361686972,%rax
mov    %rax,0x5f(%rsp)
movups 0xd4b(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movups 0xd4f(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movups 0xd53(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xd16(%rip),%rdi
lea    0xd4f(%rip),%rbx
mov    %rbx,%rsi
call   10a0 <fopen@plt>
mov    %rax,%r15
lea    0xd33(%rip),%rdi
mov    %rbx,%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbp
test   %r15,%r15
je     151d <main+0x36d>
test   %rbp,%rbp
je     153d <main+0x38d>
mov    0x2b79(%rip),%r12
lea    0xd5d(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1050 <fgetc@plt>
cmp    %al,%bl
jne    149e <main+0x2ee>
cmp    (%r12),%bl
jne    1480 <main+0x2d0>
jmp    14c2 <main+0x312>
movsbl %al,%ecx
movsbl %bl,%edx
mov    0x2b2d(%rip),%rax
mov    (%rax),%edi
lea    0xd05(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xd27(%rip),%r14
mov    0x2b0f(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xd22(%rip),%rdi
call   1040 <system@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2ab4(%rip),%rax
mov    (%rax),%edi
lea    0xc5d(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %rbp,%rbp
jne    1468 <main+0x2b8>
mov    0x2a94(%rip),%rax
mov    (%rax),%edi
lea    0xc54(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1468 <main+0x2b8>
mov    0x2a78(%rip),%rax
mov    (%rax),%edi
lea    0xacf(%rip),%rsi
jmp    159f <main+0x3ef>
mov    0x2a66(%rip),%rax
mov    (%rax),%edi
lea    0xae1(%rip),%rsi
jmp    159f <main+0x3ef>
mov    0x2a54(%rip),%rax
mov    (%rax),%edi
lea    0xaf4(%rip),%rsi
jmp    159f <main+0x3ef>
mov    0x2a42(%rip),%rax
mov    (%rax),%edi
lea    0xb06(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2a23(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-c\00"
@.str.1 = [13 x i8] c"--ciphertext\00"
@.str.2 = [3 x i8] c"-s\00"
@.str.3 = [10 x i8] c"--session\00"
@.str.4 = [3 x i8] c"-p\00"
@.str.5 = [9 x i8] c"--pubkey\00"
@.str.6 = [3 x i8] c"-g\00"
@.str.7 = [12 x i8] c"--signature\00"
@stderr = global i32 0
@.str.8 = [36 x i8] c"Error: ciphertext filename not set\0A\00"
@EXIT_FAILURE = global i32 0
@.str.9 = [37 x i8] c"Error: Session Key filename not set\0A\00"
@.str.10 = [36 x i8] c"Error: Public Key filename not set\0A\00"
@.str.11 = [35 x i8] c"Error: signature filename not set\0A\00"
@.str.12 = [66 x i8] c"openssl des -d -in %s -out plaintext.txt -pass file:./sesskey.txt\00"
@.str.13 = [71 x i8] c"openssl rsautl -verify -inkey %s -pubin -keyform PEM -in %s > verihash\00"
@.str.14 = [55 x i8] c"openssl dgst -sha256 -binary plaintext.txt > verihash2\00"
@.str.15 = [9 x i8] c"verihash\00"
@.str.16 = [2 x i8] c"r\00"
@.str.17 = [10 x i8] c"verihash2\00"
@.str.18 = [23 x i8] c"verihash couldnt open\0A\00"
@.str.19 = [24 x i8] c"verihash2 couldnt open\0A\00"
@.str.20 = [26 x i8] c"diffchars c1: %c, c2: %c\0A\00"
@EOF = global i8 0
@.str.21 = [22 x i8] c"Verification Success\0A\00"
@.str.22 = [21 x i8] c"Verification Failed\0A\00"
@.str.23 = [22 x i8] c"rm verihash verihash2\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i8*
%26 = alloca i8*
%27 = alloca [500 x i8]
%28 = alloca i32*
%29 = alloca i32*
%30 = alloca i8
%31 = alloca i8
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%35 = call i64 @malloc(i32 64)
%36 = inttoptr i64 %35 to i8*
store i8* %36, i8** %9
%37 = call i64 @malloc(i32 64)
%38 = inttoptr i64 %37 to i8*
store i8* %38, i8** %10
%39 = call i64 @malloc(i32 64)
%40 = inttoptr i64 %39 to i8*
store i8* %40, i8** %11
%41 = call i64 @malloc(i32 64)
%42 = inttoptr i64 %41 to i8*
store i8* %42, i8** %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
br label %43
43: ; preds = %130, %2
%44 = load i32, i32* %17
%45 = load i32, i32* %4
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %133
47: ; preds = %43
%48 = load i8**, i8*** %5
%49 = load i32, i32* %17
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8*, i8** %48, i64 %50
%52 = load i8*, i8** %51
%53 = call i8* @strdup(i8* %52)
store i8* %53, i8** %18
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %19
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %20
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %21
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %22
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %23
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8** %24
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %25
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8** %26
%54 = load i8*, i8** %18
%55 = load i8*, i8** %19
%56 = call i64 @strcmp(i8* %54, i8* %55)
%57 = icmp eq i64 %56, 0
br i1 %57, label %63, label %58
58: ; preds = %47
%59 = load i8*, i8** %18
%60 = load i8*, i8** %20
%61 = call i64 @strcmp(i8* %59, i8* %60)
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %72
63: ; preds = %58, %47
%64 = load i8*, i8** %9
%65 = load i8**, i8*** %5
%66 = load i32, i32* %17
%67 = add nsw i32 %66, 1
store i32 %67, i32* %17
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %65, i64 %68
%70 = load i8*, i8** %69
%71 = call i32 @memcpy(i8* %64, i8* %70, i32 64)
store i32 1, i32* %13
br label %72
72: ; preds = %63, %58
%73 = load i8*, i8** %18
%74 = load i8*, i8** %21
%75 = call i64 @strcmp(i8* %73, i8* %74)
%76 = icmp eq i64 %75, 0
br i1 %76, label %82, label %77
77: ; preds = %72
%78 = load i8*, i8** %18
%79 = load i8*, i8** %22
%80 = call i64 @strcmp(i8* %78, i8* %79)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %91
82: ; preds = %77, %72
%83 = load i8*, i8** %10
%84 = load i8**, i8*** %5
%85 = load i32, i32* %17
%86 = add nsw i32 %85, 1
store i32 %86, i32* %17
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8*, i8** %84, i64 %87
%89 = load i8*, i8** %88
%90 = call i32 @memcpy(i8* %83, i8* %89, i32 64)
store i32 1, i32* %14
br label %91
91: ; preds = %82, %77
%92 = load i8*, i8** %18
%93 = load i8*, i8** %23
%94 = call i64 @strcmp(i8* %92, i8* %93)
%95 = icmp eq i64 %94, 0
br i1 %95, label %101, label %96
96: ; preds = %91
%97 = load i8*, i8** %18
%98 = load i8*, i8** %24
%99 = call i64 @strcmp(i8* %97, i8* %98)
%100 = icmp eq i64 %99, 0
br i1 %100, label %101, label %110
101: ; preds = %96, %91
%102 = load i8*, i8** %11
%103 = load i8**, i8*** %5
%104 = load i32, i32* %17
%105 = add nsw i32 %104, 1
store i32 %105, i32* %17
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8*, i8** %103, i64 %106
%108 = load i8*, i8** %107
%109 = call i32 @memcpy(i8* %102, i8* %108, i32 64)
store i32 1, i32* %15
br label %110
110: ; preds = %101, %96
%111 = load i8*, i8** %18
%112 = load i8*, i8** %25
%113 = call i64 @strcmp(i8* %111, i8* %112)
%114 = icmp eq i64 %113, 0
br i1 %114, label %120, label %115
115: ; preds = %110
%116 = load i8*, i8** %18
%117 = load i8*, i8** %26
%118 = call i64 @strcmp(i8* %116, i8* %117)
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %129
120: ; preds = %115, %110
%121 = load i8*, i8** %12
%122 = load i8**, i8*** %5
%123 = load i32, i32* %17
%124 = add nsw i32 %123, 1
store i32 %124, i32* %17
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8*, i8** %122, i64 %125
%127 = load i8*, i8** %126
%128 = call i32 @memcpy(i8* %121, i8* %127, i32 64)
store i32 1, i32* %16
br label %129
129: ; preds = %120, %115
br label %130
130: ; preds = %129
%131 = load i32, i32* %17
%132 = add nsw i32 %131, 1
store i32 %132, i32* %17
br label %43
133: ; preds = %43
%134 = load i32, i32* %13
%135 = icmp eq i32 %134, 0
br i1 %135, label %136, label %141
136: ; preds = %133
%137 = load i32, i32* @stderr
%138 = call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%139 = load i32, i32* @EXIT_FAILURE
%140 = call i32 @exit(i32 %139)
unreachable
141: ; preds = %133
%142 = load i32, i32* %14
%143 = icmp eq i32 %142, 0
br i1 %143, label %144, label %149
144: ; preds = %141
%145 = load i32, i32* @stderr
%146 = call i32 (i32, i8*, ...) @fprintf(i32 %145, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
%147 = load i32, i32* @EXIT_FAILURE
%148 = call i32 @exit(i32 %147)
unreachable
149: ; preds = %141
%150 = load i32, i32* %15
%151 = icmp eq i32 %150, 0
br i1 %151, label %152, label %157
152: ; preds = %149
%153 = load i32, i32* @stderr
%154 = call i32 (i32, i8*, ...) @fprintf(i32 %153, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%155 = load i32, i32* @EXIT_FAILURE
%156 = call i32 @exit(i32 %155)
unreachable
157: ; preds = %149
%158 = load i32, i32* %16
%159 = icmp eq i32 %158, 0
br i1 %159, label %160, label %165
160: ; preds = %157
%161 = load i32, i32* @stderr
%162 = call i32 (i32, i8*, ...) @fprintf(i32 %161, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
%163 = load i32, i32* @EXIT_FAILURE
%164 = call i32 @exit(i32 %163)
unreachable
165: ; preds = %157
%166 = getelementptr inbounds [500 x i8], [500 x i8]* %27, i64 0, i64 0
%167 = load i8*, i8** %9
%168 = call i32 (i8*, i8*, ...) @sprintf(i8* %166, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0), i8* %167)
%169 = getelementptr inbounds [500 x i8], [500 x i8]* %27, i64 0, i64 0
%170 = call i32 @system(i8* %169)
%171 = getelementptr inbounds [500 x i8], [500 x i8]* %27, i64 0, i64 0
%172 = load i8*, i8** %11
%173 = load i8*, i8** %12
%174 = call i32 (i8*, i8*, ...) @sprintf(i8* %171, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.13, i64 0, i64 0), i8* %172, i8* %173)
%175 = getelementptr inbounds [500 x i8], [500 x i8]* %27, i64 0, i64 0
%176 = call i32 @system(i8* %175)
%177 = getelementptr inbounds [500 x i8], [500 x i8]* %27, i64 0, i64 0
%178 = call i32 (i8*, i8*, ...) @sprintf(i8* %177, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0))
%179 = getelementptr inbounds [500 x i8], [500 x i8]* %27, i64 0, i64 0
%180 = call i32 @system(i8* %179)
%181 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %181, i32** %28
%182 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %182, i32** %29
%183 = load i32*, i32** %28
%184 = icmp ne i32* %183, null
br i1 %184, label %188, label %185
185: ; preds = %165
%186 = load i32, i32* @stderr
%187 = call i32 (i32, i8*, ...) @fprintf(i32 %186, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0))
br label %188
188: ; preds = %185, %165
%189 = load i32*, i32** %29
%190 = icmp ne i32* %189, null
br i1 %190, label %194, label %191
191: ; preds = %188
%192 = load i32, i32* @stderr
%193 = call i32 (i32, i8*, ...) @fprintf(i32 %192, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0))
br label %194
194: ; preds = %191, %188
store i32 1, i32* %32
store i32 0, i32* %33
store i32 0, i32* %34
br label %195
195: ; preds = %194, %225
%196 = load i32*, i32** %28
%197 = call signext i8 @fgetc(i32* %196)
store i8 %197, i8* %30
%198 = load i32*, i32** %29
%199 = call signext i8 @fgetc(i32* %198)
store i8 %199, i8* %31
%200 = load i8, i8* %30
%201 = sext i8 %200 to i32
%202 = load i8, i8* %31
%203 = sext i8 %202 to i32
%204 = icmp ne i32 %201, %203
br i1 %204, label %205, label %212
205: ; preds = %195
%206 = load i32, i32* @stderr
%207 = load i8, i8* %30
%208 = sext i8 %207 to i32
%209 = load i8, i8* %31
%210 = sext i8 %209 to i32
%211 = call i32 (i32, i8*, ...) @fprintf(i32 %206, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.20, i64 0, i64 0), i32 %208, i32 %210)
store i32 0, i32* %32
br label %226
212: ; preds = %195
%213 = load i8, i8* %30
%214 = sext i8 %213 to i32
%215 = load i8, i8* @EOF
%216 = sext i8 %215 to i32
%217 = icmp eq i32 %214, %216
br i1 %217, label %224, label %218
218: ; preds = %212
%219 = load i8, i8* %31
%220 = sext i8 %219 to i32
%221 = load i8, i8* @EOF
%222 = sext i8 %221 to i32
%223 = icmp eq i32 %220, %222
br i1 %223, label %224, label %225
224: ; preds = %218, %212
br label %226
225: ; preds = %218
br label %195
226: ; preds = %224, %205
%227 = load i32, i32* %32
%228 = icmp ne i32 %227, 0
br i1 %228, label %229, label %232
229: ; preds = %226
%230 = load i32, i32* @stderr
%231 = call i32 (i32, i8*, ...) @fprintf(i32 %230, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.21, i64 0, i64 0))
br label %235
232: ; preds = %226
%233 = load i32, i32* @stderr
%234 = call i32 (i32, i8*, ...) @fprintf(i32 %233, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.22, i64 0, i64 0))
br label %235
235: ; preds = %232, %229
%236 = call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0))
%237 = load i8*, i8** %9
%238 = call i32 @free(i8* %237)
%239 = load i8*, i8** %10
%240 = call i32 @free(i8* %239)
%241 = load i8*, i8** %11
%242 = call i32 @free(i8* %241)
%243 = load i8*, i8** %12
%244 = call i32 @free(i8* %243)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-c\00"
@.str.1 = [13 x i8] c"--ciphertext\00"
@.str.2 = [3 x i8] c"-s\00"
@.str.3 = [10 x i8] c"--session\00"
@.str.4 = [3 x i8] c"-p\00"
@.str.5 = [9 x i8] c"--pubkey\00"
@.str.6 = [3 x i8] c"-g\00"
@.str.7 = [12 x i8] c"--signature\00"
@stderr = global i32 0
@.str.8 = [36 x i8] c"Error: ciphertext filename not set\0A\00"
@EXIT_FAILURE = global i32 0
@.str.9 = [37 x i8] c"Error: Session Key filename not set\0A\00"
@.str.10 = [36 x i8] c"Error: Public Key filename not set\0A\00"
@.str.11 = [35 x i8] c"Error: signature filename not set\0A\00"
@.str.12 = [66 x i8] c"openssl des -d -in %s -out plaintext.txt -pass file:./sesskey.txt\00"
@.str.13 = [71 x i8] c"openssl rsautl -verify -inkey %s -pubin -keyform PEM -in %s > verihash\00"
@.str.14 = [55 x i8] c"openssl dgst -sha256 -binary plaintext.txt > verihash2\00"
@.str.15 = [9 x i8] c"verihash\00"
@.str.16 = [2 x i8] c"r\00"
@.str.17 = [10 x i8] c"verihash2\00"
@.str.18 = [23 x i8] c"verihash couldnt open\0A\00"
@.str.19 = [24 x i8] c"verihash2 couldnt open\0A\00"
@.str.20 = [26 x i8] c"diffchars c1: %c, c2: %c\0A\00"
@EOF = global i8 0
@.str.21 = [22 x i8] c"Verification Success\0A\00"
@.str.22 = [21 x i8] c"Verification Failed\0A\00"
@.str.23 = [22 x i8] c"rm verihash verihash2\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [500 x i8]
%4 = tail call i64 @malloc(i32 64)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i64 @malloc(i32 64)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i64 @malloc(i32 64)
%9 = inttoptr i64 %8 to i8*
%10 = tail call i64 @malloc(i32 64)
%11 = inttoptr i64 %10 to i8*
%12 = icmp sgt i32 %0, 0
br i1 %12, label %13, label %83
13: ; preds = %2, %76
%14 = phi i32 [ %36, %76 ], [ 0, %2 ]
%15 = phi i32 [ %50, %76 ], [ 0, %2 ]
%16 = phi i32 [ %64, %76 ], [ 0, %2 ]
%17 = phi i32 [ %78, %76 ], [ 0, %2 ]
%18 = phi i32 [ %79, %76 ], [ 0, %2 ]
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
%21 = load i8*, i8** %20
%22 = tail call i8* @strdup(i8* %21)
%23 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %13
%26 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %25, %13
%29 = add nsw i32 %18, 1
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8*, i8** %1, i64 %30
%32 = load i8*, i8** %31
%33 = tail call i32 @memcpy(i8* %5, i8* %32, i32 64)
br label %34
34: ; preds = %28, %25
%35 = phi i32 [ %29, %28 ], [ %18, %25 ]
%36 = phi i32 [ 1, %28 ], [ %14, %25 ]
%37 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %42, label %39
39: ; preds = %34
%40 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %48
42: ; preds = %39, %34
%43 = add nsw i32 %35, 1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %1, i64 %44
%46 = load i8*, i8** %45
%47 = tail call i32 @memcpy(i8* %7, i8* %46, i32 64)
br label %48
48: ; preds = %42, %39
%49 = phi i32 [ %43, %42 ], [ %35, %39 ]
%50 = phi i32 [ 1, %42 ], [ %15, %39 ]
%51 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %48
%54 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %62
56: ; preds = %53, %48
%57 = add nsw i32 %49, 1
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %1, i64 %58
%60 = load i8*, i8** %59
%61 = tail call i32 @memcpy(i8* %9, i8* %60, i32 64)
br label %62
62: ; preds = %56, %53
%63 = phi i32 [ %57, %56 ], [ %49, %53 ]
%64 = phi i32 [ 1, %56 ], [ %16, %53 ]
%65 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %70, label %67
67: ; preds = %62
%68 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %76
70: ; preds = %67, %62
%71 = add nsw i32 %63, 1
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8*, i8** %1, i64 %72
%74 = load i8*, i8** %73
%75 = tail call i32 @memcpy(i8* %11, i8* %74, i32 64)
br label %76
76: ; preds = %70, %67
%77 = phi i32 [ %71, %70 ], [ %63, %67 ]
%78 = phi i32 [ 1, %70 ], [ %17, %67 ]
%79 = add nsw i32 %77, 1
%80 = icmp slt i32 %79, %0
br i1 %80, label %13, label %81
81: ; preds = %76
%82 = icmp eq i32 %36, 0
br i1 %82, label %83, label %88
83: ; preds = %2, %81
%84 = load i32, i32* @stderr
%85 = tail call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%86 = load i32, i32* @EXIT_FAILURE
%87 = tail call i32 @exit(i32 %86)
unreachable
88: ; preds = %81
%89 = icmp eq i32 %50, 0
br i1 %89, label %90, label %95
90: ; preds = %88
%91 = load i32, i32* @stderr
%92 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
%93 = load i32, i32* @EXIT_FAILURE
%94 = tail call i32 @exit(i32 %93)
unreachable
95: ; preds = %88
%96 = icmp eq i32 %64, 0
br i1 %96, label %97, label %102
97: ; preds = %95
%98 = load i32, i32* @stderr
%99 = tail call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%100 = load i32, i32* @EXIT_FAILURE
%101 = tail call i32 @exit(i32 %100)
unreachable
102: ; preds = %95
%103 = icmp eq i32 %78, 0
br i1 %103, label %104, label %109
104: ; preds = %102
%105 = load i32, i32* @stderr
%106 = tail call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
%107 = load i32, i32* @EXIT_FAILURE
%108 = tail call i32 @exit(i32 %107)
unreachable
109: ; preds = %102
%110 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%111 = call i32 (i8*, i8*, ...) @sprintf(i8* %110, i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0), i8* %5)
%112 = call i32 @system(i8* %110)
%113 = call i32 (i8*, i8*, ...) @sprintf(i8* %110, i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.13, i64 0, i64 0), i8* %9, i8* %11)
%114 = call i32 @system(i8* %110)
%115 = call i32 @system(i8* %110)
%116 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%117 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%118 = icmp eq i32* %116, null
br i1 %118, label %119, label %122
119: ; preds = %109
%120 = load i32, i32* @stderr
%121 = tail call i32 (i32, i8*, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0))
br label %122
122: ; preds = %119, %109
%123 = icmp eq i32* %117, null
br i1 %123, label %124, label %127
124: ; preds = %122
%125 = load i32, i32* @stderr
%126 = tail call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0))
br label %127
127: ; preds = %124, %122
br label %128
128: ; preds = %127, %137
%129 = tail call signext i8 @fgetc(i32* %116)
%130 = tail call signext i8 @fgetc(i32* %117)
%131 = icmp eq i8 %129, %130
br i1 %131, label %137, label %132
132: ; preds = %128
%133 = sext i8 %130 to i32
%134 = sext i8 %129 to i32
%135 = load i32, i32* @stderr
%136 = tail call i32 (i32, i8*, ...) @fprintf(i32 %135, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.20, i64 0, i64 0), i32 %134, i32 %133)
br label %140
137: ; preds = %128
%138 = load i8, i8* @EOF
%139 = icmp eq i8 %129, %138
br i1 %139, label %140, label %128
140: ; preds = %137, %132
%141 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.22, i64 0, i64 0), %132 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.21, i64 0, i64 0), %137 ]
%142 = load i32, i32* @stderr
%143 = tail call i32 (i32, i8*, ...) @fprintf(i32 %142, i8* %141)
%144 = tail call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0))
%145 = tail call i32 @free(i8* %5)
%146 = tail call i32 @free(i8* %7)
%147 = tail call i32 @free(i8* %9)
%148 = tail call i32 @free(i8* %11)
ret i32 0
}