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

/* Variables and functions */
int /*<<< orphan*/ addapessid(unsigned long long, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int fgetline(int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getwpapskfmt(int, char *);
scalar_t__ memcmp(char *, char *, int);
int /*<<< orphan*/ printf(char *, unsigned long long, int, char *);
int /*<<< orphan*/ stderr;
unsigned long long strtoull(char *, char **, int);
void readjohnfile(char *johnname) {
  static int len;
  static int aktread = 1;
  static int essidlen;
  static int macp;
  static char *macaddrstop = NULL;
  static unsigned long long int macaddr;
  static FILE *fh_file;
  static char linein[1024];
  if ((fh_file = fopen(johnname, "r")) == NULL) {
    fprintf(stderr, "opening hash file failed %s\n", johnname);
    return;
  }
  while (1) {
    if ((len = fgetline(fh_file, 1024, linein)) == -1)
      break;
    if (len < 475) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    essidlen = getwpapskfmt(len, linein);
    if (essidlen == 0) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    if (essidlen < 2) {
      aktread++;
      continue;
    }
    essidlen--;
    if (memcmp(linein, &linein[essidlen + 9], essidlen) != 0) {
      aktread++;
      continue;
    }
    macp = (essidlen * 2) + 10;
    while ((macp < essidlen) || (linein[macp] != ':')) {
      macp++;
    }
    if ((linein[macp + 18] != ':') || (linein[macp + 36] != ':') ||
        (linein[macp + 49] != ':')) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    macaddr = strtoull(linein + macp + 37, &macaddrstop, 16);
    if ((macaddrstop - linein) != (macp + 49)) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    printf("%llx %.*s\n", macaddr, essidlen, linein);
    addapessid(macaddr, essidlen, (uint8_t *)linein);
    aktread++;
  }
  fclose(fh_file);
  return;
}


x86 assembly (clang, -O0):
<readjohnfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe59(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x2eed(%rip)
cmp    $0x0,%rax
jne    11dd <readjohnfile+0x4d>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe31(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    150c <readjohnfile+0x37c>
jmp    11e2 <readjohnfile+0x52>
mov    0x2eb7(%rip),%rdi
mov    $0x400,%esi
lea    0x2ebb(%rip),%rdx
call   1040 <fgetline@plt>
mov    %eax,0x2e80(%rip)
cmp    $0xffffffff,%eax
jne    120e <readjohnfile+0x7e>
jmp    1500 <readjohnfile+0x370>
cmpl   $0x1db,0x2e68(%rip)
jge    1256 <readjohnfile+0xc6>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
mov    0x2e3b(%rip),%edx
lea    0xdeb(%rip),%rsi
lea    0x2e75(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2e20(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2e17(%rip)
jmp    11e2 <readjohnfile+0x52>
mov    0x2e24(%rip),%edi
lea    0x2e4d(%rip),%rsi
call   1030 <getwpapskfmt@plt>
mov    %eax,0x2e16(%rip)
cmpl   $0x0,0x2e0f(%rip)
jne    12b3 <readjohnfile+0x123>
mov    0x2d5e(%rip),%rax
mov    (%rax),%edi
mov    0x2dde(%rip),%edx
lea    0xd8e(%rip),%rsi
lea    0x2e18(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2dc3(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2dba(%rip)
jmp    11e2 <readjohnfile+0x52>
cmpl   $0x2,0x2dca(%rip)
jge    12d4 <readjohnfile+0x144>
mov    0x2da2(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d99(%rip)
jmp    11e2 <readjohnfile+0x52>
mov    0x2daa(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2da1(%rip)
mov    0x2d9b(%rip),%eax
add    $0x9,%eax
cltq
lea    0x2dbb(%rip),%rsi
add    %rax,%rsi
mov    0x2d86(%rip),%edx
lea    0x2dab(%rip),%rdi
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     1328 <readjohnfile+0x198>
mov    0x2d4e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d45(%rip)
jmp    11e2 <readjohnfile+0x52>
mov    0x2d56(%rip),%eax
shl    $0x1,%eax
add    $0xa,%eax
mov    %eax,0x2d4e(%rip)
mov    0x2d48(%rip),%ecx
mov    $0x1,%al
cmp    0x2d3c(%rip),%ecx
mov    %al,-0x9(%rbp)
jl     136c <readjohnfile+0x1dc>
movslq 0x2d30(%rip),%rcx
lea    0x2d51(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    137c <readjohnfile+0x1ec>
jmp    1390 <readjohnfile+0x200>
mov    0x2d06(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2cfd(%rip)
jmp    133a <readjohnfile+0x1aa>
mov    0x2cf2(%rip),%eax
add    $0x12,%eax
movslq %eax,%rcx
lea    0x2d0d(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
jne    13f0 <readjohnfile+0x260>
mov    0x2cd2(%rip),%eax
add    $0x24,%eax
movslq %eax,%rcx
lea    0x2ced(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
jne    13f0 <readjohnfile+0x260>
mov    0x2cb2(%rip),%eax
add    $0x31,%eax
movslq %eax,%rcx
lea    0x2ccd(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
je     1428 <readjohnfile+0x298>
mov    0x2be9(%rip),%rax
mov    (%rax),%edi
mov    0x2c69(%rip),%edx
lea    0xc19(%rip),%rsi
lea    0x2ca3(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2c4e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2c45(%rip)
jmp    11e2 <readjohnfile+0x52>
movslq 0x2c59(%rip),%rax
lea    0x2c7a(%rip),%rdi
add    %rax,%rdi
add    $0x25,%rdi
lea    0x2c4c(%rip),%rsi
mov    $0x10,%edx
call   1080 <strtoull@plt>
mov    %rax,0x2c43(%rip)
mov    0x2c34(%rip),%rax
lea    0x2c4d(%rip),%rcx
sub    %rcx,%rax
mov    0x2c1c(%rip),%ecx
add    $0x31,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
je     14b3 <readjohnfile+0x323>
mov    0x2b5e(%rip),%rax
mov    (%rax),%edi
mov    0x2bde(%rip),%edx
lea    0xb8e(%rip),%rsi
lea    0x2c18(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2bc3(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2bba(%rip)
jmp    11e2 <readjohnfile+0x52>
mov    0x2bde(%rip),%rsi
mov    0x2bc4(%rip),%edx
lea    0xb79(%rip),%rdi
lea    0x2be2(%rip),%rcx
call   1060 <printf@plt>
mov    0x2bbe(%rip),%rdi
mov    0x2ba4(%rip),%esi
lea    0x2bc9(%rip),%rdx
call   10a0 <addapessid@plt>
mov    0x2b76(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2b6d(%rip)
jmp    11e2 <readjohnfile+0x52>
mov    0x2b99(%rip),%rdi
call   1050 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readjohnfile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xe5b(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x2ee7(%rip)
test   %rax,%rax
je     1396 <readjohnfile+0x206>
lea    0x2edf(%rip),%r13
mov    %rax,%rdi
mov    $0x400,%esi
mov    %r13,%rdx
call   1040 <fgetline@plt>
cmp    $0xffffffff,%eax
je     137c <readjohnfile+0x1ec>
movabs $0x100000000,%rbx
mov    0x2df5(%rip),%rbp
lea    0xe2d(%rip),%r14
movabs $0x2400000000,%r15
movabs $0x3100000000,%r12
jmp    124a <readjohnfile+0xba>
nopl   0x0(%rax,%rax,1)
mov    0x0(%rbp),%edi
mov    0x2e4f(%rip),%edx
mov    %r14,%rsi
mov    %r13,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
addl   $0x1,0x2e3b(%rip)
mov    0x2e64(%rip),%rdi
mov    $0x400,%esi
mov    %r13,%rdx
call   1040 <fgetline@plt>
cmp    $0xffffffff,%eax
je     137c <readjohnfile+0x1ec>
cmp    $0x1da,%eax
jle    1210 <readjohnfile+0x80>
mov    %eax,%edi
mov    %r13,%rsi
call   1030 <getwpapskfmt@plt>
mov    %eax,0x2e1f(%rip)
test   %eax,%eax
je     1210 <readjohnfile+0x80>
cmp    $0x2,%eax
jl     1226 <readjohnfile+0x96>
lea    -0x1(%rax),%edx
mov    %edx,0x2e0d(%rip)
mov    %eax,%eax
lea    (%rax,%r13,1),%rsi
add    $0x8,%rsi
mov    %r13,%rdi
call   1070 <memcmp@plt>
test   %rax,%rax
jne    1226 <readjohnfile+0x96>
movslq 0x2def(%rip),%rsi
lea    (%rsi,%rsi,1),%eax
add    $0xa,%eax
cltq
mov    %rax,%rcx
shl    $0x20,%rcx
movabs $0x1200000000,%rdx
lea    (%rcx,%rdx,1),%rdi
lea    (%rcx,%r15,1),%rdx
add    %r12,%rcx
jmp    12cd <readjohnfile+0x13d>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
add    %rbx,%rdi
add    %rbx,%rdx
add    %rbx,%rcx
cmp    %rsi,%rax
jl     12c0 <readjohnfile+0x130>
cmpb   $0x3a,(%rax,%r13,1)
jne    12c0 <readjohnfile+0x130>
mov    %eax,0x2da5(%rip)
sar    $0x20,%rdi
cmpb   $0x3a,(%rdi,%r13,1)
jne    1210 <readjohnfile+0x80>
sar    $0x20,%rdx
cmpb   $0x3a,(%rdx,%r13,1)
jne    1210 <readjohnfile+0x80>
sar    $0x20,%rcx
cmpb   $0x3a,(%rcx,%r13,1)
jne    1210 <readjohnfile+0x80>
lea    (%rax,%r13,1),%rdi
add    $0x25,%rdi
lea    0x2d6d(%rip),%rsi
mov    $0x10,%edx
call   1080 <strtoull@plt>
mov    %rax,0x2d64(%rip)
mov    0x2d55(%rip),%rcx
sub    %r13,%rcx
movslq 0x2d47(%rip),%rdx
add    $0x31,%rdx
cmp    %rdx,%rcx
jne    1210 <readjohnfile+0x80>
mov    0x2d30(%rip),%edx
lea    0xce9(%rip),%rdi
mov    %rax,%rsi
mov    %r13,%rcx
call   1060 <printf@plt>
mov    0x2d27(%rip),%rdi
mov    0x2d11(%rip),%esi
mov    %r13,%rdx
call   10a0 <addapessid@plt>
jmp    1226 <readjohnfile+0x96>
mov    0x2d15(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fclose@plt>
mov    0x2c43(%rip),%rax
mov    (%rax),%edi
lea    0xc5c(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <fprintf@plt>

LLVM IR (-O0):
@readjohnfile.len = internal global i32 0
@readjohnfile.aktread = internal global i32 1
@readjohnfile.essidlen = internal global i32 0
@readjohnfile.macp = internal global i32 0
@readjohnfile.macaddrstop = internal global i8* null
@readjohnfile.macaddr = internal global i64 0
@readjohnfile.fh_file = internal global i32* null
@readjohnfile.linein = internal global [1024 x i8] zeroinitializer
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"opening hash file failed %s\0A\00"
@.str.2 = [33 x i8] c"reading hash line %d failed: %s\0A\00"
@.str.3 = [11 x i8] c"%llx %.*s\0A\00"
define void @readjohnfile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %4, i32** @readjohnfile.fh_file
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %2
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %136
10: ; preds = %1
br label %11
11: ; preds = %10, %19, %30, %39, %52, %99, %118, %124
%12 = load i32*, i32** @readjohnfile.fh_file
%13 = call i32 @fgetline(i32* %12, i32 1024, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
store i32 %13, i32* @readjohnfile.len
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %11
br label %133
16: ; preds = %11
%17 = load i32, i32* @readjohnfile.len
%18 = icmp slt i32 %17, 475
br i1 %18, label %19, label %25
19: ; preds = %16
%20 = load i32, i32* @stderr
%21 = load i32, i32* @readjohnfile.aktread
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %21, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%23 = load i32, i32* @readjohnfile.aktread
%24 = add nsw i32 %23, 1
store i32 %24, i32* @readjohnfile.aktread
br label %11
25: ; preds = %16
%26 = load i32, i32* @readjohnfile.len
%27 = call i32 @getwpapskfmt(i32 %26, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
store i32 %27, i32* @readjohnfile.essidlen
%28 = load i32, i32* @readjohnfile.essidlen
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %36
30: ; preds = %25
%31 = load i32, i32* @stderr
%32 = load i32, i32* @readjohnfile.aktread
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %32, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%34 = load i32, i32* @readjohnfile.aktread
%35 = add nsw i32 %34, 1
store i32 %35, i32* @readjohnfile.aktread
br label %11
36: ; preds = %25
%37 = load i32, i32* @readjohnfile.essidlen
%38 = icmp slt i32 %37, 2
br i1 %38, label %39, label %42
39: ; preds = %36
%40 = load i32, i32* @readjohnfile.aktread
%41 = add nsw i32 %40, 1
store i32 %41, i32* @readjohnfile.aktread
br label %11
42: ; preds = %36
%43 = load i32, i32* @readjohnfile.essidlen
%44 = add nsw i32 %43, -1
store i32 %44, i32* @readjohnfile.essidlen
%45 = load i32, i32* @readjohnfile.essidlen
%46 = add nsw i32 %45, 9
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %47
%49 = load i32, i32* @readjohnfile.essidlen
%50 = call i64 @memcmp(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0), i8* %48, i32 %49)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %42
%53 = load i32, i32* @readjohnfile.aktread
%54 = add nsw i32 %53, 1
store i32 %54, i32* @readjohnfile.aktread
br label %11
55: ; preds = %42
%56 = load i32, i32* @readjohnfile.essidlen
%57 = mul nsw i32 %56, 2
%58 = add nsw i32 %57, 10
store i32 %58, i32* @readjohnfile.macp
br label %59
59: ; preds = %72, %55
%60 = load i32, i32* @readjohnfile.macp
%61 = load i32, i32* @readjohnfile.essidlen
%62 = icmp slt i32 %60, %61
br i1 %62, label %70, label %63
63: ; preds = %59
%64 = load i32, i32* @readjohnfile.macp
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %65
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp ne i32 %68, 58
br label %70
70: ; preds = %63, %59
%71 = phi i1 [ true, %59 ], [ %69, %63 ]
br i1 %71, label %72, label %75
72: ; preds = %70
%73 = load i32, i32* @readjohnfile.macp
%74 = add nsw i32 %73, 1
store i32 %74, i32* @readjohnfile.macp
br label %59
75: ; preds = %70
%76 = load i32, i32* @readjohnfile.macp
%77 = add nsw i32 %76, 18
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %78
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp ne i32 %81, 58
br i1 %82, label %99, label %83
83: ; preds = %75
%84 = load i32, i32* @readjohnfile.macp
%85 = add nsw i32 %84, 36
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %86
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = icmp ne i32 %89, 58
br i1 %90, label %99, label %91
91: ; preds = %83
%92 = load i32, i32* @readjohnfile.macp
%93 = add nsw i32 %92, 49
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %94
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = icmp ne i32 %97, 58
br i1 %98, label %99, label %105
99: ; preds = %91, %83, %75
%100 = load i32, i32* @stderr
%101 = load i32, i32* @readjohnfile.aktread
%102 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %101, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%103 = load i32, i32* @readjohnfile.aktread
%104 = add nsw i32 %103, 1
store i32 %104, i32* @readjohnfile.aktread
br label %11
105: ; preds = %91
%106 = load i32, i32* @readjohnfile.macp
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0), i64 %107
%109 = getelementptr inbounds i8, i8* %108, i64 37
%110 = call i64 @strtoull(i8* %109, i8** @readjohnfile.macaddrstop, i32 16)
store i64 %110, i64* @readjohnfile.macaddr
%111 = load i8*, i8** @readjohnfile.macaddrstop
%112 = ptrtoint i8* %111 to i64
%113 = sub i64 %112, ptrtoint ([1024 x i8]* @readjohnfile.linein to i64)
%114 = load i32, i32* @readjohnfile.macp
%115 = add nsw i32 %114, 49
%116 = sext i32 %115 to i64
%117 = icmp ne i64 %113, %116
br i1 %117, label %118, label %124
118: ; preds = %105
%119 = load i32, i32* @stderr
%120 = load i32, i32* @readjohnfile.aktread
%121 = call i32 (i32, i8*, ...) @fprintf(i32 %119, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %120, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%122 = load i32, i32* @readjohnfile.aktread
%123 = add nsw i32 %122, 1
store i32 %123, i32* @readjohnfile.aktread
br label %11
124: ; preds = %105
%125 = load i64, i64* @readjohnfile.macaddr
%126 = load i32, i32* @readjohnfile.essidlen
%127 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64 %125, i32 %126, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%128 = load i64, i64* @readjohnfile.macaddr
%129 = load i32, i32* @readjohnfile.essidlen
%130 = call i32 @addapessid(i64 %128, i32 %129, i32* bitcast ([1024 x i8]* @readjohnfile.linein to i32*))
%131 = load i32, i32* @readjohnfile.aktread
%132 = add nsw i32 %131, 1
store i32 %132, i32* @readjohnfile.aktread
br label %11
133: ; preds = %15
%134 = load i32*, i32** @readjohnfile.fh_file
%135 = call i32 @fclose(i32* %134)
br label %136
136: ; preds = %133, %6
ret void
}

LLVM IR (-O2):
@readjohnfile.aktread = internal unnamed_addr global i32 1
@readjohnfile.essidlen = internal unnamed_addr global i32 0
@readjohnfile.macp = internal unnamed_addr global i32 0
@readjohnfile.macaddrstop = internal global i8* null
@readjohnfile.macaddr = internal unnamed_addr global i64 0
@readjohnfile.fh_file = internal unnamed_addr global i32* null
@readjohnfile.linein = internal global [1024 x i8] zeroinitializer
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"opening hash file failed %s\0A\00"
@.str.2 = [33 x i8] c"reading hash line %d failed: %s\0A\00"
@.str.3 = [11 x i8] c"%llx %.*s\0A\00"
define void @readjohnfile(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %2, i32** @readjohnfile.fh_file
%3 = icmp eq i32* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @fgetline(i32* %2, i32 1024, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%6 = icmp eq i32 %5, -1
br i1 %6, label %101, label %10
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %104
10: ; preds = %4, %95
%11 = phi i32 [ %99, %95 ], [ %5, %4 ]
%12 = icmp slt i32 %11, 475
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* @stderr
%15 = load i32, i32* @readjohnfile.aktread
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %15, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
br label %95
17: ; preds = %10
%18 = tail call i32 @getwpapskfmt(i32 %11, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
store i32 %18, i32* @readjohnfile.essidlen
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* @stderr
%22 = load i32, i32* @readjohnfile.aktread
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %22, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
br label %95
24: ; preds = %17
%25 = icmp slt i32 %18, 2
br i1 %25, label %95, label %26
26: ; preds = %24
%27 = add nsw i32 %18, -1
store i32 %27, i32* @readjohnfile.essidlen
%28 = add nuw nsw i32 %18, 8
%29 = zext i32 %28 to i64
%30 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %29
%31 = tail call i64 @memcmp(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0), i8* %30, i32 %27)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %95
33: ; preds = %26
%34 = load i32, i32* @readjohnfile.essidlen
%35 = shl nsw i32 %34, 1
%36 = add i32 %35, 10
%37 = sext i32 %36 to i64
%38 = sext i32 %34 to i64
br label %39
39: ; preds = %46, %33
%40 = phi i64 [ %47, %46 ], [ %37, %33 ]
%41 = icmp slt i64 %40, %38
br i1 %41, label %46, label %42
42: ; preds = %39
%43 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %40
%44 = load i8, i8* %43
%45 = icmp eq i8 %44, 58
br i1 %45, label %48, label %46
46: ; preds = %39, %42
%47 = add i64 %40, 1
br label %39
48: ; preds = %42
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %40
%50 = trunc i64 %40 to i32
store i32 %50, i32* @readjohnfile.macp
%51 = shl i64 %40, 32
%52 = add i64 %51, 77309411328
%53 = ashr exact i64 %52, 32
%54 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 58
br i1 %56, label %57, label %71
57: ; preds = %48
%58 = shl i64 %40, 32
%59 = add i64 %58, 154618822656
%60 = ashr exact i64 %59, 32
%61 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = icmp eq i8 %62, 58
br i1 %63, label %64, label %71
64: ; preds = %57
%65 = shl i64 %40, 32
%66 = add i64 %65, 210453397504
%67 = ashr exact i64 %66, 32
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = icmp eq i8 %69, 58
br i1 %70, label %75, label %71
71: ; preds = %64, %57, %48
%72 = load i32, i32* @stderr
%73 = load i32, i32* @readjohnfile.aktread
%74 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %73, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
br label %95
75: ; preds = %64
%76 = getelementptr inbounds i8, i8* %49, i64 37
%77 = tail call i64 @strtoull(i8* %76, i8** @readjohnfile.macaddrstop, i32 16)
store i64 %77, i64* @readjohnfile.macaddr
%78 = load i8*, i8** @readjohnfile.macaddrstop
%79 = ptrtoint i8* %78 to i64
%80 = sub i64 %79, ptrtoint ([1024 x i8]* @readjohnfile.linein to i64)
%81 = load i32, i32* @readjohnfile.macp
%82 = add nsw i32 %81, 49
%83 = sext i32 %82 to i64
%84 = icmp eq i64 %80, %83
br i1 %84, label %89, label %85
85: ; preds = %75
%86 = load i32, i32* @stderr
%87 = load i32, i32* @readjohnfile.aktread
%88 = tail call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %87, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
br label %95
89: ; preds = %75
%90 = load i32, i32* @readjohnfile.essidlen
%91 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64 %77, i32 %90, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%92 = load i64, i64* @readjohnfile.macaddr
%93 = load i32, i32* @readjohnfile.essidlen
%94 = tail call i32 @addapessid(i64 %92, i32 %93, i32* bitcast ([1024 x i8]* @readjohnfile.linein to i32*))
br label %95
95: ; preds = %26, %24, %89, %85, %71, %20, %13
%96 = load i32, i32* @readjohnfile.aktread
%97 = add nsw i32 %96, 1
store i32 %97, i32* @readjohnfile.aktread
%98 = load i32*, i32** @readjohnfile.fh_file
%99 = tail call i32 @fgetline(i32* %98, i32 1024, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @readjohnfile.linein, i64 0, i64 0))
%100 = icmp eq i32 %99, -1
br i1 %100, label %101, label %10
101: ; preds = %95, %4
%102 = load i32*, i32** @readjohnfile.fh_file
%103 = tail call i32 @fclose(i32* %102)
br label %104
104: ; preds = %101, %7
ret void
}