// File: /workspace/github_cpp_makefile_star2_O2/Davidc2525[P]Leaf/compiler/registers/x86_32_register_provider.cpp
// Function: X86_32RegisterProvider::X86_32RegisterProvider()
X86_32RegisterProvider::X86_32RegisterProvider()
{
    string *byte = new string("BYTE");   //8
    string *word = new string("WORD");   //16
    string *dword = new string("DWORD"); //32
    //string *qword = new string("QWORD"); //64

    int counter = 0;

    registers_.push_back(new Register(counter++, new string("ah"), 8, byte));
    registers_.push_back(new Register(counter++, new string("al"), 8, byte));
    registers_.push_back(new Register(counter++, new string("bh"), 8, byte));
    registers_.push_back(new Register(counter++, new string("bl"), 8, byte));
    registers_.push_back(new Register(counter++, new string("ch"), 8, byte));
    registers_.push_back(new Register(counter++, new string("cl"), 8, byte));
    registers_.push_back(new Register(counter++, new string("dh"), 8, byte));
    registers_.push_back(new Register(counter++, new string("dl"), 8, byte));

    registers_.push_back(new Register(counter++, new string("ax"), 16, word));
    registers_.push_back(new Register(counter++, new string("bx"), 16, word));
    registers_.push_back(new Register(counter++, new string("cx"), 16, word));
    registers_.push_back(new Register(counter++, new string("dx"), 16, word));
    registers_.push_back(new Register(counter++, new string("si"), 16, word));
    registers_.push_back(new Register(counter++, new string("di"), 16, word));

    registers_.push_back(new Register(counter++, new string("eax"), 32, dword));
    registers_.push_back(new Register(counter++, new string("ebx"), 32, dword));
    registers_.push_back(new Register(counter++, new string("ecx"), 32, dword));
    registers_.push_back(new Register(counter++, new string("edx"), 32, dword));
    registers_.push_back(new Register(counter++, new string("esi"), 32, dword));
    registers_.push_back(new Register(counter++, new string("edi"), 32, dword));

    reservers = new map<int, stack<int> *>;
    for (auto x = registers_.begin(); x != registers_.end(); x++)
    {
        reservers->insert(make_pair((*x)->id, new stack<int>));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
leaq 0x1246e(%rip), %rax     # 0x24730
movq %rax, (%rdi)
movl $0x20, 0x30(%rdi)
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r13
leaq 0x5a36(%rip), %rsi      # 0x17d14
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r12
leaq 0x5a1d(%rip), %rsi      # 0x17d1a
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x20
popq %rdi
callq 0x5260
leaq 0x5a00(%rip), %rsi      # 0x17d19
leaq 0x10(%rsp), %rdx
movq %rax, 0x20(%rsp)
movq %rax, %rdi
callq 0x70ae
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5dfd(%rip), %rsi      # 0x18145
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x8
popq %rcx
movq %rbp, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x8(%rbx), %r15
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5a06(%rip), %rsi      # 0x17d9f
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x1
popq %rsi
pushq $0x8
popq %rcx
movq %rbp, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5d61(%rip), %rsi      # 0x18148
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x2
popq %rsi
pushq $0x8
popq %rcx
movq %rbp, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5d16(%rip), %rsi      # 0x1814b
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x3
popq %rsi
pushq $0x8
popq %rcx
movq %rbp, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x6030(%rip), %rsi      # 0x184b3
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x4
popq %rsi
pushq $0x8
popq %rcx
movq %rbp, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5c7d(%rip), %rsi      # 0x1814e
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x5
popq %rsi
pushq $0x8
popq %rcx
movq %rbp, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5c32(%rip), %rsi      # 0x18151
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x6
popq %rsi
pushq $0x8
popq %rcx
movq %rbp, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %rbp
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5be7(%rip), %rsi      # 0x18154
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x7
popq %rsi
pushq $0x8
popq %rcx
movq %rbp, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r13
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5b9d(%rip), %rsi      # 0x18158
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x8
popq %rsi
pushq $0x10
popq %rcx
movq %r13, %rdi
movq %r14, %rdx
movq %r12, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r13
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5b53(%rip), %rsi      # 0x1815c
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x9
popq %rsi
pushq $0x10
popq %rcx
movq %r13, %rdi
movq %r14, %rdx
movq %r12, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r13
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5b09(%rip), %rsi      # 0x18160
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0xa
popq %rsi
pushq $0x10
popq %rcx
movq %r13, %rdi
movq %r14, %rdx
movq %r12, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r13
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5abf(%rip), %rsi      # 0x18164
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0xb
popq %rsi
pushq $0x10
popq %rcx
movq %r13, %rdi
movq %r14, %rdx
movq %r12, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r13
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5a75(%rip), %rsi      # 0x18168
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0xc
popq %rsi
pushq $0x10
popq %rcx
movq %r13, %rdi
movq %r14, %rdx
movq %r12, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r13
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5a2b(%rip), %rsi      # 0x1816c
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0xd
popq %rsi
pushq $0x10
popq %rcx
movq %r13, %rdi
movq %r14, %rdx
movq %r12, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq 0x20(%rsp), %r13
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x59c3(%rip), %rsi      # 0x18157
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0xe
popq %rsi
pushq $0x20
popq %rcx
movq %r12, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5979(%rip), %rsi      # 0x1815b
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0xf
popq %rsi
pushq $0x20
popq %rcx
movq %r12, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x592f(%rip), %rsi      # 0x1815f
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x10
popq %rsi
pushq $0x20
popq %rcx
movq %r12, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x58e5(%rip), %rsi      # 0x18163
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x11
popq %rsi
pushq $0x20
popq %rcx
movq %r12, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x589b(%rip), %rsi      # 0x18167
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x12
popq %rsi
pushq $0x20
popq %rcx
movq %r12, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r14
leaq 0x5851(%rip), %rsi      # 0x1816b
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x70ae
pushq $0x13
popq %rsi
pushq $0x20
popq %rcx
movq %r12, %rdi
movq %r14, %rdx
movq %r13, %r8
callq 0xf9fa
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x11e9a
pushq $0x30
popq %rdi
callq 0x5260
movq %rax, %rcx
addq $0x8, %rcx
andl $0x0, 0x8(%rax)
andq $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rax, 0x20(%rbx)
movq 0x8(%rbx), %rbp
leaq 0x10(%rsp), %r15
cmpq 0x10(%rbx), %rbp
je 0x129c0
movq %rbx, %r14
movq 0x20(%rbx), %r12
movq (%rbp), %rbx
pushq $0x50
popq %rdi
callq 0x5260
movq %rax, %r13
movq %rax, %rdi
callq 0x11e32
movl (%rbx), %eax
movl %eax, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x121a8
addq $0x8, %rbp
movq %r14, %rbx
jmp 0x1297d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12a3b
jmp 0x12a2b
jmp 0x12a3b
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12a3b
jmp 0x12a2b
jmp 0x12a3b
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12a3b
jmp 0x12a2b
jmp 0x12a3b
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12a3b
jmp 0x12a2b
jmp 0x12a3b
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12a3b
jmp 0x12a2b
jmp 0x12a3b
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12a3b
movq %rax, %r15
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x5270
jmp 0x12a3e
movq %rax, %r15
pushq $0x28
popq %rsi
movq %r12, %rdi
jmp 0x12b31
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12ab5
jmp 0x12aa5
jmp 0x12ab5
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12ab5
jmp 0x12aa5
jmp 0x12ab5
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12ab5
jmp 0x12aa5
jmp 0x12ab5
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12ab5
jmp 0x12aa5
jmp 0x12ab5
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12ab5
jmp 0x12aa5
jmp 0x12ab5
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12ab5
movq %rax, %r15
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x5270
jmp 0x12ab8
movq %rax, %r15
pushq $0x28
popq %rsi
movq %r13, %rdi
jmp 0x12b31
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
jmp 0x12b18
jmp 0x12b28
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
jmp 0x12b18
jmp 0x12b28
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
jmp 0x12b18
jmp 0x12b28
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
jmp 0x12b18
jmp 0x12b28
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
jmp 0x12b18
jmp 0x12b28
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
jmp 0x12b18
jmp 0x12b28
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
jmp 0x12b18
jmp 0x12b28
jmp 0x12b5f
jmp 0x12b5f
jmp 0x12b28
movq %rax, %r15
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x5270
jmp 0x12b2b
movq %rax, %r15
pushq $0x28
popq %rsi
movq %rbp, %rdi
callq 0x5270
jmp 0x12b7a
jmp 0x12b5f
movq %rax, %r15
pushq $0x20
popq %rsi
movq 0x20(%rsp), %rdi
jmp 0x12b31
jmp 0x12b5f
movq %rax, %r15
pushq $0x20
jmp 0x12a40
jmp 0x12b5f
movq %rax, %r15
pushq $0x20
jmp 0x12aba
movq %rax, %r15
jmp 0x12b7a
movq %rax, %r15
pushq $0x50
popq %rsi
movq %r13, %rdi
callq 0x5270
jmp 0x12b77
movq %rax, %r15
movq %r14, %rbx
movq %rbx, %rdi
callq 0x11e4e
movq %r15, %rdi
callq 0x5420
nop