#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 hex2bin(char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ stderr;
unsigned long long strtoull(char *, char **, int);
void readpmkidfile(char *pmkidname) {
  static int len;
  static int aktread = 1;
  static int essidlen;
  static char *macaddrstop = NULL;
  static unsigned long long int macaddr;
  static FILE *fh_file;
  static char linein[255];
  static uint8_t essid[32];
  if ((fh_file = fopen(pmkidname, "r")) == NULL) {
    fprintf(stderr, "opening hash file failed %s\n", pmkidname);
    return;
  }
  while (1) {
    if ((len = fgetline(fh_file, 255, linein)) == -1)
      break;
    if ((len < 61) || ((len > 59 + (32 * 2)))) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    if (((linein[32] != ':') && (linein[45] != ':') && (linein[58] != ':')) &&
        ((linein[32] != '*') && (linein[45] != '*') && (linein[58] != '*'))) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    essidlen = len - 59;
    if ((essidlen % 2) != 0) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    macaddr = strtoull(linein + 33, &macaddrstop, 16);
    if ((macaddrstop - linein) != 45) {
      fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
      aktread++;
      continue;
    }
    if (hex2bin(&linein[59], essid, essidlen / 2) == true)
      addapessid(macaddr, essidlen / 2, essid);
    aktread++;
  }
  fclose(fh_file);
  return;
}


