#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 /*<<< orphan*/ FILE;

/* Variables and functions */
char *crypt(char *, unsigned char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, ...);
int random();
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  unsigned char salt[3];
  FILE *fp;
  if (argc < 4) {
    printf("%s <filename> <user> <passwd>\n", argv[0]);
    return 0;
  }
  srandom(time(NULL));
  salt[2] = 0;
  fp = fopen(argv[1], "a");
  if (!fp) {
    perror("Error: ");
    return 0;
  }
  if (ftell(fp) == 0) {
    fprintf(fp, "T regs %lu 5\n",
            ((0x0200LL | 0x4000LL | 0x0800LL | 0x2000LL) | 0x0400LL));
    fprintf(fp, "T vips %lu 4\n",
            (((0x0200LL | 0x4000LL | 0x0800LL | 0x2000LL) | 0x0400LL) |
             0x0001LL | 0x40000LL));
    fprintf(fp, "T ops %lu 3\n",
            (((((0x0200LL | 0x4000LL | 0x0800LL | 0x2000LL) | 0x0400LL) |
               0x0001LL | 0x40000LL) |
              0x0002LL) |
             0x0004LL | 0x0008LL | 0x80000LL | 0x200000LL));
    fprintf(fp, "T cheefs %lu 2\n",
            ((((((0x0200LL | 0x4000LL | 0x0800LL | 0x2000LL) | 0x0400LL) |
                0x0001LL | 0x40000LL) |
               0x0002LL) |
              0x0004LL | 0x0008LL | 0x80000LL | 0x200000LL) |
             0x0040LL));
    fprintf(fp, "T admins %lu 1\n",
            (((((((0x0200LL | 0x4000LL | 0x0800LL | 0x2000LL) | 0x0400LL) |
                 0x0001LL | 0x40000LL) |
                0x0002LL) |
               0x0004LL | 0x0008LL | 0x80000LL | 0x200000LL) |
              0x0040LL) |
             0x0010LL | 0x0100LL | 0x0080LL));
    fprintf(fp, "T owner %lu 0\n",
            (((((((0x0200LL | 0x4000LL | 0x0800LL | 0x2000LL) | 0x0400LL) |
                 0x0001LL | 0x40000LL) |
                0x0002LL) |
               0x0004LL | 0x0008LL | 0x80000LL | 0x200000LL) |
              0x0040LL) |
             0x0010LL | 0x0100LL | 0x0080LL) |
                0x1000000LL);
  } else
    printf("Appending new owner %s to file %s\n", argv[2], argv[1]);
  do {
    salt[0] = ((random() % 78) + 45);
  } while (((salt[0] > 57) && (salt[0] < 65)) ||
           ((salt[0] > 90) && (salt[0] < 97)));
  do {
    salt[1] = ((random() % 78) + 45);
  } while (((salt[1] > 57) && (salt[1] < 65)) ||
           ((salt[1] > 90) && (salt[1] < 97)));
  salt[2] = 0;
  fprintf(fp, "A %s %s %lu %lu %lu %s %lu %lu\n", argv[2], crypt(argv[3], salt),
          (((((((0x0200LL | 0x4000LL | 0x0800LL | 0x2000LL) | 0x0400LL) |
               0x0001LL | 0x40000LL) |
              0x0002LL) |
             0x0004LL | 0x0008LL | 0x80000LL | 0x200000LL) |
            0x0040LL) |
           0x0010LL | 0x0100LL | 0x0080LL) |
              0x1000000LL,
          0, 0, argv[2], time(NULL), 0);
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    11e1 <main+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1457 <main+0x2b7>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
movb   $0x0,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe1b(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1230 <main+0x90>
lea    0xe02(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x0,-0x4(%rbp)
jmp    1457 <main+0x2b7>
mov    -0x20(%rbp),%rdi
call   1080 <ftell@plt>
cmp    $0x0,%rax
jne    12d2 <main+0x132>
mov    -0x20(%rbp),%rdi
lea    0xddb(%rip),%rsi
mov    $0x6e00,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdd2(%rip),%rsi
mov    $0x46e01,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdc9(%rip),%rsi
mov    $0x2c6e0f,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdbf(%rip),%rsi
mov    $0x2c6e4f,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdb8(%rip),%rsi
mov    $0x2c6fdf,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdb1(%rip),%rsi
mov    $0x12c6fdf,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12f0 <main+0x150>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    12f5 <main+0x155>
mov    $0x0,%al
call   10a0 <random@plt>
mov    $0x4e,%ecx
cltd
idiv   %ecx
add    $0x2d,%edx
mov    %dl,%al
mov    %al,-0x13(%rbp)
movzbl -0x13(%rbp),%eax
cmp    $0x39,%eax
jle    132b <main+0x18b>
movzbl -0x13(%rbp),%ecx
mov    $0x1,%al
cmp    $0x41,%ecx
mov    %al,-0x21(%rbp)
jl     1350 <main+0x1b0>
movzbl -0x13(%rbp),%ecx
xor    %eax,%eax
cmp    $0x5a,%ecx
mov    %al,-0x22(%rbp)
jle    134a <main+0x1aa>
movzbl -0x13(%rbp),%eax
cmp    $0x61,%eax
setl   %al
mov    %al,-0x22(%rbp)
mov    -0x22(%rbp),%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    12f5 <main+0x155>
jmp    1360 <main+0x1c0>
mov    $0x0,%al
call   10a0 <random@plt>
mov    $0x4e,%ecx
cltd
idiv   %ecx
add    $0x2d,%edx
mov    %dl,%al
mov    %al,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x39,%eax
jle    1396 <main+0x1f6>
movzbl -0x12(%rbp),%ecx
mov    $0x1,%al
cmp    $0x41,%ecx
mov    %al,-0x23(%rbp)
jl     13bb <main+0x21b>
movzbl -0x12(%rbp),%ecx
xor    %eax,%eax
cmp    $0x5a,%ecx
mov    %al,-0x24(%rbp)
jle    13b5 <main+0x215>
movzbl -0x12(%rbp),%eax
cmp    $0x61,%eax
setl   %al
mov    %al,-0x24(%rbp)
mov    -0x24(%rbp),%al
mov    %al,-0x23(%rbp)
mov    -0x23(%rbp),%al
test   $0x1,%al
jne    1360 <main+0x1c0>
movb   $0x0,-0x11(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    -0x13(%rbp),%rsi
call   1040 <crypt@plt>
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    -0x48(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%r10
lea    0xc85(%rip),%rsi
mov    $0x12c6fdf,%r8d
xor    %r9d,%r9d
movl   $0x0,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r15
cmp    $0x3,%edi
jg     11cb <main+0x2b>
mov    (%r15),%rsi
lea    0xe41(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1382 <main+0x1e2>
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
mov    0x8(%r15),%rdi
lea    0xe3b(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1392 <main+0x1f2>
mov    %rax,%r14
mov    %rax,%rdi
call   1080 <ftell@plt>
test   %rax,%rax
je     121d <main+0x7d>
mov    0x8(%r15),%rdx
mov    0x10(%r15),%rsi
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    12a1 <main+0x101>
lea    0xe05(%rip),%rsi
mov    $0x6e00,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xdfd(%rip),%rsi
mov    $0x46e01,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xdf5(%rip),%rsi
mov    $0x2c6e0f,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xdec(%rip),%rsi
mov    $0x2c6e4f,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xde6(%rip),%rsi
mov    $0x2c6fdf,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xde0(%rip),%rsi
mov    $0x12c6fdf,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
movabs $0xfc000000fe000,%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10a0 <random@plt>
cltq
imul   $0xffffffffd20d20d3,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x4e,%ecx,%ecx
sub    %ecx,%eax
cmp    $0x33,%al
ja     12e2 <main+0x142>
movzbl %al,%ecx
bt     %rcx,%rbx
jb     12b0 <main+0x110>
add    $0x2d,%al
mov    %al,0xd(%rsp)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10a0 <random@plt>
cltq
imul   $0xffffffffd20d20d3,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x4e,%ecx,%ecx
sub    %ecx,%eax
cmp    $0x33,%al
ja     1322 <main+0x182>
movzbl %al,%ecx
bt     %rcx,%rbx
jb     12f0 <main+0x150>
add    $0x2d,%al
mov    %al,0xe(%rsp)
movb   $0x0,0xf(%rsp)
mov    0x10(%r15),%r12
mov    0x18(%r15),%rdi
lea    0xd(%rsp),%rsi
call   1040 <crypt@plt>
mov    %rax,%r13
mov    0x10(%r15),%r15
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%ebx
lea    0xd4e(%rip),%rsi
mov    $0x12c6fdf,%r8d
mov    %r14,%rdi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x0
push   %rbx
push   %r15
push   $0x0
call   1070 <fprintf@plt>
add    $0x20,%rsp
mov    %r14,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xc88(%rip),%rdi
call   10c0 <perror@plt>
jmp    1382 <main+0x1e2>

LLVM IR (-O0):
@.str = [31 x i8] c"%s <filename> <user> <passwd>\0A\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"Error: \00"
@.str.3 = [14 x i8] c"T regs %lu 5\0A\00"
@.str.4 = [14 x i8] c"T vips %lu 4\0A\00"
@.str.5 = [13 x i8] c"T ops %lu 3\0A\00"
@.str.6 = [16 x i8] c"T cheefs %lu 2\0A\00"
@.str.7 = [16 x i8] c"T admins %lu 1\0A\00"
@.str.8 = [15 x i8] c"T owner %lu 0\0A\00"
@.str.9 = [35 x i8] c"Appending new owner %s to file %s\0A\00"
@.str.10 = [32 x i8] c"A %s %s %lu %lu %lu %s %lu %lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i8]
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 4
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %13)
store i32 0, i32* %3
br label %132
15: ; preds = %2
%16 = call i32 @time(i32* null)
%17 = call i32 @srandom(i32 %16)
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 2
store i8 0, i8* %18
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %7
%23 = load i32*, i32** %7
%24 = icmp ne i32* %23, null
br i1 %24, label %27, label %25
25: ; preds = %15
%26 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %132
27: ; preds = %15
%28 = load i32*, i32** %7
%29 = call i64 @ftell(i32* %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %44
31: ; preds = %27
%32 = load i32*, i32** %7
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i64 28160)
%34 = load i32*, i32** %7
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i64 290305)
%36 = load i32*, i32** %7
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i64 2911759)
%38 = load i32*, i32** %7
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i64 2911823)
%40 = load i32*, i32** %7
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i64 2912223)
%42 = load i32*, i32** %7
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i64 19689439)
br label %52
44: ; preds = %27
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 2
%47 = load i8*, i8** %46
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 1
%50 = load i8*, i8** %49
%51 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %47, i8* %50)
br label %52
52: ; preds = %44, %31
br label %53
53: ; preds = %81, %52
%54 = call i32 (...) @random()
%55 = srem i32 %54, 78
%56 = add nsw i32 %55, 45
%57 = trunc i32 %56 to i8
%58 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
store i8 %57, i8* %58
br label %59
59: ; preds = %53
%60 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = icmp sgt i32 %62, 57
br i1 %63, label %64, label %69
64: ; preds = %59
%65 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%66 = load i8, i8* %65
%67 = zext i8 %66 to i32
%68 = icmp slt i32 %67, 65
br i1 %68, label %81, label %69
69: ; preds = %64, %59
%70 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%71 = load i8, i8* %70
%72 = zext i8 %71 to i32
%73 = icmp sgt i32 %72, 90
br i1 %73, label %74, label %79
74: ; preds = %69
%75 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%76 = load i8, i8* %75
%77 = zext i8 %76 to i32
%78 = icmp slt i32 %77, 97
br label %79
79: ; preds = %74, %69
%80 = phi i1 [ false, %69 ], [ %78, %74 ]
br label %81
81: ; preds = %79, %64
%82 = phi i1 [ true, %64 ], [ %80, %79 ]
br i1 %82, label %53, label %83
83: ; preds = %81
br label %84
84: ; preds = %112, %83
%85 = call i32 (...) @random()
%86 = srem i32 %85, 78
%87 = add nsw i32 %86, 45
%88 = trunc i32 %87 to i8
%89 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 1
store i8 %88, i8* %89
br label %90
90: ; preds = %84
%91 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 1
%92 = load i8, i8* %91
%93 = zext i8 %92 to i32
%94 = icmp sgt i32 %93, 57
br i1 %94, label %95, label %100
95: ; preds = %90
%96 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 1
%97 = load i8, i8* %96
%98 = zext i8 %97 to i32
%99 = icmp slt i32 %98, 65
br i1 %99, label %112, label %100
100: ; preds = %95, %90
%101 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 1
%102 = load i8, i8* %101
%103 = zext i8 %102 to i32
%104 = icmp sgt i32 %103, 90
br i1 %104, label %105, label %110
105: ; preds = %100
%106 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 1
%107 = load i8, i8* %106
%108 = zext i8 %107 to i32
%109 = icmp slt i32 %108, 97
br label %110
110: ; preds = %105, %100
%111 = phi i1 [ false, %100 ], [ %109, %105 ]
br label %112
112: ; preds = %110, %95
%113 = phi i1 [ true, %95 ], [ %111, %110 ]
br i1 %113, label %84, label %114
114: ; preds = %112
%115 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 2
store i8 0, i8* %115
%116 = load i32*, i32** %7
%117 = load i8**, i8*** %5
%118 = getelementptr inbounds i8*, i8** %117, i64 2
%119 = load i8*, i8** %118
%120 = load i8**, i8*** %5
%121 = getelementptr inbounds i8*, i8** %120, i64 3
%122 = load i8*, i8** %121
%123 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%124 = call i8* @crypt(i8* %122, i8* %123)
%125 = load i8**, i8*** %5
%126 = getelementptr inbounds i8*, i8** %125, i64 2
%127 = load i8*, i8** %126
%128 = call i32 @time(i32* null)
%129 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i8* %119, i8* %124, i64 19689439, i32 0, i32 0, i8* %127, i32 %128, i32 0)
%130 = load i32*, i32** %7
%131 = call i32 @fclose(i32* %130)
store i32 0, i32* %3
br label %132
132: ; preds = %114, %25, %10
%133 = load i32, i32* %3
ret i32 %133
}

