#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*/ sleep(int);
int /*<<< orphan*/ system(char *);
int main() {
  while (1) {
    system("chattr -i /srv/www/htdocs/index.html");
    system("cat /srv/www/htdocs/index.html | md5sum | grep "
           "fa477c36d6c52d52bbd9b6af7df708fa && sed -i 's/service\\./service. "
           "/g' /srv/www/htdocs/index.html");
    system("chattr +i /srv/www/htdocs/index.html");
    system("chattr -i /var/ftp/welcome.msg");
    system("cat /var/ftp/welcome.msg | md5sum | grep "
           "df35704116608a3ed56f6710fe7e3b07 && sed -i 's/,//g' "
           "/var/ftp/welcome.msg");
    system("chattr +i /var/ftp/welcome.msg");
    system("chattr -i /home/public/file");
    system("cat /home/public/file | md5sum | grep "
           "4d91498a12508cd7f51fe6d5265ee521 && sed -i 's/ts/t/g' "
           "/home/public/file");
    system("chattr +i /home/public/file");
    sleep(2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <system@plt>
lea    0xee3(%rip),%rdi
call   1030 <system@plt>
lea    0xf66(%rip),%rdi
call   1030 <system@plt>
lea    0xf7f(%rip),%rdi
call   1030 <system@plt>
lea    0xf92(%rip),%rdi
call   1030 <system@plt>
lea    0xff8(%rip),%rdi
call   1030 <system@plt>
lea    0x100b(%rip),%rdi
call   1030 <system@plt>
lea    0x101b(%rip),%rdi
call   1030 <system@plt>
lea    0x107d(%rip),%rdi
call   1030 <system@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xfa7(%rip),%r13
lea    0xfbf(%rip),%rbx
lea    0x102a(%rip),%rbp
lea    0x1042(%rip),%r14
lea    0x1057(%rip),%r15
lea    0x10be(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xe99(%rip),%rdi
call   1030 <system@plt>
lea    0xeb2(%rip),%rdi
call   1030 <system@plt>
lea    0xf35(%rip),%rdi
call   1030 <system@plt>
mov    %r13,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbp,%rdi
call   1030 <system@plt>
mov    %r14,%rdi
call   1030 <system@plt>
mov    %r15,%rdi
call   1030 <system@plt>
mov    %r12,%rdi
call   1030 <system@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
jmp    1160 <main+0x40>

LLVM IR (-O0):
@.str = [37 x i8] c"chattr -i /srv/www/htdocs/index.html\00"
@.str.1 = [143 x i8] c"cat /srv/www/htdocs/index.html | md5sum | grep fa477c36d6c52d52bbd9b6af7df708fa && sed -i 's/service\\./service. /g' /srv/www/htdocs/index.html\00"
@.str.2 = [37 x i8] c"chattr +i /srv/www/htdocs/index.html\00"
@.str.3 = [31 x i8] c"chattr -i /var/ftp/welcome.msg\00"
@.str.4 = [114 x i8] c"cat /var/ftp/welcome.msg | md5sum | grep df35704116608a3ed56f6710fe7e3b07 && sed -i 's/,//g' /var/ftp/welcome.msg\00"
@.str.5 = [31 x i8] c"chattr +i /var/ftp/welcome.msg\00"
@.str.6 = [28 x i8] c"chattr -i /home/public/file\00"
@.str.7 = [110 x i8] c"cat /home/public/file | md5sum | grep 4d91498a12508cd7f51fe6d5265ee521 && sed -i 's/ts/t/g' /home/public/file\00"
@.str.8 = [28 x i8] c"chattr +i /home/public/file\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @system(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @system(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @sleep(i32 2)
br label %2
}

LLVM IR (-O2):
@.str = [37 x i8] c"chattr -i /srv/www/htdocs/index.html\00"
@.str.1 = [143 x i8] c"cat /srv/www/htdocs/index.html | md5sum | grep fa477c36d6c52d52bbd9b6af7df708fa && sed -i 's/service\\./service. /g' /srv/www/htdocs/index.html\00"
@.str.2 = [37 x i8] c"chattr +i /srv/www/htdocs/index.html\00"
@.str.3 = [31 x i8] c"chattr -i /var/ftp/welcome.msg\00"
@.str.4 = [114 x i8] c"cat /var/ftp/welcome.msg | md5sum | grep df35704116608a3ed56f6710fe7e3b07 && sed -i 's/,//g' /var/ftp/welcome.msg\00"
@.str.5 = [31 x i8] c"chattr +i /var/ftp/welcome.msg\00"
@.str.6 = [28 x i8] c"chattr -i /home/public/file\00"
@.str.7 = [110 x i8] c"cat /home/public/file | md5sum | grep 4d91498a12508cd7f51fe6d5265ee521 && sed -i 's/ts/t/g' /home/public/file\00"
@.str.8 = [28 x i8] c"chattr +i /home/public/file\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @system(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @sleep(i32 2)
br label %1
}