#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 /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
char *getenv2(char const *);
int /*<<< orphan*/ strcasecmp(char *, char const *);
char *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char *);
char *strpbrk(char *, char *);
int strspn(char *, char *);
char *get_property(const char *filename, const char *propname, char *buffer,
                   const char *def) {
  char line[32768], *p = NULL;
  FILE *fh;
  int prop_found = 0, i, whitespace_len;
  if ((fh = fopen(filename, "r")) != 0) {
    while (fgets(line, sizeof line, fh) != NULL) {
      whitespace_len = strspn(line, "\t ");
      p = line + whitespace_len;
      if (*p == '#' || *p == '\n' || *p == '\r')
        continue;
      if ((p = strpbrk(line, "#\r\n")))
        *p = 0;
      p = strchr(line, '=');
      if (p)
        *p = 0;
      for (i = strlen(line) - 1; i >= 0 && (line[i] == '\t' || line[i] == ' ');
           i--)
        ;
      line[i + 1] = 0;
      if (!strcasecmp(line + whitespace_len, propname)) {
        if (p) {
          p++;
          strcpy(buffer, p + strspn(p, "\t "));
          for (i = strlen(buffer) - 1;
               i >= 0 && (buffer[i] == '\t' || buffer[i] == ' '); i--)
            ;
          buffer[i + 1] = 0;
        }
        prop_found = 1;
        break;
      }
    }
    fclose(fh);
  }
  p = getenv2(propname);
  if (*p == 0) {
    if (!prop_found) {
      if (def)
        strcpy(buffer, def);
      else
        buffer = NULL;
    }
  } else
    strcpy(buffer, p);
  return buffer;
}