x86 assembly (clang, -O0):
<readpmkidfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe79(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,0x2ef5(%rip)
cmp    $0x0,%rax
jne    11bd <readpmkidfile+0x4d>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe51(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    141f <readpmkidfile+0x2af>
jmp    11c2 <readpmkidfile+0x52>
mov    0x2ebf(%rip),%rdi
mov    $0xff,%esi
lea    0x2ebb(%rip),%rdx
call   1030 <fgetline@plt>
mov    %eax,0x2e90(%rip)
cmp    $0xffffffff,%eax
jne    11ee <readpmkidfile+0x7e>
jmp    1413 <readpmkidfile+0x2a3>
cmpl   $0x3d,0x2e7b(%rip)
jl     1208 <readpmkidfile+0x98>
cmpl   $0x7b,0x2e6e(%rip)
jle    1240 <readpmkidfile+0xd0>
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
mov    0x2e41(%rip),%edx
lea    0xe01(%rip),%rsi
lea    0x2e6b(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2e26(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2e1d(%rip)
jmp    11c2 <readpmkidfile+0x52>
movsbl 0x2e69(%rip),%eax
cmp    $0x3a,%eax
je     12d8 <readpmkidfile+0x168>
movsbl 0x2e66(%rip),%eax
cmp    $0x3a,%eax
je     12d8 <readpmkidfile+0x168>
movsbl 0x2e63(%rip),%eax
cmp    $0x3a,%eax
je     12d8 <readpmkidfile+0x168>
movsbl 0x2e39(%rip),%eax
cmp    $0x2a,%eax
je     12d8 <readpmkidfile+0x168>
movsbl 0x2e36(%rip),%eax
cmp    $0x2a,%eax
je     12d8 <readpmkidfile+0x168>
movsbl 0x2e33(%rip),%eax
cmp    $0x2a,%eax
je     12d8 <readpmkidfile+0x168>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
mov    0x2da9(%rip),%edx
lea    0xd69(%rip),%rsi
lea    0x2dd3(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2d8e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d85(%rip)
jmp    11c2 <readpmkidfile+0x52>
mov    0x2d92(%rip),%eax
sub    $0x3b,%eax
mov    %eax,0x2d8d(%rip)
mov    0x2d87(%rip),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1336 <readpmkidfile+0x1c6>
mov    0x2cdb(%rip),%rax
mov    (%rax),%edi
mov    0x2d4b(%rip),%edx
lea    0xd0b(%rip),%rsi
lea    0x2d75(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2d30(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d27(%rip)
jmp    11c2 <readpmkidfile+0x52>
lea    0x2d53(%rip),%rdi
add    $0x21,%rdi
lea    0x2d30(%rip),%rsi
mov    $0x10,%edx
call   1060 <strtoull@plt>
mov    %rax,0x2d27(%rip)
mov    0x2d18(%rip),%rax
lea    0x2d29(%rip),%rcx
sub    %rcx,%rax
cmp    $0x2d,%rax
je     13ac <readpmkidfile+0x23c>
mov    0x2c65(%rip),%rax
mov    (%rax),%edi
mov    0x2cd5(%rip),%edx
lea    0xc95(%rip),%rsi
lea    0x2cff(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2cba(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2cb1(%rip)
jmp    11c2 <readpmkidfile+0x52>
mov    0x2cc2(%rip),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0x2ccd(%rip),%rdi
add    $0x3b,%rdi
lea    0x2dc2(%rip),%rsi
call   1050 <hex2bin@plt>
cmp    $0x1,%eax
jne    13ff <readpmkidfile+0x28f>
mov    0x2c9d(%rip),%rdi
mov    0x2c8b(%rip),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0x2d96(%rip),%rdx
call   1080 <addapessid@plt>
mov    0x2c53(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2c4a(%rip)
jmp    11c2 <readpmkidfile+0x52>
mov    0x2c6e(%rip),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readpmkidfile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xe7b(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,0x2ef7(%rip)
test   %rax,%rax
je     1305 <readpmkidfile+0x195>
lea    0x2eef(%rip),%rbp
mov    %rax,%rdi
mov    $0xff,%esi
mov    %rbp,%rdx
call   1030 <fgetline@plt>
cmp    $0xffffffff,%eax
je     12eb <readpmkidfile+0x17b>
mov    0x2e1f(%rip),%r13
lea    0xe57(%rip),%r14
lea    0x2ee2(%rip),%r15
lea    0x2ea2(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
lea    -0x7c(%rax),%ecx
cmp    $0xffffffc0,%ecx
jbe    12b0 <readpmkidfile+0x140>
movzbl 0x2ebd(%rip),%ecx
cmp    $0x3a,%cl
je     1223 <readpmkidfile+0xb3>
movzbl 0x2ebe(%rip),%edx
cmp    $0x3a,%dl
je     1223 <readpmkidfile+0xb3>
movzbl 0x2ebf(%rip),%ebx
cmp    $0x3a,%bl
je     1223 <readpmkidfile+0xb3>
cmp    $0x2a,%cl
je     1223 <readpmkidfile+0xb3>
cmp    $0x2a,%dl
je     1223 <readpmkidfile+0xb3>
cmp    $0x2a,%bl
jne    12b0 <readpmkidfile+0x140>
add    $0xffffffc5,%eax
mov    %eax,0x2e44(%rip)
test   $0x1,%al
jne    12b0 <readpmkidfile+0x140>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1060 <strtoull@plt>
mov    %rax,0x2e35(%rip)
mov    0x2e26(%rip),%rax
sub    %rbp,%rax
cmp    $0x2d,%rax
jne    12b0 <readpmkidfile+0x140>
mov    0x2e0f(%rip),%eax
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
sar    %edx
lea    0x2e5a(%rip),%rdi
lea    0x2f18(%rip),%rsi
call   1050 <hex2bin@plt>
cmp    $0x1,%eax
jne    12c7 <readpmkidfile+0x157>
mov    0x2df7(%rip),%rdi
mov    0x2de1(%rip),%eax
mov    %eax,%esi
shr    $0x1f,%esi
add    %eax,%esi
sar    %esi
lea    0x2ef1(%rip),%rdx
call   1080 <addapessid@plt>
jmp    12c7 <readpmkidfile+0x157>
cs nopw 0x0(%rax,%rax,1)
mov    0x0(%r13),%edi
mov    0x2d9e(%rip),%edx
mov    %r14,%rsi
mov    %rbp,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
addl   $0x1,0x2d8a(%rip)
mov    0x2db3(%rip),%rdi
mov    $0xff,%esi
mov    %rbp,%rdx
call   1030 <fgetline@plt>
cmp    $0xffffffff,%eax
jne    11e0 <readpmkidfile+0x70>
mov    0x2d96(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fclose@plt>
mov    0x2cd4(%rip),%rax
mov    (%rax),%edi
lea    0xced(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <fprintf@plt>

LLVM IR (-O0):
@readpmkidfile.len = internal global i32 0
@readpmkidfile.aktread = internal global i32 1
@readpmkidfile.essidlen = internal global i32 0
@readpmkidfile.macaddrstop = internal global i8* null
@readpmkidfile.macaddr = internal global i64 0
@readpmkidfile.fh_file = internal global i32* null
@readpmkidfile.linein = internal global [255 x i8] zeroinitializer
@readpmkidfile.essid = internal global [32 x i32] 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"
define void @readpmkidfile(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** @readpmkidfile.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 %98
10: ; preds = %1
br label %11
11: ; preds = %10, %22, %52, %64, %76, %92
%12 = load i32*, i32** @readpmkidfile.fh_file
%13 = call i32 @fgetline(i32* %12, i32 255, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
store i32 %13, i32* @readpmkidfile.len
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %11
br label %95
16: ; preds = %11
%17 = load i32, i32* @readpmkidfile.len
%18 = icmp slt i32 %17, 61
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = load i32, i32* @readpmkidfile.len
%21 = icmp sgt i32 %20, 123
br i1 %21, label %22, label %28
22: ; preds = %19, %16
%23 = load i32, i32* @stderr
%24 = load i32, i32* @readpmkidfile.aktread
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %24, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
%26 = load i32, i32* @readpmkidfile.aktread
%27 = add nsw i32 %26, 1
store i32 %27, i32* @readpmkidfile.aktread
br label %11
28: ; preds = %19
%29 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 32)
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 58
br i1 %31, label %32, label %58
32: ; preds = %28
%33 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 45)
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 58
br i1 %35, label %36, label %58
36: ; preds = %32
%37 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 58)
%38 = sext i8 %37 to i32
%39 = icmp ne i32 %38, 58
br i1 %39, label %40, label %58
40: ; preds = %36
%41 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 32)
%42 = sext i8 %41 to i32
%43 = icmp ne i32 %42, 42
br i1 %43, label %44, label %58
44: ; preds = %40
%45 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 45)
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 42
br i1 %47, label %48, label %58
48: ; preds = %44
%49 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 58)
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, 42
br i1 %51, label %52, label %58
52: ; preds = %48
%53 = load i32, i32* @stderr
%54 = load i32, i32* @readpmkidfile.aktread
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %54, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
%56 = load i32, i32* @readpmkidfile.aktread
%57 = add nsw i32 %56, 1
store i32 %57, i32* @readpmkidfile.aktread
br label %11
58: ; preds = %48, %44, %40, %36, %32, %28
%59 = load i32, i32* @readpmkidfile.len
%60 = sub nsw i32 %59, 59
store i32 %60, i32* @readpmkidfile.essidlen
%61 = load i32, i32* @readpmkidfile.essidlen
%62 = srem i32 %61, 2
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %70
64: ; preds = %58
%65 = load i32, i32* @stderr
%66 = load i32, i32* @readpmkidfile.aktread
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %66, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
%68 = load i32, i32* @readpmkidfile.aktread
%69 = add nsw i32 %68, 1
store i32 %69, i32* @readpmkidfile.aktread
br label %11
70: ; preds = %58
%71 = call i64 @strtoull(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 33), i8** @readpmkidfile.macaddrstop, i32 16)
store i64 %71, i64* @readpmkidfile.macaddr
%72 = load i8*, i8** @readpmkidfile.macaddrstop
%73 = ptrtoint i8* %72 to i64
%74 = sub i64 %73, ptrtoint ([255 x i8]* @readpmkidfile.linein to i64)
%75 = icmp ne i64 %74, 45
br i1 %75, label %76, label %82
76: ; preds = %70
%77 = load i32, i32* @stderr
%78 = load i32, i32* @readpmkidfile.aktread
%79 = call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %78, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
%80 = load i32, i32* @readpmkidfile.aktread
%81 = add nsw i32 %80, 1
store i32 %81, i32* @readpmkidfile.aktread
br label %11
82: ; preds = %70
%83 = load i32, i32* @readpmkidfile.essidlen
%84 = sdiv i32 %83, 2
%85 = call i32 @hex2bin(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 59), i32* getelementptr inbounds ([32 x i32], [32 x i32]* @readpmkidfile.essid, i64 0, i64 0), i32 %84)
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %92
87: ; preds = %82
%88 = load i64, i64* @readpmkidfile.macaddr
%89 = load i32, i32* @readpmkidfile.essidlen
%90 = sdiv i32 %89, 2
%91 = call i32 @addapessid(i64 %88, i32 %90, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @readpmkidfile.essid, i64 0, i64 0))
br label %92
92: ; preds = %87, %82
%93 = load i32, i32* @readpmkidfile.aktread
%94 = add nsw i32 %93, 1
store i32 %94, i32* @readpmkidfile.aktread
br label %11
95: ; preds = %15
%96 = load i32*, i32** @readpmkidfile.fh_file
%97 = call i32 @fclose(i32* %96)
br label %98
98: ; preds = %95, %6
ret void
}

LLVM IR (-O2):
@readpmkidfile.aktread = internal unnamed_addr global i32 1
@readpmkidfile.essidlen = internal unnamed_addr global i32 0
@readpmkidfile.macaddrstop = internal global i8* null
@readpmkidfile.macaddr = internal unnamed_addr global i64 0
@readpmkidfile.fh_file = internal unnamed_addr global i32* null
@readpmkidfile.linein = internal global [255 x i8] zeroinitializer
@readpmkidfile.essid = internal global [32 x i32] 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"
define void @readpmkidfile(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** @readpmkidfile.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 255, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
%6 = icmp eq i32 %5, -1
br i1 %6, label %71, 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 %74
10: ; preds = %4, %65
%11 = phi i32 [ %69, %65 ], [ %5, %4 ]
%12 = add i32 %11, -124
%13 = icmp ult i32 %12, -63
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i32, i32* @stderr
%16 = load i32, i32* @readpmkidfile.aktread
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %16, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
br label %65
18: ; preds = %10
%19 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 32)
%20 = icmp ne i8 %19, 58
%21 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 45)
%22 = icmp ne i8 %21, 58
%23 = select i1 %20, i1 %22, i1 false
%24 = load i8, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 58)
%25 = icmp ne i8 %24, 58
%26 = select i1 %23, i1 %25, i1 false
%27 = icmp ne i8 %19, 42
%28 = select i1 %26, i1 %27, i1 false
%29 = icmp ne i8 %21, 42
%30 = select i1 %28, i1 %29, i1 false
%31 = icmp ne i8 %24, 42
%32 = select i1 %30, i1 %31, i1 false
br i1 %32, label %33, label %37
33: ; preds = %18
%34 = load i32, i32* @stderr
%35 = load i32, i32* @readpmkidfile.aktread
%36 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %35, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
br label %65
37: ; preds = %18
%38 = add nsw i32 %11, -59
store i32 %38, i32* @readpmkidfile.essidlen
%39 = and i32 %38, 1
%40 = icmp eq i32 %39, 0
br i1 %40, label %45, label %41
41: ; preds = %37
%42 = load i32, i32* @stderr
%43 = load i32, i32* @readpmkidfile.aktread
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %43, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
br label %65
45: ; preds = %37
%46 = tail call i64 @strtoull(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 33), i8** @readpmkidfile.macaddrstop, i32 16)
store i64 %46, i64* @readpmkidfile.macaddr
%47 = load i8*, i8** @readpmkidfile.macaddrstop
%48 = ptrtoint i8* %47 to i64
%49 = sub i64 %48, ptrtoint ([255 x i8]* @readpmkidfile.linein to i64)
%50 = icmp eq i64 %49, 45
br i1 %50, label %55, label %51
51: ; preds = %45
%52 = load i32, i32* @stderr
%53 = load i32, i32* @readpmkidfile.aktread
%54 = tail call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %53, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
br label %65
55: ; preds = %45
%56 = load i32, i32* @readpmkidfile.essidlen
%57 = sdiv i32 %56, 2
%58 = tail call i32 @hex2bin(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 59), i32* getelementptr inbounds ([32 x i32], [32 x i32]* @readpmkidfile.essid, i64 0, i64 0), i32 %57)
%59 = icmp eq i32 %58, 1
br i1 %59, label %60, label %65
60: ; preds = %55
%61 = load i64, i64* @readpmkidfile.macaddr
%62 = load i32, i32* @readpmkidfile.essidlen
%63 = sdiv i32 %62, 2
%64 = tail call i32 @addapessid(i64 %61, i32 %63, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @readpmkidfile.essid, i64 0, i64 0))
br label %65
65: ; preds = %55, %60, %51, %41, %33, %14
%66 = load i32, i32* @readpmkidfile.aktread
%67 = add nsw i32 %66, 1
store i32 %67, i32* @readpmkidfile.aktread
%68 = load i32*, i32** @readpmkidfile.fh_file
%69 = tail call i32 @fgetline(i32* %68, i32 255, i8* getelementptr inbounds ([255 x i8], [255 x i8]* @readpmkidfile.linein, i64 0, i64 0))
%70 = icmp eq i32 %69, -1
br i1 %70, label %71, label %10
71: ; preds = %65, %4
%72 = load i32*, i32** @readpmkidfile.fh_file
%73 = tail call i32 @fclose(i32* %72)
br label %74
74: ; preds = %71, %7
ret void
}