// File: /workspace/github_cpp_makefile_star2_O1/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 0x6f26
leaq 0x100(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9e06(%rip), %rsi      # 0xf493
leaq 0x9e03(%rip), %rdx      # 0xf497
leaq 0xf0(%rsp), %rdi
callq 0xa240
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9d9f(%rip), %rsi      # 0xf450
leaq 0x9d9f(%rip), %rdx      # 0xf457
leaq 0x10(%rsp), %rdi
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x56ee
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x570b
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9d89(%rip), %rsi      # 0xf4a6
leaq 0x9d87(%rip), %rdx      # 0xf4ab
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9d20(%rip), %rsi      # 0xf458
leaq 0x9d20(%rip), %rdx      # 0xf45f
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5770
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x578d
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9cc1(%rip), %rsi      # 0xf460
leaq 0x9cbc(%rip), %rdx      # 0xf462
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9ca9(%rip), %rsi      # 0xf463
leaq 0x9cc2(%rip), %rdx      # 0xf483
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x57f2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x580f
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9c63(%rip), %rsi      # 0xf484
leaq 0x9c5f(%rip), %rdx      # 0xf487
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9c4c(%rip), %rsi      # 0xf488
leaq 0x9c54(%rip), %rdx      # 0xf497
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5874
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5891
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9bf5(%rip), %rsi      # 0xf498
leaq 0x9bf1(%rip), %rdx      # 0xf49b
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9bde(%rip), %rsi      # 0xf49c
leaq 0x9be6(%rip), %rdx      # 0xf4ab
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x58f6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5913
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9b87(%rip), %rsi      # 0xf4ac
leaq 0x9b82(%rip), %rdx      # 0xf4ae
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9b6f(%rip), %rsi      # 0xf4af
leaq 0x9b76(%rip), %rdx      # 0xf4bd
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5978
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5995
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9b17(%rip), %rsi      # 0xf4be
leaq 0x9b11(%rip), %rdx      # 0xf4bf
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9afe(%rip), %rsi      # 0xf4c0
leaq 0x9b13(%rip), %rdx      # 0xf4dc
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x59fa
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5a17
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9ab7(%rip), %rsi      # 0xf4dd
leaq 0x9ab1(%rip), %rdx      # 0xf4de
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x1e2d(%rip), %rax      # 0x7874
movq %rax, 0x18(%rsi)
leaq 0x1f02(%rip), %rax      # 0x7954
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5a97
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5aa9
callq 0x9f9e
leaq 0x110(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x5acb
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5aea
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5b01
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x99cf(%rip), %rsi      # 0xf4df
leaq 0x99c9(%rip), %rdx      # 0xf4e0
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x1f55(%rip), %rax      # 0x7a86
movq %rax, 0x18(%rsi)
leaq 0x202a(%rip), %rax      # 0x7b66
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5b81
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5b93
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5bb0
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5bcf
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5be6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x98ec(%rip), %rsi      # 0xf4e1
leaq 0x98e6(%rip), %rdx      # 0xf4e2
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2084(%rip), %rax      # 0x7c9a
movq %rax, 0x18(%rsi)
leaq 0x2159(%rip), %rax      # 0x7d7a
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5c66
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5c78
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5c95
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5cb4
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5ccb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9809(%rip), %rsi      # 0xf4e3
leaq 0x9803(%rip), %rdx      # 0xf4e4
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x21bb(%rip), %rax      # 0x7eb6
movq %rax, 0x18(%rsi)
leaq 0x2290(%rip), %rax      # 0x7f96
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5d4b
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5d5d
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5d7a
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5d99
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5db0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9726(%rip), %rsi      # 0xf4e5
leaq 0x9722(%rip), %rdx      # 0xf4e8
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x22ea(%rip), %rax      # 0x80ca
movq %rax, 0x18(%rsi)
leaq 0x23bf(%rip), %rax      # 0x81aa
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5e30
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5e42
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5e5f
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5e7e
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5e95
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9645(%rip), %rsi      # 0xf4e9
leaq 0x9640(%rip), %rdx      # 0xf4eb
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2419(%rip), %rax      # 0x82de
movq %rax, 0x18(%rsi)
leaq 0x24ee(%rip), %rax      # 0x83be
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5f15
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x5f27
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f44
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x5f63
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x5f7a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9595(%rip), %rsi      # 0xf51e
leaq 0x958f(%rip), %rdx      # 0xf51f
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x25f4(%rip), %rax      # 0x859e
movq %rax, 0x18(%rsi)
leaq 0x26c9(%rip), %rax      # 0x867e
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x5ffa
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x600c
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x6029
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6048
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x605f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x947e(%rip), %rsi      # 0xf4ec
leaq 0x9479(%rip), %rdx      # 0xf4ee
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x27cf(%rip), %rax      # 0x885e
movq %rax, 0x18(%rsi)
leaq 0x28a4(%rip), %rax      # 0x893e
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x60df
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x60f1
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x610e
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x612d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6144
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9399(%rip), %rsi      # 0xf4ef
leaq 0x9396(%rip), %rdx      # 0xf4f3
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9383(%rip), %rsi      # 0xf4f4
leaq 0x938a(%rip), %rdx      # 0xf502
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x61a9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x61c6
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x932b(%rip), %rsi      # 0xf503
leaq 0x9326(%rip), %rdx      # 0xf505
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9313(%rip), %rsi      # 0xf506
leaq 0x931e(%rip), %rdx      # 0xf518
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x622b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6248
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x92f0(%rip), %rsi      # 0xf54a
leaq 0x92ea(%rip), %rdx      # 0xf54b
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x92a4(%rip), %rsi      # 0xf519
leaq 0x92a3(%rip), %rdx      # 0xf51f
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x62ad
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x62ca
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9249(%rip), %rsi      # 0xf525
leaq 0x9244(%rip), %rdx      # 0xf527
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9229(%rip), %rsi      # 0xf520
leaq 0x9229(%rip), %rdx      # 0xf527
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x632f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x634c
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x91ca(%rip), %rsi      # 0xf528
leaq 0x91c6(%rip), %rdx      # 0xf52b
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x91b3(%rip), %rsi      # 0xf52c
leaq 0x91c8(%rip), %rdx      # 0xf548
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x63b1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x63ce
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9169(%rip), %rsi      # 0xf549
leaq 0x9164(%rip), %rdx      # 0xf54b
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9151(%rip), %rsi      # 0xf54c
leaq 0x9160(%rip), %rdx      # 0xf562
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6433
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6450
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x9101(%rip), %rsi      # 0xf563
leaq 0x90ff(%rip), %rdx      # 0xf568
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x90ec(%rip), %rsi      # 0xf569
leaq 0x90eb(%rip), %rdx      # 0xf56f
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x64b5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x64d2
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x908c(%rip), %rsi      # 0xf570
leaq 0x9089(%rip), %rdx      # 0xf574
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x9076(%rip), %rsi      # 0xf575
leaq 0x907d(%rip), %rdx      # 0xf583
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6537
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6554
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0xf0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x901e(%rip), %rsi      # 0xf584
leaq 0x901d(%rip), %rdx      # 0xf58a
callq 0xa240
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8fef(%rip), %rsi      # 0xf570
leaq 0x8fec(%rip), %rdx      # 0xf574
callq 0xa240
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3fbc
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x65b9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x65d6
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8fa6(%rip), %rsi      # 0xf58b
leaq 0x8fa6(%rip), %rdx      # 0xf592
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2518(%rip), %rax      # 0x8b1e
movq %rax, 0x18(%rsi)
leaq 0x2797(%rip), %rax      # 0x8da8
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x6656
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x6668
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x6685
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x66a4
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x66bb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8ec9(%rip), %rsi      # 0xf593
leaq 0x8ec9(%rip), %rdx      # 0xf59a
callq 0xa240
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2e6d(%rip), %rax      # 0x9558
movq %rax, 0x18(%rsi)
leaq 0x3056(%rip), %rax      # 0x974c
movq %rax, 0x10(%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x9c96
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x408c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x673b
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x674d
callq 0x9f9e
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x676a
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6789
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x67a0
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 0x8dce(%rip), %rsi      # 0xf59b
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x3300
leaq 0xd0(%rsp), %r15
leaq 0x2f8(%rsp), %r12
leaq 0x929c(%rip), %r13      # 0xfa95
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 0x6853
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq %r12, %rdi
callq 0x3080
movq %r12, %rdi
movq %r13, %rsi
callq 0x3320
jmp 0x67f9
leaq 0xf0(%rsp), %rdi
callq 0x3040
cmpl $0x1, %ebx
jle 0x68f7
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 0x91fc(%rip), %r12      # 0xfa95
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 0x696a
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq %r15, %rdi
callq 0x3080
movq %r15, %rdi
movq %r12, %rsi
callq 0x3320
jmp 0x6899
movq 0xe6da(%rip), %rbx      # 0x14fd8
leaq 0xd0(%rsp), %r14
leaq 0x2f8(%rsp), %r15
leaq 0x9180(%rip), %r12      # 0xfa95
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 0x6977
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq %r15, %rdi
callq 0x3080
movq %r15, %rdi
movq %r12, %rsi
callq 0x3320
jmp 0x6915
leaq 0xf0(%rsp), %rdi
callq 0x3040
leaq 0x80(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0xbdf4
leaq 0x80(%rsp), %rdi
callq 0xc494
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x4d7f
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x69c2
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x69d1
callq 0x9f9e
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x69ec
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x80(%rsp), %rdi
callq 0x9d54
leaq 0xf0(%rsp), %rdi
callq 0x3050
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x6a2b
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x2f8(%rsp), %rdi
leaq 0x308(%rsp), %rax
cmpq %rax, %rdi
je 0x6a50
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6a5f
callq 0x9f9e
xorl %eax, %eax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6e45
jmp 0x6ade
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x9d54
jmp 0x6eb7
jmp 0x6eb4
movq %rax, %rbx
jmp 0x6ec4
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6b15
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6b5c
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6c2a
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6c71
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6cb8
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6cff
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6d46
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6d8d
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6dd1
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6e2d
jmp 0x6e45
jmp 0x6ea9
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x9b88
jmp 0x6e0e
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x6e2d
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6f0e
movq 0x20(%rsp), %rsi
jmp 0x6f06
movq %rax, %rdi
callq 0x9d49
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
jmp 0x6e73
jmp 0x6e8f
jmp 0x6ea9
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6e92
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
jmp 0x6e92
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6f0e
movq 0x100(%rsp), %rsi
jmp 0x6f06
movq %rax, %rbx
jmp 0x6f0e
jmp 0x6eb4
jmp 0x6eb4
jmp 0x6eb4
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x3050
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x6ee9
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x2f8(%rsp), %rdi
leaq 0x308(%rsp), %rax
cmpq %rax, %rdi
je 0x6f0e
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6f1d
callq 0x9f9e
movq %rbx, %rdi
callq 0x32d0
nop