// File: bsegovia[P]boodew/boodew.cpp
// Function: boodew::getvar(std::vector<boodew::value, std::allocator<boodew::value>> const&)
static value getvar(args arg) {
  const auto key = vtos(get(arg,1));
  for (auto it = unique<stack>()->rbegin(); it != unique<stack>()->rend(); ++it) {
    auto local = it->find(key);
    if (local != it->end()) return local->second;
  }
  const auto it = unique<cvar_map>()->find(key);
  if (it != unique<cvar_map>()->end()) return it->second();
  throw boodew_exception(format("unknown identifier %s", key.c_str()));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x4d70
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x4ba0
callq 0xd250
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0xff00
callq 0xd250
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0xff80
movq -0xc0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xff50
movb %al, -0xb1(%rbp)
jmp 0x61ff
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x620e
jmp 0x62c6
leaq -0x38(%rbp), %rdi
callq 0xffd0
movq %rax, -0xc8(%rbp)
jmp 0x6220
movq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10010
movq %rax, -0xd0(%rbp)
jmp 0x6239
movq -0xd0(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xffd0
movq %rax, -0xd8(%rbp)
jmp 0x6256
movq -0xd8(%rbp), %rdi
callq 0x10070
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x10040
testb $0x1, %al
jne 0x6279
jmp 0x62b4
leaq -0x58(%rbp), %rdi
callq 0xee70
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0xd060
jmp 0x6297
movl $0x1, -0x64(%rbp)
jmp 0x6405
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x641e
jmp 0x62b6
leaq -0x38(%rbp), %rdi
callq 0x100a0
jmp 0x62c1
jmp 0x61cf
callq 0xc410
movq %rax, -0xe0(%rbp)
jmp 0x62d4
movq -0xe0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x100d0
movq %rax, -0xe8(%rbp)
jmp 0x62ed
movq -0xe8(%rbp), %rax
movq %rax, -0x70(%rbp)
callq 0xc410
movq %rax, -0xf0(%rbp)
jmp 0x6306
movq -0xf0(%rbp), %rdi
callq 0x10130
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x10100
testb $0x1, %al
jne 0x6329
jmp 0x6353
leaq -0x70(%rbp), %rdi
callq 0x10160
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x10190
jmp 0x6347
movl $0x1, -0x64(%rbp)
jmp 0x6405
movb $0x1, -0x99(%rbp)
movl $0x28, %edi
callq 0x3120
movq %rax, -0xf8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x30e0
movq %rax, %rdx
leaq 0xffdd(%rip), %rsi      # 0x1635b
xorl %eax, %eax
leaq -0x98(%rbp), %rdi
callq 0x4980
jmp 0x638e
movq -0xf8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xc140
jmp 0x63a3
movq -0xf8(%rbp), %rdi
movb $0x0, -0x99(%rbp)
leaq 0x1c7f0(%rip), %rsi     # 0x22ba8
leaq 0x5df1(%rip), %rdx      # 0xc1b0
callq 0x33f0
jmp 0x6430
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x63ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3180
testb $0x1, -0x99(%rbp)
jne 0x63f7
jmp 0x6403
movq -0xf8(%rbp), %rdi
callq 0x31e0
jmp 0x641e
leaq -0x30(%rbp), %rdi
callq 0x3180
movq -0xa8(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x3180
movq -0x48(%rbp), %rdi
callq 0x3400