// File: /workspace/github_cpp_makefile_star2_O1/bsegovia[P]boodew/boodew.cpp
// Function: boodew::expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, unsigned long)
static pair<value,size_t> expr(const string &s, char c, size_t curr) {
  const char *match = c=='['?"[]@":"()";
  stringstream ss;
  size_t opened = 1, next = curr;
  while (opened) {
    if ((next = s.find_first_of(match,next+1)) == string::npos)
      throw boodew_exception(format("missing %c", c=='['?']':')'));
    if (c == '[' && s[next] == '@') {
      ss << s.substr(curr+1, next-curr-1);
      if (s[next+1] == '(') {
        const auto v = expr(s, '(', next+1);
        ss << vtos(v.first);
        if (s[v.second]!=']'||opened!=1) ss << s[v.second];
        curr = v.second;
        next = curr > 0 ? curr-1 : 0;
      } else
        do ss << s[curr = ++next]; while (s[next] == '@');
    } else
      opened += s[next] == c ? +1 : -1;
  }
  if (next>curr) ss << s.substr(curr+1, next-curr-1);
  return make_pair((c=='[' ? stov(ss.str()) : ex(ss.str())), next+1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rcx, %rbp
movq %rsi, %r15
movq %rdi, 0x68(%rsp)
xorl %ebx, %ebx
movl %edx, 0x4(%rsp)
cmpb $0x5b, %dl
sete %bl
leaq 0x43af(%rip), %rax      # 0xa0d8
leaq 0x43ac(%rip), %rcx      # 0xa0dc
cmoveq %rax, %rcx
movq %rcx, 0x78(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x3160
movq %rbx, 0x60(%rsp)
orq $0x2, %rbx
movq %rbx, 0x70(%rsp)
leaq 0xb0(%rsp), %rbx
movl $0x1, %r13d
leaq 0x28(%rsp), %r12
movq %rbp, %r14
incq %rbp
movq %r15, %rdi
movq 0x78(%rsp), %rsi
movq %rbp, %rdx
movq 0x70(%rsp), %rcx
callq 0x32b0
cmpq $-0x1, %rax
je 0x6062
movq %rax, %rbp
cmpb $0x5b, 0x4(%rsp)
jne 0x5edb
movq (%r15), %rax
cmpb $0x40, (%rax,%rbp)
jne 0x5edb
leaq 0x1(%r14), %rdx
notq %r14
addq %rbp, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x3220
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x3240
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5ded
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
movq (%r15), %rax
cmpb $0x28, 0x1(%rax,%rbp)
jne 0x5eaa
incq %rbp
movq %r12, %rdi
movq %r15, %rsi
movl $0x28, %edx
movq %rbp, %rcx
callq 0x5cfa
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x47da
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3240
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5e4c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x58(%rsp), %rax
movq (%r15), %rcx
movb (%rcx,%rax), %al
cmpq $0x1, %r13
jne 0x5e61
cmpb $0x5d, %al
je 0x5e77
movb %al, 0x8(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x3240
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %r14
movq %r14, %rbp
subq $0x1, %rbp
movl $0x0, %eax
cmovbq %rax, %rbp
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5eef
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x5eef
movq (%r15), %rax
movb 0x1(%rax,%rbp), %al
movb %al, 0x28(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3240
movq (%r15), %rax
leaq 0x1(%rbp), %r14
cmpb $0x40, 0x1(%rax,%rbp)
movq %r14, %rbp
je 0x5eaa
movq %r14, %rbp
jmp 0x5eef
movq (%r15), %rax
xorl %ecx, %ecx
movl 0x4(%rsp), %edx
cmpb %dl, (%rax,%rbp)
sete %cl
leaq -0x1(%r13,%rcx,2), %r13
testq %r13, %r13
jne 0x5d6a
cmpq %r14, %rbp
leaq 0x38(%rsp), %r12
jbe 0x5f4a
leaq 0x1(%r14), %rdx
notq %r14
addq %rbp, %r14
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x3220
leaq 0xb0(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x3240
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f4a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0xb8(%rsp), %rsi
cmpb $0x5b, 0x4(%rsp)
jne 0x5f9a
leaq 0x8(%rsp), %rdi
callq 0x32d0
movq 0x68(%rsp), %rbx
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
callq 0x71b2
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movl $0x0, 0x54(%rsp)
jmp 0x5fb8
leaq 0x8(%rsp), %rdi
callq 0x32d0
movq 0x68(%rsp), %rbx
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x54e9
incq %rbp
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x28(%rsp), %rcx
cmpq %r12, %rcx
je 0x5fda
movq %rcx, (%rbx)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x5fe2
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r12, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rbp, 0x30(%rbx)
cmpb $0x5b, 0x4(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x602c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x8f75(%rip), %rsi      # 0xefa8
leaq 0xa0(%rsp), %rdi
callq 0x3190
leaq 0x120(%rsp), %rdi
callq 0x30a0
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x30f0
movq %rax, %r14
cmpb $0x5b, 0x4(%rsp)
movl $0x5d, %eax
movl $0x29, %edx
cmovel %eax, %edx
leaq 0x4057(%rip), %rsi      # 0xa0df
leaq 0x80(%rsp), %rdi
xorl %eax, %eax
callq 0x45ec
movb $0x1, %bpl
leaq 0x80(%rsp), %rsi
movq %r14, %rdi
callq 0x6f8c
xorl %ebp, %ebp
leaq 0x8b05(%rip), %rsi      # 0xebb8
leaq 0xf1c(%rip), %rdx       # 0x6fd6
movq %r14, %rdi
callq 0x32f0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x60e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x60e8
jmp 0x60e5
movq %rax, %rbx
cmpb $0x5b, 0x4(%rsp)
jne 0x6117
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6117
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x6117
movq %rax, %rbx
movb $0x1, %al
movq %rax, 0x60(%rsp)
cmpb $0x0, 0x60(%rsp)
jmp 0x61c0
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
jne 0x6171
jmp 0x61c0
jmp 0x61bd
jmp 0x615f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6162
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x6162
jmp 0x615f
jmp 0x61bd
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x61c0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x61c0
jmp 0x61bd
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x61ae
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x61ae
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x61c0
movq %r14, %rdi
callq 0x3180
jmp 0x61c0
movq %rax, %rbx
movq 0x8de1(%rip), %rsi      # 0xefa8
leaq 0xa0(%rsp), %rdi
callq 0x3190
leaq 0x120(%rsp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x3300
nop