// File: /workspace/github_cpp_makefile_star2_O1/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 0x3fa8a
leaq 0xe0(%rbx), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x40340
movq %r15, -0x70(%rbp)
leaq 0xe8(%rbx), %rcx
cmpq %rcx, %rax
jne 0x3f60b
movq (%rbx), %r15
movq (%r14), %r13
leaq -0xb8(%rbp), %rsi
movq %r12, %rdi
callq 0x3fcaa
movq %r15, (%rax)
movq %r13, 0x8(%rax)
cmpq $-0x1, (%r14)
je 0x3f38b
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x5b87(%rip), %rsi      # 0x44e99
leaq 0x5b85(%rip), %rdx      # 0x44e9e
leaq -0x68(%rbp), %rdi
callq 0xf65c
movq (%rbx), %r12
movl $0x1, %esi
cmpq $0xa, %r12
jb 0x3f41a
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x3f413
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x3f418
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x3f41a
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x3f346
addl $-0x3, %esi
jmp 0x3f41a
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x5aff(%rip), %rsi      # 0x44e99
leaq 0x5afd(%rip), %rdx      # 0x44e9e
leaq -0x68(%rbp), %rdi
callq 0xf65c
movq (%rbx), %r12
movl $0x1, %esi
cmpq $0xa, %r12
jb 0x3f539
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x3f532
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x3f537
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x3f539
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x3f3ce
addl $-0x3, %esi
jmp 0x3f539
addl $-0x2, %esi
jmp 0x3f41a
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 0xede8
movq (%r14), %r12
movl $0x1, %esi
cmpq $0xa, %r12
jb 0x3f49b
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x3f494
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x3f499
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x3f49b
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x3f45e
addl $-0x3, %esi
jmp 0x3f49b
addl $-0x2, %esi
jmp 0x3f49b
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 0xede8
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 0x3d02c
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
leaq -0x38(%rbp), %r15
je 0x3f50a
callq 0x42b0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x3f518
callq 0x42b0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x3f526
callq 0x42b0
movq -0x98(%rbp), %r14
jmp 0x3f5d5
addl $-0x2, %esi
jmp 0x3f539
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 0xede8
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x9235(%rip), %rsi      # 0x487a1
leaq 0x9235(%rip), %rdx      # 0x487a8
leaq -0x90(%rbp), %rdi
callq 0xf65c
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 0x3d02c
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3f5b5
callq 0x42b0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
leaq -0x58(%rbp), %r15
je 0x3f5c7
callq 0x42b0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3f5d5
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 0x3f5f6
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), %r12
movq %r12, -0x10(%r12)
leaq 0x945a(%rip), %rsi      # 0x48a82
leaq 0x9469(%rip), %rdx      # 0x48a98
leaq -0x68(%rbp), %rdi
callq 0xf65c
movb $0x1, %r15b
leaq -0x68(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x33d12
xorl %r15d, %r15d
leaq 0x1c71d(%rip), %rsi     # 0x5bd70
leaq -0x312a0(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3f67b
callq 0x42b0
jmp 0x3f67b
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3f68e
callq 0x42b0
jmp 0x3f68e
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
jne 0x3f703
jmp 0x3f711
jmp 0x3f70e
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x3f6b8
callq 0x42b0
jmp 0x3f6b8
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0x3f711
movq %r14, %rdi
callq 0x4250
jmp 0x3f711
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3f6e0
callq 0x42b0
jmp 0x3f6e0
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3f6fa
callq 0x42b0
jmp 0x3f6fa
movq %r15, %r14
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x3f711
callq 0x42b0
jmp 0x3f711
jmp 0x3f70e
jmp 0x3f70e
movq %rax, %rbx
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f726
callq 0x42b0
movq %rbx, %rdi
callq 0x4560