#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 */
typedef int mode_t;

/* Variables and functions */
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
int /*<<< orphan*/ fixperms(char *, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ help();
char *malloc(scalar_t__);
scalar_t__ octalMode(char *, int *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  mode_t filemode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
  mode_t dirmode =
      S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
  char *directory = 0;
  if (argc < 2)
    usage();
  argc--;
  while (argc) {
    argv++;
    argc--;
    if (!strcmp(*argv, "-h"))
      help();
    if (!strcmp(*argv, "-f")) {
      if (!argc)
        usage();
      argv++;
      argc--;
      if (octalMode(*argv, &filemode)) {
        fprintf(stderr, "Invalid mode: %s\n", *argv);
        usage();
      }
      continue;
    }
    if (!strcmp(*argv, "-d")) {
      if (!argc)
        usage();
      argv++;
      argc--;
      if (octalMode(*argv, &dirmode)) {
        fprintf(stderr, "Invalid mode: %s\n", *argv);
        usage();
      }
      continue;
    }
    if (directory != 0) {
      fprintf(stderr, "Unknown parameter: %s\n", *argv);
      usage();
    }
    directory = malloc(strlen(*argv) + 1);
    strcpy(directory, *argv);
  }
  fixperms(directory, filemode, dirmode);
  free(directory);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2deb(%rip),%rax
mov    (%rax),%eax
mov    0x2e12(%rip),%rcx
or     (%rcx),%eax
mov    0x2de9(%rip),%rcx
or     (%rcx),%eax
mov    0x2dd8(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    0x2dc4(%rip),%rax
mov    (%rax),%eax
mov    0x2deb(%rip),%rcx
or     (%rcx),%eax
mov    0x2dea(%rip),%rcx
or     (%rcx),%eax
mov    0x2db9(%rip),%rcx
or     (%rcx),%eax
mov    0x2dc8(%rip),%rcx
or     (%rcx),%eax
mov    0x2d9f(%rip),%rcx
or     (%rcx),%eax
mov    0x2dce(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1238 <main+0x98>
mov    $0x0,%al
call   1090 <usage@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     13ea <main+0x24a>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd92(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1283 <main+0xe3>
mov    $0x0,%al
call   10b0 <help@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd72(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1307 <main+0x167>
cmpl   $0x0,-0x8(%rbp)
jne    12b0 <main+0x110>
mov    $0x0,%al
call   1090 <usage@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0x14(%rbp),%rsi
call   10c0 <octalMode@plt>
cmp    $0x0,%rax
je     1302 <main+0x162>
mov    0x2cda(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd10(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
jmp    1241 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd03(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    138b <main+0x1eb>
cmpl   $0x0,-0x8(%rbp)
jne    1334 <main+0x194>
mov    $0x0,%al
call   1090 <usage@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rsi
call   10c0 <octalMode@plt>
cmp    $0x0,%rax
je     1386 <main+0x1e6>
mov    0x2c56(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xc8c(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
jmp    1241 <main+0xa1>
cmpq   $0x0,-0x20(%rbp)
je     13b9 <main+0x219>
mov    0x2c23(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xc6e(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
jmp    1241 <main+0xa1>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   10a0 <fixperms@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2df3(%rip),%rax
mov    0x2e1c(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x2df1(%rip),%rax
or     (%rax),%ecx
mov    %rsi,%r15
mov    %edi,%r13d
mov    0x2dda(%rip),%rax
or     (%rax),%ecx
mov    %ecx,0xc(%rsp)
mov    0x2dfd(%rip),%rax
mov    0x2de6(%rip),%rdx
mov    0x2df7(%rip),%rsi
or     (%rax),%ecx
or     (%rdx),%ecx
or     (%rsi),%ecx
mov    %ecx,0x8(%rsp)
cmp    $0x2,%edi
jge    1214 <main+0x74>
xor    %ebx,%ebx
xor    %eax,%eax
call   1090 <usage@plt>
add    $0xffffffff,%r13d
jne    1218 <main+0x78>
jmp    135e <main+0x1be>
add    $0xffffffff,%r13d
lea    0xde4(%rip),%r14
xor    %ebx,%ebx
mov    %rbx,0x10(%rsp)
mov    $0x1,%ebp
sub    %r13d,%ebp
mov    %r15,%rbx
lea    0xdc8(%rip),%r13
jmp    124c <main+0xac>
nopw   0x0(%rax,%rax,1)
add    $0x2,%ebp
cmp    $0x1,%ebp
je     1359 <main+0x1b9>
lea    0x8(%rbx),%r15
mov    0x8(%rbx),%r12
mov    %r12,%rdi
mov    %r13,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
jne    126d <main+0xcd>
xor    %eax,%eax
call   10b0 <help@plt>
mov    (%r15),%r12
mov    %r12,%rdi
mov    %r14,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     12b0 <main+0x110>
mov    %r12,%rdi
lea    0xd92(%rip),%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
jne    1300 <main+0x160>
test   %ebp,%ebp
jne    129a <main+0xfa>
xor    %eax,%eax
call   1090 <usage@plt>
mov    0x10(%rbx),%rdi
add    $0x10,%rbx
lea    0x8(%rsp),%rsi
jmp    12c8 <main+0x128>
nopl   0x0(%rax)
test   %ebp,%ebp
jne    12bb <main+0x11b>
xor    %eax,%eax
call   1090 <usage@plt>
mov    0x10(%rbx),%rdi
add    $0x10,%rbx
lea    0xc(%rsp),%rsi
call   10c0 <octalMode@plt>
test   %rax,%rax
je     1240 <main+0xa0>
mov    0x2ce3(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xd1d(%rip),%rsi
call   1070 <fprintf@plt>
xor    %eax,%eax
call   1090 <usage@plt>
jmp    1240 <main+0xa0>
nopw   0x0(%rax,%rax,1)
cmpq   $0x0,0x10(%rsp)
je     132a <main+0x18a>
mov    0x2cb1(%rip),%rax
mov    (%rax),%edi
lea    0xd03(%rip),%rsi
mov    %r12,%rdx
call   1070 <fprintf@plt>
xor    %eax,%eax
call   1090 <usage@plt>
mov    (%r15),%r12
mov    %ebp,%r13d
neg    %r13d
mov    %r12,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
test   %ebp,%ebp
jne    1221 <main+0x81>
jmp    135e <main+0x1be>
mov    0x10(%rsp),%rbx
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   10a0 <fixperms@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
@S_IXUSR = global i32 0
@S_IXGRP = global i32 0
@S_IXOTH = global i32 0
@.str = [3 x i8] c"-h\00"
@.str.1 = [3 x i8] c"-f\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"Invalid mode: %s\0A\00"
@.str.3 = [3 x i8] c"-d\00"
@.str.4 = [23 x i8] c"Unknown parameter: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* @S_IRUSR
%10 = load i32, i32* @S_IWUSR
%11 = or i32 %9, %10
%12 = load i32, i32* @S_IRGRP
%13 = or i32 %11, %12
%14 = load i32, i32* @S_IROTH
%15 = or i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* @S_IRUSR
%17 = load i32, i32* @S_IWUSR
%18 = or i32 %16, %17
%19 = load i32, i32* @S_IXUSR
%20 = or i32 %18, %19
%21 = load i32, i32* @S_IRGRP
%22 = or i32 %20, %21
%23 = load i32, i32* @S_IXGRP
%24 = or i32 %22, %23
%25 = load i32, i32* @S_IROTH
%26 = or i32 %24, %25
%27 = load i32, i32* @S_IXOTH
%28 = or i32 %26, %27
store i32 %28, i32* %7
store i8* null, i8** %8
%29 = load i32, i32* %4
%30 = icmp slt i32 %29, 2
br i1 %30, label %31, label %33
31: ; preds = %2
%32 = call i32 (...) @usage()
br label %33
33: ; preds = %31, %2
%34 = load i32, i32* %4
%35 = add nsw i32 %34, -1
store i32 %35, i32* %4
br label %36
36: ; preds = %111, %101, %75, %33
%37 = load i32, i32* %4
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %121
39: ; preds = %36
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i32 1
store i8** %41, i8*** %5
%42 = load i32, i32* %4
%43 = add nsw i32 %42, -1
store i32 %43, i32* %4
%44 = load i8**, i8*** %5
%45 = load i8*, i8** %44
%46 = call i32 @strcmp(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%47 = icmp ne i32 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %39
%49 = call i32 (...) @help()
br label %50
50: ; preds = %48, %39
%51 = load i8**, i8*** %5
%52 = load i8*, i8** %51
%53 = call i32 @strcmp(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
br i1 %54, label %76, label %55
55: ; preds = %50
%56 = load i32, i32* %4
%57 = icmp ne i32 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = call i32 (...) @usage()
br label %60
60: ; preds = %58, %55
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i32 1
store i8** %62, i8*** %5
%63 = load i32, i32* %4
%64 = add nsw i32 %63, -1
store i32 %64, i32* %4
%65 = load i8**, i8*** %5
%66 = load i8*, i8** %65
%67 = call i64 @octalMode(i8* %66, i32* %6)
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %75
69: ; preds = %60
%70 = load i32, i32* @stderr
%71 = load i8**, i8*** %5
%72 = load i8*, i8** %71
%73 = call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %72)
%74 = call i32 (...) @usage()
br label %75
75: ; preds = %69, %60
br label %36
76: ; preds = %50
%77 = load i8**, i8*** %5
%78 = load i8*, i8** %77
%79 = call i32 @strcmp(i8* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%80 = icmp ne i32 %79, 0
br i1 %80, label %102, label %81
81: ; preds = %76
%82 = load i32, i32* %4
%83 = icmp ne i32 %82, 0
br i1 %83, label %86, label %84
84: ; preds = %81
%85 = call i32 (...) @usage()
br label %86
86: ; preds = %84, %81
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i32 1
store i8** %88, i8*** %5
%89 = load i32, i32* %4
%90 = add nsw i32 %89, -1
store i32 %90, i32* %4
%91 = load i8**, i8*** %5
%92 = load i8*, i8** %91
%93 = call i64 @octalMode(i8* %92, i32* %7)
%94 = icmp ne i64 %93, 0
br i1 %94, label %95, label %101
95: ; preds = %86
%96 = load i32, i32* @stderr
%97 = load i8**, i8*** %5
%98 = load i8*, i8** %97
%99 = call i32 @fprintf(i32 %96, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %98)
%100 = call i32 (...) @usage()
br label %101
101: ; preds = %95, %86
br label %36
102: ; preds = %76
%103 = load i8*, i8** %8
%104 = icmp ne i8* %103, null
br i1 %104, label %105, label %111
105: ; preds = %102
%106 = load i32, i32* @stderr
%107 = load i8**, i8*** %5
%108 = load i8*, i8** %107
%109 = call i32 @fprintf(i32 %106, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %108)
%110 = call i32 (...) @usage()
br label %111
111: ; preds = %105, %102
%112 = load i8**, i8*** %5
%113 = load i8*, i8** %112
%114 = call i64 @strlen(i8* %113)
%115 = add nsw i64 %114, 1
%116 = call i8* @malloc(i64 %115)
store i8* %116, i8** %8
%117 = load i8*, i8** %8
%118 = load i8**, i8*** %5
%119 = load i8*, i8** %118
%120 = call i32 @strcpy(i8* %117, i8* %119)
br label %36
121: ; preds = %36
%122 = load i8*, i8** %8
%123 = load i32, i32* %6
%124 = load i32, i32* %7
%125 = call i32 @fixperms(i8* %122, i32 %123, i32 %124)
%126 = load i8*, i8** %8
%127 = call i32 @free(i8* %126)
ret i32 0
}

LLVM IR (-O2):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
@S_IXUSR = global i32 0
@S_IXGRP = global i32 0
@S_IXOTH = global i32 0
@.str = [3 x i8] c"-h\00"
@.str.1 = [3 x i8] c"-f\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"Invalid mode: %s\0A\00"
@.str.3 = [3 x i8] c"-d\00"
@.str.4 = [23 x i8] c"Unknown parameter: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = load i32, i32* @S_IRUSR
%7 = load i32, i32* @S_IWUSR
%8 = or i32 %7, %6
%9 = load i32, i32* @S_IRGRP
%10 = or i32 %8, %9
%11 = load i32, i32* @S_IROTH
%12 = or i32 %10, %11
store i32 %12, i32* %3
%13 = bitcast i32* %4 to i8*
%14 = load i32, i32* @S_IXUSR
%15 = load i32, i32* @S_IXGRP
%16 = load i32, i32* @S_IXOTH
%17 = or i32 %12, %14
%18 = or i32 %17, %15
%19 = or i32 %18, %16
store i32 %19, i32* %4
%20 = icmp slt i32 %0, 2
br i1 %20, label %23, label %21
21: ; preds = %2
%22 = add nsw i32 %0, -1
br label %27
23: ; preds = %2
%24 = tail call i32 (...) @usage()
%25 = add nsw i32 %0, -1
%26 = icmp eq i32 %25, 0
br i1 %26, label %93, label %27
27: ; preds = %21, %23
%28 = phi i32 [ %25, %23 ], [ %22, %21 ]
br label %29
29: ; preds = %27, %86
%30 = phi i8* [ %90, %86 ], [ null, %27 ]
%31 = phi i8** [ %36, %86 ], [ %1, %27 ]
%32 = phi i32 [ %37, %86 ], [ %28, %27 ]
br label %33
33: ; preds = %29, %63
%34 = phi i8** [ %31, %29 ], [ %64, %63 ]
%35 = phi i32 [ %32, %29 ], [ %65, %63 ]
%36 = getelementptr inbounds i8*, i8** %34, i64 1
%37 = add nsw i32 %35, -1
%38 = load i8*, i8** %36
%39 = call i32 @strcmp(i8* dereferenceable(1) %38, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %33
%42 = call i32 (...) @help()
%43 = load i8*, i8** %36
br label %44
44: ; preds = %41, %33
%45 = phi i8* [ %43, %41 ], [ %38, %33 ]
%46 = call i32 @strcmp(i8* dereferenceable(1) %45, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %67
48: ; preds = %44
%49 = icmp eq i32 %37, 0
br i1 %49, label %50, label %52
50: ; preds = %48
%51 = call i32 (...) @usage()
br label %52
52: ; preds = %50, %48
%53 = getelementptr inbounds i8*, i8** %34, i64 2
%54 = load i8*, i8** %53
%55 = call i64 @octalMode(i8* %54, i32* %3)
%56 = icmp eq i64 %55, 0
br i1 %56, label %63, label %57
57: ; preds = %52, %74
%58 = phi i8** [ %75, %74 ], [ %53, %52 ]
%59 = load i32, i32* @stderr
%60 = load i8*, i8** %58
%61 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %60)
%62 = call i32 (...) @usage()
br label %63
63: ; preds = %57, %74, %52
%64 = phi i8** [ %53, %52 ], [ %75, %74 ], [ %58, %57 ]
%65 = add nsw i32 %35, -2
%66 = icmp eq i32 %65, 0
br i1 %66, label %93, label %33
67: ; preds = %44
%68 = call i32 @strcmp(i8* dereferenceable(1) %45, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %79
70: ; preds = %67
%71 = icmp eq i32 %37, 0
br i1 %71, label %72, label %74
72: ; preds = %70
%73 = call i32 (...) @usage()
br label %74
74: ; preds = %72, %70
%75 = getelementptr inbounds i8*, i8** %34, i64 2
%76 = load i8*, i8** %75
%77 = call i64 @octalMode(i8* %76, i32* %4)
%78 = icmp eq i64 %77, 0
br i1 %78, label %63, label %57
79: ; preds = %67
%80 = icmp eq i8* %30, null
br i1 %80, label %86, label %81
81: ; preds = %79
%82 = load i32, i32* @stderr
%83 = call i32 @fprintf(i32 %82, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %45)
%84 = call i32 (...) @usage()
%85 = load i8*, i8** %36
br label %86
86: ; preds = %81, %79
%87 = phi i8* [ %85, %81 ], [ %45, %79 ]
%88 = call i64 @strlen(i8* dereferenceable(1) %87)
%89 = add nsw i64 %88, 1
%90 = call i8* @malloc(i64 %89)
%91 = call i32 @strcpy(i8* %90, i8* %87)
%92 = icmp eq i32 %37, 0
br i1 %92, label %93, label %29
93: ; preds = %86, %63, %23
%94 = phi i8* [ null, %23 ], [ %30, %63 ], [ %90, %86 ]
%95 = load i32, i32* %3
%96 = load i32, i32* %4
%97 = call i32 @fixperms(i8* %94, i32 %95, i32 %96)
%98 = call i32 @free(i8* %94)
ret i32 0
}