#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*/ FILE;

/* Variables and functions */
char EOF;
int /*<<< orphan*/ add(int, char **, int *, int);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, char, int, int,
                           ...);
char getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/ *);
int readSequence(FILE *fil, int *conv, char **seq, char **id, char **desc,
                 int *length) {
  char c;
  int n;
  static FILE *oldFil = 0;
  static int line;
  int buflen;
  if (fil != oldFil) {
    line = 1;
    oldFil = fil;
  }
  c = getc(fil);
  if (c == '>') {
    c = getc(fil);
    n = 0;
    buflen = -32;
    while (!feof(fil) && c != ' ' && c != '\n' && c != '\t') {
      if (id)
        add(c, id, &buflen, n++);
      c = getc(fil);
    }
    if (id)
      add(0, id, &buflen, n);
    while (!feof(fil) && (c == ' ' || c == '\t'))
      c = getc(fil);
    n = 0;
    buflen = -32;
    while (!feof(fil) && c != '\n') {
      if (desc)
        add(c, desc, &buflen, n++);
      c = getc(fil);
    }
    if (desc)
      add(0, desc, &buflen, n);
    ++line;
  } else {
    ungetc(c, fil);
    if (id)
      *id = "";
    if (desc)
      *desc = "";
  }
  conv[' '] = conv['\t'] = -1;
  conv['\n'] = -3;
  n = 0;
  buflen = -1024;
  while (!feof(fil)) {
    c = getc(fil);
    if (c == '>') {
      ungetc(c, fil);
      break;
    }
    if (c == EOF || c == EOF + 256)
      break;
    switch (conv[c]) {
    case -2: {
      if (id)
        fprintf(stderr,
                "Bad char 0x%x = '%c' at line %d, base %d, sequence %s\n", c, c,
                line, n, *id);
      else
        fprintf(stderr, "Bad char 0x%x = '%c' at line %d, base %d\n", c, c,
                line, n);
      return 0;
    } break;
    case -3:
      ++line;
    case -1:
      break;
    default:
      if (seq)
        add(conv[c], seq, &buflen, n++);
      else
        ++n;
    }
  }
  if (seq)
    add(0, seq, &buflen, n);
  if (length)
    *length = n;
  return n;
}