x86 assembly (clang, -O0):
<get_property>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8060,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x8028(%rbp)
movl   $0x0,-0x8034(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe25(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x8030(%rbp)
cmp    $0x0,%rax
je     14ea <get_property+0x34a>
jmp    11f6 <get_property+0x56>
lea    -0x8020(%rbp),%rdi
mov    -0x8030(%rbp),%rdx
mov    $0x8000,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     14de <get_property+0x33e>
lea    -0x8020(%rbp),%rdi
lea    0xddc(%rip),%rsi
call   1080 <strspn@plt>
mov    %eax,-0x803c(%rbp)
lea    -0x8020(%rbp),%rax
movslq -0x803c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8028(%rbp)
mov    -0x8028(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     1282 <get_property+0xe2>
mov    -0x8028(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1282 <get_property+0xe2>
mov    -0x8028(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    1287 <get_property+0xe7>
jmp    11f6 <get_property+0x56>
lea    -0x8020(%rbp),%rdi
lea    0xd70(%rip),%rsi
call   10a0 <strpbrk@plt>
mov    %rax,-0x8028(%rbp)
cmp    $0x0,%rax
je     12b5 <get_property+0x115>
mov    -0x8028(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x8020(%rbp),%rdi
mov    $0x3d,%esi
call   1070 <strchr@plt>
mov    %rax,-0x8028(%rbp)
cmpq   $0x0,-0x8028(%rbp)
je     12e5 <get_property+0x145>
mov    -0x8028(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x8020(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x8038(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8038(%rbp)
mov    %al,-0x803d(%rbp)
jl     1356 <get_property+0x1b6>
movslq -0x8038(%rbp),%rax
movsbl -0x8020(%rbp,%rax,1),%ecx
ff
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x803e(%rbp)
je     134a <get_property+0x1aa>
movslq -0x8038(%rbp),%rax
movsbl -0x8020(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
sete   %al
mov    %al,-0x803e(%rbp)
mov    -0x803e(%rbp),%al
mov    %al,-0x803d(%rbp)
mov    -0x803d(%rbp),%al
test   $0x1,%al
jne    1369 <get_property+0x1c9>
jmp    1382 <get_property+0x1e2>
jmp    136e <get_property+0x1ce>
mov    -0x8038(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8038(%rbp)
jmp    12fa <get_property+0x15a>
mov    -0x8038(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x8020(%rbp,%rax,1)
lea    -0x8020(%rbp),%rdi
movslq -0x803c(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    14d9 <get_property+0x339>
cmpq   $0x0,-0x8028(%rbp)
je     14ca <get_property+0x32a>
mov    -0x8028(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8028(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8048(%rbp)
mov    -0x8028(%rbp),%rax
mov    %rax,-0x8050(%rbp)
mov    -0x8028(%rbp),%rdi
lea    0xc03(%rip),%rsi
call   1080 <strspn@plt>
mov    -0x8050(%rbp),%rsi
mov    -0x8048(%rbp),%rdi
cltq
add    %rax,%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x8038(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8038(%rbp)
mov    %al,-0x8051(%rbp)
jl     148a <get_property+0x2ea>
mov    -0x18(%rbp),%rax
movslq -0x8038(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x8052(%rbp)
je     147e <get_property+0x2de>
mov    -0x18(%rbp),%rax
movslq -0x8038(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x8052(%rbp)
mov    -0x8052(%rbp),%al
mov    %al,-0x8051(%rbp)
mov    -0x8051(%rbp),%al
test   $0x1,%al
jne    149d <get_property+0x2fd>
jmp    14b6 <get_property+0x316>
jmp    14a2 <get_property+0x302>
mov    -0x8038(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8038(%rbp)
jmp    142e <get_property+0x28e>
mov    -0x18(%rbp),%rax
mov    -0x8038(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x1,-0x8034(%rbp)
jmp    14de <get_property+0x33e>
jmp    11f6 <get_property+0x56>
mov    -0x8030(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x10(%rbp),%rdi
call   10c0 <getenv2@plt>
mov    %rax,-0x8028(%rbp)
mov    -0x8028(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1549 <get_property+0x3a9>
cmpl   $0x0,-0x8034(%rbp)
jne    1544 <get_property+0x3a4>
cmpq   $0x0,-0x20(%rbp)
je     1537 <get_property+0x397>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
jmp    153f <get_property+0x39f>
movq   $0x0,-0x18(%rbp)
jmp    1544 <get_property+0x3a4>
jmp    1559 <get_property+0x3b9>
mov    -0x18(%rbp),%rdi
mov    -0x8028(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x8060,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_property>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8028,%rsp
mov    %rcx,%r14
mov    %rdx,%rbp
mov    %rsi,0x18(%rsp)
lea    0xe3d(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     12eb <get_property+0x14b>
mov    %rax,%rbx
lea    0x20(%rsp),%rdi
mov    $0x8000,%esi
mov    %rax,%rdx
call   1090 <fgets@plt>
xor    %r15d,%r15d
test   %rax,%rax
je     12fd <get_property+0x15d>
mov    %r14,0x8(%rsp)
mov    %rbp,0x10(%rsp)
lea    0xdff(%rip),%r13
lea    0x20(%rsp),%rbp
movabs $0x800002400,%r15
jmp    1250 <get_property+0xb0>
xor    %eax,%eax
lea    (%rsp,%r12,1),%rdi
add    $0x20,%rdi
cltq
movb   $0x0,0x20(%rsp,%rax,1)
mov    0x18(%rsp),%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1347 <get_property+0x1a7>
mov    %rbp,%rdi
mov    $0x8000,%esi
mov    %rbx,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     12f0 <get_property+0x150>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1080 <strspn@plt>
movslq %eax,%r12
movzbl 0x20(%rsp,%r12,1),%eax
cmp    $0x23,%rax
ja     1270 <get_property+0xd0>
bt     %rax,%r15
jb     1237 <get_property+0x97>
mov    %rbp,%rdi
lea    0xd8b(%rip),%rsi
call   10a0 <strpbrk@plt>
test   %rax,%rax
je     1287 <get_property+0xe7>
movb   $0x0,(%rax)
mov    %rbp,%rdi
mov    $0x3d,%esi
call   1070 <strchr@plt>
mov    %rax,%r14
test   %rax,%rax
je     12a0 <get_property+0x100>
movb   $0x0,(%r14)
mov    %rbp,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    1216 <get_property+0x76>
mov    %eax,%eax
jmp    12d1 <get_property+0x131>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rcx),%rdx
mov    %rcx,%rax
cmp    $0x1,%rdx
jbe    1214 <get_property+0x74>
lea    -0x1(%rax),%rcx
mov    %ecx,%edx
movzbl 0x20(%rsp,%rdx,1),%edx
cmp    $0x20,%dl
je     12c0 <get_property+0x120>
cmp    $0x9,%dl
je     12c0 <get_property+0x120>
jmp    1216 <get_property+0x76>
xor    %r15d,%r15d
jmp    1305 <get_property+0x165>
mov    0x10(%rsp),%rbp
mov    0x8(%rsp),%r14
xor    %r15d,%r15d
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x18(%rsp),%rdi
call   10c0 <getenv2@plt>
cmpb   $0x0,(%rax)
je     1321 <get_property+0x181>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
jmp    1326 <get_property+0x186>
test   %r15d,%r15d
je     133b <get_property+0x19b>
mov    %rbp,%rax
add    $0x8028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14,%rax
test   %r14,%r14
jne    1314 <get_property+0x174>
xor    %ebp,%ebp
jmp    1326 <get_property+0x186>
mov    $0x1,%r15d
test   %r14,%r14
je     13b4 <get_property+0x214>
lea    0x1(%r14),%rdi
lea    0xca5(%rip),%rsi
call   1080 <strspn@plt>
cltq
lea    (%r14,%rax,1),%rsi
add    $0x1,%rsi
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    13c3 <get_property+0x223>
mov    %eax,%eax
mov    0x8(%rsp),%r14
jmp    139d <get_property+0x1fd>
xchg   %ax,%ax
lea    0x1(%rcx),%rdx
mov    %rcx,%rax
cmp    $0x1,%rdx
jbe    13ca <get_property+0x22a>
lea    -0x1(%rax),%rcx
mov    %ecx,%edx
movzbl 0x0(%rbp,%rdx,1),%edx
cmp    $0x20,%dl
je     1390 <get_property+0x1f0>
cmp    $0x9,%dl
je     1390 <get_property+0x1f0>
jmp    13cc <get_property+0x22c>
mov    0x10(%rsp),%rbp
mov    0x8(%rsp),%r14
jmp    12fd <get_property+0x15d>
mov    0x8(%rsp),%r14
jmp    13cc <get_property+0x22c>
xor    %eax,%eax
cltq
movb   $0x0,0x0(%rbp,%rax,1)
jmp    12fd <get_property+0x15d>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"\09 \00"
@.str.2 = [4 x i8] c"#\0D\0A\00"
define i8* @get_property(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [32768 x i8]
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
store i8* null, i8** %10
store i32 0, i32* %12
%15 = load i8*, i8** %5
%16 = call i32* @fopen(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %16, i32** %11
%17 = icmp ne i32* %16, null
br i1 %17, label %18, label %154
18: ; preds = %4
br label %19
19: ; preds = %150, %45, %18
%20 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 0
%21 = load i32*, i32** %11
%22 = call i32* @fgets(i8* %20, i32 32768, i32* %21)
%23 = icmp ne i32* %22, null
br i1 %23, label %24, label %151
24: ; preds = %19
%25 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 0
%26 = call i32 @strspn(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 %26, i32* %14
%27 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 0
%28 = load i32, i32* %14
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
store i8* %30, i8** %10
%31 = load i8*, i8** %10
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 35
br i1 %34, label %45, label %35
35: ; preds = %24
%36 = load i8*, i8** %10
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 10
br i1 %39, label %45, label %40
40: ; preds = %35
%41 = load i8*, i8** %10
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 13
br i1 %44, label %45, label %46
45: ; preds = %40, %35, %24
br label %19
46: ; preds = %40
%47 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 0
%48 = call i8* @strpbrk(i8* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %48, i8** %10
%49 = icmp ne i8* %48, null
br i1 %49, label %50, label %52
50: ; preds = %46
%51 = load i8*, i8** %10
store i8 0, i8* %51
br label %52
52: ; preds = %50, %46
%53 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 0
%54 = call i8* @strchr(i8* %53, i8 signext 61)
store i8* %54, i8** %10
%55 = load i8*, i8** %10
%56 = icmp ne i8* %55, null
br i1 %56, label %57, label %59
57: ; preds = %52
%58 = load i8*, i8** %10
store i8 0, i8* %58
br label %59
59: ; preds = %57, %52
%60 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 0
%61 = call i32 @strlen(i8* %60)
%62 = sub nsw i32 %61, 1
store i32 %62, i32* %13
br label %63
63: ; preds = %85, %59
%64 = load i32, i32* %13
%65 = icmp sge i32 %64, 0
br i1 %65, label %66, label %82
66: ; preds = %63
%67 = load i32, i32* %13
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp eq i32 %71, 9
br i1 %72, label %80, label %73
73: ; preds = %66
%74 = load i32, i32* %13
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %78, 32
br label %80
80: ; preds = %73, %66
%81 = phi i1 [ true, %66 ], [ %79, %73 ]
br label %82
82: ; preds = %80, %63
%83 = phi i1 [ false, %63 ], [ %81, %80 ]
br i1 %83, label %84, label %88
84: ; preds = %82
br label %85
85: ; preds = %84
%86 = load i32, i32* %13
%87 = add nsw i32 %86, -1
store i32 %87, i32* %13
br label %63
88: ; preds = %82
%89 = load i32, i32* %13
%90 = add nsw i32 %89, 1
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 %91
store i8 0, i8* %92
%93 = getelementptr inbounds [32768 x i8], [32768 x i8]* %9, i64 0, i64 0
%94 = load i32, i32* %14
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8, i8* %93, i64 %95
%97 = load i8*, i8** %6
%98 = call i32 @strcasecmp(i8* %96, i8* %97)
%99 = icmp ne i32 %98, 0
br i1 %99, label %150, label %100
100: ; preds = %88
%101 = load i8*, i8** %10
%102 = icmp ne i8* %101, null
br i1 %102, label %103, label %149
103: ; preds = %100
%104 = load i8*, i8** %10
%105 = getelementptr inbounds i8, i8* %104, i32 1
store i8* %105, i8** %10
%106 = load i8*, i8** %7
%107 = load i8*, i8** %10
%108 = load i8*, i8** %10
%109 = call i32 @strspn(i8* %108, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i8, i8* %107, i64 %110
%112 = call i32 @strcpy(i8* %106, i8* %111)
%113 = load i8*, i8** %7
%114 = call i32 @strlen(i8* %113)
%115 = sub nsw i32 %114, 1
store i32 %115, i32* %13
br label %116
116: ; preds = %140, %103
%117 = load i32, i32* %13
%118 = icmp sge i32 %117, 0
br i1 %118, label %119, label %137
119: ; preds = %116
%120 = load i8*, i8** %7
%121 = load i32, i32* %13
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8, i8* %120, i64 %122
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 9
br i1 %126, label %135, label %127
127: ; preds = %119
%128 = load i8*, i8** %7
%129 = load i32, i32* %13
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %128, i64 %130
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = icmp eq i32 %133, 32
br label %135
135: ; preds = %127, %119
%136 = phi i1 [ true, %119 ], [ %134, %127 ]
br label %137
137: ; preds = %135, %116
%138 = phi i1 [ false, %116 ], [ %136, %135 ]
br i1 %138, label %139, label %143
139: ; preds = %137
br label %140
140: ; preds = %139
%141 = load i32, i32* %13
%142 = add nsw i32 %141, -1
store i32 %142, i32* %13
br label %116
143: ; preds = %137
%144 = load i8*, i8** %7
%145 = load i32, i32* %13
%146 = add nsw i32 %145, 1
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i8, i8* %144, i64 %147
store i8 0, i8* %148
br label %149
149: ; preds = %143, %100
store i32 1, i32* %12
br label %151
150: ; preds = %88
br label %19
151: ; preds = %149, %19
%152 = load i32*, i32** %11
%153 = call i32 @fclose(i32* %152)
br label %154
154: ; preds = %151, %4
%155 = load i8*, i8** %6
%156 = call i8* @getenv2(i8* %155)
store i8* %156, i8** %10
%157 = load i8*, i8** %10
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
%160 = icmp eq i32 %159, 0
br i1 %160, label %161, label %174
161: ; preds = %154
%162 = load i32, i32* %12
%163 = icmp ne i32 %162, 0
br i1 %163, label %173, label %164
164: ; preds = %161
%165 = load i8*, i8** %8
%166 = icmp ne i8* %165, null
br i1 %166, label %167, label %171
167: ; preds = %164
%168 = load i8*, i8** %7
%169 = load i8*, i8** %8
%170 = call i32 @strcpy(i8* %168, i8* %169)
br label %172
171: ; preds = %164
store i8* null, i8** %7
br label %172
172: ; preds = %171, %167
br label %173
173: ; preds = %172, %161
br label %178
174: ; preds = %154
%175 = load i8*, i8** %7
%176 = load i8*, i8** %10
%177 = call i32 @strcpy(i8* %175, i8* %176)
br label %178
178: ; preds = %174, %173
%179 = load i8*, i8** %7
ret i8* %179
}

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