#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct option {
  char *member_0;
  int member_1;
  char member_3;
  int /*<<< orphan*/ *member_2;
};
typedef int mode_t;
typedef void *dev_t;

/* Variables and functions */
int S_IFDIR;
int S_IFLNK;
int S_IFMT;
int S_IFREG;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           int, char *);
int getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
void *major(void *);
void *makedev(void *, void *);
void *minor(void *);
int mkdir(char const *, int);
int mknod(char const *, int, void *);
int /*<<< orphan*/ optarg;
int optind;
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void *strtoul(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/);
int symlink(char *, char const *);
int /*<<< orphan*/ usage(char *, int);
int main(int argc, char **argv) {
  struct option opts[] = {
      {"device", 1, NULL, 'd'}, {"help", 0, NULL, 'h'},  {"mode", 1, NULL, 'm'},
      {"major", 1, NULL, 'M'},  {"minor", 1, NULL, 'N'}, {NULL},
  };
  const char *path;
  mode_t mode = S_IFREG | 0644;
  dev_t dev = 0;
  int rc;
  int c;
  while ((c = getopt_long(argc, argv, "d:hm:M:N:", opts, NULL)) != -1) {
    switch (c) {
    case 'd':
      dev = strtoul(optarg, NULL, 0);
      break;
    case 'h':
      usage(argv[0], 0);
    case 'm':
      mode = strtoul(optarg, NULL, 0);
      break;
    case 'M':
      dev = makedev(strtoul(optarg, NULL, 0), minor(dev));
      break;
    case 'N':
      dev = makedev(major(dev), strtoul(optarg, NULL, 0));
      break;
    case '?':
      usage(argv[0], 1);
    }
  }
  if (argc - optind != 1)
    usage(argv[0], 1);
  path = argv[optind];
  if ((mode & S_IFMT) == S_IFDIR)
    rc = mkdir(path, mode & ~S_IFMT);
  else if ((mode & S_IFMT) == S_IFLNK)
    rc = symlink("oldpath", path);
  else
    rc = mknod(path, mode, dev);
  if (rc)
    fprintf(stderr, "%s: cannot create `%s' with mode %#o: %s\n", argv[0], path,
            mode, strerror(errno));
  return rc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0x2b69(%rip),%rsi
mov    $0x90,%edx
call   10a0 <memcpy@plt>
mov    0x2de8(%rip),%rax
mov    (%rax),%eax
or     $0x1a4,%eax
mov    %eax,-0xac(%rbp)
movq   $0x0,-0xb8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0xa0(%rbp),%rcx
lea    0xeb4(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1050 <getopt_long@plt>
mov    %eax,-0xc0(%rbp)
cmp    $0xffffffff,%eax
je     1357 <main+0x197>
mov    -0xc0(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0xc8(%rbp)
sub    $0x2e,%eax
ja     1352 <main+0x192>
mov    -0xc8(%rbp),%rax
lea    0xd99(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    %rax,-0xb8(%rbp)
jmp    1352 <main+0x192>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
xor    %esi,%esi
call   10b0 <usage@plt>
mov    0x2d53(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    %eax,-0xac(%rbp)
jmp    1352 <main+0x192>
mov    0x2d34(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xb8(%rbp),%rdi
call   1040 <minor@plt>
mov    -0xd0(%rbp),%rdi
mov    %rax,%rsi
call   10c0 <makedev@plt>
mov    %rax,-0xb8(%rbp)
jmp    1352 <main+0x192>
mov    -0xb8(%rbp),%rdi
call   1070 <major@plt>
mov    %rax,-0xd8(%rbp)
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    -0xd8(%rbp),%rdi
mov    %rax,%rsi
call   10c0 <makedev@plt>
mov    %rax,-0xb8(%rbp)
jmp    1352 <main+0x192>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x1,%esi
call   10b0 <usage@plt>
jmp    1210 <main+0x50>
mov    -0x8(%rbp),%eax
mov    0x2c6f(%rip),%rcx
sub    (%rcx),%eax
cmp    $0x1,%eax
je     137d <main+0x1bd>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x1,%esi
call   10b0 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x2c48(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xa8(%rbp)
mov    -0xac(%rbp),%eax
mov    0x2c1d(%rip),%rcx
and    (%rcx),%eax
mov    0x2bf4(%rip),%rcx
cmp    (%rcx),%eax
jne    13df <main+0x21f>
mov    -0xa8(%rbp),%rdi
mov    -0xac(%rbp),%esi
mov    0x2bf8(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    %eax,%esi
call   1030 <mkdir@plt>
mov    %eax,-0xbc(%rbp)
jmp    143f <main+0x27f>
mov    -0xac(%rbp),%eax
mov    0x2bd4(%rip),%rcx
and    (%rcx),%eax
mov    0x2be3(%rip),%rcx
cmp    (%rcx),%eax
jne    141b <main+0x25b>
mov    -0xa8(%rbp),%rsi
lea    0xcd8(%rip),%rdi
call   1060 <symlink@plt>
mov    %eax,-0xbc(%rbp)
jmp    143a <main+0x27a>
mov    -0xa8(%rbp),%rdi
mov    -0xac(%rbp),%esi
mov    -0xb8(%rbp),%rdx
call   1090 <mknod@plt>
mov    %eax,-0xbc(%rbp)
jmp    143f <main+0x27f>
cmpl   $0x0,-0xbc(%rbp)
je     14bb <main+0x2fb>
mov    0x2b65(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xf4(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0xac(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    0x2b26(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xf4(%rbp),%edi
mov    -0xf0(%rbp),%rdx
mov    -0xe8(%rbp),%rcx
mov    -0xdc(%rbp),%r8d
mov    %rax,%r9
lea    0xc35(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0xbc(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x2b73(%rip),%rsi
lea    0x10(%rsp),%r15
mov    $0x90,%edx
mov    %r15,%rdi
call   10a0 <memcpy@plt>
mov    0x2dea(%rip),%rax
mov    $0x1a4,%ecx
or     (%rax),%ecx
mov    %rcx,0x8(%rsp)
xor    %r14d,%r14d
lea    0xecd(%rip),%r13
lea    0xded(%rip),%r12
jmp    1229 <main+0x69>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0xffffffff,%eax
je     12e8 <main+0x128>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
call   1050 <getopt_long@plt>
lea    -0x3f(%rax),%ecx
cmp    $0x2e,%ecx
ja     1220 <main+0x60>
movslq (%r12,%rcx,4),%rax
add    %r12,%rax
jmp    *%rax
mov    (%rbx),%rdi
mov    $0x1,%esi
call   10b0 <usage@plt>
jmp    1229 <main+0x69>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    %r14,%rdi
mov    %rax,%r14
call   1040 <minor@plt>
jmp    1298 <main+0xd8>
mov    %r14,%rdi
call   1070 <major@plt>
mov    %rax,%r14
mov    0x2d6b(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   10c0 <makedev@plt>
mov    %rax,%r14
jmp    1229 <main+0x69>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    %rax,%r14
jmp    1229 <main+0x69>
mov    (%rbx),%rdi
xor    %esi,%esi
call   10b0 <usage@plt>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <strtoul@plt>
mov    %rax,0x8(%rsp)
jmp    1229 <main+0x69>
mov    %r14,%r13
mov    0x2cde(%rip),%r14
mov    (%r14),%eax
sub    %eax,%ebp
cmp    $0x1,%ebp
je     130c <main+0x14c>
mov    (%rbx),%rdi
mov    $0x1,%esi
call   10b0 <usage@plt>
mov    (%r14),%eax
cltq
mov    (%rbx,%rax,8),%r15
mov    0x2ca7(%rip),%rax
mov    (%rax),%esi
mov    %esi,%eax
mov    0x8(%rsp),%r12
and    %r12d,%eax
mov    0x2c74(%rip),%rcx
cmp    (%rcx),%eax
jne    133f <main+0x17f>
not    %esi
and    %r12d,%esi
mov    %r15,%rdi
call   1030 <mkdir@plt>
jmp    1369 <main+0x1a9>
mov    0x2c92(%rip),%rcx
cmp    (%rcx),%eax
jne    135b <main+0x19b>
lea    0xd92(%rip),%rdi
mov    %r15,%rsi
call   1060 <symlink@plt>
jmp    1369 <main+0x1a9>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %r13,%rdx
call   1090 <mknod@plt>
mov    %eax,%ebp
test   %eax,%eax
je     13a5 <main+0x1e5>
mov    0x2c42(%rip),%rax
mov    (%rax),%r14d
mov    (%rbx),%rbx
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xd5a(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r12d,%r8d
mov    %rax,%r9
call   1080 <fprintf@plt>
mov    %ebp,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option = type { i8*, i32, i8, i32* }
@.str = [7 x i8] c"device\00"
@.str.1 = [5 x i8] c"help\00"
@.str.2 = [5 x i8] c"mode\00"
@.str.3 = [6 x i8] c"major\00"
@.str.4 = [6 x i8] c"minor\00"
@__const.main.opts = [6 x %struct.option] [%struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 100 to i32*) }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i32 0, i8 0, i32* inttoptr (i64 104 to i32*) }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 109 to i32*) }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 77 to i32*) }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 78 to i32*) }, %struct.option zeroinitializer]
@S_IFREG = global i32 0
@.str.5 = [10 x i8] c"d:hm:M:N:\00"
@optarg = global i32 0
@optind = global i32 0
@S_IFMT = global i32 0
@S_IFDIR = global i32 0
@S_IFLNK = global i32 0
@.str.6 = [8 x i8] c"oldpath\00"
@stderr = global i32 0
@.str.7 = [42 x i8] c"%s: cannot create `%s' with mode %#o: %s\0A\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x %struct.option]
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = bitcast [6 x %struct.option]* %6 to i8*
%13 = load i32, i32* @S_IFREG
%14 = or i32 %13, 420
store i32 %14, i32* %8
store i8* null, i8** %9
br label %15
15: ; preds = %52, %2
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %6, i64 0, i64 0
%19 = call i32 @getopt_long(i32 %16, i8** %17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), %struct.option* %18, i32* null)
store i32 %19, i32* %11
%20 = icmp ne i32 %19, -1
br i1 %20, label %21, label %53
21: ; preds = %15
%22 = load i32, i32* %11
switch i32 %22, label %52 [
i32 100, label %23
i32 104, label %26
i32 109, label %31
i32 77, label %35
i32 78, label %41
i32 63, label %47
]
23: ; preds = %21
%24 = load i32, i32* @optarg
%25 = call i8* @strtoul(i32 %24, i32* null, i32 0)
store i8* %25, i8** %9
br label %52
26: ; preds = %21
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 0
%29 = load i8*, i8** %28
%30 = call i32 @usage(i8* %29, i32 0)
br label %31
31: ; preds = %21, %26
%32 = load i32, i32* @optarg
%33 = call i8* @strtoul(i32 %32, i32* null, i32 0)
%34 = ptrtoint i8* %33 to i32
store i32 %34, i32* %8
br label %52
35: ; preds = %21
%36 = load i32, i32* @optarg
%37 = call i8* @strtoul(i32 %36, i32* null, i32 0)
%38 = load i8*, i8** %9
%39 = call i8* @minor(i8* %38)
%40 = call i8* @makedev(i8* %37, i8* %39)
store i8* %40, i8** %9
br label %52
41: ; preds = %21
%42 = load i8*, i8** %9
%43 = call i8* @major(i8* %42)
%44 = load i32, i32* @optarg
%45 = call i8* @strtoul(i32 %44, i32* null, i32 0)
%46 = call i8* @makedev(i8* %43, i8* %45)
store i8* %46, i8** %9
br label %52
47: ; preds = %21
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 0
%50 = load i8*, i8** %49
%51 = call i32 @usage(i8* %50, i32 1)
br label %52
52: ; preds = %47, %21, %41, %35, %31, %23
br label %15
53: ; preds = %15
%54 = load i32, i32* %4
%55 = load i32, i32* @optind
%56 = sub nsw i32 %54, %55
%57 = icmp ne i32 %56, 1
br i1 %57, label %58, label %63
58: ; preds = %53
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 0
%61 = load i8*, i8** %60
%62 = call i32 @usage(i8* %61, i32 1)
br label %63
63: ; preds = %58, %53
%64 = load i8**, i8*** %5
%65 = load i32, i32* @optind
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8*, i8** %64, i64 %66
%68 = load i8*, i8** %67
store i8* %68, i8** %7
%69 = load i32, i32* %8
%70 = load i32, i32* @S_IFMT
%71 = and i32 %69, %70
%72 = load i32, i32* @S_IFDIR
%73 = icmp eq i32 %71, %72
br i1 %73, label %74, label %81
74: ; preds = %63
%75 = load i8*, i8** %7
%76 = load i32, i32* %8
%77 = load i32, i32* @S_IFMT
%78 = xor i32 %77, -1
%79 = and i32 %76, %78
%80 = call i32 @mkdir(i8* %75, i32 %79)
store i32 %80, i32* %10
br label %96
81: ; preds = %63
%82 = load i32, i32* %8
%83 = load i32, i32* @S_IFMT
%84 = and i32 %82, %83
%85 = load i32, i32* @S_IFLNK
%86 = icmp eq i32 %84, %85
br i1 %86, label %87, label %90
87: ; preds = %81
%88 = load i8*, i8** %7
%89 = call i32 @symlink(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %88)
store i32 %89, i32* %10
br label %95
90: ; preds = %81
%91 = load i8*, i8** %7
%92 = load i32, i32* %8
%93 = load i8*, i8** %9
%94 = call i32 @mknod(i8* %91, i32 %92, i8* %93)
store i32 %94, i32* %10
br label %95
95: ; preds = %90, %87
br label %96
96: ; preds = %95, %74
%97 = load i32, i32* %10
%98 = icmp ne i32 %97, 0
br i1 %98, label %99, label %109
99: ; preds = %96
%100 = load i32, i32* @stderr
%101 = load i8**, i8*** %5
%102 = getelementptr inbounds i8*, i8** %101, i64 0
%103 = load i8*, i8** %102
%104 = load i8*, i8** %7
%105 = load i32, i32* %8
%106 = load i32, i32* @errno
%107 = call i8* @strerror(i32 %106)
%108 = call i32 @fprintf(i32 %100, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i8* %103, i8* %104, i32 %105, i8* %107)
br label %109
109: ; preds = %99, %96
%110 = load i32, i32* %10
ret i32 %110
}

LLVM IR (-O2):
%struct.option = type { i8*, i32, i8, i32* }
@.str = [7 x i8] c"device\00"
@.str.1 = [5 x i8] c"help\00"
@.str.2 = [5 x i8] c"mode\00"
@.str.3 = [6 x i8] c"major\00"
@.str.4 = [6 x i8] c"minor\00"
@__const.main.opts = [6 x %struct.option] [%struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 100 to i32*) }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i32 0, i8 0, i32* inttoptr (i64 104 to i32*) }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 109 to i32*) }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 77 to i32*) }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i32 1, i8 0, i32* inttoptr (i64 78 to i32*) }, %struct.option zeroinitializer]
@S_IFREG = global i32 0
@.str.5 = [10 x i8] c"d:hm:M:N:\00"
@optarg = global i32 0
@optind = global i32 0
@S_IFMT = global i32 0
@S_IFDIR = global i32 0
@S_IFLNK = global i32 0
@.str.6 = [8 x i8] c"oldpath\00"
@stderr = global i32 0
@.str.7 = [42 x i8] c"%s: cannot create `%s' with mode %#o: %s\0A\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [6 x %struct.option]
%4 = bitcast [6 x %struct.option]* %3 to i8*
%5 = load i32, i32* @S_IFREG
%6 = or i32 %5, 420
%7 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 0
br label %8
8: ; preds = %37, %2
%9 = phi i8* [ null, %2 ], [ %38, %37 ]
%10 = phi i32 [ %6, %2 ], [ %12, %37 ]
br label %11
11: ; preds = %8, %22
%12 = phi i32 [ %10, %8 ], [ %26, %22 ]
br label %13
13: ; preds = %15, %11
%14 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), %struct.option* %7, i32* null)
switch i32 %14, label %15 [
i32 -1, label %42
i32 100, label %16
i32 104, label %19
i32 109, label %22
i32 77, label %27
i32 78, label %32
i32 63, label %39
]
15: ; preds = %13, %39
br label %13
16: ; preds = %13
%17 = load i32, i32* @optarg
%18 = call i8* @strtoul(i32 %17, i32* null, i32 0)
br label %37
19: ; preds = %13
%20 = load i8*, i8** %1
%21 = call i32 @usage(i8* %20, i32 0)
br label %22
22: ; preds = %13, %19
%23 = load i32, i32* @optarg
%24 = call i8* @strtoul(i32 %23, i32* null, i32 0)
%25 = ptrtoint i8* %24 to i64
%26 = trunc i64 %25 to i32
br label %11
27: ; preds = %13
%28 = load i32, i32* @optarg
%29 = call i8* @strtoul(i32 %28, i32* null, i32 0)
%30 = call i8* @minor(i8* %9)
%31 = call i8* @makedev(i8* %29, i8* %30)
br label %37
32: ; preds = %13
%33 = call i8* @major(i8* %9)
%34 = load i32, i32* @optarg
%35 = call i8* @strtoul(i32 %34, i32* null, i32 0)
%36 = call i8* @makedev(i8* %33, i8* %35)
br label %37
37: ; preds = %32, %27, %16
%38 = phi i8* [ %18, %16 ], [ %31, %27 ], [ %36, %32 ]
br label %8
39: ; preds = %13
%40 = load i8*, i8** %1
%41 = call i32 @usage(i8* %40, i32 1)
br label %15
42: ; preds = %13
%43 = load i32, i32* @optind
%44 = sub nsw i32 %0, %43
%45 = icmp eq i32 %44, 1
br i1 %45, label %50, label %46
46: ; preds = %42
%47 = load i8*, i8** %1
%48 = call i32 @usage(i8* %47, i32 1)
%49 = load i32, i32* @optind
br label %50
50: ; preds = %46, %42
%51 = phi i32 [ %49, %46 ], [ %43, %42 ]
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %1, i64 %52
%54 = load i8*, i8** %53
%55 = load i32, i32* @S_IFMT
%56 = and i32 %55, %12
%57 = load i32, i32* @S_IFDIR
%58 = icmp eq i32 %56, %57
br i1 %58, label %59, label %63
59: ; preds = %50
%60 = xor i32 %55, -1
%61 = and i32 %12, %60
%62 = call i32 @mkdir(i8* %54, i32 %61)
br label %70
63: ; preds = %50
%64 = load i32, i32* @S_IFLNK
%65 = icmp eq i32 %56, %64
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = call i32 @symlink(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %54)
br label %70
68: ; preds = %63
%69 = call i32 @mknod(i8* %54, i32 %12, i8* %9)
br label %70
70: ; preds = %66, %68, %59
%71 = phi i32 [ %62, %59 ], [ %67, %66 ], [ %69, %68 ]
%72 = icmp eq i32 %71, 0
br i1 %72, label %79, label %73
73: ; preds = %70
%74 = load i32, i32* @stderr
%75 = load i8*, i8** %1
%76 = load i32, i32* @errno
%77 = call i8* @strerror(i32 %76)
%78 = call i32 @fprintf(i32 %74, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i8* %75, i8* %54, i32 %12, i8* %77)
br label %79
79: ; preds = %73, %70
ret i32 %71
}