#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*/ buffer3;
typedef int /*<<< orphan*/ buffer2;
typedef int /*<<< orphan*/ buffer1;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ geteuid();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, ...);
scalar_t__ system(char *);
int main(int argc, char **argv) {
  int mode, channel;
  char dev[56];
  char buffer[256];
  char buffer1[256];
  char buffer2[256];
  char buffer3[256];
  if (geteuid() != 0) {
    printf("\nrun as root\n");
    exit(1);
  }
  system("ifconfig");
  printf("choose a device for setting:");
  scanf("%s", dev);
  printf("for monitor mode press 1\nfor managed mode press 2\nfor changing mac "
         "press 3\n");
  scanf("%d", &mode);
  printf("\nEISOREOOOOOS!!\n");
  sleep(1);
  if (mode == 1) {
    printf("setting monitor...\n");
    printf("choose the channel you want to set...for default enter '1821' :");
    scanf("%d", &channel);
    if (channel == 1821)
      goto label;
    system("sudo service network-manager stop");
    sleep(2);
    snprintf(buffer, sizeof(buffer), "ifconfig  %s down", dev);
    if (system(buffer) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(1);
    snprintf(buffer1, sizeof(buffer1), "iwconfig  %s  mode managed", dev);
    if (system(buffer1) < 0) {
      perror(buffer1);
      exit(1);
    }
    sleep(1);
    snprintf(buffer3, sizeof(buffer3), "ifconfig  %s  up", dev);
    if (system(buffer3) < 0) {
      perror(buffer3);
      exit(1);
    }
    sleep(3);
    snprintf(buffer2, sizeof(buffer2), "iwconfig  %s  channel %d", dev,
             channel);
    if (system(buffer2) < 0) {
      perror(buffer2);
      exit(1);
    }
    sleep(2);
  label:
    snprintf(buffer, sizeof(buffer), "ifconfig  %s down", dev);
    if (system(buffer) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(3);
    snprintf(buffer1, sizeof(buffer1), "iwconfig  %s  mode monitor", dev);
    if (system(buffer1) < 0) {
      perror(buffer1);
      exit(1);
    }
    sleep(1);
    snprintf(buffer3, sizeof(buffer3), "ifconfig  %s  up", dev);
    if (system(buffer3) < 0) {
      perror(buffer3);
      exit(1);
    }
    sleep(1);
    system("service network-manager start");
    sleep(1);
    system("iwconfig");
  } else if (mode == 2) {
    printf("setting managed...\n");
    system("sudo service network-manager stop");
    sleep(1);
    snprintf(buffer, sizeof(buffer), "ifconfig  %s  down", dev);
    if (system(buffer) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(1);
    snprintf(buffer1, sizeof(buffer1), "iwconfig  %s  mode managed", dev);
    if (system(buffer1) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(1);
    snprintf(buffer2, sizeof(buffer2), "ifconfig  %s  up", dev);
    if (system(buffer2) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(1);
    system("service network-manager start");
    sleep(1);
    snprintf(buffer2, sizeof(buffer2), "iwconfig  %s  channel auto", dev);
    if (system(buffer2) < 0) {
      perror(buffer2);
      exit(1);
    }
    sleep(1);
    system("iwconfig");
  } else if (mode == 3) {
    printf("changing mac...\n");
    system("sudo service network-manager stop");
    sleep(1);
    snprintf(buffer, sizeof(buffer), "ifconfig  %s  down", dev);
    if (system(buffer) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(1);
    snprintf(buffer, sizeof(buffer), "macchanger  -A  %s", dev);
    if (system(buffer) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(1);
    snprintf(buffer2, sizeof(buffer2), "ifconfig  %s  up", dev);
    if (system(buffer2) < 0) {
      perror(buffer);
      exit(1);
    }
    sleep(1);
    system("service network-manager start");
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <geteuid@plt>
cmp    $0x0,%rax
je     11c0 <main+0x40>
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xe47(%rip),%rdi
call   1030 <system@plt>
lea    0xe44(%rip),%rdi
call   1040 <printf@plt>
lea    -0x50(%rbp),%rsi
lea    0x1020(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xe43(%rip),%rdi
call   1040 <printf@plt>
lea    0xf5e(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
cmpl   $0x1,-0x14(%rbp)
jne    14f1 <main+0x371>
lea    0xe62(%rip),%rdi
call   1040 <printf@plt>
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
lea    0xf14(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
cmpl   $0x71d,-0x18(%rbp)
jne    1264 <main+0xe4>
jmp    13ce <main+0x24e>
lea    0xe7a(%rip),%rdi
call   1030 <system@plt>
mov    $0x2,%edi
call   10a0 <sleep@plt>
lea    -0x150(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xe76(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    12c4 <main+0x144>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x250(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xe34(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x250(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    1318 <main+0x198>
lea    -0x250(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x450(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xdfb(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x450(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    136c <main+0x1ec>
lea    -0x450(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x3,%edi
call   10a0 <sleep@plt>
lea    -0x350(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    -0x18(%rbp),%r8d
mov    $0x100,%esi
lea    0xdb4(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x350(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    13c4 <main+0x244>
lea    -0x350(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x2,%edi
call   10a0 <sleep@plt>
lea    -0x150(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xd22(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    1418 <main+0x298>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x3,%edi
call   10a0 <sleep@plt>
lea    -0x250(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xd25(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x250(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    146c <main+0x2ec>
lea    -0x250(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x450(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xca7(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x450(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    14c0 <main+0x340>
lea    -0x450(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    0xca8(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    0xcb0(%rip),%rdi
call   1030 <system@plt>
jmp    17dc <main+0x65c>
cmpl   $0x2,-0x14(%rbp)
jne    1694 <main+0x514>
lea    0xc9e(%rip),%rdi
call   1040 <printf@plt>
lea    0xbd7(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x150(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xc80(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    1567 <main+0x3e7>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x250(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xb91(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x250(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    15bb <main+0x43b>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x350(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xb58(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x350(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    160f <main+0x48f>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    0xb59(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x350(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xb81(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x350(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    1679 <main+0x4f9>
lea    -0x350(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    0xb0d(%rip),%rdi
call   1030 <system@plt>
jmp    17d7 <main+0x657>
cmpl   $0x3,-0x14(%rbp)
jne    17d2 <main+0x652>
lea    0xb3d(%rip),%rdi
call   1040 <printf@plt>
lea    0xa34(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x150(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xadd(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    170a <main+0x58a>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x150(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0xac8(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    175e <main+0x5de>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    -0x350(%rbp),%rdi
lea    -0x50(%rbp),%rcx
mov    $0x100,%esi
lea    0x9b5(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x350(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jge    17b2 <main+0x632>
lea    -0x150(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    0x9b6(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
jmp    17d7 <main+0x657>
jmp    17dc <main+0x65c>
xor    %eax,%eax
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x450,%rsp
xor    %eax,%eax
call   1070 <geteuid@plt>
test   %rax,%rax
jne    1679 <main+0x4e9>
lea    0xe51(%rip),%rdi
call   1040 <system@plt>
lea    0xe4e(%rip),%rdi
call   1050 <printf@plt>
lea    0xf98(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xf88(%rip),%rdi
call   1030 <puts@plt>
lea    0xef6(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
mov    0xc(%rsp),%eax
cmp    $0x3,%eax
je     1438 <main+0x2a8>
cmp    $0x2,%eax
je     1529 <main+0x399>
cmp    $0x1,%eax
jne    165a <main+0x4ca>
lea    0xfb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xdec(%rip),%rdi
call   1050 <printf@plt>
lea    0xe96(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
cmpl   $0x71d,0x8(%rsp)
je     1370 <main+0x1e0>
lea    0xdff(%rip),%rdi
call   1040 <system@plt>
mov    $0x2,%edi
call   10b0 <sleep@plt>
lea    0xe0b(%rip),%rdx
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xde2(%rip),%rdx
lea    0x250(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     168f <main+0x4ff>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xdbf(%rip),%rdx
lea    0x350(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1699 <main+0x509>
mov    $0x3,%edi
call   10b0 <sleep@plt>
mov    0x8(%rsp),%r8d
lea    0xd8d(%rip),%rdx
lea    0x150(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     16a3 <main+0x513>
mov    $0x2,%edi
call   10b0 <sleep@plt>
lea    0xd11(%rip),%rdx
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x3,%edi
call   10b0 <sleep@plt>
lea    0xd2d(%rip),%rdx
lea    0x250(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     168f <main+0x4ff>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xcc5(%rip),%rdx
lea    0x350(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1699 <main+0x509>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xccc(%rip),%rdi
call   1040 <system@plt>
jmp    1644 <main+0x4b4>
lea    0xd7e(%rip),%rdi
call   1030 <puts@plt>
lea    0xc1b(%rip),%rdi
call   1040 <system@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xcc0(%rip),%rdx
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xcb3(%rip),%rdx
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xbde(%rip),%rdx
lea    0x150(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xbe5(%rip),%rdi
call   1040 <system@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
jmp    165a <main+0x4ca>
lea    0xc9d(%rip),%rdi
call   1030 <puts@plt>
lea    0xb2a(%rip),%rdi
call   1040 <system@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xbcf(%rip),%rdx
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xb0d(%rip),%rdx
lea    0x250(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xaea(%rip),%rdx
lea    0x150(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     1665 <main+0x4d5>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xaf5(%rip),%rdi
call   1040 <system@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xb19(%rip),%rdx
lea    0x150(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
test   %rax,%rax
js     16a3 <main+0x513>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xac3(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x450,%rsp
pop    %rbx
ret
lea    0x50(%rsp),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0xb73(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0x250(%rsp),%rdi
jmp    166a <main+0x4da>
lea    0x350(%rsp),%rdi
jmp    166a <main+0x4da>
lea    0x150(%rsp),%rdi
jmp    166a <main+0x4da>

LLVM IR (-O0):
@.str = [14 x i8] c"\0Arun as root\0A\00"
@.str.1 = [9 x i8] c"ifconfig\00"
@.str.2 = [29 x i8] c"choose a device for setting:\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [76 x i8] c"for monitor mode press 1\0Afor managed mode press 2\0Afor changing mac press 3\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [17 x i8] c"\0AEISOREOOOOOS!!\0A\00"
@.str.7 = [20 x i8] c"setting monitor...\0A\00"
@.str.8 = [64 x i8] c"choose the channel you want to set...for default enter '1821' :\00"
@.str.9 = [34 x i8] c"sudo service network-manager stop\00"
@.str.10 = [18 x i8] c"ifconfig %s down\00"
@.str.11 = [27 x i8] c"iwconfig %s mode managed\00"
@.str.12 = [17 x i8] c"ifconfig %s up\00"
@.str.13 = [25 x i8] c"iwconfig %s channel %d\00"
@.str.14 = [27 x i8] c"iwconfig %s mode monitor\00"
@.str.15 = [30 x i8] c"service network-manager start\00"
@.str.16 = [9 x i8] c"iwconfig\00"
@.str.17 = [20 x i8] c"setting managed...\0A\00"
@.str.18 = [19 x i8] c"ifconfig %s down\00"
@.str.19 = [27 x i8] c"iwconfig %s channel auto\00"
@.str.20 = [17 x i8] c"changing mac...\0A\00"
@.str.21 = [19 x i8] c"macchanger -A %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [56 x i8]
%9 = alloca [256 x i8]
%10 = alloca [256 x i8]
%11 = alloca [256 x i8]
%12 = alloca [256 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call i64 (...) @geteuid()
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%21 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %6)
%25 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%26 = call i32 @sleep(i32 1)
%27 = load i32, i32* %6
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %128
29: ; preds = %18
%30 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0))
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %7)
%33 = load i32, i32* %7
%34 = icmp eq i32 %33, 1821
br i1 %34, label %35, label %36
35: ; preds = %29
br label %88
36: ; preds = %29
%37 = call i64 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%38 = call i32 @sleep(i32 2)
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%40 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%41 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %39, i32 256, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %40)
%42 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%43 = call i64 @system(i8* %42)
%44 = icmp slt i64 %43, 0
br i1 %44, label %45, label %49
45: ; preds = %36
%46 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%47 = call i32 @perror(i8* %46)
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %36
%50 = call i32 @sleep(i32 1)
%51 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%52 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%53 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %51, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* %52)
%54 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%55 = call i64 @system(i8* %54)
%56 = icmp slt i64 %55, 0
br i1 %56, label %57, label %61
57: ; preds = %49
%58 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%59 = call i32 @perror(i8* %58)
%60 = call i32 @exit(i32 1)
unreachable
61: ; preds = %49
%62 = call i32 @sleep(i32 1)
%63 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%64 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%65 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %63, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %64)
%66 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%67 = call i64 @system(i8* %66)
%68 = icmp slt i64 %67, 0
br i1 %68, label %69, label %73
69: ; preds = %61
%70 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%71 = call i32 @perror(i8* %70)
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %61
%74 = call i32 @sleep(i32 3)
%75 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%76 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%77 = load i32, i32* %7
%78 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %75, i32 256, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* %76, i32 %77)
%79 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%80 = call i64 @system(i8* %79)
%81 = icmp slt i64 %80, 0
br i1 %81, label %82, label %86
82: ; preds = %73
%83 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%84 = call i32 @perror(i8* %83)
%85 = call i32 @exit(i32 1)
unreachable
86: ; preds = %73
%87 = call i32 @sleep(i32 2)
br label %88
88: ; preds = %86, %35
%89 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%90 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%91 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %89, i32 256, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %90)
%92 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%93 = call i64 @system(i8* %92)
%94 = icmp slt i64 %93, 0
br i1 %94, label %95, label %99
95: ; preds = %88
%96 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%97 = call i32 @perror(i8* %96)
%98 = call i32 @exit(i32 1)
unreachable
99: ; preds = %88
%100 = call i32 @sleep(i32 3)
%101 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%102 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%103 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %101, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i8* %102)
%104 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%105 = call i64 @system(i8* %104)
%106 = icmp slt i64 %105, 0
br i1 %106, label %107, label %111
107: ; preds = %99
%108 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%109 = call i32 @perror(i8* %108)
%110 = call i32 @exit(i32 1)
unreachable
111: ; preds = %99
%112 = call i32 @sleep(i32 1)
%113 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%114 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%115 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %113, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %114)
%116 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%117 = call i64 @system(i8* %116)
%118 = icmp slt i64 %117, 0
br i1 %118, label %119, label %123
119: ; preds = %111
%120 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%121 = call i32 @perror(i8* %120)
%122 = call i32 @exit(i32 1)
unreachable
123: ; preds = %111
%124 = call i32 @sleep(i32 1)
%125 = call i64 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%126 = call i32 @sleep(i32 1)
%127 = call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
br label %233
128: ; preds = %18
%129 = load i32, i32* %6
%130 = icmp eq i32 %129, 2
br i1 %130, label %131, label %186
131: ; preds = %128
%132 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0))
%133 = call i64 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%134 = call i32 @sleep(i32 1)
%135 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%136 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%137 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %135, i32 256, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %136)
%138 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%139 = call i64 @system(i8* %138)
%140 = icmp slt i64 %139, 0
br i1 %140, label %141, label %145
141: ; preds = %131
%142 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%143 = call i32 @perror(i8* %142)
%144 = call i32 @exit(i32 1)
unreachable
145: ; preds = %131
%146 = call i32 @sleep(i32 1)
%147 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%148 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%149 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %147, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* %148)
%150 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%151 = call i64 @system(i8* %150)
%152 = icmp slt i64 %151, 0
br i1 %152, label %153, label %157
153: ; preds = %145
%154 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%155 = call i32 @perror(i8* %154)
%156 = call i32 @exit(i32 1)
unreachable
157: ; preds = %145
%158 = call i32 @sleep(i32 1)
%159 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%160 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%161 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %159, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %160)
%162 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%163 = call i64 @system(i8* %162)
%164 = icmp slt i64 %163, 0
br i1 %164, label %165, label %169
165: ; preds = %157
%166 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%167 = call i32 @perror(i8* %166)
%168 = call i32 @exit(i32 1)
unreachable
169: ; preds = %157
%170 = call i32 @sleep(i32 1)
%171 = call i64 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%172 = call i32 @sleep(i32 1)
%173 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%174 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%175 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %173, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0), i8* %174)
%176 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%177 = call i64 @system(i8* %176)
%178 = icmp slt i64 %177, 0
br i1 %178, label %179, label %183
179: ; preds = %169
%180 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%181 = call i32 @perror(i8* %180)
%182 = call i32 @exit(i32 1)
unreachable
183: ; preds = %169
%184 = call i32 @sleep(i32 1)
%185 = call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
br label %232
186: ; preds = %128
%187 = load i32, i32* %6
%188 = icmp eq i32 %187, 3
br i1 %188, label %189, label %231
189: ; preds = %186
%190 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0))
%191 = call i64 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%192 = call i32 @sleep(i32 1)
%193 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%194 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%195 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %193, i32 256, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %194)
%196 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%197 = call i64 @system(i8* %196)
%198 = icmp slt i64 %197, 0
br i1 %198, label %199, label %203
199: ; preds = %189
%200 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%201 = call i32 @perror(i8* %200)
%202 = call i32 @exit(i32 1)
unreachable
203: ; preds = %189
%204 = call i32 @sleep(i32 1)
%205 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%206 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%207 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %205, i32 256, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i8* %206)
%208 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%209 = call i64 @system(i8* %208)
%210 = icmp slt i64 %209, 0
br i1 %210, label %211, label %215
211: ; preds = %203
%212 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%213 = call i32 @perror(i8* %212)
%214 = call i32 @exit(i32 1)
unreachable
215: ; preds = %203
%216 = call i32 @sleep(i32 1)
%217 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%218 = getelementptr inbounds [56 x i8], [56 x i8]* %8, i64 0, i64 0
%219 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %217, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %218)
%220 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%221 = call i64 @system(i8* %220)
%222 = icmp slt i64 %221, 0
br i1 %222, label %223, label %227
223: ; preds = %215
%224 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%225 = call i32 @perror(i8* %224)
%226 = call i32 @exit(i32 1)
unreachable
227: ; preds = %215
%228 = call i32 @sleep(i32 1)
%229 = call i64 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%230 = call i32 @sleep(i32 1)
br label %231
231: ; preds = %227, %186
br label %232
232: ; preds = %231, %183
br label %233
233: ; preds = %232, %123
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"ifconfig\00"
@.str.2 = [29 x i8] c"choose a device for setting:\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.8 = [64 x i8] c"choose the channel you want to set...for default enter '1821' :\00"
@.str.9 = [34 x i8] c"sudo service network-manager stop\00"
@.str.10 = [18 x i8] c"ifconfig %s down\00"
@.str.11 = [27 x i8] c"iwconfig %s mode managed\00"
@.str.12 = [17 x i8] c"ifconfig %s up\00"
@.str.13 = [25 x i8] c"iwconfig %s channel %d\00"
@.str.14 = [27 x i8] c"iwconfig %s mode monitor\00"
@.str.15 = [30 x i8] c"service network-manager start\00"
@.str.16 = [9 x i8] c"iwconfig\00"
@.str.18 = [19 x i8] c"ifconfig %s down\00"
@.str.19 = [27 x i8] c"iwconfig %s channel auto\00"
@.str.21 = [19 x i8] c"macchanger -A %s\00"
@str = [75 x i8] c"for monitor mode press 1\0Afor managed mode press 2\0Afor changing mac press 3\00"
@str.22 = [16 x i8] c"\0AEISOREOOOOOS!!\00"
@str.23 = [16 x i8] c"changing mac...\00"
@str.24 = [19 x i8] c"setting managed...\00"
@str.25 = [19 x i8] c"setting monitor...\00"
@str.26 = [13 x i8] c"\0Arun as root\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [56 x i8]
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = alloca [256 x i8]
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = getelementptr inbounds [56 x i8], [56 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%17 = tail call i64 (...) @geteuid()
%18 = icmp eq i64 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %2
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.26, i64 0, i64 0))
%21 = tail call i32 @exit(i32 1)
unreachable
22: ; preds = %2
%23 = tail call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%24 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %12)
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %3)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.22, i64 0, i64 0))
%29 = call i32 @sleep(i32 1)
%30 = load i32, i32* %3
switch i32 %30, label %170 [
i32 1, label %31
i32 2, label %101
i32 3, label %140
]
31: ; preds = %22
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.25, i64 0, i64 0))
%33 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0))
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %4)
%35 = load i32, i32* %4
%36 = icmp eq i32 %35, 1821
br i1 %36, label %73, label %37
37: ; preds = %31
%38 = call i64 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%39 = call i32 @sleep(i32 2)
%40 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %13, i32 256, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %12)
%41 = call i64 @system(i8* %13)
%42 = icmp slt i64 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %37
%44 = call i32 @perror(i8* %13)
%45 = call i32 @exit(i32 1)
unreachable
46: ; preds = %37
%47 = call i32 @sleep(i32 1)
%48 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %14, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* %12)
%49 = call i64 @system(i8* %14)
%50 = icmp slt i64 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %46
%52 = call i32 @perror(i8* %14)
%53 = call i32 @exit(i32 1)
unreachable
54: ; preds = %46
%55 = call i32 @sleep(i32 1)
%56 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %16, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %12)
%57 = call i64 @system(i8* %16)
%58 = icmp slt i64 %57, 0
br i1 %58, label %59, label %62
59: ; preds = %54
%60 = call i32 @perror(i8* %16)
%61 = call i32 @exit(i32 1)
unreachable
62: ; preds = %54
%63 = call i32 @sleep(i32 3)
%64 = load i32, i32* %4
%65 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %15, i32 256, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* %12, i32 %64)
%66 = call i64 @system(i8* %15)
%67 = icmp slt i64 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %62
%69 = call i32 @perror(i8* %15)
%70 = call i32 @exit(i32 1)
unreachable
71: ; preds = %62
%72 = call i32 @sleep(i32 2)
br label %73
73: ; preds = %31, %71
%74 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %13, i32 256, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %12)
%75 = call i64 @system(i8* %13)
%76 = icmp slt i64 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %73
%78 = call i32 @perror(i8* %13)
%79 = call i32 @exit(i32 1)
unreachable
80: ; preds = %73
%81 = call i32 @sleep(i32 3)
%82 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %14, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i8* %12)
%83 = call i64 @system(i8* %14)
%84 = icmp slt i64 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %80
%86 = call i32 @perror(i8* %14)
%87 = call i32 @exit(i32 1)
unreachable
88: ; preds = %80
%89 = call i32 @sleep(i32 1)
%90 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %16, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %12)
%91 = call i64 @system(i8* %16)
%92 = icmp slt i64 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %88
%94 = call i32 @perror(i8* %16)
%95 = call i32 @exit(i32 1)
unreachable
96: ; preds = %88
%97 = call i32 @sleep(i32 1)
%98 = call i64 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%99 = call i32 @sleep(i32 1)
%100 = call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
br label %170
101: ; preds = %22
%102 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.24, i64 0, i64 0))
%103 = call i64 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%104 = call i32 @sleep(i32 1)
%105 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %13, i32 256, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %12)
%106 = call i64 @system(i8* %13)
%107 = icmp slt i64 %106, 0
br i1 %107, label %108, label %111
108: ; preds = %101
%109 = call i32 @perror(i8* %13)
%110 = call i32 @exit(i32 1)
unreachable
111: ; preds = %101
%112 = call i32 @sleep(i32 1)
%113 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %14, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* %12)
%114 = call i64 @system(i8* %14)
%115 = icmp slt i64 %114, 0
br i1 %115, label %116, label %119
116: ; preds = %111
%117 = call i32 @perror(i8* %13)
%118 = call i32 @exit(i32 1)
unreachable
119: ; preds = %111
%120 = call i32 @sleep(i32 1)
%121 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %15, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %12)
%122 = call i64 @system(i8* %15)
%123 = icmp slt i64 %122, 0
br i1 %123, label %124, label %127
124: ; preds = %119
%125 = call i32 @perror(i8* %13)
%126 = call i32 @exit(i32 1)
unreachable
127: ; preds = %119
%128 = call i32 @sleep(i32 1)
%129 = call i64 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%130 = call i32 @sleep(i32 1)
%131 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %15, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0), i8* %12)
%132 = call i64 @system(i8* %15)
%133 = icmp slt i64 %132, 0
br i1 %133, label %134, label %137
134: ; preds = %127
%135 = call i32 @perror(i8* %15)
%136 = call i32 @exit(i32 1)
unreachable
137: ; preds = %127
%138 = call i32 @sleep(i32 1)
%139 = call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
br label %170
140: ; preds = %22
%141 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.23, i64 0, i64 0))
%142 = call i64 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%143 = call i32 @sleep(i32 1)
%144 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %13, i32 256, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %12)
%145 = call i64 @system(i8* %13)
%146 = icmp slt i64 %145, 0
br i1 %146, label %147, label %150
147: ; preds = %140
%148 = call i32 @perror(i8* %13)
%149 = call i32 @exit(i32 1)
unreachable
150: ; preds = %140
%151 = call i32 @sleep(i32 1)
%152 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %13, i32 256, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i8* %12)
%153 = call i64 @system(i8* %13)
%154 = icmp slt i64 %153, 0
br i1 %154, label %155, label %158
155: ; preds = %150
%156 = call i32 @perror(i8* %13)
%157 = call i32 @exit(i32 1)
unreachable
158: ; preds = %150
%159 = call i32 @sleep(i32 1)
%160 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %15, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %12)
%161 = call i64 @system(i8* %15)
%162 = icmp slt i64 %161, 0
br i1 %162, label %163, label %166
163: ; preds = %158
%164 = call i32 @perror(i8* %13)
%165 = call i32 @exit(i32 1)
unreachable
166: ; preds = %158
%167 = call i32 @sleep(i32 1)
%168 = call i64 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%169 = call i32 @sleep(i32 1)
br label %170
170: ; preds = %22, %137, %166, %96
ret i32 0
}