#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fbtext_clear();
int /*<<< orphan*/ fbtext_gotoxyc(int, int);
int /*<<< orphan*/ fbtext_init();
int /*<<< orphan*/ fbtext_printf(char *, char const *);
int /*<<< orphan*/ fbtext_setcolor(int, int, int);
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int main(int argc, char **argv) {
  int show_help = 0;
  int read_stdin = 0;
  int red_val = 0, green_val = 0, blue_val = 255;
  int start_x = 0, start_y = 0;
  const char *s = NULL;
  if (argc < 2) {
    show_help = 1;
  } else {
    if (!strcmp(argv[1], "--help")) {
      show_help = 1;
    } else {
      int n = 1;
      while (n < argc && !strncmp(argv[n], "--", 2)) {
        if (!strncmp(argv[n], "--color=", 8)) {
          sscanf(&argv[n][8], "%d,%d,%d", &red_val, &green_val, &blue_val);
        } else if (!strncmp(argv[n], "--pos=", 6)) {
          int x, y;
          sscanf(&argv[n][6], "%d,%d", &x, &y);
          start_x = x;
          start_y = y;
        } else {
          fprintf(stderr, "Unrecognized option %s\n", argv[n]);
          show_help = 1;
        }
        n++;
      }
      if (n >= argc) {
        show_help = 1;
      } else {
        s = argv[n];
        if (!strcmp(argv[n], "-")) {
          read_stdin = 1;
        }
      }
    }
  }
  if (show_help) {
    printf("%s v"
           "0.12"
           "; syntax: %s [options] <string>\n",
           argv[0], argv[0]);
    printf("<string> may be - to read from stdin\n");
    printf("options may be one or more of:\n");
    printf(" --help	Display this message\n");
    printf(" --color=r,g,b	Text color (default=0,0,255)\n");
    printf(" --pos=col,row	Display at specified character position\n");
    exit(0);
  }
  fbtext_init();
  fbtext_clear();
  fbtext_setcolor(red_val, green_val, blue_val);
  if (start_x != 0 || start_y != 0) {
    fprintf(stderr, "Starting at col %d row %d\n", start_x, start_y);
  }
  fbtext_gotoxyc(start_x, start_y);
  if (read_stdin) {
    char buff[128];
    int line_count = 0;
    while (line_count < 25 && fgets(buff, 80, stdin)) {
      buff[80] = '\0';
      fbtext_printf("%s", buff);
      line_count++;
    }
  } else {
    fbtext_printf("%s", s);
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0xff,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movq   $0x0,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1228 <main+0x68>
movl   $0x1,-0x14(%rbp)
jmp    13f8 <main+0x238>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc9(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1251 <main+0x91>
movl   $0x1,-0x14(%rbp)
jmp    13f3 <main+0x233>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd5(%rbp)
jge    1297 <main+0xd7>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd88(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0xd5(%rbp)
mov    -0xd5(%rbp),%al
test   $0x1,%al
jne    12aa <main+0xea>
jmp    1399 <main+0x1d9>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd4d(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12ff <main+0x13f>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x8,%rdi
lea    0xd2c(%rip),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x24(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
jmp    138b <main+0x1cb>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd0a(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    135c <main+0x19c>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x6,%rdi
lea    0xcda(%rip),%rsi
lea    -0x40(%rbp),%rdx
lea    -0x44(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
mov    -0x40(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1386 <main+0x1c6>
mov    0x2c75(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xcab(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x14(%rbp)
jmp    138b <main+0x1cb>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1258 <main+0x98>
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     13b1 <main+0x1f1>
movl   $0x1,-0x14(%rbp)
jmp    13ee <main+0x22e>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc34(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    13e9 <main+0x229>
movl   $0x1,-0x18(%rbp)
jmp    13ee <main+0x22e>
jmp    13f3 <main+0x233>
jmp    13f8 <main+0x238>
cmpl   $0x0,-0x14(%rbp)
je     146b <main+0x2ab>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xc24(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc3f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc57(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc69(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc79(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc98(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    $0x0,%al
call   10a0 <fbtext_init@plt>
mov    $0x0,%al
call   10c0 <fbtext_clear@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   10d0 <fbtext_setcolor@plt>
cmpl   $0x0,-0x28(%rbp)
jne    149b <main+0x2db>
cmpl   $0x0,-0x2c(%rbp)
je     14b8 <main+0x2f8>
mov    0x2b36(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%edx
mov    -0x2c(%rbp),%ecx
lea    0xc7c(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1050 <fbtext_gotoxyc@plt>
cmpl   $0x0,-0x18(%rbp)
je     1556 <main+0x396>
movl   $0x0,-0xd4(%rbp)
xor    %eax,%eax
cmpl   $0x19,-0xd4(%rbp)
mov    %al,-0xd6(%rbp)
jge    1513 <main+0x353>
lea    -0xd0(%rbp),%rdi
mov    0x2aee(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd6(%rbp)
mov    -0xd6(%rbp),%al
test   $0x1,%al
jne    1526 <main+0x366>
jmp    1551 <main+0x391>
movb   $0x0,-0x80(%rbp)
lea    -0xd0(%rbp),%rsi
lea    0xc10(%rip),%rdi
call   1040 <fbtext_printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    14d7 <main+0x317>
jmp    1566 <main+0x3a6>
mov    -0x38(%rbp),%rsi
lea    0xbe7(%rip),%rdi
call   1040 <fbtext_printf@plt>
mov    $0x1,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rsi,%rbx
movl   $0x0,0x18(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0xff,0x10(%rsp)
cmp    $0x2,%edi
jl     1471 <main+0x2a1>
mov    %edi,%r14d
mov    0x8(%rbx),%rbp
lea    0xded(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1471 <main+0x2a1>
lea    0xddd(%rip),%rsi
mov    %rbp,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1259 <main+0x89>
movl   $0x0,0xc(%rsp)
mov    $0x1,%r13d
movl   $0x0,0x8(%rsp)
xor    %r15d,%r15d
jmp    137c <main+0x1ac>
mov    %r14d,%eax
mov    $0x2,%r14d
sub    %rax,%r14
mov    $0x1,%r13d
lea    0xd98(%rip),%rbp
lea    0xd8e(%rip),%r12
xor    %r15d,%r15d
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
nopl   0x0(%rax)
mov    (%rbx,%r13,8),%rdi
mov    %rbp,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    (%rbx,%r13,8),%rdi
test   %eax,%eax
je     12f0 <main+0x120>
lea    0xd6c(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1320 <main+0x150>
mov    0x2d13(%rip),%rax
mov    (%rax),%edi
mov    (%rbx,%r13,8),%rdx
lea    0xd51(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%r15d
jmp    1350 <main+0x180>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x8,%rdi
lea    0xd18(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
xor    %eax,%eax
call   10c0 <sscanf@plt>
jmp    1350 <main+0x180>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx,%r13,8),%rdi
add    $0x6,%rdi
lea    0xce7(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x1c(%rsp),%rcx
xor    %eax,%eax
call   10c0 <sscanf@plt>
mov    0x20(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    0x1c(%rsp),%eax
mov    %eax,0xc(%rsp)
lea    (%r14,%r13,1),%rax
cmp    $0x1,%rax
je     1471 <main+0x2a1>
mov    0x8(%rbx,%r13,8),%rdi
mov    %r12,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
add    $0x1,%r13
test   %eax,%eax
je     1290 <main+0xc0>
mov    (%rbx,%r13,8),%r14
lea    0xc81(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %r15d,%r15d
jne    1471 <main+0x2a1>
mov    %eax,%r12d
xor    %r15d,%r15d
xor    %eax,%eax
call   10b0 <fbtext_init@plt>
xor    %eax,%eax
call   10d0 <fbtext_clear@plt>
mov    0x18(%rsp),%edi
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
call   10e0 <fbtext_setcolor@plt>
mov    0x8(%rsp),%ebp
mov    %ebp,%eax
mov    0xc(%rsp),%ebx
or     %ebx,%eax
mov    $0x0,%edi
je     13f0 <main+0x220>
mov    0x2c01(%rip),%rax
mov    (%rax),%edi
lea    0xc84(%rip),%rsi
mov    %ebp,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %ebx,%r15d
mov    %ebp,%edi
mov    %r15d,%esi
call   1050 <fbtext_gotoxyc@plt>
test   %r12d,%r12d
je     140e <main+0x23e>
lea    0xc7b(%rip),%rdi
mov    %r14,%rsi
call   1040 <fbtext_printf@plt>
jmp    145a <main+0x28a>
mov    $0x19,%ebp
mov    0x2bce(%rip),%r15
lea    0x20(%rsp),%rbx
lea    0xc59(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     145a <main+0x28a>
movb   $0x0,0x70(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fbtext_printf@plt>
add    $0xffffffff,%ebp
jne    1430 <main+0x260>
mov    $0x1,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rdx
lea    0xbc0(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xbf6(%rip),%rdi
call   1060 <puts@plt>
lea    0xc0f(%rip),%rdi
call   1060 <puts@plt>
lea    0xc22(%rip),%rdi
call   1060 <puts@plt>
lea    0xc33(%rip),%rdi
call   1060 <puts@plt>
lea    0xc53(%rip),%rdi
call   1060 <puts@plt>
xor    %edi,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"--help\00"
@.str.1 = [3 x i8] c"--\00"
@.str.2 = [9 x i8] c"--color=\00"
@.str.3 = [9 x i8] c"%d,%d,%d\00"
@.str.4 = [7 x i8] c"--pos=\00"
@.str.5 = [6 x i8] c"%d,%d\00"
@stderr = global i32 0
@.str.6 = [24 x i8] c"Unrecognized option %s\0A\00"
@.str.7 = [2 x i8] c"-\00"
@.str.8 = [41 x i8] c"%s v0.12; syntax: %s [options] <string>\0A\00"
@.str.9 = [38 x i8] c"<string> may be - to read from stdin\0A\00"
@.str.10 = [32 x i8] c"options may be one or more of:\0A\00"
@.str.11 = [30 x i8] c" --help\09Display this message\0A\00"
@.str.12 = [45 x i8] c" --color=r,g,b\09Text color (default=0,0,255)\0A\00"
@.str.13 = [56 x i8] c" --pos=col,row\09Display at specified character position\0A\00"
@.str.14 = [27 x i8] c"Starting at col %d row %d\0A\00"
@stdin = global i32 0
@.str.15 = [3 x i8] c"%s\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 i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [128 x i8]
%18 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 255, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i8* null, i8** %13
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 2
br i1 %20, label %21, label %22
21: ; preds = %2
store i32 1, i32* %6
br label %113
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @strcmp(i8* %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%27 = icmp ne i32 %26, 0
br i1 %27, label %29, label %28
28: ; preds = %22
store i32 1, i32* %6
br label %112
29: ; preds = %22
store i32 1, i32* %14
br label %30
30: ; preds = %88, %29
%31 = load i32, i32* %14
%32 = load i32, i32* %4
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %43
34: ; preds = %30
%35 = load i8**, i8*** %5
%36 = load i32, i32* %14
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strncmp(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%41 = icmp ne i32 %40, 0
%42 = xor i1 %41, true
br label %43
43: ; preds = %34, %30
%44 = phi i1 [ false, %30 ], [ %42, %34 ]
br i1 %44, label %45, label %91
45: ; preds = %43
%46 = load i8**, i8*** %5
%47 = load i32, i32* %14
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8*, i8** %46, i64 %48
%50 = load i8*, i8** %49
%51 = call i32 @strncmp(i8* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 8)
%52 = icmp ne i32 %51, 0
br i1 %52, label %61, label %53
53: ; preds = %45
%54 = load i8**, i8*** %5
%55 = load i32, i32* %14
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i8*, i8** %54, i64 %56
%58 = load i8*, i8** %57
%59 = getelementptr inbounds i8, i8* %58, i64 8
%60 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %59, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32* %8, i32* %9, i32* %10)
br label %88
61: ; preds = %45
%62 = load i8**, i8*** %5
%63 = load i32, i32* %14
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8*, i8** %62, i64 %64
%66 = load i8*, i8** %65
%67 = call i32 @strncmp(i8* %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 6)
%68 = icmp ne i32 %67, 0
br i1 %68, label %79, label %69
69: ; preds = %61
%70 = load i8**, i8*** %5
%71 = load i32, i32* %14
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8*, i8** %70, i64 %72
%74 = load i8*, i8** %73
%75 = getelementptr inbounds i8, i8* %74, i64 6
%76 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32* %15, i32* %16)
%77 = load i32, i32* %15
store i32 %77, i32* %11
%78 = load i32, i32* %16
store i32 %78, i32* %12
br label %87
79: ; preds = %61
%80 = load i32, i32* @stderr
%81 = load i8**, i8*** %5
%82 = load i32, i32* %14
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8*, i8** %81, i64 %83
%85 = load i8*, i8** %84
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %85)
store i32 1, i32* %6
br label %87
87: ; preds = %79, %69
br label %88
88: ; preds = %87, %53
%89 = load i32, i32* %14
%90 = add nsw i32 %89, 1
store i32 %90, i32* %14
br label %30
91: ; preds = %43
%92 = load i32, i32* %14
%93 = load i32, i32* %4
%94 = icmp sge i32 %92, %93
br i1 %94, label %95, label %96
95: ; preds = %91
store i32 1, i32* %6
br label %111
96: ; preds = %91
%97 = load i8**, i8*** %5
%98 = load i32, i32* %14
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i8*, i8** %97, i64 %99
%101 = load i8*, i8** %100
store i8* %101, i8** %13
%102 = load i8**, i8*** %5
%103 = load i32, i32* %14
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8*, i8** %102, i64 %104
%106 = load i8*, i8** %105
%107 = call i32 @strcmp(i8* %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%108 = icmp ne i32 %107, 0
br i1 %108, label %110, label %109
109: ; preds = %96
store i32 1, i32* %7
br label %110
110: ; preds = %109, %96
br label %111
111: ; preds = %110, %95
br label %112
112: ; preds = %111, %28
br label %113
113: ; preds = %112, %21
%114 = load i32, i32* %6
%115 = icmp ne i32 %114, 0
br i1 %115, label %116, label %130
116: ; preds = %113
%117 = load i8**, i8*** %5
%118 = getelementptr inbounds i8*, i8** %117, i64 0
%119 = load i8*, i8** %118
%120 = load i8**, i8*** %5
%121 = getelementptr inbounds i8*, i8** %120, i64 0
%122 = load i8*, i8** %121
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), i8* %119, i8* %122)
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0))
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0))
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0))
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.13, i64 0, i64 0))
%129 = call i32 @exit(i32 0)
unreachable
130: ; preds = %113
%131 = call i32 (...) @fbtext_init()
%132 = call i32 (...) @fbtext_clear()
%133 = load i32, i32* %8
%134 = load i32, i32* %9
%135 = load i32, i32* %10
%136 = call i32 @fbtext_setcolor(i32 %133, i32 %134, i32 %135)
%137 = load i32, i32* %11
%138 = icmp ne i32 %137, 0
br i1 %138, label %142, label %139
139: ; preds = %130
%140 = load i32, i32* %12
%141 = icmp ne i32 %140, 0
br i1 %141, label %142, label %147
142: ; preds = %139, %130
%143 = load i32, i32* @stderr
%144 = load i32, i32* %11
%145 = load i32, i32* %12
%146 = call i32 (i32, i8*, ...) @fprintf(i32 %143, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i32 %144, i32 %145)
br label %147
147: ; preds = %142, %139
%148 = load i32, i32* %11
%149 = load i32, i32* %12
%150 = call i32 @fbtext_gotoxyc(i32 %148, i32 %149)
%151 = load i32, i32* %7
%152 = icmp ne i32 %151, 0
br i1 %152, label %153, label %171
153: ; preds = %147
store i32 0, i32* %18
br label %154
154: ; preds = %164, %153
%155 = load i32, i32* %18
%156 = icmp slt i32 %155, 25
br i1 %156, label %157, label %162
157: ; preds = %154
%158 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%159 = load i32, i32* @stdin
%160 = call i64 @fgets(i8* %158, i32 80, i32 %159)
%161 = icmp ne i64 %160, 0
br label %162
162: ; preds = %157, %154
%163 = phi i1 [ false, %154 ], [ %161, %157 ]
br i1 %163, label %164, label %170
164: ; preds = %162
%165 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 80
store i8 0, i8* %165
%166 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%167 = call i32 @fbtext_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %166)
%168 = load i32, i32* %18
%169 = add nsw i32 %168, 1
store i32 %169, i32* %18
br label %154
170: ; preds = %162
br label %174
171: ; preds = %147
%172 = load i8*, i8** %13
%173 = call i32 @fbtext_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %172)
br label %174
174: ; preds = %171, %170
ret i32 1
}

LLVM IR (-O2):
@.str = [7 x i8] c"--help\00"
@.str.1 = [3 x i8] c"--\00"
@.str.2 = [9 x i8] c"--color=\00"
@.str.3 = [9 x i8] c"%d,%d,%d\00"
@.str.4 = [7 x i8] c"--pos=\00"
@.str.5 = [6 x i8] c"%d,%d\00"
@stderr = global i32 0
@.str.6 = [24 x i8] c"Unrecognized option %s\0A\00"
@.str.7 = [2 x i8] c"-\00"
@.str.8 = [41 x i8] c"%s v0.12; syntax: %s [options] <string>\0A\00"
@.str.14 = [27 x i8] c"Starting at col %d row %d\0A\00"
@stdin = global i32 0
@.str.15 = [3 x i8] c"%s\00"
@str = [37 x i8] c"<string> may be - to read from stdin\00"
@str.16 = [31 x i8] c"options may be one or more of:\00"
@str.17 = [29 x i8] c" --help\09Display this message\00"
@str.18 = [44 x i8] c" --color=r,g,b\09Text color (default=0,0,255)\00"
@str.19 = [55 x i8] c" --pos=col,row\09Display at specified character position\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [128 x i8]
%9 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%10 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%11 = bitcast i32* %5 to i8*
store i32 255, i32* %5
%12 = icmp slt i32 %0, 2
br i1 %12, label %76, label %13
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call i32 @strcmp(i8* dereferenceable(1) %15, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %76, label %18
18: ; preds = %13
%19 = bitcast i32* %6 to i8*
%20 = bitcast i32* %7 to i8*
%21 = zext i32 %0 to i64
%22 = call i32 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %66
24: ; preds = %18
%25 = getelementptr inbounds i8*, i8** %1, i64 1
br label %26
26: ; preds = %24, %58
%27 = phi i8** [ %25, %24 ], [ %61, %58 ]
%28 = phi i32 [ 0, %24 ], [ %53, %58 ]
%29 = phi i32 [ 0, %24 ], [ %54, %58 ]
%30 = phi i32 [ 0, %24 ], [ %55, %58 ]
%31 = phi i64 [ 1, %24 ], [ %56, %58 ]
%32 = load i8*, i8** %27
%33 = call i32 @strncmp(i8* %32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 8)
%34 = icmp eq i32 %33, 0
%35 = load i8*, i8** %27
br i1 %34, label %36, label %39
36: ; preds = %26
%37 = getelementptr inbounds i8, i8* %35, i64 8
%38 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %37, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
br label %52
39: ; preds = %26
%40 = call i32 @strncmp(i8* %35, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 6)
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %48
42: ; preds = %39
%43 = load i8*, i8** %27
%44 = getelementptr inbounds i8, i8* %43, i64 6
%45 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %44, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32* %6, i32* %7)
%46 = load i32, i32* %6
%47 = load i32, i32* %7
br label %52
48: ; preds = %39
%49 = load i32, i32* @stderr
%50 = load i8*, i8** %27
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %50)
br label %52
52: ; preds = %42, %48, %36
%53 = phi i32 [ 1, %48 ], [ %28, %42 ], [ %28, %36 ]
%54 = phi i32 [ %29, %48 ], [ %46, %42 ], [ %29, %36 ]
%55 = phi i32 [ %30, %48 ], [ %47, %42 ], [ %30, %36 ]
%56 = add nuw nsw i64 %31, 1
%57 = icmp eq i64 %56, %21
br i1 %57, label %76, label %58
58: ; preds = %52
%59 = getelementptr inbounds i8*, i8** %1, i64 %56
%60 = load i8*, i8** %59
%61 = getelementptr inbounds i8*, i8** %1, i64 %56
%62 = call i32 @strncmp(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%63 = icmp eq i32 %62, 0
br i1 %63, label %26, label %64
64: ; preds = %58
%65 = and i64 %56, 4294967295
br label %66
66: ; preds = %64, %18
%67 = phi i64 [ %65, %64 ], [ 1, %18 ]
%68 = phi i32 [ %55, %64 ], [ 0, %18 ]
%69 = phi i32 [ %54, %64 ], [ 0, %18 ]
%70 = phi i32 [ %53, %64 ], [ 0, %18 ]
%71 = getelementptr inbounds i8*, i8** %1, i64 %67
%72 = load i8*, i8** %71
%73 = call i32 @strcmp(i8* dereferenceable(1) %72, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%74 = icmp eq i32 %73, 0
%75 = icmp eq i32 %70, 0
br i1 %75, label %85, label %76
76: ; preds = %52, %13, %2, %66
%77 = load i8*, i8** %1
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), i8* %77, i8* %77)
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.16, i64 0, i64 0))
%81 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.17, i64 0, i64 0))
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.18, i64 0, i64 0))
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.19, i64 0, i64 0))
%84 = call i32 @exit(i32 0)
unreachable
85: ; preds = %66
%86 = call i32 (...) @fbtext_init()
%87 = call i32 (...) @fbtext_clear()
%88 = load i32, i32* %3
%89 = load i32, i32* %4
%90 = load i32, i32* %5
%91 = call i32 @fbtext_setcolor(i32 %88, i32 %89, i32 %90)
%92 = icmp ne i32 %69, 0
%93 = icmp ne i32 %68, 0
%94 = select i1 %92, i1 true, i1 %93
br i1 %94, label %95, label %98
95: ; preds = %85
%96 = load i32, i32* @stderr
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i32 %69, i32 %68)
br label %98
98: ; preds = %85, %95
%99 = phi i32 [ 0, %85 ], [ %68, %95 ]
%100 = phi i32 [ 0, %85 ], [ %69, %95 ]
%101 = call i32 @fbtext_gotoxyc(i32 %100, i32 %99)
br i1 %74, label %102, label %115
102: ; preds = %98
%103 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%104 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 80
br label %105
105: ; preds = %102, %110
%106 = phi i32 [ 0, %102 ], [ %112, %110 ]
%107 = load i32, i32* @stdin
%108 = call i64 @fgets(i8* %103, i32 80, i32 %107)
%109 = icmp eq i64 %108, 0
br i1 %109, label %114, label %110
110: ; preds = %105
store i8 0, i8* %104
%111 = call i32 @fbtext_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %103)
%112 = add nuw nsw i32 %106, 1
%113 = icmp eq i32 %112, 25
br i1 %113, label %114, label %105
114: ; preds = %110, %105
br label %117
115: ; preds = %98
%116 = call i32 @fbtext_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %72)
br label %117
117: ; preds = %115, %114
ret i32 1
}