#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 */
typedef struct TYPE_7__ TYPE_2__;
typedef struct TYPE_6__ TYPE_1__;

/* Type definitions */
typedef int mode_t;
struct TYPE_7__ {
  scalar_t__ fts_level;
  int fts_info;
  char *fts_path;
  TYPE_1__ *fts_statp;
  int /*<<< orphan*/ fts_accpath;
  int /*<<< orphan*/ fts_errno;
};
struct TYPE_6__ {
  int st_mode;
};
typedef TYPE_2__ FTSENT;
typedef int /*<<< orphan*/ FTS;

/* Variables and functions */
int ALLPERMS;
int /*<<< orphan*/ AT_FDCWD;
int AT_SYMLINK_NOFOLLOW;
int FTS_COMFOLLOW;
#define FTS_D 131
#define FTS_DNR 130
#define FTS_ERR 129
int FTS_LOGICAL;
#define FTS_NS 128
int FTS_PHYSICAL;
scalar_t__ FTS_ROOTLEVEL;
int /*<<< orphan*/ FTS_SKIP;
int S_IFMT;
int /*<<< orphan*/ err(int, char *);
scalar_t__ errno;
int /*<<< orphan*/ errx(int, char *, ...);
int /*<<< orphan*/ exit(int);
int fchmodat(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ *fts_open(char **, int, int /*<<< orphan*/);
TYPE_2__ *fts_read(int /*<<< orphan*/ *);
int /*<<< orphan*/ fts_set(int /*<<< orphan*/ *, TYPE_2__ *,
                           int /*<<< orphan*/);
int getmode(int *, int);
int getopt(int, char **, char *);
scalar_t__ may_have_nfs4acl(TYPE_2__ *, int);
size_t optind;
int /*<<< orphan*/ printf(char *, ...);
int *setmode(char *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ strmode(int, char *);
int /*<<< orphan*/ usage();
int /*<<< orphan*/ warn(char *, char *);
int /*<<< orphan*/ warnx(char *, char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  FTS *ftsp;
  FTSENT *p;
  mode_t *set;
  int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval;
  int vflag;
  char *mode;
  mode_t newmode;
  set = NULL;
  Hflag = Lflag = Rflag = fflag = hflag = vflag = 0;
  while ((ch = getopt(argc, argv, "HLPRXfghorstuvwx")) != -1)
    switch (ch) {
    case 'H':
      Hflag = 1;
      Lflag = 0;
      break;
    case 'L':
      Lflag = 1;
      Hflag = 0;
      break;
    case 'P':
      Hflag = Lflag = 0;
      break;
    case 'R':
      Rflag = 1;
      break;
    case 'f':
      fflag = 1;
      break;
    case 'h':
      hflag = 1;
      break;
    case 'g':
    case 'o':
    case 'r':
    case 's':
    case 't':
    case 'u':
    case 'w':
    case 'X':
    case 'x':
      if (argv[optind - 1][0] == '-' && argv[optind - 1][1] == ch &&
          argv[optind - 1][2] == '\0')
        --optind;
      goto done;
    case 'v':
      vflag++;
      break;
    case '?':
    default:
      usage();
    }
done:
  argv += optind;
  argc -= optind;
  if (argc < 2)
    usage();
  if (Rflag) {
    if (hflag)
      errx(1, "the -R and -h options may not be "
              "specified together.");
    if (Lflag) {
      fts_options = FTS_LOGICAL;
    } else {
      fts_options = FTS_PHYSICAL;
      if (Hflag) {
        fts_options |= FTS_COMFOLLOW;
      }
    }
  } else if (hflag) {
    fts_options = FTS_PHYSICAL;
  } else {
    fts_options = FTS_LOGICAL;
  }
  mode = *argv;
  if ((set = setmode(mode)) == NULL)
    errx(1, "invalid file mode: %s", mode);
  if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL)
    err(1, "fts_open");
  for (rval = 0; (p = fts_read(ftsp)) != NULL;) {
    int atflag;
    if ((fts_options & FTS_LOGICAL) ||
        ((fts_options & FTS_COMFOLLOW) && p->fts_level == FTS_ROOTLEVEL))
      atflag = 0;
    else
      atflag = AT_SYMLINK_NOFOLLOW;
    switch (p->fts_info) {
    case FTS_D:
      if (!Rflag)
        fts_set(ftsp, p, FTS_SKIP);
      continue;
    case FTS_DNR:
      warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
      rval = 1;
      break;
    case FTS_ERR:
    case FTS_NS:
      warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
      rval = 1;
      continue;
    default:
      break;
    }
    newmode = getmode(set, p->fts_statp->st_mode);
    if (may_have_nfs4acl(p, hflag) == 0 &&
        (newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS))
      continue;
    if (fchmodat(AT_FDCWD, p->fts_accpath, newmode, atflag) == -1 && !fflag) {
      warn("%s", p->fts_path);
      rval = 1;
    } else if (vflag) {
      (void)printf("%s", p->fts_path);
      if (vflag > 1) {
        char m1[12], m2[12];
        strmode(p->fts_statp->st_mode, m1);
        strmode((p->fts_statp->st_mode & S_IFMT) | newmode, m2);
        (void)printf(": 0%o [%s] -> 0%o [%s]", p->fts_statp->st_mode, m1,
                     (p->fts_statp->st_mode & S_IFMT) | newmode, m2);
      }
      (void)printf("\n");
    }
  }
  if (errno)
    err(1, "fts_read");
  exit(rval);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe7f(%rip),%rdx
call   1110 <getopt@plt>
mov    %eax,-0x38(%rbp)
cmp    $0xffffffff,%eax
je     13a4 <main+0x194>
mov    -0x38(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x80(%rbp)
sub    $0x39,%eax
ja     1398 <main+0x188>
mov    -0x80(%rbp),%rax
lea    0xd66(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
jmp    139f <main+0x18f>
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
jmp    139f <main+0x18f>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
jmp    139f <main+0x18f>
movl   $0x1,-0x34(%rbp)
jmp    139f <main+0x18f>
movl   $0x1,-0x3c(%rbp)
jmp    139f <main+0x18f>
movl   $0x1,-0x44(%rbp)
jmp    139f <main+0x18f>
mov    -0x10(%rbp),%rax
mov    0x2cb5(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1380 <main+0x170>
mov    -0x10(%rbp),%rax
mov    0x2c93(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    -0x38(%rbp),%eax
jne    1380 <main+0x170>
mov    -0x10(%rbp),%rax
mov    0x2c70(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    1380 <main+0x170>
mov    0x2c51(%rip),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    0x2c43(%rip),%rax
mov    %rcx,(%rax)
jmp    13a9 <main+0x199>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    139f <main+0x18f>
jmp    1398 <main+0x188>
mov    $0x0,%al
call   10e0 <usage@plt>
jmp    125b <main+0x4b>
jmp    13a9 <main+0x199>
mov    0x2c10(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2bfa(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    13e4 <main+0x1d4>
mov    $0x0,%al
call   10e0 <usage@plt>
cmpl   $0x0,-0x34(%rbp)
je     1455 <main+0x245>
cmpl   $0x0,-0x44(%rbp)
je     140b <main+0x1fb>
mov    $0x1,%edi
lea    0xcf5(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
cmpl   $0x0,-0x30(%rbp)
je     1426 <main+0x216>
mov    0x2bd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
jmp    1450 <main+0x240>
mov    0x2bbb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     144b <main+0x23b>
mov    0x2b85(%rip),%rax
mov    (%rax),%eax
or     -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    1450 <main+0x240>
jmp    1481 <main+0x271>
cmpl   $0x0,-0x44(%rbp)
je     1470 <main+0x260>
mov    0x2b82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
jmp    147c <main+0x26c>
mov    0x2b79(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
jmp    1481 <main+0x271>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
call   10b0 <setmode@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    14ba <main+0x2aa>
mov    -0x58(%rbp),%rdx
mov    $0x1,%edi
lea    0xc7b(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    %rdi,-0x10(%rbp)
mov    -0x40(%rbp),%esi
xor    %edx,%edx
call   1090 <fts_open@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    14ef <main+0x2df>
mov    $0x1,%edi
lea    0xc5a(%rip),%rsi
call   10c0 <err@plt>
movl   $0x0,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
call   1080 <fts_read@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     17a2 <main+0x592>
mov    -0x40(%rbp),%eax
mov    0x2ad9(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
jne    154e <main+0x33e>
mov    -0x40(%rbp),%eax
mov    0x2a9c(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     155a <main+0x34a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    0x2a93(%rip),%rcx
cmp    (%rcx),%rax
jne    155a <main+0x34a>
movl   $0x0,-0x60(%rbp)
jmp    1566 <main+0x356>
mov    0x2a37(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x84(%rbp)
add    $0xffffff80,%eax
sub    $0x2,%eax
jb     1611 <main+0x401>
jmp    1584 <main+0x374>
mov    -0x84(%rbp),%eax
sub    $0x82,%eax
je     15d5 <main+0x3c5>
jmp    159a <main+0x38a>
mov    -0x84(%rbp),%eax
sub    $0x83,%eax
jne    164d <main+0x43d>
jmp    15b0 <main+0x3a0>
cmpl   $0x0,-0x34(%rbp)
jne    15d0 <main+0x3c0>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x2a07(%rip),%rax
mov    (%rax),%edx
call   1040 <fts_set@plt>
jmp    14f6 <main+0x2e6>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x90(%rbp)
mov    -0x20(%rbp),%rax
mov    0x24(%rax),%edi
call   1130 <strerror@plt>
mov    -0x90(%rbp),%rsi
mov    %eax,%edx
lea    0xb4d(%rip),%rdi
call   1070 <warnx@plt>
movl   $0x1,-0x48(%rbp)
jmp    1652 <main+0x442>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x98(%rbp)
mov    -0x20(%rbp),%rax
mov    0x24(%rax),%edi
call   1130 <strerror@plt>
mov    -0x98(%rbp),%rsi
mov    %eax,%edx
lea    0xb11(%rip),%rdi
call   1070 <warnx@plt>
movl   $0x1,-0x48(%rbp)
jmp    14f6 <main+0x2e6>
jmp    1652 <main+0x442>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%esi
call   1100 <getmode@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
call   10a0 <may_have_nfs4acl@plt>
cmp    $0x0,%rax
jne    16aa <main+0x49a>
mov    -0x5c(%rbp),%eax
mov    0x2920(%rip),%rcx
and    (%rcx),%eax
mov    -0x20(%rbp),%rcx
mov    0x18(%rcx),%rcx
mov    (%rcx),%ecx
mov    0x290d(%rip),%rdx
and    (%rdx),%ecx
cmp    %ecx,%eax
jne    16aa <main+0x49a>
jmp    14f6 <main+0x2e6>
mov    0x28d7(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    0x20(%rax),%esi
mov    -0x5c(%rbp),%edx
mov    -0x60(%rbp),%ecx
call   10d0 <fchmodat@plt>
cmp    $0xffffffff,%eax
jne    16f8 <main+0x4e8>
cmpl   $0x0,-0x3c(%rbp)
jne    16f8 <main+0x4e8>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xa5a(%rip),%rdi
call   1030 <warn@plt>
movl   $0x1,-0x48(%rbp)
jmp    179d <main+0x58d>
cmpl   $0x0,-0x4c(%rbp)
je     1798 <main+0x588>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xa30(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x1,-0x4c(%rbp)
jle    178a <main+0x57a>
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%edi
lea    -0x6c(%rbp),%rsi
call   10f0 <strmode@plt>
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%edi
mov    0x286a(%rip),%rax
and    (%rax),%edi
or     -0x5c(%rbp),%edi
lea    -0x78(%rbp),%rsi
call   10f0 <strmode@plt>
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%esi
lea    -0x6c(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%ecx
mov    0x283d(%rip),%rax
and    (%rax),%ecx
or     -0x5c(%rbp),%ecx
lea    -0x78(%rbp),%r8
lea    0x9d1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x9da(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    179d <main+0x58d>
jmp    14f6 <main+0x2e6>
mov    0x27f7(%rip),%rax
cmpq   $0x0,(%rax)
je     17c4 <main+0x5b4>
mov    $0x1,%edi
lea    0x9ae(%rip),%rsi
call   10c0 <err@plt>
mov    -0x48(%rbp),%edi
call   1120 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xfad(%rip),%r14
lea    0xdbe(%rip),%r13
xor    %ecx,%ecx
xor    %edx,%edx
movl   $0x0,0x4(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
jmp    1274 <main+0x54>
movl   $0x1,0x4(%rsp)
nop
mov    %ebx,%ecx
mov    %ebp,%edx
mov    %edx,%ebp
mov    %ecx,%ebx
mov    %r12d,%edi
mov    %r15,%rsi
mov    %r14,%rdx
call   1120 <getopt@plt>
lea    0x1(%rax),%edx
cmp    $0x79,%edx
ja     12a8 <main+0x88>
mov    $0x1,%ecx
movslq 0x0(%r13,%rdx,4),%rsi
add    %r13,%rsi
xor    %edx,%edx
jmp    *%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    1274 <main+0x54>
xor    %eax,%eax
call   10f0 <usage@plt>
jmp    1270 <main+0x50>
xor    %ecx,%ecx
xor    %edx,%edx
jmp    1274 <main+0x54>
movl   $0x1,0xc(%rsp)
jmp    1270 <main+0x50>
movl   $0x1,(%rsp)
jmp    1270 <main+0x50>
addl   $0x1,0x8(%rsp)
jmp    1270 <main+0x50>
mov    0x2ce8(%rip),%rcx
mov    (%rcx),%r14
mov    -0x8(%r15,%r14,8),%rdx
cmpb   $0x2d,(%rdx)
jne    1306 <main+0xe6>
movsbl 0x1(%rdx),%esi
cmp    %esi,%eax
jne    1306 <main+0xe6>
cmpb   $0x0,0x2(%rdx)
jne    1306 <main+0xe6>
add    $0xffffffffffffffff,%r14
mov    %r14,(%rcx)
jmp    1306 <main+0xe6>
mov    0x2cbd(%rip),%rax
mov    (%rax),%r14
sub    %r14d,%r12d
cmp    $0x1,%r12d
jg     1316 <main+0xf6>
xor    %eax,%eax
call   10f0 <usage@plt>
lea    (%r15,%r14,8),%r14
cmpl   $0x0,0x4(%rsp)
jne    1330 <main+0x110>
cmpl   $0x0,(%rsp)
je     1367 <main+0x147>
mov    0x2cba(%rip),%rax
jmp    136e <main+0x14e>
cmpl   $0x0,(%rsp)
je     1349 <main+0x129>
lea    0xebc(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1060 <errx@plt>
test   %ebp,%ebp
jne    1367 <main+0x147>
mov    0x2c94(%rip),%rax
mov    (%rax),%r13d
test   %ebx,%ebx
je     1371 <main+0x151>
mov    0x2c66(%rip),%rax
or     (%rax),%r13d
jmp    1371 <main+0x151>
mov    0x2c82(%rip),%rax
mov    (%rax),%r13d
mov    (%r14),%rbx
mov    %rbx,%rdi
call   10c0 <setmode@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
jne    139c <main+0x17c>
lea    0xea1(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <errx@plt>
add    $0x8,%r14
xor    %ebx,%ebx
mov    %r14,%rdi
mov    %r13d,%esi
xor    %edx,%edx
call   10a0 <fts_open@plt>
mov    %rax,%r15
test   %rax,%rax
jne    13c8 <main+0x1a8>
lea    0xe86(%rip),%rsi
mov    $0x1,%edi
call   10d0 <err@plt>
mov    %r15,%rdi
call   1090 <fts_read@plt>
test   %rax,%rax
jne    13fa <main+0x1da>
mov    0x2bc4(%rip),%rax
cmpq   $0x0,(%rax)
je     13f3 <main+0x1d3>
lea    0xe82(%rip),%rsi
mov    $0x1,%edi
call   10d0 <err@plt>
mov    %ebx,%edi
call   1130 <exit@plt>
mov    %rax,%r14
mov    0x2bec(%rip),%rbp
xor    %ebx,%ebx
mov    %r15,0x10(%rsp)
jmp    1443 <main+0x223>
nopl   (%rax)
mov    0x10(%r14),%rbx
mov    0x24(%r14),%edi
call   1140 <strerror@plt>
lea    0xe29(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1080 <warnx@plt>
mov    $0x1,%ebx
mov    %r15,%rdi
call   1090 <fts_read@plt>
mov    %rax,%r14
test   %rax,%rax
je     13d5 <main+0x1b5>
mov    $0x0,%r12d
test   %r13d,0x0(%rbp)
jne    147a <main+0x25a>
mov    0x2b72(%rip),%rax
test   %r13d,(%rax)
je     1470 <main+0x250>
mov    (%r14),%rax
mov    $0x0,%r12d
mov    0x2b6d(%rip),%rcx
cmp    (%rcx),%rax
je     147a <main+0x25a>
mov    0x2b21(%rip),%rax
mov    (%rax),%r12d
mov    0x8(%r14),%eax
lea    -0x80(%rax),%ecx
cmp    $0x2,%ecx
jb     1410 <main+0x1f0>
cmp    $0x82,%eax
je     14c0 <main+0x2a0>
cmp    $0x83,%eax
jne    14e3 <main+0x2c3>
cmpl   $0x0,0x4(%rsp)
jne    1433 <main+0x213>
mov    0x2b2e(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <fts_set@plt>
jmp    1433 <main+0x213>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x10(%r14),%rbx
mov    0x24(%r14),%edi
call   1140 <strerror@plt>
lea    0xd79(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1080 <warnx@plt>
mov    $0x1,%ebx
mov    0x18(%r14),%rax
mov    (%rax),%esi
mov    0x18(%rsp),%rdi
call   1110 <getmode@plt>
mov    %eax,%r15d
mov    %r14,%rdi
mov    (%rsp),%esi
call   10b0 <may_have_nfs4acl@plt>
test   %rax,%rax
jne    151a <main+0x2fa>
mov    0x18(%r14),%rax
mov    (%rax),%eax
xor    %r15d,%eax
mov    0x2a92(%rip),%rcx
test   %eax,(%rcx)
je     1553 <main+0x333>
mov    0x2a67(%rip),%rax
mov    (%rax),%edi
mov    0x20(%r14),%esi
mov    %r15d,%edx
mov    %r12d,%ecx
call   10e0 <fchmodat@plt>
cmp    $0xffffffff,%eax
jne    1564 <main+0x344>
cmpl   $0x0,0xc(%rsp)
jne    1564 <main+0x344>
mov    0x10(%r14),%rsi
lea    0xcf8(%rip),%rdi
call   1040 <warn@plt>
mov    $0x1,%ebx
mov    0x2a96(%rip),%rbp
mov    0x10(%rsp),%r15
jmp    1433 <main+0x213>
mov    %ebx,%r12d
mov    0x8(%rsp),%ebx
test   %ebx,%ebx
je     15e4 <main+0x3c4>
mov    0x10(%r14),%rsi
lea    0xcc7(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
cmp    $0x2,%ebx
jl     15da <main+0x3ba>
mov    0x18(%r14),%rax
mov    (%rax),%edi
lea    0x20(%rsp),%rsi
call   1100 <strmode@plt>
mov    0x18(%r14),%rax
mov    0x2a0f(%rip),%rbp
mov    0x0(%rbp),%edi
and    (%rax),%edi
or     %r15d,%edi
lea    0x2c(%rsp),%rbx
mov    %rbx,%rsi
call   1100 <strmode@plt>
mov    0x18(%r14),%rax
mov    (%rax),%esi
mov    0x0(%rbp),%ecx
and    %esi,%ecx
or     %r15d,%ecx
lea    0xc89(%rip),%rdi
lea    0x20(%rsp),%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2a05(%rip),%rbp
mov    0x10(%rsp),%r15
mov    %r12d,%ebx
jmp    1433 <main+0x213>

LLVM IR (-O0):
%struct.TYPE_7__ = type { i64, i32, i8*, %struct.TYPE_6__*, i32, i32 }
%struct.TYPE_6__ = type { i32 }
@.str = [17 x i8] c"HLPRXfghorstuvwx\00"
@optind = global i64 0
@.str.1 = [53 x i8] c"the -R and -h options may not be specified together.\00"
@FTS_LOGICAL = global i32 0
@FTS_PHYSICAL = global i32 0
@FTS_COMFOLLOW = global i32 0
@.str.2 = [22 x i8] c"invalid file mode: %s\00"
@.str.3 = [9 x i8] c"fts_open\00"
@FTS_ROOTLEVEL = global i64 0
@AT_SYMLINK_NOFOLLOW = global i32 0
@FTS_SKIP = global i32 0
@.str.4 = [7 x i8] c"%s: %s\00"
@ALLPERMS = global i32 0
@AT_FDCWD = global i32 0
@.str.5 = [3 x i8] c"%s\00"
@S_IFMT = global i32 0
@.str.6 = [23 x i8] c": 0%o [%s] -> 0%o [%s]\00"
@.str.7 = [2 x i8] c"\0A\00"
@errno = global i64 0
@.str.8 = [9 x i8] c"fts_read\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca %struct.TYPE_7__*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i32
%20 = alloca i32
%21 = alloca [12 x i8]
%22 = alloca [12 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %8
store i32 0, i32* %17
store i32 0, i32* %15
store i32 0, i32* %13
store i32 0, i32* %11
store i32 0, i32* %10
store i32 0, i32* %9
br label %23
23: ; preds = %77, %2
%24 = load i32, i32* %4
%25 = load i8**, i8*** %5
%26 = call i32 @getopt(i32 %24, i8** %25, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 %26, i32* %12
%27 = icmp ne i32 %26, -1
br i1 %27, label %28, label %78
28: ; preds = %23
%29 = load i32, i32* %12
switch i32 %29, label %75 [
i32 72, label %30
i32 76, label %31
i32 80, label %32
i32 82, label %33
i32 102, label %34
i32 104, label %35
i32 103, label %36
i32 111, label %36
i32 114, label %36
i32 115, label %36
i32 116, label %36
i32 117, label %36
i32 119, label %36
i32 88, label %36
i32 120, label %36
i32 118, label %71
i32 63, label %74
]
30: ; preds = %28
store i32 1, i32* %9
store i32 0, i32* %10
br label %77
31: ; preds = %28
store i32 1, i32* %10
store i32 0, i32* %9
br label %77
32: ; preds = %28
store i32 0, i32* %10
store i32 0, i32* %9
br label %77
33: ; preds = %28
store i32 1, i32* %11
br label %77
34: ; preds = %28
store i32 1, i32* %13
br label %77
35: ; preds = %28
store i32 1, i32* %15
br label %77
36: ; preds = %28, %28, %28, %28, %28, %28, %28, %28, %28
%37 = load i8**, i8*** %5
%38 = load i64, i64* @optind
%39 = sub i64 %38, 1
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = getelementptr inbounds i8, i8* %41, i64 0
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %44, 45
br i1 %45, label %46, label %70
46: ; preds = %36
%47 = load i8**, i8*** %5
%48 = load i64, i64* @optind
%49 = sub i64 %48, 1
%50 = getelementptr inbounds i8*, i8** %47, i64 %49
%51 = load i8*, i8** %50
%52 = getelementptr inbounds i8, i8* %51, i64 1
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = load i32, i32* %12
%56 = icmp eq i32 %54, %55
br i1 %56, label %57, label %70
57: ; preds = %46
%58 = load i8**, i8*** %5
%59 = load i64, i64* @optind
%60 = sub i64 %59, 1
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
%62 = load i8*, i8** %61
%63 = getelementptr inbounds i8, i8* %62, i64 2
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %57
%68 = load i64, i64* @optind
%69 = add i64 %68, -1
store i64 %69, i64* @optind
br label %70
70: ; preds = %67, %57, %46, %36
br label %79
71: ; preds = %28
%72 = load i32, i32* %17
%73 = add nsw i32 %72, 1
store i32 %73, i32* %17
br label %77
74: ; preds = %28
br label %75
75: ; preds = %28, %74
%76 = call i32 (...) @usage()
br label %77
77: ; preds = %75, %71, %35, %34, %33, %32, %31, %30
br label %23
78: ; preds = %23
br label %79
79: ; preds = %78, %70
%80 = load i64, i64* @optind
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 %80
store i8** %82, i8*** %5
%83 = load i64, i64* @optind
%84 = load i32, i32* %4
%85 = sext i32 %84 to i64
%86 = sub i64 %85, %83
%87 = trunc i64 %86 to i32
store i32 %87, i32* %4
%88 = load i32, i32* %4
%89 = icmp slt i32 %88, 2
br i1 %89, label %90, label %92
90: ; preds = %79
%91 = call i32 (...) @usage()
br label %92
92: ; preds = %90, %79
%93 = load i32, i32* %11
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %115
95: ; preds = %92
%96 = load i32, i32* %15
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %100
98: ; preds = %95
%99 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
br label %100
100: ; preds = %98, %95
%101 = load i32, i32* %10
%102 = icmp ne i32 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %100
%104 = load i32, i32* @FTS_LOGICAL
store i32 %104, i32* %14
br label %114
105: ; preds = %100
%106 = load i32, i32* @FTS_PHYSICAL
store i32 %106, i32* %14
%107 = load i32, i32* %9
%108 = icmp ne i32 %107, 0
br i1 %108, label %109, label %113
109: ; preds = %105
%110 = load i32, i32* @FTS_COMFOLLOW
%111 = load i32, i32* %14
%112 = or i32 %111, %110
store i32 %112, i32* %14
br label %113
113: ; preds = %109, %105
br label %114
114: ; preds = %113, %103
br label %123
115: ; preds = %92
%116 = load i32, i32* %15
%117 = icmp ne i32 %116, 0
br i1 %117, label %118, label %120
118: ; preds = %115
%119 = load i32, i32* @FTS_PHYSICAL
store i32 %119, i32* %14
br label %122
120: ; preds = %115
%121 = load i32, i32* @FTS_LOGICAL
store i32 %121, i32* %14
br label %122
122: ; preds = %120, %118
br label %123
123: ; preds = %122, %114
%124 = load i8**, i8*** %5
%125 = load i8*, i8** %124
store i8* %125, i8** %18
%126 = load i8*, i8** %18
%127 = call i32* @setmode(i8* %126)
store i32* %127, i32** %8
%128 = icmp eq i32* %127, null
br i1 %128, label %129, label %132
129: ; preds = %123
%130 = load i8*, i8** %18
%131 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %130)
br label %132
132: ; preds = %129, %123
%133 = load i8**, i8*** %5
%134 = getelementptr inbounds i8*, i8** %133, i32 1
store i8** %134, i8*** %5
%135 = load i32, i32* %14
%136 = call i32* @fts_open(i8** %134, i32 %135, i32 0)
store i32* %136, i32** %6
%137 = icmp eq i32* %136, null
br i1 %137, label %138, label %140
138: ; preds = %132
%139 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %140
140: ; preds = %138, %132
store i32 0, i32* %16
br label %141
141: ; preds = %287, %220, %186, %176, %140
%142 = load i32*, i32** %6
%143 = call %struct.TYPE_7__* @fts_read(i32* %142)
store %struct.TYPE_7__* %143, %struct.TYPE_7__** %7
%144 = icmp ne %struct.TYPE_7__* %143, null
br i1 %144, label %145, label %288
145: ; preds = %141
%146 = load i32, i32* %14
%147 = load i32, i32* @FTS_LOGICAL
%148 = and i32 %146, %147
%149 = icmp ne i32 %148, 0
br i1 %149, label %161, label %150
150: ; preds = %145
%151 = load i32, i32* %14
%152 = load i32, i32* @FTS_COMFOLLOW
%153 = and i32 %151, %152
%154 = icmp ne i32 %153, 0
br i1 %154, label %155, label %162
155: ; preds = %150
%156 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%157 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %156, i32 0, i32 0
%158 = load i64, i64* %157
%159 = load i64, i64* @FTS_ROOTLEVEL
%160 = icmp eq i64 %158, %159
br i1 %160, label %161, label %162
161: ; preds = %155, %145
store i32 0, i32* %20
br label %164
162: ; preds = %155, %150
%163 = load i32, i32* @AT_SYMLINK_NOFOLLOW
store i32 %163, i32* %20
br label %164
164: ; preds = %162, %161
%165 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%166 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %165, i32 0, i32 1
%167 = load i32, i32* %166
switch i32 %167, label %195 [
i32 131, label %168
i32 130, label %177
i32 129, label %186
i32 128, label %186
]
168: ; preds = %164
%169 = load i32, i32* %11
%170 = icmp ne i32 %169, 0
br i1 %170, label %176, label %171
171: ; preds = %168
%172 = load i32*, i32** %6
%173 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%174 = load i32, i32* @FTS_SKIP
%175 = call i32 @fts_set(i32* %172, %struct.TYPE_7__* %173, i32 %174)
br label %176
176: ; preds = %171, %168
br label %141
177: ; preds = %164
%178 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%179 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %178, i32 0, i32 2
%180 = load i8*, i8** %179
%181 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%182 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %181, i32 0, i32 5
%183 = load i32, i32* %182
%184 = call i32 @strerror(i32 %183)
%185 = call i32 @warnx(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %180, i32 %184)
store i32 1, i32* %16
br label %196
186: ; preds = %164, %164
%187 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%188 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %187, i32 0, i32 2
%189 = load i8*, i8** %188
%190 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%191 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %190, i32 0, i32 5
%192 = load i32, i32* %191
%193 = call i32 @strerror(i32 %192)
%194 = call i32 @warnx(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %189, i32 %193)
store i32 1, i32* %16
br label %141
195: ; preds = %164
br label %196
196: ; preds = %195, %177
%197 = load i32*, i32** %8
%198 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%199 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %198, i32 0, i32 3
%200 = load %struct.TYPE_6__*, %struct.TYPE_6__** %199
%201 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %200, i32 0, i32 0
%202 = load i32, i32* %201
%203 = call i32 @getmode(i32* %197, i32 %202)
store i32 %203, i32* %19
%204 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%205 = load i32, i32* %15
%206 = call i64 @may_have_nfs4acl(%struct.TYPE_7__* %204, i32 %205)
%207 = icmp eq i64 %206, 0
br i1 %207, label %208, label %221
208: ; preds = %196
%209 = load i32, i32* %19
%210 = load i32, i32* @ALLPERMS
%211 = and i32 %209, %210
%212 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%213 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %212, i32 0, i32 3
%214 = load %struct.TYPE_6__*, %struct.TYPE_6__** %213
%215 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %214, i32 0, i32 0
%216 = load i32, i32* %215
%217 = load i32, i32* @ALLPERMS
%218 = and i32 %216, %217
%219 = icmp eq i32 %211, %218
br i1 %219, label %220, label %221
220: ; preds = %208
br label %141
221: ; preds = %208, %196
%222 = load i32, i32* @AT_FDCWD
%223 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%224 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %223, i32 0, i32 4
%225 = load i32, i32* %224
%226 = load i32, i32* %19
%227 = load i32, i32* %20
%228 = call i32 @fchmodat(i32 %222, i32 %225, i32 %226, i32 %227)
%229 = icmp eq i32 %228, -1
br i1 %229, label %230, label %238
230: ; preds = %221
%231 = load i32, i32* %13
%232 = icmp ne i32 %231, 0
br i1 %232, label %238, label %233
233: ; preds = %230
%234 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%235 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %234, i32 0, i32 2
%236 = load i8*, i8** %235
%237 = call i32 @warn(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %236)
store i32 1, i32* %16
br label %287
238: ; preds = %230, %221
%239 = load i32, i32* %17
%240 = icmp ne i32 %239, 0
br i1 %240, label %241, label %286
241: ; preds = %238
%242 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%243 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %242, i32 0, i32 2
%244 = load i8*, i8** %243
%245 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %244)
%246 = load i32, i32* %17
%247 = icmp sgt i32 %246, 1
br i1 %247, label %248, label %284
248: ; preds = %241
%249 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%250 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %249, i32 0, i32 3
%251 = load %struct.TYPE_6__*, %struct.TYPE_6__** %250
%252 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %251, i32 0, i32 0
%253 = load i32, i32* %252
%254 = getelementptr inbounds [12 x i8], [12 x i8]* %21, i64 0, i64 0
%255 = call i32 @strmode(i32 %253, i8* %254)
%256 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%257 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %256, i32 0, i32 3
%258 = load %struct.TYPE_6__*, %struct.TYPE_6__** %257
%259 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %258, i32 0, i32 0
%260 = load i32, i32* %259
%261 = load i32, i32* @S_IFMT
%262 = and i32 %260, %261
%263 = load i32, i32* %19
%264 = or i32 %262, %263
%265 = getelementptr inbounds [12 x i8], [12 x i8]* %22, i64 0, i64 0
%266 = call i32 @strmode(i32 %264, i8* %265)
%267 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%268 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %267, i32 0, i32 3
%269 = load %struct.TYPE_6__*, %struct.TYPE_6__** %268
%270 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %269, i32 0, i32 0
%271 = load i32, i32* %270
%272 = getelementptr inbounds [12 x i8], [12 x i8]* %21, i64 0, i64 0
%273 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%274 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %273, i32 0, i32 3
%275 = load %struct.TYPE_6__*, %struct.TYPE_6__** %274
%276 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %275, i32 0, i32 0
%277 = load i32, i32* %276
%278 = load i32, i32* @S_IFMT
%279 = and i32 %277, %278
%280 = load i32, i32* %19
%281 = or i32 %279, %280
%282 = getelementptr inbounds [12 x i8], [12 x i8]* %22, i64 0, i64 0
%283 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %271, i8* %272, i32 %281, i8* %282)
br label %284
284: ; preds = %248, %241
%285 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %286
286: ; preds = %284, %238
br label %287
287: ; preds = %286, %233
br label %141
288: ; preds = %141
%289 = load i64, i64* @errno
%290 = icmp ne i64 %289, 0
br i1 %290, label %291, label %293
291: ; preds = %288
%292 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %293
293: ; preds = %291, %288
%294 = load i32, i32* %16
%295 = call i32 @exit(i32 %294)
unreachable
}

LLVM IR (-O2):
%struct.TYPE_7__ = type { i64, i32, i8*, %struct.TYPE_6__*, i32, i32 }
%struct.TYPE_6__ = type { i32 }
@.str = [17 x i8] c"HLPRXfghorstuvwx\00"
@optind = global i64 0
@.str.1 = [53 x i8] c"the -R and -h options may not be specified together.\00"
@FTS_LOGICAL = global i32 0
@FTS_PHYSICAL = global i32 0
@FTS_COMFOLLOW = global i32 0
@.str.2 = [22 x i8] c"invalid file mode: %s\00"
@.str.3 = [9 x i8] c"fts_open\00"
@FTS_ROOTLEVEL = global i64 0
@AT_SYMLINK_NOFOLLOW = global i32 0
@FTS_SKIP = global i32 0
@.str.4 = [7 x i8] c"%s: %s\00"
@ALLPERMS = global i32 0
@AT_FDCWD = global i32 0
@.str.5 = [3 x i8] c"%s\00"
@S_IFMT = global i32 0
@.str.6 = [23 x i8] c": 0%o [%s] -> 0%o [%s]\00"
@errno = global i64 0
@.str.8 = [9 x i8] c"fts_read\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
br label %5
5: ; preds = %13, %2
%6 = phi i32 [ 0, %2 ], [ %14, %13 ]
%7 = phi i32 [ 0, %2 ], [ %15, %13 ]
%8 = phi i32 [ 0, %2 ], [ %16, %13 ]
%9 = phi i32 [ 0, %2 ], [ %17, %13 ]
%10 = phi i32 [ 0, %2 ], [ %18, %13 ]
%11 = phi i32 [ 0, %2 ], [ %19, %13 ]
%12 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
switch i32 %12, label %44 [
i32 -1, label %46
i32 72, label %13
i32 76, label %20
i32 80, label %21
i32 82, label %22
i32 102, label %23
i32 104, label %24
i32 103, label %25
i32 111, label %25
i32 114, label %25
i32 115, label %25
i32 116, label %25
i32 117, label %25
i32 119, label %25
i32 88, label %25
i32 120, label %25
i32 118, label %42
]
13: ; preds = %5, %44, %42, %24, %23, %22, %21, %20
%14 = phi i32 [ %6, %44 ], [ %6, %42 ], [ %6, %24 ], [ %6, %23 ], [ %6, %22 ], [ 0, %21 ], [ 0, %20 ], [ 1, %5 ]
%15 = phi i32 [ %7, %44 ], [ %7, %42 ], [ %7, %24 ], [ %7, %23 ], [ %7, %22 ], [ 0, %21 ], [ 1, %20 ], [ 0, %5 ]
%16 = phi i32 [ %8, %44 ], [ %8, %42 ], [ %8, %24 ], [ %8, %23 ], [ 1, %22 ], [ %8, %21 ], [ %8, %20 ], [ %8, %5 ]
%17 = phi i32 [ %9, %44 ], [ %9, %42 ], [ %9, %24 ], [ 1, %23 ], [ %9, %22 ], [ %9, %21 ], [ %9, %20 ], [ %9, %5 ]
%18 = phi i32 [ %10, %44 ], [ %10, %42 ], [ 1, %24 ], [ %10, %23 ], [ %10, %22 ], [ %10, %21 ], [ %10, %20 ], [ %10, %5 ]
%19 = phi i32 [ %11, %44 ], [ %43, %42 ], [ %11, %24 ], [ %11, %23 ], [ %11, %22 ], [ %11, %21 ], [ %11, %20 ], [ %11, %5 ]
br label %5
20: ; preds = %5
br label %13
21: ; preds = %5
br label %13
22: ; preds = %5
br label %13
23: ; preds = %5
br label %13
24: ; preds = %5
br label %13
25: ; preds = %5, %5, %5, %5, %5, %5, %5, %5, %5
%26 = load i64, i64* @optind
%27 = add i64 %26, -1
%28 = getelementptr inbounds i8*, i8** %1, i64 %27
%29 = load i8*, i8** %28
%30 = load i8, i8* %29
%31 = icmp eq i8 %30, 45
br i1 %31, label %32, label %48
32: ; preds = %25
%33 = getelementptr inbounds i8, i8* %29, i64 1
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %12, %35
br i1 %36, label %37, label %48
37: ; preds = %32
%38 = getelementptr inbounds i8, i8* %29, i64 2
%39 = load i8, i8* %38
%40 = icmp eq i8 %39, 0
br i1 %40, label %41, label %48
41: ; preds = %37
store i64 %27, i64* @optind
br label %48
42: ; preds = %5
%43 = add nsw i32 %11, 1
br label %13
44: ; preds = %5
%45 = tail call i32 (...) @usage()
br label %13
46: ; preds = %5
%47 = load i64, i64* @optind
br label %48
48: ; preds = %46, %25, %32, %37, %41
%49 = phi i64 [ %47, %46 ], [ %26, %25 ], [ %26, %32 ], [ %26, %37 ], [ %27, %41 ]
%50 = getelementptr inbounds i8*, i8** %1, i64 %49
%51 = trunc i64 %49 to i32
%52 = sub i32 %0, %51
%53 = icmp slt i32 %52, 2
br i1 %53, label %54, label %56
54: ; preds = %48
%55 = tail call i32 (...) @usage()
br label %56
56: ; preds = %54, %48
%57 = icmp eq i32 %8, 0
%58 = icmp eq i32 %10, 0
br i1 %57, label %72, label %59
59: ; preds = %56
br i1 %58, label %62, label %60
60: ; preds = %59
%61 = tail call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
br label %62
62: ; preds = %60, %59
%63 = icmp eq i32 %7, 0
br i1 %63, label %66, label %64
64: ; preds = %62
%65 = load i32, i32* @FTS_LOGICAL
br label %77
66: ; preds = %62
%67 = load i32, i32* @FTS_PHYSICAL
%68 = icmp eq i32 %6, 0
br i1 %68, label %77, label %69
69: ; preds = %66
%70 = load i32, i32* @FTS_COMFOLLOW
%71 = or i32 %70, %67
br label %77
72: ; preds = %56
br i1 %58, label %75, label %73
73: ; preds = %72
%74 = load i32, i32* @FTS_PHYSICAL
br label %77
75: ; preds = %72
%76 = load i32, i32* @FTS_LOGICAL
br label %77
77: ; preds = %73, %75, %64, %69, %66
%78 = phi i32 [ %65, %64 ], [ %71, %69 ], [ %67, %66 ], [ %74, %73 ], [ %76, %75 ]
%79 = load i8*, i8** %50
%80 = tail call i32* @setmode(i8* %79)
%81 = icmp eq i32* %80, null
br i1 %81, label %82, label %84
82: ; preds = %77
%83 = tail call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %79)
br label %84
84: ; preds = %82, %77
%85 = getelementptr inbounds i8*, i8** %50, i64 1
%86 = tail call i32* @fts_open(i8** %85, i32 %78, i32 0)
%87 = icmp eq i32* %86, null
br i1 %87, label %88, label %90
88: ; preds = %84
%89 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %90
90: ; preds = %88, %84
%91 = call %struct.TYPE_7__* @fts_read(i32* %86)
%92 = icmp eq %struct.TYPE_7__* %91, null
br i1 %92, label %196, label %93
93: ; preds = %90
%94 = icmp ne i32 %9, 0
%95 = icmp eq i32 %11, 0
%96 = icmp sgt i32 %11, 1
%97 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%98 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
br label %99
99: ; preds = %93, %192
%100 = phi %struct.TYPE_7__* [ %91, %93 ], [ %194, %192 ]
%101 = phi i32 [ 0, %93 ], [ %193, %192 ]
%102 = load i32, i32* @FTS_LOGICAL
%103 = and i32 %102, %78
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %116
105: ; preds = %99
%106 = load i32, i32* @FTS_COMFOLLOW
%107 = and i32 %106, %78
%108 = icmp eq i32 %107, 0
br i1 %108, label %114, label %109
109: ; preds = %105
%110 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 0
%111 = load i64, i64* %110
%112 = load i64, i64* @FTS_ROOTLEVEL
%113 = icmp eq i64 %111, %112
br i1 %113, label %116, label %114
114: ; preds = %109, %105
%115 = load i32, i32* @AT_SYMLINK_NOFOLLOW
br label %116
116: ; preds = %99, %109, %114
%117 = phi i32 [ %115, %114 ], [ 0, %109 ], [ 0, %99 ]
%118 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 1
%119 = load i32, i32* %118
switch i32 %119, label %138 [
i32 131, label %120
i32 130, label %124
i32 129, label %131
i32 128, label %131
]
120: ; preds = %116
br i1 %57, label %121, label %192
121: ; preds = %120
%122 = load i32, i32* @FTS_SKIP
%123 = call i32 @fts_set(i32* %86, %struct.TYPE_7__* %100, i32 %122)
br label %192
124: ; preds = %116
%125 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 2
%126 = load i8*, i8** %125
%127 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 5
%128 = load i32, i32* %127
%129 = call i32 @strerror(i32 %128)
%130 = call i32 @warnx(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %126, i32 %129)
br label %138
131: ; preds = %116, %116
%132 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 2
%133 = load i8*, i8** %132
%134 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 5
%135 = load i32, i32* %134
%136 = call i32 @strerror(i32 %135)
%137 = call i32 @warnx(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %133, i32 %136)
br label %192
138: ; preds = %116, %124
%139 = phi i32 [ %101, %116 ], [ 1, %124 ]
%140 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 3
%141 = load %struct.TYPE_6__*, %struct.TYPE_6__** %140
%142 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %141, i64 0, i32 0
%143 = load i32, i32* %142
%144 = call i32 @getmode(i32* %80, i32 %143)
%145 = call i64 @may_have_nfs4acl(%struct.TYPE_7__* %100, i32 %10)
%146 = icmp eq i64 %145, 0
br i1 %146, label %147, label %155
147: ; preds = %138
%148 = load i32, i32* @ALLPERMS
%149 = load %struct.TYPE_6__*, %struct.TYPE_6__** %140
%150 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %149, i64 0, i32 0
%151 = load i32, i32* %150
%152 = xor i32 %151, %144
%153 = and i32 %152, %148
%154 = icmp eq i32 %153, 0
br i1 %154, label %192, label %155
155: ; preds = %147, %138
%156 = load i32, i32* @AT_FDCWD
%157 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 4
%158 = load i32, i32* %157
%159 = call i32 @fchmodat(i32 %156, i32 %158, i32 %144, i32 %117)
%160 = icmp ne i32 %159, -1
%161 = select i1 %160, i1 true, i1 %94
br i1 %161, label %166, label %162
162: ; preds = %155
%163 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 2
%164 = load i8*, i8** %163
%165 = call i32 @warn(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %164)
br label %192
166: ; preds = %155
br i1 %95, label %192, label %167
167: ; preds = %166
%168 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %100, i64 0, i32 2
%169 = load i8*, i8** %168
%170 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %169)
br i1 %96, label %171, label %190
171: ; preds = %167
%172 = load %struct.TYPE_6__*, %struct.TYPE_6__** %140
%173 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %172, i64 0, i32 0
%174 = load i32, i32* %173
%175 = call i32 @strmode(i32 %174, i8* %97)
%176 = load %struct.TYPE_6__*, %struct.TYPE_6__** %140
%177 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %176, i64 0, i32 0
%178 = load i32, i32* %177
%179 = load i32, i32* @S_IFMT
%180 = and i32 %179, %178
%181 = or i32 %180, %144
%182 = call i32 @strmode(i32 %181, i8* %98)
%183 = load %struct.TYPE_6__*, %struct.TYPE_6__** %140
%184 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %183, i64 0, i32 0
%185 = load i32, i32* %184
%186 = load i32, i32* @S_IFMT
%187 = and i32 %186, %185
%188 = or i32 %187, %144
%189 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %185, i8* %97, i32 %188, i8* %98)
br label %190
190: ; preds = %171, %167
%191 = call i32 @putchar(i32 10)
br label %192
192: ; preds = %162, %190, %166, %147, %120, %121, %131
%193 = phi i32 [ 1, %131 ], [ %101, %121 ], [ %101, %120 ], [ %139, %147 ], [ %139, %190 ], [ %139, %166 ], [ 1, %162 ]
%194 = call %struct.TYPE_7__* @fts_read(i32* %86)
%195 = icmp eq %struct.TYPE_7__* %194, null
br i1 %195, label %196, label %99
196: ; preds = %192, %90
%197 = phi i32 [ 0, %90 ], [ %193, %192 ]
%198 = load i64, i64* @errno
%199 = icmp eq i64 %198, 0
br i1 %199, label %202, label %200
200: ; preds = %196
%201 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %202
202: ; preds = %200, %196
%203 = call i32 @exit(i32 %197)
unreachable
}