#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*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int system(char *);
int main(int pArgC, char *pArgV[]) {
  freopen("/dev/null", "w", stdout);
  freopen("/dev/null", "w", stderr);
  char command[32768];
  int k = -1;
  for (int i = 1; i < pArgC; ++i) {
    if (i != 1)
      command[++k] = ' ';
    for (int j = 0; pArgV[i][j]; ++j) {
      if (pArgV[i][j] == '\\') {
        command[++k] = '\\';
        command[++k] = '\\';
      } else if (pArgV[i][j] == '"') {
        command[++k] = '\\';
        command[++k] = '"';
      } else {
        command[++k] = pArgV[i][j];
      }
    }
  }
  command[++k] = '\0';
  return system(command);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8020,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
lea    0xeb7(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edx
lea    0xe9b(%rip),%rdi
lea    0xe9e(%rip),%rsi
call   1040 <freopen@plt>
movl   $0xffffffff,-0x8014(%rbp)
ff ff ff
movl   $0x1,-0x8018(%rbp)
mov    -0x8018(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1300 <main+0x1e0>
cmpl   $0x1,-0x8018(%rbp)
je     11ba <main+0x9a>
mov    -0x8014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8014(%rbp)
cltq
movb   $0x20,-0x8010(%rbp,%rax,1)
20
movl   $0x0,-0x801c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8018(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x801c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     12e7 <main+0x1c7>
mov    -0x10(%rbp),%rax
movslq -0x8018(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x801c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5c,%eax
jne    123e <main+0x11e>
mov    -0x8014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8014(%rbp)
cltq
movb   $0x5c,-0x8010(%rbp,%rax,1)
5c
mov    -0x8014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8014(%rbp)
cltq
movb   $0x5c,-0x8010(%rbp,%rax,1)
5c
jmp    12ce <main+0x1ae>
mov    -0x10(%rbp),%rax
movslq -0x8018(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x801c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x22,%eax
jne    1298 <main+0x178>
mov    -0x8014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8014(%rbp)
cltq
movb   $0x5c,-0x8010(%rbp,%rax,1)
5c
mov    -0x8014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8014(%rbp)
cltq
movb   $0x22,-0x8010(%rbp,%rax,1)
22
jmp    12c9 <main+0x1a9>
mov    -0x10(%rbp),%rax
movslq -0x8018(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x801c(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x8014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8014(%rbp)
cltq
mov    %cl,-0x8010(%rbp,%rax,1)
jmp    12ce <main+0x1ae>
jmp    12d3 <main+0x1b3>
mov    -0x801c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x801c(%rbp)
jmp    11c4 <main+0xa4>
jmp    12ec <main+0x1cc>
mov    -0x8018(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8018(%rbp)
jmp    1185 <main+0x65>
mov    -0x8014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8014(%rbp)
cltq
movb   $0x0,-0x8010(%rbp,%rax,1)
lea    -0x8010(%rbp),%rdi
call   1030 <system@plt>
add    $0x8020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x8000,%rsp
mov    %rsi,%r12
mov    %edi,%ebx
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
lea    0xebc(%rip),%r14
lea    0xebf(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <freopen@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <freopen@plt>
mov    $0xffffffff,%eax
cmp    $0x2,%ebx
jl     11e8 <main+0xc8>
mov    %ebx,%ecx
mov    $0xffffffff,%eax
mov    $0x1,%edx
mov    %rsp,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x1,%rdx
je     11a1 <main+0x81>
cltq
movb   $0x20,0x1(%rsp,%rax,1)
add    $0x1,%rax
mov    (%r12,%rdx,8),%rdi
jmp    11c9 <main+0xa9>
nopw   0x0(%rax,%rax,1)
movslq %eax,%rbp
movb   $0x5c,0x1(%rbp,%rsi,1)
mov    $0x2,%ebp
add    %ebp,%eax
movslq %eax,%rbp
mov    %bl,(%rsp,%rbp,1)
add    $0x1,%rdi
movzbl (%rdi),%ebx
cmp    $0x22,%bl
je     11b0 <main+0x90>
cmp    $0x5c,%bl
je     11b0 <main+0x90>
mov    $0x1,%ebp
test   %bl,%bl
jne    11bd <main+0x9d>
add    $0x1,%rdx
cmp    %rcx,%rdx
jne    1190 <main+0x70>
cltq
mov    %rsp,%rdi
movb   $0x0,0x1(%rax,%rdi,1)
call   1030 <system@plt>
add    $0x8000,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [2 x i8] c"w\00"
@stdout = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [32768 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* @stdout
%11 = call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @stderr
%13 = call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %12)
store i32 -1, i32* %7
store i32 1, i32* %8
br label %14
14: ; preds = %100, %2
%15 = load i32, i32* %8
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %103
18: ; preds = %14
%19 = load i32, i32* %8
%20 = icmp ne i32 %19, 1
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 %24
store i8 32, i8* %25
br label %26
26: ; preds = %21, %18
store i32 0, i32* %9
br label %27
27: ; preds = %96, %26
%28 = load i8**, i8*** %5
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8*, i8** %28, i64 %30
%32 = load i8*, i8** %31
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %32, i64 %34
%36 = load i8, i8* %35
%37 = icmp ne i8 %36, 0
br i1 %37, label %38, label %99
38: ; preds = %27
%39 = load i8**, i8*** %5
%40 = load i32, i32* %8
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8*, i8** %39, i64 %41
%43 = load i8*, i8** %42
%44 = load i32, i32* %9
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %43, i64 %45
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 92
br i1 %49, label %50, label %59
50: ; preds = %38
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
store i32 %52, i32* %7
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 %53
store i8 92, i8* %54
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 %57
store i8 92, i8* %58
br label %95
59: ; preds = %38
%60 = load i8**, i8*** %5
%61 = load i32, i32* %8
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %60, i64 %62
%64 = load i8*, i8** %63
%65 = load i32, i32* %9
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8, i8* %64, i64 %66
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 34
br i1 %70, label %71, label %80
71: ; preds = %59
%72 = load i32, i32* %7
%73 = add nsw i32 %72, 1
store i32 %73, i32* %7
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 %74
store i8 92, i8* %75
%76 = load i32, i32* %7
%77 = add nsw i32 %76, 1
store i32 %77, i32* %7
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 %78
store i8 34, i8* %79
br label %94
80: ; preds = %59
%81 = load i8**, i8*** %5
%82 = load i32, i32* %8
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8*, i8** %81, i64 %83
%85 = load i8*, i8** %84
%86 = load i32, i32* %9
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %85, i64 %87
%89 = load i8, i8* %88
%90 = load i32, i32* %7
%91 = add nsw i32 %90, 1
store i32 %91, i32* %7
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 %92
store i8 %89, i8* %93
br label %94
94: ; preds = %80, %71
br label %95
95: ; preds = %94, %50
br label %96
96: ; preds = %95
%97 = load i32, i32* %9
%98 = add nsw i32 %97, 1
store i32 %98, i32* %9
br label %27
99: ; preds = %27
br label %100
100: ; preds = %99
%101 = load i32, i32* %8
%102 = add nsw i32 %101, 1
store i32 %102, i32* %8
br label %14
103: ; preds = %14
%104 = load i32, i32* %7
%105 = add nsw i32 %104, 1
store i32 %105, i32* %7
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 %106
store i8 0, i8* %107
%108 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
%109 = call i32 @system(i8* %108)
ret i32 %109
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [2 x i8] c"w\00"
@stdout = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32768 x i8]
%4 = load i32, i32* @stdout
%5 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%9 = icmp sgt i32 %0, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = zext i32 %0 to i64
br label %18
12: ; preds = %35, %2
%13 = phi i32 [ -1, %2 ], [ %32, %35 ]
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %15
store i8 0, i8* %16
%17 = call i32 @system(i8* %8)
ret i32 %17
18: ; preds = %10, %35
%19 = phi i64 [ 1, %10 ], [ %36, %35 ]
%20 = phi i32 [ -1, %10 ], [ %32, %35 ]
%21 = icmp eq i64 %19, 1
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = add nsw i32 %20, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %24
store i8 32, i8* %25
br label %26
26: ; preds = %22, %18
%27 = phi i32 [ %23, %22 ], [ %20, %18 ]
%28 = getelementptr inbounds i8*, i8** %1, i64 %19
%29 = load i8*, i8** %28
br label %30
30: ; preds = %42, %26
%31 = phi i64 [ %47, %42 ], [ 0, %26 ]
%32 = phi i32 [ %44, %42 ], [ %27, %26 ]
%33 = getelementptr inbounds i8, i8* %29, i64 %31
%34 = load i8, i8* %33
switch i8 %34, label %42 [
i8 0, label %35
i8 92, label %38
i8 34, label %38
]
35: ; preds = %30
%36 = add nuw nsw i64 %19, 1
%37 = icmp eq i64 %36, %11
br i1 %37, label %12, label %18
38: ; preds = %30, %30
%39 = add nsw i32 %32, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %40
store i8 92, i8* %41
br label %42
42: ; preds = %38, %30
%43 = phi i32 [ 1, %30 ], [ 2, %38 ]
%44 = add nsw i32 %32, %43
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %45
store i8 %34, i8* %46
%47 = add nuw i64 %31, 1
br label %30
}