#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 */
#define EOF 128
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
short sscanf(char *, char *, char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strstr(char *, char *);
int /*<<< orphan*/ txnstats_close();
int txnstats_find_id(char *, char *);
short txnstats_insert(char *, char *);
scalar_t__ txnstats_open();
int main(int argc, char *argv[]) {
  char *logname = "data.txt";
  FILE *logfile;
  if (argc > 1) {
    if (strcmp(argv[1], "-h") == 0) {
      printf("Usage: report: [OPTION] [FILE]\n"
             "Generate a report for log file FILE. "
             "If filename is not specified, data.txt is used.\n"
             "-h print help message.\n");
      return 0;
    } else {
      logname = argv[1];
    }
  }
  logfile = fopen(argc > 1 ? argv[1] : logname, "r");
  if (logfile == NULL) {
    perror("Error opening log file");
  } else {
    if (txnstats_open() == 0) {
      int completed_transactions = 0;
      int missing_requests = 0;
      int total_elapsed_seconds = 0;
      int lines = 0;
      int requests = 0;
      int responses = 0;
      int minresponse = -1;
      int maxresponse = 0;
      char minid[15], maxid[15];
      minid[0] = '\0';
      maxid[0] = '\0';
      int txn_frequencies[31];
      int i;
      for (i = 0; i < 31; i++) {
        txn_frequencies[i] = 0;
      }
      short keepreading = 1;
      short noerr = 1;
      while (keepreading && noerr) {
        char timestamp[13];
        char txntype[5];
        char line[100];
        if (fgets(line, 100, logfile) != NULL) {
          short numfields = sscanf(line, "@{%12s$%4s", timestamp, txntype);
          if (numfields == 2) {
            char id[15];
            id[0] = '\0';
            char *msn = strstr(&line[19], "|MSN");
            if (msn) {
              strncpy(id, msn + 4, 14);
              id[14] = '\0';
              if (0 == strncmp(txntype, "RQMS", 4)) {
                requests++;
                if (1 != (noerr = txnstats_insert(id, timestamp))) {
                  printf(" Error inserting request timestamp %s, id %s.\n",
                         timestamp, id);
                }
              } else {
                responses++;
                int response_time = txnstats_find_id(id, timestamp);
                if (response_time >= 0) {
                  total_elapsed_seconds += response_time;
                  completed_transactions++;
                  if (response_time >= 0 && response_time <= 30) {
                    txn_frequencies[response_time]++;
                  }
                  if (minresponse == -1 || response_time < minresponse) {
                    minresponse = response_time;
                    strcpy(minid, id);
                  }
                  if (response_time > maxresponse) {
                    maxresponse = response_time;
                    strcpy(maxid, id);
                  }
                } else {
                  missing_requests++;
                }
              }
              short keepflushing = 1;
              char c;
              while (keepflushing && (c = fgetc(logfile)) != EOF) {
                switch (c) {
                case EOF:
                  keepreading = 0;
                  keepflushing = 0;
                  break;
                case '\n':
                  keepflushing = 0;
                  break;
                default:;
                }
              }
            } else {
              printf(" could not find MSN field on record %d\n", lines + 1);
              keepreading = 0;
            }
          } else {
            if (numfields != EOF) {
              printf(" bad read at line %d. numfields = %d\n", lines + 1,
                     numfields);
            }
            keepreading = 0;
          }
        }
        if (feof(logfile)) {
          keepreading = 0;
        }
        if (ferror(logfile)) {
          printf("ferror reading logfile\n");
          keepreading = 0;
        }
        if (keepreading && noerr)
          lines++;
      }
      fclose(logfile);
      printf("Processed:\n"
             "%d records\n"
             "%d complete transactions\n"
             "%d responses were missing requests\n"
             "%d requests were missing responses\n\n",
             lines, completed_transactions, missing_requests,
             requests - completed_transactions);
      if (completed_transactions > 0) {
        float avgresponse =
            (float)total_elapsed_seconds / (float)completed_transactions;
        printf(" Minimum response time: %d seconds (txn id: %s)\n", minresponse,
               minid);
        printf(" Maximum response time: %d seconds (txn id: %s)\n\n",
               maxresponse, maxid);
        printf(" Total elapsed seconds: %d\n", total_elapsed_seconds);
        printf(" Average response time: %f seconds\n\n", avgresponse);
        printf("Response Time | Txns\n");
        for (i = 0; i < 31; i++) {
          printf("%13d   %4d\n", i, txn_frequencies[i]);
        }
      }
      txnstats_close();
    } else {
      printf("Could not allocate transaction search structures.\n");
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xdc0(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1297 <main+0x77>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdac(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    1286 <main+0x66>
lea    0xd99(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1894 <main+0x674>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1297 <main+0x77>
cmpl   $0x1,-0x8(%rbp)
jle    12b5 <main+0x95>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x198(%rbp)
jmp    12c0 <main+0xa0>
mov    -0x18(%rbp),%rax
mov    %rax,-0x198(%rbp)
mov    -0x198(%rbp),%rdi
lea    0xdca(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12f3 <main+0xd3>
lea    0xdb1(%rip),%rdi
call   1110 <perror@plt>
jmp    188d <main+0x66d>
mov    $0x0,%al
call   10f0 <txnstats_open@plt>
cmp    $0x0,%rax
jne    186e <main+0x64e>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0xffffffff,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movb   $0x0,-0x4f(%rbp)
movb   $0x0,-0x5e(%rbp)
movl   $0x0,-0xe4(%rbp)
cmpl   $0x1f,-0xe4(%rbp)
jge    1381 <main+0x161>
movslq -0xe4(%rbp),%rax
movl   $0x0,-0xe0(%rbp,%rax,4)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    134e <main+0x12e>
movw   $0x1,-0xe6(%rbp)
movw   $0x1,-0xe8(%rbp)
movswl -0xe6(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x199(%rbp)
je     13be <main+0x19e>
movswl -0xe8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x199(%rbp)
mov    -0x199(%rbp),%al
test   $0x1,%al
jne    13d1 <main+0x1b1>
jmp    1765 <main+0x545>
lea    -0x160(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x64,%esi
call   10a0 <fgets@plt>
cmp    $0x0,%rax
je     16f1 <main+0x4d1>
lea    -0x160(%rbp),%rdi
lea    -0xf5(%rbp),%rdx
lea    -0xfa(%rbp),%rcx
lea    0xca5(%rip),%rsi
call   10d0 <sscanf@plt>
mov    %ax,-0x162(%rbp)
movswl -0x162(%rbp),%eax
cmp    $0x2,%eax
jne    16b6 <main+0x496>
movb   $0x0,-0x171(%rbp)
lea    -0x160(%rbp),%rdi
add    $0x13,%rdi
lea    0xc7b(%rip),%rsi
call   1140 <strstr@plt>
mov    %rax,-0x180(%rbp)
cmpq   $0x0,-0x180(%rbp)
je     1694 <main+0x474>
lea    -0x171(%rbp),%rdi
mov    -0x180(%rbp),%rsi
add    $0x4,%rsi
mov    $0xe,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x163(%rbp)
lea    -0xfa(%rbp),%rdi
lea    0xc35(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    14f8 <main+0x2d8>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
lea    -0x171(%rbp),%rdi
lea    -0xf5(%rbp),%rsi
call   10e0 <txnstats_insert@plt>
mov    %ax,-0xe8(%rbp)
movswl %ax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     14f3 <main+0x2d3>
lea    -0xf5(%rbp),%rsi
lea    -0x171(%rbp),%rdx
lea    0xbda(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    15db <main+0x3bb>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
lea    -0x171(%rbp),%rdi
lea    -0xf5(%rbp),%rsi
call   1120 <txnstats_find_id@plt>
mov    %eax,-0x184(%rbp)
cmpl   $0x0,-0x184(%rbp)
jl     15cd <main+0x3ad>
mov    -0x184(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x184(%rbp)
jl     156e <main+0x34e>
cmpl   $0x1e,-0x184(%rbp)
jg     156e <main+0x34e>
movslq -0x184(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0xe0(%rbp,%rax,4)
cmpl   $0xffffffff,-0x3c(%rbp)
je     1587 <main+0x367>
mov    -0x184(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    15a0 <main+0x380>
mov    -0x184(%rbp),%eax
mov    %eax,-0x3c(%rbp)
lea    -0x4f(%rbp),%rdi
lea    -0x171(%rbp),%rsi
call   1050 <strcpy@plt>
mov    -0x184(%rbp),%eax
cmp    -0x40(%rbp),%eax
jle    15c8 <main+0x3a8>
mov    -0x184(%rbp),%eax
mov    %eax,-0x40(%rbp)
lea    -0x5e(%rbp),%rdi
lea    -0x171(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    15d6 <main+0x3b6>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    15db <main+0x3bb>
movw   $0x1,-0x186(%rbp)
movswl -0x186(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19a(%rbp)
je     161c <main+0x3fc>
mov    -0x20(%rbp),%rdi
call   1090 <fgetc@plt>
mov    %al,-0x187(%rbp)
movsbl %al,%eax
cmp    $0x80,%eax
setne  %al
mov    %al,-0x19a(%rbp)
mov    -0x19a(%rbp),%al
test   $0x1,%al
jne    162f <main+0x40f>
jmp    168f <main+0x46f>
movsbl -0x187(%rbp),%eax
mov    %eax,-0x1a0(%rbp)
sub    $0xa,%eax
je     1677 <main+0x457>
jmp    164a <main+0x42a>
mov    -0x1a0(%rbp),%eax
sub    $0x80,%eax
jne    1685 <main+0x465>
jmp    1660 <main+0x440>
movw   $0x0,-0xe6(%rbp)
movw   $0x0,-0x186(%rbp)
jmp    168a <main+0x46a>
movw   $0x0,-0x186(%rbp)
jmp    168a <main+0x46a>
jmp    168a <main+0x46a>
jmp    15e4 <main+0x3c4>
jmp    16b1 <main+0x491>
mov    -0x30(%rbp),%esi
add    $0x1,%esi
lea    0xa54(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movw   $0x0,-0xe6(%rbp)
jmp    16ec <main+0x4cc>
movswl -0x162(%rbp),%eax
cmp    $0x80,%eax
je     16e3 <main+0x4c3>
mov    -0x30(%rbp),%esi
add    $0x1,%esi
movswl -0x162(%rbp),%edx
lea    0xa41(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movw   $0x0,-0xe6(%rbp)
jmp    16f1 <main+0x4d1>
mov    -0x20(%rbp),%rdi
call   10c0 <feof@plt>
cmp    $0x0,%rax
je     170d <main+0x4ed>
movw   $0x0,-0xe6(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <ferror@plt>
cmp    $0x0,%rax
je     1737 <main+0x517>
lea    0xa1c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movw   $0x0,-0xe6(%rbp)
movswl -0xe6(%rbp),%eax
cmp    $0x0,%eax
je     1760 <main+0x540>
movswl -0xe8(%rbp),%eax
cmp    $0x0,%eax
je     1760 <main+0x540>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1393 <main+0x173>
mov    -0x20(%rbp),%rdi
call   1070 <fclose@plt>
mov    -0x30(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x34(%rbp),%r8d
sub    -0x24(%rbp),%r8d
lea    0x9d5(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
cmpl   $0x0,-0x24(%rbp)
jle    1862 <main+0x642>
cvtsi2ssl -0x2c(%rbp),%xmm0
cvtsi2ssl -0x24(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18c(%rbp)
ff
mov    -0x3c(%rbp),%esi
lea    -0x4f(%rbp),%rdx
lea    0xa17(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x40(%rbp),%esi
lea    -0x5e(%rbp),%rdx
lea    0xa33(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xa54(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movss  -0x18c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xa56(%rip),%rdi
mov    $0x1,%al
call   1080 <printf@plt>
lea    0xa6d(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0xe4(%rbp)
cmpl   $0x1f,-0xe4(%rbp)
jge    185d <main+0x63d>
mov    -0xe4(%rbp),%esi
movslq -0xe4(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edx
lea    0xa4a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    181a <main+0x5fa>
jmp    1862 <main+0x642>
mov    $0x0,%al
call   1130 <txnstats_close@plt>
jmp    1888 <main+0x668>
lea    0xa23(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1894 <main+0x674>
jmp    188d <main+0x66d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
cmp    $0x2,%edi
jl     1268 <main+0x38>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xdb5(%rip),%rsi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     1565 <main+0x335>
mov    0x8(%rbx),%rdi
jmp    126f <main+0x3f>
lea    0xd91(%rip),%rdi
lea    0xd96(%rip),%rsi
call   1110 <fopen@plt>
test   %rax,%rax
je     18c8 <main+0x698>
mov    %rax,%rbx
xor    %r12d,%r12d
xor    %eax,%eax
call   1100 <txnstats_open@plt>
test   %rax,%rax
je     12ad <main+0x7d>
lea    0xf41(%rip),%rdi
call   1060 <puts@plt>
mov    $0x1,%r15d
jmp    18b3 <main+0x683>
movb   $0x0,0xc4(%rsp)
movb   $0x0,0xb5(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x9c(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
movw   $0x1,(%rsp)
lea    0xf3(%rsp),%r15
lea    0xe0(%rsp),%rbp
movl   $0x0,0x18(%rsp)
movl   $0x0,0x10(%rsp)
mov    $0x1,%r13w
movl   $0x0,0x4(%rsp)
movl   $0x0,0x14(%rsp)
xor    %r14d,%r14d
movl   $0x0,0xc(%rsp)
nop
mov    %rbp,%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     1520 <main+0x2f0>
mov    %rbp,%rdi
lea    0xcc2(%rip),%rsi
lea    0xd3(%rsp),%rbp
mov    %rbp,%rdx
lea    0x1c(%rsp),%rcx
call   10e0 <sscanf@plt>
movzwl %ax,%ecx
cmp    $0x80,%ecx
je     1470 <main+0x240>
cmp    $0x2,%ax
jne    1480 <main+0x250>
movb   $0x0,0x21(%rsp)
mov    %r15,%rdi
lea    0xc90(%rip),%rsi
call   1150 <strstr@plt>
test   %rax,%rax
je     149d <main+0x26d>
add    $0x4,%rax
lea    0x21(%rsp),%r15
mov    %r15,%rdi
mov    %rax,%rsi
mov    $0xe,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x2f(%rsp)
lea    0x1c(%rsp),%rdi
lea    0xc5d(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     14b4 <main+0x284>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1130 <txnstats_find_id@plt>
test   %eax,%eax
js     14ec <main+0x2bc>
mov    %eax,%ebp
cmp    $0x1e,%eax
ja     140c <main+0x1dc>
mov    %ebp,%eax
addl   $0x1,0x30(%rsp,%rax,4)
mov    0x8(%rsp),%eax
cmp    $0xffffffff,%eax
mov    0x4(%rsp),%ecx
je     141d <main+0x1ed>
cmp    %eax,%ebp
jge    1435 <main+0x205>
lea    0xc4(%rsp),%rdi
lea    0x21(%rsp),%rsi
call   1050 <strcpy@plt>
mov    0x4(%rsp),%ecx
mov    %ebp,%eax
add    %ebp,0xc(%rsp)
addl   $0x1,0x18(%rsp)
cmp    %ecx,%ebp
mov    %eax,0x8(%rsp)
jle    14f1 <main+0x2c1>
lea    0xb5(%rsp),%rdi
lea    0x21(%rsp),%rsi
call   1050 <strcpy@plt>
mov    %ebp,0x4(%rsp)
jmp    14f1 <main+0x2c1>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %r13d,%r13d
jmp    1520 <main+0x2f0>
nopl   0x0(%rax,%rax,1)
movswl %ax,%edx
lea    0x1(%r14),%esi
xor    %r13d,%r13d
lea    0xc00(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
jmp    1520 <main+0x2f0>
lea    0x1(%r14),%esi
xor    %r13d,%r13d
lea    0xbbe(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
jmp    1520 <main+0x2f0>
addl   $0x1,0x14(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
call   10f0 <txnstats_insert@plt>
movw   $0x1,(%rsp)
cmp    $0x1,%ax
je     14f1 <main+0x2c1>
mov    %rbp,%rsi
mov    %eax,%ebp
lea    0xb5e(%rip),%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %bp,(%rsp)
jmp    14f1 <main+0x2c1>
addl   $0x1,0x10(%rsp)
mov    $0x1,%bp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   10a0 <fgetc@plt>
cmp    $0xa,%al
cmove  %r12d,%ebp
test   %bp,%bp
jne    1500 <main+0x2d0>
lea    0xf3(%rsp),%r15
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   10d0 <feof@plt>
test   %rax,%rax
cmovne %r12d,%r13d
mov    %rbx,%rdi
call   1070 <ferror@plt>
test   %rax,%rax
jne    1579 <main+0x349>
test   %r13w,%r13w
setne  %al
cmpw   $0x0,(%rsp)
setne  %cl
and    %al,%cl
movzbl %cl,%eax
add    %eax,%r14d
test   %al,%al
lea    0xe0(%rsp),%rbp
jne    1340 <main+0x110>
jmp    1585 <main+0x355>
lea    0xcd0(%rip),%rdi
call   1060 <puts@plt>
xor    %r15d,%r15d
jmp    18b3 <main+0x683>
lea    0xca5(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
call   1080 <fclose@plt>
mov    0x18(%rsp),%ebx
mov    0x14(%rsp),%r8d
sub    %ebx,%r8d
lea    0xb17(%rip),%rdi
xor    %r15d,%r15d
mov    %r14d,%esi
mov    %ebx,%edx
mov    0x10(%rsp),%ecx
xor    %eax,%eax
call   1090 <printf@plt>
test   %ebx,%ebx
jle    18ac <main+0x67c>
mov    0xc(%rsp),%ebp
cvtsi2ss %ebp,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
lea    0xb54(%rip),%rdi
lea    0xc4(%rsp),%rdx
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xb6b(%rip),%rdi
lea    0xb5(%rsp),%rdx
mov    0x4(%rsp),%esi
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xb83(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1090 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb86(%rip),%rdi
mov    $0x1,%al
call   1090 <printf@plt>
lea    0xbdb(%rip),%rdi
call   1060 <puts@plt>
mov    0x30(%rsp),%edx
lea    0xb8d(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x34(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x38(%rsp),%edx
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x3c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x40(%rsp),%edx
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x44(%rsp),%edx
mov    %rbp,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x48(%rsp),%edx
mov    %rbp,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x4c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x50(%rsp),%edx
mov    %rbp,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x54(%rsp),%edx
mov    %rbp,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x58(%rsp),%edx
mov    %rbp,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x5c(%rsp),%edx
mov    %rbp,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x60(%rsp),%edx
mov    %rbp,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x64(%rsp),%edx
mov    %rbp,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x68(%rsp),%edx
mov    %rbp,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x6c(%rsp),%edx
mov    %rbp,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x70(%rsp),%edx
mov    %rbp,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x74(%rsp),%edx
mov    %rbp,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x78(%rsp),%edx
mov    %rbp,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x7c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x80(%rsp),%edx
mov    %rbp,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x84(%rsp),%edx
mov    %rbp,%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x88(%rsp),%edx
mov    %rbp,%rdi
mov    $0x16,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x8c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x17,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x90(%rsp),%edx
mov    %rbp,%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x94(%rsp),%edx
mov    %rbp,%rdi
mov    $0x19,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x98(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1a,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x9c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1b,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0xa0(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0xa4(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1d,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0xa8(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1140 <txnstats_close@plt>
mov    %r15d,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x73f(%rip),%rdi
call   1120 <perror@plt>
xor    %r15d,%r15d
jmp    18b3 <main+0x683>

LLVM IR (-O0):
@.str = [9 x i8] c"data.txt\00"
@.str.1 = [3 x i8] c"-h\00"
@.str.2 = [140 x i8] c"Usage: report: [OPTION] [FILE]\0AGenerate a report for log file FILE. If filename is not specified, data.txt is used.\0A-h print help message.\0A\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [23 x i8] c"Error opening log file\00"
@.str.5 = [11 x i8] c"@{%12s$%4s\00"
@.str.6 = [5 x i8] c"|MSN\00"
@.str.7 = [5 x i8] c"RQMS\00"
@.str.8 = [47 x i8] c" Error inserting request timestamp %s, id %s.\0A\00"
@.str.9 = [40 x i8] c" could not find MSN field on record %d\0A\00"
@.str.10 = [38 x i8] c" bad read at line %d. numfields = %d\0A\00"
@.str.11 = [24 x i8] c"ferror reading logfile\0A\00"
@.str.12 = [119 x i8] c"Processed:\0A%d records\0A%d complete transactions\0A%d responses were missing requests\0A%d requests were missing responses\0A\0A\00"
@.str.13 = [49 x i8] c" Minimum response time: %d seconds (txn id: %s)\0A\00"
@.str.14 = [50 x i8] c" Maximum response time: %d seconds (txn id: %s)\0A\0A\00"
@.str.15 = [28 x i8] c" Total elapsed seconds: %d\0A\00"
@.str.16 = [37 x i8] c" Average response time: %f seconds\0A\0A\00"
@.str.17 = [22 x i8] c"Response Time | Txns\0A\00"
@.str.18 = [12 x i8] c"%13d %4d\0A\00"
@.str.19 = [51 x i8] c"Could not allocate transaction search structures.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca [15 x i8]
%17 = alloca [15 x i8]
%18 = alloca [31 x i32]
%19 = alloca i32
%20 = alloca i16
%21 = alloca i16
%22 = alloca [13 x i8]
%23 = alloca [5 x i8]
%24 = alloca [100 x i8]
%25 = alloca i16
%26 = alloca [15 x i8]
%27 = alloca i8*
%28 = alloca i32
%29 = alloca i16
%30 = alloca i8
%31 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %6
%32 = load i32, i32* %4
%33 = icmp sgt i32 %32, 1
br i1 %33, label %34, label %47
34: ; preds = %2
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %34
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %292
42: ; preds = %34
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
store i8* %45, i8** %6
br label %46
46: ; preds = %42
br label %47
47: ; preds = %46, %2
%48 = load i32, i32* %4
%49 = icmp sgt i32 %48, 1
br i1 %49, label %50, label %54
50: ; preds = %47
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
br label %56
54: ; preds = %47
%55 = load i8*, i8** %6
br label %56
56: ; preds = %54, %50
%57 = phi i8* [ %53, %50 ], [ %55, %54 ]
%58 = call i32* @fopen(i8* %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %58, i32** %7
%59 = load i32*, i32** %7
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %63
61: ; preds = %56
%62 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %291
63: ; preds = %56
%64 = call i64 (...) @txnstats_open()
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %288
66: ; preds = %63
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 -1, i32* %14
store i32 0, i32* %15
%67 = getelementptr inbounds [15 x i8], [15 x i8]* %16, i64 0, i64 0
store i8 0, i8* %67
%68 = getelementptr inbounds [15 x i8], [15 x i8]* %17, i64 0, i64 0
store i8 0, i8* %68
store i32 0, i32* %19
br label %69
69: ; preds = %76, %66
%70 = load i32, i32* %19
%71 = icmp slt i32 %70, 31
br i1 %71, label %72, label %79
72: ; preds = %69
%73 = load i32, i32* %19
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [31 x i32], [31 x i32]* %18, i64 0, i64 %74
store i32 0, i32* %75
br label %76
76: ; preds = %72
%77 = load i32, i32* %19
%78 = add nsw i32 %77, 1
store i32 %78, i32* %19
br label %69
79: ; preds = %69
store i16 1, i16* %20
store i16 1, i16* %21
br label %80
80: ; preds = %241, %79
%81 = load i16, i16* %20
%82 = sext i16 %81 to i32
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %88
84: ; preds = %80
%85 = load i16, i16* %21
%86 = sext i16 %85 to i32
%87 = icmp ne i32 %86, 0
br label %88
88: ; preds = %84, %80
%89 = phi i1 [ false, %80 ], [ %87, %84 ]
br i1 %89, label %90, label %242
90: ; preds = %88
%91 = getelementptr inbounds [100 x i8], [100 x i8]* %24, i64 0, i64 0
%92 = load i32*, i32** %7
%93 = call i32* @fgets(i8* %91, i32 100, i32* %92)
%94 = icmp ne i32* %93, null
br i1 %94, label %95, label %219
95: ; preds = %90
%96 = getelementptr inbounds [100 x i8], [100 x i8]* %24, i64 0, i64 0
%97 = getelementptr inbounds [13 x i8], [13 x i8]* %22, i64 0, i64 0
%98 = getelementptr inbounds [5 x i8], [5 x i8]* %23, i64 0, i64 0
%99 = call signext i16 @sscanf(i8* %96, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %97, i8* %98)
store i16 %99, i16* %25
%100 = load i16, i16* %25
%101 = sext i16 %100 to i32
%102 = icmp eq i32 %101, 2
br i1 %102, label %103, label %207
103: ; preds = %95
%104 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 0
store i8 0, i8* %104
%105 = getelementptr inbounds [100 x i8], [100 x i8]* %24, i64 0, i64 19
%106 = call i8* @strstr(i8* %105, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
store i8* %106, i8** %27
%107 = load i8*, i8** %27
%108 = icmp ne i8* %107, null
br i1 %108, label %109, label %202
109: ; preds = %103
%110 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 0
%111 = load i8*, i8** %27
%112 = getelementptr inbounds i8, i8* %111, i64 4
%113 = call i32 @strncpy(i8* %110, i8* %112, i32 14)
%114 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 14
store i8 0, i8* %114
%115 = getelementptr inbounds [5 x i8], [5 x i8]* %23, i64 0, i64 0
%116 = call i64 @strncmp(i8* %115, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%117 = icmp eq i64 0, %116
br i1 %117, label %118, label %131
118: ; preds = %109
%119 = load i32, i32* %12
%120 = add nsw i32 %119, 1
store i32 %120, i32* %12
%121 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 0
%122 = getelementptr inbounds [13 x i8], [13 x i8]* %22, i64 0, i64 0
%123 = call signext i16 @txnstats_insert(i8* %121, i8* %122)
store i16 %123, i16* %21
%124 = sext i16 %123 to i32
%125 = icmp ne i32 1, %124
br i1 %125, label %126, label %130
126: ; preds = %118
%127 = getelementptr inbounds [13 x i8], [13 x i8]* %22, i64 0, i64 0
%128 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 0
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i8* %127, i8* %128)
br label %130
130: ; preds = %126, %118
br label %182
131: ; preds = %109
%132 = load i32, i32* %13
%133 = add nsw i32 %132, 1
store i32 %133, i32* %13
%134 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 0
%135 = getelementptr inbounds [13 x i8], [13 x i8]* %22, i64 0, i64 0
%136 = call i32 @txnstats_find_id(i8* %134, i8* %135)
store i32 %136, i32* %28
%137 = load i32, i32* %28
%138 = icmp sge i32 %137, 0
br i1 %138, label %139, label %178
139: ; preds = %131
%140 = load i32, i32* %28
%141 = load i32, i32* %10
%142 = add nsw i32 %141, %140
store i32 %142, i32* %10
%143 = load i32, i32* %8
%144 = add nsw i32 %143, 1
store i32 %144, i32* %8
%145 = load i32, i32* %28
%146 = icmp sge i32 %145, 0
br i1 %146, label %147, label %156
147: ; preds = %139
%148 = load i32, i32* %28
%149 = icmp sle i32 %148, 30
br i1 %149, label %150, label %156
150: ; preds = %147
%151 = load i32, i32* %28
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [31 x i32], [31 x i32]* %18, i64 0, i64 %152
%154 = load i32, i32* %153
%155 = add nsw i32 %154, 1
store i32 %155, i32* %153
br label %156
156: ; preds = %150, %147, %139
%157 = load i32, i32* %14
%158 = icmp eq i32 %157, -1
br i1 %158, label %163, label %159
159: ; preds = %156
%160 = load i32, i32* %28
%161 = load i32, i32* %14
%162 = icmp slt i32 %160, %161
br i1 %162, label %163, label %168
163: ; preds = %159, %156
%164 = load i32, i32* %28
store i32 %164, i32* %14
%165 = getelementptr inbounds [15 x i8], [15 x i8]* %16, i64 0, i64 0
%166 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 0
%167 = call i32 @strcpy(i8* %165, i8* %166)
br label %168
168: ; preds = %163, %159
%169 = load i32, i32* %28
%170 = load i32, i32* %15
%171 = icmp sgt i32 %169, %170
br i1 %171, label %172, label %177
172: ; preds = %168
%173 = load i32, i32* %28
store i32 %173, i32* %15
%174 = getelementptr inbounds [15 x i8], [15 x i8]* %17, i64 0, i64 0
%175 = getelementptr inbounds [15 x i8], [15 x i8]* %26, i64 0, i64 0
%176 = call i32 @strcpy(i8* %174, i8* %175)
br label %177
177: ; preds = %172, %168
br label %181
178: ; preds = %131
%179 = load i32, i32* %9
%180 = add nsw i32 %179, 1
store i32 %180, i32* %9
br label %181
181: ; preds = %178, %177
br label %182
182: ; preds = %181, %130
store i16 1, i16* %29
br label %183
183: ; preds = %200, %182
%184 = load i16, i16* %29
%185 = sext i16 %184 to i32
%186 = icmp ne i32 %185, 0
br i1 %186, label %187, label %192
187: ; preds = %183
%188 = load i32*, i32** %7
%189 = call signext i8 @fgetc(i32* %188)
store i8 %189, i8* %30
%190 = sext i8 %189 to i32
%191 = icmp ne i32 %190, 128
br label %192
192: ; preds = %187, %183
%193 = phi i1 [ false, %183 ], [ %191, %187 ]
br i1 %193, label %194, label %201
194: ; preds = %192
%195 = load i8, i8* %30
%196 = sext i8 %195 to i32
switch i32 %196, label %199 [
i32 128, label %197
i32 10, label %198
]
197: ; preds = %194
store i16 0, i16* %20
store i16 0, i16* %29
br label %200
198: ; preds = %194
store i16 0, i16* %29
br label %200
199: ; preds = %194
br label %200
200: ; preds = %199, %198, %197
br label %183
201: ; preds = %192
br label %206
202: ; preds = %103
%203 = load i32, i32* %11
%204 = add nsw i32 %203, 1
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %204)
store i16 0, i16* %20
br label %206
206: ; preds = %202, %201
br label %218
207: ; preds = %95
%208 = load i16, i16* %25
%209 = sext i16 %208 to i32
%210 = icmp ne i32 %209, 128
br i1 %210, label %211, label %217
211: ; preds = %207
%212 = load i32, i32* %11
%213 = add nsw i32 %212, 1
%214 = load i16, i16* %25
%215 = sext i16 %214 to i32
%216 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %213, i32 %215)
br label %217
217: ; preds = %211, %207
store i16 0, i16* %20
br label %218
218: ; preds = %217, %206
br label %219
219: ; preds = %218, %90
%220 = load i32*, i32** %7
%221 = call i64 @feof(i32* %220)
%222 = icmp ne i64 %221, 0
br i1 %222, label %223, label %224
223: ; preds = %219
store i16 0, i16* %20
br label %224
224: ; preds = %223, %219
%225 = load i32*, i32** %7
%226 = call i64 @ferror(i32* %225)
%227 = icmp ne i64 %226, 0
br i1 %227, label %228, label %230
228: ; preds = %224
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
store i16 0, i16* %20
br label %230
230: ; preds = %228, %224
%231 = load i16, i16* %20
%232 = sext i16 %231 to i32
%233 = icmp ne i32 %232, 0
br i1 %233, label %234, label %241
234: ; preds = %230
%235 = load i16, i16* %21
%236 = sext i16 %235 to i32
%237 = icmp ne i32 %236, 0
br i1 %237, label %238, label %241
238: ; preds = %234
%239 = load i32, i32* %11
%240 = add nsw i32 %239, 1
store i32 %240, i32* %11
br label %241
241: ; preds = %238, %234, %230
br label %80
242: ; preds = %88
%243 = load i32*, i32** %7
%244 = call i32 @fclose(i32* %243)
%245 = load i32, i32* %11
%246 = load i32, i32* %8
%247 = load i32, i32* %9
%248 = load i32, i32* %12
%249 = load i32, i32* %8
%250 = sub nsw i32 %248, %249
%251 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str.12, i64 0, i64 0), i32 %245, i32 %246, i32 %247, i32 %250)
%252 = load i32, i32* %8
%253 = icmp sgt i32 %252, 0
br i1 %253, label %254, label %286
254: ; preds = %242
%255 = load i32, i32* %10
%256 = sitofp i32 %255 to float
%257 = load i32, i32* %8
%258 = sitofp i32 %257 to float
%259 = fdiv float %256, %258
store float %259, float* %31
%260 = load i32, i32* %14
%261 = getelementptr inbounds [15 x i8], [15 x i8]* %16, i64 0, i64 0
%262 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0), i32 %260, i8* %261)
%263 = load i32, i32* %15
%264 = getelementptr inbounds [15 x i8], [15 x i8]* %17, i64 0, i64 0
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0), i32 %263, i8* %264)
%266 = load i32, i32* %10
%267 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0), i32 %266)
%268 = load float, float* %31
%269 = fpext float %268 to double
%270 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.16, i64 0, i64 0), double %269)
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0))
store i32 0, i32* %19
br label %272
272: ; preds = %282, %254
%273 = load i32, i32* %19
%274 = icmp slt i32 %273, 31
br i1 %274, label %275, label %285
275: ; preds = %272
%276 = load i32, i32* %19
%277 = load i32, i32* %19
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [31 x i32], [31 x i32]* %18, i64 0, i64 %278
%280 = load i32, i32* %279
%281 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 %276, i32 %280)
br label %282
282: ; preds = %275
%283 = load i32, i32* %19
%284 = add nsw i32 %283, 1
store i32 %284, i32* %19
br label %272
285: ; preds = %272
br label %286
286: ; preds = %285, %242
%287 = call i32 (...) @txnstats_close()
br label %290
288: ; preds = %63
%289 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.19, i64 0, i64 0))
store i32 1, i32* %3
br label %292
290: ; preds = %286
br label %291
291: ; preds = %290, %61
store i32 0, i32* %3
br label %292
292: ; preds = %291, %288, %40
%293 = load i32, i32* %3
ret i32 %293
}

LLVM IR (-O2):
@.str = [9 x i8] c"data.txt\00"
@.str.1 = [3 x i8] c"-h\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [23 x i8] c"Error opening log file\00"
@.str.5 = [11 x i8] c"@{%12s$%4s\00"
@.str.6 = [5 x i8] c"|MSN\00"
@.str.7 = [5 x i8] c"RQMS\00"
@.str.8 = [47 x i8] c" Error inserting request timestamp %s, id %s.\0A\00"
@.str.9 = [40 x i8] c" could not find MSN field on record %d\0A\00"
@.str.10 = [38 x i8] c" bad read at line %d. numfields = %d\0A\00"
@.str.12 = [119 x i8] c"Processed:\0A%d records\0A%d complete transactions\0A%d responses were missing requests\0A%d requests were missing responses\0A\0A\00"
@.str.13 = [49 x i8] c" Minimum response time: %d seconds (txn id: %s)\0A\00"
@.str.14 = [50 x i8] c" Maximum response time: %d seconds (txn id: %s)\0A\0A\00"
@.str.15 = [28 x i8] c" Total elapsed seconds: %d\0A\00"
@.str.16 = [37 x i8] c" Average response time: %f seconds\0A\0A\00"
@.str.18 = [12 x i8] c"%13d %4d\0A\00"
@str = [50 x i8] c"Could not allocate transaction search structures.\00"
@str.20 = [21 x i8] c"Response Time | Txns\00"
@str.21 = [23 x i8] c"ferror reading logfile\00"
@str.22 = [139 x i8] c"Usage: report: [OPTION] [FILE]\0AGenerate a report for log file FILE. If filename is not specified, data.txt is used.\0A-h print help message.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [15 x i8]
%4 = alloca [15 x i8]
%5 = alloca [31 x i32]
%6 = bitcast [31 x i32]* %5 to i8*
%7 = alloca [13 x i8]
%8 = alloca [5 x i8]
%9 = alloca [100 x i8]
%10 = alloca [15 x i8]
%11 = icmp sgt i32 %0, 1
br i1 %11, label %12, label %21
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([139 x i8], [139 x i8]* @str.22, i64 0, i64 0))
br label %257
19: ; preds = %12
%20 = load i8*, i8** %13
br label %21
21: ; preds = %2, %19
%22 = phi i8* [ %20, %19 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %2 ]
%23 = tail call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = tail call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %257
27: ; preds = %21
%28 = tail call i64 (...) @txnstats_open()
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %255
30: ; preds = %27
%31 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%32 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
store i8 0, i8* %31
store i8 0, i8* %32
%33 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%34 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%36 = getelementptr inbounds [15 x i8], [15 x i8]* %10, i64 0, i64 0
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 19
%38 = getelementptr inbounds [15 x i8], [15 x i8]* %10, i64 0, i64 14
br label %39
39: ; preds = %30, %138
%40 = phi i32 [ 0, %30 ], [ %130, %138 ]
%41 = phi i32 [ 0, %30 ], [ %129, %138 ]
%42 = phi i16 [ 1, %30 ], [ %128, %138 ]
%43 = phi i16 [ 1, %30 ], [ %133, %138 ]
%44 = phi i32 [ 0, %30 ], [ %126, %138 ]
%45 = phi i32 [ -1, %30 ], [ %125, %138 ]
%46 = phi i32 [ 0, %30 ], [ %124, %138 ]
%47 = phi i32 [ 0, %30 ], [ %143, %138 ]
%48 = phi i32 [ 0, %30 ], [ %123, %138 ]
%49 = call i32* @fgets(i8* %35, i32 100, i32* %23)
%50 = icmp eq i32* %49, null
br i1 %50, label %122, label %51
51: ; preds = %39
%52 = call signext i16 @sscanf(i8* %35, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %33, i8* %34)
switch i16 %52, label %118 [
i16 2, label %53
i16 128, label %122
]
53: ; preds = %51
store i8 0, i8* %36
%54 = call i8* @strstr(i8* %37, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%55 = icmp eq i8* %54, null
br i1 %55, label %106, label %56
56: ; preds = %53
%57 = getelementptr inbounds i8, i8* %54, i64 4
%58 = call i32 @strncpy(i8* %36, i8* %57, i32 14)
store i8 0, i8* %38
%59 = call i64 @strncmp(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %67
61: ; preds = %56
%62 = add nsw i32 %46, 1
%63 = call signext i16 @txnstats_insert(i8* %36, i8* %33)
%64 = icmp eq i16 %63, 1
br i1 %64, label %92, label %65
65: ; preds = %61
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i8* %33, i8* %36)
br label %92
67: ; preds = %56
%68 = call i32 @txnstats_find_id(i8* %36, i8* %33)
%69 = icmp sgt i32 %68, -1
br i1 %69, label %70, label %90
70: ; preds = %67
%71 = add nsw i32 %68, %48
%72 = add nsw i32 %40, 1
%73 = icmp ult i32 %68, 31
br i1 %73, label %74, label %79
74: ; preds = %70
%75 = zext i32 %68 to i64
%76 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 %75
%77 = load i32, i32* %76
%78 = add nsw i32 %77, 1
store i32 %78, i32* %76
br label %79
79: ; preds = %74, %70
%80 = icmp eq i32 %45, -1
%81 = icmp slt i32 %68, %45
%82 = select i1 %80, i1 true, i1 %81
br i1 %82, label %83, label %85
83: ; preds = %79
%84 = call i32 @strcpy(i8* %31, i8* %36)
br label %85
85: ; preds = %79, %83
%86 = phi i32 [ %68, %83 ], [ %45, %79 ]
%87 = icmp sgt i32 %68, %44
br i1 %87, label %88, label %92
88: ; preds = %85
%89 = call i32 @strcpy(i8* %32, i8* %36)
br label %92
90: ; preds = %67
%91 = add nsw i32 %41, 1
br label %92
92: ; preds = %90, %88, %85, %61, %65
%93 = phi i32 [ %48, %65 ], [ %48, %61 ], [ %71, %88 ], [ %71, %85 ], [ %48, %90 ]
%94 = phi i32 [ %62, %65 ], [ %62, %61 ], [ %46, %88 ], [ %46, %85 ], [ %46, %90 ]
%95 = phi i32 [ %45, %65 ], [ %45, %61 ], [ %86, %88 ], [ %86, %85 ], [ %45, %90 ]
%96 = phi i32 [ %44, %65 ], [ %44, %61 ], [ %68, %88 ], [ %44, %85 ], [ %44, %90 ]
%97 = phi i16 [ %63, %65 ], [ 1, %61 ], [ %42, %88 ], [ %42, %85 ], [ %42, %90 ]
%98 = phi i32 [ %41, %65 ], [ %41, %61 ], [ %41, %88 ], [ %41, %85 ], [ %91, %90 ]
%99 = phi i32 [ %40, %65 ], [ %40, %61 ], [ %72, %88 ], [ %72, %85 ], [ %40, %90 ]
br label %100
100: ; preds = %92, %100
%101 = phi i16 [ 1, %92 ], [ %104, %100 ]
%102 = call signext i8 @fgetc(i32* %23)
%103 = icmp eq i8 %102, 10
%104 = select i1 %103, i16 0, i16 %101
%105 = icmp eq i16 %104, 0
br i1 %105, label %109, label %100
106: ; preds = %53
%107 = add nuw nsw i32 %47, 1
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %107)
br label %109
109: ; preds = %100, %106
%110 = phi i32 [ %48, %106 ], [ %93, %100 ]
%111 = phi i32 [ %46, %106 ], [ %94, %100 ]
%112 = phi i32 [ %45, %106 ], [ %95, %100 ]
%113 = phi i32 [ %44, %106 ], [ %96, %100 ]
%114 = phi i16 [ 0, %106 ], [ %43, %100 ]
%115 = phi i16 [ %42, %106 ], [ %97, %100 ]
%116 = phi i32 [ %41, %106 ], [ %98, %100 ]
%117 = phi i32 [ %40, %106 ], [ %99, %100 ]
br label %122
118: ; preds = %51
%119 = sext i16 %52 to i32
%120 = add nuw nsw i32 %47, 1
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %120, i32 %119)
br label %122
122: ; preds = %109, %51, %118, %39
%123 = phi i32 [ %48, %39 ], [ %110, %109 ], [ %48, %51 ], [ %48, %118 ]
%124 = phi i32 [ %46, %39 ], [ %111, %109 ], [ %46, %51 ], [ %46, %118 ]
%125 = phi i32 [ %45, %39 ], [ %112, %109 ], [ %45, %51 ], [ %45, %118 ]
%126 = phi i32 [ %44, %39 ], [ %113, %109 ], [ %44, %51 ], [ %44, %118 ]
%127 = phi i16 [ %43, %39 ], [ %114, %109 ], [ 0, %51 ], [ 0, %118 ]
%128 = phi i16 [ %42, %39 ], [ %115, %109 ], [ %42, %51 ], [ %42, %118 ]
%129 = phi i32 [ %41, %39 ], [ %116, %109 ], [ %41, %51 ], [ %41, %118 ]
%130 = phi i32 [ %40, %39 ], [ %117, %109 ], [ %40, %51 ], [ %40, %118 ]
%131 = call i64 @feof(i32* %23)
%132 = icmp eq i64 %131, 0
%133 = select i1 %132, i16 %127, i16 0
%134 = call i64 @ferror(i32* %23)
%135 = icmp eq i64 %134, 0
br i1 %135, label %138, label %136
136: ; preds = %122
%137 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.21, i64 0, i64 0))
br label %144
138: ; preds = %122
%139 = icmp ne i16 %133, 0
%140 = icmp ne i16 %128, 0
%141 = select i1 %139, i1 %140, i1 false
%142 = zext i1 %141 to i32
%143 = add nuw nsw i32 %47, %142
br i1 %141, label %39, label %144
144: ; preds = %138, %136
%145 = phi i32 [ %47, %136 ], [ %143, %138 ]
%146 = call i32 @fclose(i32* %23)
%147 = sub nsw i32 %124, %130
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([119 x i8], [119 x i8]* @.str.12, i64 0, i64 0), i32 %145, i32 %130, i32 %129, i32 %147)
%149 = icmp sgt i32 %130, 0
br i1 %149, label %150, label %253
150: ; preds = %144
%151 = sitofp i32 %123 to float
%152 = sitofp i32 %130 to float
%153 = fdiv float %151, %152
%154 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0), i32 %125, i8* %31)
%155 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0), i32 %126, i8* %32)
%156 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0), i32 %123)
%157 = fpext float %153 to double
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.16, i64 0, i64 0), double %157)
%159 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.20, i64 0, i64 0))
%160 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 0
%161 = load i32, i32* %160
%162 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 0, i32 %161)
%163 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 1
%164 = load i32, i32* %163
%165 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 1, i32 %164)
%166 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 2
%167 = load i32, i32* %166
%168 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 2, i32 %167)
%169 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 3
%170 = load i32, i32* %169
%171 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 3, i32 %170)
%172 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 4
%173 = load i32, i32* %172
%174 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 4, i32 %173)
%175 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 5
%176 = load i32, i32* %175
%177 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 5, i32 %176)
%178 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 6
%179 = load i32, i32* %178
%180 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 6, i32 %179)
%181 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 7
%182 = load i32, i32* %181
%183 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 7, i32 %182)
%184 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 8
%185 = load i32, i32* %184
%186 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 8, i32 %185)
%187 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 9
%188 = load i32, i32* %187
%189 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 9, i32 %188)
%190 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 10
%191 = load i32, i32* %190
%192 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 10, i32 %191)
%193 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 11
%194 = load i32, i32* %193
%195 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 11, i32 %194)
%196 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 12
%197 = load i32, i32* %196
%198 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 12, i32 %197)
%199 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 13
%200 = load i32, i32* %199
%201 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 13, i32 %200)
%202 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 14
%203 = load i32, i32* %202
%204 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 14, i32 %203)
%205 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 15
%206 = load i32, i32* %205
%207 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 15, i32 %206)
%208 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 16
%209 = load i32, i32* %208
%210 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 16, i32 %209)
%211 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 17
%212 = load i32, i32* %211
%213 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 17, i32 %212)
%214 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 18
%215 = load i32, i32* %214
%216 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 18, i32 %215)
%217 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 19
%218 = load i32, i32* %217
%219 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 19, i32 %218)
%220 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 20
%221 = load i32, i32* %220
%222 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 20, i32 %221)
%223 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 21
%224 = load i32, i32* %223
%225 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 21, i32 %224)
%226 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 22
%227 = load i32, i32* %226
%228 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 22, i32 %227)
%229 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 23
%230 = load i32, i32* %229
%231 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 23, i32 %230)
%232 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 24
%233 = load i32, i32* %232
%234 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 24, i32 %233)
%235 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 25
%236 = load i32, i32* %235
%237 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 25, i32 %236)
%238 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 26
%239 = load i32, i32* %238
%240 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 26, i32 %239)
%241 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 27
%242 = load i32, i32* %241
%243 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 27, i32 %242)
%244 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 28
%245 = load i32, i32* %244
%246 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 28, i32 %245)
%247 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 29
%248 = load i32, i32* %247
%249 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 29, i32 %248)
%250 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 30
%251 = load i32, i32* %250
%252 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 30, i32 %251)
br label %253
253: ; preds = %150, %144
%254 = call i32 (...) @txnstats_close()
br label %257
255: ; preds = %27
%256 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
br label %257
257: ; preds = %25, %253, %255, %17
%258 = phi i32 [ 0, %17 ], [ 1, %255 ], [ 0, %253 ], [ 0, %25 ]
ret i32 %258
}