#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 *getparm(char *);
int /*<<< orphan*/ html_header(int);
int /*<<< orphan*/ http_fatal(char *);
int /*<<< orphan*/ http_quit();
char *nohtml(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ redirect(char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int sscanf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ strcasecmp(char *, char *);
int /*<<< orphan*/ strncasecmp(char *, char *, int);
int bbstty_main() {
  char *cmd;
  char buf[256];
  char s1[256] = "", s2[256] = "", s3[356] = "";
  int r;
  html_header(1);
  cmd = getparm("cmd");
  r = sscanf(cmd, "%80s %80s %80s", s1, s2, s3);
  if (!strcasecmp(s1, "/q")) {
    sprintf(buf, "bbsqry?userid=%s", s2);
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/s")) {
    sprintf(buf, "bbssendmsg?destid=%s&msg=%s", s2, s3);
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/m")) {
    sprintf(buf, "bbspstmail?userid=%s&title=%s", s2, s3);
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/logout")) {
    printf("<script>top.location='bbslogout'</script>");
    http_quit();
  }
  if (!strcasecmp(s1, "/top10")) {
    sprintf(buf, "bbstop10");
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/g")) {
    sprintf(buf, "bbssel?board=%s", s2);
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/l")) {
    sprintf(buf, "bbsusr");
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/f")) {
    sprintf(buf, "bbsfind");
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/z")) {
    if (s2[0] == 0) {
      sprintf(buf, "bbsdict");
    } else {
      sprintf(buf, "bbsdict?type=1&word=%s", s2);
    }
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/i")) {
    if (s2[0] == 0) {
      sprintf(buf, "bbsfreeip");
    } else {
      sprintf(buf, "bbsfreeip?ip=%s&type=1", s2);
    }
    redirect(buf);
    http_quit();
  }
  if (!strcasecmp(s1, "/h")) {
    printf("<pre>\n");
    printf("³¬¼¶¿ØÖÆÌ¨ÃüÁî<hr>\n");
    printf("/q [userid]           ²éÑ¯ÍøÓÑ\n");
    printf("/s [userid] [msg]     ·¢ËÍÑ¶Ï¢\n");
    printf("/m [userid] [title]   ·¢ËÍÐÅ¼þ\n");
    printf("/logout               ×¢ÏúµÇÂ¼\n");
    printf("/top10                ²é¿´10´ó\n");
    printf("/g [board]            Ìø×ªµ½°æÃæ\n");
    printf("/l                    »·¹ËËÄ·½\n");
    printf("/f                    ²éÑ¯ÎÄÕÂ\n");
    printf("/z [word]             ²éÖÐÓ¢ÎÄ×Öµä\n");
    printf("/i [ip]               IPµØÖ·²éÑ¯\n");
    printf("/h                    ÏÔÊ¾±¾°ïÖú½çÃæ\n");
    printf("http://xx.xx.xx       Ìø×ªµ½urlµØÖ·\n\n");
    printf("</pre>\n");
    http_quit();
  }
  if (!strncasecmp(s1, "http://", 7)) {
    sprintf(buf, "<script>window.open('%s','','');history.go(-1)</script>",
            nohtml(s1));
    printf("%s", buf);
    http_quit();
  }
  http_fatal("Î´ÖªÃüÁî");
}


x86 assembly (clang, -O0):
<bbstty_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1070 <memset@plt>
lea    -0x310(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1070 <memset@plt>
lea    -0x480(%rbp),%rdi
xor    %esi,%esi
mov    $0x164,%edx
call   1070 <memset@plt>
mov    $0x1,%edi
call   10b0 <html_header@plt>
lea    0xdeb(%rip),%rdi
call   10e0 <getparm@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x210(%rbp),%rdx
lea    -0x310(%rbp),%rcx
lea    -0x480(%rbp),%r8
lea    0xdc6(%rip),%rsi
call   10a0 <sscanf@plt>
mov    %eax,-0x484(%rbp)
lea    -0x210(%rbp),%rdi
lea    0xdbc(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1294 <bbstty_main+0xd4>
lea    -0x110(%rbp),%rdi
lea    -0x310(%rbp),%rdx
lea    0xd9c(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xd85(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    12e6 <bbstty_main+0x126>
lea    -0x110(%rbp),%rdi
lea    -0x310(%rbp),%rdx
lea    -0x480(%rbp),%rcx
lea    0xd5e(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xd52(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1338 <bbstty_main+0x178>
lea    -0x110(%rbp),%rdi
lea    -0x310(%rbp),%rdx
lea    -0x480(%rbp),%rcx
lea    0xd2b(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xd21(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1369 <bbstty_main+0x1a9>
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xd22(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    13ad <bbstty_main+0x1ed>
lea    -0x110(%rbp),%rdi
lea    0xd0d(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xcee(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    13f8 <bbstty_main+0x238>
lea    -0x110(%rbp),%rdi
lea    -0x310(%rbp),%rdx
lea    0xcce(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xcb6(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    143c <bbstty_main+0x27c>
lea    -0x110(%rbp),%rdi
lea    0xc9d(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xc7c(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1480 <bbstty_main+0x2c0>
lea    -0x110(%rbp),%rdi
lea    0xc63(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xc43(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    14f5 <bbstty_main+0x335>
movsbl -0x310(%rbp),%eax
cmp    $0x0,%eax
jne    14c6 <bbstty_main+0x306>
lea    -0x110(%rbp),%rdi
lea    0xc1a(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
jmp    14e2 <bbstty_main+0x322>
lea    -0x110(%rbp),%rdi
lea    -0x310(%rbp),%rdx
lea    0xc01(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xbf0(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    156a <bbstty_main+0x3aa>
movsbl -0x310(%rbp),%eax
cmp    $0x0,%eax
jne    153b <bbstty_main+0x37b>
lea    -0x110(%rbp),%rdi
lea    0xbc7(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
jmp    1557 <bbstty_main+0x397>
lea    -0x110(%rbp),%rdi
lea    -0x310(%rbp),%rdx
lea    0xbb0(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <redirect@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xb9f(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    165f <bbstty_main+0x49f>
lea    0xb8d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb86(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb9a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xbb4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xbce(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xbe8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc02(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc1a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc38(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc52(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc6c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcaa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcf2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    -0x210(%rbp),%rdi
lea    0xcde(%rip),%rsi
mov    $0x7,%edx
call   1090 <strncasecmp@plt>
cmp    $0x0,%eax
jne    16ce <bbstty_main+0x50e>
lea    -0x110(%rbp),%rax
mov    %rax,-0x490(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <nohtml@plt>
mov    -0x490(%rbp),%rdi
mov    %rax,%rdx
lea    0xca8(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x110(%rbp),%rsi
lea    0x964(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10c0 <http_quit@plt>
lea    0xcb6(%rip),%rdi
call   1040 <http_fatal@plt>
mov    -0x4(%rbp),%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbstty_main>:
push   %r14
push   %rbx
sub    $0x468,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x1f0(%rsp)
movaps %xmm0,0x1e0(%rsp)
movaps %xmm0,0x1d0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm0,0x1b0(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
lea    0x300(%rsp),%r14
mov    $0x164,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
mov    $0x1,%edi
call   10c0 <html_header@plt>
lea    0xd14(%rip),%rdi
call   10f0 <getparm@plt>
lea    0xd0c(%rip),%rsi
mov    %rsp,%rbx
lea    0x100(%rsp),%rcx
mov    %rax,%rdi
mov    %rbx,%rdx
mov    %r14,%r8
call   10b0 <sscanf@plt>
lea    0xcfb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    1354 <bbstty_main+0x184>
lea    0xceb(%rip),%rsi
lea    0x200(%rsp),%rbx
lea    0x100(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xccc(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    139f <bbstty_main+0x1cf>
lea    0xcbc(%rip),%rsi
lea    0x200(%rsp),%rbx
lea    0x100(%rsp),%rdx
lea    0x300(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xca0(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    13ea <bbstty_main+0x21a>
lea    0xc90(%rip),%rsi
lea    0x200(%rsp),%rbx
lea    0x100(%rsp),%rdx
lea    0x300(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xc76(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    1412 <bbstty_main+0x242>
lea    0xc6b(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xc80(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    1453 <bbstty_main+0x283>
movabs $0x3031706f74736262,%rax
70 31 30
mov    %rax,0x200(%rsp)
movb   $0x0,0x208(%rsp)
lea    0x200(%rsp),%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xc4f(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    1496 <bbstty_main+0x2c6>
lea    0xc3f(%rip),%rsi
lea    0x200(%rsp),%rbx
lea    0x100(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xc1f(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    14d3 <bbstty_main+0x303>
movl   $0x727375,0x203(%rsp)
movl   $0x75736262,0x200(%rsp)
62 62 73 75
lea    0x200(%rsp),%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xbec(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    150c <bbstty_main+0x33c>
movabs $0x646e6966736262,%rax
mov    %rax,0x200(%rsp)
lea    0x200(%rsp),%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xbb6(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    156f <bbstty_main+0x39f>
cmpb   $0x0,0x100(%rsp)
je     1549 <bbstty_main+0x379>
lea    0xb9c(%rip),%rsi
lea    0x200(%rsp),%rdi
lea    0x100(%rsp),%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
jmp    155b <bbstty_main+0x38b>
movabs $0x74636964736262,%rax
mov    %rax,0x200(%rsp)
lea    0x200(%rsp),%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xb6d(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    15dc <bbstty_main+0x40c>
cmpb   $0x0,0x100(%rsp)
je     15ac <bbstty_main+0x3dc>
lea    0xb5d(%rip),%rsi
lea    0x200(%rsp),%rdi
lea    0x100(%rsp),%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
jmp    15c8 <bbstty_main+0x3f8>
movabs $0x6965657266736262,%rax
65 65 69
mov    %rax,0x200(%rsp)
movw   $0x70,0x208(%rsp)
lea    0x200(%rsp),%rdi
call   1060 <redirect@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xb24(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    16ae <bbstty_main+0x4de>
lea    0xb61(%rip),%rdi
call   1040 <puts@plt>
lea    0xb5b(%rip),%rdi
call   1040 <puts@plt>
lea    0xb70(%rip),%rdi
call   1040 <puts@plt>
lea    0xb8b(%rip),%rdi
call   1040 <puts@plt>
lea    0xba6(%rip),%rdi
call   1040 <puts@plt>
lea    0xbc1(%rip),%rdi
call   1040 <puts@plt>
lea    0xbdc(%rip),%rdi
call   1040 <puts@plt>
lea    0xbf5(%rip),%rdi
call   1040 <puts@plt>
lea    0xc14(%rip),%rdi
call   1040 <puts@plt>
lea    0xc2f(%rip),%rdi
call   1040 <puts@plt>
lea    0xc4a(%rip),%rdi
call   1040 <puts@plt>
lea    0xc6d(%rip),%rdi
call   1040 <puts@plt>
lea    0xc8a(%rip),%rdi
call   1040 <puts@plt>
lea    0xcb1(%rip),%rdi
call   1040 <puts@plt>
lea    0xcd4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xa55(%rip),%rsi
mov    %rsp,%rdi
mov    $0x7,%edx
call   10a0 <strncasecmp@plt>
test   %eax,%eax
jne    1702 <bbstty_main+0x532>
mov    %rsp,%rdi
call   1090 <nohtml@plt>
lea    0xa3d(%rip),%rsi
lea    0x200(%rsp),%rbx
mov    %rbx,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0x933(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10d0 <http_quit@plt>
lea    0xa41(%rip),%rdi
call   1050 <http_fatal@plt>
add    $0x468,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cmd\00"
@.str.1 = [15 x i8] c"%80s %80s %80s\00"
@.str.2 = [3 x i8] c"/q\00"
@.str.3 = [17 x i8] c"bbsqry?userid=%s\00"
@.str.4 = [3 x i8] c"/s\00"
@.str.5 = [28 x i8] c"bbssendmsg?destid=%s&msg=%s\00"
@.str.6 = [3 x i8] c"/m\00"
@.str.7 = [30 x i8] c"bbspstmail?userid=%s&title=%s\00"
@.str.8 = [8 x i8] c"/logout\00"
@.str.9 = [42 x i8] c"<script>top.location='bbslogout'</script>\00"
@.str.10 = [7 x i8] c"/top10\00"
@.str.11 = [9 x i8] c"bbstop10\00"
@.str.12 = [3 x i8] c"/g\00"
@.str.13 = [16 x i8] c"bbssel?board=%s\00"
@.str.14 = [3 x i8] c"/l\00"
@.str.15 = [7 x i8] c"bbsusr\00"
@.str.16 = [3 x i8] c"/f\00"
@.str.17 = [8 x i8] c"bbsfind\00"
@.str.18 = [3 x i8] c"/z\00"
@.str.19 = [8 x i8] c"bbsdict\00"
@.str.20 = [23 x i8] c"bbsdict?type=1&word=%s\00"
@.str.21 = [3 x i8] c"/i\00"
@.str.22 = [10 x i8] c"bbsfreeip\00"
@.str.23 = [23 x i8] c"bbsfreeip?ip=%s&type=1\00"
@.str.24 = [3 x i8] c"/h\00"
@.str.25 = [7 x i8] c"<pre>\0A\00"
@.str.26 = [34 x i8] c"\C2\B3\C2\AC\C2\BC\C2\B6\C2\BF\C3\98\C3\96\C3\86\C3\8C\C2\A8\C3\83\C3\BC\C3\81\C3\AE<hr>\0A\00"
@.str.27 = [40 x i8] c"/q [userid] \C2\B2\C3\A9\C3\91\C2\AF\C3\8D\C3\B8\C3\93\C3\91\0A\00"
@.str.28 = [40 x i8] c"/s [userid] [msg] \C2\B7\C2\A2\C3\8B\C3\8D\C3\91\C2\B6\C3\8F\C2\A2\0A\00"
@.str.29 = [40 x i8] c"/m [userid] [title] \C2\B7\C2\A2\C3\8B\C3\8D\C3\90\C3\85\C2\BC\C3\BE\0A\00"
@.str.30 = [40 x i8] c"/logout \C3\97\C2\A2\C3\8F\C3\BA\C2\B5\C3\87\C3\82\C2\BC\0A\00"
@.str.31 = [38 x i8] c"/top10 \C2\B2\C3\A9\C2\BF\C2\B410\C2\B4\C3\B3\0A\00"
@.str.32 = [44 x i8] c"/g [board] \C3\8C\C3\B8\C3\97\C2\AA\C2\B5\C2\BD\C2\B0\C3\A6\C3\83\C3\A6\0A\00"
@.str.33 = [40 x i8] c"/l \C2\BB\C2\B7\C2\B9\C3\8B\C3\8B\C3\84\C2\B7\C2\BD\0A\00"
@.str.34 = [40 x i8] c"/f \C2\B2\C3\A9\C3\91\C2\AF\C3\8E\C3\84\C3\95\C3\82\0A\00"
@.str.35 = [48 x i8] c"/z [word] \C2\B2\C3\A9\C3\96\C3\90\C3\93\C2\A2\C3\8E\C3\84\C3\97\C3\96\C2\B5\C3\A4\0A\00"
@.str.36 = [42 x i8] c"/i [ip] IP\C2\B5\C3\98\C3\96\C2\B7\C2\B2\C3\A9\C3\91\C2\AF\0A\00"
@.str.37 = [52 x i8] c"/h \C3\8F\C3\94\C3\8A\C2\BE\C2\B1\C2\BE\C2\B0\C3\AF\C3\96\C3\BA\C2\BD\C3\A7\C3\83\C3\A6\0A\00"
@.str.38 = [48 x i8] c"http://xx.xx.xx \C3\8C\C3\B8\C3\97\C2\AA\C2\B5\C2\BDurl\C2\B5\C3\98\C3\96\C2\B7\0A\0A\00"
@.str.39 = [8 x i8] c"</pre>\0A\00"
@.str.40 = [8 x i8] c"http://\00"
@.str.41 = [56 x i8] c"<script>window.open('%s','','');history.go(-1)</script>\00"
@.str.42 = [3 x i8] c"%s\00"
@.str.43 = [17 x i8] c"\C3\8E\C2\B4\C3\96\C2\AA\C3\83\C3\BC\C3\81\C3\AE\00"
define i32 @bbstty_main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = alloca [356 x i8]
%7 = alloca i32
%8 = bitcast [256 x i8]* %4 to i8*
%9 = bitcast [256 x i8]* %5 to i8*
%10 = bitcast [356 x i8]* %6 to i8*
%11 = call i32 @html_header(i32 1)
%12 = call i8* @getparm(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %12, i8** %2
%13 = load i8*, i8** %2
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%16 = getelementptr inbounds [356 x i8], [356 x i8]* %6, i64 0, i64 0
%17 = call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %14, i8* %15, i8* %16)
store i32 %17, i32* %7
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%19 = call i32 @strcasecmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %28, label %21
21: ; preds = %0
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%23 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%24 = call i32 (i8*, i8*, ...) @sprintf(i8* %22, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%26 = call i32 @redirect(i8* %25)
%27 = call i32 (...) @http_quit()
br label %28
28: ; preds = %21, %0
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%30 = call i32 @strcasecmp(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %40, label %32
32: ; preds = %28
%33 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%35 = getelementptr inbounds [356 x i8], [356 x i8]* %6, i64 0, i64 0
%36 = call i32 (i8*, i8*, ...) @sprintf(i8* %33, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %34, i8* %35)
%37 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%38 = call i32 @redirect(i8* %37)
%39 = call i32 (...) @http_quit()
br label %40
40: ; preds = %32, %28
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%42 = call i32 @strcasecmp(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%43 = icmp ne i32 %42, 0
br i1 %43, label %52, label %44
44: ; preds = %40
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%46 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%47 = getelementptr inbounds [356 x i8], [356 x i8]* %6, i64 0, i64 0
%48 = call i32 (i8*, i8*, ...) @sprintf(i8* %45, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i8* %46, i8* %47)
%49 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%50 = call i32 @redirect(i8* %49)
%51 = call i32 (...) @http_quit()
br label %52
52: ; preds = %44, %40
%53 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%54 = call i32 @strcasecmp(i8* %53, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%55 = icmp ne i32 %54, 0
br i1 %55, label %59, label %56
56: ; preds = %52
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0))
%58 = call i32 (...) @http_quit()
br label %59
59: ; preds = %56, %52
%60 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%61 = call i32 @strcasecmp(i8* %60, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%62 = icmp ne i32 %61, 0
br i1 %62, label %69, label %63
63: ; preds = %59
%64 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%65 = call i32 (i8*, i8*, ...) @sprintf(i8* %64, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%66 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%67 = call i32 @redirect(i8* %66)
%68 = call i32 (...) @http_quit()
br label %69
69: ; preds = %63, %59
%70 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%71 = call i32 @strcasecmp(i8* %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%72 = icmp ne i32 %71, 0
br i1 %72, label %80, label %73
73: ; preds = %69
%74 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%75 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%76 = call i32 (i8*, i8*, ...) @sprintf(i8* %74, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* %75)
%77 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%78 = call i32 @redirect(i8* %77)
%79 = call i32 (...) @http_quit()
br label %80
80: ; preds = %73, %69
%81 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%82 = call i32 @strcasecmp(i8* %81, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%83 = icmp ne i32 %82, 0
br i1 %83, label %90, label %84
84: ; preds = %80
%85 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%86 = call i32 (i8*, i8*, ...) @sprintf(i8* %85, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%87 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%88 = call i32 @redirect(i8* %87)
%89 = call i32 (...) @http_quit()
br label %90
90: ; preds = %84, %80
%91 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%92 = call i32 @strcasecmp(i8* %91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%93 = icmp ne i32 %92, 0
br i1 %93, label %100, label %94
94: ; preds = %90
%95 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%96 = call i32 (i8*, i8*, ...) @sprintf(i8* %95, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%97 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%98 = call i32 @redirect(i8* %97)
%99 = call i32 (...) @http_quit()
br label %100
100: ; preds = %94, %90
%101 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%102 = call i32 @strcasecmp(i8* %101, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%103 = icmp ne i32 %102, 0
br i1 %103, label %120, label %104
104: ; preds = %100
%105 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%106 = load i8, i8* %105
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %107, 0
br i1 %108, label %109, label %112
109: ; preds = %104
%110 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%111 = call i32 (i8*, i8*, ...) @sprintf(i8* %110, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0))
br label %116
112: ; preds = %104
%113 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%114 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%115 = call i32 (i8*, i8*, ...) @sprintf(i8* %113, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0), i8* %114)
br label %116
116: ; preds = %112, %109
%117 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%118 = call i32 @redirect(i8* %117)
%119 = call i32 (...) @http_quit()
br label %120
120: ; preds = %116, %100
%121 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%122 = call i32 @strcasecmp(i8* %121, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
%123 = icmp ne i32 %122, 0
br i1 %123, label %140, label %124
124: ; preds = %120
%125 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = icmp eq i32 %127, 0
br i1 %128, label %129, label %132
129: ; preds = %124
%130 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%131 = call i32 (i8*, i8*, ...) @sprintf(i8* %130, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0))
br label %136
132: ; preds = %124
%133 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%134 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%135 = call i32 (i8*, i8*, ...) @sprintf(i8* %133, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.23, i64 0, i64 0), i8* %134)
br label %136
136: ; preds = %132, %129
%137 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%138 = call i32 @redirect(i8* %137)
%139 = call i32 (...) @http_quit()
br label %140
140: ; preds = %136, %120
%141 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%142 = call i32 @strcasecmp(i8* %141, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%143 = icmp ne i32 %142, 0
br i1 %143, label %161, label %144
144: ; preds = %140
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i64 0, i64 0))
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.26, i64 0, i64 0))
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.27, i64 0, i64 0))
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.28, i64 0, i64 0))
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.29, i64 0, i64 0))
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.30, i64 0, i64 0))
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.31, i64 0, i64 0))
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.32, i64 0, i64 0))
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.33, i64 0, i64 0))
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.34, i64 0, i64 0))
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.35, i64 0, i64 0))
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.36, i64 0, i64 0))
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.37, i64 0, i64 0))
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.38, i64 0, i64 0))
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.39, i64 0, i64 0))
%160 = call i32 (...) @http_quit()
br label %161
161: ; preds = %144, %140
%162 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%163 = call i32 @strncasecmp(i8* %162, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.40, i64 0, i64 0), i32 7)
%164 = icmp ne i32 %163, 0
br i1 %164, label %173, label %165
165: ; preds = %161
%166 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%167 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%168 = call i8* @nohtml(i8* %167)
%169 = call i32 (i8*, i8*, ...) @sprintf(i8* %166, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.41, i64 0, i64 0), i8* %168)
%170 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.42, i64 0, i64 0), i8* %170)
%172 = call i32 (...) @http_quit()
br label %173
173: ; preds = %165, %161
%174 = call i32 @http_fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.43, i64 0, i64 0))
%175 = load i32, i32* %1
ret i32 %175
}

LLVM IR (-O2):
@.str = [4 x i8] c"cmd\00"
@.str.1 = [15 x i8] c"%80s %80s %80s\00"
@.str.2 = [3 x i8] c"/q\00"
@.str.3 = [17 x i8] c"bbsqry?userid=%s\00"
@.str.4 = [3 x i8] c"/s\00"
@.str.5 = [28 x i8] c"bbssendmsg?destid=%s&msg=%s\00"
@.str.6 = [3 x i8] c"/m\00"
@.str.7 = [30 x i8] c"bbspstmail?userid=%s&title=%s\00"
@.str.8 = [8 x i8] c"/logout\00"
@.str.9 = [42 x i8] c"<script>top.location='bbslogout'</script>\00"
@.str.10 = [7 x i8] c"/top10\00"
@.str.11 = [9 x i8] c"bbstop10\00"
@.str.12 = [3 x i8] c"/g\00"
@.str.13 = [16 x i8] c"bbssel?board=%s\00"
@.str.14 = [3 x i8] c"/l\00"
@.str.15 = [7 x i8] c"bbsusr\00"
@.str.16 = [3 x i8] c"/f\00"
@.str.18 = [3 x i8] c"/z\00"
@.str.20 = [23 x i8] c"bbsdict?type=1&word=%s\00"
@.str.21 = [3 x i8] c"/i\00"
@.str.22 = [10 x i8] c"bbsfreeip\00"
@.str.23 = [23 x i8] c"bbsfreeip?ip=%s&type=1\00"
@.str.24 = [3 x i8] c"/h\00"
@.str.40 = [8 x i8] c"http://\00"
@.str.41 = [56 x i8] c"<script>window.open('%s','','');history.go(-1)</script>\00"
@.str.42 = [3 x i8] c"%s\00"
@.str.43 = [17 x i8] c"\C3\8E\C2\B4\C3\96\C2\AA\C3\83\C3\BC\C3\81\C3\AE\00"
@str = [6 x i8] c"<pre>\00"
@str.44 = [33 x i8] c"\C2\B3\C2\AC\C2\BC\C2\B6\C2\BF\C3\98\C3\96\C3\86\C3\8C\C2\A8\C3\83\C3\BC\C3\81\C3\AE<hr>\00"
@str.45 = [39 x i8] c"/q [userid] \C2\B2\C3\A9\C3\91\C2\AF\C3\8D\C3\B8\C3\93\C3\91\00"
@str.46 = [39 x i8] c"/s [userid] [msg] \C2\B7\C2\A2\C3\8B\C3\8D\C3\91\C2\B6\C3\8F\C2\A2\00"
@str.47 = [39 x i8] c"/m [userid] [title] \C2\B7\C2\A2\C3\8B\C3\8D\C3\90\C3\85\C2\BC\C3\BE\00"
@str.48 = [39 x i8] c"/logout \C3\97\C2\A2\C3\8F\C3\BA\C2\B5\C3\87\C3\82\C2\BC\00"
@str.49 = [37 x i8] c"/top10 \C2\B2\C3\A9\C2\BF\C2\B410\C2\B4\C3\B3\00"
@str.50 = [43 x i8] c"/g [board] \C3\8C\C3\B8\C3\97\C2\AA\C2\B5\C2\BD\C2\B0\C3\A6\C3\83\C3\A6\00"
@str.51 = [39 x i8] c"/l \C2\BB\C2\B7\C2\B9\C3\8B\C3\8B\C3\84\C2\B7\C2\BD\00"
@str.52 = [39 x i8] c"/f \C2\B2\C3\A9\C3\91\C2\AF\C3\8E\C3\84\C3\95\C3\82\00"
@str.53 = [47 x i8] c"/z [word] \C2\B2\C3\A9\C3\96\C3\90\C3\93\C2\A2\C3\8E\C3\84\C3\97\C3\96\C2\B5\C3\A4\00"
@str.54 = [41 x i8] c"/i [ip] IP\C2\B5\C3\98\C3\96\C2\B7\C2\B2\C3\A9\C3\91\C2\AF\00"
@str.55 = [51 x i8] c"/h \C3\8F\C3\94\C3\8A\C2\BE\C2\B1\C2\BE\C2\B0\C3\AF\C3\96\C3\BA\C2\BD\C3\A7\C3\83\C3\A6\00"
@str.56 = [47 x i8] c"http://xx.xx.xx \C3\8C\C3\B8\C3\97\C2\AA\C2\B5\C2\BDurl\C2\B5\C3\98\C3\96\C2\B7\0A\00"
@str.57 = [7 x i8] c"</pre>\00"
define i32 @bbstty_main() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [256 x i8]
%4 = alloca [356 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [356 x i8], [356 x i8]* %4, i64 0, i64 0
%9 = tail call i32 @html_header(i32 1)
%10 = tail call i8* @getparm(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* %7, i8* %8)
%12 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %0
%15 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%16 = call i32 @redirect(i8* %5)
%17 = call i32 (...) @http_quit()
br label %18
18: ; preds = %14, %0
%19 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %7, i8* %8)
%23 = call i32 @redirect(i8* %5)
%24 = call i32 (...) @http_quit()
br label %25
25: ; preds = %21, %18
%26 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i8* %7, i8* %8)
%30 = call i32 @redirect(i8* %5)
%31 = call i32 (...) @http_quit()
br label %32
32: ; preds = %28, %25
%33 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0))
%37 = call i32 (...) @http_quit()
br label %38
38: ; preds = %35, %32
%39 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = call i32 @redirect(i8* %5)
%43 = call i32 (...) @http_quit()
br label %44
44: ; preds = %41, %38
%45 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %51
47: ; preds = %44
%48 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* %7)
%49 = call i32 @redirect(i8* %5)
%50 = call i32 (...) @http_quit()
br label %51
51: ; preds = %47, %44
%52 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = call i32 @redirect(i8* %5)
%56 = call i32 (...) @http_quit()
br label %57
57: ; preds = %54, %51
%58 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %57
%61 = bitcast [256 x i8]* %1 to i64*
store i64 28268896640524898, i64* %61
%62 = call i32 @redirect(i8* %5)
%63 = call i32 (...) @http_quit()
br label %64
64: ; preds = %60, %57
%65 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %77
67: ; preds = %64
%68 = load i8, i8* %7
%69 = icmp eq i8 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = bitcast [256 x i8]* %1 to i64*
store i64 32760401606435426, i64* %71
br label %74
72: ; preds = %67
%73 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0), i8* %7)
br label %74
74: ; preds = %72, %70
%75 = call i32 @redirect(i8* %5)
%76 = call i32 (...) @http_quit()
br label %77
77: ; preds = %74, %64
%78 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %89
80: ; preds = %77
%81 = load i8, i8* %7
%82 = icmp eq i8 %81, 0
br i1 %82, label %83, label %84
83: ; preds = %80
br label %86
84: ; preds = %80
%85 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.23, i64 0, i64 0), i8* %7)
br label %86
86: ; preds = %84, %83
%87 = call i32 @redirect(i8* %5)
%88 = call i32 (...) @http_quit()
br label %89
89: ; preds = %86, %77
%90 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%91 = icmp eq i32 %90, 0
br i1 %91, label %92, label %109
92: ; preds = %89
%93 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%94 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.44, i64 0, i64 0))
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.45, i64 0, i64 0))
%96 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.46, i64 0, i64 0))
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.47, i64 0, i64 0))
%98 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.48, i64 0, i64 0))
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.49, i64 0, i64 0))
%100 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.50, i64 0, i64 0))
%101 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.51, i64 0, i64 0))
%102 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.52, i64 0, i64 0))
%103 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.53, i64 0, i64 0))
%104 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.54, i64 0, i64 0))
%105 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.55, i64 0, i64 0))
%106 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.56, i64 0, i64 0))
%107 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.57, i64 0, i64 0))
%108 = call i32 (...) @http_quit()
br label %109
109: ; preds = %92, %89
%110 = call i32 @strncasecmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.40, i64 0, i64 0), i32 7)
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %117
112: ; preds = %109
%113 = call i8* @nohtml(i8* %6)
%114 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.41, i64 0, i64 0), i8* %113)
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.42, i64 0, i64 0), i8* %5)
%116 = call i32 (...) @http_quit()
br label %117
117: ; preds = %112, %109
%118 = call i32 @http_fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.43, i64 0, i64 0))
ret i32 undef
}