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

/* Variables and functions */
int FILENAME_MAX;
scalar_t__ ed2k_link(char *, char *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ file_exist(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ *getcwd(char *, int);
int getopt(int, char **, char *);
int is_directory(char *);
int /*<<< orphan*/ isprint(float);
int /*<<< orphan*/ memset(char *, int, int);
char *optarg;
scalar_t__ opterr;
float optopt;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  FILE *ed2k_file;
  int fflag = 0;
  char *fvalue = NULL;
  int c;
  char cwd[FILENAME_MAX];
  char ed2k_hash[33];
  opterr = 0;
  while ((c = getopt(argc, argv, "f:")) != -1) {
    switch (c) {
    case 'f':
      fvalue = optarg;
      fflag = 1;
      break;
    case '?':
      if (optopt == 'f') {
        fprintf(stderr, "-f need a file name\n");
        fvalue = " ";
      } else if (isprint(optopt)) {
        fprintf(stderr, "-%c unknown option\n", optopt);
        fvalue = " ";
      } else {
        fprintf(stderr, "Unknown char %c\n", optopt);
        fvalue = " ";
      }
      return 1;
    default:
      exit(0);
    }
  }
  printf("fflag = %d, fvalue = %s\n", fflag, fvalue);
  if (file_exist(fvalue) != 0) {
    fprintf(stderr, "File does not exist: %s\n", fvalue);
    return -1;
  }
  if (is_directory(fvalue) == 1) {
    fprintf(stderr, "No working on directories");
    return -1;
  }
  if (getcwd(cwd, sizeof(cwd)) != NULL) {
    fprintf(stderr, strerror(errno));
  }
  memset(ed2k_hash, 0x00, 33 * sizeof(char));
  if (ed2k_link(fvalue, ed2k_hash)) {
    printf("\nhash value: %s\n", ed2k_hash);
  } else {
    printf("\n\nError\n\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
mov    0x2df9(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x88(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    0x2da6(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xddd(%rip),%rdx
call   10b0 <getopt@plt>
mov    %eax,-0x2c(%rbp)
cmp    $0xffffffff,%eax
je     136a <main+0x1ba>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
sub    $0x3f,%eax
je     127d <main+0xcd>
jmp    124f <main+0x9f>
mov    -0x8c(%rbp),%eax
sub    $0x66,%eax
jne    135e <main+0x1ae>
jmp    1263 <main+0xb3>
mov    0x2d8e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x1c(%rbp)
jmp    1365 <main+0x1b5>
mov    0x2d5c(%rip),%rax
movss  (%rax),%xmm0
movss  0xd70(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    12c6 <main+0x116>
jp     12c6 <main+0x116>
mov    0x2d22(%rip),%rax
mov    (%rax),%edi
lea    0xd58(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
lea    0xd5f(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    134b <main+0x19b>
mov    0x2d13(%rip),%rax
movss  (%rax),%xmm0
call   1090 <isprint@plt>
cmp    $0x0,%eax
je     1315 <main+0x165>
mov    0x2ce2(%rip),%rax
mov    (%rax),%edi
mov    0x2cf1(%rip),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd20(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    0xd10(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1346 <main+0x196>
mov    0x2cac(%rip),%rax
mov    (%rax),%edi
mov    0x2cbb(%rip),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcfe(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    0xcda(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    134b <main+0x19b>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x74(%rbp)
jmp    149f <main+0x2ef>
xor    %edi,%edi
call   10c0 <exit@plt>
jmp    1219 <main+0x69>
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rdx
lea    0xccb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1080 <file_exist@plt>
cmp    $0x0,%rax
je     13c0 <main+0x210>
mov    0x2c2f(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xcb6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x74(%rbp)
jmp    149f <main+0x2ef>
mov    -0x28(%rbp),%rdi
call   10a0 <is_directory@plt>
cmp    $0x1,%eax
jne    13fc <main+0x24c>
mov    0x2bef(%rip),%rax
mov    (%rax),%edi
lea    0xc93(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x74(%rbp)
jmp    149f <main+0x2ef>
mov    -0x80(%rbp),%rdi
mov    -0x88(%rbp),%rax
mov    %eax,%esi
call   1050 <getcwd@plt>
cmp    $0x0,%rax
je     1445 <main+0x295>
mov    0x2ba9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x90(%rbp)
mov    0x2b92(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    -0x90(%rbp),%edi
mov    %rax,%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x21,%edx
call   1040 <memset@plt>
mov    -0x28(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1070 <ed2k_link@plt>
cmp    $0x0,%rax
je     1483 <main+0x2d3>
lea    -0x70(%rbp),%rsi
lea    0xc18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1491 <main+0x2e1>
lea    0xc16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x74(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r13
mov    %edi,%r12d
mov    0x2dfa(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rax,-0x38(%rbp)
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    0x2db8(%rip),%rax
movq   $0x0,(%rax)
xor    %ebx,%ebx
lea    0xdf4(%rip),%r15
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12d,%edi
mov    %r13,%rsi
mov    %r15,%rdx
call   10c0 <getopt@plt>
cmp    $0x66,%eax
jne    1245 <main+0x85>
mov    0x2dbe(%rip),%rax
mov    (%rax),%rbx
mov    $0x1,%r14d
jmp    1220 <main+0x60>
cmp    $0xffffffff,%eax
je     1285 <main+0xc5>
cmp    $0x3f,%eax
jne    13c9 <main+0x209>
mov    0x2d86(%rip),%rbx
movss  (%rbx),%xmm0
ucomiss 0xd9b(%rip),%xmm0
jne    12cb <main+0x10b>
jp     12cb <main+0x10b>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
lea    0xd8e(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    13a3 <main+0x1e3>
lea    0xdb5(%rip),%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1090 <file_exist@plt>
test   %rax,%rax
je     12f5 <main+0x135>
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
lea    0xda4(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%r14d
jmp    13a9 <main+0x1e9>
call   10a0 <isprint@plt>
mov    0x2cf1(%rip),%rcx
mov    (%rcx),%edi
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
test   %eax,%eax
je     1395 <main+0x1d5>
lea    0xd2c(%rip),%rsi
jmp    139c <main+0x1dc>
mov    %rbx,%rdi
call   10b0 <is_directory@plt>
cmp    $0x1,%eax
jne    1324 <main+0x164>
mov    0x2cbf(%rip),%rax
mov    (%rax),%edi
lea    0xd61(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%r14d
jmp    13a9 <main+0x1e9>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1060 <getcwd@plt>
test   %rax,%rax
je     135b <main+0x19b>
mov    0x2c8b(%rip),%rax
mov    (%rax),%r14d
mov    0x2c79(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    %r14d,%edi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    -0x60(%rbp),%r15
xor    %r14d,%r14d
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x21,%edx
call   1050 <memset@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1080 <ed2k_link@plt>
test   %rax,%rax
je     13bb <main+0x1fb>
lea    0xd05(%rip),%rdi
lea    -0x60(%rbp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    13a9 <main+0x1e9>
lea    0xc94(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    $0x1,%r14d
mov    %r14d,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcdc(%rip),%rdi
call   1030 <puts@plt>
jmp    13a9 <main+0x1e9>
xor    %edi,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@FILENAME_MAX = global i32 0
@opterr = global i64 0
@.str = [3 x i8] c"f:\00"
@optarg = global i8* null
@optopt = global float 0.000000e+00
@stderr = global i32 0
@.str.1 = [21 x i8] c"-f need a file name\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [20 x i8] c"-%c unknown option\0A\00"
@.str.4 = [17 x i8] c"Unknown char %c\0A\00"
@.str.5 = [25 x i8] c"fflag = %d, fvalue = %s\0A\00"
@.str.6 = [25 x i8] c"File does not exist: %s\0A\00"
@.str.7 = [26 x i8] c"No working on directories\00"
@errno = global i32 0
@.str.8 = [17 x i8] c"\0Ahash value: %s\0A\00"
@.str.9 = [10 x i8] c"\0A\0AError\0A\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*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i64
%12 = alloca [33 x i8]
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i8* null, i8** %8
%14 = load i32, i32* @FILENAME_MAX
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %10
%17 = alloca i8, i64 %15
store i64 %15, i64* %11
store i64 0, i64* @opterr
br label %18
18: ; preds = %51, %2
%19 = load i32, i32* %4
%20 = load i8**, i8*** %5
%21 = call i32 @getopt(i32 %19, i8** %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %21, i32* %9
%22 = icmp ne i32 %21, -1
br i1 %22, label %23, label %52
23: ; preds = %18
%24 = load i32, i32* %9
switch i32 %24, label %49 [
i32 102, label %25
i32 63, label %27
]
25: ; preds = %23
%26 = load i8*, i8** @optarg
store i8* %26, i8** %8
store i32 1, i32* %7
br label %51
27: ; preds = %23
%28 = load float, float* @optopt
%29 = fcmp oeq float %28, 1.020000e+02
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %8
br label %48
33: ; preds = %27
%34 = load float, float* @optopt
%35 = call i32 @isprint(float %34)
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %42
37: ; preds = %33
%38 = load i32, i32* @stderr
%39 = load float, float* @optopt
%40 = fpext float %39 to double
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %40)
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %8
br label %47
42: ; preds = %33
%43 = load i32, i32* @stderr
%44 = load float, float* @optopt
%45 = fpext float %44 to double
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %45)
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %8
br label %47
47: ; preds = %42, %37
br label %48
48: ; preds = %47, %30
store i32 1, i32* %3
store i32 1, i32* %13
br label %92
49: ; preds = %23
%50 = call i32 @exit(i32 0)
unreachable
51: ; preds = %25
br label %18
52: ; preds = %18
%53 = load i32, i32* %7
%54 = load i8*, i8** %8
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %53, i8* %54)
%56 = load i8*, i8** %8
%57 = call i64 @file_exist(i8* %56)
%58 = icmp ne i64 %57, 0
br i1 %58, label %59, label %63
59: ; preds = %52
%60 = load i32, i32* @stderr
%61 = load i8*, i8** %8
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %61)
store i32 -1, i32* %3
store i32 1, i32* %13
br label %92
63: ; preds = %52
%64 = load i8*, i8** %8
%65 = call i32 @is_directory(i8* %64)
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %70
67: ; preds = %63
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %3
store i32 1, i32* %13
br label %92
70: ; preds = %63
%71 = trunc i64 %15 to i32
%72 = call i32* @getcwd(i8* %17, i32 %71)
%73 = icmp ne i32* %72, null
br i1 %73, label %74, label %79
74: ; preds = %70
%75 = load i32, i32* @stderr
%76 = load i32, i32* @errno
%77 = call i8* @strerror(i32 %76)
%78 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* %77)
br label %79
79: ; preds = %74, %70
%80 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%81 = call i32 @memset(i8* %80, i32 0, i32 33)
%82 = load i8*, i8** %8
%83 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%84 = call i64 @ed2k_link(i8* %82, i8* %83)
%85 = icmp ne i64 %84, 0
br i1 %85, label %86, label %89
86: ; preds = %79
%87 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %87)
br label %91
89: ; preds = %79
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
br label %91
91: ; preds = %89, %86
store i32 0, i32* %3
store i32 1, i32* %13
br label %92
92: ; preds = %91, %67, %59, %48
%93 = load i8*, i8** %10
%94 = load i32, i32* %3
ret i32 %94
}

LLVM IR (-O2):
@FILENAME_MAX = global i32 0
@opterr = global i64 0
@.str = [3 x i8] c"f:\00"
@optarg = global i8* null
@optopt = global float 0.000000e+00
@stderr = global i32 0
@.str.1 = [21 x i8] c"-f need a file name\0A\00"
@.str.3 = [20 x i8] c"-%c unknown option\0A\00"
@.str.4 = [17 x i8] c"Unknown char %c\0A\00"
@.str.5 = [25 x i8] c"fflag = %d, fvalue = %s\0A\00"
@.str.6 = [25 x i8] c"File does not exist: %s\0A\00"
@.str.7 = [26 x i8] c"No working on directories\00"
@errno = global i32 0
@.str.8 = [17 x i8] c"\0Ahash value: %s\0A\00"
@str = [9 x i8] c"\0A\0AError\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [33 x i8]
%4 = load i32, i32* @FILENAME_MAX
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = getelementptr inbounds [33 x i8], [33 x i8]* %3, i64 0, i64 0
store i64 0, i64* @opterr
br label %8
8: ; preds = %12, %2
%9 = phi i8* [ null, %2 ], [ %13, %12 ]
%10 = phi i32 [ 0, %2 ], [ 1, %12 ]
%11 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
switch i32 %11, label %30 [
i32 -1, label %32
i32 102, label %12
i32 63, label %14
]
12: ; preds = %8
%13 = load i8*, i8** @optarg
br label %8
14: ; preds = %8
%15 = load float, float* @optopt
%16 = fcmp oeq float %15, 1.020000e+02
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %61
20: ; preds = %14
%21 = tail call i32 @isprint(float %15)
%22 = icmp eq i32 %21, 0
%23 = load i32, i32* @stderr
%24 = load float, float* @optopt
%25 = fpext float %24 to double
br i1 %22, label %28, label %26
26: ; preds = %20
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %25)
br label %61
28: ; preds = %20
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %25)
br label %61
30: ; preds = %8
%31 = tail call i32 @exit(i32 0)
unreachable
32: ; preds = %8
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %10, i8* %9)
%34 = tail call i64 @file_exist(i8* %9)
%35 = icmp eq i64 %34, 0
br i1 %35, label %39, label %36
36: ; preds = %32
%37 = load i32, i32* @stderr
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %9)
br label %61
39: ; preds = %32
%40 = tail call i32 @is_directory(i8* %9)
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %45
42: ; preds = %39
%43 = load i32, i32* @stderr
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %61
45: ; preds = %39
%46 = call i32* @getcwd(i8* %6, i32 %4)
%47 = icmp eq i32* %46, null
br i1 %47, label %53, label %48
48: ; preds = %45
%49 = load i32, i32* @stderr
%50 = load i32, i32* @errno
%51 = call i8* @strerror(i32 %50)
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* %51)
br label %53
53: ; preds = %48, %45
%54 = call i32 @memset(i8* %7, i32 0, i32 33)
%55 = call i64 @ed2k_link(i8* %9, i8* %7)
%56 = icmp eq i64 %55, 0
br i1 %56, label %59, label %57
57: ; preds = %53
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %7)
br label %61
59: ; preds = %53
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %61
61: ; preds = %57, %59, %17, %28, %26, %42, %36
%62 = phi i32 [ -1, %36 ], [ -1, %42 ], [ 1, %26 ], [ 1, %28 ], [ 1, %17 ], [ 0, %59 ], [ 0, %57 ]
ret i32 %62
}