#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 */
int /*<<< orphan*/ err(int, char *);
int /*<<< orphan*/ errx(int, char *);
int /*<<< orphan*/ exit(int);
char *getenv(char *);
int getopt(int, char **, char *);
char *optarg;
scalar_t__ optind;
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ prlongname(char *);
char **process(char const *, char *, char **);
int /*<<< orphan*/ strcmp(char const *, char *);
int tgetent(char *, char *);
int /*<<< orphan*/ tgetflag(char const *);
int tgetnum(char const *);
scalar_t__ tgetstr(char const *, char **);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  int ch, exitval, n;
  char *cptr, *term, buf[1024], tbuf[1024];
  const char *p;
  term = NULL;
  while ((ch = getopt(argc, argv, "T:")) != -1)
    switch (ch) {
    case 'T':
      term = optarg;
      break;
    case '?':
    default:
      usage();
    }
  argc -= optind;
  argv += optind;
  if (argc < 1)
    usage();
  if (!term && !(term = getenv("TERM")))
    errx(2, "no terminal type specified and no TERM environmental variable.");
  if (tgetent(tbuf, term) != 1)
    err(3, "tgetent failure");
  for (exitval = 0; (p = *argv) != NULL; ++argv) {
    switch (*p) {
    case 'c':
      if (!strcmp(p, "clear"))
        p = "cl";
      break;
    case 'i':
      if (!strcmp(p, "init"))
        p = "is";
      break;
    case 'l':
      if (!strcmp(p, "longname")) {
        prlongname(tbuf);
        continue;
      }
      break;
    case 'r':
      if (!strcmp(p, "reset"))
        p = "rs";
      break;
    }
    cptr = buf;
    if (tgetstr(p, &cptr))
      argv = process(p, buf, argv);
    else if ((n = tgetnum(p)) != -1)
      (void)printf("%d\n", n);
    else
      exitval = !tgetflag(p);
  }
  exit(exitval);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe31(%rip),%rdx
