main(argc, argv) int argc;
char *argv[];
{
  int i;
  char buf[1024];
  if (argc == 1)
    usage();
  for (i = 1; i < argc; i++) {
    strcpy(buf, "de -r ");
    strcat(buf, argv[i]);
    system(buf);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    116a <main+0x2a>
mov    $0x0,%al
call   1050 <usage@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c4 <main+0x84>
lea    -0x420(%rbp),%rdi
lea    0xe75(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1060 <strcat@plt>
lea    -0x420(%rbp),%rdi
mov    $0x0,%al
call   1040 <system@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1171 <main+0x31>
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x408,%rsp
cmp    $0x1,%edi
jne    114c <main+0x1c>
xor    %eax,%eax
call   1040 <usage@plt>
jmp    118e <main+0x5e>
jle    118e <main+0x5e>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
mov    %rsp,%r12
nopl   0x0(%rax)
movl   $0x20722d,0x3(%rsp)
movl   $0x2d206564,(%rsp)
mov    (%r14,%rbx,8),%rsi
mov    %r12,%rdi
call   1050 <strcat@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <system@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"de -r \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @usage()
br label %12
12: ; preds = %10, %2
store i32 1, i32* %6
br label %13
13: ; preds = %29, %12
%14 = load i32, i32* %6
%15 = load i32, i32* %4
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %32
17: ; preds = %13
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%19 = call i8* @strcpy(i8* %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%21 = load i8**, i8*** %5
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = call i8* @strcat(i8* %20, i8* %25)
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* %27)
br label %29
29: ; preds = %17
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %13
32: ; preds = %13
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
@.str = [7 x i8] c"de -r \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @usage()
br label %20
8: ; preds = %2
%9 = icmp sgt i32 %0, 1
br i1 %9, label %10, label %20
10: ; preds = %8
%11 = zext i32 %0 to i64
br label %12
12: ; preds = %10, %12
%13 = phi i64 [ 1, %10 ], [ %18, %12 ]
%14 = getelementptr inbounds i8*, i8** %1, i64 %13
%15 = load i8*, i8** %14
%16 = call i8* @strcat(i8* %4, i8* dereferenceable(1) %15)
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* %4)
%18 = add nuw nsw i64 %13, 1
%19 = icmp eq i64 %18, %11
br i1 %19, label %20, label %12
20: ; preds = %12, %6, %8
ret i32 0
}