#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*/ beauty();
int /*<<< orphan*/ multiple_file(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int /*<<< orphan*/ single_file(int, int);
int /*<<< orphan*/ system(char *);
int main(void) {
  int c1, c2, c3, d;
  system("clear");
  printf("Enter the INFECT CODE :");
  scanf("%d%d%d", &c1, &c2, &c3);
  if (c1 == 0)
    single_file(c2, c3);
  else if (c1 == 1)
    multiple_file(c2, c3);
  if (c1 == 9 && c2 == 1 && c3 == 1) {
    printf("\n\n\nYOU HAD JUST ENTERED 9 1 1\n\tTHIS IS THE MOST DESTRUCTIVE "
           "COMMAND TO THIS PROGRAM\n\nARE YOU SURE TO CONTINUE??\n\npress\n1 "
           "for yes\n0 for no\n\n:");
    scanf("%d", &d);
    if (d == 1) {
      beauty();
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1050 <system@plt>
lea    0xe84(%rip),%rdi
call   1060 <printf@plt>
lea    0xe90(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
mov    $0x0,%al
call   1080 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    11bb <main+0x5b>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <single_file@plt>
jmp    11d5 <main+0x75>
cmpl   $0x1,-0x8(%rbp)
jne    11d0 <main+0x70>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <multiple_file@plt>
jmp    11d5 <main+0x75>
cmpl   $0x9,-0x8(%rbp)
jne    1227 <main+0xc7>
cmpl   $0x1,-0xc(%rbp)
jne    1227 <main+0xc7>
cmpl   $0x1,-0x10(%rbp)
jne    1227 <main+0xc7>
lea    0xe2b(%rip),%rdi
call   1060 <printf@plt>
lea    0xe1c(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1222 <main+0xc2>
mov    $0x0,%al
call   1070 <beauty@plt>
jmp    1227 <main+0xc7>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xe95(%rip),%rdi
call   1050 <system@plt>
lea    0xe8f(%rip),%rdi
call   1060 <printf@plt>
lea    0xe9b(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %eax,%eax
call   1080 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    $0x1,%eax
je     11bc <main+0x5c>
test   %eax,%eax
jne    11b3 <main+0x53>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1040 <single_file@plt>
cmpl   $0x9,0x10(%rsp)
je     11d0 <main+0x70>
jmp    120b <main+0xab>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1030 <multiple_file@plt>
cmpl   $0x9,0x10(%rsp)
jne    120b <main+0xab>
cmpl   $0x1,0xc(%rsp)
jne    120b <main+0xab>
cmpl   $0x1,0x8(%rsp)
jne    120b <main+0xab>
lea    0xe40(%rip),%rdi
call   1060 <printf@plt>
lea    0xe31(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
cmpl   $0x1,0x14(%rsp)
jne    120b <main+0xab>
xor    %eax,%eax
call   1070 <beauty@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [24 x i8] c"Enter the INFECT CODE :\00"
@.str.2 = [7 x i8] c"%d%d%d\00"
@.str.3 = [141 x i8] c"\0A\0A\0AYOU HAD JUST ENTERED 9 1 1\0A\09THIS IS THE MOST DESTRUCTIVE COMMAND TO THIS PROGRAM\0A\0AARE YOU SURE TO CONTINUE??\0A\0Apress\0A1 for yes\0A0 for no\0A\0A:\00"
@.str.4 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @single_file(i32 %12, i32 %13)
br label %23
15: ; preds = %0
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = call i32 @multiple_file(i32 %19, i32 %20)
br label %22
22: ; preds = %18, %15
br label %23
23: ; preds = %22, %11
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 9
br i1 %25, label %26, label %40
26: ; preds = %23
%27 = load i32, i32* %3
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %40
29: ; preds = %26
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %40
32: ; preds = %29
%33 = call i32 @printf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %5)
%35 = load i32, i32* %5
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = call i32 (...) @beauty()
br label %39
39: ; preds = %37, %32
br label %40
40: ; preds = %39, %29, %26, %23
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [24 x i8] c"Enter the INFECT CODE :\00"
@.str.2 = [7 x i8] c"%d%d%d\00"
@.str.3 = [141 x i8] c"\0A\0A\0AYOU HAD JUST ENTERED 9 1 1\0A\09THIS IS THE MOST DESTRUCTIVE COMMAND TO THIS PROGRAM\0A\0AARE YOU SURE TO CONTINUE??\0A\0Apress\0A1 for yes\0A0 for no\0A\0A:\00"
@.str.4 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%12 = load i32, i32* %1
switch i32 %12, label %21 [
i32 0, label %13
i32 1, label %17
]
13: ; preds = %0
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 @single_file(i32 %14, i32 %15)
br label %21
17: ; preds = %0
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = call i32 @multiple_file(i32 %18, i32 %19)
br label %21
21: ; preds = %0, %17, %13
%22 = load i32, i32* %1
%23 = icmp eq i32 %22, 9
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 1
%26 = select i1 %23, i1 %25, i1 false
%27 = load i32, i32* %3
%28 = icmp eq i32 %27, 1
%29 = select i1 %26, i1 %28, i1 false
br i1 %29, label %30, label %37
30: ; preds = %21
%31 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([141 x i8], [141 x i8]* @.str.3, i64 0, i64 0))
%32 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %4)
%33 = load i32, i32* %4
%34 = icmp eq i32 %33, 1
br i1 %34, label %35, label %37
35: ; preds = %30
%36 = call i32 (...) @beauty()
br label %37
37: ; preds = %30, %35, %21
ret i32 0
}