#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 */
scalar_t__ strcmp(char const *, char *);
char *strdup(char *);
char *tgetstr(const char *id, char **area) {
  if (strcmp(id, "cm") == 0)
    return strdup("\x1b[%i%d;%dH");
  if (strcmp(id, "ho") == 0)
    return strdup("\x1b[H");
  if (strcmp(id, "nd") == 0)
    return strdup("\x1b"
                  "[C");
  if (strcmp(id, "up") == 0)
    return strdup("\x1b"
                  "[A");
  if (strcmp(id, "do") == 0)
    return strdup("\x1b"
                  "[B");
  if (strcmp(id, "ce") == 0)
    return strdup("\x1b"
                  "[K");
  if (strcmp(id, "cd") == 0)
    return strdup("\x1b"
                  "[J");
  if (strcmp(id, "cl") == 0)
    return strdup("\x1b"
                  "[H"
                  "\x1b"
                  "[J");
  if (strcmp(id, "cr") == 0)
    return strdup("\r");
  if (strcmp(id, "nl") == 0)
    return strdup("\n");
  if (strcmp(id, "nw") == 0)
    return strdup("\n\r");
  if (strcmp(id, "le") == 0)
    return strdup("\x08");
  if (strcmp(id, "so") == 0)
    return strdup("\x1b"
                  "[7m");
  if (strcmp(id, "md") == 0)
    return strdup("\x1b"
                  "[1m");
  if (strcmp(id, "mh") == 0)
    return strdup("\x1b"
                  "[2m");
  if (strcmp(id, "mr") == 0)
    return strdup("\x1b"
                  "[7m");
  if (strcmp(id, "us") == 0)
    return strdup("\x1b"
                  "[4m");
  if (strcmp(id, "ue") == 0)
    return strdup("\x1b"
                  "[m");
  if (strcmp(id, "se") == 0)
    return strdup("\x1b"
                  "[m");
  if (strcmp(id, "me") == 0)
    return strdup("\x1b"
                  "[m");
  return 0;
}


