// File: /workspace/github_cpp_makefile_star2_O3/acliusBackHome[P]kamaya/dist/IR.cpp
// Function: IR::allocEmit(unsigned long const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long const&, unsigned long const&)
size_t IR::allocEmit(const size_t &scope, const string &symbol,
                     const size_t &size, const size_t &node_id) {
  // 变量内存分配, 返回地址
  const string key = formKey(scope, symbol);
  if (allocMap.find(key) != allocMap.end()) {
    throw ParseException(ExceptionCode::EX_UNKNOWN, "bad alloc for same var");
    return (size_t)-1;
  }
  allocMap[key] = Alloc{offset, size};
  if (size != (size_t)-1) {
    gen("alloc", to_string(offset), to_string(size), key, node_id);
  } else {
    gen("alloc", to_string(offset), "BadWide", key, node_id);
  }
  size_t ret = offset;
  addOffset(size);
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq -0xb8(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3f0c6
leaq 0xe0(%rbx), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x3f97a
movq %r15, -0x70(%rbp)
leaq 0xe8(%rbx), %rcx
cmpq %rcx, %rax
jne 0x3ec4b
movq (%rbx), %r15
movq (%r14), %r13
leaq -0xb8(%rbp), %rsi
movq %r12, %rdi
callq 0x3f2e6
movq %r15, (%rax)
movq %r13, 0x8(%rax)
cmpq $-0x1, (%r14)
je 0x3e9cb
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x5547(%rip), %rsi      # 0x43e99
leaq 0x5545(%rip), %rdx      # 0x43e9e
leaq -0x68(%rbp), %rdi
callq 0xf868
movq (%rbx), %r12
movl $0x1, %esi
cmpq $0xa, %r12
jb 0x3ea5a
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x3ea53
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x3ea58
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x3ea5a
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x3e986
addl $-0x3, %esi
jmp 0x3ea5a
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x54bf(%rip), %rsi      # 0x43e99
leaq 0x54bd(%rip), %rdx      # 0x43e9e
leaq -0x68(%rbp), %rdi
callq 0xf868
movq (%rbx), %r12
movl $0x1, %esi
cmpq $0xa, %r12
jb 0x3eb79
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x3eb72
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x3eb77
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x3eb79
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x3ea0e
addl $-0x3, %esi
jmp 0x3eb79
addl $-0x2, %esi
jmp 0x3ea5a
decl %esi
movl %esi, %esi
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq 0x4360
movq -0x48(%rbp), %rdi
movl -0x40(%rbp), %esi
movq %r12, %rdx
callq 0xefce
movq (%r14), %r12
movl $0x1, %esi
cmpq $0xa, %r12
jb 0x3eadb
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x3ead4
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x3ead9
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x3eadb
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x3ea9e
addl $-0x3, %esi
jmp 0x3eadb
addl $-0x2, %esi
jmp 0x3eadb
decl %esi
movq %r14, -0x98(%rbp)
movq %r15, %r14
movl %esi, %esi
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
leaq -0x90(%rbp), %rdi
xorl %edx, %edx
callq 0x4360
leaq -0x90(%rbp), %r13
movq (%r13), %rdi
movl 0x8(%r13), %esi
movq %r12, %rdx
callq 0xefce
movq -0x70(%rbp), %rax
movq (%rax), %r9
leaq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0xb8(%rbp), %r8
movq %rbx, %rdi
movq %r13, %rcx
callq 0x3c6c0
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
leaq -0x38(%rbp), %r15
je 0x3eb4a
callq 0x42b0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x3eb58
callq 0x42b0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x3eb66
callq 0x42b0
movq -0x98(%rbp), %r14
jmp 0x3ec15
addl $-0x2, %esi
jmp 0x3eb79
decl %esi
movl %esi, %esi
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq 0x4360
movq -0x48(%rbp), %rdi
movl -0x40(%rbp), %esi
movq %r12, %rdx
callq 0xefce
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x8bf5(%rip), %rsi      # 0x477a1
leaq 0x8bf5(%rip), %rdx      # 0x477a8
leaq -0x90(%rbp), %rdi
callq 0xf868
movq -0x70(%rbp), %rax
movq (%rax), %r9
leaq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x90(%rbp), %rcx
leaq -0xb8(%rbp), %r8
movq %rbx, %rdi
callq 0x3c6c0
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3ebf5
callq 0x42b0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
leaq -0x58(%rbp), %r15
je 0x3ec07
callq 0x42b0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3ec15
callq 0x42b0
movq (%rbx), %r15
movq (%r14), %rax
addq %r15, %rax
movq %rax, (%rbx)
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ec36
callq 0x42b0
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x8e1b(%rip), %rsi      # 0x47a82
leaq 0x8e2a(%rip), %rdx      # 0x47a98
leaq -0x68(%rbp), %rdi
callq 0xf868
movb $0x1, %r12b
leaq -0x68(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x333ee
xorl %r12d, %r12d
leaq 0x1c0de(%rip), %rsi     # 0x5ad70
leaq -0x306f9(%rip), %rdx    # 0xe5a0
movq %r14, %rdi
callq 0x4540
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3ecba
callq 0x42b0
jmp 0x3ecba
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3eccd
callq 0x42b0
jmp 0x3eccd
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
jne 0x3ed3f
jmp 0x3ed4d
jmp 0x3ed4a
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3ecef
callq 0x42b0
testb %r12b, %r12b
jne 0x3ecf9
jmp 0x3ed4d
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
jmp 0x3ed4d
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3ed1c
callq 0x42b0
jmp 0x3ed1c
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3ed36
callq 0x42b0
jmp 0x3ed36
movq %r15, %r14
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x3ed4d
callq 0x42b0
jmp 0x3ed4d
jmp 0x3ed4a
jmp 0x3ed4a
movq %rax, %rbx
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ed62
callq 0x42b0
movq %rbx, %rdi
callq 0x4560