call   10e0 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     126f <main+0x8f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x83c(%rbp)
sub    $0x3f,%eax
je     125e <main+0x7e>
jmp    1237 <main+0x57>
mov    -0x83c(%rbp),%eax
sub    $0x54,%eax
jne    1263 <main+0x83>
jmp    124b <main+0x6b>
mov    0x2da6(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    126a <main+0x8a>
jmp    1263 <main+0x83>
mov    $0x0,%al
call   10d0 <usage@plt>
jmp    1201 <main+0x21>
mov    0x2d6a(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    0x2d56(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    12aa <main+0xca>
mov    $0x0,%al
call   10d0 <usage@plt>
cmpq   $0x0,-0x30(%rbp)
jne    12e0 <main+0x100>
lea    0xd87(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    12e0 <main+0x100>
mov    $0x2,%edi
lea    0xd6d(%rip),%rsi
call   1040 <errx@plt>
lea    -0x830(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1080 <tgetent@plt>
cmp    $0x1,%eax
je     130a <main+0x12a>
mov    $0x3,%edi
lea    0xd82(%rip),%rsi
call   10b0 <err@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x838(%rbp)
cmp    $0x0,%rax
je     14c6 <main+0x2e6>
mov    -0x838(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x848(%rbp)
sub    $0xf,%eax
ja     141e <main+0x23e>
mov    -0x848(%rbp),%rax
lea    0xcaa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x838(%rbp),%rdi
lea    0xd2a(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1389 <main+0x1a9>
lea    0xd1b(%rip),%rax
mov    %rax,-0x838(%rbp)
jmp    141e <main+0x23e>
mov    -0x838(%rbp),%rdi
lea    0xd04(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    13b8 <main+0x1d8>
lea    0xcf4(%rip),%rax
mov    %rax,-0x838(%rbp)
jmp    141e <main+0x23e>
mov    -0x838(%rbp),%rdi
lea    0xcdd(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    13ea <main+0x20a>
lea    -0x830(%rbp),%rdi
call   10c0 <prlongname@plt>
jmp    14b5 <main+0x2d5>
jmp    141e <main+0x23e>
mov    -0x838(%rbp),%rdi
lea    0xcb4(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1419 <main+0x239>
lea    0xca5(%rip),%rax
mov    %rax,-0x838(%rbp)
jmp    141e <main+0x23e>
lea    -0x430(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x838(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   10f0 <tgetstr@plt>
cmp    $0x0,%rax
je     1463 <main+0x283>
mov    -0x838(%rbp),%rdi
lea    -0x430(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1060 <process@plt>
mov    %rax,-0x10(%rbp)
jmp    14b0 <main+0x2d0>
mov    -0x838(%rbp),%rdi
call   1090 <tgetnum@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
je     148f <main+0x2af>
mov    -0x1c(%rbp),%esi
lea    0xc35(%rip),%rdi
call   1050 <printf@plt>
jmp    14ab <main+0x2cb>
mov    -0x838(%rbp),%rdi
call   1070 <tgetflag@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
jmp    14b0 <main+0x2d0>
jmp    14b5 <main+0x2d5>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1311 <main+0x131>
mov    -0x18(%rbp),%edi
call   1100 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe43(%rip),%r15
mov    0x2df4(%rip),%r12
xor    %r14d,%r14d
jmp    1210 <main+0x30>
mov    (%r12),%r14
nopl   (%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   10e0 <getopt@plt>
cmp    $0x54,%eax
je     1209 <main+0x29>
cmp    $0xffffffff,%eax
je     1230 <main+0x50>
xor    %eax,%eax
call   10d0 <usage@plt>
jmp    1210 <main+0x30>
mov    0x2da9(%rip),%rax
mov    (%rax),%r15
sub    %r15d,%ebp
test   %ebp,%ebp
jg     1248 <main+0x68>
xor    %eax,%eax
call   10d0 <usage@plt>
test   %r14,%r14
jne    1275 <main+0x95>
lea    0xdef(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1275 <main+0x95>
lea    0xde0(%rip),%rsi
mov    $0x2,%edi
call   1040 <errx@plt>
xor    %r14d,%r14d
lea    (%rbx,%r15,8),%rbx
lea    0x10(%rsp),%rdi
mov    %r14,%rsi
call   1080 <tgetent@plt>
cmp    $0x1,%eax
je     129c <main+0xbc>
lea    0xdf5(%rip),%rsi
mov    $0x3,%edi
call   10b0 <err@plt>
mov    (%rbx),%r13
xor    %r14d,%r14d
test   %r13,%r13
jne    12af <main+0xcf>
mov    %r14d,%edi
call   1100 <exit@plt>
xor    %r14d,%r14d
lea    0x410(%rsp),%rbp
lea    0x8(%rsp),%r15
lea    0xd3a(%rip),%r12
jmp    12ee <main+0x10e>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   1060 <process@plt>
mov    %rax,%rbx
mov    0x8(%rbx),%r13
add    $0x8,%rbx
test   %r13,%r13
je     12a7 <main+0xc7>
movsbl 0x0(%r13),%eax
add    $0xffffff9d,%eax
cmp    $0xf,%eax
ja     139c <main+0x1bc>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
mov    %r13,%rdi
lea    0xd85(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
lea    0xd7d(%rip),%rax
jmp    1398 <main+0x1b8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
lea    0xd66(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
lea    0xd5d(%rip),%rax
jmp    1398 <main+0x1b8>
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
lea    0xd4e(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
jne    139c <main+0x1bc>
lea    0x10(%rsp),%rdi
call   10c0 <prlongname@plt>
jmp    12e1 <main+0x101>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
lea    0xd27(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
lea    0xd1f(%rip),%rax
cmove  %rax,%r13
mov    %rbp,0x8(%rsp)
mov    %r13,%rdi
mov    %r15,%rsi
call   10f0 <tgetstr@plt>
test   %rax,%rax
jne    12d0 <main+0xf0>
mov    %r13,%rdi
call   1090 <tgetnum@plt>
cmp    $0xffffffff,%eax
je     13d5 <main+0x1f5>
lea    0xcf1(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
jmp    12e1 <main+0x101>
mov    %r13,%rdi
call   1070 <tgetflag@plt>
xor    %r14d,%r14d
test   %eax,%eax
sete   %r14b
jmp    12e1 <main+0x101>

LLVM IR (-O0):
@.str = [3 x i8] c"T:\00"
@optarg = global i8* null
@optind = global i64 0
@.str.1 = [5 x i8] c"TERM\00"
@.str.2 = [63 x i8] c"no terminal type specified and no TERM environmental variable.\00"
@.str.3 = [16 x i8] c"tgetent failure\00"
@.str.4 = [6 x i8] c"clear\00"
@.str.5 = [3 x i8] c"cl\00"
@.str.6 = [5 x i8] c"init\00"
@.str.7 = [3 x i8] c"is\00"
@.str.8 = [9 x i8] c"longname\00"
@.str.9 = [6 x i8] c"reset\00"
@.str.10 = [3 x i8] c"rs\00"
@.str.11 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca [1024 x i8]
%12 = alloca [1024 x i8]
%13 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %10
br label %14
14: ; preds = %26, %2
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @getopt(i32 %15, i8** %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %17, i32* %6
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %27
19: ; preds = %14
%20 = load i32, i32* %6
switch i32 %20, label %24 [
i32 84, label %21
i32 63, label %23
]
21: ; preds = %19
%22 = load i8*, i8** @optarg
store i8* %22, i8** %10
br label %26
23: ; preds = %19
br label %24
24: ; preds = %19, %23
%25 = call i32 (...) @usage()
br label %26
26: ; preds = %24, %21
br label %14
27: ; preds = %14
%28 = load i64, i64* @optind
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = sub nsw i64 %30, %28
%32 = trunc i64 %31 to i32
store i32 %32, i32* %4
%33 = load i64, i64* @optind
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 %33
store i8** %35, i8*** %5
%36 = load i32, i32* %4
%37 = icmp slt i32 %36, 1
br i1 %37, label %38, label %40
38: ; preds = %27
%39 = call i32 (...) @usage()
br label %40
40: ; preds = %38, %27
%41 = load i8*, i8** %10
%42 = icmp ne i8* %41, null
br i1 %42, label %48, label %43
43: ; preds = %40
%44 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i8* %44, i8** %10
%45 = icmp ne i8* %44, null
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = call i32 @errx(i32 2, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
br label %48
48: ; preds = %46, %43, %40
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%50 = load i8*, i8** %10
%51 = call i32 @tgetent(i8* %49, i8* %50)
%52 = icmp ne i32 %51, 1
br i1 %52, label %53, label %55
53: ; preds = %48
%54 = call i32 @err(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %55
55: ; preds = %53, %48
store i32 0, i32* %7
br label %56
56: ; preds = %115, %55
%57 = load i8**, i8*** %5
%58 = load i8*, i8** %57
store i8* %58, i8** %13
%59 = icmp ne i8* %58, null
br i1 %59, label %60, label %118
60: ; preds = %56
%61 = load i8*, i8** %13
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
switch i32 %63, label %90 [
i32 99, label %64
i32 105, label %70
i32 108, label %76
i32 114, label %84
]
64: ; preds = %60
%65 = load i8*, i8** %13
%66 = call i32 @strcmp(i8* %65, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%67 = icmp ne i32 %66, 0
br i1 %67, label %69, label %68
68: ; preds = %64
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %13
br label %69
69: ; preds = %68, %64
br label %90
70: ; preds = %60
%71 = load i8*, i8** %13
%72 = call i32 @strcmp(i8* %71, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%73 = icmp ne i32 %72, 0
br i1 %73, label %75, label %74
74: ; preds = %70
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8** %13
br label %75
75: ; preds = %74, %70
br label %90
76: ; preds = %60
%77 = load i8*, i8** %13
%78 = call i32 @strcmp(i8* %77, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%79 = icmp ne i32 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %76
%81 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%82 = call i32 @prlongname(i8* %81)
br label %115
83: ; preds = %76
br label %90
84: ; preds = %60
%85 = load i8*, i8** %13
%86 = call i32 @strcmp(i8* %85, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%87 = icmp ne i32 %86, 0
br i1 %87, label %89, label %88
88: ; preds = %84
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8** %13
br label %89
89: ; preds = %88, %84
br label %90
90: ; preds = %60, %89, %83, %75, %69
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
store i8* %91, i8** %9
%92 = load i8*, i8** %13
%93 = call i64 @tgetstr(i8* %92, i8** %9)
%94 = icmp ne i64 %93, 0
br i1 %94, label %95, label %100
95: ; preds = %90
%96 = load i8*, i8** %13
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%98 = load i8**, i8*** %5
%99 = call i8** @process(i8* %96, i8* %97, i8** %98)
store i8** %99, i8*** %5
br label %114
100: ; preds = %90
%101 = load i8*, i8** %13
%102 = call i32 @tgetnum(i8* %101)
store i32 %102, i32* %8
%103 = icmp ne i32 %102, -1
br i1 %103, label %104, label %107
104: ; preds = %100
%105 = load i32, i32* %8
%106 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %105)
br label %113
107: ; preds = %100
%108 = load i8*, i8** %13
%109 = call i32 @tgetflag(i8* %108)
%110 = icmp ne i32 %109, 0
%111 = xor i1 %110, true
%112 = zext i1 %111 to i32
store i32 %112, i32* %7
br label %113
113: ; preds = %107, %104
br label %114
114: ; preds = %113, %95
br label %115
115: ; preds = %114, %80
%116 = load i8**, i8*** %5
%117 = getelementptr inbounds i8*, i8** %116, i32 1
store i8** %117, i8*** %5
br label %56
118: ; preds = %56
%119 = load i32, i32* %7
%120 = call i32 @exit(i32 %119)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"T:\00"
@optarg = global i8* null
@optind = global i64 0
@.str.1 = [5 x i8] c"TERM\00"
@.str.2 = [63 x i8] c"no terminal type specified and no TERM environmental variable.\00"
@.str.3 = [16 x i8] c"tgetent failure\00"
@.str.4 = [6 x i8] c"clear\00"
@.str.5 = [3 x i8] c"cl\00"
@.str.6 = [5 x i8] c"init\00"
@.str.7 = [3 x i8] c"is\00"
@.str.8 = [9 x i8] c"longname\00"
@.str.9 = [6 x i8] c"reset\00"
@.str.10 = [3 x i8] c"rs\00"
@.str.11 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca [1024 x i8]
%5 = alloca [1024 x i8]
%6 = bitcast i8** %3 to i8*
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
br label %9
9: ; preds = %13, %2
%10 = phi i8* [ %14, %13 ], [ null, %2 ]
br label %11
11: ; preds = %9, %15
%12 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
switch i32 %12, label %15 [
i32 -1, label %17
i32 84, label %13
]
13: ; preds = %11
%14 = load i8*, i8** @optarg
br label %9
15: ; preds = %11
%16 = tail call i32 (...) @usage()
br label %11
17: ; preds = %11
%18 = load i64, i64* @optind
%19 = trunc i64 %18 to i32
%20 = sub i32 %0, %19
%21 = getelementptr inbounds i8*, i8** %1, i64 %18
%22 = icmp slt i32 %20, 1
br i1 %22, label %23, label %25
23: ; preds = %17
%24 = tail call i32 (...) @usage()
br label %25
25: ; preds = %23, %17
%26 = icmp eq i8* %10, null
br i1 %26, label %27, label %32
27: ; preds = %25
%28 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp eq i8* %28, null
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = tail call i32 @errx(i32 2, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30, %27, %25
%33 = phi i8* [ %10, %25 ], [ %28, %27 ], [ null, %30 ]
%34 = call i32 @tgetent(i8* %8, i8* %33)
%35 = icmp eq i32 %34, 1
br i1 %35, label %38, label %36
36: ; preds = %32
%37 = call i32 @err(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %38
38: ; preds = %36, %32
%39 = load i8*, i8** %21
%40 = icmp eq i8* %39, null
br i1 %40, label %85, label %41
41: ; preds = %38, %79
%42 = phi i8* [ %83, %79 ], [ %39, %38 ]
%43 = phi i32 [ %81, %79 ], [ 0, %38 ]
%44 = phi i8** [ %82, %79 ], [ %21, %38 ]
%45 = load i8, i8* %42
%46 = sext i8 %45 to i32
switch i32 %46, label %64 [
i32 99, label %47
i32 105, label %51
i32 108, label %55
i32 114, label %60
]
47: ; preds = %41
%48 = call i32 @strcmp(i8* %42, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%49 = icmp eq i32 %48, 0
%50 = select i1 %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %42
br label %64
51: ; preds = %41
%52 = call i32 @strcmp(i8* %42, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
%54 = select i1 %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %42
br label %64
55: ; preds = %41
%56 = call i32 @strcmp(i8* %42, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %64
58: ; preds = %55
%59 = call i32 @prlongname(i8* %8)
br label %79
60: ; preds = %41
%61 = call i32 @strcmp(i8* %42, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%62 = icmp eq i32 %61, 0
%63 = select i1 %62, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %42
br label %64
64: ; preds = %55, %41, %60, %51, %47
%65 = phi i8* [ %42, %41 ], [ %63, %60 ], [ %42, %55 ], [ %54, %51 ], [ %50, %47 ]
store i8* %7, i8** %3
%66 = call i64 @tgetstr(i8* %65, i8** %3)
%67 = icmp eq i64 %66, 0
br i1 %67, label %70, label %68
68: ; preds = %64
%69 = call i8** @process(i8* %65, i8* %7, i8** %44)
br label %79
70: ; preds = %64
%71 = call i32 @tgetnum(i8* %65)
%72 = icmp eq i32 %71, -1
br i1 %72, label %75, label %73
73: ; preds = %70
%74 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %71)
br label %79
75: ; preds = %70
%76 = call i32 @tgetflag(i8* %65)
%77 = icmp eq i32 %76, 0
%78 = zext i1 %77 to i32
br label %79
79: ; preds = %68, %75, %73, %58
%80 = phi i8** [ %69, %68 ], [ %44, %73 ], [ %44, %75 ], [ %44, %58 ]
%81 = phi i32 [ %43, %68 ], [ %43, %73 ], [ %78, %75 ], [ %43, %58 ]
%82 = getelementptr inbounds i8*, i8** %80, i64 1
%83 = load i8*, i8** %82
%84 = icmp eq i8* %83, null
br i1 %84, label %85, label %41
85: ; preds = %79, %38
%86 = phi i32 [ 0, %38 ], [ %81, %79 ]
%87 = call i32 @exit(i32 %86)
unreachable
}