#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 */

/* Variables and functions */
char *alloc_string(char const *);
scalar_t__ strstr(char const *, char *);
char *get_real_android(const char *droid) {
  if (strstr(droid, "7.1"))
    return alloc_string("Nougat 7.1");
  else if (strstr(droid, "7.0"))
    return alloc_string("Nougat 7.0");
  else if (strstr(droid, "6.0.1"))
    return alloc_string("Marshmallow 6.0.1");
  else if (strstr(droid, "6.0"))
    return alloc_string("Marshmallow 6.0");
  else if (strstr(droid, "5.1"))
    return alloc_string("Lollipop 5.1");
  else if (strstr(droid, "5.0"))
    return alloc_string("Lollipop 5.0");
  else if (strstr(droid, "4.4"))
    return alloc_string("KitKat 4.4");
  else if (strstr(droid, "4.3"))
    return alloc_string("Jelly Bean 4.3");
  else if (strstr(droid, "4.2"))
    return alloc_string("Jelly Bean 4.2");
  else if (strstr(droid, "4.1"))
    return alloc_string("Jelly Bean 4.1");
  else if (strstr(droid, "4.0"))
    return alloc_string("Ice Cream Sandwich 4.0");
  else if (strstr(droid, "3."))
    return alloc_string("Honeycomb 3");
  else if (strstr(droid, "2.3"))
    return alloc_string("Gingerbread 2.3");
  else if (strstr(droid, "2.2"))
    return alloc_string("Froyo 2.2");
  else if (strstr(droid, "2.0") || strstr(droid, "2.1"))
    return alloc_string("Eclair 2");
  else if (strstr(droid, "1.6"))
    return alloc_string("Donut 1.6");
  else if (strstr(droid, "1.5"))
    return alloc_string("Cupcake 1.5");
  return alloc_string(droid);
}


