// File: /workspace/github_cpp_makefile_star2_O3/bsegovia[P]boodew/boodew.cpp
// Function: boodew::ex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
static value ex(const string &s, size_t curr) {
  value ret, id;
  bool running = true;
  while (running) {
    vector<value> tok;
    for (;;) {
      const auto next = s.find_first_of("; \r\t\n[(", curr);
      const auto last = next == string::npos ? s.size() : next;
      const auto len = last-curr;
      const auto c = s[last];
      if (len!=0) tok.push_back(stov(s.substr(curr,len)));
      if (c == '(' || c == '[') {
        const auto v = expr(s, c, curr);
        tok.push_back(v.first);
        curr = v.second;
      } else if (c == ';' || c == '\n') {curr=last+1; break;}
      else if (c == '\0') {curr=last; running=false; break;}
      else curr=last+1;
    }

    if (tok.size() == 0) return btov(false);
    auto const it = unique<builtinmap>()->find(vtos(tok[0]));
    if (it!=unique<builtinmap>()->end()) // try to call a builtin
      ret = it->second(tok);
    else if (tok.size() == 1 && vtos(tok[0]) == s) return stov(s); // literals
    else { // function call
      scope frame;
      for (size_t i = 1; i < tok.size(); ++i) new_local(to_string(i-1),tok[i]);
      ret = ex(vtos(tok[0]));
    }
  }
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r14
movq %rdi, 0x88(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ebx, %ebx
movq %rbx, -0x8(%rax)
movb %bl, (%rax)
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbx, -0x8(%rax)
movb %bl, (%rax)
leaq 0x40(%rsp), %r15
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, %rbp
movl $0x7, %ecx
movq %r14, %rdi
leaq 0x4c35(%rip), %rsi      # 0xa0d0
movq %rbp, %rdx
callq 0x32b0
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0x54b0
movq 0x8(%r14), %rbx
movq (%r14), %rax
movzbl (%rax,%rbx), %r13d
movq %rbx, %rcx
subq %rbp, %rcx
je 0x5544
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x3220
movq %r15, 0x30(%rsp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x7070
movq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
movl $0x0, 0x5c(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7d26
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x5528
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5544
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl $0x3a, %r13d
jg 0x5552
cmpl $0x28, %r13d
je 0x5558
jmp 0x559c
cmpl $0x5b, %r13d
jne 0x55a9
movsbl %r13b, %edx
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rcx
callq 0x5c00
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7c0a
movq 0x30(%rsp), %rdi
movq 0x60(%rsp), %rbp
cmpq %r15, %rdi
je 0x548c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x548c
testl %r13d, %r13d
je 0x55bf
cmpl $0xa, %r13d
jne 0x55af
jmp 0x55b7
cmpl $0x3b, %r13d
je 0x55b7
incq %rbx
jmp 0x5489
incq %rbx
movb $0x1, %r13b
jmp 0x55c2
xorl %r13d, %r13d
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x5905
callq 0x6ec3
movq %rax, %rbp
movq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x477f
movq %rbp, %rdi
movq %r12, %rsi
callq 0x828e
movq %rax, %rbp
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x560c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
callq 0x6ec3
testq %rbp, %rbp
je 0x5674
cmpq $0x0, 0x38(%rbp)
je 0x5a0a
movq %rbp, %rsi
addq $0x28, %rsi
movq %r12, %rdi
leaq 0x10(%rsp), %rdx
callq *0x40(%rbp)
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0x3260
movups 0x10(%r15), %xmm0
leaq 0xa8(%rsp), %rax
movups %xmm0, 0x10(%rax)
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x58bd
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x58bd
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
cmpq $0x30, %rax
movl %r13d, 0x94(%rsp)
jne 0x56ea
movq %r12, %rdi
callq 0x477f
movq 0x38(%rsp), %rdx
cmpq 0x8(%r14), %rdx
jne 0x56bf
movq 0x30(%rsp), %rbp
testq %rdx, %rdx
je 0x56c9
movq (%r14), %rsi
movq %rbp, %rdi
callq 0x3210
testl %eax, %eax
sete %r13b
jmp 0x56cc
movq 0x30(%rsp), %rbp
xorl %r13d, %r13d
jmp 0x56cc
movb $0x1, %r13b
cmpq %r15, %rbp
je 0x56e1
movq 0x40(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x3200
testb %r13b, %r13b
jne 0x59d1
leaq 0xf(%rsp), %rdi
callq 0x7c60
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq $0x2, %rax
leaq 0x68(%rsp), %rbp
jb 0x5838
movl $0x1, %r13d
leaq -0x1(%r13), %rbp
movl $0x1, %esi
cmpq $0xb, %r13
jb 0x5786
movl $0x4, %esi
movq %rbp, %rcx
cmpq $0x63, %rcx
jbe 0x577f
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x5784
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x5786
movq %rcx, %rax
movabsq $0x346dc5d63886594b, %rdx # imm = 0x346DC5D63886594B
mulq %rdx
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x573f
addl $-0x3, %esi
jmp 0x5786
addl $-0x2, %esi
jmp 0x5786
decl %esi
movl %esi, %esi
movq %r15, 0x30(%rsp)
movq %r12, %rdi
xorl %edx, %edx
callq 0x3250
movq 0x30(%rsp), %rdi
movl 0x38(%rsp), %esi
movq %rbp, %rdx
callq 0x838a
leaq (,%r13,2), %rdx
addq %r13, %rdx
shlq $0x4, %rdx
addq 0x10(%rsp), %rdx
leaq 0xf8(%rsp), %rdi
movq %r12, %rsi
callq 0x5b33
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
leaq 0x68(%rsp), %rbp
je 0x57f6
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x580d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
incq %r13
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rax, %r13
jb 0x5728
movq %rbp, %rdi
callq 0x477f
movq %r12, %rdi
movq %rbp, %rsi
callq 0x542c
movl 0x94(%rsp), %r13d
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0x3260
movups 0x10(%r15), %xmm0
leaq 0xa8(%rsp), %rax
movups %xmm0, 0x10(%rax)
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x588b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x58a7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
callq 0x729b
movq 0x8(%rax), %rdi
addq $-0x38, %rdi
movq %rdi, 0x8(%rax)
callq 0x7544
leaq 0x10(%rsp), %rdi
callq 0x7cc8
testb %r13b, %r13b
jne 0x5478
movq 0x88(%rsp), %rsi
leaq 0x10(%rsi), %rax
movq %rax, (%rsi)
movq 0x98(%rsp), %rcx
leaq 0xa8(%rsp), %rdx
cmpq %rdx, %rcx
je 0x593f
movq %rcx, (%rsi)
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsi)
jmp 0x5945
movq 0x88(%rsp), %rcx
leaq 0x10(%rcx), %rax
movq %rax, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movb %al, 0x10(%rcx)
movq %rax, 0x20(%rcx)
movb %al, 0x28(%rcx)
movl $0x2, 0x2c(%rcx)
leaq 0x10(%rsp), %rdi
callq 0x7cc8
leaq 0xd8(%rsp), %rcx
jmp 0x597d
movups (%rdx), %xmm0
movups %xmm0, (%rax)
leaq 0xd8(%rsp), %rcx
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsi)
movq %rdx, 0x98(%rsp)
movq $0x0, 0xa0(%rsp)
movb $0x0, 0xa8(%rsp)
movups 0x10(%rdx), %xmm0
movups %xmm0, 0x20(%rsi)
movq 0xc8(%rsp), %rdi
cmpq %rcx, %rdi
je 0x599a
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x59bf
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x88(%rsp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x7070
movq $0x0, 0x20(%rbx)
movb $0x0, 0x28(%rbx)
movl $0x0, 0x2c(%rbx)
jmp 0x592b
callq 0x30c0
jmp 0x5ad4
jmp 0x5ad4
jmp 0x5ad4
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5a69
movq 0x78(%rsp), %rsi
jmp 0x5a61
jmp 0x5a4a
jmp 0x5ad4
jmp 0x5ad4
jmp 0x5ab8
jmp 0x5ad4
movq %rax, %rbx
jmp 0x5a69
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x5a69
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
callq 0x729b
movq 0x8(%rax), %rdi
addq $-0x38, %rdi
movq %rdi, 0x8(%rax)
callq 0x7544
jmp 0x5ad7
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x5aa2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x5aa2
jmp 0x5ad4
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5ad7
movq 0x78(%rsp), %rsi
jmp 0x5aca
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x5ad7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x5ad7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7cc8
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x5b06
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x5b2b
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3300