// File: /workspace/github_cpp_makefile_star2_O3/silverneko[P]Lambda-calculus-interpreter/src/main.cpp
// Function: main
int main(int argc, char *argv[])
{
  Context prelude;
  prelude.add("true", "\\a \\b a");
  prelude.add("false", "\\a \\b b");
  prelude.add("if", "\\pred \\then \\else pred then else");
  prelude.add("not", "\\x x false true");
  prelude.add("and", "\\x \\y x y false");
  prelude.add("or", "\\x \\y x true y");
  // Y f = f (Y f)
  prelude.add("Y", "\\f (\\x f (x x)) (\\x f (x x))");
  prelude.add("+", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              int b = normalForm(expr, env).expr().val;
              return Expression( a + b );
            });
        }));
  prelude.add("-", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              int b = normalForm(expr, env).expr().val;
              return Expression( a - b );
            });
        }));
  prelude.add("*", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              if(a == 0)
                return Expression( 0 );
              int b = normalForm(expr, env).expr().val;
              return Expression( a * b );
            });
        }));
  prelude.add("/", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              int b = normalForm(expr, env).expr().val;
              return Expression( a / b );
            });
        }));
  prelude.add("mod", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              int b = normalForm(expr, env).expr().val;
              return Expression( a % b );
            });
        }));
  prelude.add("==", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              int b = normalForm(expr, env).expr().val;
              if(a == b){
                return Object(Expression("true"), env);
              }else{
                return Object(Expression("false"), env);
              }
            });
        }));
  prelude.add("<", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              int b = normalForm(expr, env).expr().val;
              if(a < b){
                return Object(Expression("true"), env);
              }else{
                return Object(Expression("false"), env);
              }
            });
        }));
  prelude.add("<=", Object([](const Expression& expr, const Context& env){
          int a = normalForm(expr, env).expr().val;
          return Object([a](const Expression& expr, const Context& env){
              int b = normalForm(expr, env).expr().val;
              if(a <= b){
                return Object(Expression("true"), env);
              }else{
                return Object(Expression("false"), env);
              }
            });
        }));
  prelude.add("flip", "\\f \\x \\y f y x");
  prelude.add("!=", "\\a \\b not (== a b)");
  prelude.add(">", "flip <");
  prelude.add(">=", "flip >=");

  prelude.add(">>=", "\\m \\f \\s (m s) \\a \\s' f a s'");
  prelude.add(">>", "\\ma \\mb >>= ma (\\_ mb)");

  prelude.add("runIO", "\\m m s");
  prelude.add("pair", "\\a \\b \\p p a b");
  prelude.add("pureIO", "pair");
  prelude.add("putChar", Object([](const Expression& expr, const Context& env){
        auto promiseChar = [expr, env](){ return normalForm(expr, env).expr().val;};
        return Object([promiseChar](const Expression& s, const Context& env){
          fputc(promiseChar(), stdout);
          /* pair nil s */
          return Object([s, env](const Expression& p, const Context& _env){
            Object res = weakNormalForm(p, _env).call(Expression("nil"), {});
            return weakNormalForm(res.expr(), res.env()).call(s, env);
          });
        });
      }));
  prelude.add("getChar", Object([](const Expression& s, const Context& env){
        int c = fgetc(stdin);
        return Object([c, s, env](const Expression& p, const Context& _env){
          Object res = weakNormalForm(p, _env).call(Expression(c), {});
          return weakNormalForm(res.expr(), res.env()).call(s, env);
        });
      }));

  string rawInput, input;
  ifstream file("samplecode/prelude");
  while(getline(file, input)){
    rawInput += input;
    rawInput += "\n";
  }
  file.close();
  if(argc > 1){
    file.open(argv[1]);
    while(getline(file, input)){
      rawInput += input;
      rawInput += "\n";
    }
    file.close();
  }else{
    while(getline(cin, input)){
      rawInput += input;
      rawInput += "\n";
    }
  }
  Scanner scanner(rawInput);
  Expression * expr = parseExpression(scanner);
  Object res = normalForm(*expr, prelude);

  //res.expr().prettyPrint();
  //cout << endl;

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rsi, %rbp
movl %edi, %ebx
movl $0x50, %edi
callq 0x31c0
leaq 0x30(%rax), %rcx
movq %rcx, (%rax)
movq $0x1, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movl $0x3f800000, 0x20(%rax) # imm = 0x3F800000
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x28(%rax)
movb $0x0, 0x38(%rax)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x7118
leaq 0x100(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9be4(%rip), %rsi      # 0xf463
leaq 0x9be1(%rip), %rdx      # 0xf467
leaq 0xf0(%rsp), %rdi
callq 0xa11a
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9b7d(%rip), %rsi      # 0xf420
leaq 0x9b7d(%rip), %rdx      # 0xf427
leaq 0x10(%rsp), %rdi
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x58e0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x58fd
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9b67(%rip), %rsi      # 0xf476
leaq 0x9b65(%rip), %rdx      # 0xf47b
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9afe(%rip), %rsi      # 0xf428
leaq 0x9afe(%rip), %rdx      # 0xf42f
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5962
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x597f
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9a9f(%rip), %rsi      # 0xf430
leaq 0x9a9a(%rip), %rdx      # 0xf432
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9a87(%rip), %rsi      # 0xf433
leaq 0x9aa0(%rip), %rdx      # 0xf453
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x59e4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5a01
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9a41(%rip), %rsi      # 0xf454
leaq 0x9a3d(%rip), %rdx      # 0xf457
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9a2a(%rip), %rsi      # 0xf458
leaq 0x9a32(%rip), %rdx      # 0xf467
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5a66
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5a83
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x99d3(%rip), %rsi      # 0xf468
leaq 0x99cf(%rip), %rdx      # 0xf46b
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x99bc(%rip), %rsi      # 0xf46c
leaq 0x99c4(%rip), %rdx      # 0xf47b
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5ae8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5b05
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9965(%rip), %rsi      # 0xf47c
leaq 0x9960(%rip), %rdx      # 0xf47e
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x994d(%rip), %rsi      # 0xf47f
leaq 0x9954(%rip), %rdx      # 0xf48d
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5b6a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5b87
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x98f5(%rip), %rsi      # 0xf48e
leaq 0x98ef(%rip), %rdx      # 0xf48f
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x98dc(%rip), %rsi      # 0xf490
leaq 0x98f1(%rip), %rdx      # 0xf4ac
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5bec
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5c09
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9895(%rip), %rsi      # 0xf4ad
leaq 0x988f(%rip), %rdx      # 0xf4ae
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x1bd1(%rip), %rax      # 0x780a
movq %rax, 0x18(%rsi)
leaq 0x1ca2(%rip), %rax      # 0x78e6
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5c89
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5c9b
callq 0x9e7a
leaq 0x110(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x5cbd
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5cdc
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5cf3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x97ad(%rip), %rsi      # 0xf4af
leaq 0x97a7(%rip), %rdx      # 0xf4b0
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x1cf5(%rip), %rax      # 0x7a18
movq %rax, 0x18(%rsi)
leaq 0x1dc6(%rip), %rax      # 0x7af4
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5d73
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5d85
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5da2
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5dc1
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5dd8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x96ca(%rip), %rsi      # 0xf4b1
leaq 0x96c4(%rip), %rdx      # 0xf4b2
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x1e20(%rip), %rax      # 0x7c28
movq %rax, 0x18(%rsi)
leaq 0x1ef1(%rip), %rax      # 0x7d04
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5e58
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5e6a
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5e87
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5ea6
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5ebd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x95e7(%rip), %rsi      # 0xf4b3
leaq 0x95e1(%rip), %rdx      # 0xf4b4
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x1f53(%rip), %rax      # 0x7e40
movq %rax, 0x18(%rsi)
leaq 0x2024(%rip), %rax      # 0x7f1c
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5f3d
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5f4f
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f6c
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5f8b
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5fa2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9504(%rip), %rsi      # 0xf4b5
leaq 0x9500(%rip), %rdx      # 0xf4b8
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x207e(%rip), %rax      # 0x8050
movq %rax, 0x18(%rsi)
leaq 0x214f(%rip), %rax      # 0x812c
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x6022
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x6034
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x6051
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6070
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6087
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9423(%rip), %rsi      # 0xf4b9
leaq 0x941e(%rip), %rdx      # 0xf4bb
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x21a9(%rip), %rax      # 0x8260
movq %rax, 0x18(%rsi)
leaq 0x227a(%rip), %rax      # 0x833c
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x6107
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x6119
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x6136
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6155
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x616c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9373(%rip), %rsi      # 0xf4ee
leaq 0x936d(%rip), %rdx      # 0xf4ef
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2380(%rip), %rax      # 0x851c
movq %rax, 0x18(%rsi)
leaq 0x2451(%rip), %rax      # 0x85f8
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x61ec
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x61fe
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x621b
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x623a
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6251
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x925c(%rip), %rsi      # 0xf4bc
leaq 0x9257(%rip), %rdx      # 0xf4be
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2557(%rip), %rax      # 0x87d8
movq %rax, 0x18(%rsi)
leaq 0x2628(%rip), %rax      # 0x88b4
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x62d1
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x62e3
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x6300
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x631f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6336
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9177(%rip), %rsi      # 0xf4bf
leaq 0x9174(%rip), %rdx      # 0xf4c3
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9161(%rip), %rsi      # 0xf4c4
leaq 0x9168(%rip), %rdx      # 0xf4d2
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x639b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x63b8
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9109(%rip), %rsi      # 0xf4d3
leaq 0x9104(%rip), %rdx      # 0xf4d5
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x90f1(%rip), %rsi      # 0xf4d6
leaq 0x90fc(%rip), %rdx      # 0xf4e8
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x641d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x643a
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x90ce(%rip), %rsi      # 0xf51a
leaq 0x90c8(%rip), %rdx      # 0xf51b
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9082(%rip), %rsi      # 0xf4e9
leaq 0x9081(%rip), %rdx      # 0xf4ef
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x649f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x64bc
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9027(%rip), %rsi      # 0xf4f5
leaq 0x9022(%rip), %rdx      # 0xf4f7
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9007(%rip), %rsi      # 0xf4f0
leaq 0x9007(%rip), %rdx      # 0xf4f7
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6521
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x653e
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x8fa8(%rip), %rsi      # 0xf4f8
leaq 0x8fa4(%rip), %rdx      # 0xf4fb
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8f91(%rip), %rsi      # 0xf4fc
leaq 0x8fa6(%rip), %rdx      # 0xf518
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x65a3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x65c0
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x8f47(%rip), %rsi      # 0xf519
leaq 0x8f42(%rip), %rdx      # 0xf51b
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8f2f(%rip), %rsi      # 0xf51c
leaq 0x8f3e(%rip), %rdx      # 0xf532
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6625
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6642
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x8edf(%rip), %rsi      # 0xf533
leaq 0x8edd(%rip), %rdx      # 0xf538
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8eca(%rip), %rsi      # 0xf539
leaq 0x8ec9(%rip), %rdx      # 0xf53f
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x66a7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x66c4
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x8e6a(%rip), %rsi      # 0xf540
leaq 0x8e67(%rip), %rdx      # 0xf544
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8e54(%rip), %rsi      # 0xf545
leaq 0x8e5b(%rip), %rdx      # 0xf553
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6729
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6746
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x8dfc(%rip), %rsi      # 0xf554
leaq 0x8dfb(%rip), %rdx      # 0xf55a
callq 0xa11a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8dcd(%rip), %rsi      # 0xf540
leaq 0x8dca(%rip), %rdx      # 0xf544
callq 0xa11a
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40ec
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x67ab
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x67c8
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8d84(%rip), %rsi      # 0xf55b
leaq 0x8d84(%rip), %rdx      # 0xf562
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x229c(%rip), %rax      # 0x8a94
movq %rax, 0x18(%rsi)
leaq 0x2501(%rip), %rax      # 0x8d04
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x6848
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x685a
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x6877
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6896
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x68ad
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8ca7(%rip), %rsi      # 0xf563
leaq 0x8ca7(%rip), %rdx      # 0xf56a
callq 0xa11a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2b93(%rip), %rax      # 0x9470
movq %rax, 0x18(%rsi)
leaq 0x2d60(%rip), %rax      # 0x9648
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9b68
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x41bc
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x692d
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x693f
callq 0x9e7a
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x695c
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x697b
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6992
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x308(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xe0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x8bac(%rip), %rsi      # 0xf56b
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x3300
leaq 0xd0(%rsp), %r15
leaq 0x2f8(%rsp), %r12
leaq 0x903a(%rip), %r13      # 0xfa25
movq 0xf0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31a0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6a45
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq %r12, %rdi
callq 0x3080
movq %r12, %rdi
movq %r13, %rsi
callq 0x3320
jmp 0x69eb
leaq 0xf0(%rsp), %rdi
callq 0x3040
cmpl $0x1, %ebx
jle 0x6ae9
movq 0x8(%rbp), %rsi
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x3120
leaq 0xd0(%rsp), %r14
leaq 0x2f8(%rsp), %r15
leaq 0x8f9a(%rip), %r12      # 0xfa25
movq 0xf0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31a0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6b5c
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq %r15, %rdi
callq 0x3080
movq %r15, %rdi
movq %r12, %rsi
callq 0x3320
jmp 0x6a8b
movq 0xe4e8(%rip), %rbx      # 0x14fd8
leaq 0xd0(%rsp), %r14
leaq 0x2f8(%rsp), %r15
leaq 0x8f1e(%rip), %r12      # 0xfa25
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31a0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6b69
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq %r15, %rdi
callq 0x3080
movq %r15, %rdi
movq %r12, %rsi
callq 0x3320
jmp 0x6b07
leaq 0xf0(%rsp), %rdi
callq 0x3040
leaq 0x80(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0xbcca
leaq 0x80(%rsp), %rdi
callq 0xc36a
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x4f8a
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x6bb4
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x6bc3
callq 0x9e7a
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bde
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x80(%rsp), %rdi
callq 0x9c26
leaq 0xf0(%rsp), %rdi
callq 0x3050
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x6c1d
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x2f8(%rsp), %rdi
leaq 0x308(%rsp), %rax
cmpq %rax, %rdi
je 0x6c42
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6c51
callq 0x9e7a
xorl %eax, %eax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x7037
jmp 0x6cd0
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x9c26
jmp 0x70a9
jmp 0x70a6
movq %rax, %rbx
jmp 0x70b6
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6d07
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6d4e
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6e1c
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6e63
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6eaa
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6ef1
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6f38
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6f7f
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x6fc3
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x701f
jmp 0x7037
jmp 0x709b
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9a64
jmp 0x7000
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x701f
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x7100
movq 0x20(%rsp), %rsi
jmp 0x70f8
movq %rax, %rdi
callq 0x9c1b
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
jmp 0x7065
jmp 0x7081
jmp 0x709b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x7084
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
jmp 0x7084
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x7100
movq 0x100(%rsp), %rsi
jmp 0x70f8
movq %rax, %rbx
jmp 0x7100
jmp 0x70a6
jmp 0x70a6
jmp 0x70a6
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x3050
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x70db
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x2f8(%rsp), %rdi
leaq 0x308(%rsp), %rax
cmpq %rax, %rdi
je 0x7100
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x710f
callq 0x9e7a
movq %rbx, %rdi
callq 0x32d0
nop