#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*/ abort();
int deleteFile(char *);
int deleteFiles(char *);
int getopt(int, char **, char *);
int /*<<< orphan*/ optarg;
int optind;
int strtol(int /*<<< orphan*/, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  int c = 0;
  int recurs = 0, writeSize = 0;
  while ((c = getopt(argc, argv, "rfs:")) != -1) {
    switch (c) {
    case 's':
      writeSize = strtol(optarg, NULL, 10);
      break;
    case 'f':
      break;
    case 'r':
      recurs = 1;
      break;
    default:
      abort();
    }
  }
  int argNum = optind;
  int status = 0;
  while (!status && argNum < argc) {
    switch (recurs) {
    case 1:
      status = deleteFiles(argv[argNum]);
      break;
    default:
      status = deleteFile(argv[argNum]);
      break;
    }
    argNum++;
  }
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe77(%rip),%rdx
call   1070 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     120c <main+0xbc>
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
sub    $0x66,%eax
je     11ef <main+0x9f>
jmp    11ae <main+0x5e>
mov    -0x28(%rbp),%eax
sub    $0x72,%eax
je     11f4 <main+0xa4>
jmp    11bf <main+0x6f>
mov    -0x28(%rbp),%eax
sub    $0x73,%eax
jne    1200 <main+0xb0>
jmp    11d0 <main+0x80>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x1c(%rbp)
jmp    1207 <main+0xb7>
jmp    1207 <main+0xb7>
movl   $0x1,-0x18(%rbp)
jmp    1207 <main+0xb7>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    117b <main+0x2b>
mov    0x2dcd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x24(%rbp)
mov    %al,-0x29(%rbp)
jne    123a <main+0xea>
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    124a <main+0xfa>
jmp    1296 <main+0x146>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
jne    1274 <main+0x124>
jmp    125b <main+0x10b>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <deleteFiles@plt>
mov    %eax,-0x24(%rbp)
jmp    1288 <main+0x138>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <deleteFile@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    121f <main+0xcf>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r12
mov    %edi,%ebp
xor    %r15d,%r15d
lea    0xe99(%rip),%r14
mov    0x2e8a(%rip),%rbx
jmp    1175 <main+0x25>
cmp    $0x66,%eax
jne    11a6 <main+0x56>
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
call   1070 <getopt@plt>
cmp    $0x71,%eax
jle    1170 <main+0x20>
cmp    $0x73,%eax
jne    119c <main+0x4c>
mov    (%rbx),%edi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
jmp    1175 <main+0x25>
cmp    $0x72,%eax
jne    120e <main+0xbe>
mov    $0x1,%r15b
jmp    1175 <main+0x25>
cmp    $0xffffffff,%eax
jne    120e <main+0xbe>
mov    0x2e2e(%rip),%rax
movslq (%rax),%rbx
xor    %eax,%eax
cmp    %ebp,%ebx
jge    1205 <main+0xb5>
movslq %ebp,%rbp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    -0x8(%r12,%rbx,8),%rdi
test   $0x1,%r15b
je     11f0 <main+0xa0>
call   1030 <deleteFiles@plt>
test   %eax,%eax
je     11f9 <main+0xa9>
jmp    1205 <main+0xb5>
cs nopw 0x0(%rax,%rax,1)
call   1050 <deleteFile@plt>
test   %eax,%eax
jne    1205 <main+0xb5>
lea    0x1(%rbx),%rcx
cmp    %rbp,%rbx
mov    %rcx,%rbx
jl     11d0 <main+0x80>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"rfs:\00"
@optarg = global i32 0
@optind = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
br label %11
11: ; preds = %25, %2
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
%14 = call i32 @getopt(i32 %12, i8** %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %14, i32* %6
%15 = icmp ne i32 %14, -1
br i1 %15, label %16, label %26
16: ; preds = %11
%17 = load i32, i32* %6
switch i32 %17, label %23 [
i32 115, label %18
i32 102, label %21
i32 114, label %22
]
18: ; preds = %16
%19 = load i32, i32* @optarg
%20 = call i32 @strtol(i32 %19, i32* null, i32 10)
store i32 %20, i32* %8
br label %25
21: ; preds = %16
br label %25
22: ; preds = %16
store i32 1, i32* %7
br label %25
23: ; preds = %16
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %22, %21, %18
br label %11
26: ; preds = %11
%27 = load i32, i32* @optind
store i32 %27, i32* %9
store i32 0, i32* %10
br label %28
28: ; preds = %53, %26
%29 = load i32, i32* %10
%30 = icmp ne i32 %29, 0
br i1 %30, label %35, label %31
31: ; preds = %28
%32 = load i32, i32* %9
%33 = load i32, i32* %4
%34 = icmp slt i32 %32, %33
br label %35
35: ; preds = %31, %28
%36 = phi i1 [ false, %28 ], [ %34, %31 ]
br i1 %36, label %37, label %56
37: ; preds = %35
%38 = load i32, i32* %7
switch i32 %38, label %46 [
i32 1, label %39
]
39: ; preds = %37
%40 = load i8**, i8*** %5
%41 = load i32, i32* %9
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 @deleteFiles(i8* %44)
store i32 %45, i32* %10
br label %53
46: ; preds = %37
%47 = load i8**, i8*** %5
%48 = load i32, i32* %9
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %47, i64 %49
%51 = load i8*, i8** %50
%52 = call i32 @deleteFile(i8* %51)
store i32 %52, i32* %10
br label %53
53: ; preds = %46, %39
%54 = load i32, i32* %9
%55 = add nsw i32 %54, 1
store i32 %55, i32* %9
br label %28
56: ; preds = %35
%57 = load i32, i32* %10
ret i32 %57
}

LLVM IR (-O2):
@.str = [5 x i8] c"rfs:\00"
@optarg = global i32 0
@optind = global i32 0
define i32 @main(i32 %0, i8** %1) {
br label %3
3: ; preds = %5, %2
%4 = phi i1 [ false, %2 ], [ true, %5 ]
br label %5
5: ; preds = %7, %3
%6 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
switch i32 %6, label %11 [
i32 -1, label %13
i32 115, label %8
i32 102, label %7
i32 114, label %3
]
7: ; preds = %5, %8
br label %5
8: ; preds = %5
%9 = load i32, i32* @optarg
%10 = tail call i32 @strtol(i32 %9, i32* null, i32 10)
br label %7
11: ; preds = %5
%12 = tail call i32 (...) @abort()
unreachable
13: ; preds = %5
%14 = load i32, i32* @optind
%15 = icmp slt i32 %14, %0
br i1 %15, label %16, label %33
16: ; preds = %13
%17 = sext i32 %14 to i64
%18 = sext i32 %0 to i64
br label %19
19: ; preds = %16, %27
%20 = phi i64 [ %17, %16 ], [ %29, %27 ]
%21 = getelementptr inbounds i8*, i8** %1, i64 %20
%22 = load i8*, i8** %21
br i1 %4, label %23, label %25
23: ; preds = %19
%24 = tail call i32 @deleteFiles(i8* %22)
br label %27
25: ; preds = %19
%26 = tail call i32 @deleteFile(i8* %22)
br label %27
27: ; preds = %25, %23
%28 = phi i32 [ %24, %23 ], [ %26, %25 ]
%29 = add nsw i64 %20, 1
%30 = icmp eq i32 %28, 0
%31 = icmp slt i64 %29, %18
%32 = select i1 %30, i1 %31, i1 false
br i1 %32, label %19, label %33
33: ; preds = %27, %13
%34 = phi i32 [ 0, %13 ], [ %28, %27 ]
ret i32 %34
}