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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(unsigned char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ isspace(unsigned char);
unsigned char *strchr(unsigned char *, char);
int strlen(unsigned char *);
int /*<<< orphan*/ strncasecmp(unsigned char *, char *, int);
int /*<<< orphan*/ xfree(unsigned char *);
unsigned char *xstrdup(unsigned char *);
void cpu_get_performance_info(unsigned char **p_model, unsigned char **p_mhz) {
  FILE *f = NULL;
  unsigned char buf[1024];
  unsigned char *model = NULL;
  unsigned char *mhz = NULL;
  if (p_model)
    *p_model = NULL;
  if (p_mhz)
    *p_mhz = NULL;
  if (!(f = fopen("/proc/cpuinfo", "r")))
    goto failure;
  while (fgets(buf, sizeof(buf), f)) {
    int buflen = strlen(buf);
    if (buflen > sizeof(buf) - 3)
      goto failure;
    while (buflen > 0 && isspace(buf[buflen - 1]))
      buf[--buflen] = 0;
    unsigned char *s = strchr(buf, ':');
    if (s && s[1] == ' ')
      s += 2;
    else if (s)
      ++s;
    if (!strncasecmp(buf, "model name", 10)) {
      if (model)
        xfree(model);
      model = xstrdup(s);
      if (mhz)
        break;
    } else if (!strncasecmp(buf, "cpu mhz", 7)) {
      if (mhz)
        xfree(mhz);
      mhz = xstrdup(s);
      if (model)
        break;
    }
  }
  fclose(f);
  if (p_model)
    *p_model = model;
  else
    xfree(model);
  if (p_mhz)
    *p_mhz = mhz;
  else
    xfree(mhz);
  return;
failure:
  if (f)
    fclose(f);
}


x86 assembly (clang, -O0):
<cpu_get_performance_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x428(%rbp)
movq   $0x0,-0x430(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11d7 <cpu_get_performance_info+0x47>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     11ed <cpu_get_performance_info+0x5d>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
lea    0xe0c(%rip),%rdi
lea    0xe13(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1213 <cpu_get_performance_info+0x83>
jmp    147f <cpu_get_performance_info+0x2ef>
jmp    1218 <cpu_get_performance_info+0x88>
lea    -0x420(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x400,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     141d <cpu_get_performance_info+0x28d>
lea    -0x420(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x434(%rbp)
movslq -0x434(%rbp),%rax
cmp    $0x3fd,%rax
jbe    1261 <cpu_get_performance_info+0xd1>
jmp    147f <cpu_get_performance_info+0x2ef>
jmp    1266 <cpu_get_performance_info+0xd6>
xor    %eax,%eax
cmpl   $0x0,-0x434(%rbp)
mov    %al,-0x441(%rbp)
jle    12a0 <cpu_get_performance_info+0x110>
mov    -0x434(%rbp),%eax
sub    $0x1,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%edi
ff
call   1080 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x441(%rbp)
mov    -0x441(%rbp),%al
test   $0x1,%al
jne    12b3 <cpu_get_performance_info+0x123>
jmp    12d1 <cpu_get_performance_info+0x141>
mov    -0x434(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x434(%rbp)
cltq
movb   $0x0,-0x420(%rbp,%rax,1)
jmp    1266 <cpu_get_performance_info+0xd6>
lea    -0x420(%rbp),%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
mov    %rax,-0x440(%rbp)
cmpq   $0x0,-0x440(%rbp)
je     1322 <cpu_get_performance_info+0x192>
mov    -0x440(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x20,%eax
jne    1322 <cpu_get_performance_info+0x192>
mov    -0x440(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x440(%rbp)
jmp    1347 <cpu_get_performance_info+0x1b7>
cmpq   $0x0,-0x440(%rbp)
je     1342 <cpu_get_performance_info+0x1b2>
mov    -0x440(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x440(%rbp)
jmp    1347 <cpu_get_performance_info+0x1b7>
lea    -0x420(%rbp),%rdi
lea    0xcbb(%rip),%rsi
mov    $0xa,%edx
call   10a0 <strncasecmp@plt>
cmp    $0x0,%eax
jne    13ad <cpu_get_performance_info+0x21d>
cmpq   $0x0,-0x428(%rbp)
je     1382 <cpu_get_performance_info+0x1f2>
mov    -0x428(%rbp),%rdi
call   1060 <xfree@plt>
mov    -0x440(%rbp),%rdi
call   1070 <xstrdup@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x430(%rbp)
je     13a8 <cpu_get_performance_info+0x218>
jmp    141d <cpu_get_performance_info+0x28d>
jmp    1418 <cpu_get_performance_info+0x288>
lea    -0x420(%rbp),%rdi
lea    0xc60(%rip),%rsi
mov    $0x7,%edx
call   10a0 <strncasecmp@plt>
cmp    $0x0,%eax
jne    1413 <cpu_get_performance_info+0x283>
cmpq   $0x0,-0x430(%rbp)
je     13e8 <cpu_get_performance_info+0x258>
mov    -0x430(%rbp),%rdi
call   1060 <xfree@plt>
mov    -0x440(%rbp),%rdi
call   1070 <xstrdup@plt>
mov    %rax,-0x430(%rbp)
cmpq   $0x0,-0x428(%rbp)
je     140e <cpu_get_performance_info+0x27e>
jmp    141d <cpu_get_performance_info+0x28d>
jmp    1413 <cpu_get_performance_info+0x283>
jmp    1418 <cpu_get_performance_info+0x288>
jmp    1218 <cpu_get_performance_info+0x88>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
cmpq   $0x0,-0x8(%rbp)
je     1444 <cpu_get_performance_info+0x2b4>
mov    -0x428(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1450 <cpu_get_performance_info+0x2c0>
mov    -0x428(%rbp),%rdi
call   1060 <xfree@plt>
cmpq   $0x0,-0x10(%rbp)
je     146e <cpu_get_performance_info+0x2de>
mov    -0x430(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    147a <cpu_get_performance_info+0x2ea>
mov    -0x430(%rbp),%rdi
call   1060 <xfree@plt>
jmp    1493 <cpu_get_performance_info+0x303>
cmpq   $0x0,-0x18(%rbp)
je     1493 <cpu_get_performance_info+0x303>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_get_performance_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x428,%rsp
mov    %rsi,%r14
mov    %rdi,%rbp
test   %rdi,%rdi
je     11b4 <cpu_get_performance_info+0x24>
movq   $0x0,0x0(%rbp)
test   %r14,%r14
je     11c0 <cpu_get_performance_info+0x30>
movq   $0x0,(%r14)
lea    0xe39(%rip),%rdi
lea    0xe40(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1392 <cpu_get_performance_info+0x202>
mov    %rax,%rbx
lea    0x20(%rsp),%rdi
mov    $0x400,%esi
mov    %rax,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
mov    %r14,0x18(%rsp)
mov    %rbp,0x10(%rsp)
je     1345 <cpu_get_performance_info+0x1b5>
xor    %r13d,%r13d
lea    0x20(%rsp),%r12
xor    %r14d,%r14d
mov    %rbx,0x8(%rsp)
jmp    123e <cpu_get_performance_info+0xae>
cs nopw 0x0(%rax,%rax,1)
mov    0x8(%rsp),%rbx
mov    %r12,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     135c <cpu_get_performance_info+0x1cc>
mov    %r12,%rdi
call   1040 <strlen@plt>
cmp    $0x3fd,%eax
ja     134d <cpu_get_performance_info+0x1bd>
test   %eax,%eax
je     128e <cpu_get_performance_info+0xfe>
lea    0x1(%rax),%ebx
add    $0xffffffff,%eax
lea    (%rsp,%rax,1),%rbp
add    $0x20,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x0(%rbp),%edi
call   1080 <isspace@plt>
test   %rax,%rax
je     128e <cpu_get_performance_info+0xfe>
movb   $0x0,0x0(%rbp)
add    $0xffffffff,%ebx
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%ebx
jg     1270 <cpu_get_performance_info+0xe0>
mov    %r12,%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     12b0 <cpu_get_performance_info+0x120>
cmpb   $0x20,0x1(%rax)
jne    12b0 <cpu_get_performance_info+0x120>
add    $0x2,%rax
mov    %rax,%r15
jmp    12bb <cpu_get_performance_info+0x12b>
nop
lea    0x1(%rax),%r15
test   %rax,%rax
cmove  %rax,%r15
mov    %r12,%rdi
lea    0xd4b(%rip),%rsi
mov    $0xa,%edx
call   10a0 <strncasecmp@plt>
test   %eax,%eax
je     1320 <cpu_get_performance_info+0x190>
mov    %r12,%rdi
lea    0xd3e(%rip),%rsi
mov    $0x7,%edx
call   10a0 <strncasecmp@plt>
test   %eax,%eax
jne    1220 <cpu_get_performance_info+0x90>
test   %r13,%r13
je     12fc <cpu_get_performance_info+0x16c>
mov    %r13,%rdi
call   1060 <xfree@plt>
mov    %r15,%rdi
call   1070 <xstrdup@plt>
mov    %rax,%r13
test   %r14,%r14
jne    1357 <cpu_get_performance_info+0x1c7>
xor    %r14d,%r14d
jmp    1220 <cpu_get_performance_info+0x90>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %r14,%r14
je     132d <cpu_get_performance_info+0x19d>
mov    %r14,%rdi
call   1060 <xfree@plt>
mov    %r15,%rdi
call   1070 <xstrdup@plt>
mov    %rax,%r14
test   %r13,%r13
jne    1357 <cpu_get_performance_info+0x1c7>
xor    %r13d,%r13d
jmp    1220 <cpu_get_performance_info+0x90>
xor    %r14d,%r14d
xor    %r13d,%r13d
jmp    135c <cpu_get_performance_info+0x1cc>
mov    %rbx,%rdi
call   1030 <fclose@plt>
jmp    1392 <cpu_get_performance_info+0x202>
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x10(%rsp),%rax
test   %rax,%rax
je     1373 <cpu_get_performance_info+0x1e3>
mov    %r14,(%rax)
jmp    137b <cpu_get_performance_info+0x1eb>
mov    %r14,%rdi
call   1060 <xfree@plt>
mov    0x18(%rsp),%rax
test   %rax,%rax
je     138a <cpu_get_performance_info+0x1fa>
mov    %r13,(%rax)
jmp    1392 <cpu_get_performance_info+0x202>
mov    %r13,%rdi
call   1060 <xfree@plt>
add    $0x428,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/cpuinfo\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"model name\00"
@.str.3 = [8 x i8] c"cpu mhz\00"
define void @cpu_get_performance_info(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca [1024 x i8]
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
store i32* null, i32** %5
store i8* null, i8** %7
store i8* null, i8** %8
%11 = load i8**, i8*** %3
%12 = icmp ne i8** %11, null
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i8**, i8*** %3
store i8* null, i8** %14
br label %15
15: ; preds = %13, %2
%16 = load i8**, i8*** %4
%17 = icmp ne i8** %16, null
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = load i8**, i8*** %4
store i8* null, i8** %19
br label %20
20: ; preds = %18, %15
%21 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %5
%22 = icmp ne i32* %21, null
br i1 %22, label %24, label %23
23: ; preds = %20
br label %134
24: ; preds = %20
br label %25
25: ; preds = %112, %24
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%27 = load i32*, i32** %5
%28 = call i64 @fgets(i8* %26, i32 1024, i32* %27)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %113
30: ; preds = %25
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%32 = call i32 @strlen(i8* %31)
store i32 %32, i32* %9
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = icmp ugt i64 %34, 1021
br i1 %35, label %36, label %37
36: ; preds = %30
br label %134
37: ; preds = %30
br label %38
38: ; preds = %51, %37
%39 = load i32, i32* %9
%40 = icmp sgt i32 %39, 0
br i1 %40, label %41, label %49
41: ; preds = %38
%42 = load i32, i32* %9
%43 = sub nsw i32 %42, 1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = call i64 @isspace(i8 zeroext %46)
%48 = icmp ne i64 %47, 0
br label %49
49: ; preds = %41, %38
%50 = phi i1 [ false, %38 ], [ %48, %41 ]
br i1 %50, label %51, label %56
51: ; preds = %49
%52 = load i32, i32* %9
%53 = add nsw i32 %52, -1
store i32 %53, i32* %9
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %54
store i8 0, i8* %55
br label %38
56: ; preds = %49
%57 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%58 = call i8* @strchr(i8* %57, i8 signext 58)
store i8* %58, i8** %10
%59 = load i8*, i8** %10
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %70
61: ; preds = %56
%62 = load i8*, i8** %10
%63 = getelementptr inbounds i8, i8* %62, i64 1
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = icmp eq i32 %65, 32
br i1 %66, label %67, label %70
67: ; preds = %61
%68 = load i8*, i8** %10
%69 = getelementptr inbounds i8, i8* %68, i64 2
store i8* %69, i8** %10
br label %77
70: ; preds = %61, %56
%71 = load i8*, i8** %10
%72 = icmp ne i8* %71, null
br i1 %72, label %73, label %76
73: ; preds = %70
%74 = load i8*, i8** %10
%75 = getelementptr inbounds i8, i8* %74, i32 1
store i8* %75, i8** %10
br label %76
76: ; preds = %73, %70
br label %77
77: ; preds = %76, %67
%78 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%79 = call i32 @strncasecmp(i8* %78, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 10)
%80 = icmp ne i32 %79, 0
br i1 %80, label %94, label %81
81: ; preds = %77
%82 = load i8*, i8** %7
%83 = icmp ne i8* %82, null
br i1 %83, label %84, label %87
84: ; preds = %81
%85 = load i8*, i8** %7
%86 = call i32 @xfree(i8* %85)
br label %87
87: ; preds = %84, %81
%88 = load i8*, i8** %10
%89 = call i8* @xstrdup(i8* %88)
store i8* %89, i8** %7
%90 = load i8*, i8** %8
%91 = icmp ne i8* %90, null
br i1 %91, label %92, label %93
92: ; preds = %87
br label %113
93: ; preds = %87
br label %112
94: ; preds = %77
%95 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%96 = call i32 @strncasecmp(i8* %95, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%97 = icmp ne i32 %96, 0
br i1 %97, label %111, label %98
98: ; preds = %94
%99 = load i8*, i8** %8
%100 = icmp ne i8* %99, null
br i1 %100, label %101, label %104
101: ; preds = %98
%102 = load i8*, i8** %8
%103 = call i32 @xfree(i8* %102)
br label %104
104: ; preds = %101, %98
%105 = load i8*, i8** %10
%106 = call i8* @xstrdup(i8* %105)
store i8* %106, i8** %8
%107 = load i8*, i8** %7
%108 = icmp ne i8* %107, null
br i1 %108, label %109, label %110
109: ; preds = %104
br label %113
110: ; preds = %104
br label %111
111: ; preds = %110, %94
br label %112
112: ; preds = %111, %93
br label %25
113: ; preds = %109, %92, %25
%114 = load i32*, i32** %5
%115 = call i32 @fclose(i32* %114)
%116 = load i8**, i8*** %3
%117 = icmp ne i8** %116, null
br i1 %117, label %118, label %121
118: ; preds = %113
%119 = load i8*, i8** %7
%120 = load i8**, i8*** %3
store i8* %119, i8** %120
br label %124
121: ; preds = %113
%122 = load i8*, i8** %7
%123 = call i32 @xfree(i8* %122)
br label %124
124: ; preds = %121, %118
%125 = load i8**, i8*** %4
%126 = icmp ne i8** %125, null
br i1 %126, label %127, label %130
127: ; preds = %124
%128 = load i8*, i8** %8
%129 = load i8**, i8*** %4
store i8* %128, i8** %129
br label %133
130: ; preds = %124
%131 = load i8*, i8** %8
%132 = call i32 @xfree(i8* %131)
br label %133
133: ; preds = %130, %127
br label %140
134: ; preds = %36, %23
%135 = load i32*, i32** %5
%136 = icmp ne i32* %135, null
br i1 %136, label %137, label %140
137: ; preds = %134
%138 = load i32*, i32** %5
%139 = call i32 @fclose(i32* %138)
br label %140
140: ; preds = %133, %137, %134
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/cpuinfo\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"model name\00"
@.str.3 = [8 x i8] c"cpu mhz\00"
define void @cpu_get_performance_info(i8** writeonly %0, i8** writeonly %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = icmp eq i8** %0, null
br i1 %5, label %7, label %6
6: ; preds = %2
store i8* null, i8** %0
br label %7
7: ; preds = %6, %2
%8 = icmp eq i8** %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i8* null, i8** %1
br label %10
10: ; preds = %9, %7
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %87, label %13
13: ; preds = %10
%14 = call i64 @fgets(i8* %4, i32 1024, i32* %11)
%15 = icmp eq i64 %14, 0
br i1 %15, label %74, label %16
16: ; preds = %13, %69
%17 = phi i8* [ %71, %69 ], [ null, %13 ]
%18 = phi i8* [ %70, %69 ], [ null, %13 ]
%19 = call i32 @strlen(i8* %4)
%20 = icmp ugt i32 %19, 1021
br i1 %20, label %85, label %21
21: ; preds = %16
%22 = icmp eq i32 %19, 0
br i1 %22, label %36, label %23
23: ; preds = %21
%24 = zext i32 %19 to i64
br label %25
25: ; preds = %23, %33
%26 = phi i64 [ %24, %23 ], [ %27, %33 ]
%27 = add nsw i64 %26, -1
%28 = and i64 %27, 4294967295
%29 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = call i64 @isspace(i8 zeroext %30)
%32 = icmp eq i64 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %25
store i8 0, i8* %29
%34 = trunc i64 %26 to i32
%35 = icmp sgt i32 %34, 1
br i1 %35, label %25, label %36
36: ; preds = %25, %33, %21
%37 = call i8* @strchr(i8* %4, i8 signext 58)
%38 = icmp eq i8* %37, null
br i1 %38, label %45, label %39
39: ; preds = %36
%40 = getelementptr inbounds i8, i8* %37, i64 1
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 32
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = getelementptr inbounds i8, i8* %37, i64 2
br label %48
45: ; preds = %39, %36
%46 = getelementptr inbounds i8, i8* %37, i64 1
%47 = select i1 %38, i8* null, i8* %46
br label %48
48: ; preds = %45, %43
%49 = phi i8* [ %44, %43 ], [ %47, %45 ]
%50 = call i32 @strncasecmp(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 10)
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %59
52: ; preds = %48
%53 = icmp eq i8* %18, null
br i1 %53, label %56, label %54
54: ; preds = %52
%55 = call i32 @xfree(i8* %18)
br label %56
56: ; preds = %54, %52
%57 = call i8* @xstrdup(i8* %49)
%58 = icmp eq i8* %17, null
br i1 %58, label %69, label %74
59: ; preds = %48
%60 = call i32 @strncasecmp(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %69
62: ; preds = %59
%63 = icmp eq i8* %17, null
br i1 %63, label %66, label %64
64: ; preds = %62
%65 = call i32 @xfree(i8* %17)
br label %66
66: ; preds = %64, %62
%67 = call i8* @xstrdup(i8* %49)
%68 = icmp eq i8* %18, null
br i1 %68, label %69, label %74
69: ; preds = %56, %66, %59
%70 = phi i8* [ %18, %59 ], [ null, %66 ], [ %57, %56 ]
%71 = phi i8* [ %17, %59 ], [ %67, %66 ], [ null, %56 ]
%72 = call i64 @fgets(i8* %4, i32 1024, i32* %11)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %16
74: ; preds = %69, %56, %66, %13
%75 = phi i8* [ null, %13 ], [ %18, %66 ], [ %57, %56 ], [ %70, %69 ]
%76 = phi i8* [ null, %13 ], [ %67, %66 ], [ %17, %56 ], [ %71, %69 ]
%77 = call i32 @fclose(i32* %11)
br i1 %5, label %79, label %78
78: ; preds = %74
store i8* %75, i8** %0
br label %81
79: ; preds = %74
%80 = call i32 @xfree(i8* %75)
br label %81
81: ; preds = %79, %78
br i1 %8, label %83, label %82
82: ; preds = %81
store i8* %76, i8** %1
br label %87
83: ; preds = %81
%84 = call i32 @xfree(i8* %76)
br label %87
85: ; preds = %16
%86 = call i32 @fclose(i32* %11)
br label %87
87: ; preds = %85, %10, %82, %83
ret void
}