#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 */
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  char c, command[30], del_command[11];
  printf("Driver way: ");
  c = getchar();
  getchar();
  printf(".Ink Virusü will be clean?(y/n)", c);
  sprintf(command, "attrib -h -r -s /s /d %c:\\*.*", c);
  sprintf(del_command, "del %c:.Ink", c);
  if (getchar() == 'y') {
    system(del_command);
    system(command);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x11(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
movsbl -0x11(%rbp),%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    0xe9c(%rip),%rsi
movsbl -0x11(%rbp),%edx
call   1060 <sprintf@plt>
lea    -0x3b(%rbp),%rdi
lea    0xea6(%rip),%rsi
movsbl -0x11(%rbp),%edx
call   1060 <sprintf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
movsbl %al,%eax
cmp    $0x79,%eax
jne    11d4 <main+0x94>
lea    -0x3b(%rbp),%rdi
call   1030 <system@plt>
lea    -0x30(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getchar@plt>
movsbl %bl,%ebx
lea    0xea0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb1(%rip),%rsi
lea    0x10(%rsp),%rdi
mov    %ebx,%edx
call   1060 <sprintf@plt>
lea    0xebc(%rip),%rsi
lea    0x5(%rsp),%rdi
mov    %ebx,%edx
call   1060 <sprintf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0x79,%al
jne    11bb <main+0x7b>
lea    0x5(%rsp),%rdi
call   1030 <system@plt>
lea    0x10(%rsp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Driver way: \00"
@.str.1 = [33 x i8] c".Ink Virus\C3\BC will be clean?(y/n)\00"
@.str.2 = [30 x i8] c"attrib -h -r -s /s /d %c:\\*.*\00"
@.str.3 = [12 x i8] c"del %c:.Ink\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca [30 x i8]
%8 = alloca [11 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%10 = call signext i8 (...) @getchar()
store i8 %10, i8* %6
%11 = call signext i8 (...) @getchar()
%12 = load i8, i8* %6
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%16 = load i8, i8* %6
%17 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8 signext %16)
%18 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%19 = load i8, i8* %6
%20 = call i32 @sprintf(i8* %18, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8 signext %19)
%21 = call signext i8 (...) @getchar()
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 121
br i1 %23, label %24, label %29
24: ; preds = %2
%25 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%26 = call i32 @system(i8* %25)
%27 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%28 = call i32 @system(i8* %27)
br label %29
29: ; preds = %24, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Driver way: \00"
@.str.1 = [33 x i8] c".Ink Virus\C3\BC will be clean?(y/n)\00"
@.str.2 = [30 x i8] c"attrib -h -r -s /s /d %c:\\*.*\00"
@.str.3 = [12 x i8] c"del %c:.Ink\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [30 x i8]
%4 = alloca [11 x i8]
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = tail call signext i8 (...) @getchar()
%9 = tail call signext i8 (...) @getchar()
%10 = sext i8 %8 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8 signext %8)
%13 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8 signext %8)
%14 = tail call signext i8 (...) @getchar()
%15 = icmp eq i8 %14, 121
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = call i32 @system(i8* %6)
%18 = call i32 @system(i8* %5)
br label %19
19: ; preds = %16, %2
ret i32 0
}