#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*/ printf(char *, char *);
int /*<<< orphan*/ unlink(char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("usage: %s file1 [file2 file3...]", argv[0]);
  } else {
    int i;
    for (i = 1; i < argc; i++) {
      unlink(argv[1]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x38>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
jmp    118b <main+0x6b>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1186 <main+0x66>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <unlink@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115f <main+0x3f>
jmp    118b <main+0x6b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x2,%edi
jge    113c <main+0x1c>
mov    (%rbx),%rsi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
jmp    115e <main+0x3e>
mov    %edi,%ebp
add    $0xffffffff,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rbx),%rdi
call   1030 <unlink@plt>
add    $0xffffffff,%ebp
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"usage: %s file1 [file2 file3...]\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %28
14: ; preds = %2
store i32 1, i32* %6
br label %15
15: ; preds = %24, %14
%16 = load i32, i32* %6
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @unlink(i8* %22)
br label %24
24: ; preds = %19
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %15
27: ; preds = %15
br label %28
28: ; preds = %27, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"usage: %s file1 [file2 file3...]\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
br label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %15
9: ; preds = %4, %9
%10 = phi i32 [ 1, %4 ], [ %13, %9 ]
%11 = load i8*, i8** %5
%12 = tail call i32 @unlink(i8* %11)
%13 = add nuw nsw i32 %10, 1
%14 = icmp eq i32 %13, %0
br i1 %14, label %15, label %9
15: ; preds = %9, %6
ret i32 0
}