x86 assembly (clang, -O0):
<get_real_android>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed0(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     115b <get_real_android+0x3b>
lea    0xeb3(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     118a <get_real_android+0x6a>
lea    0xe8f(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     11b9 <get_real_android+0x99>
lea    0xe6b(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     11e8 <get_real_android+0xc8>
lea    0xe4e(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xe4e(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1217 <get_real_android+0xf7>
lea    0xe2f(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xe2c(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1246 <get_real_android+0x126>
lea    0xe0d(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xe08(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1275 <get_real_android+0x155>
lea    0xdeb(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xde8(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     12a4 <get_real_android+0x184>
lea    0xdc7(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xdc8(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     12d3 <get_real_android+0x1b3>
lea    0xda7(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xda8(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1302 <get_real_android+0x1e2>
lea    0xd87(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xd90(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1331 <get_real_android+0x211>
lea    0xd67(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xd65(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1360 <get_real_android+0x240>
lea    0xd52(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xd51(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     138f <get_real_android+0x26f>
lea    0xd2f(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xd2c(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     13be <get_real_android+0x29e>
lea    0xd10(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xd01(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    13f2 <get_real_android+0x2d2>
mov    -0x10(%rbp),%rdi
lea    0xceb(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1407 <get_real_android+0x2e7>
lea    0xcd9(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xccf(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1436 <get_real_android+0x316>
lea    0xcb3(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xcac(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1465 <get_real_android+0x345>
lea    0xc8e(%rip),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
jmp    14c2 <get_real_android+0x3a2>
jmp    146a <get_real_android+0x34a>
jmp    146f <get_real_android+0x34f>
jmp    1474 <get_real_android+0x354>
jmp    1479 <get_real_android+0x359>
jmp    147e <get_real_android+0x35e>
jmp    1483 <get_real_android+0x363>
jmp    1488 <get_real_android+0x368>
jmp    148d <get_real_android+0x36d>
jmp    1492 <get_real_android+0x372>
jmp    1497 <get_real_android+0x377>
jmp    149c <get_real_android+0x37c>
jmp    14a1 <get_real_android+0x381>
jmp    14a6 <get_real_android+0x386>
jmp    14ab <get_real_android+0x38b>
jmp    14b0 <get_real_android+0x390>
jmp    14b5 <get_real_android+0x395>
mov    -0x10(%rbp),%rdi
call   1030 <alloc_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_real_android>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed9(%rip),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     1144 <get_real_android+0x24>
lea    0xec1(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xec7(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1164 <get_real_android+0x44>
lea    0xeac(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xeb7(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1184 <get_real_android+0x64>
lea    0xe97(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xea9(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     11a4 <get_real_android+0x84>
lea    0xe89(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe96(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     11c4 <get_real_android+0xa4>
lea    0xe79(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe83(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     11e4 <get_real_android+0xc4>
lea    0xe66(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe6e(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1204 <get_real_android+0xe4>
lea    0xe53(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe5d(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1224 <get_real_android+0x104>
lea    0xe3e(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe4c(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1244 <get_real_android+0x124>
lea    0xe2d(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe3b(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1264 <get_real_android+0x144>
lea    0xe1c(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe32(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1284 <get_real_android+0x164>
lea    0xe0b(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe16(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     12a4 <get_real_android+0x184>
lea    0xe05(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xe11(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     12c4 <get_real_android+0x1a4>
lea    0xdf1(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xdfb(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     12e1 <get_real_android+0x1c1>
lea    0xde1(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xde2(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
lea    0xddb(%rip),%rbx
test   %rax,%rax
jne    134a <get_real_android+0x22a>
lea    0xdcb(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
jne    134a <get_real_android+0x22a>
lea    0xdca(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     132d <get_real_android+0x20d>
lea    0xdb0(%rip),%rbx
jmp    134a <get_real_android+0x22a>
lea    0xdb9(%rip),%rsi
mov    %r14,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
lea    0xd9f(%rip),%rbx
cmove  %r14,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <alloc_string@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"7.1\00"
@.str.1 = [11 x i8] c"Nougat 7.1\00"
@.str.2 = [4 x i8] c"7.0\00"
@.str.3 = [11 x i8] c"Nougat 7.0\00"
@.str.4 = [6 x i8] c"6.0.1\00"
@.str.5 = [18 x i8] c"Marshmallow 6.0.1\00"
@.str.6 = [4 x i8] c"6.0\00"
@.str.7 = [16 x i8] c"Marshmallow 6.0\00"
@.str.8 = [4 x i8] c"5.1\00"
@.str.9 = [13 x i8] c"Lollipop 5.1\00"
@.str.10 = [4 x i8] c"5.0\00"
@.str.11 = [13 x i8] c"Lollipop 5.0\00"
@.str.12 = [4 x i8] c"4.4\00"
@.str.13 = [11 x i8] c"KitKat 4.4\00"
@.str.14 = [4 x i8] c"4.3\00"
@.str.15 = [15 x i8] c"Jelly Bean 4.3\00"
@.str.16 = [4 x i8] c"4.2\00"
@.str.17 = [15 x i8] c"Jelly Bean 4.2\00"
@.str.18 = [4 x i8] c"4.1\00"
@.str.19 = [15 x i8] c"Jelly Bean 4.1\00"
@.str.20 = [4 x i8] c"4.0\00"
@.str.21 = [23 x i8] c"Ice Cream Sandwich 4.0\00"
@.str.22 = [3 x i8] c"3.\00"
@.str.23 = [12 x i8] c"Honeycomb 3\00"
@.str.24 = [4 x i8] c"2.3\00"
@.str.25 = [16 x i8] c"Gingerbread 2.3\00"
@.str.26 = [4 x i8] c"2.2\00"
@.str.27 = [10 x i8] c"Froyo 2.2\00"
@.str.28 = [4 x i8] c"2.0\00"
@.str.29 = [4 x i8] c"2.1\00"
@.str.30 = [9 x i8] c"Eclair 2\00"
@.str.31 = [4 x i8] c"1.6\00"
@.str.32 = [10 x i8] c"Donut 1.6\00"
@.str.33 = [4 x i8] c"1.5\00"
@.str.34 = [12 x i8] c"Cupcake 1.5\00"
define i8* @get_real_android(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strstr(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i8* @alloc_string(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %2
br label %128
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i64 @strstr(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i8* @alloc_string(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
store i8* %14, i8** %2
br label %128
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = call i64 @strstr(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i8* @alloc_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
store i8* %20, i8** %2
br label %128
21: ; preds = %15
%22 = load i8*, i8** %3
%23 = call i64 @strstr(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i8* @alloc_string(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
store i8* %26, i8** %2
br label %128
27: ; preds = %21
%28 = load i8*, i8** %3
%29 = call i64 @strstr(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i8* @alloc_string(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
store i8* %32, i8** %2
br label %128
33: ; preds = %27
%34 = load i8*, i8** %3
%35 = call i64 @strstr(i8* %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i8* @alloc_string(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
store i8* %38, i8** %2
br label %128
39: ; preds = %33
%40 = load i8*, i8** %3
%41 = call i64 @strstr(i8* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i8* @alloc_string(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0))
store i8* %44, i8** %2
br label %128
45: ; preds = %39
%46 = load i8*, i8** %3
%47 = call i64 @strstr(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i8* @alloc_string(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0))
store i8* %50, i8** %2
br label %128
51: ; preds = %45
%52 = load i8*, i8** %3
%53 = call i64 @strstr(i8* %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %51
%56 = call i8* @alloc_string(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0))
store i8* %56, i8** %2
br label %128
57: ; preds = %51
%58 = load i8*, i8** %3
%59 = call i64 @strstr(i8* %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %57
%62 = call i8* @alloc_string(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
store i8* %62, i8** %2
br label %128
63: ; preds = %57
%64 = load i8*, i8** %3
%65 = call i64 @strstr(i8* %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = call i8* @alloc_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0))
store i8* %68, i8** %2
br label %128
69: ; preds = %63
%70 = load i8*, i8** %3
%71 = call i64 @strstr(i8* %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %69
%74 = call i8* @alloc_string(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0))
store i8* %74, i8** %2
br label %128
75: ; preds = %69
%76 = load i8*, i8** %3
%77 = call i64 @strstr(i8* %76, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %81
79: ; preds = %75
%80 = call i8* @alloc_string(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.25, i64 0, i64 0))
store i8* %80, i8** %2
br label %128
81: ; preds = %75
%82 = load i8*, i8** %3
%83 = call i64 @strstr(i8* %82, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0))
%84 = icmp ne i64 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %81
%86 = call i8* @alloc_string(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0))
store i8* %86, i8** %2
br label %128
87: ; preds = %81
%88 = load i8*, i8** %3
%89 = call i64 @strstr(i8* %88, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0))
%90 = icmp ne i64 %89, 0
br i1 %90, label %95, label %91
91: ; preds = %87
%92 = load i8*, i8** %3
%93 = call i64 @strstr(i8* %92, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i64 0, i64 0))
%94 = icmp ne i64 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %91, %87
%96 = call i8* @alloc_string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
store i8* %96, i8** %2
br label %128
97: ; preds = %91
%98 = load i8*, i8** %3
%99 = call i64 @strstr(i8* %98, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.31, i64 0, i64 0))
%100 = icmp ne i64 %99, 0
br i1 %100, label %101, label %103
101: ; preds = %97
%102 = call i8* @alloc_string(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0))
store i8* %102, i8** %2
br label %128
103: ; preds = %97
%104 = load i8*, i8** %3
%105 = call i64 @strstr(i8* %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.33, i64 0, i64 0))
%106 = icmp ne i64 %105, 0
br i1 %106, label %107, label %109
107: ; preds = %103
%108 = call i8* @alloc_string(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0))
store i8* %108, i8** %2
br label %128
109: ; preds = %103
br label %110
110: ; preds = %109
br label %111
111: ; preds = %110
br label %112
112: ; preds = %111
br label %113
113: ; preds = %112
br label %114
114: ; preds = %113
br label %115
115: ; preds = %114
br label %116
116: ; preds = %115
br label %117
117: ; preds = %116
br label %118
118: ; preds = %117
br label %119
119: ; preds = %118
br label %120
120: ; preds = %119
br label %121
121: ; preds = %120
br label %122
122: ; preds = %121
br label %123
123: ; preds = %122
br label %124
124: ; preds = %123
br label %125
125: ; preds = %124
%126 = load i8*, i8** %3
%127 = call i8* @alloc_string(i8* %126)
store i8* %127, i8** %2
br label %128
128: ; preds = %125, %107, %101, %95, %85, %79, %73, %67, %61, %55, %49, %43, %37, %31, %25, %19, %13, %7
%129 = load i8*, i8** %2
ret i8* %129
}

LLVM IR (-O2):
@.str = [4 x i8] c"7.1\00"
@.str.1 = [11 x i8] c"Nougat 7.1\00"
@.str.2 = [4 x i8] c"7.0\00"
@.str.3 = [11 x i8] c"Nougat 7.0\00"
@.str.4 = [6 x i8] c"6.0.1\00"
@.str.5 = [18 x i8] c"Marshmallow 6.0.1\00"
@.str.6 = [4 x i8] c"6.0\00"
@.str.7 = [16 x i8] c"Marshmallow 6.0\00"
@.str.8 = [4 x i8] c"5.1\00"
@.str.9 = [13 x i8] c"Lollipop 5.1\00"
@.str.10 = [4 x i8] c"5.0\00"
@.str.11 = [13 x i8] c"Lollipop 5.0\00"
@.str.12 = [4 x i8] c"4.4\00"
@.str.13 = [11 x i8] c"KitKat 4.4\00"
@.str.14 = [4 x i8] c"4.3\00"
@.str.15 = [15 x i8] c"Jelly Bean 4.3\00"
@.str.16 = [4 x i8] c"4.2\00"
@.str.17 = [15 x i8] c"Jelly Bean 4.2\00"
@.str.18 = [4 x i8] c"4.1\00"
@.str.19 = [15 x i8] c"Jelly Bean 4.1\00"
@.str.20 = [4 x i8] c"4.0\00"
@.str.21 = [23 x i8] c"Ice Cream Sandwich 4.0\00"
@.str.22 = [3 x i8] c"3.\00"
@.str.23 = [12 x i8] c"Honeycomb 3\00"
@.str.24 = [4 x i8] c"2.3\00"
@.str.25 = [16 x i8] c"Gingerbread 2.3\00"
@.str.26 = [4 x i8] c"2.2\00"
@.str.27 = [10 x i8] c"Froyo 2.2\00"
@.str.28 = [4 x i8] c"2.0\00"
@.str.29 = [4 x i8] c"2.1\00"
@.str.30 = [9 x i8] c"Eclair 2\00"
@.str.31 = [4 x i8] c"1.6\00"
@.str.32 = [10 x i8] c"Donut 1.6\00"
@.str.33 = [4 x i8] c"1.5\00"
@.str.34 = [12 x i8] c"Cupcake 1.5\00"
define i8* @get_real_android(i8* %0) {
%2 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %56
4: ; preds = %1
%5 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %56
7: ; preds = %4
%8 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %56
10: ; preds = %7
%11 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %56
13: ; preds = %10
%14 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %56
16: ; preds = %13
%17 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %56
19: ; preds = %16
%20 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %56
22: ; preds = %19
%23 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %56
25: ; preds = %22
%26 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %56
28: ; preds = %25
%29 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %56
31: ; preds = %28
%32 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %56
34: ; preds = %31
%35 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %56
37: ; preds = %34
%38 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %56
40: ; preds = %37
%41 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %56
43: ; preds = %40
%44 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %56
46: ; preds = %43
%47 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %56
49: ; preds = %46
%50 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.31, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %49
%53 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.33, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
%55 = select i1 %54, i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0)
br label %56
56: ; preds = %52, %49, %43, %46, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7, %4, %1
%57 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), %10 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), %13 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), %16 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), %19 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), %22 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0), %25 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), %28 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), %31 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0), %34 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.25, i64 0, i64 0), %37 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), %40 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), %46 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), %43 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0), %49 ], [ %55, %52 ]
%58 = tail call i8* @alloc_string(i8* %57)
ret i8* %58
}