#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 intmax_t;

/* Variables and functions */
int do_operation(int, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ get_var(char *, int *);
int readtok(char *, int, char *, int *);
int /*<<< orphan*/ set_var(char *, int);
int /*<<< orphan*/ stderr;
int strlen(char *);
int /*<<< orphan*/ strncat(char *, char *, int);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int strtol(char *, char **, int);
intmax_t expression(char *line, int len) {
  int lpos = 0;
  int neg = 0, lset = 0, lvar = 0;
  int tok_type;
  intmax_t result = 0;
  char tok[512], subexpr[512];
  char lvname[16];
  char *partial;
  intmax_t lvalue = 0, rvalue = 0;
  int op = 0;
  char *num_check;
  if (len == 0)
    return 0;
  while (lpos < 512 && line[lpos] != 0) {
    if (lpos == len)
      return result;
    lpos = readtok(line, lpos, tok, &tok_type);
    if (tok[0] == '\0' && lvar == -1) {
      fprintf(stderr, "error: no such variable: %s\n", lvname);
      break;
    }
    switch (tok_type) {
    case 0x07:
      if (lpos < 0)
        goto bad_comparison_token;
      if (!lset) {
        fprintf(stderr, "error: left side of comparison empty\n");
        return 0;
      }
      partial = line + lpos;
      result = expression(partial, len - lpos);
      if (!strncmp(tok, "==", 3)) {
        if (lvalue == result)
          result = 1;
        else
          result = 0;
      } else if (!strncmp(tok, "!=", 3) || !strncmp(tok, "<>", 3) ||
                 !strncmp(tok, "><", 3)) {
        if (lvalue != result)
          result = 1;
        else
          result = 0;
      } else if (!strncmp(tok, ">=", 3) || !strncmp(tok, "=>", 3)) {
        if (lvalue >= result)
          result = 1;
        else
          result = 0;
      } else if (!strncmp(tok, "<=", 3) || !strncmp(tok, "=<", 3)) {
        if (lvalue <= result)
          result = 1;
        else
          result = 0;
      } else if (!strncmp(tok, ">", 2)) {
        if (lvalue > result)
          result = 1;
        else
          result = 0;
      } else if (!strncmp(tok, "<", 2)) {
        if (lvalue < result)
          result = 1;
        else
          result = 0;
      } else {
      bad_comparison_token:
        fprintf(stderr, "error: bad comparison operator '%s'\n", tok);
        return 0;
      }
      return result;
    case 0x06:
      if (lvar == 0) {
        fprintf(stderr, "error: lvalue not a variable\n");
        return 0;
      }
      partial = line + lpos;
      result = expression(partial, len - lpos);
      set_var(lvname, result);
      return result;
    case 0x03:
      if (lvar == -1) {
        fprintf(stderr, "error: no such variable: %s\n", lvname);
        return 0;
      }
      if (!lset || op) {
        if (tok[0] == '+') {
          if (neg != 0)
            fprintf(stderr, "warning: too many sign specifiers\n");
          neg = -1;
          continue;
        }
        if (tok[0] == '-') {
          if (neg != 0)
            fprintf(stderr, "warning: too many sign specifiers\n");
          neg = 1;
          continue;
        }
        if (!lset)
          fprintf(stderr, "error: no lvalue specified\n");
        else if (op)
          fprintf(stderr, "error: two operations specified\n");
        else
          fprintf(stderr, "error: lset+op: this should not happen...\n");
        return 0;
      }
      op = tok[0];
      break;
    case 0x04:
      subexpr[0] = '\0';
      while (1) {
        lpos = readtok(line, lpos, tok, &tok_type);
        if (tok_type == 0x7f) {
          fprintf(stderr, "Error: end-of-line; expected ')'\n");
          return 0;
        }
        if (tok_type == 0x7e) {
          fprintf(stderr, "Error: unknown character; expected ')'\n");
          return 0;
        }
        if (strncmp(tok, ")", 2)) {
          strncat(subexpr, tok, 512 - 1);
        } else
          break;
      }
      result = expression(subexpr, strlen(subexpr));
      goto token_final_eval;
    case 0x01:
      if (strlen(tok) > 19)
        fprintf(stderr, "warning: overflow\n");
      result = strtol(tok, &num_check, 10);
      if (tok == num_check)
        fprintf(stderr, "error: cannot interpret as number: '%s'\n", tok);
      goto token_final_eval;
    case 0x02:
      if (!lvar && !op && !lset) {
        strncpy(lvname, tok, 16);
        if (get_var(tok, &result))
          lvar = 1;
        else
          lvar = -1;
      }
      if (op && !get_var(tok, &result)) {
        fprintf(stderr, "error: no such variable: %s\n", tok);
        return 0;
      }
      goto token_final_eval;
    token_final_eval:
      if (neg > 0)
        result = -result;
      if (!lset) {
        lvalue = result;
        neg = 0;
        lset = 1;
        continue;
      } else if (op) {
        rvalue = result;
        neg = 0;
        result = do_operation(lvalue, rvalue, op);
        op = 0;
        lvalue = result;
        continue;
      } else {
        fprintf(stderr, "error: operation required\n");
        return 0;
      }
      break;
    case 0x05:
      fprintf(stderr, "error: ')' without matching '('\n");
      return 0;
    case 0x7e:
      fprintf(stderr, "error: unknown character\n");
      return 0;
    case 0x00:
      continue;
    case 0x7f:
      if (neg != 0)
        fprintf(stderr, "error: no values given\n");
      if (lvar == -1)
        fprintf(stderr, "error: no such variable: %s\n", lvname);
      return result;
    default:
      return result;
    }
    if (lpos < 0)
      return result;
  }
  return result;
}


x86 assembly (clang, -O0):
<expression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x44c(%rbp)
movl   $0x0,-0x450(%rbp)
movl   $0x0,-0x454(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1219 <expression+0x69>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
jmp    121e <expression+0x6e>
xor    %eax,%eax
cmpl   $0x200,-0x18(%rbp)
mov    %al,-0x461(%rbp)
jge    124b <expression+0x9b>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x461(%rbp)
mov    -0x461(%rbp),%al
test   $0x1,%al
jne    125e <expression+0xae>
jmp    1bda <expression+0xa2a>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1275 <expression+0xc5>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    -0x230(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1090 <readtok@plt>
mov    %eax,-0x18(%rbp)
movsbl -0x230(%rbp),%eax
cmp    $0x0,%eax
jne    12cc <expression+0x11c>
cmpl   $0xffffffff,-0x24(%rbp)
jne    12cc <expression+0x11c>
mov    0x2d30(%rip),%rax
mov    (%rax),%edi
lea    -0x440(%rbp),%rdx
lea    0xd40(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1bda <expression+0xa2a>
mov    -0x28(%rbp),%eax
mov    %eax,-0x468(%rbp)
test   %eax,%eax
je     1b5c <expression+0x9ac>
jmp    12e2 <expression+0x132>
mov    -0x468(%rbp),%eax
sub    $0x1,%eax
je     192f <expression+0x77f>
jmp    12f6 <expression+0x146>
mov    -0x468(%rbp),%eax
sub    $0x2,%eax
je     19ad <expression+0x7fd>
jmp    130a <expression+0x15a>
mov    -0x468(%rbp),%eax
sub    $0x3,%eax
je     16ee <expression+0x53e>
jmp    131e <expression+0x16e>
mov    -0x468(%rbp),%eax
sub    $0x4,%eax
je     183c <expression+0x68c>
jmp    1332 <expression+0x182>
mov    -0x468(%rbp),%eax
sub    $0x5,%eax
je     1b16 <expression+0x966>
jmp    1346 <expression+0x196>
mov    -0x468(%rbp),%eax
sub    $0x6,%eax
je     1680 <expression+0x4d0>
jmp    135a <expression+0x1aa>
mov    -0x468(%rbp),%eax
sub    $0x7,%eax
je     1396 <expression+0x1e6>
jmp    136e <expression+0x1be>
mov    -0x468(%rbp),%eax
sub    $0x7e,%eax
je     1b39 <expression+0x989>
jmp    1382 <expression+0x1d2>
mov    -0x468(%rbp),%eax
sub    $0x7f,%eax
je     1b61 <expression+0x9b1>
jmp    1bb5 <expression+0xa05>
cmpl   $0x0,-0x18(%rbp)
jge    13a5 <expression+0x1f5>
jmp    1632 <expression+0x482>
cmpl   $0x0,-0x20(%rbp)
jne    13d2 <expression+0x222>
mov    0x2c2a(%rip),%rax
mov    (%rax),%edi
lea    0xc5e(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x448(%rbp)
mov    -0x448(%rbp),%rdi
mov    -0x14(%rbp),%esi
sub    -0x18(%rbp),%esi
call   10c0 <expression@plt>
mov    %eax,-0x2c(%rbp)
lea    -0x230(%rbp),%rdi
lea    0xc3c(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1441 <expression+0x291>
mov    -0x44c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    1435 <expression+0x285>
movl   $0x1,-0x2c(%rbp)
jmp    143c <expression+0x28c>
movl   $0x0,-0x2c(%rbp)
jmp    1675 <expression+0x4c5>
lea    -0x230(%rbp),%rdi
lea    0xbf7(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
je     14a4 <expression+0x2f4>
lea    -0x230(%rbp),%rdi
lea    0xbd9(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
je     14a4 <expression+0x2f4>
lea    -0x230(%rbp),%rdi
lea    0xbbb(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    14cb <expression+0x31b>
mov    -0x44c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     14bf <expression+0x30f>
movl   $0x1,-0x2c(%rbp)
jmp    14c6 <expression+0x316>
movl   $0x0,-0x2c(%rbp)
jmp    1670 <expression+0x4c0>
lea    -0x230(%rbp),%rdi
lea    0xb76(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
je     150d <expression+0x35d>
lea    -0x230(%rbp),%rdi
lea    0xb58(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1534 <expression+0x384>
mov    -0x44c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jl     1528 <expression+0x378>
movl   $0x1,-0x2c(%rbp)
jmp    152f <expression+0x37f>
movl   $0x0,-0x2c(%rbp)
jmp    166b <expression+0x4bb>
lea    -0x230(%rbp),%rdi
lea    0xb13(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
je     1576 <expression+0x3c6>
lea    -0x230(%rbp),%rdi
lea    0xaf5(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    159d <expression+0x3ed>
mov    -0x44c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1591 <expression+0x3e1>
movl   $0x1,-0x2c(%rbp)
jmp    1598 <expression+0x3e8>
movl   $0x0,-0x2c(%rbp)
jmp    1666 <expression+0x4b6>
lea    -0x230(%rbp),%rdi
lea    0xa9f(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    15e5 <expression+0x435>
mov    -0x44c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jle    15d9 <expression+0x429>
movl   $0x1,-0x2c(%rbp)
jmp    15e0 <expression+0x430>
movl   $0x0,-0x2c(%rbp)
jmp    1661 <expression+0x4b1>
lea    -0x230(%rbp),%rdi
lea    0xa66(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    162d <expression+0x47d>
mov    -0x44c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1621 <expression+0x471>
movl   $0x1,-0x2c(%rbp)
jmp    1628 <expression+0x478>
movl   $0x0,-0x2c(%rbp)
jmp    165c <expression+0x4ac>
jmp    1632 <expression+0x482>
mov    0x29a7(%rip),%rax
mov    (%rax),%edi
lea    -0x230(%rbp),%rdx
lea    0xa12(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
jmp    1661 <expression+0x4b1>
jmp    1666 <expression+0x4b6>
jmp    166b <expression+0x4bb>
jmp    1670 <expression+0x4c0>
jmp    1675 <expression+0x4c5>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
cmpl   $0x0,-0x24(%rbp)
jne    16ad <expression+0x4fd>
mov    0x294f(%rip),%rax
mov    (%rax),%edi
lea    0x9e6(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x448(%rbp)
mov    -0x448(%rbp),%rdi
mov    -0x14(%rbp),%esi
sub    -0x18(%rbp),%esi
call   10c0 <expression@plt>
mov    %eax,-0x2c(%rbp)
lea    -0x440(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1070 <set_var@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
cmpl   $0xffffffff,-0x24(%rbp)
jne    1722 <expression+0x572>
mov    0x28e1(%rip),%rax
mov    (%rax),%edi
lea    -0x440(%rbp),%rdx
lea    0x8f1(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
cmpl   $0x0,-0x20(%rbp)
je     1739 <expression+0x589>
cmpl   $0x0,-0x454(%rbp)
je     182a <expression+0x67a>
movsbl -0x230(%rbp),%eax
cmp    $0x2b,%eax
jne    1776 <expression+0x5c6>
cmpl   $0x0,-0x1c(%rbp)
je     176a <expression+0x5ba>
mov    0x2886(%rip),%rax
mov    (%rax),%edi
lea    0x93b(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0xffffffff,-0x1c(%rbp)
jmp    121e <expression+0x6e>
movsbl -0x230(%rbp),%eax
cmp    $0x2d,%eax
jne    17b3 <expression+0x603>
cmpl   $0x0,-0x1c(%rbp)
je     17a7 <expression+0x5f7>
mov    0x2849(%rip),%rax
mov    (%rax),%edi
lea    0x8fe(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x1c(%rbp)
jmp    121e <expression+0x6e>
cmpl   $0x0,-0x20(%rbp)
jne    17d9 <expression+0x629>
mov    0x281c(%rip),%rax
mov    (%rax),%edi
lea    0x8f4(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    181e <expression+0x66e>
cmpl   $0x0,-0x454(%rbp)
je     1802 <expression+0x652>
mov    0x27f3(%rip),%rax
mov    (%rax),%edi
lea    0x8e7(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1819 <expression+0x669>
mov    0x27d7(%rip),%rax
mov    (%rax),%edi
lea    0x8ec(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    181e <expression+0x66e>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
movsbl -0x230(%rbp),%eax
mov    %eax,-0x454(%rbp)
jmp    1bc0 <expression+0xa10>
movb   $0x0,-0x430(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    -0x230(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1090 <readtok@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x7f,-0x28(%rbp)
jne    188a <expression+0x6da>
mov    0x2772(%rip),%rax
mov    (%rax),%edi
lea    0x8b2(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
cmpl   $0x7e,-0x28(%rbp)
jne    18b7 <expression+0x707>
mov    0x2745(%rip),%rax
mov    (%rax),%edi
lea    0x8a7(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
lea    -0x230(%rbp),%rdi
lea    0x8ae(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
je     18f5 <expression+0x745>
lea    -0x430(%rbp),%rdi
lea    -0x230(%rbp),%rsi
mov    $0x1ff,%edx
call   1080 <strncat@plt>
jmp    18fa <expression+0x74a>
jmp    18ff <expression+0x74f>
jmp    1843 <expression+0x693>
lea    -0x430(%rbp),%rax
mov    %rax,-0x470(%rbp)
lea    -0x430(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x470(%rbp),%rdi
mov    %eax,%esi
call   10c0 <expression@plt>
mov    %eax,-0x2c(%rbp)
jmp    1a6c <expression+0x8bc>
lea    -0x230(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x13,%eax
jle    195b <expression+0x7ab>
mov    0x2695(%rip),%rax
mov    (%rax),%edi
lea    0x821(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
lea    -0x230(%rbp),%rdi
lea    -0x460(%rbp),%rsi
mov    $0xa,%edx
call   10b0 <strtol@plt>
mov    %eax,-0x2c(%rbp)
lea    -0x230(%rbp),%rax
cmp    -0x460(%rbp),%rax
jne    19a8 <expression+0x7f8>
mov    0x264f(%rip),%rax
mov    (%rax),%edi
lea    -0x230(%rbp),%rdx
lea    0x7e7(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1a6c <expression+0x8bc>
cmpl   $0x0,-0x24(%rbp)
jne    1a17 <expression+0x867>
cmpl   $0x0,-0x454(%rbp)
jne    1a17 <expression+0x867>
cmpl   $0x0,-0x20(%rbp)
jne    1a17 <expression+0x867>
lea    -0x440(%rbp),%rdi
lea    -0x230(%rbp),%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
lea    -0x230(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   1060 <get_var@plt>
cmp    $0x0,%eax
je     1a0b <expression+0x85b>
movl   $0x1,-0x24(%rbp)
jmp    1a12 <expression+0x862>
movl   $0xffffffff,-0x24(%rbp)
jmp    1a17 <expression+0x867>
cmpl   $0x0,-0x454(%rbp)
je     1a67 <expression+0x8b7>
lea    -0x230(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   1060 <get_var@plt>
cmp    $0x0,%eax
jne    1a67 <expression+0x8b7>
mov    0x259c(%rip),%rax
mov    (%rax),%edi
lea    -0x230(%rbp),%rdx
lea    0x5ac(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
jmp    1a6c <expression+0x8bc>
cmpl   $0x0,-0x1c(%rbp)
jle    1a7e <expression+0x8ce>
xor    %eax,%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1aa4 <expression+0x8f4>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x44c(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
jmp    121e <expression+0x6e>
cmpl   $0x0,-0x454(%rbp)
je     1af3 <expression+0x943>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x450(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x44c(%rbp),%edi
mov    -0x450(%rbp),%esi
mov    -0x454(%rbp),%edx
call   10d0 <do_operation@plt>
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x454(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x44c(%rbp)
jmp    121e <expression+0x6e>
mov    0x24e6(%rip),%rax
mov    (%rax),%edi
lea    0x6ae(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
mov    0x24c3(%rip),%rax
mov    (%rax),%edi
lea    0x6a6(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
mov    0x24a0(%rip),%rax
mov    (%rax),%edi
lea    0x6a4(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
jmp    121e <expression+0x6e>
cmpl   $0x0,-0x1c(%rbp)
je     1b82 <expression+0x9d2>
mov    0x246e(%rip),%rax
mov    (%rax),%edi
lea    0x68c(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
cmpl   $0xffffffff,-0x24(%rbp)
jne    1baa <expression+0x9fa>
mov    0x244d(%rip),%rax
mov    (%rax),%edi
lea    -0x440(%rbp),%rdx
lea    0x45d(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
cmpl   $0x0,-0x18(%rbp)
jge    1bd5 <expression+0xa25>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1be0 <expression+0xa30>
jmp    121e <expression+0x6e>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x470,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expression>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x448,%rsp
movl   $0x0,0x8(%rsp)
test   %esi,%esi
je     14cb <expression+0x31b>
mov    %esi,%r13d
mov    %rdi,%rbx
lea    0x40(%rsp),%r15
lea    0x1c(%rsp),%r12
xor    %ebp,%ebp
movl   $0x0,0x14(%rsp)
xor    %r14d,%r14d
movl   $0x0,0x10(%rsp)
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,0x18(%rsp)
mov    %edx,0xc(%rsp)
jmp    1218 <expression+0x68>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x1c(%rsp),%ecx
test   %ecx,%ecx
jne    1260 <expression+0xb0>
cmp    $0x1ff,%ebp
jg     1568 <expression+0x3b8>
movslq %ebp,%rax
cmpb   $0x0,(%rbx,%rax,1)
je     1568 <expression+0x3b8>
cmp    %r13d,%ebp
je     1568 <expression+0x3b8>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r12,%rcx
call   1090 <readtok@plt>
mov    %eax,%ebp
movsbl 0x40(%rsp),%eax
test   %eax,%eax
jne    1210 <expression+0x60>
cmp    $0xffffffff,%r14d
jne    1210 <expression+0x60>
jmp    1508 <expression+0x358>
lea    -0x1(%rcx),%edx
cmp    $0x6,%edx
ja     14d2 <expression+0x322>
lea    0xd8d(%rip),%rsi
movslq (%rsi,%rdx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
cmp    $0xffffffff,%r14d
je     179e <expression+0x5ee>
cmpl   $0x0,0x14(%rsp)
mov    0xc(%rsp),%edx
je     12ac <expression+0xfc>
test   %edx,%edx
jne    12ac <expression+0xfc>
movl   $0x1,0x14(%rsp)
mov    %eax,%edx
test   %ebp,%ebp
jns    11fe <expression+0x4e>
jmp    1568 <expression+0x3b8>
cmp    $0x2d,%al
je     12ce <expression+0x11e>
cmp    $0x2b,%al
jne    180f <expression+0x65f>
mov    $0xffffffff,%ecx
cmpl   $0x0,0x18(%rsp)
mov    $0xffffffff,%eax
jne    12e3 <expression+0x133>
jmp    11fa <expression+0x4a>
mov    $0x1,%ecx
cmpl   $0x0,0x18(%rsp)
mov    $0x1,%eax
je     11fa <expression+0x4a>
mov    %ecx,0x18(%rsp)
mov    0x2cf2(%rip),%rax
mov    (%rax),%edi
lea    0xdc3(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0xc(%rsp),%edx
mov    0x18(%rsp),%eax
jmp    11fa <expression+0x4a>
mov    %r15,%rdi
call   1050 <strlen@plt>
cmp    $0x14,%eax
jl     132f <expression+0x17f>
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
lea    0xe69(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %r15,%rdi
lea    0x38(%rsp),%rsi
mov    $0xa,%edx
call   10b0 <strtol@plt>
mov    %eax,0x8(%rsp)
cmp    0x38(%rsp),%r15
jne    145f <expression+0x2af>
mov    0x2c89(%rip),%rax
mov    (%rax),%edi
lea    0xe44(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    145f <expression+0x2af>
test   %r14d,%r14d
jne    148a <expression+0x2da>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jne    13b4 <expression+0x204>
cmpl   $0x0,0x14(%rsp)
jne    13b4 <expression+0x204>
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
mov    %r15,%rdi
lea    0x8(%rsp),%rsi
call   1060 <get_var@plt>
mov    0xc(%rsp),%ecx
cmp    $0x1,%eax
sbb    %r14d,%r14d
or     $0x1,%r14d
test   %ecx,%ecx
je     1496 <expression+0x2e6>
mov    %r15,%rdi
lea    0x8(%rsp),%rsi
call   1060 <get_var@plt>
mov    0xc(%rsp),%edx
test   %eax,%eax
jne    1463 <expression+0x2b3>
jmp    17ba <expression+0x60a>
movb   $0x0,0x240(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r12,%rcx
call   1090 <readtok@plt>
mov    %eax,%ebp
mov    0x1c(%rsp),%eax
cmp    $0x7e,%eax
je     170e <expression+0x55e>
cmp    $0x7f,%eax
je     1720 <expression+0x570>
mov    %r15,%rdi
lea    0xd6d(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
lea    0x240(%rsp),%rdi
test   %eax,%eax
je     1447 <expression+0x297>
mov    %r15,%rsi
mov    $0x1ff,%edx
call   1080 <strncat@plt>
jmp    13f0 <expression+0x240>
call   1050 <strlen@plt>
lea    0x240(%rsp),%rdi
mov    %eax,%esi
call   10c0 <expression@plt>
mov    %eax,0x8(%rsp)
mov    0xc(%rsp),%edx
cmpl   $0x0,0x18(%rsp)
jle    146e <expression+0x2be>
negl   0x8(%rsp)
cmpl   $0x0,0x14(%rsp)
jne    14a1 <expression+0x2f1>
movl   $0x1,0x14(%rsp)
mov    0x8(%rsp),%eax
mov    %eax,0x10(%rsp)
jmp    11f8 <expression+0x48>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jne    13bc <expression+0x20c>
xor    %edx,%edx
cmpl   $0x0,0x18(%rsp)
jg     146a <expression+0x2ba>
jmp    146e <expression+0x2be>
test   %edx,%edx
je     1762 <expression+0x5b2>
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%edi
call   10d0 <do_operation@plt>
mov    %eax,0x10(%rsp)
mov    %eax,0x8(%rsp)
movl   $0x1,0x14(%rsp)
jmp    11f6 <expression+0x46>
xor    %ebx,%ebx
jmp    177b <expression+0x5cb>
cmp    $0x7e,%ecx
je     16ea <expression+0x53a>
cmp    $0x7f,%ecx
jne    1568 <expression+0x3b8>
cmpl   $0x0,0x18(%rsp)
je     1502 <expression+0x352>
mov    0x2aee(%rip),%rax
mov    (%rax),%edi
lea    0xd28(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
cmp    $0xffffffff,%r14d
jne    1568 <expression+0x3b8>
mov    0x2ad1(%rip),%rax
mov    (%rax),%edi
lea    0xb04(%rip),%rsi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    1568 <expression+0x3b8>
mov    0x2ab3(%rip),%rax
mov    (%rax),%edi
lea    0xcb2(%rip),%rsi
jmp    1772 <expression+0x5c2>
test   %r14d,%r14d
je     16fc <expression+0x54c>
movslq %ebp,%rax
add    %rax,%rbx
sub    %ebp,%r13d
mov    %rbx,%rdi
mov    %r13d,%esi
call   10c0 <expression@plt>
mov    %eax,0x8(%rsp)
lea    0x20(%rsp),%rdi
mov    %eax,%esi
call   1070 <set_var@plt>
mov    0x8(%rsp),%ebx
jmp    177b <expression+0x5cb>
test   %ebp,%ebp
js     16c7 <expression+0x517>
cmpl   $0x0,0x14(%rsp)
je     1732 <expression+0x582>
mov    %ebp,%eax
add    %rax,%rbx
sub    %ebp,%r13d
mov    %rbx,%rdi
mov    %r13d,%esi
call   10c0 <expression@plt>
mov    %eax,0x8(%rsp)
lea    0xabd(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1753 <expression+0x5a3>
lea    0xaa2(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1744 <expression+0x594>
lea    0xa87(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1744 <expression+0x594>
lea    0xa6c(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1744 <expression+0x594>
lea    0xa51(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     178f <expression+0x5df>
lea    0xa36(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     178f <expression+0x5df>
lea    0xa1b(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     17cf <expression+0x61f>
lea    0xa00(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     17cf <expression+0x61f>
lea    0x9d4(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     17ea <expression+0x63a>
lea    0x9c5(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     17f6 <expression+0x646>
mov    0x2912(%rip),%rax
mov    (%rax),%edi
lea    0x9a0(%rip),%rsi
xor    %ebx,%ebx
lea    0x40(%rsp),%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    177b <expression+0x5cb>
mov    0x28ef(%rip),%rax
mov    (%rax),%edi
lea    0xb0f(%rip),%rsi
jmp    1772 <expression+0x5c2>
mov    0x28dd(%rip),%rax
mov    (%rax),%edi
lea    0x990(%rip),%rsi
jmp    1772 <expression+0x5c2>
mov    0x28cb(%rip),%rax
mov    (%rax),%edi
lea    0xa49(%rip),%rsi
jmp    1772 <expression+0x5c2>
mov    0x28b9(%rip),%rax
mov    (%rax),%edi
lea    0xa15(%rip),%rsi
jmp    1772 <expression+0x5c2>
mov    0x28a7(%rip),%rax
mov    (%rax),%edi
lea    0x8f7(%rip),%rsi
jmp    1772 <expression+0x5c2>
xor    %ebx,%ebx
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
setne  %bl
jmp    177b <expression+0x5cb>
xor    %ebx,%ebx
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
sete   %bl
jmp    177b <expression+0x5cb>
mov    0x2877(%rip),%rax
mov    (%rax),%edi
lea    0xa5b(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %ebx,%eax
add    $0x448,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebx,%ebx
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
setge  %bl
jmp    177b <expression+0x5cb>
mov    0x283b(%rip),%rax
mov    (%rax),%edi
lea    0x86e(%rip),%rsi
xor    %ebx,%ebx
lea    0x20(%rsp),%rdx
jmp    16de <expression+0x52e>
mov    0x281f(%rip),%rax
mov    (%rax),%edi
lea    0x852(%rip),%rsi
jmp    16d7 <expression+0x527>
xor    %ebx,%ebx
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
jg     177b <expression+0x5cb>
movl   $0x1,0x8(%rsp)
mov    $0x1,%ebx
jmp    177b <expression+0x5cb>
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
jg     17db <expression+0x62b>
jmp    1800 <expression+0x650>
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
jl     17db <expression+0x62b>
movl   $0x0,0x8(%rsp)
xor    %ebx,%ebx
jmp    177b <expression+0x5cb>
mov    0x27ca(%rip),%rax
mov    (%rax),%edi
cmpl   $0x0,0x14(%rsp)
je     1832 <expression+0x682>
cmpl   $0x0,0xc(%rsp)
je     183e <expression+0x68e>
lea    0x8cc(%rip),%rsi
jmp    1772 <expression+0x5c2>
lea    0x8a4(%rip),%rsi
jmp    1772 <expression+0x5c2>
lea    0x8d5(%rip),%rsi
jmp    1772 <expression+0x5c2>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"error: no such variable: %s\0A\00"
@.str.1 = [38 x i8] c"error: left side of comparison empty\0A\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [3 x i8] c"!=\00"
@.str.4 = [3 x i8] c"<>\00"
@.str.5 = [3 x i8] c"><\00"
@.str.6 = [3 x i8] c">=\00"
@.str.7 = [3 x i8] c"=>\00"
@.str.8 = [3 x i8] c"<=\00"
@.str.9 = [3 x i8] c"=<\00"
@.str.10 = [2 x i8] c">\00"
@.str.11 = [2 x i8] c"<\00"
@.str.12 = [37 x i8] c"error: bad comparison operator '%s'\0A\00"
@.str.13 = [30 x i8] c"error: lvalue not a variable\0A\00"
@.str.14 = [35 x i8] c"warning: too many sign specifiers\0A\00"
@.str.15 = [28 x i8] c"error: no lvalue specified\0A\00"
@.str.16 = [33 x i8] c"error: two operations specified\0A\00"
@.str.17 = [43 x i8] c"error: lset+op: this should not happen...\0A\00"
@.str.18 = [34 x i8] c"Error: end-of-line; expected ')'\0A\00"
@.str.19 = [40 x i8] c"Error: unknown character; expected ')'\0A\00"
@.str.20 = [2 x i8] c")\00"
@.str.21 = [19 x i8] c"warning: overflow\0A\00"
@.str.22 = [41 x i8] c"error: cannot interpret as number: '%s'\0A\00"
@.str.23 = [27 x i8] c"error: operation required\0A\00"
@.str.24 = [33 x i8] c"error: ')' without matching '('\0A\00"
@.str.25 = [26 x i8] c"error: unknown character\0A\00"
@.str.26 = [24 x i8] c"error: no values given\0A\00"
define i32 @expression(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [512 x i8]
%13 = alloca [512 x i8]
%14 = alloca [16 x i8]
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %11
store i32 0, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
%20 = load i32, i32* %5
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %2
store i32 0, i32* %3
br label %390
23: ; preds = %2
br label %24
24: ; preds = %387, %364, %348, %343, %230, %218, %23
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 512
br i1 %26, label %27, label %35
27: ; preds = %24
%28 = load i8*, i8** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 0
br label %35
35: ; preds = %27, %24
%36 = phi i1 [ false, %24 ], [ %34, %27 ]
br i1 %36, label %37, label %388
37: ; preds = %35
%38 = load i32, i32* %6
%39 = load i32, i32* %5
%40 = icmp eq i32 %38, %39
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = load i32, i32* %11
store i32 %42, i32* %3
br label %390
43: ; preds = %37
%44 = load i8*, i8** %4
%45 = load i32, i32* %6
%46 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%47 = call i32 @readtok(i8* %44, i32 %45, i8* %46, i32* %10)
store i32 %47, i32* %6
%48 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %59
52: ; preds = %43
%53 = load i32, i32* %9
%54 = icmp eq i32 %53, -1
br i1 %54, label %55, label %59
55: ; preds = %52
%56 = load i32, i32* @stderr
%57 = getelementptr inbounds [16 x i8], [16 x i8]* %14, i64 0, i64 0
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %57)
br label %388
59: ; preds = %52, %43
%60 = load i32, i32* %10
switch i32 %60, label %380 [
i32 7, label %61
i32 6, label %174
i32 3, label %194
i32 4, label %252
i32 1, label %285
i32 2, label %303
i32 5, label %358
i32 126, label %361
i32 0, label %364
i32 127, label %365
]
61: ; preds = %59
%62 = load i32, i32* %6
%63 = icmp slt i32 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %61
br label %163
65: ; preds = %61
%66 = load i32, i32* %8
%67 = icmp ne i32 %66, 0
br i1 %67, label %71, label %68
68: ; preds = %65
%69 = load i32, i32* @stderr
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %390
71: ; preds = %65
%72 = load i8*, i8** %4
%73 = load i32, i32* %6
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %72, i64 %74
store i8* %75, i8** %15
%76 = load i8*, i8** %15
%77 = load i32, i32* %5
%78 = load i32, i32* %6
%79 = sub nsw i32 %77, %78
%80 = call i32 @expression(i8* %76, i32 %79)
store i32 %80, i32* %11
%81 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%82 = call i32 @strncmp(i8* %81, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 3)
%83 = icmp ne i32 %82, 0
br i1 %83, label %91, label %84
84: ; preds = %71
%85 = load i32, i32* %16
%86 = load i32, i32* %11
%87 = icmp eq i32 %85, %86
br i1 %87, label %88, label %89
88: ; preds = %84
store i32 1, i32* %11
br label %90
89: ; preds = %84
store i32 0, i32* %11
br label %90
90: ; preds = %89, %88
br label %172
91: ; preds = %71
%92 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%93 = call i32 @strncmp(i8* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 3)
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %103
95: ; preds = %91
%96 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%97 = call i32 @strncmp(i8* %96, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 3)
%98 = icmp ne i32 %97, 0
br i1 %98, label %99, label %103
99: ; preds = %95
%100 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%101 = call i32 @strncmp(i8* %100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 3)
%102 = icmp ne i32 %101, 0
br i1 %102, label %110, label %103
103: ; preds = %99, %95, %91
%104 = load i32, i32* %16
%105 = load i32, i32* %11
%106 = icmp ne i32 %104, %105
br i1 %106, label %107, label %108
107: ; preds = %103
store i32 1, i32* %11
br label %109
108: ; preds = %103
store i32 0, i32* %11
br label %109
109: ; preds = %108, %107
br label %171
110: ; preds = %99
%111 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%112 = call i32 @strncmp(i8* %111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 3)
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %118
114: ; preds = %110
%115 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%116 = call i32 @strncmp(i8* %115, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 3)
%117 = icmp ne i32 %116, 0
br i1 %117, label %125, label %118
118: ; preds = %114, %110
%119 = load i32, i32* %16
%120 = load i32, i32* %11
%121 = icmp sge i32 %119, %120
br i1 %121, label %122, label %123
122: ; preds = %118
store i32 1, i32* %11
br label %124
123: ; preds = %118
store i32 0, i32* %11
br label %124
124: ; preds = %123, %122
br label %170
125: ; preds = %114
%126 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%127 = call i32 @strncmp(i8* %126, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 3)
%128 = icmp ne i32 %127, 0
br i1 %128, label %129, label %133
129: ; preds = %125
%130 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%131 = call i32 @strncmp(i8* %130, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 3)
%132 = icmp ne i32 %131, 0
br i1 %132, label %140, label %133
133: ; preds = %129, %125
%134 = load i32, i32* %16
%135 = load i32, i32* %11
%136 = icmp sle i32 %134, %135
br i1 %136, label %137, label %138
137: ; preds = %133
store i32 1, i32* %11
br label %139
138: ; preds = %133
store i32 0, i32* %11
br label %139
139: ; preds = %138, %137
br label %169
140: ; preds = %129
%141 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%142 = call i32 @strncmp(i8* %141, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i32 2)
%143 = icmp ne i32 %142, 0
br i1 %143, label %151, label %144
144: ; preds = %140
%145 = load i32, i32* %16
%146 = load i32, i32* %11
%147 = icmp sgt i32 %145, %146
br i1 %147, label %148, label %149
148: ; preds = %144
store i32 1, i32* %11
br label %150
149: ; preds = %144
store i32 0, i32* %11
br label %150
150: ; preds = %149, %148
br label %168
151: ; preds = %140
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%153 = call i32 @strncmp(i8* %152, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i32 2)
%154 = icmp ne i32 %153, 0
br i1 %154, label %162, label %155
155: ; preds = %151
%156 = load i32, i32* %16
%157 = load i32, i32* %11
%158 = icmp slt i32 %156, %157
br i1 %158, label %159, label %160
159: ; preds = %155
store i32 1, i32* %11
br label %161
160: ; preds = %155
store i32 0, i32* %11
br label %161
161: ; preds = %160, %159
br label %167
162: ; preds = %151
br label %163
163: ; preds = %162, %64
%164 = load i32, i32* @stderr
%165 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%166 = call i32 (i32, i8*, ...) @fprintf(i32 %164, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), i8* %165)
store i32 0, i32* %3
br label %390
167: ; preds = %161
br label %168
168: ; preds = %167, %150
br label %169
169: ; preds = %168, %139
br label %170
170: ; preds = %169, %124
br label %171
171: ; preds = %170, %109
br label %172
172: ; preds = %171, %90
%173 = load i32, i32* %11
store i32 %173, i32* %3
br label %390
174: ; preds = %59
%175 = load i32, i32* %9
%176 = icmp eq i32 %175, 0
br i1 %176, label %177, label %180
177: ; preds = %174
%178 = load i32, i32* @stderr
%179 = call i32 (i32, i8*, ...) @fprintf(i32 %178, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %3
br label %390
180: ; preds = %174
%181 = load i8*, i8** %4
%182 = load i32, i32* %6
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds i8, i8* %181, i64 %183
store i8* %184, i8** %15
%185 = load i8*, i8** %15
%186 = load i32, i32* %5
%187 = load i32, i32* %6
%188 = sub nsw i32 %186, %187
%189 = call i32 @expression(i8* %185, i32 %188)
store i32 %189, i32* %11
%190 = getelementptr inbounds [16 x i8], [16 x i8]* %14, i64 0, i64 0
%191 = load i32, i32* %11
%192 = call i32 @set_var(i8* %190, i32 %191)
%193 = load i32, i32* %11
store i32 %193, i32* %3
br label %390
194: ; preds = %59
%195 = load i32, i32* %9
%196 = icmp eq i32 %195, -1
br i1 %196, label %197, label %201
197: ; preds = %194
%198 = load i32, i32* @stderr
%199 = getelementptr inbounds [16 x i8], [16 x i8]* %14, i64 0, i64 0
%200 = call i32 (i32, i8*, ...) @fprintf(i32 %198, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %199)
store i32 0, i32* %3
br label %390
201: ; preds = %194
%202 = load i32, i32* %8
%203 = icmp ne i32 %202, 0
br i1 %203, label %204, label %207
204: ; preds = %201
%205 = load i32, i32* %18
%206 = icmp ne i32 %205, 0
br i1 %206, label %207, label %248
207: ; preds = %204, %201
%208 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%209 = load i8, i8* %208
%210 = sext i8 %209 to i32
%211 = icmp eq i32 %210, 43
br i1 %211, label %212, label %219
212: ; preds = %207
%213 = load i32, i32* %7
%214 = icmp ne i32 %213, 0
br i1 %214, label %215, label %218
215: ; preds = %212
%216 = load i32, i32* @stderr
%217 = call i32 (i32, i8*, ...) @fprintf(i32 %216, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
br label %218
218: ; preds = %215, %212
store i32 -1, i32* %7
br label %24
219: ; preds = %207
%220 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%221 = load i8, i8* %220
%222 = sext i8 %221 to i32
%223 = icmp eq i32 %222, 45
br i1 %223, label %224, label %231
224: ; preds = %219
%225 = load i32, i32* %7
%226 = icmp ne i32 %225, 0
br i1 %226, label %227, label %230
227: ; preds = %224
%228 = load i32, i32* @stderr
%229 = call i32 (i32, i8*, ...) @fprintf(i32 %228, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
br label %230
230: ; preds = %227, %224
store i32 1, i32* %7
br label %24
231: ; preds = %219
%232 = load i32, i32* %8
%233 = icmp ne i32 %232, 0
br i1 %233, label %237, label %234
234: ; preds = %231
%235 = load i32, i32* @stderr
%236 = call i32 (i32, i8*, ...) @fprintf(i32 %235, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0))
br label %247
237: ; preds = %231
%238 = load i32, i32* %18
%239 = icmp ne i32 %238, 0
br i1 %239, label %240, label %243
240: ; preds = %237
%241 = load i32, i32* @stderr
%242 = call i32 (i32, i8*, ...) @fprintf(i32 %241, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0))
br label %246
243: ; preds = %237
%244 = load i32, i32* @stderr
%245 = call i32 (i32, i8*, ...) @fprintf(i32 %244, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0))
br label %246
246: ; preds = %243, %240
br label %247
247: ; preds = %246, %234
store i32 0, i32* %3
br label %390
248: ; preds = %204
%249 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%250 = load i8, i8* %249
%251 = sext i8 %250 to i32
store i32 %251, i32* %18
br label %382
252: ; preds = %59
%253 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
store i8 0, i8* %253
br label %254
254: ; preds = %252, %279
%255 = load i8*, i8** %4
%256 = load i32, i32* %6
%257 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%258 = call i32 @readtok(i8* %255, i32 %256, i8* %257, i32* %10)
store i32 %258, i32* %6
%259 = load i32, i32* %10
%260 = icmp eq i32 %259, 127
br i1 %260, label %261, label %264
261: ; preds = %254
%262 = load i32, i32* @stderr
%263 = call i32 (i32, i8*, ...) @fprintf(i32 %262, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0))
store i32 0, i32* %3
br label %390
264: ; preds = %254
%265 = load i32, i32* %10
%266 = icmp eq i32 %265, 126
br i1 %266, label %267, label %270
267: ; preds = %264
%268 = load i32, i32* @stderr
%269 = call i32 (i32, i8*, ...) @fprintf(i32 %268, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
store i32 0, i32* %3
br label %390
270: ; preds = %264
%271 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%272 = call i32 @strncmp(i8* %271, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), i32 2)
%273 = icmp ne i32 %272, 0
br i1 %273, label %274, label %278
274: ; preds = %270
%275 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%276 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%277 = call i32 @strncat(i8* %275, i8* %276, i32 511)
br label %279
278: ; preds = %270
br label %280
279: ; preds = %274
br label %254
280: ; preds = %278
%281 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%282 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%283 = call i32 @strlen(i8* %282)
%284 = call i32 @expression(i8* %281, i32 %283)
store i32 %284, i32* %11
br label %334
285: ; preds = %59
%286 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%287 = call i32 @strlen(i8* %286)
%288 = icmp sgt i32 %287, 19
br i1 %288, label %289, label %292
289: ; preds = %285
%290 = load i32, i32* @stderr
%291 = call i32 (i32, i8*, ...) @fprintf(i32 %290, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
br label %292
292: ; preds = %289, %285
%293 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%294 = call i32 @strtol(i8* %293, i8** %19, i32 10)
store i32 %294, i32* %11
%295 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%296 = load i8*, i8** %19
%297 = icmp eq i8* %295, %296
br i1 %297, label %298, label %302
298: ; preds = %292
%299 = load i32, i32* @stderr
%300 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%301 = call i32 (i32, i8*, ...) @fprintf(i32 %299, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.22, i64 0, i64 0), i8* %300)
br label %302
302: ; preds = %298, %292
br label %334
303: ; preds = %59
%304 = load i32, i32* %9
%305 = icmp ne i32 %304, 0
br i1 %305, label %322, label %306
306: ; preds = %303
%307 = load i32, i32* %18
%308 = icmp ne i32 %307, 0
br i1 %308, label %322, label %309
309: ; preds = %306
%310 = load i32, i32* %8
%311 = icmp ne i32 %310, 0
br i1 %311, label %322, label %312
312: ; preds = %309
%313 = getelementptr inbounds [16 x i8], [16 x i8]* %14, i64 0, i64 0
%314 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%315 = call i32 @strncpy(i8* %313, i8* %314, i32 16)
%316 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%317 = call i32 @get_var(i8* %316, i32* %11)
%318 = icmp ne i32 %317, 0
br i1 %318, label %319, label %320
319: ; preds = %312
store i32 1, i32* %9
br label %321
320: ; preds = %312
store i32 -1, i32* %9
br label %321
321: ; preds = %320, %319
br label %322
322: ; preds = %321, %309, %306, %303
%323 = load i32, i32* %18
%324 = icmp ne i32 %323, 0
br i1 %324, label %325, label %333
325: ; preds = %322
%326 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%327 = call i32 @get_var(i8* %326, i32* %11)
%328 = icmp ne i32 %327, 0
br i1 %328, label %333, label %329
329: ; preds = %325
%330 = load i32, i32* @stderr
%331 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%332 = call i32 (i32, i8*, ...) @fprintf(i32 %330, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %331)
store i32 0, i32* %3
br label %390
333: ; preds = %325, %322
br label %334
334: ; preds = %333, %302, %280
%335 = load i32, i32* %7
%336 = icmp sgt i32 %335, 0
br i1 %336, label %337, label %340
337: ; preds = %334
%338 = load i32, i32* %11
%339 = sub nsw i32 0, %338
store i32 %339, i32* %11
br label %340
340: ; preds = %337, %334
%341 = load i32, i32* %8
%342 = icmp ne i32 %341, 0
br i1 %342, label %345, label %343
343: ; preds = %340
%344 = load i32, i32* %11
store i32 %344, i32* %16
store i32 0, i32* %7
store i32 1, i32* %8
br label %24
345: ; preds = %340
%346 = load i32, i32* %18
%347 = icmp ne i32 %346, 0
br i1 %347, label %348, label %355
348: ; preds = %345
%349 = load i32, i32* %11
store i32 %349, i32* %17
store i32 0, i32* %7
%350 = load i32, i32* %16
%351 = load i32, i32* %17
%352 = load i32, i32* %18
%353 = call i32 @do_operation(i32 %350, i32 %351, i32 %352)
store i32 %353, i32* %11
store i32 0, i32* %18
%354 = load i32, i32* %11
store i32 %354, i32* %16
br label %24
355: ; preds = %345
%356 = load i32, i32* @stderr
%357 = call i32 (i32, i8*, ...) @fprintf(i32 %356, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0))
store i32 0, i32* %3
br label %390
358: ; preds = %59
%359 = load i32, i32* @stderr
%360 = call i32 (i32, i8*, ...) @fprintf(i32 %359, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0))
store i32 0, i32* %3
br label %390
361: ; preds = %59
%362 = load i32, i32* @stderr
%363 = call i32 (i32, i8*, ...) @fprintf(i32 %362, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.25, i64 0, i64 0))
store i32 0, i32* %3
br label %390
364: ; preds = %59
br label %24
365: ; preds = %59
%366 = load i32, i32* %7
%367 = icmp ne i32 %366, 0
br i1 %367, label %368, label %371
368: ; preds = %365
%369 = load i32, i32* @stderr
%370 = call i32 (i32, i8*, ...) @fprintf(i32 %369, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.26, i64 0, i64 0))
br label %371
371: ; preds = %368, %365
%372 = load i32, i32* %9
%373 = icmp eq i32 %372, -1
br i1 %373, label %374, label %378
374: ; preds = %371
%375 = load i32, i32* @stderr
%376 = getelementptr inbounds [16 x i8], [16 x i8]* %14, i64 0, i64 0
%377 = call i32 (i32, i8*, ...) @fprintf(i32 %375, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %376)
br label %378
378: ; preds = %374, %371
%379 = load i32, i32* %11
store i32 %379, i32* %3
br label %390
380: ; preds = %59
%381 = load i32, i32* %11
store i32 %381, i32* %3
br label %390
382: ; preds = %248
%383 = load i32, i32* %6
%384 = icmp slt i32 %383, 0
br i1 %384, label %385, label %387
385: ; preds = %382
%386 = load i32, i32* %11
store i32 %386, i32* %3
br label %390
387: ; preds = %382
br label %24
388: ; preds = %55, %35
%389 = load i32, i32* %11
store i32 %389, i32* %3
br label %390
390: ; preds = %388, %385, %380, %378, %361, %358, %355, %329, %267, %261, %247, %197, %180, %177, %172, %163, %68, %41, %22
%391 = load i32, i32* %3
ret i32 %391
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"error: no such variable: %s\0A\00"
@.str.1 = [38 x i8] c"error: left side of comparison empty\0A\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [3 x i8] c"!=\00"
@.str.4 = [3 x i8] c"<>\00"
@.str.5 = [3 x i8] c"><\00"
@.str.6 = [3 x i8] c">=\00"
@.str.7 = [3 x i8] c"=>\00"
@.str.8 = [3 x i8] c"<=\00"
@.str.9 = [3 x i8] c"=<\00"
@.str.10 = [2 x i8] c">\00"
@.str.11 = [2 x i8] c"<\00"
@.str.12 = [37 x i8] c"error: bad comparison operator '%s'\0A\00"
@.str.13 = [30 x i8] c"error: lvalue not a variable\0A\00"
@.str.14 = [35 x i8] c"warning: too many sign specifiers\0A\00"
@.str.15 = [28 x i8] c"error: no lvalue specified\0A\00"
@.str.16 = [33 x i8] c"error: two operations specified\0A\00"
@.str.17 = [43 x i8] c"error: lset+op: this should not happen...\0A\00"
@.str.18 = [34 x i8] c"Error: end-of-line; expected ')'\0A\00"
@.str.19 = [40 x i8] c"Error: unknown character; expected ')'\0A\00"
@.str.20 = [2 x i8] c")\00"
@.str.21 = [19 x i8] c"warning: overflow\0A\00"
@.str.22 = [41 x i8] c"error: cannot interpret as number: '%s'\0A\00"
@.str.23 = [27 x i8] c"error: operation required\0A\00"
@.str.24 = [33 x i8] c"error: ')' without matching '('\0A\00"
@.str.25 = [26 x i8] c"error: unknown character\0A\00"
@.str.26 = [24 x i8] c"error: no values given\0A\00"
define i32 @expression(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca [16 x i8]
%8 = alloca i8*
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%14 = bitcast i8** %8 to i8*
%15 = icmp eq i32 %1, 0
br i1 %15, label %264, label %16
16: ; preds = %2, %230
%17 = phi i32 [ %220, %230 ], [ 0, %2 ]
%18 = phi i32 [ 1, %230 ], [ 0, %2 ]
%19 = phi i32 [ %221, %230 ], [ 0, %2 ]
%20 = phi i32 [ %231, %230 ], [ 0, %2 ]
%21 = phi i32 [ %232, %230 ], [ 0, %2 ]
%22 = icmp eq i32 %19, -1
br label %23
23: ; preds = %152, %16
%24 = phi i32 [ %17, %16 ], [ %45, %152 ]
%25 = phi i32 [ 0, %16 ], [ %153, %152 ]
%26 = phi i32 [ %18, %16 ], [ %30, %152 ]
%27 = phi i32 [ %21, %16 ], [ %31, %152 ]
br label %28
28: ; preds = %23, %165
%29 = phi i32 [ %24, %23 ], [ %45, %165 ]
%30 = phi i32 [ %26, %23 ], [ 1, %165 ]
%31 = phi i32 [ %27, %23 ], [ %137, %165 ]
br label %32
32: ; preds = %28, %52
%33 = phi i32 [ %45, %52 ], [ %29, %28 ]
%34 = icmp slt i32 %33, 512
br i1 %34, label %35, label %262
35: ; preds = %32
%36 = sext i32 %33 to i64
%37 = getelementptr inbounds i8, i8* %0, i64 %36
%38 = load i8, i8* %37
%39 = icmp eq i8 %38, 0
br i1 %39, label %262, label %40
40: ; preds = %35
%41 = icmp eq i32 %33, %1
br i1 %41, label %42, label %44
42: ; preds = %40
%43 = load i32, i32* %4
br label %264
44: ; preds = %40
%45 = call i32 @readtok(i8* %0, i32 %33, i8* %11, i32* %3)
%46 = load i8, i8* %11
%47 = icmp eq i8 %46, 0
%48 = select i1 %47, i1 %22, i1 false
br i1 %48, label %49, label %52
49: ; preds = %44
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %262
52: ; preds = %44
%53 = load i32, i32* %3
switch i32 %53, label %258 [
i32 7, label %54
i32 6, label %124
i32 3, label %136
i32 4, label %167
i32 1, label %186
i32 2, label %199
i32 5, label %241
i32 126, label %244
i32 0, label %32
i32 127, label %247
]
54: ; preds = %52
%55 = icmp slt i32 %45, 0
br i1 %55, label %121, label %56
56: ; preds = %54
%57 = icmp eq i32 %30, 0
br i1 %57, label %58, label %61
58: ; preds = %56
%59 = load i32, i32* @stderr
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %264
61: ; preds = %56
%62 = zext i32 %45 to i64
%63 = getelementptr inbounds i8, i8* %0, i64 %62
%64 = sub nsw i32 %1, %45
%65 = call i32 @expression(i8* %63, i32 %64)
store i32 %65, i32* %4
%66 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 3)
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %72
68: ; preds = %61
%69 = load i32, i32* %4
%70 = icmp eq i32 %20, %69
%71 = zext i1 %70 to i32
br label %264
72: ; preds = %61
%73 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 3)
%74 = icmp eq i32 %73, 0
br i1 %74, label %81, label %75
75: ; preds = %72
%76 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 3)
%77 = icmp eq i32 %76, 0
br i1 %77, label %81, label %78
78: ; preds = %75
%79 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 3)
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %85
81: ; preds = %78, %75, %72
%82 = load i32, i32* %4
%83 = icmp ne i32 %20, %82
%84 = zext i1 %83 to i32
br label %264
85: ; preds = %78
%86 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 3)
%87 = icmp eq i32 %86, 0
br i1 %87, label %91, label %88
88: ; preds = %85
%89 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 3)
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %95
91: ; preds = %88, %85
%92 = load i32, i32* %4
%93 = icmp sge i32 %20, %92
%94 = zext i1 %93 to i32
br label %264
95: ; preds = %88
%96 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 3)
%97 = icmp eq i32 %96, 0
br i1 %97, label %101, label %98
98: ; preds = %95
%99 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 3)
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %105
101: ; preds = %98, %95
%102 = load i32, i32* %4
%103 = icmp sgt i32 %20, %102
br i1 %103, label %264, label %104
104: ; preds = %101
store i32 1, i32* %4
br label %264
105: ; preds = %98
%106 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i32 2)
%107 = icmp eq i32 %106, 0
br i1 %107, label %108, label %113
108: ; preds = %105
%109 = load i32, i32* %4
%110 = icmp sgt i32 %20, %109
br i1 %110, label %111, label %112
111: ; preds = %108
store i32 1, i32* %4
br label %264
112: ; preds = %108
store i32 0, i32* %4
br label %264
113: ; preds = %105
%114 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i32 2)
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %121
116: ; preds = %113
%117 = load i32, i32* %4
%118 = icmp slt i32 %20, %117
br i1 %118, label %119, label %120
119: ; preds = %116
store i32 1, i32* %4
br label %264
120: ; preds = %116
store i32 0, i32* %4
br label %264
121: ; preds = %113, %54
%122 = load i32, i32* @stderr
%123 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), i8* %11)
br label %264
124: ; preds = %52
%125 = icmp eq i32 %19, 0
br i1 %125, label %126, label %129
126: ; preds = %124
%127 = load i32, i32* @stderr
%128 = call i32 (i32, i8*, ...) @fprintf(i32 %127, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %264
129: ; preds = %124
%130 = sext i32 %45 to i64
%131 = getelementptr inbounds i8, i8* %0, i64 %130
%132 = sub nsw i32 %1, %45
%133 = call i32 @expression(i8* %131, i32 %132)
store i32 %133, i32* %4
%134 = call i32 @set_var(i8* %13, i32 %133)
%135 = load i32, i32* %4
br label %264
136: ; preds = %52
%137 = sext i8 %46 to i32
br i1 %22, label %138, label %141
138: ; preds = %136
%139 = load i32, i32* @stderr
%140 = call i32 (i32, i8*, ...) @fprintf(i32 %139, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %264
141: ; preds = %136
%142 = icmp eq i32 %30, 0
%143 = icmp ne i32 %31, 0
%144 = select i1 %142, i1 true, i1 %143
br i1 %144, label %145, label %165
145: ; preds = %141
switch i8 %46, label %156 [
i8 43, label %146
i8 45, label %154
]
146: ; preds = %145
%147 = icmp eq i32 %25, 0
br i1 %147, label %152, label %148
148: ; preds = %146, %154
%149 = phi i32 [ 1, %154 ], [ -1, %146 ]
%150 = load i32, i32* @stderr
%151 = call i32 (i32, i8*, ...) @fprintf(i32 %150, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
br label %152
152: ; preds = %148, %154, %146
%153 = phi i32 [ %149, %148 ], [ 1, %154 ], [ -1, %146 ]
br label %23
154: ; preds = %145
%155 = icmp eq i32 %25, 0
br i1 %155, label %152, label %148
156: ; preds = %145
%157 = load i32, i32* @stderr
br i1 %142, label %158, label %160
158: ; preds = %156
%159 = call i32 (i32, i8*, ...) @fprintf(i32 %157, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0))
br label %264
160: ; preds = %156
br i1 %143, label %161, label %163
161: ; preds = %160
%162 = call i32 (i32, i8*, ...) @fprintf(i32 %157, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0))
br label %264
163: ; preds = %160
%164 = call i32 (i32, i8*, ...) @fprintf(i32 %157, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0))
br label %264
165: ; preds = %141
%166 = icmp slt i32 %45, 0
br i1 %166, label %260, label %28
167: ; preds = %52
store i8 0, i8* %12
br label %168
168: ; preds = %181, %167
%169 = phi i32 [ %45, %167 ], [ %170, %181 ]
%170 = call i32 @readtok(i8* %0, i32 %169, i8* %11, i32* %3)
%171 = load i32, i32* %3
switch i32 %171, label %178 [
i32 127, label %172
i32 126, label %175
]
172: ; preds = %168
%173 = load i32, i32* @stderr
%174 = call i32 (i32, i8*, ...) @fprintf(i32 %173, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0))
br label %264
175: ; preds = %168
%176 = load i32, i32* @stderr
%177 = call i32 (i32, i8*, ...) @fprintf(i32 %176, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
br label %264
178: ; preds = %168
%179 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), i32 2)
%180 = icmp eq i32 %179, 0
br i1 %180, label %183, label %181
181: ; preds = %178
%182 = call i32 @strncat(i8* %12, i8* %11, i32 511)
br label %168
183: ; preds = %178
%184 = call i32 @strlen(i8* %12)
%185 = call i32 @expression(i8* %12, i32 %184)
store i32 %185, i32* %4
br label %218
186: ; preds = %52
%187 = call i32 @strlen(i8* %11)
%188 = icmp sgt i32 %187, 19
br i1 %188, label %189, label %192
189: ; preds = %186
%190 = load i32, i32* @stderr
%191 = call i32 (i32, i8*, ...) @fprintf(i32 %190, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
br label %192
192: ; preds = %189, %186
%193 = call i32 @strtol(i8* %11, i8** %8, i32 10)
store i32 %193, i32* %4
%194 = load i8*, i8** %8
%195 = icmp eq i8* %11, %194
br i1 %195, label %196, label %218
196: ; preds = %192
%197 = load i32, i32* @stderr
%198 = call i32 (i32, i8*, ...) @fprintf(i32 %197, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.22, i64 0, i64 0), i8* %11)
br label %218
199: ; preds = %52
%200 = icmp ne i32 %19, 0
%201 = icmp ne i32 %31, 0
%202 = select i1 %200, i1 true, i1 %201
%203 = icmp ne i32 %30, 0
%204 = select i1 %202, i1 true, i1 %203
br i1 %204, label %210, label %205
205: ; preds = %199
%206 = call i32 @strncpy(i8* %13, i8* %11, i32 16)
%207 = call i32 @get_var(i8* %11, i32* %4)
%208 = icmp eq i32 %207, 0
%209 = select i1 %208, i32 -1, i32 1
br label %210
210: ; preds = %205, %199
%211 = phi i32 [ %19, %199 ], [ %209, %205 ]
br i1 %201, label %212, label %218
212: ; preds = %210
%213 = call i32 @get_var(i8* %11, i32* %4)
%214 = icmp eq i32 %213, 0
br i1 %214, label %215, label %218
215: ; preds = %212
%216 = load i32, i32* @stderr
%217 = call i32 (i32, i8*, ...) @fprintf(i32 %216, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %264
218: ; preds = %210, %212, %192, %196, %183
%219 = phi i32 [ %31, %212 ], [ 0, %210 ], [ %31, %196 ], [ %31, %192 ], [ %31, %183 ]
%220 = phi i32 [ %45, %212 ], [ %45, %210 ], [ %45, %196 ], [ %45, %192 ], [ %170, %183 ]
%221 = phi i32 [ %211, %212 ], [ %211, %210 ], [ %19, %196 ], [ %19, %192 ], [ %19, %183 ]
%222 = icmp sgt i32 %25, 0
br i1 %222, label %223, label %226
223: ; preds = %218
%224 = load i32, i32* %4
%225 = sub nsw i32 0, %224
store i32 %225, i32* %4
br label %226
226: ; preds = %223, %218
%227 = icmp eq i32 %30, 0
br i1 %227, label %228, label %233
228: ; preds = %226
%229 = load i32, i32* %4
br label %230
230: ; preds = %228, %235
%231 = phi i32 [ %229, %228 ], [ %237, %235 ]
%232 = phi i32 [ %219, %228 ], [ 0, %235 ]
br label %16
233: ; preds = %226
%234 = icmp eq i32 %219, 0
br i1 %234, label %238, label %235
235: ; preds = %233
%236 = load i32, i32* %4
%237 = call i32 @do_operation(i32 %20, i32 %236, i32 %219)
store i32 %237, i32* %4
br label %230
238: ; preds = %233
%239 = load i32, i32* @stderr
%240 = call i32 (i32, i8*, ...) @fprintf(i32 %239, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0))
br label %264
241: ; preds = %52
%242 = load i32, i32* @stderr
%243 = call i32 (i32, i8*, ...) @fprintf(i32 %242, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0))
br label %264
244: ; preds = %52
%245 = load i32, i32* @stderr
%246 = call i32 (i32, i8*, ...) @fprintf(i32 %245, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.25, i64 0, i64 0))
br label %264
247: ; preds = %52
%248 = icmp eq i32 %25, 0
br i1 %248, label %252, label %249
249: ; preds = %247
%250 = load i32, i32* @stderr
%251 = call i32 (i32, i8*, ...) @fprintf(i32 %250, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.26, i64 0, i64 0))
br label %252
252: ; preds = %249, %247
br i1 %22, label %253, label %256
253: ; preds = %252
%254 = load i32, i32* @stderr
%255 = call i32 (i32, i8*, ...) @fprintf(i32 %254, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %256
256: ; preds = %253, %252
%257 = load i32, i32* %4
br label %264
258: ; preds = %52
%259 = load i32, i32* %4
br label %264
260: ; preds = %165
%261 = load i32, i32* %4
br label %264
262: ; preds = %32, %35, %49
%263 = load i32, i32* %4
br label %264
264: ; preds = %101, %91, %81, %68, %112, %111, %119, %120, %104, %158, %163, %161, %2, %262, %260, %258, %256, %244, %241, %238, %215, %175, %172, %138, %129, %126, %121, %58, %42
%265 = phi i32 [ %43, %42 ], [ %263, %262 ], [ %259, %258 ], [ %257, %256 ], [ 0, %244 ], [ 0, %241 ], [ 0, %238 ], [ 0, %215 ], [ 0, %172 ], [ 0, %175 ], [ 0, %138 ], [ %261, %260 ], [ 0, %126 ], [ %135, %129 ], [ 0, %121 ], [ 0, %58 ], [ 0, %2 ], [ 0, %161 ], [ 0, %163 ], [ 0, %158 ], [ 1, %104 ], [ 0, %120 ], [ 1, %119 ], [ 1, %111 ], [ 0, %112 ], [ %71, %68 ], [ %84, %81 ], [ %94, %91 ], [ 0, %101 ]
ret i32 %265
}