#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 */
int EXIT_FAILURE;
int EXIT_SUCCESS;
char *crypt(char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *, char *,
                           char *, char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *, char *, char *,
                          char *, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ rename(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  FILE *in, *out;
  char *ptr = NULL;
  char *salt = "8fei3k";
  char channel[1024] = {0};
  char uh[1024] = {0};
  char level[10] = {0};
  char joins[10] = {0};
  char pass[1024] = {0};
  char setinfo[1024] = {0};
  printf("\nDarkbot USERLIST.DB < 7f0 conversion utility.\n");
  printf("IMPORTANT :: READ THIS!\n\n");
  printf("This UTILITY is for converting *OLD* (pre 7f0) userlist's\n");
  printf("to the new encrypted format.\n\n");
  printf("Use this utility ONLY if:\n");
  printf(" - You have copied your pre 7f0 userlist.db in to the dat "
         "directory\n\n");
  printf("DO NOT use this utility if:\n");
  printf(" - You have created a brand new darkbot, and have no users\n\n");
  if (argc < 2) {
    printf("Syntax: %s -convert\n\n", argv[0]);
    return 0;
  }
  if (argc > 1) {
    if (strcmp(argv[1], "-convert") != 0) {
      printf("Syntax: %s -convert\n\n", argv[0]);
      return 0;
    }
  }
  printf("Converting ...\n");
  if ((in = fopen("dat/userlist.db", "r")) == NULL) {
    printf("\nCan't open %s for reading!\n", "dat/userlist.db");
    return EXIT_FAILURE;
  }
  if ((out = fopen("dat/temp.db", "wt")) == NULL) {
    printf("\nCan't open %s for writing!\n", "dat/temp.db");
    return EXIT_FAILURE;
  }
  system("cp dat/userlist.db dat/backup.db");
  while (!feof(in)) {
    fscanf(in, "%s %s %s %s %s %[^\n]s", channel, uh, level, joins, pass,
           setinfo);
    if ((ptr = crypt(pass, salt)) == NULL) {
      printf("\ncrypt() error\n");
      return EXIT_FAILURE;
    }
    if (!feof(in))
      fprintf(out, "%s %s %s %s %s %s\n", channel, uh, level, joins, ptr,
              setinfo);
  }
  fclose(in);
  fclose(out);
  remove("dat/userlist.db");
  rename("dat/temp.db", "dat/userlist.db");
  printf("Conversion Complete.\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1060,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x28(%rbp)
lea    0xe18(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    -0x430(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    -0x830(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    -0x83a(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1080 <memset@plt>
lea    -0x844(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1080 <memset@plt>
lea    -0xc50(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    -0x1050(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jge    12f9 <main+0x139>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    152f <main+0x36f>
cmpl   $0x1,-0x8(%rbp)
jle    1347 <main+0x187>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe6a(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     1342 <main+0x182>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    152f <main+0x36f>
jmp    1347 <main+0x187>
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe39(%rip),%rdi
lea    0xe42(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    139c <main+0x1dc>
lea    0xe2a(%rip),%rdi
lea    0xe11(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2c4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    152f <main+0x36f>
lea    0xe21(%rip),%rdi
lea    0xe26(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    13e3 <main+0x223>
lea    0xe0f(%rip),%rdi
lea    0xdf9(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2c07(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    152f <main+0x36f>
lea    0xe06(%rip),%rdi
call   1060 <system@plt>
mov    -0x18(%rbp),%rdi
call   10c0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    140d <main+0x24d>
jmp    14e4 <main+0x324>
mov    -0x18(%rbp),%rdi
lea    -0x430(%rbp),%rdx
lea    -0x830(%rbp),%rcx
lea    -0x83a(%rbp),%r8
lea    -0x844(%rbp),%r9
lea    -0xc50(%rbp),%r10
lea    -0x1050(%rbp),%rax
lea    0xdcf(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <fscanf@plt>
lea    -0xc50(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <crypt@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    148d <main+0x2cd>
lea    0xdb2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2b5d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    152f <main+0x36f>
mov    -0x18(%rbp),%rdi
call   10c0 <feof@plt>
cmp    $0x0,%eax
jne    14df <main+0x31f>
mov    -0x20(%rbp),%rdi
lea    -0x430(%rbp),%rdx
lea    -0x830(%rbp),%rcx
lea    -0x83a(%rbp),%r8
lea    -0x844(%rbp),%r9
mov    -0x28(%rbp),%r10
lea    -0x1050(%rbp),%rax
lea    0xd66(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   10b0 <fprintf@plt>
jmp    13ef <main+0x22f>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
lea    0xc98(%rip),%rdi
call   1030 <remove@plt>
lea    0xcbb(%rip),%rdi
lea    0xc85(%rip),%rsi
call   10e0 <rename@plt>
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2aae(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1060,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1028,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x420(%rsp),%rdi
xor    %r12d,%r12d
mov    $0x400,%edx
xor    %esi,%esi
call   1090 <memset@plt>
lea    0x20(%rsp),%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1090 <memset@plt>
movw   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
movw   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
lea    0xc20(%rsp),%r15
mov    $0x400,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1090 <memset@plt>
lea    0x820(%rsp),%r14
mov    $0x400,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1090 <memset@plt>
lea    0xe67(%rip),%rdi
call   1040 <puts@plt>
lea    0xe8a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe97(%rip),%rdi
call   1040 <puts@plt>
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xee5(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x1,%ebp
jg     12cc <main+0xfc>
mov    (%rbx),%rsi
lea    0xd3d(%rip),%rdi
jmp    12ee <main+0x11e>
mov    0x8(%rbx),%rdi
lea    0xd46(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     130a <main+0x13a>
mov    (%rbx),%rsi
lea    0xd1c(%rip),%rdi
xor    %r12d,%r12d
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r12d,%eax
add    $0x1028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xf0f(%rip),%rdi
call   1040 <puts@plt>
lea    0xd09(%rip),%rdi
lea    0xf2d(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     13a7 <main+0x1d7>
mov    %rax,%rbp
lea    0xd1b(%rip),%rdi
lea    0xd20(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     13b7 <main+0x1e7>
mov    %rax,%rbx
lea    0xd2c(%rip),%rdi
call   1070 <system@plt>
mov    %rbp,%rdi
call   10d0 <feof@plt>
test   %eax,%eax
je     13db <main+0x20b>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
lea    0xcab(%rip),%rbx
mov    %rbx,%rdi
call   1030 <remove@plt>
lea    0xcc9(%rip),%rdi
mov    %rbx,%rsi
call   10f0 <rename@plt>
lea    0xe96(%rip),%rdi
call   1040 <puts@plt>
mov    0x2c33(%rip),%rax
jmp    13d3 <main+0x203>
lea    0xc88(%rip),%rdi
lea    0xc71(%rip),%rsi
jmp    13c5 <main+0x1f5>
lea    0xca4(%rip),%rdi
lea    0xc8e(%rip),%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x2c0d(%rip),%rax
mov    (%rax),%r12d
jmp    12f5 <main+0x125>
lea    0x10(%rsp),%r12
jmp    1400 <main+0x230>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
call   10d0 <feof@plt>
test   %eax,%eax
jne    1364 <main+0x194>
mov    %rbp,%rdi
lea    0xc96(%rip),%rsi
lea    0x420(%rsp),%rdx
lea    0x20(%rsp),%rcx
mov    %rsp,%r8
mov    %r12,%r9
push   %r14
push   %r15
call   10a0 <fscanf@plt>
add    $0x10,%rsp
mov    %r15,%rdi
lea    0xbcc(%rip),%rsi
call   1050 <crypt@plt>
test   %rax,%rax
je     147c <main+0x2ac>
mov    %rax,%r13
mov    %rbp,%rdi
call   10d0 <feof@plt>
test   %eax,%eax
jne    13f0 <main+0x220>
mov    %rbx,%rdi
lea    0xc5f(%rip),%rsi
lea    0x420(%rsp),%rdx
lea    0x20(%rsp),%rcx
mov    %rsp,%r8
mov    %r12,%r9
push   %r14
push   %r13
call   10c0 <fprintf@plt>
add    $0x10,%rsp
jmp    13f0 <main+0x220>
lea    0xdc1(%rip),%rdi
call   1040 <puts@plt>
jmp    13cc <main+0x1fc>

LLVM IR (-O0):
@.str = [7 x i8] c"8fei3k\00"
@.str.1 = [48 x i8] c"\0ADarkbot USERLIST.DB < 7f0 conversion utility.\0A\00"
@.str.2 = [26 x i8] c"IMPORTANT :: READ THIS!\0A\0A\00"
@.str.3 = [59 x i8] c"This UTILITY is for converting *OLD* (pre 7f0) userlist's\0A\00"
@.str.4 = [31 x i8] c"to the new encrypted format.\0A\0A\00"
@.str.5 = [27 x i8] c"Use this utility ONLY if:\0A\00"
@.str.6 = [70 x i8] c" - You have copied your pre 7f0 userlist.db in to the dat directory\0A\0A\00"
@.str.7 = [29 x i8] c"DO NOT use this utility if:\0A\00"
@.str.8 = [61 x i8] c" - You have created a brand new darkbot, and have no users\0A\0A\00"
@.str.9 = [22 x i8] c"Syntax: %s -convert\0A\0A\00"
@.str.10 = [9 x i8] c"-convert\00"
@.str.11 = [16 x i8] c"Converting ...\0A\00"
@.str.12 = [16 x i8] c"dat/userlist.db\00"
@.str.13 = [2 x i8] c"r\00"
@.str.14 = [29 x i8] c"\0ACan't open %s for reading!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.15 = [12 x i8] c"dat/temp.db\00"
@.str.16 = [3 x i8] c"wt\00"
@.str.17 = [29 x i8] c"\0ACan't open %s for writing!\0A\00"
@.str.18 = [33 x i8] c"cp dat/userlist.db dat/backup.db\00"
@.str.19 = [22 x i8] c"%s %s %s %s %s %[^\0A]s\00"
@.str.20 = [16 x i8] c"\0Acrypt() error\0A\00"
@.str.21 = [19 x i8] c"%s %s %s %s %s %s\0A\00"
@.str.22 = [22 x i8] c"Conversion Complete.\0A\00"
@EXIT_SUCCESS = global i32 0
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*
%9 = alloca i8*
%10 = alloca [1024 x i8]
%11 = alloca [1024 x i8]
%12 = alloca [10 x i8]
%13 = alloca [10 x i8]
%14 = alloca [1024 x i8]
%15 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %8
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %9
%16 = bitcast [1024 x i8]* %10 to i8*
%17 = bitcast [1024 x i8]* %11 to i8*
%18 = bitcast [10 x i8]* %12 to i8*
%19 = bitcast [10 x i8]* %13 to i8*
%20 = bitcast [1024 x i8]* %14 to i8*
%21 = bitcast [1024 x i8]* %15 to i8*
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.6, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%30 = load i32, i32* %4
%31 = icmp slt i32 %30, 2
br i1 %31, label %32, label %37
32: ; preds = %2
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 0
%35 = load i8*, i8** %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8* %35)
store i32 0, i32* %3
br label %111
37: ; preds = %2
%38 = load i32, i32* %4
%39 = icmp sgt i32 %38, 1
br i1 %39, label %40, label %52
40: ; preds = %37
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %40
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 0
%49 = load i8*, i8** %48
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8* %49)
store i32 0, i32* %3
br label %111
51: ; preds = %40
br label %52
52: ; preds = %51, %37
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%54 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32* %54, i32** %6
%55 = icmp eq i32* %54, null
br i1 %55, label %56, label %59
56: ; preds = %52
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%58 = load i32, i32* @EXIT_FAILURE
store i32 %58, i32* %3
br label %111
59: ; preds = %52
%60 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
store i32* %60, i32** %7
%61 = icmp eq i32* %60, null
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%64 = load i32, i32* @EXIT_FAILURE
store i32 %64, i32* %3
br label %111
65: ; preds = %59
%66 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0))
br label %67
67: ; preds = %101, %65
%68 = load i32*, i32** %6
%69 = call i32 @feof(i32* %68)
%70 = icmp ne i32 %69, 0
%71 = xor i1 %70, true
br i1 %71, label %72, label %102
72: ; preds = %67
%73 = load i32*, i32** %6
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%76 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%77 = getelementptr inbounds [10 x i8], [10 x i8]* %13, i64 0, i64 0
%78 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%79 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%80 = call i32 @fscanf(i32* %73, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0), i8* %74, i8* %75, i8* %76, i8* %77, i8* %78, i8* %79)
%81 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%82 = load i8*, i8** %9
%83 = call i8* @crypt(i8* %81, i8* %82)
store i8* %83, i8** %8
%84 = icmp eq i8* %83, null
br i1 %84, label %85, label %88
85: ; preds = %72
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0))
%87 = load i32, i32* @EXIT_FAILURE
store i32 %87, i32* %3
br label %111
88: ; preds = %72
%89 = load i32*, i32** %6
%90 = call i32 @feof(i32* %89)
%91 = icmp ne i32 %90, 0
br i1 %91, label %101, label %92
92: ; preds = %88
%93 = load i32*, i32** %7
%94 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%95 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%96 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%97 = getelementptr inbounds [10 x i8], [10 x i8]* %13, i64 0, i64 0
%98 = load i8*, i8** %8
%99 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%100 = call i32 @fprintf(i32* %93, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i8* %94, i8* %95, i8* %96, i8* %97, i8* %98, i8* %99)
br label %101
101: ; preds = %92, %88
br label %67
102: ; preds = %67
%103 = load i32*, i32** %6
%104 = call i32 @fclose(i32* %103)
%105 = load i32*, i32** %7
%106 = call i32 @fclose(i32* %105)
%107 = call i32 @remove(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%108 = call i32 @rename(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0))
%110 = load i32, i32* @EXIT_SUCCESS
store i32 %110, i32* %3
br label %111
111: ; preds = %102, %85, %62, %56, %46, %32
%112 = load i32, i32* %3
ret i32 %112
}

LLVM IR (-O2):
@.str = [7 x i8] c"8fei3k\00"
@.str.9 = [22 x i8] c"Syntax: %s -convert\0A\0A\00"
@.str.10 = [9 x i8] c"-convert\00"
@.str.12 = [16 x i8] c"dat/userlist.db\00"
@.str.13 = [2 x i8] c"r\00"
@.str.14 = [29 x i8] c"\0ACan't open %s for reading!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.15 = [12 x i8] c"dat/temp.db\00"
@.str.16 = [3 x i8] c"wt\00"
@.str.17 = [29 x i8] c"\0ACan't open %s for writing!\0A\00"
@.str.18 = [33 x i8] c"cp dat/userlist.db dat/backup.db\00"
@.str.19 = [22 x i8] c"%s %s %s %s %s %[^\0A]s\00"
@.str.21 = [19 x i8] c"%s %s %s %s %s %s\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [47 x i8] c"\0ADarkbot USERLIST.DB < 7f0 conversion utility.\00"
@str.23 = [25 x i8] c"IMPORTANT :: READ THIS!\0A\00"
@str.24 = [58 x i8] c"This UTILITY is for converting *OLD* (pre 7f0) userlist's\00"
@str.25 = [30 x i8] c"to the new encrypted format.\0A\00"
@str.26 = [26 x i8] c"Use this utility ONLY if:\00"
@str.27 = [69 x i8] c" - You have copied your pre 7f0 userlist.db in to the dat directory\0A\00"
@str.28 = [28 x i8] c"DO NOT use this utility if:\00"
@str.29 = [60 x i8] c" - You have created a brand new darkbot, and have no users\0A\00"
@str.30 = [15 x i8] c"Converting ...\00"
@str.31 = [21 x i8] c"Conversion Complete.\00"
@str.32 = [15 x i8] c"\0Acrypt() error\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [10 x i8]
%6 = alloca [10 x i8]
%7 = alloca [1024 x i8]
%8 = alloca [1024 x i8]
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.23, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.24, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.25, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.26, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.27, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.28, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.29, i64 0, i64 0))
%23 = icmp slt i32 %0, 2
br i1 %23, label %24, label %27
24: ; preds = %2
%25 = load i8*, i8** %1
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8* %25)
br label %74
27: ; preds = %2
%28 = getelementptr inbounds i8*, i8** %1, i64 1
%29 = load i8*, i8** %28
%30 = tail call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %27
%33 = load i8*, i8** %1
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8* %33)
br label %74
35: ; preds = %27
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.30, i64 0, i64 0))
%37 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%38 = icmp eq i32* %37, null
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%41 = load i32, i32* @EXIT_FAILURE
br label %74
42: ; preds = %35
%43 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%44 = icmp eq i32* %43, null
br i1 %44, label %45, label %48
45: ; preds = %42
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%47 = load i32, i32* @EXIT_FAILURE
br label %74
48: ; preds = %42
%49 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0))
%50 = call i32 @feof(i32* %37)
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %67
52: ; preds = %48, %64
%53 = call i32 @fscanf(i32* %37, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12, i8* %13, i8* %14)
%54 = call i8* @crypt(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%55 = icmp eq i8* %54, null
br i1 %55, label %56, label %59
56: ; preds = %52
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.32, i64 0, i64 0))
%58 = load i32, i32* @EXIT_FAILURE
br label %74
59: ; preds = %52
%60 = call i32 @feof(i32* %37)
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 @fprintf(i32* %43, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12, i8* %54, i8* %14)
br label %64
64: ; preds = %62, %59
%65 = call i32 @feof(i32* %37)
%66 = icmp eq i32 %65, 0
br i1 %66, label %52, label %67
67: ; preds = %64, %48
%68 = call i32 @fclose(i32* %37)
%69 = call i32 @fclose(i32* %43)
%70 = call i32 @remove(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%71 = call i32 @rename(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%72 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.31, i64 0, i64 0))
%73 = load i32, i32* @EXIT_SUCCESS
br label %74
74: ; preds = %67, %56, %45, %39, %32, %24
%75 = phi i32 [ 0, %24 ], [ 0, %32 ], [ %41, %39 ], [ %47, %45 ], [ %58, %56 ], [ %73, %67 ]
ret i32 %75
}