x86 assembly (clang, -O0):
<readSequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
cmp    0x2ed5(%rip),%rax
je     1196 <readSequence+0x46>
movl   $0x1,0x2ecd(%rip)
mov    -0x10(%rbp),%rax
mov    %rax,0x2eba(%rip)
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %al,-0x39(%rbp)
movsbl -0x39(%rbp),%eax
cmp    $0x3e,%eax
jne    1389 <readSequence+0x239>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %al,-0x39(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0xffffffe0,-0x44(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x45(%rbp)
jne    1213 <readSequence+0xc3>
movsbl -0x39(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x45(%rbp)
je     1213 <readSequence+0xc3>
movsbl -0x39(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x45(%rbp)
je     1213 <readSequence+0xc3>
movsbl -0x39(%rbp),%eax
cmp    $0x9,%eax
setne  %al
mov    %al,-0x45(%rbp)
mov    -0x45(%rbp),%al
test   $0x1,%al
jne    1223 <readSequence+0xd3>
jmp    125b <readSequence+0x10b>
cmpq   $0x0,-0x28(%rbp)
je     124a <readSequence+0xfa>
movsbl -0x39(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x40(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
lea    -0x44(%rbp),%rdx
call   1030 <add@plt>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %al,-0x39(%rbp)
jmp    11c9 <readSequence+0x79>
cmpq   $0x0,-0x28(%rbp)
je     1278 <readSequence+0x128>
mov    -0x28(%rbp),%rsi
mov    -0x40(%rbp),%ecx
xor    %edi,%edi
lea    -0x44(%rbp),%rdx
call   1030 <add@plt>
jmp    127d <readSequence+0x12d>
mov    -0x10(%rbp),%rdi
call   1050 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x46(%rbp)
jne    12bb <readSequence+0x16b>
movsbl -0x39(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x47(%rbp)
je     12b5 <readSequence+0x165>
movsbl -0x39(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x47(%rbp)
mov    -0x47(%rbp),%al
mov    %al,-0x46(%rbp)
mov    -0x46(%rbp),%al
test   $0x1,%al
jne    12cb <readSequence+0x17b>
jmp    12dc <readSequence+0x18c>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %al,-0x39(%rbp)
jmp    127d <readSequence+0x12d>
movl   $0x0,-0x40(%rbp)
movl   $0xffffffe0,-0x44(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x48(%rbp)
jne    1310 <readSequence+0x1c0>
movsbl -0x39(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x48(%rbp)
mov    -0x48(%rbp),%al
test   $0x1,%al
jne    1320 <readSequence+0x1d0>
jmp    1358 <readSequence+0x208>
cmpq   $0x0,-0x30(%rbp)
je     1347 <readSequence+0x1f7>
movsbl -0x39(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
lea    -0x44(%rbp),%rdx
call   1030 <add@plt>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %al,-0x39(%rbp)
jmp    12ea <readSequence+0x19a>
cmpq   $0x0,-0x30(%rbp)
je     1375 <readSequence+0x225>
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%ecx
xor    %edi,%edi
lea    -0x44(%rbp),%rdx
call   1030 <add@plt>
mov    0x2cdd(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2cd4(%rip)
jmp    13cf <readSequence+0x27f>
mov    -0x39(%rbp),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1060 <ungetc@plt>
cmpq   $0x0,-0x28(%rbp)
je     13b1 <readSequence+0x261>
mov    -0x28(%rbp),%rax
lea    0xcb2(%rip),%rcx
mov    %rcx,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     13ca <readSequence+0x27a>
mov    -0x30(%rbp),%rax
lea    0xc99(%rip),%rcx
mov    %rcx,(%rax)
jmp    13cf <readSequence+0x27f>
mov    -0x18(%rbp),%rax
movl   $0xffffffff,0x24(%rax)
mov    -0x18(%rbp),%rax
movl   $0xffffffff,0x80(%rax)
ff ff ff
mov    -0x18(%rbp),%rax
movl   $0xfffffffd,0x28(%rax)
movl   $0x0,-0x40(%rbp)
movl   $0xfffffc00,-0x44(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    141f <readSequence+0x2cf>
jmp    15a0 <readSequence+0x450>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %al,-0x39(%rbp)
movsbl -0x39(%rbp),%eax
cmp    $0x3e,%eax
jne    144c <readSequence+0x2fc>
mov    -0x39(%rbp),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1060 <ungetc@plt>
jmp    15a0 <readSequence+0x450>
movsbl -0x39(%rbp),%eax
mov    0x2b91(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     147e <readSequence+0x32e>
movsbl -0x39(%rbp),%eax
mov    0x2b7b(%rip),%rcx
movsbl (%rcx),%ecx
add    $0x100,%ecx
cmp    %ecx,%eax
jne    1483 <readSequence+0x333>
jmp    15a0 <readSequence+0x450>
mov    -0x18(%rbp),%rax
movsbq -0x39(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4c(%rbp)
sub    $0xfffffffd,%eax
je     1545 <readSequence+0x3f5>
jmp    14a0 <readSequence+0x350>
mov    -0x4c(%rbp),%eax
sub    $0xfffffffe,%eax
je     14c2 <readSequence+0x372>
jmp    14b1 <readSequence+0x361>
mov    -0x4c(%rbp),%eax
sub    $0xffffffff,%eax
je     1554 <readSequence+0x404>
jmp    1559 <readSequence+0x409>
cmpq   $0x0,-0x28(%rbp)
je     150b <readSequence+0x3bb>
mov    0x2b04(%rip),%rax
mov    (%rax),%edi
mov    -0x39(%rbp),%dl
mov    -0x39(%rbp),%cl
mov    0x2b75(%rip),%r8d
mov    -0x40(%rbp),%r9d
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
lea    0xb0b(%rip),%rsi
movsbl %dl,%edx
movsbl %cl,%ecx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1539 <readSequence+0x3e9>
mov    0x2ac6(%rip),%rax
mov    (%rax),%edi
mov    -0x39(%rbp),%cl
mov    -0x39(%rbp),%al
mov    0x2b37(%rip),%r8d
mov    -0x40(%rbp),%r9d
lea    0xb0b(%rip),%rsi
movsbl %cl,%edx
movsbl %al,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    15d7 <readSequence+0x487>
mov    0x2b0d(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2b04(%rip)
jmp    159b <readSequence+0x44b>
cmpq   $0x0,-0x20(%rbp)
je     158d <readSequence+0x43d>
mov    -0x18(%rbp),%rax
movsbq -0x39(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x20(%rbp),%rsi
mov    -0x40(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
lea    -0x44(%rbp),%rdx
call   1030 <add@plt>
jmp    1596 <readSequence+0x446>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    159b <readSequence+0x44b>
jmp    1401 <readSequence+0x2b1>
cmpq   $0x0,-0x20(%rbp)
je     15bd <readSequence+0x46d>
mov    -0x20(%rbp),%rsi
mov    -0x40(%rbp),%ecx
xor    %edi,%edi
lea    -0x44(%rbp),%rdx
call   1030 <add@plt>
cmpq   $0x0,-0x38(%rbp)
je     15d1 <readSequence+0x481>
mov    -0x40(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readSequence>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,%r12
mov    %rcx,0x18(%rsp)
mov    %rdx,0x28(%rsp)
mov    %rsi,%rbx
mov    %rdi,%r13
cmp    %rdi,0x2ed3(%rip)
je     1190 <readSequence+0x40>
movl   $0x1,0x2ecf(%rip)
mov    %r13,0x2ec0(%rip)
mov    %r13,%rdi
call   1070 <getc@plt>
cmp    $0x3e,%al
mov    %rbx,0x20(%rsp)
jne    129c <readSequence+0x14c>
mov    %r13,%rdi
call   1070 <getc@plt>
mov    %eax,%r14d
movl   $0xffffffe0,0x14(%rsp)
ff
mov    %r13,%rdi
call   1050 <feof@plt>
xor    %r15d,%r15d
test   %eax,%eax
je     13b6 <readSequence+0x266>
mov    0x18(%rsp),%rsi
test   %rsi,%rsi
je     11fb <readSequence+0xab>
lea    0x14(%rsp),%rdx
xor    %edi,%edi
mov    %r15d,%ecx
call   1030 <add@plt>
jmp    11fb <readSequence+0xab>
cs nopw 0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1070 <getc@plt>
mov    %eax,%r14d
mov    %r13,%rdi
call   1050 <feof@plt>
test   %eax,%eax
jne    1213 <readSequence+0xc3>
cmp    $0x20,%r14b
je     11f0 <readSequence+0xa0>
cmp    $0x9,%r14b
je     11f0 <readSequence+0xa0>
movl   $0xffffffe0,0x14(%rsp)
ff
mov    %r13,%rdi
call   1050 <feof@plt>
xor    %ebp,%ebp
cmp    $0xa,%r14b
je     1278 <readSequence+0x128>
test   %eax,%eax
jne    1278 <readSequence+0x128>
xor    %ebp,%ebp
lea    0x14(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
test   %r12,%r12
je     125b <readSequence+0x10b>
movsbl %r14b,%edi
lea    0x1(%rbp),%ebx
mov    %r12,%rsi
mov    %r15,%rdx
mov    %ebp,%ecx
call   1030 <add@plt>
mov    %ebx,%ebp
mov    %r13,%rdi
call   1070 <getc@plt>
mov    %eax,%r14d
mov    %r13,%rdi
call   1050 <feof@plt>
cmp    $0xa,%r14b
je     1278 <readSequence+0x128>
test   %eax,%eax
je     1240 <readSequence+0xf0>
test   %r12,%r12
je     128e <readSequence+0x13e>
lea    0x14(%rsp),%rdx
xor    %edi,%edi
mov    %r12,%rsi
mov    %ebp,%ecx
call   1030 <add@plt>
addl   $0x1,0x2dc3(%rip)
mov    0x20(%rsp),%rbx
jmp    12cb <readSequence+0x17b>
movsbl %al,%edi
mov    %r13,%rsi
call   1060 <ungetc@plt>
mov    0x18(%rsp),%rcx
test   %rcx,%rcx
je     12bb <readSequence+0x16b>
lea    0xda8(%rip),%rax
mov    %rax,(%rcx)
test   %r12,%r12
je     12cb <readSequence+0x17b>
lea    0xd99(%rip),%rax
mov    %rax,(%r12)
movabs $0xfffffffdffffffff,%rax
ff ff ff
mov    %rax,0x24(%rbx)
movl   $0xffffffff,0x80(%rbx)
ff ff ff
movl   $0xfffffc00,0x14(%rsp)
ff
mov    %r13,%rdi
call   1050 <feof@plt>
xor    %r12d,%r12d
test   %eax,%eax
je     1332 <readSequence+0x1e2>
mov    0x28(%rsp),%rsi
test   %rsi,%rsi
je     1313 <readSequence+0x1c3>
lea    0x14(%rsp),%rdx
xor    %edi,%edi
mov    %r12d,%ecx
call   1030 <add@plt>
mov    0x30(%rsp),%rax
test   %rax,%rax
je     1320 <readSequence+0x1d0>
mov    %r12d,(%rax)
mov    %r12d,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r12d,%r12d
mov    0x2cac(%rip),%r15
lea    0x14(%rsp),%r14
jmp    1363 <readSequence+0x213>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addl   $0x1,0x2d01(%rip)
mov    %r13,%rdi
call   1050 <feof@plt>
test   %eax,%eax
jne    12fa <readSequence+0x1aa>
mov    %r13,%rdi
call   1070 <getc@plt>
cmp    $0x3e,%al
je     142b <readSequence+0x2db>
cmp    (%r15),%al
je     12fa <readSequence+0x1aa>
movsbq %al,%rcx
mov    (%rbx,%rcx,4),%edi
cmp    $0xfffffffd,%edi
je     1350 <readSequence+0x200>
cmp    $0xffffffff,%edi
je     1357 <readSequence+0x207>
cmp    $0xfffffffe,%edi
je     143d <readSequence+0x2ed>
lea    0x1(%r12),%ebp
mov    0x28(%rsp),%rsi
test   %rsi,%rsi
je     13ac <readSequence+0x25c>
mov    %r14,%rdx
mov    %r12d,%ecx
call   1030 <add@plt>
mov    %ebp,%r12d
mov    0x20(%rsp),%rbx
jmp    1357 <readSequence+0x207>
xor    %r15d,%r15d
lea    0x14(%rsp),%rbx
mov    0x18(%rsp),%rsi
jmp    13f0 <readSequence+0x2a0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,%rdi
call   1070 <getc@plt>
mov    %eax,%r14d
mov    %r13,%rdi
call   1050 <feof@plt>
test   %eax,%eax
mov    0x18(%rsp),%rsi
jne    11d0 <readSequence+0x80>
cmp    $0x20,%r14b
ja     140e <readSequence+0x2be>
movzbl %r14b,%eax
movabs $0x100000600,%rcx
bt     %rax,%rcx
jb     11d0 <readSequence+0x80>
test   %rsi,%rsi
je     13d0 <readSequence+0x280>
movsbl %r14b,%edi
lea    0x1(%r15),%ebp
mov    %rbx,%rdx
mov    %r15d,%ecx
call   1030 <add@plt>
mov    %ebp,%r15d
jmp    13d0 <readSequence+0x280>
mov    $0x3e,%edi
mov    %r13,%rsi
call   1060 <ungetc@plt>
jmp    12fa <readSequence+0x1aa>
mov    0x2b94(%rip),%rcx
mov    (%rcx),%edi
mov    0x2c0b(%rip),%r8d
mov    0x18(%rsp),%rcx
test   %rcx,%rcx
je     146a <readSequence+0x31a>
mov    (%rcx),%rcx
mov    %rcx,(%rsp)
movsbl %al,%ecx
lea    0xb98(%rip),%rsi
jmp    1474 <readSequence+0x324>
movsbl %al,%ecx
lea    0xbc3(%rip),%rsi
mov    %ecx,%edx
mov    %r12d,%r9d
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %r12d,%r12d
jmp    1320 <readSequence+0x1d0>

LLVM IR (-O0):
@readSequence.oldFil = internal global i32* null
@readSequence.line = internal global i32 0
@.str = [1 x i8] zeroinitializer
@EOF = global i8 0
@stderr = global i32 0
@.str.1 = [55 x i8] c"Bad char 0x%x = '%c' at line %d, base %d, sequence %s\0A\00"
@.str.2 = [42 x i8] c"Bad char 0x%x = '%c' at line %d, base %d\0A\00"
define i32 @readSequence(i32* %0, i32* %1, i8** %2, i8** %3, i8** %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8**
%11 = alloca i8**
%12 = alloca i8**
%13 = alloca i32*
%14 = alloca i8
%15 = alloca i32
%16 = alloca i32
store i32* %0, i32** %8
store i32* %1, i32** %9
store i8** %2, i8*** %10
store i8** %3, i8*** %11
store i8** %4, i8*** %12
store i32* %5, i32** %13
%17 = load i32*, i32** %8
%18 = load i32*, i32** @readSequence.oldFil
%19 = icmp ne i32* %17, %18
br i1 %19, label %20, label %22
20: ; preds = %6
store i32 1, i32* @readSequence.line
%21 = load i32*, i32** %8
store i32* %21, i32** @readSequence.oldFil
br label %22
22: ; preds = %20, %6
%23 = load i32*, i32** %8
%24 = call signext i8 @getc(i32* %23)
store i8 %24, i8* %14
%25 = load i8, i8* %14
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 62
br i1 %27, label %28, label %123
28: ; preds = %22
%29 = load i32*, i32** %8
%30 = call signext i8 @getc(i32* %29)
store i8 %30, i8* %14
store i32 0, i32* %15
store i32 -32, i32* %16
br label %31
31: ; preds = %59, %28
%32 = load i32*, i32** %8
%33 = call i32 @feof(i32* %32)
%34 = icmp ne i32 %33, 0
br i1 %34, label %47, label %35
35: ; preds = %31
%36 = load i8, i8* %14
%37 = sext i8 %36 to i32
%38 = icmp ne i32 %37, 32
br i1 %38, label %39, label %47
39: ; preds = %35
%40 = load i8, i8* %14
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 10
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = load i8, i8* %14
%45 = sext i8 %44 to i32
%46 = icmp ne i32 %45, 9
br label %47
47: ; preds = %43, %39, %35, %31
%48 = phi i1 [ false, %39 ], [ false, %35 ], [ false, %31 ], [ %46, %43 ]
br i1 %48, label %49, label %62
49: ; preds = %47
%50 = load i8**, i8*** %11
%51 = icmp ne i8** %50, null
br i1 %51, label %52, label %59
52: ; preds = %49
%53 = load i8, i8* %14
%54 = sext i8 %53 to i32
%55 = load i8**, i8*** %11
%56 = load i32, i32* %15
%57 = add nsw i32 %56, 1
store i32 %57, i32* %15
%58 = call i32 @add(i32 %54, i8** %55, i32* %16, i32 %56)
br label %59
59: ; preds = %52, %49
%60 = load i32*, i32** %8
%61 = call signext i8 @getc(i32* %60)
store i8 %61, i8* %14
br label %31
62: ; preds = %47
%63 = load i8**, i8*** %11
%64 = icmp ne i8** %63, null
br i1 %64, label %65, label %69
65: ; preds = %62
%66 = load i8**, i8*** %11
%67 = load i32, i32* %15
%68 = call i32 @add(i32 0, i8** %66, i32* %16, i32 %67)
br label %69
69: ; preds = %65, %62
br label %70
70: ; preds = %86, %69
%71 = load i32*, i32** %8
%72 = call i32 @feof(i32* %71)
%73 = icmp ne i32 %72, 0
br i1 %73, label %84, label %74
74: ; preds = %70
%75 = load i8, i8* %14
%76 = sext i8 %75 to i32
%77 = icmp eq i32 %76, 32
br i1 %77, label %82, label %78
78: ; preds = %74
%79 = load i8, i8* %14
%80 = sext i8 %79 to i32
%81 = icmp eq i32 %80, 9
br label %82
82: ; preds = %78, %74
%83 = phi i1 [ true, %74 ], [ %81, %78 ]
br label %84
84: ; preds = %82, %70
%85 = phi i1 [ false, %70 ], [ %83, %82 ]
br i1 %85, label %86, label %89
86: ; preds = %84
%87 = load i32*, i32** %8
%88 = call signext i8 @getc(i32* %87)
store i8 %88, i8* %14
br label %70
89: ; preds = %84
store i32 0, i32* %15
store i32 -32, i32* %16
br label %90
90: ; preds = %110, %89
%91 = load i32*, i32** %8
%92 = call i32 @feof(i32* %91)
%93 = icmp ne i32 %92, 0
br i1 %93, label %98, label %94
94: ; preds = %90
%95 = load i8, i8* %14
%96 = sext i8 %95 to i32
%97 = icmp ne i32 %96, 10
br label %98
98: ; preds = %94, %90
%99 = phi i1 [ false, %90 ], [ %97, %94 ]
br i1 %99, label %100, label %113
100: ; preds = %98
%101 = load i8**, i8*** %12
%102 = icmp ne i8** %101, null
br i1 %102, label %103, label %110
103: ; preds = %100
%104 = load i8, i8* %14
%105 = sext i8 %104 to i32
%106 = load i8**, i8*** %12
%107 = load i32, i32* %15
%108 = add nsw i32 %107, 1
store i32 %108, i32* %15
%109 = call i32 @add(i32 %105, i8** %106, i32* %16, i32 %107)
br label %110
110: ; preds = %103, %100
%111 = load i32*, i32** %8
%112 = call signext i8 @getc(i32* %111)
store i8 %112, i8* %14
br label %90
113: ; preds = %98
%114 = load i8**, i8*** %12
%115 = icmp ne i8** %114, null
br i1 %115, label %116, label %120
116: ; preds = %113
%117 = load i8**, i8*** %12
%118 = load i32, i32* %15
%119 = call i32 @add(i32 0, i8** %117, i32* %16, i32 %118)
br label %120
120: ; preds = %116, %113
%121 = load i32, i32* @readSequence.line
%122 = add nsw i32 %121, 1
store i32 %122, i32* @readSequence.line
br label %137
123: ; preds = %22
%124 = load i8, i8* %14
%125 = load i32*, i32** %8
%126 = call i32 @ungetc(i8 signext %124, i32* %125)
%127 = load i8**, i8*** %11
%128 = icmp ne i8** %127, null
br i1 %128, label %129, label %131
129: ; preds = %123
%130 = load i8**, i8*** %11
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %130
br label %131
131: ; preds = %129, %123
%132 = load i8**, i8*** %12
%133 = icmp ne i8** %132, null
br i1 %133, label %134, label %136
134: ; preds = %131
%135 = load i8**, i8*** %12
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %135
br label %136
136: ; preds = %134, %131
br label %137
137: ; preds = %136, %120
%138 = load i32*, i32** %9
%139 = getelementptr inbounds i32, i32* %138, i64 9
store i32 -1, i32* %139
%140 = load i32*, i32** %9
%141 = getelementptr inbounds i32, i32* %140, i64 32
store i32 -1, i32* %141
%142 = load i32*, i32** %9
%143 = getelementptr inbounds i32, i32* %142, i64 10
store i32 -3, i32* %143
store i32 0, i32* %15
store i32 -1024, i32* %16
br label %144
144: ; preds = %220, %137
%145 = load i32*, i32** %8
%146 = call i32 @feof(i32* %145)
%147 = icmp ne i32 %146, 0
%148 = xor i1 %147, true
br i1 %148, label %149, label %221
149: ; preds = %144
%150 = load i32*, i32** %8
%151 = call signext i8 @getc(i32* %150)
store i8 %151, i8* %14
%152 = load i8, i8* %14
%153 = sext i8 %152 to i32
%154 = icmp eq i32 %153, 62
br i1 %154, label %155, label %159
155: ; preds = %149
%156 = load i8, i8* %14
%157 = load i32*, i32** %8
%158 = call i32 @ungetc(i8 signext %156, i32* %157)
br label %221
159: ; preds = %149
%160 = load i8, i8* %14
%161 = sext i8 %160 to i32
%162 = load i8, i8* @EOF
%163 = sext i8 %162 to i32
%164 = icmp eq i32 %161, %163
br i1 %164, label %172, label %165
165: ; preds = %159
%166 = load i8, i8* %14
%167 = sext i8 %166 to i32
%168 = load i8, i8* @EOF
%169 = sext i8 %168 to i32
%170 = add nsw i32 %169, 256
%171 = icmp eq i32 %167, %170
br i1 %171, label %172, label %173
172: ; preds = %165, %159
br label %221
173: ; preds = %165
%174 = load i32*, i32** %9
%175 = load i8, i8* %14
%176 = sext i8 %175 to i64
%177 = getelementptr inbounds i32, i32* %174, i64 %176
%178 = load i32, i32* %177
switch i32 %178, label %203 [
i32 -2, label %179
i32 -3, label %199
i32 -1, label %202
]
179: ; preds = %173
%180 = load i8**, i8*** %11
%181 = icmp ne i8** %180, null
br i1 %181, label %182, label %191
182: ; preds = %179
%183 = load i32, i32* @stderr
%184 = load i8, i8* %14
%185 = load i8, i8* %14
%186 = load i32, i32* @readSequence.line
%187 = load i32, i32* %15
%188 = load i8**, i8*** %11
%189 = load i8*, i8** %188
%190 = call i32 (i32, i8*, i8, i8, i32, i32, ...) @fprintf(i32 %183, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8 signext %184, i8 signext %185, i32 %186, i32 %187, i8* %189)
br label %198
191: ; preds = %179
%192 = load i32, i32* @stderr
%193 = load i8, i8* %14
%194 = load i8, i8* %14
%195 = load i32, i32* @readSequence.line
%196 = load i32, i32* %15
%197 = call i32 (i32, i8*, i8, i8, i32, i32, ...) @fprintf(i32 %192, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8 signext %193, i8 signext %194, i32 %195, i32 %196)
br label %198
198: ; preds = %191, %182
store i32 0, i32* %7
br label %236
199: ; preds = %173
%200 = load i32, i32* @readSequence.line
%201 = add nsw i32 %200, 1
store i32 %201, i32* @readSequence.line
br label %202
202: ; preds = %173, %199
br label %220
203: ; preds = %173
%204 = load i8**, i8*** %10
%205 = icmp ne i8** %204, null
br i1 %205, label %206, label %216
206: ; preds = %203
%207 = load i32*, i32** %9
%208 = load i8, i8* %14
%209 = sext i8 %208 to i64
%210 = getelementptr inbounds i32, i32* %207, i64 %209
%211 = load i32, i32* %210
%212 = load i8**, i8*** %10
%213 = load i32, i32* %15
%214 = add nsw i32 %213, 1
store i32 %214, i32* %15
%215 = call i32 @add(i32 %211, i8** %212, i32* %16, i32 %213)
br label %219
216: ; preds = %203
%217 = load i32, i32* %15
%218 = add nsw i32 %217, 1
store i32 %218, i32* %15
br label %219
219: ; preds = %216, %206
br label %220
220: ; preds = %219, %202
br label %144
221: ; preds = %172, %155, %144
%222 = load i8**, i8*** %10
%223 = icmp ne i8** %222, null
br i1 %223, label %224, label %228
224: ; preds = %221
%225 = load i8**, i8*** %10
%226 = load i32, i32* %15
%227 = call i32 @add(i32 0, i8** %225, i32* %16, i32 %226)
br label %228
228: ; preds = %224, %221
%229 = load i32*, i32** %13
%230 = icmp ne i32* %229, null
br i1 %230, label %231, label %234
231: ; preds = %228
%232 = load i32, i32* %15
%233 = load i32*, i32** %13
store i32 %232, i32* %233
br label %234
234: ; preds = %231, %228
%235 = load i32, i32* %15
store i32 %235, i32* %7
br label %236
236: ; preds = %234, %198
%237 = load i32, i32* %7
ret i32 %237
}

LLVM IR (-O2):
@readSequence.oldFil = internal unnamed_addr global i32* null
@readSequence.line = internal unnamed_addr global i32 0
@.str = [1 x i8] zeroinitializer
@EOF = global i8 0
@stderr = global i32 0
@.str.1 = [55 x i8] c"Bad char 0x%x = '%c' at line %d, base %d, sequence %s\0A\00"
@.str.2 = [42 x i8] c"Bad char 0x%x = '%c' at line %d, base %d\0A\00"
define i32 @readSequence(i32* %0, i32* nocapture %1, i8** %2, i8** %3, i8** %4, i32* writeonly %5) {
%7 = alloca i32
%8 = bitcast i32* %7 to i8*
%9 = load i32*, i32** @readSequence.oldFil
%10 = icmp eq i32* %9, %0
br i1 %10, label %12, label %11
11: ; preds = %6
store i32 1, i32* @readSequence.line
store i32* %0, i32** @readSequence.oldFil
br label %12
12: ; preds = %11, %6
%13 = tail call signext i8 @getc(i32* %0)
%14 = icmp eq i8 %13, 62
br i1 %14, label %15, label %79
15: ; preds = %12
%16 = tail call signext i8 @getc(i32* %0)
store i32 -32, i32* %7
%17 = call i32 @feof(i32* %0)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %34
19: ; preds = %15
%20 = icmp eq i8** %3, null
br label %21
21: ; preds = %19, %29
%22 = phi i32 [ 0, %19 ], [ %30, %29 ]
%23 = phi i8 [ %16, %19 ], [ %31, %29 ]
%24 = sext i8 %23 to i32
switch i8 %23, label %25 [
i8 32, label %34
i8 10, label %34
i8 9, label %34
]
25: ; preds = %21
br i1 %20, label %29, label %26
26: ; preds = %25
%27 = add nsw i32 %22, 1
%28 = call i32 @add(i32 %24, i8** %3, i32* %7, i32 %22)
br label %29
29: ; preds = %26, %25
%30 = phi i32 [ %27, %26 ], [ %22, %25 ]
%31 = call signext i8 @getc(i32* %0)
%32 = call i32 @feof(i32* %0)
%33 = icmp eq i32 %32, 0
br i1 %33, label %21, label %34
34: ; preds = %29, %21, %21, %21, %15
%35 = phi i8 [ %16, %15 ], [ %23, %21 ], [ %23, %21 ], [ %23, %21 ], [ %31, %29 ]
%36 = phi i32 [ 0, %15 ], [ %22, %21 ], [ %22, %21 ], [ %22, %21 ], [ %30, %29 ]
%37 = icmp eq i8** %3, null
br i1 %37, label %40, label %38
38: ; preds = %34
%39 = call i32 @add(i32 0, i8** %3, i32* %7, i32 %36)
br label %40
40: ; preds = %38, %34
%41 = call i32 @feof(i32* %0)
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %49
43: ; preds = %40, %45
%44 = phi i8 [ %46, %45 ], [ %35, %40 ]
switch i8 %44, label %49 [
i8 32, label %45
i8 9, label %45
]
45: ; preds = %43, %43
%46 = call signext i8 @getc(i32* %0)
%47 = call i32 @feof(i32* %0)
%48 = icmp eq i32 %47, 0
br i1 %48, label %43, label %49
49: ; preds = %45, %43, %40
%50 = phi i8 [ %35, %40 ], [ %44, %43 ], [ %46, %45 ]
store i32 -32, i32* %7
%51 = call i32 @feof(i32* %0)
%52 = icmp eq i32 %51, 0
%53 = icmp ne i8 %50, 10
%54 = and i1 %53, %52
br i1 %54, label %55, label %71
55: ; preds = %49
%56 = icmp eq i8** %4, null
br label %57
57: ; preds = %55, %64
%58 = phi i8 [ %50, %55 ], [ %66, %64 ]
%59 = phi i32 [ 0, %55 ], [ %65, %64 ]
br i1 %56, label %64, label %60
60: ; preds = %57
%61 = sext i8 %58 to i32
%62 = add nsw i32 %59, 1
%63 = call i32 @add(i32 %61, i8** %4, i32* %7, i32 %59)
br label %64
64: ; preds = %60, %57
%65 = phi i32 [ %62, %60 ], [ %59, %57 ]
%66 = call signext i8 @getc(i32* %0)
%67 = call i32 @feof(i32* %0)
%68 = icmp eq i32 %67, 0
%69 = icmp ne i8 %66, 10
%70 = and i1 %69, %68
br i1 %70, label %57, label %71
71: ; preds = %64, %49
%72 = phi i32 [ 0, %49 ], [ %65, %64 ]
%73 = icmp eq i8** %4, null
br i1 %73, label %76, label %74
74: ; preds = %71
%75 = call i32 @add(i32 0, i8** %4, i32* %7, i32 %72)
br label %76
76: ; preds = %74, %71
%77 = load i32, i32* @readSequence.line
%78 = add nsw i32 %77, 1
store i32 %78, i32* @readSequence.line
br label %86
79: ; preds = %12
%80 = tail call i32 @ungetc(i8 signext %13, i32* %0)
%81 = icmp eq i8** %3, null
br i1 %81, label %83, label %82
82: ; preds = %79
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
br label %83
83: ; preds = %82, %79
%84 = icmp eq i8** %4, null
br i1 %84, label %86, label %85
85: ; preds = %83
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %4
br label %86
86: ; preds = %83, %85, %76
%87 = getelementptr inbounds i32, i32* %1, i64 9
store i32 -1, i32* %87
%88 = getelementptr inbounds i32, i32* %1, i64 32
store i32 -1, i32* %88
%89 = getelementptr inbounds i32, i32* %1, i64 10
store i32 -3, i32* %89
store i32 -1024, i32* %7
%90 = call i32 @feof(i32* %0)
%91 = icmp eq i32 %90, 0
br i1 %91, label %92, label %127
92: ; preds = %86
%93 = icmp eq i8** %2, null
br label %94
94: ; preds = %92, %123
%95 = phi i32 [ 0, %92 ], [ %124, %123 ]
%96 = call signext i8 @getc(i32* %0)
%97 = icmp eq i8 %96, 62
br i1 %97, label %98, label %100
98: ; preds = %94
%99 = call i32 @ungetc(i8 signext 62, i32* %0)
br label %127
100: ; preds = %94
%101 = load i8, i8* @EOF
%102 = icmp eq i8 %96, %101
br i1 %102, label %127, label %103
103: ; preds = %100
%104 = sext i8 %96 to i64
%105 = getelementptr inbounds i32, i32* %1, i64 %104
%106 = load i32, i32* %105
switch i32 %106, label %119 [
i32 -2, label %107
i32 -3, label %116
i32 -1, label %123
]
107: ; preds = %103
%108 = icmp eq i8** %3, null
%109 = load i32, i32* @stderr
%110 = load i32, i32* @readSequence.line
br i1 %108, label %114, label %111
111: ; preds = %107
%112 = load i8*, i8** %3
%113 = call i32 (i32, i8*, i8, i8, i32, i32, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8 signext %96, i8 signext %96, i32 %110, i32 %95, i8* %112)
br label %135
114: ; preds = %107
%115 = call i32 (i32, i8*, i8, i8, i32, i32, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8 signext %96, i8 signext %96, i32 %110, i32 %95)
br label %135
116: ; preds = %103
%117 = load i32, i32* @readSequence.line
%118 = add nsw i32 %117, 1
store i32 %118, i32* @readSequence.line
br label %123
119: ; preds = %103
%120 = add nsw i32 %95, 1
br i1 %93, label %123, label %121
121: ; preds = %119
%122 = call i32 @add(i32 %106, i8** %2, i32* %7, i32 %95)
br label %123
123: ; preds = %119, %121, %116, %103
%124 = phi i32 [ %120, %121 ], [ %95, %103 ], [ %95, %116 ], [ %120, %119 ]
%125 = call i32 @feof(i32* %0)
%126 = icmp eq i32 %125, 0
br i1 %126, label %94, label %127
127: ; preds = %123, %100, %86, %98
%128 = phi i32 [ %95, %98 ], [ 0, %86 ], [ %124, %123 ], [ %95, %100 ]
%129 = icmp eq i8** %2, null
br i1 %129, label %132, label %130
130: ; preds = %127
%131 = call i32 @add(i32 0, i8** %2, i32* %7, i32 %128)
br label %132
132: ; preds = %130, %127
%133 = icmp eq i32* %5, null
br i1 %133, label %135, label %134
134: ; preds = %132
store i32 %128, i32* %5
br label %135
135: ; preds = %132, %134, %111, %114
%136 = phi i32 [ 0, %114 ], [ 0, %111 ], [ %128, %134 ], [ %128, %132 ]
ret i32 %136
}