#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, ...);
int /*<<< orphan*/ printf(char *, int);
int sscanf(char *, char *, int *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strncmp(char *, char *, int);
main() {
  static char buf[200], pagename[200], *p, *q;
  int lineno = 0;
  int pageno = 0;
  int n;
  while (fgets(buf, sizeof(buf), stdin)) {
    lineno++;
    if (strncmp(buf, "%%Page: ", 8) == 0) {
      if (sscanf(buf + 8, "%d", &n) < 1)
        fprintf(stderr, "%d: missing page number\n", lineno);
      else {
        if (n != pageno + 1)
          fprintf(stderr, "%d: page %d expected, page %d found\n", lineno,
                  pageno + 1, n);
        pageno = n;
        fgets(buf, sizeof(buf), stdin);
        lineno++;
        if (strcmp(buf, "%%BeginPageSetup\n")) {
          fprintf(stderr, "%d: BeginPageSetup missing\n", lineno);
          continue;
        }
        fgets(buf, sizeof(buf), stdin);
        lineno++;
        if (strcmp(buf, "BP\n")) {
          fprintf(stderr, "%d: BP\n", lineno);
          continue;
        }
        fgets(buf, sizeof(buf), stdin);
        lineno++;
        if (strcmp(buf, "%%EndPageSetup\n")) {
          fprintf(stderr, "%d: EndPageSetup missing\n", lineno);
          continue;
        }
        fgets(buf, sizeof(buf), stdin);
        lineno++;
        for (p = buf;
             p - buf < sizeof(buf) - 1 && *p != '(' && *p != '<' && *p != '\n';
             p++)
          ;
        if (*p == '(') {
          for (q = ++p; q - buf < sizeof(buf) - 1 && *q != '\\' && *q != '\n';
               q++)
            ;
          *q = '\0';
          if (strcmp(pagename, p)) {
            strcpy(pagename, p);
            printf("%d\n", pageno);
          }
        } else if (*p == '<') {
          for (q = ++p;
               q - buf < sizeof(buf) - 2 && !(*q == '2' && *(q + 1) == '8') &&
               (*q != '\n' && *(q + 1) != '\n');
               q += 2)
            ;
          *q = '\0';
          if (strcmp(pagename, p)) {
            strcpy(pagename, p);
            printf("%d\n", pageno);
          }
        } else {
          fprintf(stderr, "%d: Page name missing\n", lineno);
          continue;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2e54(%rip),%rax
mov    (%rax),%edx
lea    0x2ed3(%rip),%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     1688 <main+0x518>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0x2eaf(%rip),%rdi
lea    0xe38(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1683 <main+0x513>
lea    0x2e8d(%rip),%rdi
add    $0x8,%rdi
lea    0xe1b(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1090 <sscanf@plt>
cmp    $0x1,%eax
jge    121f <main+0xaf>
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xdf9(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    167e <main+0x50e>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     1254 <main+0xe4>
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%r8d
lea    0xdd8(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2d87(%rip),%rax
mov    (%rax),%edx
lea    0x2e06(%rip),%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0x2dec(%rip),%rdi
lea    0xdbf(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     12b9 <main+0x149>
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xdaf(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    118d <main+0x1d>
mov    0x2d28(%rip),%rax
mov    (%rax),%edx
lea    0x2da7(%rip),%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0x2d8d(%rip),%rdi
lea    0xd92(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1318 <main+0x1a8>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    118d <main+0x1d>
mov    0x2cc9(%rip),%rax
mov    (%rax),%edx
lea    0x2d48(%rip),%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0x2d2e(%rip),%rdi
lea    0xd37(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1377 <main+0x207>
mov    0x2c79(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xd25(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    118d <main+0x1d>
mov    0x2c6a(%rip),%rax
mov    (%rax),%edx
lea    0x2ce9(%rip),%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0x2ccf(%rip),%rax
mov    %rax,0x2e60(%rip)
mov    0x2e59(%rip),%rcx
lea    0x2cba(%rip),%rax
sub    %rax,%rcx
xor    %eax,%eax
cmp    $0xc7,%rcx
mov    %al,-0x11(%rbp)
jae    140e <main+0x29e>
mov    0x2e36(%rip),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x28,%ecx
mov    %al,-0x11(%rbp)
je     140e <main+0x29e>
mov    0x2e1e(%rip),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x3c,%ecx
mov    %al,-0x11(%rbp)
je     140e <main+0x29e>
mov    0x2e06(%rip),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    141e <main+0x2ae>
jmp    143a <main+0x2ca>
jmp    1423 <main+0x2b3>
mov    0x2dde(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2dd3(%rip)
jmp    13a8 <main+0x238>
mov    0x2dc7(%rip),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    152e <main+0x3be>
mov    0x2db4(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2da9(%rip)
mov    %rax,0x2daa(%rip)
mov    0x2da3(%rip),%rcx
lea    0x2bfc(%rip),%rax
sub    %rax,%rcx
xor    %eax,%eax
cmp    $0xc7,%rcx
mov    %al,-0x12(%rbp)
jae    14b4 <main+0x344>
mov    0x2d80(%rip),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x5c,%ecx
mov    %al,-0x12(%rbp)
je     14b4 <main+0x344>
mov    0x2d68(%rip),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
test   $0x1,%al
jne    14c4 <main+0x354>
jmp    14e0 <main+0x370>
jmp    14c9 <main+0x359>
mov    0x2d40(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2d35(%rip)
jmp    1466 <main+0x2f6>
mov    0x2d29(%rip),%rax
movb   $0x0,(%rax)
mov    0x2d17(%rip),%rsi
lea    0x2c48(%rip),%rdi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1529 <main+0x3b9>
mov    0x2cfa(%rip),%rsi
lea    0x2c2b(%rip),%rdi
call   1040 <strcpy@plt>
mov    -0xc(%rbp),%esi
lea    0xb86(%rip),%rdi
call   1050 <printf@plt>
jmp    1679 <main+0x509>
mov    0x2cd3(%rip),%rax
movsbl (%rax),%eax
cmp    $0x3c,%eax
jne    1655 <main+0x4e5>
mov    0x2cc0(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2cb5(%rip)
mov    %rax,0x2cb6(%rip)
mov    0x2caf(%rip),%rcx
lea    0x2b08(%rip),%rax
sub    %rax,%rcx
xor    %eax,%eax
cmp    $0xc6,%rcx
mov    %al,-0x13(%rbp)
jae    15db <main+0x46b>
mov    0x2c8c(%rip),%rax
movsbl (%rax),%eax
cmp    $0x32,%eax
jne    15a9 <main+0x439>
mov    0x2c79(%rip),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x38,%ecx
mov    %al,-0x13(%rbp)
je     15db <main+0x46b>
mov    0x2c60(%rip),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x14(%rbp)
je     15d5 <main+0x465>
mov    0x2c48(%rip),%rax
movsbl 0x1(%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x14(%rbp)
mov    -0x14(%rbp),%al
mov    %al,-0x13(%rbp)
mov    -0x13(%rbp),%al
test   $0x1,%al
jne    15eb <main+0x47b>
jmp    1607 <main+0x497>
jmp    15f0 <main+0x480>
mov    0x2c19(%rip),%rax
add    $0x2,%rax
mov    %rax,0x2c0e(%rip)
jmp    155a <main+0x3ea>
mov    0x2c02(%rip),%rax
movb   $0x0,(%rax)
mov    0x2bf0(%rip),%rsi
lea    0x2b21(%rip),%rdi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1650 <main+0x4e0>
mov    0x2bd3(%rip),%rsi
lea    0x2b04(%rip),%rdi
call   1040 <strcpy@plt>
mov    -0xc(%rbp),%esi
lea    0xa5f(%rip),%rdi
call   1050 <printf@plt>
jmp    1674 <main+0x504>
mov    0x297c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xa46(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    118d <main+0x1d>
jmp    1679 <main+0x509>
jmp    167e <main+0x50e>
jmp    1683 <main+0x513>
jmp    118d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e66(%rip),%r13
mov    0x0(%r13),%edx
lea    0x2ee3(%rip),%rbx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     157c <main+0x40c>
lea    0xe56(%rip),%r14
xor    %ebp,%ebp
xor    %r15d,%r15d
jmp    11ed <main+0x7d>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
lea    0xe4b(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13),%edx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    %r12d,%r15d
test   %rax,%rax
je     157c <main+0x40c>
lea    0x1(%r15),%r12d
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    11d0 <main+0x60>
lea    0x2e6b(%rip),%rdi
lea    0xdf5(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1090 <sscanf@plt>
test   %eax,%eax
jle    11b1 <main+0x41>
mov    0x4(%rsp),%r8d
add    $0x1,%ebp
cmp    %ebp,%r8d
jne    1234 <main+0xc4>
mov    %r8d,%ebp
jmp    1254 <main+0xe4>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
lea    0xde1(%rip),%rsi
mov    %r12d,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x4(%rsp),%ebp
mov    0x0(%r13),%edx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
lea    0xddb(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1292 <main+0x122>
add    $0x2,%r15d
mov    0x2d54(%rip),%rax
mov    (%rax),%edi
lea    0xdcf(%rip),%rsi
jmp    1310 <main+0x1a0>
mov    0x0(%r13),%edx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
lea    0xdcf(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12cd <main+0x15d>
add    $0x3,%r15d
mov    0x2d16(%rip),%rax
mov    (%rax),%edi
lea    0xdad(%rip),%rsi
jmp    1310 <main+0x1a0>
mov    0x0(%r13),%edx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
lea    0xd98(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1322 <main+0x1b2>
add    $0x4,%r15d
mov    0x2cdb(%rip),%rax
mov    (%rax),%edi
lea    0xd8a(%rip),%rsi
cs nopw 0x0(%rax,%rax,1)
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %r15d,%r12d
jmp    11d0 <main+0x60>
mov    0x0(%r13),%edx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
add    $0x5,%r15d
xor    %esi,%esi
movabs $0x1000010000000400,%rcx
lea    0x2df6(%rip),%r12
movzbl (%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     135e <main+0x1ee>
bt     %rax,%rcx
jb     13ef <main+0x27f>
movzbl 0x1(%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     1373 <main+0x203>
bt     %rax,%rcx
jb     13f4 <main+0x284>
movzbl 0x2(%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     1384 <main+0x214>
bt     %rax,%rcx
jb     13fd <main+0x28d>
movzbl 0x3(%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     1395 <main+0x225>
bt     %rax,%rcx
jb     1406 <main+0x296>
movzbl 0x4(%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     13a6 <main+0x236>
bt     %rax,%rcx
jb     140f <main+0x29f>
movzbl 0x5(%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     13b7 <main+0x247>
bt     %rax,%rcx
jb     1418 <main+0x2a8>
movzbl 0x6(%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     13c8 <main+0x258>
bt     %rax,%rcx
jb     1421 <main+0x2b1>
cmp    $0xc0,%rsi
je     14b9 <main+0x349>
movzbl 0x7(%rsi,%rbx,1),%eax
cmp    $0x3c,%rax
ja     13e6 <main+0x276>
bt     %rax,%rcx
jb     142a <main+0x2ba>
add    $0x8,%rsi
jmp    134a <main+0x1da>
add    %rbx,%rsi
jmp    1431 <main+0x2c1>
add    %rbx,%rsi
add    $0x1,%rsi
jmp    1431 <main+0x2c1>
add    %rbx,%rsi
add    $0x2,%rsi
jmp    1431 <main+0x2c1>
add    %rbx,%rsi
add    $0x3,%rsi
jmp    1431 <main+0x2c1>
add    %rbx,%rsi
add    $0x4,%rsi
jmp    1431 <main+0x2c1>
add    %rbx,%rsi
add    $0x5,%rsi
jmp    1431 <main+0x2c1>
add    %rbx,%rsi
add    $0x6,%rsi
jmp    1431 <main+0x2c1>
add    %rbx,%rsi
add    $0x7,%rsi
mov    %rsi,0x2dd0(%rip)
cmp    $0x3c,%al
je     14d5 <main+0x365>
cmp    $0x28,%al
jne    14a4 <main+0x334>
add    $0x1,%rsi
mov    %rsi,0x2db9(%rip)
mov    %rsi,%rcx
sub    %rbx,%rcx
mov    %rsi,%rax
cmp    $0xc6,%rcx
ja     153f <main+0x3cf>
mov    %rbx,%rcx
sub    %rsi,%rcx
add    $0xc7,%rcx
mov    %rsi,%rax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rax),%edx
cmp    $0xa,%dl
je     153f <main+0x3cf>
cmp    $0x5c,%dl
je     153f <main+0x3cf>
add    $0x1,%rax
add    $0xffffffffffffffff,%rcx
jne    1480 <main+0x310>
jmp    153f <main+0x3cf>
mov    0x2b2d(%rip),%rax
mov    (%rax),%edi
lea    0xbfa(%rip),%rsi
jmp    1310 <main+0x1a0>
lea    0x2c77(%rip),%rsi
mov    %rsi,0x2d41(%rip)
mov    0x2c6a(%rip),%al
cmp    $0x3c,%al
jne    1440 <main+0x2d0>
add    $0x1,%rsi
mov    %rsi,0x2d28(%rip)
mov    %rsi,%rcx
sub    %rbx,%rcx
mov    %rsi,%rax
cmp    $0xc5,%rcx
ja     153f <main+0x3cf>
mov    %rsi,%rax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rax),%edx
cmp    $0x32,%dl
je     1520 <main+0x3b0>
cmp    $0xa,%dl
je     153f <main+0x3cf>
movzbl 0x1(%rax),%edx
jmp    1529 <main+0x3b9>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x1(%rax),%edx
cmp    $0x38,%dl
je     153f <main+0x3cf>
cmp    $0xa,%dl
je     153f <main+0x3cf>
add    $0x2,%rax
add    $0x2,%rcx
cmp    $0xc6,%rcx
jb     1500 <main+0x390>
mov    %rax,0x2cca(%rip)
movb   $0x0,(%rax)
mov    %r12,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     131a <main+0x1aa>
mov    0x2ca7(%rip),%rsi
mov    %r12,%rdi
call   1040 <strcpy@plt>
lea    0xb3a(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
jmp    131a <main+0x1aa>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.buf = internal global [200 x i8] zeroinitializer
@main.pagename = internal global [200 x i8] zeroinitializer
@main.p = internal global i8* null
@main.q = internal global i8* null
@stdin = global i32 0
@.str = [9 x i8] c"%%Page: \00"
@.str.1 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.2 = [25 x i8] c"%d: missing page number\0A\00"
@.str.3 = [37 x i8] c"%d: page %d expected, page %d found\0A\00"
@.str.4 = [18 x i8] c"%%BeginPageSetup\0A\00"
@.str.5 = [28 x i8] c"%d: BeginPageSetup missing\0A\00"
@.str.6 = [4 x i8] c"BP\0A\00"
@.str.7 = [8 x i8] c"%d: BP\0A\00"
@.str.8 = [16 x i8] c"%%EndPageSetup\0A\00"
@.str.9 = [26 x i8] c"%d: EndPageSetup missing\0A\00"
@.str.10 = [4 x i8] c"%d\0A\00"
@.str.11 = [23 x i8] c"%d: Page name missing\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %199, %192, %63, %52, %41, %0
%6 = load i32, i32* @stdin
%7 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %200
9: ; preds = %5
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = call i64 @strncmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %199
14: ; preds = %9
%15 = call i32 @sscanf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 8), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%16 = icmp slt i32 %15, 1
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* @stderr
%19 = load i32, i32* %2
%20 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %198
21: ; preds = %14
%22 = load i32, i32* %4
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
%25 = icmp ne i32 %22, %24
br i1 %25, label %26, label %33
26: ; preds = %21
%27 = load i32, i32* @stderr
%28 = load i32, i32* %2
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
%31 = load i32, i32* %4
%32 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %28, i32 %30, i32 %31)
br label %33
33: ; preds = %26, %21
%34 = load i32, i32* %4
store i32 %34, i32* %3
%35 = load i32, i32* @stdin
%36 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %35)
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
%39 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %33
%42 = load i32, i32* @stderr
%43 = load i32, i32* %2
%44 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %43)
br label %5
45: ; preds = %33
%46 = load i32, i32* @stdin
%47 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %46)
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
%50 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %45
%53 = load i32, i32* @stderr
%54 = load i32, i32* %2
%55 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %54)
br label %5
56: ; preds = %45
%57 = load i32, i32* @stdin
%58 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %57)
%59 = load i32, i32* %2
%60 = add nsw i32 %59, 1
store i32 %60, i32* %2
%61 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %67
63: ; preds = %56
%64 = load i32, i32* @stderr
%65 = load i32, i32* %2
%66 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %65)
br label %5
67: ; preds = %56
%68 = load i32, i32* @stdin
%69 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %68)
%70 = load i32, i32* %2
%71 = add nsw i32 %70, 1
store i32 %71, i32* %2
store i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8** @main.p
br label %72
72: ; preds = %95, %67
%73 = load i8*, i8** @main.p
%74 = ptrtoint i8* %73 to i64
%75 = sub i64 %74, ptrtoint ([200 x i8]* @main.buf to i64)
%76 = icmp ult i64 %75, 199
br i1 %76, label %77, label %92
77: ; preds = %72
%78 = load i8*, i8** @main.p
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp ne i32 %80, 40
br i1 %81, label %82, label %92
82: ; preds = %77
%83 = load i8*, i8** @main.p
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp ne i32 %85, 60
br i1 %86, label %87, label %92
87: ; preds = %82
%88 = load i8*, i8** @main.p
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp ne i32 %90, 10
br label %92
92: ; preds = %87, %82, %77, %72
%93 = phi i1 [ false, %82 ], [ false, %77 ], [ false, %72 ], [ %91, %87 ]
br i1 %93, label %94, label %98
94: ; preds = %92
br label %95
95: ; preds = %94
%96 = load i8*, i8** @main.p
%97 = getelementptr inbounds i8, i8* %96, i32 1
store i8* %97, i8** @main.p
br label %72
98: ; preds = %92
%99 = load i8*, i8** @main.p
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 40
br i1 %102, label %103, label %138
103: ; preds = %98
%104 = load i8*, i8** @main.p
%105 = getelementptr inbounds i8, i8* %104, i32 1
store i8* %105, i8** @main.p
store i8* %105, i8** @main.q
br label %106
106: ; preds = %124, %103
%107 = load i8*, i8** @main.q
%108 = ptrtoint i8* %107 to i64
%109 = sub i64 %108, ptrtoint ([200 x i8]* @main.buf to i64)
%110 = icmp ult i64 %109, 199
br i1 %110, label %111, label %121
111: ; preds = %106
%112 = load i8*, i8** @main.q
%113 = load i8, i8* %112
%114 = sext i8 %113 to i32
%115 = icmp ne i32 %114, 92
br i1 %115, label %116, label %121
116: ; preds = %111
%117 = load i8*, i8** @main.q
%118 = load i8, i8* %117
%119 = sext i8 %118 to i32
%120 = icmp ne i32 %119, 10
br label %121
121: ; preds = %116, %111, %106
%122 = phi i1 [ false, %111 ], [ false, %106 ], [ %120, %116 ]
br i1 %122, label %123, label %127
123: ; preds = %121
br label %124
124: ; preds = %123
%125 = load i8*, i8** @main.q
%126 = getelementptr inbounds i8, i8* %125, i32 1
store i8* %126, i8** @main.q
br label %106
127: ; preds = %121
%128 = load i8*, i8** @main.q
store i8 0, i8* %128
%129 = load i8*, i8** @main.p
%130 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %129)
%131 = icmp ne i64 %130, 0
br i1 %131, label %132, label %137
132: ; preds = %127
%133 = load i8*, i8** @main.p
%134 = call i32 @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %133)
%135 = load i32, i32* %3
%136 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %135)
br label %137
137: ; preds = %132, %127
br label %197
138: ; preds = %98
%139 = load i8*, i8** @main.p
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 60
br i1 %142, label %143, label %192
143: ; preds = %138
%144 = load i8*, i8** @main.p
%145 = getelementptr inbounds i8, i8* %144, i32 1
store i8* %145, i8** @main.p
store i8* %145, i8** @main.q
br label %146
146: ; preds = %178, %143
%147 = load i8*, i8** @main.q
%148 = ptrtoint i8* %147 to i64
%149 = sub i64 %148, ptrtoint ([200 x i8]* @main.buf to i64)
%150 = icmp ult i64 %149, 198
br i1 %150, label %151, label %175
151: ; preds = %146
%152 = load i8*, i8** @main.q
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 50
br i1 %155, label %156, label %162
156: ; preds = %151
%157 = load i8*, i8** @main.q
%158 = getelementptr inbounds i8, i8* %157, i64 1
%159 = load i8, i8* %158
%160 = sext i8 %159 to i32
%161 = icmp eq i32 %160, 56
br i1 %161, label %175, label %162
162: ; preds = %156, %151
%163 = load i8*, i8** @main.q
%164 = load i8, i8* %163
%165 = sext i8 %164 to i32
%166 = icmp ne i32 %165, 10
br i1 %166, label %167, label %173
167: ; preds = %162
%168 = load i8*, i8** @main.q
%169 = getelementptr inbounds i8, i8* %168, i64 1
%170 = load i8, i8* %169
%171 = sext i8 %170 to i32
%172 = icmp ne i32 %171, 10
br label %173
173: ; preds = %167, %162
%174 = phi i1 [ false, %162 ], [ %172, %167 ]
br label %175
175: ; preds = %173, %156, %146
%176 = phi i1 [ false, %156 ], [ false, %146 ], [ %174, %173 ]
br i1 %176, label %177, label %181
177: ; preds = %175
br label %178
178: ; preds = %177
%179 = load i8*, i8** @main.q
%180 = getelementptr inbounds i8, i8* %179, i64 2
store i8* %180, i8** @main.q
br label %146
181: ; preds = %175
%182 = load i8*, i8** @main.q
store i8 0, i8* %182
%183 = load i8*, i8** @main.p
%184 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %183)
%185 = icmp ne i64 %184, 0
br i1 %185, label %186, label %191
186: ; preds = %181
%187 = load i8*, i8** @main.p
%188 = call i32 @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %187)
%189 = load i32, i32* %3
%190 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %189)
br label %191
191: ; preds = %186, %181
br label %196
192: ; preds = %138
%193 = load i32, i32* @stderr
%194 = load i32, i32* %2
%195 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %193, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %194)
br label %5
196: ; preds = %191
br label %197
197: ; preds = %196, %137
br label %198
198: ; preds = %197, %17
br label %199
199: ; preds = %198, %9
br label %5
200: ; preds = %5
%201 = load i32, i32* %1
ret i32 %201
}

LLVM IR (-O2):
@main.buf = internal global [200 x i8] zeroinitializer
@main.pagename = internal global [200 x i8] zeroinitializer
@main.p = internal unnamed_addr global i8* null
@main.q = internal unnamed_addr global i8* null
@stdin = global i32 0
@.str = [9 x i8] c"%%Page: \00"
@.str.1 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.2 = [25 x i8] c"%d: missing page number\0A\00"
@.str.3 = [37 x i8] c"%d: page %d expected, page %d found\0A\00"
@.str.4 = [18 x i8] c"%%BeginPageSetup\0A\00"
@.str.5 = [28 x i8] c"%d: BeginPageSetup missing\0A\00"
@.str.6 = [4 x i8] c"BP\0A\00"
@.str.7 = [8 x i8] c"%d: BP\0A\00"
@.str.8 = [16 x i8] c"%%EndPageSetup\0A\00"
@.str.9 = [26 x i8] c"%d: EndPageSetup missing\0A\00"
@.str.10 = [4 x i8] c"%d\0A\00"
@.str.11 = [23 x i8] c"%d: Page name missing\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @stdin
%4 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %167, label %6
6: ; preds = %0, %36
%7 = phi i32 [ %38, %36 ], [ 0, %0 ]
%8 = phi i32 [ %37, %36 ], [ 0, %0 ]
%9 = add nsw i32 %8, 1
%10 = call i64 @strncmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %36
12: ; preds = %6
%13 = call i32 @sscanf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 8), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%14 = icmp slt i32 %13, 1
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %36
18: ; preds = %12
%19 = load i32, i32* %1
%20 = add nsw i32 %7, 1
%21 = icmp eq i32 %19, %20
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %9, i32 %20, i32 %19)
%25 = load i32, i32* %1
br label %26
26: ; preds = %22, %18
%27 = phi i32 [ %25, %22 ], [ %19, %18 ]
%28 = load i32, i32* @stdin
%29 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %28)
%30 = add nsw i32 %8, 2
%31 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %42, label %33
33: ; preds = %26
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %30)
br label %36
36: ; preds = %6, %129, %125, %156, %160, %15, %33, %48, %57, %164
%37 = phi i32 [ %30, %33 ], [ %45, %48 ], [ %54, %57 ], [ %63, %164 ], [ %9, %15 ], [ %63, %129 ], [ %63, %125 ], [ %63, %160 ], [ %63, %156 ], [ %9, %6 ]
%38 = phi i32 [ %27, %33 ], [ %27, %48 ], [ %27, %57 ], [ %27, %164 ], [ %7, %15 ], [ %27, %129 ], [ %27, %125 ], [ %27, %160 ], [ %27, %156 ], [ %7, %6 ]
%39 = load i32, i32* @stdin
%40 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %39)
%41 = icmp eq i64 %40, 0
br i1 %41, label %167, label %6
42: ; preds = %26
%43 = load i32, i32* @stdin
%44 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %43)
%45 = add nsw i32 %8, 3
%46 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %51, label %48
48: ; preds = %42
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %45)
br label %36
51: ; preds = %42
%52 = load i32, i32* @stdin
%53 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %52)
%54 = add nsw i32 %8, 4
%55 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %51
%58 = load i32, i32* @stderr
%59 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %54)
br label %36
60: ; preds = %51
%61 = load i32, i32* @stdin
%62 = call i64 @fgets(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), i32 200, i32 %61)
%63 = add nsw i32 %8, 5
br label %64
64: ; preds = %90, %60
%65 = phi i8* [ getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 0), %60 ], [ %91, %90 ]
%66 = load i8, i8* %65
switch i8 %66, label %67 [
i8 40, label %104
i8 60, label %104
i8 10, label %104
]
67: ; preds = %64
%68 = getelementptr inbounds i8, i8* %65, i64 1
%69 = load i8, i8* %68
switch i8 %69, label %70 [
i8 40, label %102
i8 60, label %102
i8 10, label %102
]
70: ; preds = %67
%71 = getelementptr inbounds i8, i8* %65, i64 2
%72 = load i8, i8* %71
switch i8 %72, label %73 [
i8 40, label %100
i8 60, label %100
i8 10, label %100
]
73: ; preds = %70
%74 = getelementptr inbounds i8, i8* %65, i64 3
%75 = load i8, i8* %74
switch i8 %75, label %76 [
i8 40, label %98
i8 60, label %98
i8 10, label %98
]
76: ; preds = %73
%77 = getelementptr inbounds i8, i8* %65, i64 4
%78 = load i8, i8* %77
switch i8 %78, label %79 [
i8 40, label %96
i8 60, label %96
i8 10, label %96
]
79: ; preds = %76
%80 = getelementptr inbounds i8, i8* %65, i64 5
%81 = load i8, i8* %80
switch i8 %81, label %82 [
i8 40, label %94
i8 60, label %94
i8 10, label %94
]
82: ; preds = %79
%83 = getelementptr inbounds i8, i8* %65, i64 6
%84 = load i8, i8* %83
switch i8 %84, label %85 [
i8 40, label %104
i8 60, label %104
i8 10, label %104
]
85: ; preds = %82
%86 = getelementptr inbounds i8, i8* %65, i64 7
%87 = icmp eq i8* %83, getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 198)
br i1 %87, label %92, label %88
88: ; preds = %85
%89 = load i8, i8* %86
switch i8 %89, label %90 [
i8 40, label %104
i8 60, label %104
i8 10, label %104
]
90: ; preds = %88
%91 = getelementptr inbounds i8, i8* %65, i64 8
br label %64
92: ; preds = %85
store i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 199), i8** @main.p
%93 = load i8, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 199)
br label %107
94: ; preds = %79, %79, %79
%95 = getelementptr inbounds i8, i8* %65, i64 5
br label %104
96: ; preds = %76, %76, %76
%97 = getelementptr inbounds i8, i8* %65, i64 4
br label %104
98: ; preds = %73, %73, %73
%99 = getelementptr inbounds i8, i8* %65, i64 3
br label %104
100: ; preds = %70, %70, %70
%101 = getelementptr inbounds i8, i8* %65, i64 2
br label %104
102: ; preds = %67, %67, %67
%103 = getelementptr inbounds i8, i8* %65, i64 1
br label %104
104: ; preds = %64, %64, %64, %82, %82, %82, %88, %88, %88, %102, %100, %98, %96, %94
%105 = phi i8* [ %95, %94 ], [ %97, %96 ], [ %99, %98 ], [ %101, %100 ], [ %103, %102 ], [ %86, %88 ], [ %86, %88 ], [ %86, %88 ], [ %83, %82 ], [ %83, %82 ], [ %83, %82 ], [ %65, %64 ], [ %65, %64 ], [ %65, %64 ]
%106 = phi i8 [ %81, %94 ], [ %78, %96 ], [ %75, %98 ], [ %72, %100 ], [ %69, %102 ], [ %89, %88 ], [ %89, %88 ], [ %89, %88 ], [ %84, %82 ], [ %84, %82 ], [ %84, %82 ], [ %66, %64 ], [ %66, %64 ], [ %66, %64 ]
store i8* %105, i8** @main.p
br label %107
107: ; preds = %104, %92
%108 = phi i8* [ getelementptr inbounds ([200 x i8], [200 x i8]* @main.buf, i64 0, i64 199), %92 ], [ %105, %104 ]
%109 = phi i8 [ %93, %92 ], [ %106, %104 ]
switch i8 %109, label %164 [
i8 40, label %110
i8 60, label %133
]
110: ; preds = %107
%111 = getelementptr inbounds i8, i8* %108, i64 1
store i8* %111, i8** @main.p
%112 = ptrtoint i8* %111 to i64
%113 = sub i64 %112, ptrtoint ([200 x i8]* @main.buf to i64)
%114 = icmp ult i64 %113, 199
br i1 %114, label %115, label %125
115: ; preds = %110
%116 = getelementptr i8, i8* %108, i64 add (i64 ptrtoint ([200 x i8]* @main.buf to i64), i64 198)
%117 = sub i64 1, %112
%118 = getelementptr i8, i8* %116, i64 %117
br label %119
119: ; preds = %115, %122
%120 = phi i8* [ %123, %122 ], [ %111, %115 ]
%121 = load i8, i8* %120
switch i8 %121, label %122 [
i8 92, label %125
i8 10, label %125
]
122: ; preds = %119
%123 = getelementptr inbounds i8, i8* %120, i64 1
%124 = icmp eq i8* %120, %118
br i1 %124, label %125, label %119
125: ; preds = %122, %119, %119, %110
%126 = phi i8* [ %111, %110 ], [ %120, %119 ], [ %120, %119 ], [ %123, %122 ]
store i8* %126, i8** @main.q
store i8 0, i8* %126
%127 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %111)
%128 = icmp eq i64 %127, 0
br i1 %128, label %36, label %129
129: ; preds = %125
%130 = load i8*, i8** @main.p
%131 = call i32 @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %130)
%132 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %27)
br label %36
133: ; preds = %107
%134 = getelementptr inbounds i8, i8* %108, i64 1
store i8* %134, i8** @main.p
%135 = ptrtoint i8* %134 to i64
%136 = sub i64 %135, ptrtoint ([200 x i8]* @main.buf to i64)
%137 = icmp ult i64 %136, 198
br i1 %137, label %138, label %156
138: ; preds = %133, %151
%139 = phi i8* [ %152, %151 ], [ %134, %133 ]
%140 = load i8, i8* %139
switch i8 %140, label %141 [
i8 50, label %144
i8 10, label %156
]
141: ; preds = %138
%142 = getelementptr inbounds i8, i8* %139, i64 1
%143 = load i8, i8* %142
br label %148
144: ; preds = %138
%145 = getelementptr inbounds i8, i8* %139, i64 1
%146 = load i8, i8* %145
%147 = icmp eq i8 %146, 56
br i1 %147, label %156, label %148
148: ; preds = %141, %144
%149 = phi i8 [ %143, %141 ], [ %146, %144 ]
%150 = icmp eq i8 %149, 10
br i1 %150, label %156, label %151
151: ; preds = %148
%152 = getelementptr inbounds i8, i8* %139, i64 2
%153 = ptrtoint i8* %152 to i64
%154 = sub i64 %153, ptrtoint ([200 x i8]* @main.buf to i64)
%155 = icmp ult i64 %154, 198
br i1 %155, label %138, label %156
156: ; preds = %148, %144, %151, %138, %133
%157 = phi i8* [ %134, %133 ], [ %139, %138 ], [ %152, %151 ], [ %139, %144 ], [ %139, %148 ]
store i8* %157, i8** @main.q
store i8 0, i8* %157
%158 = call i64 @strcmp(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %134)
%159 = icmp eq i64 %158, 0
br i1 %159, label %36, label %160
160: ; preds = %156
%161 = load i8*, i8** @main.p
%162 = call i32 @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @main.pagename, i64 0, i64 0), i8* %161)
%163 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %27)
br label %36
164: ; preds = %107
%165 = load i32, i32* @stderr
%166 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %165, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %63)
br label %36
167: ; preds = %36, %0
ret i32 0
}