#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 */
struct option {
  char *member_0;
  float member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
char *basename(char *);
int /*<<< orphan*/ err(int, char *);
int /*<<< orphan*/ errx(int, char *);
int /*<<< orphan*/ free(char *);
int getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
int help(char *, char *);
int /*<<< orphan*/ no_argument;
int optind;
int /*<<< orphan*/ removeFile(char *, int, int, int);
scalar_t__ strcmp(char *, char *);
char *strdup(char *);
int version(char *);
int /*<<< orphan*/ warnx(char *, ...);
int main(int argc, char *argv[]) {
  struct option longopts[] = {{"force", no_argument, 0, 'f'},
                              {"recursive", no_argument, 0, 'r'},
                              {"help", no_argument, 0, 0},
                              {"version", no_argument, 0, 1},
                              {0, 0, 0, 0}};
  bool force = false;
  bool prompt = false;
  bool recursive = false;
  int c;
  while ((c = getopt_long(argc, argv, "fiRr", longopts, NULL)) != -1) {
    switch (c) {
    case 0:
      return help(argv[0],
                  "[OPTIONS] FILE...\n"
                  "  -f, --force              ignore nonexistent files\n"
                  "  -i                       prompt for confirmation\n"
                  "  -r, -R, --recursive      recursively remove directories\n"
                  "      --help               display this help\n"
                  "      --version            display version info");
    case 1:
      return version(argv[0]);
    case 'f':
      force = true;
      prompt = false;
      break;
    case 'i':
      force = false;
      prompt = true;
      break;
    case 'R':
    case 'r':
      recursive = true;
      break;
    case '?':
      return 1;
    }
  }
  if (optind >= argc)
    errx(1, "missing operand");
  int exitStatus = 0;
  for (int i = optind; i < argc; i++) {
    char *nameCopy = strdup(argv[i]);
    if (!nameCopy)
      err(1, "strdup");
    char *base = basename(nameCopy);
    if (strcmp(base, "/") == 0) {
      warnx("cannot remove root directory");
      free(nameCopy);
      exitStatus = 1;
      continue;
    }
    if (strcmp(base, ".") == 0 || strcmp(base, "..") == 0) {
      warnx("cannot remove '%s'", argv[i]);
      free(nameCopy);
      exitStatus = 1;
      continue;
    }
    free(nameCopy);
    if (!removeFile(argv[i], force, prompt, recursive)) {
      exitStatus = 1;
    }
  }
  return exitStatus;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xe19(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0x2de3(%rip),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x88(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x66,-0x80(%rbp)
add    $0x18,%rdi
lea    0xde9(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0x2db0(%rip),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x70(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x72,-0x68(%rbp)
add    $0x18,%rdi
lea    0xdc6(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2d83(%rip),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x58(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x50(%rbp)
add    $0x18,%rdi
lea    0xd9e(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0x2d56(%rip),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x1,-0x38(%rbp)
add    $0x18,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1070 <memset@plt>
movl   $0x0,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
movl   $0x0,-0x9c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x90(%rbp),%rcx
lea    0xd41(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <getopt_long@plt>
mov    %eax,-0xa0(%rbp)
cmp    $0xffffffff,%eax
je     1407 <main+0x247>
mov    -0xa0(%rbp),%eax
mov    %eax,-0xbc(%rbp)
test   %eax,%eax
je     1386 <main+0x1c6>
jmp    130e <main+0x14e>
mov    -0xbc(%rbp),%eax
sub    $0x1,%eax
je     13a1 <main+0x1e1>
jmp    1322 <main+0x162>
mov    -0xbc(%rbp),%eax
sub    $0x3f,%eax
je     13f6 <main+0x236>
jmp    1336 <main+0x176>
mov    -0xbc(%rbp),%eax
sub    $0x52,%eax
je     13e7 <main+0x227>
jmp    134a <main+0x18a>
mov    -0xbc(%rbp),%eax
sub    $0x66,%eax
je     13b5 <main+0x1f5>
jmp    135e <main+0x19e>
mov    -0xbc(%rbp),%eax
sub    $0x69,%eax
je     13ce <main+0x20e>
jmp    1372 <main+0x1b2>
mov    -0xbc(%rbp),%eax
sub    $0x72,%eax
je     13e7 <main+0x227>
jmp    1402 <main+0x242>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xc8e(%rip),%rsi
call   10d0 <help@plt>
mov    %eax,-0x4(%rbp)
jmp    15be <main+0x3fe>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <version@plt>
mov    %eax,-0x4(%rbp)
jmp    15be <main+0x3fe>
movl   $0x1,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
jmp    1402 <main+0x242>
movl   $0x0,-0x94(%rbp)
movl   $0x1,-0x98(%rbp)
jmp    1402 <main+0x242>
movl   $0x1,-0x9c(%rbp)
jmp    1402 <main+0x242>
movl   $0x1,-0x4(%rbp)
jmp    15be <main+0x3fe>
jmp    12c7 <main+0x107>
mov    0x2bda(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     142a <main+0x26a>
mov    $0x1,%edi
lea    0xd0d(%rip),%rsi
call   1050 <errx@plt>
movl   $0x0,-0xa4(%rbp)
mov    0x2bad(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa8(%rbp)
mov    -0xa8(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    15b5 <main+0x3f5>
mov    -0x10(%rbp),%rax
movslq -0xa8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10e0 <strdup@plt>
mov    %rax,-0xb0(%rbp)
cmpq   $0x0,-0xb0(%rbp)
jne    148c <main+0x2cc>
mov    $0x1,%edi
lea    0xcbb(%rip),%rsi
call   10b0 <err@plt>
mov    -0xb0(%rbp),%rdi
call   1090 <basename@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rdi
lea    0xc9c(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    14e5 <main+0x325>
lea    0xc88(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0xa4(%rbp)
jmp    15a1 <main+0x3e1>
mov    -0xb8(%rbp),%rdi
lea    0xc76(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     151f <main+0x35f>
mov    -0xb8(%rbp),%rdi
lea    0xc58(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1557 <main+0x397>
mov    -0x10(%rbp),%rax
movslq -0xa8(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xc36(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0xa4(%rbp)
jmp    15a1 <main+0x3e1>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
movslq -0xa8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x94(%rbp),%esi
mov    -0x98(%rbp),%edx
mov    -0x9c(%rbp),%ecx
call   10c0 <removeFile@plt>
cmp    $0x0,%eax
jne    159c <main+0x3dc>
movl   $0x1,-0xa4(%rbp)
jmp    15a1 <main+0x3e1>
mov    -0xa8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa8(%rbp)
jmp    1443 <main+0x283>
mov    -0xa4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
mov    0x2e0b(%rip),%rax
cvtsi2ssl (%rax),%xmm0
lea    0xeac(%rip),%rax
mov    %rax,0x10(%rsp)
movss  %xmm0,0x18(%rsp)
movabs $0x6600000000,%rax
mov    %rax,0x1c(%rsp)
lea    0xe91(%rip),%rax
mov    %rax,0x28(%rsp)
movss  %xmm0,0x30(%rsp)
movabs $0x7200000000,%rax
mov    %rax,0x34(%rsp)
lea    0xe7a(%rip),%rax
mov    %rax,0x40(%rsp)
movss  %xmm0,0x48(%rsp)
movq   $0x0,0x4c(%rsp)
lea    0xe64(%rip),%rax
mov    %rax,0x58(%rsp)
movss  %xmm0,0x60(%rsp)
movabs $0x100000000,%rax
mov    %rax,0x64(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movq   $0x0,0x80(%rsp)
xor    %r12d,%r12d
lea    0xe34(%rip),%r14
lea    0x10(%rsp),%r13
lea    0xd87(%rip),%r15
movl   $0x0,(%rsp)
movl   $0x0,0x4(%rsp)
jmp    1299 <main+0xe9>
nopw   0x0(%rax,%rax,1)
cmp    $0x3f,%eax
je     1466 <main+0x2b6>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
xor    %r8d,%r8d
call   1040 <getopt_long@plt>
cmp    $0x3e,%eax
jg     12d0 <main+0x120>
cmp    $0xffffffff,%eax
je     130b <main+0x15b>
test   %eax,%eax
je     1443 <main+0x293>
cmp    $0x1,%eax
jne    1299 <main+0xe9>
jmp    1458 <main+0x2a8>
nopl   0x0(%rax,%rax,1)
lea    -0x52(%rax),%ecx
cmp    $0x20,%ecx
ja     1290 <main+0xe0>
movslq (%r15,%rcx,4),%rax
add    %r15,%rax
jmp    *%rax
mov    $0x1,%r12d
jmp    1299 <main+0xe9>
movl   $0x1,0x4(%rsp)
movl   $0x0,(%rsp)
jmp    1299 <main+0xe9>
movl   $0x0,0x4(%rsp)
movl   $0x1,(%rsp)
jmp    1299 <main+0xe9>
mov    %r12,0x8(%rsp)
mov    0x2cd1(%rip),%r14
mov    (%r14),%eax
cmp    %ebx,%eax
jl     1332 <main+0x182>
lea    0xe91(%rip),%rsi
mov    $0x1,%edi
call   1050 <errx@plt>
mov    (%r14),%eax
xor    %r14d,%r14d
cmp    %ebx,%eax
jge    146c <main+0x2bc>
movslq %eax,%rcx
lea    0x0(,%rcx,8),%r12
add    %rbp,%r12
sub    %eax,%ebx
xor    %ebp,%ebp
xor    %r14d,%r14d
jmp    138c <main+0x1dc>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r12,%rbp,8),%rsi
lea    0xe84(%rip),%rdi
xor    %eax,%eax
call   1060 <warnx@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    $0x1,%r14d
add    $0x1,%rbp
cmp    %ebp,%ebx
je     146c <main+0x2bc>
mov    (%r12,%rbp,8),%rdi
call   10d0 <strdup@plt>
mov    %rax,%r13
test   %rax,%rax
jne    13ae <main+0x1fe>
mov    $0x1,%edi
lea    0xe1d(%rip),%rsi
call   10a0 <err@plt>
mov    %r13,%rdi
call   1080 <basename@plt>
mov    %rax,%r15
mov    %rax,%rdi
lea    0xe0a(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1430 <main+0x280>
mov    %r15,%rdi
lea    0xe16(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1360 <main+0x1b0>
mov    %r15,%rdi
lea    0xdfd(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1360 <main+0x1b0>
mov    %r13,%rdi
call   1030 <free@plt>
mov    (%r12,%rbp,8),%rdi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
mov    0x8(%rsp),%rcx
call   10b0 <removeFile@plt>
test   %eax,%eax
mov    $0x1,%eax
cmove  %eax,%r14d
jmp    1380 <main+0x1d0>
nopw   0x0(%rax,%rax,1)
lea    0xd98(%rip),%rdi
xor    %eax,%eax
call   1060 <warnx@plt>
jmp    1372 <main+0x1c2>
mov    0x0(%rbp),%rdi
lea    0xc58(%rip),%rsi
call   10c0 <help@plt>
mov    %eax,%r14d
jmp    146c <main+0x2bc>
mov    0x0(%rbp),%rdi
call   1090 <version@plt>
mov    %eax,%r14d
jmp    146c <main+0x2bc>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option = type { i8*, float, i32, i32 }
@.str = [6 x i8] c"force\00"
@no_argument = global i32 0
@.str.1 = [10 x i8] c"recursive\00"
@.str.2 = [5 x i8] c"help\00"
@.str.3 = [8 x i8] c"version\00"
@.str.4 = [5 x i8] c"fiRr\00"
@.str.5 = [272 x i8] c"[OPTIONS] FILE...\0A -f, --force ignore nonexistent files\0A -i prompt for confirmation\0A -r, -R, --recursive recursively remove directories\0A --help display this help\0A --version display version info\00"
@optind = global i32 0
@.str.6 = [16 x i8] c"missing operand\00"
@.str.7 = [7 x i8] c"strdup\00"
@.str.8 = [2 x i8] c"/\00"
@.str.9 = [29 x i8] c"cannot remove root directory\00"
@.str.10 = [2 x i8] c".\00"
@.str.11 = [3 x i8] c"..\00"
@.str.12 = [19 x i8] c"cannot remove '%s'\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x %struct.option]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %6, i64 0, i64 0
%16 = getelementptr inbounds %struct.option, %struct.option* %15, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %16
%17 = getelementptr inbounds %struct.option, %struct.option* %15, i32 0, i32 1
%18 = load i32, i32* @no_argument
%19 = sitofp i32 %18 to float
store float %19, float* %17
%20 = getelementptr inbounds %struct.option, %struct.option* %15, i32 0, i32 2
store i32 0, i32* %20
%21 = getelementptr inbounds %struct.option, %struct.option* %15, i32 0, i32 3
store i32 102, i32* %21
%22 = getelementptr inbounds %struct.option, %struct.option* %15, i64 1
%23 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %23
%24 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 1
%25 = load i32, i32* @no_argument
%26 = sitofp i32 %25 to float
store float %26, float* %24
%27 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 2
store i32 0, i32* %27
%28 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 3
store i32 114, i32* %28
%29 = getelementptr inbounds %struct.option, %struct.option* %22, i64 1
%30 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %30
%31 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 1
%32 = load i32, i32* @no_argument
%33 = sitofp i32 %32 to float
store float %33, float* %31
%34 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 2
store i32 0, i32* %34
%35 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 3
store i32 0, i32* %35
%36 = getelementptr inbounds %struct.option, %struct.option* %29, i64 1
%37 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %37
%38 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 1
%39 = load i32, i32* @no_argument
%40 = sitofp i32 %39 to float
store float %40, float* %38
%41 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 2
store i32 0, i32* %41
%42 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 3
store i32 1, i32* %42
%43 = getelementptr inbounds %struct.option, %struct.option* %36, i64 1
%44 = bitcast %struct.option* %43 to i8*
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
br label %45
45: ; preds = %67, %2
%46 = load i32, i32* %4
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %6, i64 0, i64 0
%49 = call i32 @getopt_long(i32 %46, i8** %47, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), %struct.option* %48, i32* null)
store i32 %49, i32* %10
%50 = icmp ne i32 %49, -1
br i1 %50, label %51, label %68
51: ; preds = %45
%52 = load i32, i32* %10
switch i32 %52, label %67 [
i32 0, label %53
i32 1, label %58
i32 102, label %63
i32 105, label %64
i32 82, label %65
i32 114, label %65
i32 63, label %66
]
53: ; preds = %51
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 0
%56 = load i8*, i8** %55
%57 = call i32 @help(i8* %56, i8* getelementptr inbounds ([272 x i8], [272 x i8]* @.str.5, i64 0, i64 0))
store i32 %57, i32* %3
br label %138
58: ; preds = %51
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 0
%61 = load i8*, i8** %60
%62 = call i32 @version(i8* %61)
store i32 %62, i32* %3
br label %138
63: ; preds = %51
store i32 1, i32* %7
store i32 0, i32* %8
br label %67
64: ; preds = %51
store i32 0, i32* %7
store i32 1, i32* %8
br label %67
65: ; preds = %51, %51
store i32 1, i32* %9
br label %67
66: ; preds = %51
store i32 1, i32* %3
br label %138
67: ; preds = %51, %65, %64, %63
br label %45
68: ; preds = %45
%69 = load i32, i32* @optind
%70 = load i32, i32* %4
%71 = icmp sge i32 %69, %70
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
br label %74
74: ; preds = %72, %68
store i32 0, i32* %11
%75 = load i32, i32* @optind
store i32 %75, i32* %12
br label %76
76: ; preds = %133, %74
%77 = load i32, i32* %12
%78 = load i32, i32* %4
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %136
80: ; preds = %76
%81 = load i8**, i8*** %5
%82 = load i32, i32* %12
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8*, i8** %81, i64 %83
%85 = load i8*, i8** %84
%86 = call i8* @strdup(i8* %85)
store i8* %86, i8** %13
%87 = load i8*, i8** %13
%88 = icmp ne i8* %87, null
br i1 %88, label %91, label %89
89: ; preds = %80
%90 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %91
91: ; preds = %89, %80
%92 = load i8*, i8** %13
%93 = call i8* @basename(i8* %92)
store i8* %93, i8** %14
%94 = load i8*, i8** %14
%95 = call i64 @strcmp(i8* %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %101
97: ; preds = %91
%98 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%99 = load i8*, i8** %13
%100 = call i32 @free(i8* %99)
store i32 1, i32* %11
br label %133
101: ; preds = %91
%102 = load i8*, i8** %14
%103 = call i64 @strcmp(i8* %102, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%104 = icmp eq i64 %103, 0
br i1 %104, label %109, label %105
105: ; preds = %101
%106 = load i8*, i8** %14
%107 = call i64 @strcmp(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %118
109: ; preds = %105, %101
%110 = load i8**, i8*** %5
%111 = load i32, i32* %12
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i8*, i8** %110, i64 %112
%114 = load i8*, i8** %113
%115 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* %114)
%116 = load i8*, i8** %13
%117 = call i32 @free(i8* %116)
store i32 1, i32* %11
br label %133
118: ; preds = %105
%119 = load i8*, i8** %13
%120 = call i32 @free(i8* %119)
%121 = load i8**, i8*** %5
%122 = load i32, i32* %12
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8*, i8** %121, i64 %123
%125 = load i8*, i8** %124
%126 = load i32, i32* %7
%127 = load i32, i32* %8
%128 = load i32, i32* %9
%129 = call i32 @removeFile(i8* %125, i32 %126, i32 %127, i32 %128)
%130 = icmp ne i32 %129, 0
br i1 %130, label %132, label %131
131: ; preds = %118
store i32 1, i32* %11
br label %132
132: ; preds = %131, %118
br label %133
133: ; preds = %132, %109, %97
%134 = load i32, i32* %12
%135 = add nsw i32 %134, 1
store i32 %135, i32* %12
br label %76
136: ; preds = %76
%137 = load i32, i32* %11
store i32 %137, i32* %3
br label %138
138: ; preds = %136, %66, %58, %53
%139 = load i32, i32* %3
ret i32 %139
}

LLVM IR (-O2):
%struct.option = type { i8*, float, i32, i32 }
@.str = [6 x i8] c"force\00"
@no_argument = global i32 0
@.str.1 = [10 x i8] c"recursive\00"
@.str.2 = [5 x i8] c"help\00"
@.str.3 = [8 x i8] c"version\00"
@.str.4 = [5 x i8] c"fiRr\00"
@.str.5 = [272 x i8] c"[OPTIONS] FILE...\0A -f, --force ignore nonexistent files\0A -i prompt for confirmation\0A -r, -R, --recursive recursively remove directories\0A --help display this help\0A --version display version info\00"
@optind = global i32 0
@.str.6 = [16 x i8] c"missing operand\00"
@.str.7 = [7 x i8] c"strdup\00"
@.str.8 = [2 x i8] c"/\00"
@.str.9 = [29 x i8] c"cannot remove root directory\00"
@.str.10 = [2 x i8] c".\00"
@.str.11 = [3 x i8] c"..\00"
@.str.12 = [19 x i8] c"cannot remove '%s'\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [5 x %struct.option]
%4 = bitcast [5 x %struct.option]* %3 to i8*
%5 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0
%6 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 1
%8 = load i32, i32* @no_argument
%9 = sitofp i32 %8 to float
store float %9, float* %7
%10 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 2
store i32 0, i32* %10
%11 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 3
store i32 102, i32* %11
%12 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 1
store float %9, float* %13
%14 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 2
store i32 0, i32* %14
%15 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 3
store i32 114, i32* %15
%16 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %16
%17 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 1
store float %9, float* %17
%18 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 2
store i32 0, i32* %18
%19 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 3
store i32 0, i32* %19
%20 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %20
%21 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 1
store float %9, float* %21
%22 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 2
store i32 0, i32* %22
%23 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 3
store i32 1, i32* %23
%24 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 4
%25 = bitcast %struct.option* %24 to i8*
br label %26
26: ; preds = %45, %2
%27 = phi i32 [ 1, %45 ], [ 0, %2 ]
%28 = phi i32 [ %31, %45 ], [ 0, %2 ]
%29 = phi i32 [ %32, %45 ], [ 0, %2 ]
br label %30
30: ; preds = %42, %26
%31 = phi i32 [ %28, %26 ], [ %43, %42 ]
%32 = phi i32 [ %29, %26 ], [ %44, %42 ]
br label %33
33: ; preds = %30, %33
%34 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), %struct.option* %5, i32* null)
switch i32 %34, label %33 [
i32 -1, label %46
i32 0, label %35
i32 1, label %38
i32 102, label %42
i32 105, label %41
i32 82, label %45
i32 114, label %45
i32 63, label %94
]
35: ; preds = %33
%36 = load i8*, i8** %1
%37 = call i32 @help(i8* %36, i8* getelementptr inbounds ([272 x i8], [272 x i8]* @.str.5, i64 0, i64 0))
br label %94
38: ; preds = %33
%39 = load i8*, i8** %1
%40 = call i32 @version(i8* %39)
br label %94
41: ; preds = %33
br label %42
42: ; preds = %33, %41
%43 = phi i32 [ 1, %41 ], [ 0, %33 ]
%44 = phi i32 [ 0, %41 ], [ 1, %33 ]
br label %30
45: ; preds = %33, %33
br label %26
46: ; preds = %33
%47 = load i32, i32* @optind
%48 = icmp slt i32 %47, %0
br i1 %48, label %52, label %49
49: ; preds = %46
%50 = call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%51 = load i32, i32* @optind
br label %52
52: ; preds = %49, %46
%53 = phi i32 [ %51, %49 ], [ %47, %46 ]
%54 = icmp slt i32 %53, %0
br i1 %54, label %55, label %94
55: ; preds = %52
%56 = sext i32 %53 to i64
br label %57
57: ; preds = %55, %89
%58 = phi i64 [ %56, %55 ], [ %91, %89 ]
%59 = phi i32 [ 0, %55 ], [ %90, %89 ]
%60 = getelementptr inbounds i8*, i8** %1, i64 %58
%61 = load i8*, i8** %60
%62 = call i8* @strdup(i8* %61)
%63 = icmp eq i8* %62, null
br i1 %63, label %64, label %66
64: ; preds = %57
%65 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %66
66: ; preds = %64, %57
%67 = call i8* @basename(i8* %62)
%68 = call i64 @strcmp(i8* %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %66
%71 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%72 = call i32 @free(i8* %62)
br label %89
73: ; preds = %66
%74 = call i64 @strcmp(i8* %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %79, label %76
76: ; preds = %73
%77 = call i64 @strcmp(i8* %67, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %83
79: ; preds = %76, %73
%80 = load i8*, i8** %60
%81 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* %80)
%82 = call i32 @free(i8* %62)
br label %89
83: ; preds = %76
%84 = call i32 @free(i8* %62)
%85 = load i8*, i8** %60
%86 = call i32 @removeFile(i8* %85, i32 %32, i32 %31, i32 %27)
%87 = icmp eq i32 %86, 0
%88 = select i1 %87, i32 1, i32 %59
br label %89
89: ; preds = %83, %79, %70
%90 = phi i32 [ 1, %70 ], [ 1, %79 ], [ %88, %83 ]
%91 = add nsw i64 %58, 1
%92 = trunc i64 %91 to i32
%93 = icmp eq i32 %92, %0
br i1 %93, label %94, label %57
94: ; preds = %33, %89, %52, %38, %35
%95 = phi i32 [ %40, %38 ], [ %37, %35 ], [ 0, %52 ], [ %90, %89 ], [ 1, %33 ]
ret i32 %95
}