#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 132
#define FTS_DNR 131
#define FTS_DP 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);
      break;
    case FTS_DNR:
      warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
      rval = 1;
      break;
    case FTS_DP:
      continue;
    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    0xe93(%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    0xd09(%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    0xc8f(%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    0xc6e(%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     1790 <main+0x580>
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
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x88(%rbp)
sub    $0x4,%eax
ja     163b <main+0x42b>
mov    -0x88(%rbp),%rax
lea    0xb58(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x0,-0x34(%rbp)
jne    15b9 <main+0x3a9>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x2a1e(%rip),%rax
mov    (%rax),%edx
call   1040 <fts_set@plt>
jmp    1640 <main+0x430>
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    0xb78(%rip),%rdi
call   1070 <warnx@plt>
movl   $0x1,-0x48(%rbp)
jmp    1640 <main+0x430>
jmp    14f6 <main+0x2e6>
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    0xb37(%rip),%rdi
call   1070 <warnx@plt>
movl   $0x1,-0x48(%rbp)
jmp    14f6 <main+0x2e6>
jmp    1640 <main+0x430>
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    1698 <main+0x488>
mov    -0x5c(%rbp),%eax
mov    0x2932(%rip),%rcx
and    (%rcx),%eax
mov    -0x20(%rbp),%rcx
mov    0x18(%rcx),%rcx
mov    (%rcx),%ecx
mov    0x291f(%rip),%rdx
and    (%rdx),%ecx
cmp    %ecx,%eax
jne    1698 <main+0x488>
jmp    14f6 <main+0x2e6>
mov    0x28e9(%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    16e6 <main+0x4d6>
cmpl   $0x0,-0x3c(%rbp)
jne    16e6 <main+0x4d6>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xa80(%rip),%rdi
call   1030 <warn@plt>
movl   $0x1,-0x48(%rbp)
jmp    178b <main+0x57b>
cmpl   $0x0,-0x4c(%rbp)
je     1786 <main+0x576>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xa56(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x1,-0x4c(%rbp)
jle    1778 <main+0x568>
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    0x287c(%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    0x284f(%rip),%rax
and    (%rax),%ecx
or     -0x5c(%rbp),%ecx
lea    -0x78(%rbp),%r8
lea    0x9f7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xa00(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    178b <main+0x57b>
jmp    14f6 <main+0x2e6>
mov    0x2809(%rip),%rax
cmpq   $0x0,(%rax)
je     17b2 <main+0x5a2>
mov    $0x1,%edi
lea    0x9d4(%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,%r14
mov    %edi,%r12d
lea    0xfc1(%rip),%r15
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    %r14,%rsi
mov    %r15,%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),%r15
mov    -0x8(%r14,%r15,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,%r15
mov    %r15,(%rcx)
jmp    1306 <main+0xe6>
mov    0x2cbd(%rip),%rax
mov    (%rax),%r15
sub    %r15d,%r12d
cmp    $0x1,%r12d
jg     1316 <main+0xf6>
xor    %eax,%eax
call   10f0 <usage@plt>
lea    (%r14,%r15,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    0xed0(%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    0xeb5(%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    0xe9a(%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    0xe96(%rip),%rsi
mov    $0x1,%edi
call   10d0 <err@plt>
mov    %ebx,%edi
call   1130 <exit@plt>
mov    %rax,%r12
mov    0x2bec(%rip),%rbp
xor    %ebx,%ebx
mov    %r15,0x10(%rsp)
jmp    1445 <main+0x225>
nopl   (%rax)
mov    0x10(%r12),%rbx
mov    0x24(%r12),%edi
call   1140 <strerror@plt>
lea    0xe3b(%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,%r12
test   %rax,%rax
je     13d5 <main+0x1b5>
mov    $0x0,%r14d
test   %r13d,0x0(%rbp)
jne    147d <main+0x25d>
mov    0x2b70(%rip),%rax
test   %r13d,(%rax)
je     1473 <main+0x253>
mov    (%r12),%rax
mov    $0x0,%r14d
mov    0x2b6a(%rip),%rcx
cmp    (%rcx),%rax
je     147d <main+0x25d>
mov    0x2b1e(%rip),%rax
mov    (%rax),%r14d
mov    0x8(%r12),%eax
add    $0xffffff80,%eax
cmp    $0x4,%eax
ja     14e0 <main+0x2c0>
lea    0xd57(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x10(%r12),%rbx
mov    0x24(%r12),%edi
call   1140 <strerror@plt>
lea    0xdb1(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1080 <warnx@plt>
mov    $0x1,%ebx
jmp    14e0 <main+0x2c0>
cmpl   $0x0,0x4(%rsp)
jne    14e0 <main+0x2c0>
mov    0x2b01(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <fts_set@plt>
nopl   0x0(%rax)
mov    0x18(%r12),%rax
mov    (%rax),%esi
mov    0x18(%rsp),%rdi
call   1110 <getmode@plt>
mov    %eax,%r15d
mov    %r12,%rdi
mov    (%rsp),%esi
call   10b0 <may_have_nfs4acl@plt>
test   %rax,%rax
jne    1519 <main+0x2f9>
mov    0x18(%r12),%rax
mov    (%rax),%eax
xor    %r15d,%eax
mov    0x2a93(%rip),%rcx
test   %eax,(%rcx)
je     1554 <main+0x334>
mov    0x2a68(%rip),%rax
mov    (%rax),%edi
mov    0x20(%r12),%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   10e0 <fchmodat@plt>
cmp    $0xffffffff,%eax
jne    1570 <main+0x350>
cmpl   $0x0,0xc(%rsp)
jne    1570 <main+0x350>
mov    0x10(%r12),%rsi
lea    0xd0b(%rip),%rdi
call   1040 <warn@plt>
mov    $0x1,%ebx
mov    0x2a95(%rip),%rbp
mov    0x10(%rsp),%r15
jmp    1435 <main+0x215>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%r14d
mov    0x8(%rsp),%ebx
test   %ebx,%ebx
je     15f4 <main+0x3d4>
mov    0x10(%r12),%rsi
lea    0xcce(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
cmp    $0x2,%ebx
jl     15ea <main+0x3ca>
mov    0x18(%r12),%rax
mov    (%rax),%edi
lea    0x20(%rsp),%rsi
call   1100 <strmode@plt>
mov    0x18(%r12),%rax
mov    0x2a00(%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(%r12),%rax
mov    (%rax),%esi
mov    0x0(%rbp),%ecx
and    %esi,%ecx
or     %r15d,%ecx
lea    0xc8d(%rip),%rdi
lea    0x20(%rsp),%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x29f5(%rip),%rbp
mov    0x10(%rsp),%r15
mov    %r14d,%ebx
jmp    1435 <main+0x215>

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 = %288, %221, %187, %186, %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 %289
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 %196 [
i32 132, label %168
i32 131, label %177
i32 130, label %186
i32 129, label %187
i32 128, label %187
]
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 %197
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 %197
186: ; preds = %164
br label %141
187: ; preds = %164, %164
%188 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%189 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %188, i32 0, i32 2
%190 = load i8*, i8** %189
%191 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%192 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %191, i32 0, i32 5
%193 = load i32, i32* %192
%194 = call i32 @strerror(i32 %193)
%195 = call i32 @warnx(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %190, i32 %194)
store i32 1, i32* %16
br label %141
196: ; preds = %164
br label %197
197: ; preds = %196, %177, %176
%198 = load i32*, i32** %8
%199 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%200 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %199, i32 0, i32 3
%201 = load %struct.TYPE_6__*, %struct.TYPE_6__** %200
%202 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %201, i32 0, i32 0
%203 = load i32, i32* %202
%204 = call i32 @getmode(i32* %198, i32 %203)
store i32 %204, i32* %19
%205 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%206 = load i32, i32* %15
%207 = call i64 @may_have_nfs4acl(%struct.TYPE_7__* %205, i32 %206)
%208 = icmp eq i64 %207, 0
br i1 %208, label %209, label %222
209: ; preds = %197
%210 = load i32, i32* %19
%211 = load i32, i32* @ALLPERMS
%212 = and i32 %210, %211
%213 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%214 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %213, i32 0, i32 3
%215 = load %struct.TYPE_6__*, %struct.TYPE_6__** %214
%216 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %215, i32 0, i32 0
%217 = load i32, i32* %216
%218 = load i32, i32* @ALLPERMS
%219 = and i32 %217, %218
%220 = icmp eq i32 %212, %219
br i1 %220, label %221, label %222
221: ; preds = %209
br label %141
222: ; preds = %209, %197
%223 = load i32, i32* @AT_FDCWD
%224 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%225 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %224, i32 0, i32 4
%226 = load i32, i32* %225
%227 = load i32, i32* %19
%228 = load i32, i32* %20
%229 = call i32 @fchmodat(i32 %223, i32 %226, i32 %227, i32 %228)
%230 = icmp eq i32 %229, -1
br i1 %230, label %231, label %239
231: ; preds = %222
%232 = load i32, i32* %13
%233 = icmp ne i32 %232, 0
br i1 %233, label %239, label %234
234: ; preds = %231
%235 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%236 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %235, i32 0, i32 2
%237 = load i8*, i8** %236
%238 = call i32 @warn(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %237)
store i32 1, i32* %16
br label %288
239: ; preds = %231, %222
%240 = load i32, i32* %17
%241 = icmp ne i32 %240, 0
br i1 %241, label %242, label %287
242: ; preds = %239
%243 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%244 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %243, i32 0, i32 2
%245 = load i8*, i8** %244
%246 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %245)
%247 = load i32, i32* %17
%248 = icmp sgt i32 %247, 1
br i1 %248, label %249, label %285
249: ; preds = %242
%250 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%251 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %250, i32 0, i32 3
%252 = load %struct.TYPE_6__*, %struct.TYPE_6__** %251
%253 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %252, i32 0, i32 0
%254 = load i32, i32* %253
%255 = getelementptr inbounds [12 x i8], [12 x i8]* %21, i64 0, i64 0
%256 = call i32 @strmode(i32 %254, i8* %255)
%257 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%258 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %257, i32 0, i32 3
%259 = load %struct.TYPE_6__*, %struct.TYPE_6__** %258
%260 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %259, i32 0, i32 0
%261 = load i32, i32* %260
%262 = load i32, i32* @S_IFMT
%263 = and i32 %261, %262
%264 = load i32, i32* %19
%265 = or i32 %263, %264
%266 = getelementptr inbounds [12 x i8], [12 x i8]* %22, i64 0, i64 0
%267 = call i32 @strmode(i32 %265, i8* %266)
%268 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%269 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %268, i32 0, i32 3
%270 = load %struct.TYPE_6__*, %struct.TYPE_6__** %269
%271 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %270, i32 0, i32 0
%272 = load i32, i32* %271
%273 = getelementptr inbounds [12 x i8], [12 x i8]* %21, i64 0, i64 0
%274 = load %struct.TYPE_7__*, %struct.TYPE_7__** %7
%275 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %274, i32 0, i32 3
%276 = load %struct.TYPE_6__*, %struct.TYPE_6__** %275
%277 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %276, i32 0, i32 0
%278 = load i32, i32* %277
%279 = load i32, i32* @S_IFMT
%280 = and i32 %278, %279
%281 = load i32, i32* %19
%282 = or i32 %280, %281
%283 = getelementptr inbounds [12 x i8], [12 x i8]* %22, i64 0, i64 0
%284 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %272, i8* %273, i32 %282, i8* %283)
br label %285
285: ; preds = %249, %242
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %287
287: ; preds = %285, %239
br label %288
288: ; preds = %287, %234
br label %141
289: ; preds = %141
%290 = load i64, i64* @errno
%291 = icmp ne i64 %290, 0
br i1 %291, label %292, label %294
292: ; preds = %289
%293 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %294
294: ; preds = %292, %289
%295 = load i32, i32* %16
%296 = call i32 @exit(i32 %295)
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 132, label %120
i32 131, label %124
i32 130, label %192
i32 129, label %131
i32 128, label %131
]
120: ; preds = %116
br i1 %57, label %121, label %138
121: ; preds = %120
%122 = load i32, i32* @FTS_SKIP
%123 = call i32 @fts_set(i32* %86, %struct.TYPE_7__* %100, i32 %122)
br label %138
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, %120, %121, %124
%139 = phi i32 [ %101, %116 ], [ 1, %124 ], [ %101, %120 ], [ %101, %121 ]
%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, %116, %131
%193 = phi i32 [ 1, %131 ], [ %101, %116 ], [ %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
}