LLVM IR (-O2):
@.str = [31 x i8] c"%s <filename> <user> <passwd>\0A\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"Error: \00"
@.str.3 = [14 x i8] c"T regs %lu 5\0A\00"
@.str.4 = [14 x i8] c"T vips %lu 4\0A\00"
@.str.5 = [13 x i8] c"T ops %lu 3\0A\00"
@.str.6 = [16 x i8] c"T cheefs %lu 2\0A\00"
@.str.7 = [16 x i8] c"T admins %lu 1\0A\00"
@.str.8 = [15 x i8] c"T owner %lu 0\0A\00"
@.str.9 = [35 x i8] c"Appending new owner %s to file %s\0A\00"
@.str.10 = [32 x i8] c"A %s %s %lu %lu %lu %s %lu %lu\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 4
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %61
9: ; preds = %2
%10 = tail call i32 @time(i32* null)
%11 = tail call i32 @srandom(i32 %10)
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %19
17: ; preds = %9
%18 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %61
19: ; preds = %9
%20 = tail call i64 @ftell(i32* %15)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i64 28160)
%24 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i64 290305)
%25 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i64 2911759)
%26 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i64 2911823)
%27 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i64 2912223)
%28 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i64 19689439)
br label %34
29: ; preds = %19
%30 = getelementptr inbounds i8*, i8** %1, i64 2
%31 = load i8*, i8** %30
%32 = load i8*, i8** %13
%33 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %31, i8* %32)
br label %34
34: ; preds = %29, %22
br label %35
35: ; preds = %39, %34
%36 = tail call i32 (...) @random()
%37 = srem i32 %36, 78
%38 = trunc i32 %37 to i8
switch i8 %38, label %40 [
i8 51, label %39
i8 50, label %39
i8 49, label %39
i8 48, label %39
i8 47, label %39
i8 46, label %39
i8 19, label %39
i8 18, label %39
i8 17, label %39
i8 16, label %39
i8 15, label %39
i8 14, label %39
i8 13, label %39
]
39: ; preds = %35, %35, %35, %35, %35, %35, %35, %35, %35, %35, %35, %35, %35
br label %35
40: ; preds = %35
%41 = trunc i32 %37 to i8
%42 = add nsw i8 %41, 45
store i8 %42, i8* %4
br label %43
43: ; preds = %47, %40
%44 = tail call i32 (...) @random()
%45 = srem i32 %44, 78
%46 = trunc i32 %45 to i8
switch i8 %46, label %48 [
i8 51, label %47
i8 50, label %47
i8 49, label %47
i8 48, label %47
i8 47, label %47
i8 46, label %47
i8 19, label %47
i8 18, label %47
i8 17, label %47
i8 16, label %47
i8 15, label %47
i8 14, label %47
i8 13, label %47
]
47: ; preds = %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43
br label %43
48: ; preds = %43
%49 = trunc i32 %45 to i8
%50 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
%51 = add nsw i8 %49, 45
store i8 %51, i8* %50
store i8 0, i8* %12
%52 = getelementptr inbounds i8*, i8** %1, i64 2
%53 = load i8*, i8** %52
%54 = getelementptr inbounds i8*, i8** %1, i64 3
%55 = load i8*, i8** %54
%56 = call i8* @crypt(i8* %55, i8* %4)
%57 = load i8*, i8** %52
%58 = call i32 @time(i32* null)
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i8* %53, i8* %56, i64 19689439, i32 0, i32 0, i8* %57, i32 %58, i32 0)
%60 = call i32 @fclose(i32* %15)
br label %61
61: ; preds = %48, %17, %6
ret i32 0
}