#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 */

/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ system(char *);
int main() {
  char c1[100], c2[100], c3[100], c4[100], c5[100], c11[100], c12[100],
      c13[100], c14[100], c15[100], c16[100], c17[100];
  strcpy(c1, " cat /var/log/syslog > new_log.txt");
  system(c1);
  strcpy(c2, "grep -w '.*usb 3-.*:' new_log.txt | tail -100 > usblogs.txt");
  system(c2);
  strcpy(c3, "grep -w '.*NetworkManager.*: <info> WiFi.*' new_log.txt > "
             "wifinetworklogs.txt");
  system(c3);
  strcpy(c4,
         "grep -w '.*bluetoothd.*: Adapter.*' new_log.txt > bluetoothlogs.txt");
  system(c4);
  strcpy(c5,
         "cat /var/log/apache2/error.log | tail -12 > apache2serverlogs.txt");
  system(c5);
  strcpy(c11, "cat /var/log/auth.log > new_auth_raw.txt");
  system(c11);
  strcpy(c13, "grep -w 'su.*:' new_auth_raw.txt | tail -100 > sudo_demo.txt");
  system(c13);
  strcpy(c14, "grep -w 'systemd-logind.*:.*Lid.*' new_auth_raw.txt > lid.txt");
  system(c14);
  strcpy(
      c15,
      "grep -w 'systemd-logind.*:.*System.*' new_auth_raw.txt > syspower.txt");
  system(c15);
  strcpy(c16, "grep -w 'systemd-logind.*:.*New seat.*' new_auth_raw.txt > "
              "new_user_id.txt");
  system(c16);
  strcpy(c17, "grep -w '.*Activation (eth0).*' new_log.txt > "
              "eathernetactivationlogs.txt");
  system(c17);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x540,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x70(%rbp),%rdi
call   1040 <system@plt>
lea    -0xe0(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0xe0(%rbp),%rdi
call   1040 <system@plt>
lea    -0x150(%rbp),%rdi
lea    0xee7(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x150(%rbp),%rdi
call   1040 <system@plt>
lea    -0x1c0(%rbp),%rdi
lea    0xf16(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x1c0(%rbp),%rdi
call   1040 <system@plt>
lea    -0x230(%rbp),%rdi
lea    0xf3b(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x230(%rbp),%rdi
call   1040 <system@plt>
lea    -0x2a0(%rbp),%rdi
lea    0xf5e(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x2a0(%rbp),%rdi
call   1040 <system@plt>
lea    -0x380(%rbp),%rdi
lea    0xf68(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x380(%rbp),%rdi
call   1040 <system@plt>
lea    -0x3f0(%rbp),%rdi
lea    0xf86(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x3f0(%rbp),%rdi
call   1040 <system@plt>
lea    -0x460(%rbp),%rdi
lea    0xfa5(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x460(%rbp),%rdi
call   1040 <system@plt>
lea    -0x4d0(%rbp),%rdi
lea    0xfcc(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x4d0(%rbp),%rdi
call   1040 <system@plt>
lea    -0x540(%rbp),%rdi
lea    0xff8(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x540(%rbp),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x540,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x4d0,%rsp
lea    0xed1(%rip),%rsi
lea    0x460(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xed5(%rip),%rsi
lea    0x3f0(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xef2(%rip),%rsi
lea    0x380(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf21(%rip),%rsi
lea    0x310(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf46(%rip),%rsi
lea    0x2a0(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf69(%rip),%rsi
lea    0x230(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf73(%rip),%rsi
lea    0x1c0(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf91(%rip),%rsi
lea    0x150(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xfb0(%rip),%rsi
lea    0xe0(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xfd7(%rip),%rsi
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0x1006(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x4d0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c" cat /var/log/syslog > new_log.txt\00"
@.str.1 = [60 x i8] c"grep -w '.*usb 3-.*:' new_log.txt | tail -100 > usblogs.txt\00"
@.str.2 = [78 x i8] c"grep -w '.*NetworkManager.*: <info> WiFi.*' new_log.txt > wifinetworklogs.txt\00"
@.str.3 = [68 x i8] c"grep -w '.*bluetoothd.*: Adapter.*' new_log.txt > bluetoothlogs.txt\00"
@.str.4 = [66 x i8] c"cat /var/log/apache2/error.log | tail -12 > apache2serverlogs.txt\00"
@.str.5 = [41 x i8] c"cat /var/log/auth.log > new_auth_raw.txt\00"
@.str.6 = [61 x i8] c"grep -w 'su.*:' new_auth_raw.txt | tail -100 > sudo_demo.txt\00"
@.str.7 = [62 x i8] c"grep -w 'systemd-logind.*:.*Lid.*' new_auth_raw.txt > lid.txt\00"
@.str.8 = [70 x i8] c"grep -w 'systemd-logind.*:.*System.*' new_auth_raw.txt > syspower.txt\00"
@.str.9 = [75 x i8] c"grep -w 'systemd-logind.*:.*New seat.*' new_auth_raw.txt > new_user_id.txt\00"
@.str.10 = [74 x i8] c"grep -w '.*Activation (eth0).*' new_log.txt > eathernetactivationlogs.txt\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
%7 = alloca [100 x i8]
%8 = alloca [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca [100 x i8]
%11 = alloca [100 x i8]
%12 = alloca [100 x i8]
%13 = alloca [100 x i8]
store i32 0, i32* %1
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%15 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%17 = call i32 @system(i8* %16)
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%19 = call i32 @strcpy(i8* %18, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%21 = call i32 @system(i8* %20)
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%23 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%25 = call i32 @system(i8* %24)
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%27 = call i32 @strcpy(i8* %26, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0))
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%29 = call i32 @system(i8* %28)
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%31 = call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%33 = call i32 @system(i8* %32)
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%35 = call i32 @strcpy(i8* %34, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%37 = call i32 @system(i8* %36)
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%39 = call i32 @strcpy(i8* %38, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.6, i64 0, i64 0))
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%41 = call i32 @system(i8* %40)
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%43 = call i32 @strcpy(i8* %42, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.7, i64 0, i64 0))
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%45 = call i32 @system(i8* %44)
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%47 = call i32 @strcpy(i8* %46, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.8, i64 0, i64 0))
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%49 = call i32 @system(i8* %48)
%50 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%51 = call i32 @strcpy(i8* %50, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.9, i64 0, i64 0))
%52 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%53 = call i32 @system(i8* %52)
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %13, i64 0, i64 0
%55 = call i32 @strcpy(i8* %54, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.10, i64 0, i64 0))
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %13, i64 0, i64 0
%57 = call i32 @system(i8* %56)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c" cat /var/log/syslog > new_log.txt\00"
@.str.1 = [60 x i8] c"grep -w '.*usb 3-.*:' new_log.txt | tail -100 > usblogs.txt\00"
@.str.2 = [78 x i8] c"grep -w '.*NetworkManager.*: <info> WiFi.*' new_log.txt > wifinetworklogs.txt\00"
@.str.3 = [68 x i8] c"grep -w '.*bluetoothd.*: Adapter.*' new_log.txt > bluetoothlogs.txt\00"
@.str.4 = [66 x i8] c"cat /var/log/apache2/error.log | tail -12 > apache2serverlogs.txt\00"
@.str.5 = [41 x i8] c"cat /var/log/auth.log > new_auth_raw.txt\00"
@.str.6 = [61 x i8] c"grep -w 'su.*:' new_auth_raw.txt | tail -100 > sudo_demo.txt\00"
@.str.7 = [62 x i8] c"grep -w 'systemd-logind.*:.*Lid.*' new_auth_raw.txt > lid.txt\00"
@.str.8 = [70 x i8] c"grep -w 'systemd-logind.*:.*System.*' new_auth_raw.txt > syspower.txt\00"
@.str.9 = [75 x i8] c"grep -w 'systemd-logind.*:.*New seat.*' new_auth_raw.txt > new_user_id.txt\00"
@.str.10 = [74 x i8] c"grep -w '.*Activation (eth0).*' new_log.txt > eathernetactivationlogs.txt\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
%7 = alloca [100 x i8]
%8 = alloca [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca [100 x i8]
%11 = alloca [100 x i8]
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%23 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%24 = call i32 @system(i8* %12)
%25 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 @system(i8* %13)
%27 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 @system(i8* %14)
%29 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0))
%30 = call i32 @system(i8* %15)
%31 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%32 = call i32 @system(i8* %16)
%33 = call i32 @strcpy(i8* %17, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%34 = call i32 @system(i8* %17)
%35 = call i32 @strcpy(i8* %18, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.6, i64 0, i64 0))
%36 = call i32 @system(i8* %18)
%37 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.7, i64 0, i64 0))
%38 = call i32 @system(i8* %19)
%39 = call i32 @strcpy(i8* %20, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.8, i64 0, i64 0))
%40 = call i32 @system(i8* %20)
%41 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.9, i64 0, i64 0))
%42 = call i32 @system(i8* %21)
%43 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.10, i64 0, i64 0))
%44 = call i32 @system(i8* %22)
ret i32 0
}