// File: /workspace/github_cpp_makefile_star2_O1/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 $0x138, %rsp            # imm = 0x138
movq %rsi, %r14
movq %rdi, 0x60(%rsp)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ebp, %ebp
movq %rbp, -0x8(%rax)
movb %bpl, (%rax)
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbp, -0x8(%rax)
movb %bpl, (%rax)
movb $0x1, 0xe(%rsp)
leaq 0x28(%rsp), %r12
leaq 0x68(%rsp), %r13
movq %r13, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x7, %ecx
movq %r14, %rdi
leaq 0x4b74(%rip), %rsi      # 0xa0d0
movq %rbp, %rdx
callq 0x32b0
movq %rax, %r13
cmpq $-0x1, %rax
jne 0x5571
movq 0x8(%r14), %r13
movq (%r14), %rax
movb (%rax,%r13), %r15b
movq %r13, %rcx
subq %rbp, %rcx
je 0x560c
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x3220
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x71b2
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movl $0x0, 0x54(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7e7a
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x55f0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x560c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
movzbl %r15b, %eax
cmpl $0x27, %eax
jle 0x5668
cmpl $0x5b, %eax
je 0x5624
cmpl $0x3b, %eax
je 0x5671
cmpl $0x28, %eax
jne 0x5681
movsbl %r15b, %edx
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rcx
callq 0x5cfa
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7d60
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %rbp
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5664
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
movb $0x1, %al
jmp 0x5689
testl %eax, %eax
je 0x5678
cmpl $0xa, %eax
jne 0x5681
incq %r13
xorl %eax, %eax
jmp 0x5686
xorl %eax, %eax
movb %r15b, 0xe(%rsp)
jmp 0x5686
incq %r13
movb $0x1, %al
movq %r13, %rbp
testb %al, %al
jne 0x554d
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x59c1
callq 0x7005
movq %rax, %r13
movq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x47da
movq %r13, %rdi
movq %r12, %rsi
callq 0x8402
movq %rax, %r13
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x56e0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
callq 0x7005
testq %r13, %r13
je 0x574f
cmpq $0x0, 0x38(%r13)
je 0x5af6
movq %r13, %rsi
addq $0x28, %rsi
movq %r12, %rdi
leaq 0x10(%rsp), %rdx
callq *0x40(%r13)
leaq 0x88(%rsp), %rdi
movq %r12, %rsi
callq 0x3260
leaq 0x38(%rsp), %rcx
movups 0x10(%rcx), %xmm0
leaq 0xa8(%rsp), %rax
movups %xmm0, (%rax)
movq 0x28(%rsp), %rdi
cmpq %rcx, %rdi
movq %rbx, %r13
je 0x59a2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x59a2
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %r15
subq %rsi, %r15
cmpq $0x30, %r15
jne 0x579e
leaq 0xb8(%rsp), %rdi
callq 0x47da
movq 0xc0(%rsp), %rdx
cmpq 0x8(%r14), %rdx
jne 0x579e
testq %rdx, %rdx
je 0x59b9
movq (%r14), %rsi
movq 0xb8(%rsp), %rdi
callq 0x3210
testl %eax, %eax
sete %r13b
jmp 0x57a1
xorl %r13d, %r13d
cmpq $0x30, %r15
jne 0x57cc
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x57cc
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3200
testb %r13b, %r13b
jne 0x5a18
leaq 0xf(%rsp), %rdi
callq 0x7db6
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
movq %rbx, %r13
jb 0x5922
movl $0x1, %r15d
leaq -0x1(%r15), %r13
movl $0x1, %esi
cmpq $0xb, %r15
jb 0x586f
movl $0x4, %esi
movq %r13, %rcx
cmpq $0x63, %rcx
jbe 0x5868
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x586d
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x586f
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 0x5828
addl $-0x3, %esi
jmp 0x586f
addl $-0x2, %esi
jmp 0x586f
decl %esi
movl %esi, %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r12, %rdi
xorl %edx, %edx
callq 0x3250
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %esi
movq %r13, %rdx
callq 0x84fe
leaq (%r15,%r15,2), %rdx
shlq $0x4, %rdx
addq 0x10(%rsp), %rdx
leaq 0x108(%rsp), %rdi
movq %r12, %rsi
callq 0x5c22
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
movq %rbx, %r13
je 0x58db
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x58f7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
incq %r15
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rax, %r15
jb 0x5811
movq %r13, %rdi
callq 0x47da
movq %r12, %rdi
movq %r13, %rsi
callq 0x54e9
leaq 0x88(%rsp), %rdi
movq %r12, %rsi
callq 0x3260
leaq 0x38(%rsp), %rcx
movups 0x10(%rcx), %xmm0
leaq 0xa8(%rsp), %rax
movups %xmm0, (%rax)
movq 0x28(%rsp), %rdi
cmpq %rcx, %rdi
je 0x5970
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x598c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
callq 0x73e7
movq 0x8(%rax), %rdi
addq $-0x38, %rdi
movq %rdi, 0x8(%rax)
callq 0x7688
leaq 0x10(%rsp), %rdi
callq 0x7e1e
testb $0x1, 0xe(%rsp)
jne 0x5539
jmp 0x59e6
movb $0x1, %r13b
jmp 0x57a1
movq 0x60(%rsp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movb %al, 0x10(%rbx)
movq %rax, 0x20(%rbx)
movb %al, 0x28(%rbx)
movl $0x2, 0x2c(%rbx)
jmp 0x5a49
movq 0x60(%rsp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x88(%rsp), %rcx
leaq 0x98(%rsp), %rdx
cmpq %rdx, %rcx
je 0x5a5d
movq %rcx, (%rbx)
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x5a63
movq 0x60(%rsp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x71b2
movq $0x0, 0x20(%rbx)
movb $0x0, 0x28(%rbx)
movl $0x0, 0x2c(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x7e1e
leaq 0x98(%rsp), %rdx
jmp 0x5a97
movups (%rdx), %xmm0
movups %xmm0, (%rax)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %rdx, 0x88(%rsp)
movq $0x0, 0x90(%rsp)
movb $0x0, 0x98(%rsp)
movups 0xa8(%rsp), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x5ac4
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x98(%rsp), %rdx
movq 0x88(%rsp), %rdi
cmpq %rdx, %rdi
je 0x5ae1
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x30c0
jmp 0x5b86
jmp 0x5b86
movq %rax, %r14
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5b4e
movq 0x78(%rsp), %rsi
jmp 0x5b46
jmp 0x5b2a
jmp 0x5b86
jmp 0x5b86
jmp 0x5b86
jmp 0x5b86
jmp 0x5b66
movq %rax, %r14
jmp 0x5b4e
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5b4e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
callq 0x73e7
movq 0x8(%rax), %rdi
addq $-0x38, %rdi
movq %rdi, 0x8(%rax)
callq 0x7688
jmp 0x5bc6
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5bc6
movq 0x38(%rsp), %rsi
jmp 0x5bbe
jmp 0x5b86
movq %rax, %r14
jmp 0x5baa
movq %rax, %r14
jmp 0x5bc6
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5baa
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5bc6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x10(%rsp), %rdi
callq 0x7e1e
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x5bf5
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x5c1a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3200
movq %r14, %rdi
callq 0x3300