#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*/ wifi_buf;
struct timespec {
  double tv_sec;
};
typedef int /*<<< orphan*/ cur_ssid;
typedef int /*<<< orphan*/ cur_bssid;
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_PROCESS_CPUTIME_ID;
double atof(char *);
int atoi(char *);
char *base64decode(char *, size_t *);
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ ezplib_get_attr_val(char *, int /*<<< orphan*/, char *,
                                       char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strtok(char *, char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ unlink(char *);
int main() {
  char *decode_ssid;
  char cur_ssid[256] = {0};
  char cur_bssid[256] = {0};
  char buf[512] = {0}, wifi_buf[512] = {0}, pre_ssid[256] = {0};
  char *delim = "$";
  char *tmp = NULL;
  int i, time_interval, pre_sig, pre_wave;
  FILE *p, *time, *wifi_tmp;
  time = fopen("/tmp/wifi_site_time", "r");
  ezplib_get_attr_val("wl0_apcli_rule", 0, "ssid", cur_ssid, sizeof(cur_ssid),
                      0);
  ezplib_get_attr_val("wl0_apcli_rule", 0, "bssid", cur_bssid,
                      sizeof(cur_bssid), 0);
  size_t len = 0;
  if (cur_ssid[0] != '\0') {
    decode_ssid = base64decode(cur_ssid, &len);
  }
  struct timespec cur_time;
  clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &cur_time);
  if (time != NULL) {
    fgets(buf, sizeof(buf), time);
    double previous_time = atof(buf);
    time_interval = cur_time.tv_sec - previous_time;
    fclose(time);
  }
  sprintf(buf, "echo \'%ld\' > /tmp/wifi_site_time", cur_time.tv_sec);
  system(buf);
  if (time_interval > 300) {
    unlink("/tmp/wifi_site_not_encode");
  }
  if ((p = popen("/sbin/getsysinfo site_survey", "r")) == NULL) {
    printf("getsysinfo execute error!\n");
    return 0;
  }
  while (fgets(buf, sizeof(buf), p)) {
    char line[256] = {0};
    sprintf(line, "echo \'%s\' >> /tmp/wifi_site_not_encode", buf);
    system(line);
  }
  pclose(p);
  system("sort -f -t$ -k2 /tmp/wifi_site_not_encode -o /tmp/wifi_site_tmp");
  unlink("/tmp/wifi_site_not_encode");
  wifi_tmp = fopen("/tmp/wifi_site_tmp", "r");
  while (fgets(wifi_buf, sizeof(wifi_buf), wifi_tmp) != NULL) {
    char ch[256] = {0}, ssid[256] = {0}, bssid[256] = {0}, security[256] = {0},
         wmode[256] = {0}, extch[256] = {0}, nt[256] = {0};
    int sig = 0;
    tmp = strtok(wifi_buf, delim);
    int counter = 0;
    while (tmp != NULL) {
      switch (counter) {
      case 0:
        strcpy(ch, tmp);
        break;
      case 1:
        strcpy(ssid, tmp);
        break;
      case 2:
        strcpy(bssid, tmp);
        break;
      case 3:
        strcpy(security, tmp);
        break;
      case 4:
        sig = atoi(tmp);
        break;
      case 5:
        strcpy(wmode, tmp);
        break;
      case 6:
        strcpy(extch, tmp);
        break;
      case 7:
        strcpy(nt, tmp);
        break;
      }
      tmp = strtok(NULL, delim);
      counter++;
    }
    if (!strcmp(ssid, pre_ssid)) {
      if (sig > pre_sig) {
        if (pre_wave != 0) {
          sprintf(buf, "sed '$d' -i /tmp/wave%d", pre_wave);
          system(buf);
        }
      } else
        continue;
    }
    strcpy(pre_ssid, ssid);
    pre_sig = sig;
    if ((decode_ssid != NULL) && !strcmp(ssid, decode_ssid)) {
      sprintf(buf,
              "echo \'%s$%s$%s$%s$%d$%s$%s$%s$\' > /tmp/wifi_site_not_encode",
              ch, ssid, bssid, security, sig, wmode, extch, nt);
      pre_wave = 0;
    } else if (sig >= 76 && sig <= 100) {
      sprintf(buf, "echo \'%s$%s$%s$%s$%d$%s$%s$%s$\' >> /tmp/wave4", ch, ssid,
              bssid, security, sig, wmode, extch, nt);
      pre_wave = 4;
    } else if (sig >= 51 && sig <= 75) {
      sprintf(buf, "echo \'%s$%s$%s$%s$%d$%s$%s$%s$\' >> /tmp/wave3", ch, ssid,
              bssid, security, sig, wmode, extch, nt);
      pre_wave = 3;
    } else if (sig >= 26 && sig <= 50) {
      sprintf(buf, "echo \'%s$%s$%s$%s$%d$%s$%s$%s$\' >> /tmp/wave2", ch, ssid,
              bssid, security, sig, wmode, extch, nt);
      pre_wave = 2;
    } else if (sig > 0 && sig <= 25) {
      sprintf(buf, "echo \'%s$%s$%s$%s$%d$%s$%s$%s$\' >> /tmp/wave1", ch, ssid,
              bssid, security, sig, wmode, extch, nt);
      pre_wave = 1;
    }
    system(buf);
  }
  fclose(wifi_tmp);
  for (i = 4; i >= 1; i--) {
    char wave[256] = {0};
    sprintf(wave, "cat /tmp/wave%d >> /tmp/wifi_site_not_encode", i);
    system(wave);
    sprintf(wave, "rm /tmp/wave%d", i);
    system(wave);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x10a8,%rsp
movl   $0x0,-0xc(%rbp)
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0x220(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10c0 <memset@plt>
lea    -0x620(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10c0 <memset@plt>
lea    -0x720(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    0xd87(%rip),%rax
mov    %rax,-0x728(%rbp)
movq   $0x0,-0x730(%rbp)
lea    0xd94(%rip),%rdi
lea    0xd69(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x750(%rbp)
lea    -0x120(%rbp),%rcx
lea    0xd51(%rip),%rdi
xor    %r9d,%r9d
lea    0xd57(%rip),%rdx
mov    $0x100,%r8d
mov    %r9d,%esi
call   1030 <ezplib_get_attr_val@plt>
lea    -0x220(%rbp),%rcx
lea    0xd2b(%rip),%rdi
xor    %r9d,%r9d
lea    0xd30(%rip),%rdx
mov    $0x100,%r8d
mov    %r9d,%esi
call   1030 <ezplib_get_attr_val@plt>
movq   $0x0,-0x760(%rbp)
movsbl -0x120(%rbp),%eax
cmp    $0x0,%eax
je     1343 <main+0x123>
lea    -0x120(%rbp),%rdi
lea    -0x760(%rbp),%rsi
call   10d0 <base64decode@plt>
mov    %rax,-0x18(%rbp)
mov    0x2c9e(%rip),%rax
mov    (%rax),%edi
lea    -0x768(%rbp),%rsi
call   1070 <clock_gettime@plt>
cmpq   $0x0,-0x750(%rbp)
je     13b8 <main+0x198>
lea    -0x420(%rbp),%rdi
mov    -0x750(%rbp),%rdx
mov    $0x200,%esi
call   10e0 <fgets@plt>
lea    -0x420(%rbp),%rdi
call   1060 <atof@plt>
movsd  %xmm0,-0x770(%rbp)
ff
movsd  -0x768(%rbp),%xmm0
ff
subsd  -0x770(%rbp),%xmm0
ff
cvttsd2si %xmm0,%eax
mov    %eax,-0x738(%rbp)
mov    -0x750(%rbp),%rdi
call   1080 <fclose@plt>
lea    -0x420(%rbp),%rdi
movsd  -0x768(%rbp),%xmm0
ff
lea    0xc6b(%rip),%rsi
mov    $0x1,%al
call   1140 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1090 <system@plt>
cmpl   $0x12c,-0x738(%rbp)
jle    13fd <main+0x1dd>
lea    0xd3b(%rip),%rdi
call   1040 <unlink@plt>
lea    0xc56(%rip),%rdi
lea    0xc17(%rip),%rsi
call   1100 <popen@plt>
mov    %rax,-0x748(%rbp)
cmp    $0x0,%rax
jne    1439 <main+0x219>
lea    0xc4f(%rip),%rdi
call   10a0 <printf@plt>
movl   $0x0,-0xc(%rbp)
jmp    1ad0 <main+0x8b0>
jmp    143e <main+0x21e>
lea    -0x420(%rbp),%rdi
mov    -0x748(%rbp),%rdx
mov    $0x200,%esi
call   10e0 <fgets@plt>
cmp    $0x0,%rax
je     14a0 <main+0x280>
lea    -0x870(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0x870(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    0xc0a(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x870(%rbp),%rdi
call   1090 <system@plt>
jmp    143e <main+0x21e>
mov    -0x748(%rbp),%rdi
call   10b0 <pclose@plt>
lea    0xc06(%rip),%rdi
call   1090 <system@plt>
lea    0xc74(%rip),%rdi
call   1040 <unlink@plt>
lea    0xc1b(%rip),%rdi
lea    0xb50(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x758(%rbp)
lea    -0x620(%rbp),%rdi
mov    -0x758(%rbp),%rdx
mov    $0x200,%esi
call   10e0 <fgets@plt>
cmp    $0x0,%rax
je     1a31 <main+0x811>
lea    -0x970(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0xa70(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0xb70(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0xc70(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0xd70(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0xe70(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0xf70(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
movl   $0x0,-0xf74(%rbp)
lea    -0x620(%rbp),%rdi
mov    -0x728(%rbp),%rsi
call   1120 <strtok@plt>
mov    %rax,-0x730(%rbp)
movl   $0x0,-0xf78(%rbp)
cmpq   $0x0,-0x730(%rbp)
je     16d4 <main+0x4b4>
mov    -0xf78(%rbp),%eax
mov    %rax,-0x1088(%rbp)
sub    $0x7,%rax
ja     16a9 <main+0x489>
mov    -0x1088(%rbp),%rax
lea    0xa1a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x970(%rbp),%rdi
mov    -0x730(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    16a9 <main+0x489>
lea    -0xa70(%rbp),%rdi
mov    -0x730(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    16a9 <main+0x489>
lea    -0xb70(%rbp),%rdi
mov    -0x730(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    16a9 <main+0x489>
lea    -0xc70(%rbp),%rdi
mov    -0x730(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    16a9 <main+0x489>
mov    -0x730(%rbp),%rdi
call   1130 <atoi@plt>
mov    %eax,-0xf74(%rbp)
jmp    16a9 <main+0x489>
lea    -0xd70(%rbp),%rdi
mov    -0x730(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    16a9 <main+0x489>
lea    -0xe70(%rbp),%rdi
mov    -0x730(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    16a9 <main+0x489>
lea    -0xf70(%rbp),%rdi
mov    -0x730(%rbp),%rsi
call   1050 <strcpy@plt>
mov    -0x728(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1120 <strtok@plt>
mov    %rax,-0x730(%rbp)
mov    -0xf78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf78(%rbp)
jmp    15b3 <main+0x393>
lea    -0xa70(%rbp),%rdi
lea    -0x720(%rbp),%rsi
call   10f0 <strcmp@plt>
cmp    $0x0,%eax
jne    1745 <main+0x525>
mov    -0xf74(%rbp),%eax
cmp    -0x73c(%rbp),%eax
jle    173b <main+0x51b>
cmpl   $0x0,-0x740(%rbp)
je     1736 <main+0x516>
lea    -0x420(%rbp),%rdi
mov    -0x740(%rbp),%edx
lea    0x9d6(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1090 <system@plt>
jmp    1740 <main+0x520>
jmp    14de <main+0x2be>
jmp    1745 <main+0x525>
lea    -0x720(%rbp),%rdi
lea    -0xa70(%rbp),%rsi
call   1050 <strcpy@plt>
mov    -0xf74(%rbp),%eax
mov    %eax,-0x73c(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     17f5 <main+0x5d5>
lea    -0xa70(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10f0 <strcmp@plt>
cmp    $0x0,%eax
jne    17f5 <main+0x5d5>
lea    -0x420(%rbp),%rdi
lea    -0x970(%rbp),%rdx
lea    -0xa70(%rbp),%rcx
lea    -0xb70(%rbp),%r8
lea    -0xc70(%rbp),%r9
mov    -0xf74(%rbp),%ebx
lea    -0xd70(%rbp),%r11
lea    -0xe70(%rbp),%r10
lea    -0xf70(%rbp),%rax
lea    0x944(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1140 <sprintf@plt>
movl   $0x0,-0x740(%rbp)
jmp    1a20 <main+0x800>
cmpl   $0x4c,-0xf74(%rbp)
jl     187c <main+0x65c>
cmpl   $0x64,-0xf74(%rbp)
jg     187c <main+0x65c>
lea    -0x420(%rbp),%rdi
lea    -0x970(%rbp),%rdx
lea    -0xa70(%rbp),%rcx
lea    -0xb70(%rbp),%r8
lea    -0xc70(%rbp),%r9
mov    -0xf74(%rbp),%ebx
lea    -0xd70(%rbp),%r11
lea    -0xe70(%rbp),%r10
lea    -0xf70(%rbp),%rax
lea    0x8f9(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1140 <sprintf@plt>
movl   $0x4,-0x740(%rbp)
jmp    1a1b <main+0x7fb>
cmpl   $0x33,-0xf74(%rbp)
jl     1903 <main+0x6e3>
cmpl   $0x4b,-0xf74(%rbp)
jg     1903 <main+0x6e3>
lea    -0x420(%rbp),%rdi
lea    -0x970(%rbp),%rdx
lea    -0xa70(%rbp),%rcx
lea    -0xb70(%rbp),%r8
lea    -0xc70(%rbp),%r9
mov    -0xf74(%rbp),%ebx
lea    -0xd70(%rbp),%r11
lea    -0xe70(%rbp),%r10
lea    -0xf70(%rbp),%rax
lea    0x8a0(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1140 <sprintf@plt>
movl   $0x3,-0x740(%rbp)
jmp    1a16 <main+0x7f6>
cmpl   $0x1a,-0xf74(%rbp)
jl     198a <main+0x76a>
cmpl   $0x32,-0xf74(%rbp)
jg     198a <main+0x76a>
lea    -0x420(%rbp),%rdi
lea    -0x970(%rbp),%rdx
lea    -0xa70(%rbp),%rcx
lea    -0xb70(%rbp),%r8
lea    -0xc70(%rbp),%r9
mov    -0xf74(%rbp),%ebx
lea    -0xd70(%rbp),%r11
lea    -0xe70(%rbp),%r10
lea    -0xf70(%rbp),%rax
lea    0x847(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1140 <sprintf@plt>
movl   $0x2,-0x740(%rbp)
jmp    1a11 <main+0x7f1>
cmpl   $0x0,-0xf74(%rbp)
jle    1a0c <main+0x7ec>
cmpl   $0x19,-0xf74(%rbp)
jg     1a0c <main+0x7ec>
lea    -0x420(%rbp),%rdi
lea    -0x970(%rbp),%rdx
lea    -0xa70(%rbp),%rcx
lea    -0xb70(%rbp),%r8
lea    -0xc70(%rbp),%r9
mov    -0xf74(%rbp),%ebx
lea    -0xd70(%rbp),%r11
lea    -0xe70(%rbp),%r10
lea    -0xf70(%rbp),%rax
lea    0x7ee(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1140 <sprintf@plt>
movl   $0x1,-0x740(%rbp)
jmp    1a11 <main+0x7f1>
jmp    1a16 <main+0x7f6>
jmp    1a1b <main+0x7fb>
jmp    1a20 <main+0x800>
lea    -0x420(%rbp),%rdi
call   1090 <system@plt>
jmp    14de <main+0x2be>
mov    -0x758(%rbp),%rdi
call   1080 <fclose@plt>
movl   $0x4,-0x734(%rbp)
cmpl   $0x1,-0x734(%rbp)
jl     1ac9 <main+0x8a9>
lea    -0x1080(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10c0 <memset@plt>
lea    -0x1080(%rbp),%rdi
mov    -0x734(%rbp),%edx
lea    0x78a(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x1080(%rbp),%rdi
call   1090 <system@plt>
lea    -0x1080(%rbp),%rdi
mov    -0x734(%rbp),%edx
lea    0x790(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x1080(%rbp),%rdi
call   1090 <system@plt>
mov    -0x734(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x734(%rbp)
jmp    1a47 <main+0x827>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10a8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe48,%rsp
xorpd  %xmm0,%xmm0
movapd %xmm0,0x430(%rsp)
movapd %xmm0,0x420(%rsp)
movapd %xmm0,0x410(%rsp)
movapd %xmm0,0x400(%rsp)
movapd %xmm0,0x3f0(%rsp)
movapd %xmm0,0x3e0(%rsp)
movapd %xmm0,0x3d0(%rsp)
movapd %xmm0,0x3c0(%rsp)
movapd %xmm0,0x3b0(%rsp)
movapd %xmm0,0x3a0(%rsp)
movapd %xmm0,0x390(%rsp)
movapd %xmm0,0x380(%rsp)
movapd %xmm0,0x370(%rsp)
movapd %xmm0,0x360(%rsp)
movapd %xmm0,0x350(%rsp)
movapd %xmm0,0x340(%rsp)
movapd %xmm0,0xa30(%rsp)
movapd %xmm0,0xa20(%rsp)
movapd %xmm0,0xa10(%rsp)
movapd %xmm0,0xa00(%rsp)
movapd %xmm0,0x9f0(%rsp)
movapd %xmm0,0x9e0(%rsp)
movapd %xmm0,0x9d0(%rsp)
movapd %xmm0,0x9c0(%rsp)
movapd %xmm0,0x9b0(%rsp)
movapd %xmm0,0x9a0(%rsp)
movapd %xmm0,0x990(%rsp)
movapd %xmm0,0x980(%rsp)
movapd %xmm0,0x970(%rsp)
movapd %xmm0,0x960(%rsp)
movapd %xmm0,0x950(%rsp)
movapd %xmm0,0x940(%rsp)
lea    0xa40(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   10c0 <memset@plt>
lea    0xc40(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   10c0 <memset@plt>
xorpd  %xmm0,%xmm0
movapd %xmm0,0x930(%rsp)
movapd %xmm0,0x920(%rsp)
movapd %xmm0,0x910(%rsp)
movapd %xmm0,0x900(%rsp)
movapd %xmm0,0x8f0(%rsp)
movapd %xmm0,0x8e0(%rsp)
movapd %xmm0,0x8d0(%rsp)
movapd %xmm0,0x8c0(%rsp)
movapd %xmm0,0x8b0(%rsp)
movapd %xmm0,0x8a0(%rsp)
movapd %xmm0,0x890(%rsp)
movapd %xmm0,0x880(%rsp)
movapd %xmm0,0x870(%rsp)
movapd %xmm0,0x860(%rsp)
movapd %xmm0,0x850(%rsp)
movapd %xmm0,0x840(%rsp)
lea    0xc2e(%rip),%rdi
lea    0xc03(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,%rbx
lea    0xbf6(%rip),%rbp
lea    0xbff(%rip),%rdx
lea    0x340(%rsp),%rcx
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x100,%r8d
xor    %r9d,%r9d
call   1030 <ezplib_get_attr_val@plt>
lea    0xbdc(%rip),%rdx
lea    0x940(%rsp),%rcx
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x100,%r8d
xor    %r9d,%r9d
call   1030 <ezplib_get_attr_val@plt>
movq   $0x0,0x138(%rsp)
cmpb   $0x0,0x340(%rsp)
je     149f <main+0x27f>
lea    0x340(%rsp),%rdi
lea    0x138(%rsp),%rsi
call   10d0 <base64decode@plt>
jmp    149f <main+0x27f>
mov    %rax,0x130(%rsp)
mov    0x2b3a(%rip),%rax
mov    (%rax),%edi
lea    0x10(%rsp),%rsi
call   1080 <clock_gettime@plt>
test   %rbx,%rbx
je     152a <main+0x30a>
lea    0xa40(%rsp),%r14
mov    %r14,%rdi
mov    $0x200,%esi
mov    %rbx,%rdx
call   10e0 <fgets@plt>
mov    %r14,%rdi
call   1070 <atof@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ebp
mov    %rbx,%rdi
call   1090 <fclose@plt>
movsd  0x10(%rsp),%xmm0
lea    0xb37(%rip),%rsi
mov    %r14,%rdi
mov    $0x1,%al
call   1140 <sprintf@plt>
mov    %r14,%rdi
call   10a0 <system@plt>
cmp    $0x12d,%ebp
jl     1551 <main+0x331>
lea    0xbf5(%rip),%rdi
call   1040 <unlink@plt>
jmp    1551 <main+0x331>
movsd  0x10(%rsp),%xmm0
lea    0xb02(%rip),%rsi
lea    0xa40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
lea    0xb02(%rip),%rdi
lea    0xac3(%rip),%rsi
call   1100 <popen@plt>
test   %rax,%rax
je     1f6b <main+0xd4b>
mov    %rax,%r15
lea    0xa40(%rsp),%rdi
mov    $0x200,%esi
mov    %rax,%rdx
call   10e0 <fgets@plt>
test   %rax,%rax
je     1652 <main+0x432>
lea    0xae2(%rip),%r14
lea    0x20(%rsp),%rbp
lea    0xa40(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%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)
movaps %xmm0,0x20(%rsp)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbp,%rdi
call   10a0 <system@plt>
mov    %rbx,%rdi
mov    $0x200,%esi
mov    %r15,%rdx
call   10e0 <fgets@plt>
test   %rax,%rax
jne    15b0 <main+0x390>
mov    %r15,%rdi
call   10b0 <pclose@plt>
lea    0xa3d(%rip),%rdi
call   10a0 <system@plt>
lea    0xaab(%rip),%rdi
call   1040 <unlink@plt>
lea    0xa52(%rip),%rdi
lea    0x9a2(%rip),%rsi
call   1110 <fopen@plt>
lea    0xc40(%rsp),%rdi
mov    $0x200,%esi
mov    %rax,0x128(%rsp)
mov    %rax,%rdx
call   10e0 <fgets@plt>
test   %rax,%rax
je     1cb5 <main+0xa95>
lea    0x96e(%rip),%r13
lea    0xc40(%rsp),%r14
lea    0x140(%rsp),%rbx
lea    0x937(%rip),%r15
jmp    1706 <main+0x4e6>
mov    %eax,%r12d
lea    0xc40(%rsp),%r14
lea    0x140(%rsp),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
mov    $0x200,%esi
mov    0x128(%rsp),%rdx
call   10e0 <fgets@plt>
mov    %r12d,%ecx
mov    %r12d,0x1c(%rsp)
test   %rax,%rax
je     1cb5 <main+0xa95>
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%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)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x330(%rsp)
movaps %xmm0,0x320(%rsp)
movaps %xmm0,0x310(%rsp)
movaps %xmm0,0x300(%rsp)
movaps %xmm0,0x2f0(%rsp)
movaps %xmm0,0x2e0(%rsp)
movaps %xmm0,0x2d0(%rsp)
movaps %xmm0,0x2c0(%rsp)
movaps %xmm0,0x2b0(%rsp)
movaps %xmm0,0x2a0(%rsp)
movaps %xmm0,0x290(%rsp)
movaps %xmm0,0x280(%rsp)
movaps %xmm0,0x270(%rsp)
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x830(%rsp)
movaps %xmm0,0x820(%rsp)
movaps %xmm0,0x810(%rsp)
movaps %xmm0,0x800(%rsp)
movaps %xmm0,0x7f0(%rsp)
movaps %xmm0,0x7e0(%rsp)
movaps %xmm0,0x7d0(%rsp)
movaps %xmm0,0x7c0(%rsp)
movaps %xmm0,0x7b0(%rsp)
movaps %xmm0,0x7a0(%rsp)
movaps %xmm0,0x790(%rsp)
movaps %xmm0,0x780(%rsp)
movaps %xmm0,0x770(%rsp)
movaps %xmm0,0x760(%rsp)
movaps %xmm0,0x750(%rsp)
movaps %xmm0,0x740(%rsp)
movaps %xmm0,0x730(%rsp)
movaps %xmm0,0x720(%rsp)
movaps %xmm0,0x710(%rsp)
movaps %xmm0,0x700(%rsp)
movaps %xmm0,0x6f0(%rsp)
movaps %xmm0,0x6e0(%rsp)
movaps %xmm0,0x6d0(%rsp)
movaps %xmm0,0x6c0(%rsp)
movaps %xmm0,0x6b0(%rsp)
movaps %xmm0,0x6a0(%rsp)
movaps %xmm0,0x690(%rsp)
movaps %xmm0,0x680(%rsp)
movaps %xmm0,0x670(%rsp)
movaps %xmm0,0x660(%rsp)
movaps %xmm0,0x650(%rsp)
movaps %xmm0,0x640(%rsp)
movaps %xmm0,0x630(%rsp)
movaps %xmm0,0x620(%rsp)
movaps %xmm0,0x610(%rsp)
movaps %xmm0,0x600(%rsp)
movaps %xmm0,0x5f0(%rsp)
movaps %xmm0,0x5e0(%rsp)
movaps %xmm0,0x5d0(%rsp)
movaps %xmm0,0x5c0(%rsp)
movaps %xmm0,0x5b0(%rsp)
movaps %xmm0,0x5a0(%rsp)
movaps %xmm0,0x590(%rsp)
movaps %xmm0,0x580(%rsp)
movaps %xmm0,0x570(%rsp)
movaps %xmm0,0x560(%rsp)
movaps %xmm0,0x550(%rsp)
movaps %xmm0,0x540(%rsp)
movaps %xmm0,0x530(%rsp)
movaps %xmm0,0x520(%rsp)
movaps %xmm0,0x510(%rsp)
movaps %xmm0,0x500(%rsp)
movaps %xmm0,0x4f0(%rsp)
movaps %xmm0,0x4e0(%rsp)
movaps %xmm0,0x4d0(%rsp)
movaps %xmm0,0x4c0(%rsp)
movaps %xmm0,0x4b0(%rsp)
movaps %xmm0,0x4a0(%rsp)
movaps %xmm0,0x490(%rsp)
movaps %xmm0,0x480(%rsp)
movaps %xmm0,0x470(%rsp)
movaps %xmm0,0x460(%rsp)
movaps %xmm0,0x450(%rsp)
movaps %xmm0,0x440(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movaps %xmm0,0x200(%rsp)
movaps %xmm0,0x1f0(%rsp)
movaps %xmm0,0x1e0(%rsp)
movaps %xmm0,0x1d0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm0,0x1b0(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
mov    %r14,%rdi
mov    %r13,%rsi
call   1120 <strtok@plt>
mov    $0x0,%r12d
test   %rax,%rax
je     1b20 <main+0x900>
xor    %r14d,%r14d
xor    %r12d,%r12d
jmp    1abb <main+0x89b>
mov    %rbx,%rdi
nopl   0x0(%rax)
mov    %rax,%rsi
call   1050 <strcpy@plt>
xor    %edi,%edi
mov    %r13,%rsi
call   1120 <strtok@plt>
add    $0x1,%r14d
test   %rax,%rax
je     1b20 <main+0x900>
cmp    $0x7,%r14d
ja     1aa8 <main+0x888>
mov    %r14d,%ecx
movslq (%r15,%rcx,4),%rcx
add    %r15,%rcx
jmp    *%rcx
lea    0x20(%rsp),%rdi
jmp    1aa0 <main+0x880>
lea    0x240(%rsp),%rdi
jmp    1aa0 <main+0x880>
lea    0x740(%rsp),%rdi
jmp    1aa0 <main+0x880>
lea    0x640(%rsp),%rdi
jmp    1aa0 <main+0x880>
mov    %rax,%rdi
call   1130 <atoi@plt>
mov    %eax,%r12d
jmp    1aa8 <main+0x888>
lea    0x540(%rsp),%rdi
jmp    1aa0 <main+0x880>
lea    0x440(%rsp),%rdi
jmp    1aa0 <main+0x880>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x240(%rsp),%rbp
mov    %rbp,%rdi
lea    0x840(%rsp),%rbx
mov    %rbx,%rsi
call   10f0 <strcmp@plt>
test   %eax,%eax
je     1bf0 <main+0x9d0>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1050 <strcpy@plt>
mov    0x130(%rsp),%rsi
test   %rsi,%rsi
je     1b6b <main+0x94b>
mov    %rbp,%rdi
call   10f0 <strcmp@plt>
test   %eax,%eax
je     1c32 <main+0xa12>
lea    -0x4c(%r12),%eax
mov    $0x4,%r13d
lea    0x5b5(%rip),%rsi
cmp    $0x19,%eax
lea    0xc40(%rsp),%r14
lea    0x140(%rsp),%rbx
jb     1c4c <main+0xa2c>
lea    -0x33(%r12),%eax
mov    $0x3,%r13d
lea    0x5b8(%rip),%rsi
cmp    $0x19,%eax
jb     1c4c <main+0xa2c>
lea    -0x1a(%r12),%eax
mov    $0x2,%r13d
lea    0x5cb(%rip),%rsi
cmp    $0x19,%eax
jb     1c4c <main+0xa2c>
lea    -0x1(%r12),%eax
mov    $0x1,%r13d
lea    0x5de(%rip),%rsi
cmp    $0x18,%eax
jbe    1c4c <main+0xa2c>
jmp    1c9c <main+0xa7c>
nopl   0x0(%rax,%rax,1)
mov    0x1c(%rsp),%eax
cmp    %eax,%r12d
jle    16cb <main+0x4ab>
cmpl   $0x0,0xc(%rsp)
je     1b43 <main+0x923>
lea    0xa40(%rsp),%r14
mov    %r14,%rdi
lea    0x4c4(%rip),%rsi
mov    0xc(%rsp),%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %r14,%rdi
call   10a0 <system@plt>
jmp    1b43 <main+0x923>
xor    %r13d,%r13d
lea    0x4ba(%rip),%rsi
lea    0xc40(%rsp),%r14
lea    0x140(%rsp),%rbx
lea    0xa40(%rsp),%rdi
lea    0x20(%rsp),%rdx
lea    0x240(%rsp),%rcx
lea    0x740(%rsp),%r8
lea    0x640(%rsp),%r9
xor    %eax,%eax
push   %rbx
mov    %rbx,%rbp
lea    0x448(%rsp),%rbx
push   %rbx
lea    0x550(%rsp),%rbx
push   %rbx
mov    %rbp,%rbx
push   %r12
call   1140 <sprintf@plt>
add    $0x20,%rsp
mov    %r13d,0xc(%rsp)
lea    0xa40(%rsp),%rdi
call   10a0 <system@plt>
lea    0x370(%rip),%r13
jmp    16e0 <main+0x4c0>
mov    0x128(%rsp),%rdi
call   1090 <fclose@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%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)
movaps %xmm0,0x20(%rsp)
lea    0x4b0(%rip),%r14
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
lea    0x4b7(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%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)
movaps %xmm0,0x20(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%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)
movaps %xmm0,0x20(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%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)
movaps %xmm0,0x20(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbx,%rdi
call   10a0 <system@plt>
jmp    1f77 <main+0xd57>
lea    0x2b4(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
add    $0xe48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { double }
@.str = [2 x i8] c"$\00"
@.str.1 = [20 x i8] c"/tmp/wifi_site_time\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [15 x i8] c"wl0_apcli_rule\00"
@.str.4 = [5 x i8] c"ssid\00"
@.str.5 = [6 x i8] c"bssid\00"
@CLOCK_PROCESS_CPUTIME_ID = global i32 0
@.str.6 = [33 x i8] c"echo '%ld' > /tmp/wifi_site_time\00"
@.str.7 = [26 x i8] c"/tmp/wifi_site_not_encode\00"
@.str.8 = [29 x i8] c"/sbin/getsysinfo site_survey\00"
@.str.9 = [27 x i8] c"getsysinfo execute error!\0A\00"
@.str.10 = [39 x i8] c"echo '%s' >> /tmp/wifi_site_not_encode\00"
@.str.11 = [64 x i8] c"sort -f -t$ -k2 /tmp/wifi_site_not_encode -o /tmp/wifi_site_tmp\00"
@.str.12 = [19 x i8] c"/tmp/wifi_site_tmp\00"
@.str.13 = [24 x i8] c"sed '$d' -i /tmp/wave%d\00"
@.str.14 = [60 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' > /tmp/wifi_site_not_encode\00"
@.str.15 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave4\00"
@.str.16 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave3\00"
@.str.17 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave2\00"
@.str.18 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave1\00"
@.str.19 = [45 x i8] c"cat /tmp/wave%d >> /tmp/wifi_site_not_encode\00"
@.str.20 = [15 x i8] c"rm /tmp/wave%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca [256 x i8]
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i64
%18 = alloca %struct.timespec
%19 = alloca double
%20 = alloca [256 x i8]
%21 = alloca [256 x i8]
%22 = alloca [256 x i8]
%23 = alloca [256 x i8]
%24 = alloca [256 x i8]
%25 = alloca [256 x i8]
%26 = alloca [256 x i8]
%27 = alloca [256 x i8]
%28 = alloca i32
%29 = alloca i32
%30 = alloca [256 x i8]
store i32 0, i32* %1
%31 = bitcast [256 x i8]* %3 to i8*
%32 = bitcast [256 x i8]* %4 to i8*
%33 = bitcast [512 x i8]* %5 to i8*
%34 = bitcast [512 x i8]* %6 to i8*
%35 = bitcast [256 x i8]* %7 to i8*
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %8
store i8* null, i8** %9
%36 = call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %36, i32** %15
%37 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%38 = call i32 @ezplib_get_attr_val(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %37, i32 256, i32 0)
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%40 = call i32 @ezplib_get_attr_val(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %39, i32 256, i32 0)
store i64 0, i64* %17
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %0
%46 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%47 = call i8* @base64decode(i8* %46, i64* %17)
store i8* %47, i8** %2
br label %48
48: ; preds = %45, %0
%49 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%50 = call i32 @clock_gettime(i32 %49, %struct.timespec* %18)
%51 = load i32*, i32** %15
%52 = icmp ne i32* %51, null
br i1 %52, label %53, label %66
53: ; preds = %48
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%55 = load i32*, i32** %15
%56 = call i32* @fgets(i8* %54, i32 512, i32* %55)
%57 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%58 = call double @atof(i8* %57)
store double %58, double* %19
%59 = getelementptr inbounds %struct.timespec, %struct.timespec* %18, i32 0, i32 0
%60 = load double, double* %59
%61 = load double, double* %19
%62 = fsub double %60, %61
%63 = fptosi double %62 to i32
store i32 %63, i32* %11
%64 = load i32*, i32** %15
%65 = call i32 @fclose(i32* %64)
br label %66
66: ; preds = %53, %48
%67 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%68 = getelementptr inbounds %struct.timespec, %struct.timespec* %18, i32 0, i32 0
%69 = load double, double* %68
%70 = call i32 (i8*, i8*, ...) @sprintf(i8* %67, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), double %69)
%71 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%72 = call i32 @system(i8* %71)
%73 = load i32, i32* %11
%74 = icmp sgt i32 %73, 300
br i1 %74, label %75, label %77
75: ; preds = %66
%76 = call i32 @unlink(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %77
77: ; preds = %75, %66
%78 = call i32* @popen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %78, i32** %14
%79 = icmp eq i32* %78, null
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %1
br label %299
82: ; preds = %77
br label %83
83: ; preds = %88, %82
%84 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%85 = load i32*, i32** %14
%86 = call i32* @fgets(i8* %84, i32 512, i32* %85)
%87 = icmp ne i32* %86, null
br i1 %87, label %88, label %95
88: ; preds = %83
%89 = bitcast [256 x i8]* %20 to i8*
%90 = getelementptr inbounds [256 x i8], [256 x i8]* %20, i64 0, i64 0
%91 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%92 = call i32 (i8*, i8*, ...) @sprintf(i8* %90, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0), i8* %91)
%93 = getelementptr inbounds [256 x i8], [256 x i8]* %20, i64 0, i64 0
%94 = call i32 @system(i8* %93)
br label %83
95: ; preds = %83
%96 = load i32*, i32** %14
%97 = call i32 @pclose(i32* %96)
%98 = call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.11, i64 0, i64 0))
%99 = call i32 @unlink(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%100 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %100, i32** %16
br label %101
101: ; preds = %274, %177, %95
%102 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%103 = load i32*, i32** %16
%104 = call i32* @fgets(i8* %102, i32 512, i32* %103)
%105 = icmp ne i32* %104, null
br i1 %105, label %106, label %277
106: ; preds = %101
%107 = bitcast [256 x i8]* %21 to i8*
%108 = bitcast [256 x i8]* %22 to i8*
%109 = bitcast [256 x i8]* %23 to i8*
%110 = bitcast [256 x i8]* %24 to i8*
%111 = bitcast [256 x i8]* %25 to i8*
%112 = bitcast [256 x i8]* %26 to i8*
%113 = bitcast [256 x i8]* %27 to i8*
store i32 0, i32* %28
%114 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%115 = load i8*, i8** %8
%116 = call i8* @strtok(i8* %114, i8* %115)
store i8* %116, i8** %9
store i32 0, i32* %29
br label %117
117: ; preds = %153, %106
%118 = load i8*, i8** %9
%119 = icmp ne i8* %118, null
br i1 %119, label %120, label %158
120: ; preds = %117
%121 = load i32, i32* %29
switch i32 %121, label %153 [
i32 0, label %122
i32 1, label %126
i32 2, label %130
i32 3, label %134
i32 4, label %138
i32 5, label %141
i32 6, label %145
i32 7, label %149
]
122: ; preds = %120
%123 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%124 = load i8*, i8** %9
%125 = call i32 @strcpy(i8* %123, i8* %124)
br label %153
126: ; preds = %120
%127 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%128 = load i8*, i8** %9
%129 = call i32 @strcpy(i8* %127, i8* %128)
br label %153
130: ; preds = %120
%131 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%132 = load i8*, i8** %9
%133 = call i32 @strcpy(i8* %131, i8* %132)
br label %153
134: ; preds = %120
%135 = getelementptr inbounds [256 x i8], [256 x i8]* %24, i64 0, i64 0
%136 = load i8*, i8** %9
%137 = call i32 @strcpy(i8* %135, i8* %136)
br label %153
138: ; preds = %120
%139 = load i8*, i8** %9
%140 = call i32 @atoi(i8* %139)
store i32 %140, i32* %28
br label %153
141: ; preds = %120
%142 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%143 = load i8*, i8** %9
%144 = call i32 @strcpy(i8* %142, i8* %143)
br label %153
145: ; preds = %120
%146 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%147 = load i8*, i8** %9
%148 = call i32 @strcpy(i8* %146, i8* %147)
br label %153
149: ; preds = %120
%150 = getelementptr inbounds [256 x i8], [256 x i8]* %27, i64 0, i64 0
%151 = load i8*, i8** %9
%152 = call i32 @strcpy(i8* %150, i8* %151)
br label %153
153: ; preds = %120, %149, %145, %141, %138, %134, %130, %126, %122
%154 = load i8*, i8** %8
%155 = call i8* @strtok(i8* null, i8* %154)
store i8* %155, i8** %9
%156 = load i32, i32* %29
%157 = add nsw i32 %156, 1
store i32 %157, i32* %29
br label %117
158: ; preds = %117
%159 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%160 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%161 = call i32 @strcmp(i8* %159, i8* %160)
%162 = icmp ne i32 %161, 0
br i1 %162, label %179, label %163
163: ; preds = %158
%164 = load i32, i32* %28
%165 = load i32, i32* %12
%166 = icmp sgt i32 %164, %165
br i1 %166, label %167, label %177
167: ; preds = %163
%168 = load i32, i32* %13
%169 = icmp ne i32 %168, 0
br i1 %169, label %170, label %176
170: ; preds = %167
%171 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%172 = load i32, i32* %13
%173 = call i32 (i8*, i8*, ...) @sprintf(i8* %171, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 %172)
%174 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%175 = call i32 @system(i8* %174)
br label %176
176: ; preds = %170, %167
br label %178
177: ; preds = %163
br label %101
178: ; preds = %176
br label %179
179: ; preds = %178, %158
%180 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%181 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%182 = call i32 @strcpy(i8* %180, i8* %181)
%183 = load i32, i32* %28
store i32 %183, i32* %12
%184 = load i8*, i8** %2
%185 = icmp ne i8* %184, null
br i1 %185, label %186, label %202
186: ; preds = %179
%187 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%188 = load i8*, i8** %2
%189 = call i32 @strcmp(i8* %187, i8* %188)
%190 = icmp ne i32 %189, 0
br i1 %190, label %202, label %191
191: ; preds = %186
%192 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%193 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%194 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%195 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%196 = getelementptr inbounds [256 x i8], [256 x i8]* %24, i64 0, i64 0
%197 = load i32, i32* %28
%198 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%199 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%200 = getelementptr inbounds [256 x i8], [256 x i8]* %27, i64 0, i64 0
%201 = call i32 (i8*, i8*, ...) @sprintf(i8* %192, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.14, i64 0, i64 0), i8* %193, i8* %194, i8* %195, i8* %196, i32 %197, i8* %198, i8* %199, i8* %200)
store i32 0, i32* %13
br label %274
202: ; preds = %186, %179
%203 = load i32, i32* %28
%204 = icmp sge i32 %203, 76
br i1 %204, label %205, label %219
205: ; preds = %202
%206 = load i32, i32* %28
%207 = icmp sle i32 %206, 100
br i1 %207, label %208, label %219
208: ; preds = %205
%209 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%210 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%211 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%212 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%213 = getelementptr inbounds [256 x i8], [256 x i8]* %24, i64 0, i64 0
%214 = load i32, i32* %28
%215 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%216 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%217 = getelementptr inbounds [256 x i8], [256 x i8]* %27, i64 0, i64 0
%218 = call i32 (i8*, i8*, ...) @sprintf(i8* %209, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.15, i64 0, i64 0), i8* %210, i8* %211, i8* %212, i8* %213, i32 %214, i8* %215, i8* %216, i8* %217)
store i32 4, i32* %13
br label %273
219: ; preds = %205, %202
%220 = load i32, i32* %28
%221 = icmp sge i32 %220, 51
br i1 %221, label %222, label %236
222: ; preds = %219
%223 = load i32, i32* %28
%224 = icmp sle i32 %223, 75
br i1 %224, label %225, label %236
225: ; preds = %222
%226 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%227 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%228 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%229 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%230 = getelementptr inbounds [256 x i8], [256 x i8]* %24, i64 0, i64 0
%231 = load i32, i32* %28
%232 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%233 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%234 = getelementptr inbounds [256 x i8], [256 x i8]* %27, i64 0, i64 0
%235 = call i32 (i8*, i8*, ...) @sprintf(i8* %226, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0), i8* %227, i8* %228, i8* %229, i8* %230, i32 %231, i8* %232, i8* %233, i8* %234)
store i32 3, i32* %13
br label %272
236: ; preds = %222, %219
%237 = load i32, i32* %28
%238 = icmp sge i32 %237, 26
br i1 %238, label %239, label %253
239: ; preds = %236
%240 = load i32, i32* %28
%241 = icmp sle i32 %240, 50
br i1 %241, label %242, label %253
242: ; preds = %239
%243 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%244 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%245 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%246 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%247 = getelementptr inbounds [256 x i8], [256 x i8]* %24, i64 0, i64 0
%248 = load i32, i32* %28
%249 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%250 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%251 = getelementptr inbounds [256 x i8], [256 x i8]* %27, i64 0, i64 0
%252 = call i32 (i8*, i8*, ...) @sprintf(i8* %243, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0), i8* %244, i8* %245, i8* %246, i8* %247, i32 %248, i8* %249, i8* %250, i8* %251)
store i32 2, i32* %13
br label %271
253: ; preds = %239, %236
%254 = load i32, i32* %28
%255 = icmp sgt i32 %254, 0
br i1 %255, label %256, label %270
256: ; preds = %253
%257 = load i32, i32* %28
%258 = icmp sle i32 %257, 25
br i1 %258, label %259, label %270
259: ; preds = %256
%260 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%261 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%262 = getelementptr inbounds [256 x i8], [256 x i8]* %22, i64 0, i64 0
%263 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%264 = getelementptr inbounds [256 x i8], [256 x i8]* %24, i64 0, i64 0
%265 = load i32, i32* %28
%266 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%267 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%268 = getelementptr inbounds [256 x i8], [256 x i8]* %27, i64 0, i64 0
%269 = call i32 (i8*, i8*, ...) @sprintf(i8* %260, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.18, i64 0, i64 0), i8* %261, i8* %262, i8* %263, i8* %264, i32 %265, i8* %266, i8* %267, i8* %268)
store i32 1, i32* %13
br label %270
270: ; preds = %259, %256, %253
br label %271
271: ; preds = %270, %242
br label %272
272: ; preds = %271, %225
br label %273
273: ; preds = %272, %208
br label %274
274: ; preds = %273, %191
%275 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%276 = call i32 @system(i8* %275)
br label %101
277: ; preds = %101
%278 = load i32*, i32** %16
%279 = call i32 @fclose(i32* %278)
store i32 4, i32* %10
br label %280
280: ; preds = %295, %277
%281 = load i32, i32* %10
%282 = icmp sge i32 %281, 1
br i1 %282, label %283, label %298
283: ; preds = %280
%284 = bitcast [256 x i8]* %30 to i8*
%285 = getelementptr inbounds [256 x i8], [256 x i8]* %30, i64 0, i64 0
%286 = load i32, i32* %10
%287 = call i32 (i8*, i8*, ...) @sprintf(i8* %285, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.19, i64 0, i64 0), i32 %286)
%288 = getelementptr inbounds [256 x i8], [256 x i8]* %30, i64 0, i64 0
%289 = call i32 @system(i8* %288)
%290 = getelementptr inbounds [256 x i8], [256 x i8]* %30, i64 0, i64 0
%291 = load i32, i32* %10
%292 = call i32 (i8*, i8*, ...) @sprintf(i8* %290, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), i32 %291)
%293 = getelementptr inbounds [256 x i8], [256 x i8]* %30, i64 0, i64 0
%294 = call i32 @system(i8* %293)
br label %295
295: ; preds = %283
%296 = load i32, i32* %10
%297 = add nsw i32 %296, -1
store i32 %297, i32* %10
br label %280
298: ; preds = %280
store i32 0, i32* %1
br label %299
299: ; preds = %298, %80
%300 = load i32, i32* %1
ret i32 %300
}

LLVM IR (-O2):
%struct.timespec = type { double }
@.str = [2 x i8] c"$\00"
@.str.1 = [20 x i8] c"/tmp/wifi_site_time\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [15 x i8] c"wl0_apcli_rule\00"
@.str.4 = [5 x i8] c"ssid\00"
@.str.5 = [6 x i8] c"bssid\00"
@CLOCK_PROCESS_CPUTIME_ID = global i32 0
@.str.6 = [33 x i8] c"echo '%ld' > /tmp/wifi_site_time\00"
@.str.7 = [26 x i8] c"/tmp/wifi_site_not_encode\00"
@.str.8 = [29 x i8] c"/sbin/getsysinfo site_survey\00"
@.str.10 = [39 x i8] c"echo '%s' >> /tmp/wifi_site_not_encode\00"
@.str.11 = [64 x i8] c"sort -f -t$ -k2 /tmp/wifi_site_not_encode -o /tmp/wifi_site_tmp\00"
@.str.12 = [19 x i8] c"/tmp/wifi_site_tmp\00"
@.str.13 = [24 x i8] c"sed '$d' -i /tmp/wave%d\00"
@.str.14 = [60 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' > /tmp/wifi_site_not_encode\00"
@.str.15 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave4\00"
@.str.16 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave3\00"
@.str.17 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave2\00"
@.str.18 = [46 x i8] c"echo '%s$%s$%s$%s$%d$%s$%s$%s$' >> /tmp/wave1\00"
@.str.19 = [45 x i8] c"cat /tmp/wave%d >> /tmp/wifi_site_not_encode\00"
@.str.20 = [15 x i8] c"rm /tmp/wave%d\00"
@str = [26 x i8] c"getsysinfo execute error!\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [256 x i8]
%6 = alloca i64
%7 = alloca %struct.timespec
%8 = alloca [256 x i8]
%9 = alloca [256 x i8]
%10 = alloca [256 x i8]
%11 = alloca [256 x i8]
%12 = alloca [256 x i8]
%13 = alloca [256 x i8]
%14 = alloca [256 x i8]
%15 = alloca [256 x i8]
%16 = alloca [256 x i8]
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%22 = tail call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @ezplib_get_attr_val(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %17, i32 256, i32 0)
%24 = call i32 @ezplib_get_attr_val(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %18, i32 256, i32 0)
%25 = bitcast i64* %6 to i8*
store i64 0, i64* %6
%26 = load i8, i8* %17
%27 = icmp eq i8 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %0
%29 = call i8* @base64decode(i8* %17, i64* %6)
br label %30
30: ; preds = %28, %0
%31 = phi i8* [ %29, %28 ], [ undef, %0 ]
%32 = bitcast %struct.timespec* %7 to i8*
%33 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%34 = call i32 @clock_gettime(i32 %33, %struct.timespec* %7)
%35 = icmp eq i32* %22, null
br i1 %35, label %51, label %36
36: ; preds = %30
%37 = call i32* @fgets(i8* %19, i32 512, i32* %22)
%38 = call double @atof(i8* %19)
%39 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i64 0, i32 0
%40 = load double, double* %39
%41 = fsub double %40, %38
%42 = fptosi double %41 to i32
%43 = call i32 @fclose(i32* %22)
%44 = icmp sgt i32 %42, 300
%45 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i64 0, i32 0
%46 = load double, double* %45
%47 = call i32 (i8*, i8*, ...) @sprintf(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), double %46)
%48 = call i32 @system(i8* %19)
br i1 %44, label %49, label %56
49: ; preds = %36
%50 = call i32 @unlink(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %56
51: ; preds = %30
%52 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i64 0, i32 0
%53 = load double, double* %52
%54 = call i32 (i8*, i8*, ...) @sprintf(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), double %53)
%55 = call i32 @system(i8* %19)
br label %56
56: ; preds = %51, %49, %36
%57 = call i32* @popen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%58 = icmp eq i32* %57, null
br i1 %58, label %64, label %59
59: ; preds = %56
%60 = call i32* @fgets(i8* %19, i32 512, i32* %57)
%61 = icmp eq i32* %60, null
br i1 %61, label %71, label %62
62: ; preds = %59
%63 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
br label %66
64: ; preds = %56
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %176
66: ; preds = %62, %66
%67 = call i32 (i8*, i8*, ...) @sprintf(i8* %63, i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0), i8* %19)
%68 = call i32 @system(i8* %63)
%69 = call i32* @fgets(i8* %19, i32 512, i32* %57)
%70 = icmp eq i32* %69, null
br i1 %70, label %71, label %66
71: ; preds = %66, %59
%72 = call i32 @pclose(i32* %57)
%73 = call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.11, i64 0, i64 0))
%74 = call i32 @unlink(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%75 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%76 = call i32* @fgets(i8* %20, i32 512, i32* %75)
%77 = icmp eq i32* %76, null
br i1 %77, label %157, label %78
78: ; preds = %71
%79 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%80 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%81 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%82 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%83 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%84 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%85 = getelementptr inbounds [256 x i8], [256 x i8]* %15, i64 0, i64 0
%86 = icmp eq i8* %31, null
br label %87
87: ; preds = %78, %152
%88 = phi i32 [ undef, %78 ], [ %154, %152 ]
%89 = phi i32 [ undef, %78 ], [ %153, %152 ]
%90 = call i8* @strtok(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%91 = icmp eq i8* %90, null
br i1 %91, label %117, label %92
92: ; preds = %87, %112
%93 = phi i32 [ %115, %112 ], [ 0, %87 ]
%94 = phi i32 [ %113, %112 ], [ 0, %87 ]
%95 = phi i8* [ %114, %112 ], [ %90, %87 ]
switch i32 %93, label %112 [
i32 0, label %96
i32 1, label %98
i32 2, label %100
i32 3, label %102
i32 4, label %104
i32 5, label %106
i32 6, label %108
i32 7, label %110
]
96: ; preds = %92
%97 = call i32 @strcpy(i8* %79, i8* %95)
br label %112
98: ; preds = %92
%99 = call i32 @strcpy(i8* %80, i8* %95)
br label %112
100: ; preds = %92
%101 = call i32 @strcpy(i8* %81, i8* %95)
br label %112
102: ; preds = %92
%103 = call i32 @strcpy(i8* %82, i8* %95)
br label %112
104: ; preds = %92
%105 = call i32 @atoi(i8* %95)
br label %112
106: ; preds = %92
%107 = call i32 @strcpy(i8* %83, i8* %95)
br label %112
108: ; preds = %92
%109 = call i32 @strcpy(i8* %84, i8* %95)
br label %112
110: ; preds = %92
%111 = call i32 @strcpy(i8* %85, i8* %95)
br label %112
112: ; preds = %92, %110, %108, %106, %104, %102, %100, %98, %96
%113 = phi i32 [ %94, %92 ], [ %94, %110 ], [ %94, %108 ], [ %94, %106 ], [ %105, %104 ], [ %94, %102 ], [ %94, %100 ], [ %94, %98 ], [ %94, %96 ]
%114 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%115 = add nuw nsw i32 %93, 1
%116 = icmp eq i8* %114, null
br i1 %116, label %117, label %92
117: ; preds = %112, %87
%118 = phi i32 [ 0, %87 ], [ %113, %112 ]
%119 = call i32 @strcmp(i8* %80, i8* %21)
%120 = icmp eq i32 %119, 0
br i1 %120, label %121, label %128
121: ; preds = %117
%122 = icmp sgt i32 %118, %89
br i1 %122, label %123, label %152
123: ; preds = %121
%124 = icmp eq i32 %88, 0
br i1 %124, label %128, label %125
125: ; preds = %123
%126 = call i32 (i8*, i8*, ...) @sprintf(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 %88)
%127 = call i32 @system(i8* %19)
br label %128
128: ; preds = %125, %123, %117
%129 = call i32 @strcpy(i8* %21, i8* %80)
br i1 %86, label %133, label %130
130: ; preds = %128
%131 = call i32 @strcmp(i8* %80, i8* %31)
%132 = icmp eq i32 %131, 0
br i1 %132, label %145, label %133
133: ; preds = %130, %128
%134 = add i32 %118, -76
%135 = icmp ult i32 %134, 25
br i1 %135, label %145, label %136
136: ; preds = %133
%137 = add i32 %118, -51
%138 = icmp ult i32 %137, 25
br i1 %138, label %145, label %139
139: ; preds = %136
%140 = add i32 %118, -26
%141 = icmp ult i32 %140, 25
br i1 %141, label %145, label %142
142: ; preds = %139
%143 = add i32 %118, -1
%144 = icmp ult i32 %143, 25
br i1 %144, label %145, label %149
145: ; preds = %142, %139, %136, %133, %130
%146 = phi i8* [ getelementptr inbounds ([60 x i8], [60 x i8]* @.str.14, i64 0, i64 0), %130 ], [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.15, i64 0, i64 0), %133 ], [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0), %136 ], [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0), %139 ], [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.18, i64 0, i64 0), %142 ]
%147 = phi i32 [ 0, %130 ], [ 4, %133 ], [ 3, %136 ], [ 2, %139 ], [ 1, %142 ]
%148 = call i32 (i8*, i8*, ...) @sprintf(i8* %19, i8* dereferenceable(1) %146, i8* %79, i8* %80, i8* %81, i8* %82, i32 %118, i8* %83, i8* %84, i8* %85)
br label %149
149: ; preds = %145, %142
%150 = phi i32 [ %88, %142 ], [ %147, %145 ]
%151 = call i32 @system(i8* %19)
br label %152
152: ; preds = %121, %149
%153 = phi i32 [ %118, %149 ], [ %89, %121 ]
%154 = phi i32 [ %150, %149 ], [ %88, %121 ]
%155 = call i32* @fgets(i8* %20, i32 512, i32* %75)
%156 = icmp eq i32* %155, null
br i1 %156, label %157, label %87
157: ; preds = %152, %71
%158 = call i32 @fclose(i32* %75)
%159 = getelementptr inbounds [256 x i8], [256 x i8]* %16, i64 0, i64 0
%160 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.19, i64 0, i64 0), i32 4)
%161 = call i32 @system(i8* %159)
%162 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), i32 4)
%163 = call i32 @system(i8* %159)
%164 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.19, i64 0, i64 0), i32 3)
%165 = call i32 @system(i8* %159)
%166 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), i32 3)
%167 = call i32 @system(i8* %159)
%168 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.19, i64 0, i64 0), i32 2)
%169 = call i32 @system(i8* %159)
%170 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), i32 2)
%171 = call i32 @system(i8* %159)
%172 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.19, i64 0, i64 0), i32 1)
%173 = call i32 @system(i8* %159)
%174 = call i32 (i8*, i8*, ...) @sprintf(i8* %159, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), i32 1)
%175 = call i32 @system(i8* %159)
br label %176
176: ; preds = %157, %64
ret i32 0
}