#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 scalar_t__ time_t;
struct stat {
  scalar_t__ st_mtime;
};
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(char *);
scalar_t__ fstat(int /*<<< orphan*/, struct stat *);
char *getenv(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
char *strdup(char *);
int /*<<< orphan*/ strlen(char *);
int AwSensorFromFile(char *fdata, time_t *last, char *tbcur[], char *tbdel[],
                     char *tbnew[]) {
  char *tbfil[50];
  FILE *f;
  char *pt;
  char file[512];
  char buf[512];
  int i;
  int nbfil = 0;
  int nbnew = 0;
  int nbdel = 0;
  struct stat st;
  for (i = 0; i < 50; i++) {
    tbfil[i] = NULL;
    tbnew[i] = NULL;
    tbdel[i] = NULL;
  }
  pt = getenv("AW_DATA_DIR");
  if (!pt || !*pt) {
    return -1;
  }
  sprintf(file, "%s/%s", pt, fdata);
  f = fopen(file, "r");
  if (!f) {
    return 0;
  }
  if (last) {
    if (fstat(fileno(f), &st) < 0) {
      fclose(f);
      return -2;
    }
    if (st.st_mtime == *last) {
      fclose(f);
      return 0;
    }
    *last = st.st_mtime;
  }
  nbfil = 0;
  nbnew = 0;
  while (fgets(buf, sizeof(buf) - 1, f) && nbfil < 50) {
    int found;
    if (!strlen(buf))
      continue;
    if (buf[0] == '#')
      continue;
    pt = strchr(buf, '\n');
    if (pt)
      *pt = '\0';
    pt = strchr(buf, '\r');
    if (pt)
      *pt = '\0';
    tbfil[nbfil++] = strdup(buf);
    found = 0;
    for (i = 0; tbcur[i] && i < 50; i++) {
      if (strcmp(buf, tbcur[i]) == 0) {
        found = 1;
        break;
      }
    }
    if (!found) {
      tbnew[nbnew++] = strdup(buf);
    }
  }
  for (i = 0; tbcur[i] && i < 50; i++) {
    int found;
    int j;
    found = 0;
    for (j = 0; tbfil[j] && j < 50; j++) {
      if (strcmp(tbcur[i], tbfil[j]) == 0) {
        found = 1;
        break;
      }
    }
    if (!found) {
      tbdel[nbdel++] = strdup(tbcur[i]);
    }
  }
  for (i = 0; i < 50; i++) {
    if (tbfil[i])
      free(tbfil[i]);
  }
  fclose(f);
  return nbdel + nbnew;
}


x86 assembly (clang, -O0):
<AwSensorFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x600,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
movl   $0x0,-0x5d8(%rbp)
movl   $0x0,-0x5dc(%rbp)
movl   $0x0,-0x5e0(%rbp)
movl   $0x0,-0x5d4(%rbp)
cmpl   $0x32,-0x5d4(%rbp)
jge    1261 <AwSensorFromFile+0xa1>
movslq -0x5d4(%rbp),%rax
movq   $0x0,-0x1c0(%rbp,%rax,8)
mov    -0x30(%rbp),%rax
movslq -0x5d4(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x5d4(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x5d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5d4(%rbp)
jmp    1207 <AwSensorFromFile+0x47>
lea    0xd98(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x1d0(%rbp)
cmpq   $0x0,-0x1d0(%rbp)
je     1292 <AwSensorFromFile+0xd2>
mov    -0x1d0(%rbp),%rax
cmpb   $0x0,(%rax)
jne    129e <AwSensorFromFile+0xde>
movl   $0xffffffff,-0x4(%rbp)
jmp    1730 <AwSensorFromFile+0x570>
lea    -0x3d0(%rbp),%rdi
mov    -0x1d0(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xd55(%rip),%rsi
call   10c0 <sprintf@plt>
lea    -0x3d0(%rbp),%rdi
lea    0xd48(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x1c8(%rbp)
cmpq   $0x0,-0x1c8(%rbp)
jne    12f0 <AwSensorFromFile+0x130>
movl   $0x0,-0x4(%rbp)
jmp    1730 <AwSensorFromFile+0x570>
cmpq   $0x0,-0x18(%rbp)
je     1371 <AwSensorFromFile+0x1b1>
mov    -0x1c8(%rbp),%rdi
call   10a0 <fileno@plt>
mov    %eax,%edi
lea    -0x5e8(%rbp),%rsi
call   10e0 <fstat@plt>
cmp    $0x0,%rax
jge    1337 <AwSensorFromFile+0x177>
mov    -0x1c8(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1730 <AwSensorFromFile+0x570>
mov    -0x5e8(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jne    1363 <AwSensorFromFile+0x1a3>
mov    -0x1c8(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    1730 <AwSensorFromFile+0x570>
mov    -0x5e8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x5d8(%rbp)
movl   $0x0,-0x5dc(%rbp)
lea    -0x5d0(%rbp),%rdi
mov    -0x1c8(%rbp),%rdx
mov    $0x1ff,%esi
call   1080 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5f5(%rbp)
je     13c2 <AwSensorFromFile+0x202>
cmpl   $0x32,-0x5d8(%rbp)
setl   %al
mov    %al,-0x5f5(%rbp)
mov    -0x5f5(%rbp),%al
test   $0x1,%al
jne    13d5 <AwSensorFromFile+0x215>
jmp    156d <AwSensorFromFile+0x3ad>
lea    -0x5d0(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x0,%eax
jne    13ef <AwSensorFromFile+0x22f>
jmp    1385 <AwSensorFromFile+0x1c5>
movsbl -0x5d0(%rbp),%eax
cmp    $0x23,%eax
jne    1404 <AwSensorFromFile+0x244>
jmp    1385 <AwSensorFromFile+0x1c5>
lea    -0x5d0(%rbp),%rdi
mov    $0xa,%esi
call   1070 <strchr@plt>
mov    %rax,-0x1d0(%rbp)
cmpq   $0x0,-0x1d0(%rbp)
je     1434 <AwSensorFromFile+0x274>
mov    -0x1d0(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x5d0(%rbp),%rdi
mov    $0xd,%esi
call   1070 <strchr@plt>
mov    %rax,-0x1d0(%rbp)
cmpq   $0x0,-0x1d0(%rbp)
je     1464 <AwSensorFromFile+0x2a4>
mov    -0x1d0(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x5d0(%rbp),%rdi
call   10d0 <strdup@plt>
mov    %rax,%rcx
mov    -0x5d8(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x5d8(%rbp)
cltq
mov    %rcx,-0x1c0(%rbp,%rax,8)
ff
movl   $0x0,-0x5ec(%rbp)
movl   $0x0,-0x5d4(%rbp)
mov    -0x20(%rbp),%rcx
movslq -0x5d4(%rbp),%rdx
xor    %eax,%eax
cmpq   $0x0,(%rcx,%rdx,8)
mov    %al,-0x5f6(%rbp)
je     14d0 <AwSensorFromFile+0x310>
cmpl   $0x32,-0x5d4(%rbp)
setl   %al
mov    %al,-0x5f6(%rbp)
mov    -0x5f6(%rbp),%al
test   $0x1,%al
jne    14e3 <AwSensorFromFile+0x323>
jmp    1530 <AwSensorFromFile+0x370>
lea    -0x5d0(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x5d4(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1517 <AwSensorFromFile+0x357>
movl   $0x1,-0x5ec(%rbp)
jmp    1530 <AwSensorFromFile+0x370>
jmp    151c <AwSensorFromFile+0x35c>
mov    -0x5d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5d4(%rbp)
jmp    14a2 <AwSensorFromFile+0x2e2>
cmpl   $0x0,-0x5ec(%rbp)
jne    1568 <AwSensorFromFile+0x3a8>
lea    -0x5d0(%rbp),%rdi
call   10d0 <strdup@plt>
mov    %rax,%rdx
mov    -0x30(%rbp),%rax
mov    -0x5dc(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x5dc(%rbp)
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    1385 <AwSensorFromFile+0x1c5>
movl   $0x0,-0x5d4(%rbp)
mov    -0x20(%rbp),%rcx
movslq -0x5d4(%rbp),%rdx
xor    %eax,%eax
cmpq   $0x0,(%rcx,%rdx,8)
mov    %al,-0x5f7(%rbp)
je     15a5 <AwSensorFromFile+0x3e5>
cmpl   $0x32,-0x5d4(%rbp)
setl   %al
mov    %al,-0x5f7(%rbp)
mov    -0x5f7(%rbp),%al
test   $0x1,%al
jne    15b8 <AwSensorFromFile+0x3f8>
jmp    16bb <AwSensorFromFile+0x4fb>
movl   $0x0,-0x5f0(%rbp)
movl   $0x0,-0x5f4(%rbp)
movslq -0x5f4(%rbp),%rcx
xor    %eax,%eax
cmpq   $0x0,-0x1c0(%rbp,%rcx,8)
mov    %al,-0x5f8(%rbp)
je     15fa <AwSensorFromFile+0x43a>
cmpl   $0x32,-0x5f4(%rbp)
setl   %al
mov    %al,-0x5f8(%rbp)
mov    -0x5f8(%rbp),%al
test   $0x1,%al
jne    160d <AwSensorFromFile+0x44d>
jmp    1662 <AwSensorFromFile+0x4a2>
mov    -0x20(%rbp),%rax
movslq -0x5d4(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x5f4(%rbp),%rax
mov    -0x1c0(%rbp,%rax,8),%rsi
ff
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1649 <AwSensorFromFile+0x489>
movl   $0x1,-0x5f0(%rbp)
jmp    1662 <AwSensorFromFile+0x4a2>
jmp    164e <AwSensorFromFile+0x48e>
mov    -0x5f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5f4(%rbp)
jmp    15cc <AwSensorFromFile+0x40c>
cmpl   $0x0,-0x5f0(%rbp)
jne    16a2 <AwSensorFromFile+0x4e2>
mov    -0x20(%rbp),%rax
movslq -0x5d4(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10d0 <strdup@plt>
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
mov    -0x5e0(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x5e0(%rbp)
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    16a7 <AwSensorFromFile+0x4e7>
mov    -0x5d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5d4(%rbp)
jmp    1577 <AwSensorFromFile+0x3b7>
movl   $0x0,-0x5d4(%rbp)
cmpl   $0x32,-0x5d4(%rbp)
jge    1715 <AwSensorFromFile+0x555>
movslq -0x5d4(%rbp),%rax
cmpq   $0x0,-0x1c0(%rbp,%rax,8)
je     16fc <AwSensorFromFile+0x53c>
movslq -0x5d4(%rbp),%rax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
call   1040 <free@plt>
jmp    1701 <AwSensorFromFile+0x541>
mov    -0x5d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5d4(%rbp)
jmp    16c5 <AwSensorFromFile+0x505>
mov    -0x1c8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x5e0(%rbp),%eax
add    -0x5dc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x600,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AwSensorFromFile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x5b8,%rsp
mov    %r8,%rbp
mov    %rcx,%r12
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%rbx
lea    0x20(%rsp),%rdi
mov    $0x190,%edx
xor    %esi,%esi
call   1080 <memset@plt>
lea    0x190(%r12),%rax
cmp    %rbp,%rax
jbe    1288 <AwSensorFromFile+0xb8>
lea    0x190(%rbp),%rax
cmp    %r12,%rax
jbe    1288 <AwSensorFromFile+0xb8>
mov    $0x4,%eax
nop
movq   $0x0,-0x20(%rbp,%rax,8)
movq   $0x0,-0x20(%r12,%rax,8)
movq   $0x0,-0x18(%rbp,%rax,8)
movq   $0x0,-0x18(%r12,%rax,8)
movq   $0x0,-0x10(%rbp,%rax,8)
movq   $0x0,-0x10(%r12,%rax,8)
movq   $0x0,-0x8(%rbp,%rax,8)
movq   $0x0,-0x8(%r12,%rax,8)
movq   $0x0,0x0(%rbp,%rax,8)
movq   $0x0,(%r12,%rax,8)
add    $0x5,%rax
cmp    $0x36,%rax
jne    1220 <AwSensorFromFile+0x50>
jmp    13ea <AwSensorFromFile+0x21a>
xorps  %xmm0,%xmm0
movups %xmm0,0x0(%rbp)
movups %xmm0,(%r12)
movups %xmm0,0x10(%rbp)
movups %xmm0,0x10(%r12)
movups %xmm0,0x20(%rbp)
movups %xmm0,0x20(%r12)
movups %xmm0,0x30(%rbp)
movups %xmm0,0x30(%r12)
movups %xmm0,0x40(%rbp)
movups %xmm0,0x40(%r12)
movups %xmm0,0x50(%rbp)
movups %xmm0,0x50(%r12)
movups %xmm0,0x60(%rbp)
movups %xmm0,0x60(%r12)
movups %xmm0,0x70(%rbp)
movups %xmm0,0x70(%r12)
movups %xmm0,0x80(%rbp)
movups %xmm0,0x80(%r12)
movups %xmm0,0x90(%rbp)
movups %xmm0,0x90(%r12)
movups %xmm0,0xa0(%rbp)
movups %xmm0,0xa0(%r12)
movups %xmm0,0xb0(%rbp)
movups %xmm0,0xb0(%r12)
movups %xmm0,0xc0(%rbp)
movups %xmm0,0xc0(%r12)
movups %xmm0,0xd0(%rbp)
movups %xmm0,0xd0(%r12)
movups %xmm0,0xe0(%rbp)
movups %xmm0,0xe0(%r12)
movups %xmm0,0xf0(%rbp)
movups %xmm0,0xf0(%r12)
movups %xmm0,0x100(%rbp)
movups %xmm0,0x100(%r12)
movups %xmm0,0x110(%rbp)
movups %xmm0,0x110(%r12)
movups %xmm0,0x120(%rbp)
movups %xmm0,0x120(%r12)
movups %xmm0,0x130(%rbp)
movups %xmm0,0x130(%r12)
movups %xmm0,0x140(%rbp)
movups %xmm0,0x140(%r12)
movups %xmm0,0x150(%rbp)
movups %xmm0,0x150(%r12)
movups %xmm0,0x160(%rbp)
movups %xmm0,0x160(%r12)
movups %xmm0,0x170(%rbp)
movups %xmm0,0x170(%r12)
movups %xmm0,0x180(%rbp)
movups %xmm0,0x180(%r12)
lea    0xc0f(%rip),%rdi
call   1030 <getenv@plt>
mov    $0xffffffff,%ecx
test   %rax,%rax
je     167d <AwSensorFromFile+0x4ad>
cmpb   $0x0,(%rax)
je     167d <AwSensorFromFile+0x4ad>
lea    0xbf8(%rip),%rsi
lea    0x3b0(%rsp),%r15
mov    %r15,%rdi
mov    %rax,%rdx
mov    %rbx,%rcx
call   10d0 <sprintf@plt>
lea    0xbe1(%rip),%rsi
mov    %r15,%rdi
call   10c0 <fopen@plt>
xor    %ecx,%ecx
test   %rax,%rax
je     167d <AwSensorFromFile+0x4ad>
mov    %rax,%rbx
test   %r13,%r13
je     1495 <AwSensorFromFile+0x2c5>
mov    %rbx,%rdi
call   10b0 <fileno@plt>
lea    0x18(%rsp),%rsi
mov    %eax,%edi
call   10f0 <fstat@plt>
test   %rax,%rax
js     147f <AwSensorFromFile+0x2af>
mov    0x18(%rsp),%rax
cmp    0x0(%r13),%rax
jne    1491 <AwSensorFromFile+0x2c1>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %ecx,%ecx
jmp    167d <AwSensorFromFile+0x4ad>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    $0xfffffffe,%ecx
jmp    167d <AwSensorFromFile+0x4ad>
mov    %rax,0x0(%r13)
lea    0x1b0(%rsp),%rdi
mov    $0x1ff,%esi
mov    %rbx,%rdx
call   1090 <fgets@plt>
movl   $0x0,0x4(%rsp)
mov    $0x0,%ecx
mov    %rcx,0x8(%rsp)
test   %rax,%rax
mov    %rbx,0x10(%rsp)
je     15b5 <AwSensorFromFile+0x3e5>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
lea    0x1b0(%rsp),%r13
xor    %r15d,%r15d
nopl   0x0(%rax)
mov    %r13,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
je     1596 <AwSensorFromFile+0x3c6>
cmpb   $0x23,0x1b0(%rsp)
23
je     1596 <AwSensorFromFile+0x3c6>
mov    %r13,%rdi
mov    $0xa,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     1513 <AwSensorFromFile+0x343>
movb   $0x0,(%rax)
mov    %r13,%rdi
mov    $0xd,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     1528 <AwSensorFromFile+0x358>
movb   $0x0,(%rax)
mov    %r13,%rdi
call   10e0 <strdup@plt>
movslq %r15d,%rcx
add    $0x1,%r15d
mov    %rax,0x20(%rsp,%rcx,8)
mov    (%r14),%rsi
test   %rsi,%rsi
je     1574 <AwSensorFromFile+0x3a4>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r13,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1591 <AwSensorFromFile+0x3c1>
mov    0x8(%r14,%rbx,8),%rsi
test   %rsi,%rsi
je     1574 <AwSensorFromFile+0x3a4>
lea    0x1(%rbx),%rax
cmp    $0x30,%rbx
mov    %rax,%rbx
jbe    1550 <AwSensorFromFile+0x380>
mov    %r13,%rdi
call   10e0 <strdup@plt>
mov    0x8(%rsp),%rdx
movslq %edx,%rcx
add    $0x1,%edx
mov    %rdx,0x8(%rsp)
mov    %rax,0x0(%rbp,%rcx,8)
mov    0x10(%rsp),%rbx
mov    %r13,%rdi
mov    $0x1ff,%esi
mov    %rbx,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     15b5 <AwSensorFromFile+0x3e5>
cmp    $0x32,%r15d
jl     14e0 <AwSensorFromFile+0x310>
mov    (%r14),%rdi
test   %rdi,%rdi
je     164b <AwSensorFromFile+0x47b>
xor    %r13d,%r13d
mov    0x20(%rsp),%rbx
mov    %r14,%rbp
movl   $0x0,0x4(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %rbx,%rbx
je     1615 <AwSensorFromFile+0x445>
xor    %r15d,%r15d
mov    %rbx,%rsi
nopl   0x0(%rax,%rax,1)
call   10a0 <strcmp@plt>
test   %rax,%rax
je     162c <AwSensorFromFile+0x45c>
mov    0x28(%rsp,%r15,8),%rsi
mov    0x0(%rbp),%rdi
test   %rsi,%rsi
je     1615 <AwSensorFromFile+0x445>
lea    0x1(%r15),%rax
cmp    $0x30,%r15
mov    %rax,%r15
jbe    15f0 <AwSensorFromFile+0x420>
call   10e0 <strdup@plt>
mov    0x4(%rsp),%edx
movslq %edx,%rcx
add    $0x1,%edx
mov    %edx,0x4(%rsp)
mov    %rax,(%r12,%rcx,8)
mov    0x8(%r14,%r13,8),%rdi
test   %rdi,%rdi
je     164b <AwSensorFromFile+0x47b>
lea    (%r14,%r13,8),%rbp
add    $0x8,%rbp
lea    0x1(%r13),%rax
cmp    $0x31,%r13
mov    %rax,%r13
jb     15e0 <AwSensorFromFile+0x410>
xor    %ebx,%ebx
jmp    165a <AwSensorFromFile+0x48a>
nop
add    $0x1,%rbx
cmp    $0x32,%rbx
je     166b <AwSensorFromFile+0x49b>
mov    0x20(%rsp,%rbx,8),%rdi
test   %rdi,%rdi
je     1650 <AwSensorFromFile+0x480>
call   1040 <free@plt>
jmp    1650 <AwSensorFromFile+0x480>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
mov    0x4(%rsp),%ecx
add    0x8(%rsp),%ecx
mov    %ecx,%eax
add    $0x5b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
@.str = [12 x i8] c"AW_DATA_DIR\00"
@.str.1 = [6 x i8] c"%s/%s\00"
@.str.2 = [2 x i8] c"r\00"
define i32 @AwSensorFromFile(i8* %0, i64* %1, i8** %2, i8** %3, i8** %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8**
%10 = alloca i8**
%11 = alloca i8**
%12 = alloca [50 x i8*]
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca [512 x i8]
%16 = alloca [512 x i8]
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca %struct.stat
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8** %2, i8*** %9
store i8** %3, i8*** %10
store i8** %4, i8*** %11
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %17
br label %25
25: ; preds = %40, %5
%26 = load i32, i32* %17
%27 = icmp slt i32 %26, 50
br i1 %27, label %28, label %43
28: ; preds = %25
%29 = load i32, i32* %17
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [50 x i8*], [50 x i8*]* %12, i64 0, i64 %30
store i8* null, i8** %31
%32 = load i8**, i8*** %11
%33 = load i32, i32* %17
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
store i8* null, i8** %35
%36 = load i8**, i8*** %10
%37 = load i32, i32* %17
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8*, i8** %36, i64 %38
store i8* null, i8** %39
br label %40
40: ; preds = %28
%41 = load i32, i32* %17
%42 = add nsw i32 %41, 1
store i32 %42, i32* %17
br label %25
43: ; preds = %25
%44 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %44, i8** %14
%45 = load i8*, i8** %14
%46 = icmp ne i8* %45, null
br i1 %46, label %47, label %51
47: ; preds = %43
%48 = load i8*, i8** %14
%49 = load i8, i8* %48
%50 = icmp ne i8 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %47, %43
store i32 -1, i32* %6
br label %254
52: ; preds = %47
%53 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i64 0, i64 0
%54 = load i8*, i8** %14
%55 = load i8*, i8** %7
%56 = call i32 @sprintf(i8* %53, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %54, i8* %55)
%57 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i64 0, i64 0
%58 = call i32* @fopen(i8* %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %58, i32** %13
%59 = load i32*, i32** %13
%60 = icmp ne i32* %59, null
br i1 %60, label %62, label %61
61: ; preds = %52
store i32 0, i32* %6
br label %254
62: ; preds = %52
%63 = load i64*, i64** %8
%64 = icmp ne i64* %63, null
br i1 %64, label %65, label %86
65: ; preds = %62
%66 = load i32*, i32** %13
%67 = call i32 @fileno(i32* %66)
%68 = call i64 @fstat(i32 %67, %struct.stat* %21)
%69 = icmp slt i64 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %65
%71 = load i32*, i32** %13
%72 = call i32 @fclose(i32* %71)
store i32 -2, i32* %6
br label %254
73: ; preds = %65
%74 = getelementptr inbounds %struct.stat, %struct.stat* %21, i32 0, i32 0
%75 = load i64, i64* %74
%76 = load i64*, i64** %8
%77 = load i64, i64* %76
%78 = icmp eq i64 %75, %77
br i1 %78, label %79, label %82
79: ; preds = %73
%80 = load i32*, i32** %13
%81 = call i32 @fclose(i32* %80)
store i32 0, i32* %6
br label %254
82: ; preds = %73
%83 = getelementptr inbounds %struct.stat, %struct.stat* %21, i32 0, i32 0
%84 = load i64, i64* %83
%85 = load i64*, i64** %8
store i64 %84, i64* %85
br label %86
86: ; preds = %82, %62
store i32 0, i32* %18
store i32 0, i32* %19
br label %87
87: ; preds = %166, %107, %101, %86
%88 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%89 = load i32*, i32** %13
%90 = call i64 @fgets(i8* %88, i32 511, i32* %89)
%91 = icmp ne i64 %90, 0
br i1 %91, label %92, label %95
92: ; preds = %87
%93 = load i32, i32* %18
%94 = icmp slt i32 %93, 50
br label %95
95: ; preds = %92, %87
%96 = phi i1 [ false, %87 ], [ %94, %92 ]
br i1 %96, label %97, label %167
97: ; preds = %95
%98 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%99 = call i32 @strlen(i8* %98)
%100 = icmp ne i32 %99, 0
br i1 %100, label %102, label %101
101: ; preds = %97
br label %87
102: ; preds = %97
%103 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 35
br i1 %106, label %107, label %108
107: ; preds = %102
br label %87
108: ; preds = %102
%109 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%110 = call i8* @strchr(i8* %109, i8 signext 10)
store i8* %110, i8** %14
%111 = load i8*, i8** %14
%112 = icmp ne i8* %111, null
br i1 %112, label %113, label %115
113: ; preds = %108
%114 = load i8*, i8** %14
store i8 0, i8* %114
br label %115
115: ; preds = %113, %108
%116 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%117 = call i8* @strchr(i8* %116, i8 signext 13)
store i8* %117, i8** %14
%118 = load i8*, i8** %14
%119 = icmp ne i8* %118, null
br i1 %119, label %120, label %122
120: ; preds = %115
%121 = load i8*, i8** %14
store i8 0, i8* %121
br label %122
122: ; preds = %120, %115
%123 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%124 = call i8* @strdup(i8* %123)
%125 = load i32, i32* %18
%126 = add nsw i32 %125, 1
store i32 %126, i32* %18
%127 = sext i32 %125 to i64
%128 = getelementptr inbounds [50 x i8*], [50 x i8*]* %12, i64 0, i64 %127
store i8* %124, i8** %128
store i32 0, i32* %22
store i32 0, i32* %17
br label %129
129: ; preds = %152, %122
%130 = load i8**, i8*** %9
%131 = load i32, i32* %17
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8*, i8** %130, i64 %132
%134 = load i8*, i8** %133
%135 = icmp ne i8* %134, null
br i1 %135, label %136, label %139
136: ; preds = %129
%137 = load i32, i32* %17
%138 = icmp slt i32 %137, 50
br label %139
139: ; preds = %136, %129
%140 = phi i1 [ false, %129 ], [ %138, %136 ]
br i1 %140, label %141, label %155
141: ; preds = %139
%142 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%143 = load i8**, i8*** %9
%144 = load i32, i32* %17
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds i8*, i8** %143, i64 %145
%147 = load i8*, i8** %146
%148 = call i64 @strcmp(i8* %142, i8* %147)
%149 = icmp eq i64 %148, 0
br i1 %149, label %150, label %151
150: ; preds = %141
store i32 1, i32* %22
br label %155
151: ; preds = %141
br label %152
152: ; preds = %151
%153 = load i32, i32* %17
%154 = add nsw i32 %153, 1
store i32 %154, i32* %17
br label %129
155: ; preds = %150, %139
%156 = load i32, i32* %22
%157 = icmp ne i32 %156, 0
br i1 %157, label %166, label %158
158: ; preds = %155
%159 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%160 = call i8* @strdup(i8* %159)
%161 = load i8**, i8*** %11
%162 = load i32, i32* %19
%163 = add nsw i32 %162, 1
store i32 %163, i32* %19
%164 = sext i32 %162 to i64
%165 = getelementptr inbounds i8*, i8** %161, i64 %164
store i8* %160, i8** %165
br label %166
166: ; preds = %158, %155
br label %87
167: ; preds = %95
store i32 0, i32* %17
br label %168
168: ; preds = %225, %167
%169 = load i8**, i8*** %9
%170 = load i32, i32* %17
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i8*, i8** %169, i64 %171
%173 = load i8*, i8** %172
%174 = icmp ne i8* %173, null
br i1 %174, label %175, label %178
175: ; preds = %168
%176 = load i32, i32* %17
%177 = icmp slt i32 %176, 50
br label %178
178: ; preds = %175, %168
%179 = phi i1 [ false, %168 ], [ %177, %175 ]
br i1 %179, label %180, label %228
180: ; preds = %178
store i32 0, i32* %23
store i32 0, i32* %24
br label %181
181: ; preds = %206, %180
%182 = load i32, i32* %24
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds [50 x i8*], [50 x i8*]* %12, i64 0, i64 %183
%185 = load i8*, i8** %184
%186 = icmp ne i8* %185, null
br i1 %186, label %187, label %190
187: ; preds = %181
%188 = load i32, i32* %24
%189 = icmp slt i32 %188, 50
br label %190
190: ; preds = %187, %181
%191 = phi i1 [ false, %181 ], [ %189, %187 ]
br i1 %191, label %192, label %209
192: ; preds = %190
%193 = load i8**, i8*** %9
%194 = load i32, i32* %17
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i8*, i8** %193, i64 %195
%197 = load i8*, i8** %196
%198 = load i32, i32* %24
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds [50 x i8*], [50 x i8*]* %12, i64 0, i64 %199
%201 = load i8*, i8** %200
%202 = call i64 @strcmp(i8* %197, i8* %201)
%203 = icmp eq i64 %202, 0
br i1 %203, label %204, label %205
204: ; preds = %192
store i32 1, i32* %23
br label %209
205: ; preds = %192
br label %206
206: ; preds = %205
%207 = load i32, i32* %24
%208 = add nsw i32 %207, 1
store i32 %208, i32* %24
br label %181
209: ; preds = %204, %190
%210 = load i32, i32* %23
%211 = icmp ne i32 %210, 0
br i1 %211, label %224, label %212
212: ; preds = %209
%213 = load i8**, i8*** %9
%214 = load i32, i32* %17
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds i8*, i8** %213, i64 %215
%217 = load i8*, i8** %216
%218 = call i8* @strdup(i8* %217)
%219 = load i8**, i8*** %10
%220 = load i32, i32* %20
%221 = add nsw i32 %220, 1
store i32 %221, i32* %20
%222 = sext i32 %220 to i64
%223 = getelementptr inbounds i8*, i8** %219, i64 %222
store i8* %218, i8** %223
br label %224
224: ; preds = %212, %209
br label %225
225: ; preds = %224
%226 = load i32, i32* %17
%227 = add nsw i32 %226, 1
store i32 %227, i32* %17
br label %168
228: ; preds = %178
store i32 0, i32* %17
br label %229
229: ; preds = %245, %228
%230 = load i32, i32* %17
%231 = icmp slt i32 %230, 50
br i1 %231, label %232, label %248
232: ; preds = %229
%233 = load i32, i32* %17
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds [50 x i8*], [50 x i8*]* %12, i64 0, i64 %234
%236 = load i8*, i8** %235
%237 = icmp ne i8* %236, null
br i1 %237, label %238, label %244
238: ; preds = %232
%239 = load i32, i32* %17
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds [50 x i8*], [50 x i8*]* %12, i64 0, i64 %240
%242 = load i8*, i8** %241
%243 = call i32 @free(i8* %242)
br label %244
244: ; preds = %238, %232
br label %245
245: ; preds = %244
%246 = load i32, i32* %17
%247 = add nsw i32 %246, 1
store i32 %247, i32* %17
br label %229
248: ; preds = %229
%249 = load i32*, i32** %13
%250 = call i32 @fclose(i32* %249)
%251 = load i32, i32* %20
%252 = load i32, i32* %19
%253 = add nsw i32 %251, %252
store i32 %253, i32* %6
br label %254
254: ; preds = %248, %79, %70, %61, %51
%255 = load i32, i32* %6
ret i32 %255
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@.str = [12 x i8] c"AW_DATA_DIR\00"
@.str.1 = [6 x i8] c"%s/%s\00"
@.str.2 = [2 x i8] c"r\00"
define i32 @AwSensorFromFile(i8* %0, i64* %1, i8** nocapture %2, i8** nocapture writeonly %3, i8** nocapture writeonly %4) {
%6 = alloca [50 x i8*]
%7 = bitcast [50 x i8*]* %6 to i8*
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = alloca %struct.stat
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%13 = bitcast %struct.stat* %10 to i8*
%14 = getelementptr i8*, i8** %4, i64 50
%15 = getelementptr i8*, i8** %3, i64 50
%16 = icmp ugt i8** %15, %4
%17 = icmp ugt i8** %14, %3
%18 = and i1 %16, %17
br i1 %18, label %118, label %19
19: ; preds = %5
%20 = bitcast i8** %4 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %20
%21 = bitcast i8** %3 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %21
%22 = getelementptr inbounds i8*, i8** %4, i64 2
%23 = bitcast i8** %22 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %23
%24 = getelementptr inbounds i8*, i8** %3, i64 2
%25 = bitcast i8** %24 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %25
%26 = getelementptr inbounds i8*, i8** %4, i64 4
%27 = bitcast i8** %26 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %27
%28 = getelementptr inbounds i8*, i8** %3, i64 4
%29 = bitcast i8** %28 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %29
%30 = getelementptr inbounds i8*, i8** %4, i64 6
%31 = bitcast i8** %30 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %31
%32 = getelementptr inbounds i8*, i8** %3, i64 6
%33 = bitcast i8** %32 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %33
%34 = getelementptr inbounds i8*, i8** %4, i64 8
%35 = bitcast i8** %34 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %35
%36 = getelementptr inbounds i8*, i8** %3, i64 8
%37 = bitcast i8** %36 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %37
%38 = getelementptr inbounds i8*, i8** %4, i64 10
%39 = bitcast i8** %38 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %39
%40 = getelementptr inbounds i8*, i8** %3, i64 10
%41 = bitcast i8** %40 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %41
%42 = getelementptr inbounds i8*, i8** %4, i64 12
%43 = bitcast i8** %42 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %43
%44 = getelementptr inbounds i8*, i8** %3, i64 12
%45 = bitcast i8** %44 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %45
%46 = getelementptr inbounds i8*, i8** %4, i64 14
%47 = bitcast i8** %46 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %47
%48 = getelementptr inbounds i8*, i8** %3, i64 14
%49 = bitcast i8** %48 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %49
%50 = getelementptr inbounds i8*, i8** %4, i64 16
%51 = bitcast i8** %50 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %51
%52 = getelementptr inbounds i8*, i8** %3, i64 16
%53 = bitcast i8** %52 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %53
%54 = getelementptr inbounds i8*, i8** %4, i64 18
%55 = bitcast i8** %54 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %55
%56 = getelementptr inbounds i8*, i8** %3, i64 18
%57 = bitcast i8** %56 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %57
%58 = getelementptr inbounds i8*, i8** %4, i64 20
%59 = bitcast i8** %58 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %59
%60 = getelementptr inbounds i8*, i8** %3, i64 20
%61 = bitcast i8** %60 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %61
%62 = getelementptr inbounds i8*, i8** %4, i64 22
%63 = bitcast i8** %62 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %63
%64 = getelementptr inbounds i8*, i8** %3, i64 22
%65 = bitcast i8** %64 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %65
%66 = getelementptr inbounds i8*, i8** %4, i64 24
%67 = bitcast i8** %66 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %67
%68 = getelementptr inbounds i8*, i8** %3, i64 24
%69 = bitcast i8** %68 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %69
%70 = getelementptr inbounds i8*, i8** %4, i64 26
%71 = bitcast i8** %70 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %71
%72 = getelementptr inbounds i8*, i8** %3, i64 26
%73 = bitcast i8** %72 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %73
%74 = getelementptr inbounds i8*, i8** %4, i64 28
%75 = bitcast i8** %74 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %75
%76 = getelementptr inbounds i8*, i8** %3, i64 28
%77 = bitcast i8** %76 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %77
%78 = getelementptr inbounds i8*, i8** %4, i64 30
%79 = bitcast i8** %78 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %79
%80 = getelementptr inbounds i8*, i8** %3, i64 30
%81 = bitcast i8** %80 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %81
%82 = getelementptr inbounds i8*, i8** %4, i64 32
%83 = bitcast i8** %82 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %83
%84 = getelementptr inbounds i8*, i8** %3, i64 32
%85 = bitcast i8** %84 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %85
%86 = getelementptr inbounds i8*, i8** %4, i64 34
%87 = bitcast i8** %86 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %87
%88 = getelementptr inbounds i8*, i8** %3, i64 34
%89 = bitcast i8** %88 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %89
%90 = getelementptr inbounds i8*, i8** %4, i64 36
%91 = bitcast i8** %90 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %91
%92 = getelementptr inbounds i8*, i8** %3, i64 36
%93 = bitcast i8** %92 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %93
%94 = getelementptr inbounds i8*, i8** %4, i64 38
%95 = bitcast i8** %94 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %95
%96 = getelementptr inbounds i8*, i8** %3, i64 38
%97 = bitcast i8** %96 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %97
%98 = getelementptr inbounds i8*, i8** %4, i64 40
%99 = bitcast i8** %98 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %99
%100 = getelementptr inbounds i8*, i8** %3, i64 40
%101 = bitcast i8** %100 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %101
%102 = getelementptr inbounds i8*, i8** %4, i64 42
%103 = bitcast i8** %102 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %103
%104 = getelementptr inbounds i8*, i8** %3, i64 42
%105 = bitcast i8** %104 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %105
%106 = getelementptr inbounds i8*, i8** %4, i64 44
%107 = bitcast i8** %106 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %107
%108 = getelementptr inbounds i8*, i8** %3, i64 44
%109 = bitcast i8** %108 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %109
%110 = getelementptr inbounds i8*, i8** %4, i64 46
%111 = bitcast i8** %110 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %111
%112 = getelementptr inbounds i8*, i8** %3, i64 46
%113 = bitcast i8** %112 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %113
%114 = getelementptr inbounds i8*, i8** %4, i64 48
%115 = bitcast i8** %114 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %115
%116 = getelementptr inbounds i8*, i8** %3, i64 48
%117 = bitcast i8** %116 to <2 x i8*>*
store <2 x i8*> zeroinitializer, <2 x i8*>* %117
br label %136
118: ; preds = %5, %118
%119 = phi i64 [ %134, %118 ], [ 0, %5 ]
%120 = getelementptr inbounds i8*, i8** %4, i64 %119
store i8* null, i8** %120
%121 = getelementptr inbounds i8*, i8** %3, i64 %119
store i8* null, i8** %121
%122 = add nuw nsw i64 %119, 1
%123 = getelementptr inbounds i8*, i8** %4, i64 %122
store i8* null, i8** %123
%124 = getelementptr inbounds i8*, i8** %3, i64 %122
store i8* null, i8** %124
%125 = add nuw nsw i64 %119, 2
%126 = getelementptr inbounds i8*, i8** %4, i64 %125
store i8* null, i8** %126
%127 = getelementptr inbounds i8*, i8** %3, i64 %125
store i8* null, i8** %127
%128 = add nuw nsw i64 %119, 3
%129 = getelementptr inbounds i8*, i8** %4, i64 %128
store i8* null, i8** %129
%130 = getelementptr inbounds i8*, i8** %3, i64 %128
store i8* null, i8** %130
%131 = add nuw nsw i64 %119, 4
%132 = getelementptr inbounds i8*, i8** %4, i64 %131
store i8* null, i8** %132
%133 = getelementptr inbounds i8*, i8** %3, i64 %131
store i8* null, i8** %133
%134 = add nuw nsw i64 %119, 5
%135 = icmp eq i64 %134, 50
br i1 %135, label %136, label %118
136: ; preds = %118, %19
%137 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%138 = icmp eq i8* %137, null
br i1 %138, label %268, label %139
139: ; preds = %136
%140 = load i8, i8* %137
%141 = icmp eq i8 %140, 0
br i1 %141, label %268, label %142
142: ; preds = %139
%143 = call i32 @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %137, i8* %0)
%144 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%145 = icmp eq i32* %144, null
br i1 %145, label %268, label %146
146: ; preds = %142
%147 = icmp eq i64* %1, null
br i1 %147, label %162, label %148
148: ; preds = %146
%149 = tail call i32 @fileno(i32* %144)
%150 = call i64 @fstat(i32 %149, %struct.stat* %10)
%151 = icmp slt i64 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %148
%153 = tail call i32 @fclose(i32* %144)
br label %268
154: ; preds = %148
%155 = getelementptr inbounds %struct.stat, %struct.stat* %10, i64 0, i32 0
%156 = load i64, i64* %155
%157 = load i64, i64* %1
%158 = icmp eq i64 %156, %157
br i1 %158, label %159, label %161
159: ; preds = %154
%160 = tail call i32 @fclose(i32* %144)
br label %268
161: ; preds = %154
store i64 %156, i64* %1
br label %162
162: ; preds = %161, %146
%163 = call i64 @fgets(i8* %12, i32 511, i32* %144)
%164 = icmp eq i64 %163, 0
br i1 %164, label %165, label %173
165: ; preds = %213, %162
%166 = phi i32 [ 0, %162 ], [ %215, %213 ]
%167 = load i8*, i8** %2
%168 = icmp eq i8* %167, null
br i1 %168, label %225, label %169
169: ; preds = %165
%170 = getelementptr inbounds [50 x i8*], [50 x i8*]* %6, i64 0, i64 0
%171 = load i8*, i8** %170
%172 = icmp eq i8* %171, null
br label %220
173: ; preds = %162, %213
%174 = phi i32 [ %215, %213 ], [ 0, %162 ]
%175 = phi i32 [ %214, %213 ], [ 0, %162 ]
%176 = call i32 @strlen(i8* %12)
%177 = icmp eq i32 %176, 0
%178 = load i8, i8* %12
%179 = icmp eq i8 %178, 35
%180 = select i1 %177, i1 true, i1 %179
br i1 %180, label %213, label %181
181: ; preds = %173
%182 = call i8* @strchr(i8* %12, i8 signext 10)
%183 = icmp eq i8* %182, null
br i1 %183, label %185, label %184
184: ; preds = %181
store i8 0, i8* %182
br label %185
185: ; preds = %184, %181
%186 = call i8* @strchr(i8* %12, i8 signext 13)
%187 = icmp eq i8* %186, null
br i1 %187, label %189, label %188
188: ; preds = %185
store i8 0, i8* %186
br label %189
189: ; preds = %188, %185
%190 = call i8* @strdup(i8* %12)
%191 = add nsw i32 %175, 1
%192 = sext i32 %175 to i64
%193 = getelementptr inbounds [50 x i8*], [50 x i8*]* %6, i64 0, i64 %192
store i8* %190, i8** %193
%194 = load i8*, i8** %2
%195 = icmp eq i8* %194, null
br i1 %195, label %208, label %202
196: ; preds = %202
%197 = getelementptr inbounds i8*, i8** %2, i64 %207
%198 = load i8*, i8** %197
%199 = icmp ne i8* %198, null
%200 = icmp ult i64 %203, 49
%201 = select i1 %199, i1 %200, i1 false
br i1 %201, label %202, label %208
202: ; preds = %189, %196
%203 = phi i64 [ %207, %196 ], [ 0, %189 ]
%204 = phi i8* [ %198, %196 ], [ %194, %189 ]
%205 = call i64 @strcmp(i8* %12, i8* %204)
%206 = icmp eq i64 %205, 0
%207 = add nuw nsw i64 %203, 1
br i1 %206, label %213, label %196
208: ; preds = %196, %189
%209 = call i8* @strdup(i8* %12)
%210 = add nsw i32 %174, 1
%211 = sext i32 %174 to i64
%212 = getelementptr inbounds i8*, i8** %4, i64 %211
store i8* %209, i8** %212
br label %213
213: ; preds = %202, %208, %173
%214 = phi i32 [ %175, %173 ], [ %191, %208 ], [ %191, %202 ]
%215 = phi i32 [ %174, %173 ], [ %210, %208 ], [ %174, %202 ]
%216 = call i64 @fgets(i8* %12, i32 511, i32* %144)
%217 = icmp ne i64 %216, 0
%218 = icmp slt i32 %214, 50
%219 = select i1 %217, i1 %218, i1 false
br i1 %219, label %173, label %165
220: ; preds = %169, %247
%221 = phi i8* [ %167, %169 ], [ %251, %247 ]
%222 = phi i64 [ 0, %169 ], [ %249, %247 ]
%223 = phi i8** [ %2, %169 ], [ %250, %247 ]
%224 = phi i32 [ 0, %169 ], [ %248, %247 ]
br i1 %172, label %241, label %234
225: ; preds = %247, %165
%226 = phi i32 [ 0, %165 ], [ %248, %247 ]
br label %255
227: ; preds = %234
%228 = getelementptr inbounds [50 x i8*], [50 x i8*]* %6, i64 0, i64 %240
%229 = load i8*, i8** %228
%230 = icmp ne i8* %229, null
%231 = icmp ult i64 %236, 49
%232 = select i1 %230, i1 %231, i1 false
%233 = load i8*, i8** %223
br i1 %232, label %234, label %241
234: ; preds = %220, %227
%235 = phi i8* [ %233, %227 ], [ %221, %220 ]
%236 = phi i64 [ %240, %227 ], [ 0, %220 ]
%237 = phi i8* [ %229, %227 ], [ %171, %220 ]
%238 = call i64 @strcmp(i8* %235, i8* %237)
%239 = icmp eq i64 %238, 0
%240 = add nuw nsw i64 %236, 1
br i1 %239, label %247, label %227
241: ; preds = %227, %220
%242 = phi i8* [ %221, %220 ], [ %233, %227 ]
%243 = call i8* @strdup(i8* %242)
%244 = add nsw i32 %224, 1
%245 = sext i32 %224 to i64
%246 = getelementptr inbounds i8*, i8** %3, i64 %245
store i8* %243, i8** %246
br label %247
247: ; preds = %234, %241
%248 = phi i32 [ %244, %241 ], [ %224, %234 ]
%249 = add nuw nsw i64 %222, 1
%250 = getelementptr inbounds i8*, i8** %2, i64 %249
%251 = load i8*, i8** %250
%252 = icmp ne i8* %251, null
%253 = icmp ult i64 %222, 49
%254 = select i1 %252, i1 %253, i1 false
br i1 %254, label %220, label %225
255: ; preds = %225, %262
%256 = phi i64 [ 0, %225 ], [ %263, %262 ]
%257 = getelementptr inbounds [50 x i8*], [50 x i8*]* %6, i64 0, i64 %256
%258 = load i8*, i8** %257
%259 = icmp eq i8* %258, null
br i1 %259, label %262, label %260
260: ; preds = %255
%261 = call i32 @free(i8* %258)
br label %262
262: ; preds = %255, %260
%263 = add nuw nsw i64 %256, 1
%264 = icmp eq i64 %263, 50
br i1 %264, label %265, label %255
265: ; preds = %262
%266 = call i32 @fclose(i32* %144)
%267 = add nsw i32 %226, %166
br label %268
268: ; preds = %142, %136, %139, %265, %159, %152
%269 = phi i32 [ -2, %152 ], [ 0, %159 ], [ %267, %265 ], [ -1, %139 ], [ -1, %136 ], [ 0, %142 ]
ret i32 %269
}