x86 assembly (clang, -O0):
<tgetstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115f <tgetstr+0x3f>
lea    0xeb2(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    118e <tgetstr+0x6e>
lea    0xe91(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xe7c(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11bd <tgetstr+0x9d>
lea    0xe69(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xe54(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11ec <tgetstr+0xcc>
lea    0xe41(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xe2c(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    121b <tgetstr+0xfb>
lea    0xe19(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    124a <tgetstr+0x12a>
lea    0xdf1(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xddc(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1279 <tgetstr+0x159>
lea    0xdcf(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xdb0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12a8 <tgetstr+0x188>
lea    0xd9d(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xd8b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12d7 <tgetstr+0x1b7>
lea    0xd81(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xd5f(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1306 <tgetstr+0x1e6>
lea    0xd4c(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xd35(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1335 <tgetstr+0x215>
lea    0xd22(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xd0c(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1364 <tgetstr+0x244>
lea    0xcf9(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xce2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1393 <tgetstr+0x273>
lea    0xccf(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xcbb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    13c2 <tgetstr+0x2a2>
lea    0xca8(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xc94(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    13f1 <tgetstr+0x2d1>
lea    0xc81(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xc6d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1420 <tgetstr+0x300>
lea    0xc42(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xc41(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    144f <tgetstr+0x32f>
lea    0xc2e(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xc1a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    147e <tgetstr+0x35e>
lea    0xc07(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xbf2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    14ad <tgetstr+0x38d>
lea    0xbd8(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xbc6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    14dc <tgetstr+0x3bc>
lea    0xba9(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    14e4 <tgetstr+0x3c4>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgetstr>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1305 <tgetstr+0x1e5>
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1312 <tgetstr+0x1f2>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     131f <tgetstr+0x1ff>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     132c <tgetstr+0x20c>
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1339 <tgetstr+0x219>
lea    0xe8a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1346 <tgetstr+0x226>
lea    0xe79(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1353 <tgetstr+0x233>
lea    0xe64(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1360 <tgetstr+0x240>
lea    0xe56(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     136d <tgetstr+0x24d>
lea    0xe41(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     137a <tgetstr+0x25a>
lea    0xe2e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1387 <tgetstr+0x267>
lea    0xe1c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1394 <tgetstr+0x274>
lea    0xe09(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13a1 <tgetstr+0x281>
lea    0xdf9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13ae <tgetstr+0x28e>
lea    0xde9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13bb <tgetstr+0x29b>
lea    0xdd9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13a1 <tgetstr+0x281>
lea    0xdc4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13d5 <tgetstr+0x2b5>
lea    0xdb4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13c8 <tgetstr+0x2a8>
lea    0xda3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13c8 <tgetstr+0x2a8>
lea    0xd8e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13c8 <tgetstr+0x2a8>
xor    %eax,%eax
pop    %rbx
ret
lea    0xcf7(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcf8(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcf2(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcec(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xce6(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xce0(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xce0(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcd0(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcd6(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcc3(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcbb(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcb4(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xcac(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xca7(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xca2(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xca8(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xc93(%rip),%rdi
pop    %rbx
jmp    1040 <strdup@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"cm\00"
@.str.1 = [11 x i8] c"\1B[%i%d;%dH\00"
@.str.2 = [3 x i8] c"ho\00"
@.str.3 = [4 x i8] c"\1B[H\00"
@.str.4 = [3 x i8] c"nd\00"
@.str.5 = [4 x i8] c"\1B[C\00"
@.str.6 = [3 x i8] c"up\00"
@.str.7 = [4 x i8] c"\1B[A\00"
@.str.8 = [3 x i8] c"do\00"
@.str.9 = [4 x i8] c"\1B[B\00"
@.str.10 = [3 x i8] c"ce\00"
@.str.11 = [4 x i8] c"\1B[K\00"
@.str.12 = [3 x i8] c"cd\00"
@.str.13 = [4 x i8] c"\1B[J\00"
@.str.14 = [3 x i8] c"cl\00"
@.str.15 = [7 x i8] c"\1B[H\1B[J\00"
@.str.16 = [3 x i8] c"cr\00"
@.str.17 = [2 x i8] c"\0D\00"
@.str.18 = [3 x i8] c"nl\00"
@.str.19 = [2 x i8] c"\0A\00"
@.str.20 = [3 x i8] c"nw\00"
@.str.21 = [3 x i8] c"\0A\0D\00"
@.str.22 = [3 x i8] c"le\00"
@.str.23 = [2 x i8] c"\08\00"
@.str.24 = [3 x i8] c"so\00"
@.str.25 = [5 x i8] c"\1B[7m\00"
@.str.26 = [3 x i8] c"md\00"
@.str.27 = [5 x i8] c"\1B[1m\00"
@.str.28 = [3 x i8] c"mh\00"
@.str.29 = [5 x i8] c"\1B[2m\00"
@.str.30 = [3 x i8] c"mr\00"
@.str.31 = [3 x i8] c"us\00"
@.str.32 = [5 x i8] c"\1B[4m\00"
@.str.33 = [3 x i8] c"ue\00"
@.str.34 = [4 x i8] c"\1B[m\00"
@.str.35 = [3 x i8] c"se\00"
@.str.36 = [3 x i8] c"me\00"
define i8* @tgetstr(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
store i8* %0, i8** %4
store i8** %1, i8*** %5
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i8* @strdup(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i8* %10, i8** %3
br label %126
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %16, i8** %3
br label %126
17: ; preds = %11
%18 = load i8*, i8** %4
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
store i8* %22, i8** %3
br label %126
23: ; preds = %17
%24 = load i8*, i8** %4
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
store i8* %28, i8** %3
br label %126
29: ; preds = %23
%30 = load i8*, i8** %4
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
store i8* %34, i8** %3
br label %126
35: ; preds = %29
%36 = load i8*, i8** %4
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
store i8* %40, i8** %3
br label %126
41: ; preds = %35
%42 = load i8*, i8** %4
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
store i8* %46, i8** %3
br label %126
47: ; preds = %41
%48 = load i8*, i8** %4
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = call i8* @strdup(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
store i8* %52, i8** %3
br label %126
53: ; preds = %47
%54 = load i8*, i8** %4
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = call i8* @strdup(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
store i8* %58, i8** %3
br label %126
59: ; preds = %53
%60 = load i8*, i8** %4
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = call i8* @strdup(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0))
store i8* %64, i8** %3
br label %126
65: ; preds = %59
%66 = load i8*, i8** %4
%67 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %65
%70 = call i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
store i8* %70, i8** %3
br label %126
71: ; preds = %65
%72 = load i8*, i8** %4
%73 = call i64 @strcmp(i8* %72, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %71
%76 = call i8* @strdup(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
store i8* %76, i8** %3
br label %126
77: ; preds = %71
%78 = load i8*, i8** %4
%79 = call i64 @strcmp(i8* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %77
%82 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0))
store i8* %82, i8** %3
br label %126
83: ; preds = %77
%84 = load i8*, i8** %4
%85 = call i64 @strcmp(i8* %84, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %83
%88 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.27, i64 0, i64 0))
store i8* %88, i8** %3
br label %126
89: ; preds = %83
%90 = load i8*, i8** %4
%91 = call i64 @strcmp(i8* %90, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0))
%92 = icmp eq i64 %91, 0
br i1 %92, label %93, label %95
93: ; preds = %89
%94 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0))
store i8* %94, i8** %3
br label %126
95: ; preds = %89
%96 = load i8*, i8** %4
%97 = call i64 @strcmp(i8* %96, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i64 0, i64 0))
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %101
99: ; preds = %95
%100 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0))
store i8* %100, i8** %3
br label %126
101: ; preds = %95
%102 = load i8*, i8** %4
%103 = call i64 @strcmp(i8* %102, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0))
%104 = icmp eq i64 %103, 0
br i1 %104, label %105, label %107
105: ; preds = %101
%106 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0))
store i8* %106, i8** %3
br label %126
107: ; preds = %101
%108 = load i8*, i8** %4
%109 = call i64 @strcmp(i8* %108, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.33, i64 0, i64 0))
%110 = icmp eq i64 %109, 0
br i1 %110, label %111, label %113
111: ; preds = %107
%112 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0))
store i8* %112, i8** %3
br label %126
113: ; preds = %107
%114 = load i8*, i8** %4
%115 = call i64 @strcmp(i8* %114, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.35, i64 0, i64 0))
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %119
117: ; preds = %113
%118 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0))
store i8* %118, i8** %3
br label %126
119: ; preds = %113
%120 = load i8*, i8** %4
%121 = call i64 @strcmp(i8* %120, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.36, i64 0, i64 0))
%122 = icmp eq i64 %121, 0
br i1 %122, label %123, label %125
123: ; preds = %119
%124 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0))
store i8* %124, i8** %3
br label %126
125: ; preds = %119
store i8* null, i8** %3
br label %126
126: ; preds = %125, %123, %117, %111, %105, %99, %93, %87, %81, %75, %69, %63, %57, %51, %45, %39, %33, %27, %21, %15, %9
%127 = load i8*, i8** %3
ret i8* %127
}

LLVM IR (-O2):
@.str = [3 x i8] c"cm\00"
@.str.1 = [11 x i8] c"\1B[%i%d;%dH\00"
@.str.2 = [3 x i8] c"ho\00"
@.str.3 = [4 x i8] c"\1B[H\00"
@.str.4 = [3 x i8] c"nd\00"
@.str.5 = [4 x i8] c"\1B[C\00"
@.str.6 = [3 x i8] c"up\00"
@.str.7 = [4 x i8] c"\1B[A\00"
@.str.8 = [3 x i8] c"do\00"
@.str.9 = [4 x i8] c"\1B[B\00"
@.str.10 = [3 x i8] c"ce\00"
@.str.11 = [4 x i8] c"\1B[K\00"
@.str.12 = [3 x i8] c"cd\00"
@.str.13 = [4 x i8] c"\1B[J\00"
@.str.14 = [3 x i8] c"cl\00"
@.str.15 = [7 x i8] c"\1B[H\1B[J\00"
@.str.16 = [3 x i8] c"cr\00"
@.str.17 = [2 x i8] c"\0D\00"
@.str.18 = [3 x i8] c"nl\00"
@.str.19 = [2 x i8] c"\0A\00"
@.str.20 = [3 x i8] c"nw\00"
@.str.21 = [3 x i8] c"\0A\0D\00"
@.str.22 = [3 x i8] c"le\00"
@.str.23 = [2 x i8] c"\08\00"
@.str.24 = [3 x i8] c"so\00"
@.str.25 = [5 x i8] c"\1B[7m\00"
@.str.26 = [3 x i8] c"md\00"
@.str.27 = [5 x i8] c"\1B[1m\00"
@.str.28 = [3 x i8] c"mh\00"
@.str.29 = [5 x i8] c"\1B[2m\00"
@.str.30 = [3 x i8] c"mr\00"
@.str.31 = [3 x i8] c"us\00"
@.str.32 = [5 x i8] c"\1B[4m\00"
@.str.33 = [3 x i8] c"ue\00"
@.str.34 = [4 x i8] c"\1B[m\00"
@.str.35 = [3 x i8] c"se\00"
@.str.36 = [3 x i8] c"me\00"
define noalias i8* @tgetstr(i8* %0, i8** nocapture readnone %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call dereferenceable_or_null(11) i8* @strdup(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %102
7: ; preds = %2
%8 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %102
12: ; preds = %7
%13 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %102
17: ; preds = %12
%18 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %102
22: ; preds = %17
%23 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %102
27: ; preds = %22
%28 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
br label %102
32: ; preds = %27
%33 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
br label %102
37: ; preds = %32
%38 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = tail call dereferenceable_or_null(7) i8* @strdup(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
br label %102
42: ; preds = %37
%43 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = tail call dereferenceable_or_null(2) i8* @strdup(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %102
47: ; preds = %42
%48 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = tail call dereferenceable_or_null(2) i8* @strdup(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0))
br label %102
52: ; preds = %47
%53 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = tail call dereferenceable_or_null(3) i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
br label %102
57: ; preds = %52
%58 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = tail call dereferenceable_or_null(2) i8* @strdup(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
br label %102
62: ; preds = %57
%63 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0))
br label %102
67: ; preds = %62
%68 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.27, i64 0, i64 0))
br label %102
72: ; preds = %67
%73 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0))
br label %102
77: ; preds = %72
%78 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0))
br label %102
82: ; preds = %77
%83 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %82
%86 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0))
br label %102
87: ; preds = %82
%88 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.33, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0))
br label %102
92: ; preds = %87
%93 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.35, i64 0, i64 0))
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %92
%96 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0))
br label %102
97: ; preds = %92
%98 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.36, i64 0, i64 0))
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %102
100: ; preds = %97
%101 = tail call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0))
br label %102
102: ; preds = %97, %100, %95, %90, %85, %80, %75, %70, %65, %60, %55, %50, %45, %40, %35, %30, %25, %20, %15, %10, %5
%103 = phi i8* [ %6, %5 ], [ %11, %10 ], [ %16, %15 ], [ %21, %20 ], [ %26, %25 ], [ %31, %30 ], [ %36, %35 ], [ %41, %40 ], [ %46, %45 ], [ %51, %50 ], [ %56, %55 ], [ %61, %60 ], [ %66, %65 ], [ %71, %70 ], [ %76, %75 ], [ %81, %80 ], [ %86, %85 ], [ %91, %90 ], [ %96, %95 ], [ %101, %100 ], [ null, %97 ]
ret i8* %103
}