// File: estwings57[P]CasHMC/sources/CommandQueue.cpp
// Function: CasHMC::CommandQueue::Enqueue(unsigned int, CasHMC::DRAMCommand*)
void CommandQueue::Enqueue(unsigned bank, DRAMCommand *enqCMD)
{
	if(QUE_PER_BANK) {
		classID.str( string() );	classID.clear();
		classID << bank;
		DE_CR(ALI(18)<<(header+"-"+classID.str()+")")<<ALI(15)<<*enqCMD<<"Down) PUSHING command into command queue["<<ACCESSQUE(bank).size()<<"/"<<MAX_CMD_QUE-1<<"]");
	}
	else {
		DE_CR(ALI(18)<<(header+")")<<ALI(15)<<*enqCMD<<"Down) PUSHING command into command queue["<<ACCESSQUE(bank).size()<<"/"<<MAX_CMD_QUE-1<<"]");
	}
	if(ACCESSQUE(bank).size() == 0) {
		POPCYCLE(bank) = (POPCYCLE(bank)>0) ? POPCYCLE(bank) : 1;
	}
	ACCESSQUE(bank).push_back(enqCMD);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq 0x49838(%rip), %rax     # 0x66630
testb $0x1, (%rax)
je 0x1d195
movq -0x110(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x120(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x44f0
movq -0x120(%rbp), %rdi
movq -0x118(%rbp), %rsi
callq 0x4430
jmp 0x1ce38
leaq -0x38(%rbp), %rdi
callq 0x46e8
movq -0x110(%rbp), %rax
movq %rax, %rdi
addq $0x40, %rdi
movq 0x40(%rax), %rax
addq -0x18(%rax), %rdi
xorl %esi, %esi
callq 0x45e0
movq -0x110(%rbp), %rdi
addq $0x40, %rdi
addq $0x10, %rdi
movl -0xc(%rbp), %esi
callq 0x44c0
leaq 0x496ac(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x1d190
movl $0x12, %edi
callq 0x177b0
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %esi
movq 0x49134(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x130(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x130(%rbp), %rdi
movb %al, -0x49(%rbp)
movzbl -0x49(%rbp), %esi
callq 0x4550
movq -0x110(%rbp), %rsi
movq %rax, -0x128(%rbp)
addq $0x20, %rsi
leaq 0x34a57(%rip), %rdx     # 0x51935
leaq -0xb0(%rbp), %rdi
callq 0x17fa0
movq -0x110(%rbp), %rsi
addq $0x40, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x4370
jmp 0x1cf03
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x228d0
jmp 0x1cf1f
leaq 0x37453(%rip), %rdx     # 0x54379
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x18020
jmp 0x1cf38
movq -0x128(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4320
movq %rax, -0x138(%rbp)
jmp 0x1cf51
movl $0xf, %edi
callq 0x177b0
movl %eax, -0x13c(%rbp)
jmp 0x1cf63
movq -0x138(%rbp), %rdi
movl -0x13c(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd4(%rbp), %esi
callq 0x4440
movq %rax, -0x148(%rbp)
jmp 0x1cf8a
movl $0x20, %edi
callq 0x177d0
movb %al, -0x149(%rbp)
jmp 0x1cf9c
movq -0x148(%rbp), %rdi
movb -0x149(%rbp), %al
movb %al, -0xd5(%rbp)
movzbl -0xd5(%rbp), %esi
callq 0x4550
movq %rax, -0x158(%rbp)
jmp 0x1cfc4
movq -0x158(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x30f50
movq %rax, -0x160(%rbp)
jmp 0x1cfdd
movq -0x160(%rbp), %rdi
leaq 0x35966(%rip), %rsi     # 0x52951
callq 0x4380
movq %rax, -0x168(%rbp)
jmp 0x1cff9
leaq 0x49630(%rip), %rax     # 0x66630
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1d02d
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x170(%rbp)
jmp 0x1d04b
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
xorl %eax, %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rdi
callq 0x228b0
movq -0x168(%rbp), %rdi
movq %rax, %rsi
callq 0x40f0
movq %rax, -0x178(%rbp)
jmp 0x1d06f
movq -0x178(%rbp), %rdi
leaq 0x3421b(%rip), %rsi     # 0x51298
callq 0x4380
movq %rax, -0x180(%rbp)
jmp 0x1d08b
movq -0x180(%rbp), %rdi
leaq 0x494cf(%rip), %rax     # 0x66568
movl (%rax), %esi
decl %esi
callq 0x4610
movq %rax, -0x188(%rbp)
jmp 0x1d0ab
movq -0x188(%rbp), %rdi
leaq 0x35961(%rip), %rsi     # 0x52a1a
callq 0x4380
movq %rax, -0x190(%rbp)
jmp 0x1d0c7
movq -0x190(%rbp), %rdi
movq 0x48edb(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x1d0dc
leaq -0x70(%rbp), %rdi
callq 0x46e8
leaq -0x90(%rbp), %rdi
callq 0x46e8
leaq -0xd0(%rbp), %rdi
callq 0x46e8
leaq -0xb0(%rbp), %rdi
callq 0x46e8
jmp 0x1d190
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x46e8
jmp 0x1d5ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1d17f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1d173
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1d167
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x46e8
leaq -0x90(%rbp), %rdi
callq 0x46e8
leaq -0xd0(%rbp), %rdi
callq 0x46e8
leaq -0xb0(%rbp), %rdi
callq 0x46e8
jmp 0x1d5ff
jmp 0x1d3f1
leaq 0x4938c(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x1d3ef
movl $0x12, %edi
callq 0x177b0
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %esi
movq 0x48e0e(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x1b0(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x1b0(%rbp), %rdi
movb %al, -0xdd(%rbp)
movzbl -0xdd(%rbp), %esi
callq 0x4550
movq -0x110(%rbp), %rsi
movq %rax, -0x1a8(%rbp)
addq $0x20, %rsi
leaq 0x3716f(%rip), %rdx     # 0x54379
leaq -0x100(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x17fa0
movq -0x1a8(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
callq 0x4320
movq %rax, -0x198(%rbp)
jmp 0x1d239
movl $0xf, %edi
callq 0x177b0
movl %eax, -0x1b4(%rbp)
jmp 0x1d24b
movq -0x198(%rbp), %rdi
movl -0x1b4(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %esi
callq 0x4440
movq %rax, -0x1c0(%rbp)
jmp 0x1d272
movl $0x20, %edi
callq 0x177d0
movb %al, -0x1c1(%rbp)
jmp 0x1d284
movq -0x1c0(%rbp), %rdi
movb -0x1c1(%rbp), %al
movb %al, -0x105(%rbp)
movzbl -0x105(%rbp), %esi
callq 0x4550
movq %rax, -0x1d0(%rbp)
jmp 0x1d2ac
movq -0x1d0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x30f50
movq %rax, -0x1d8(%rbp)
jmp 0x1d2c5
movq -0x1d8(%rbp), %rdi
leaq 0x3567e(%rip), %rsi     # 0x52951
callq 0x4380
movq %rax, -0x1e0(%rbp)
jmp 0x1d2e1
leaq 0x49348(%rip), %rax     # 0x66630
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1d315
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x1e8(%rbp)
jmp 0x1d333
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
xorl %eax, %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rdi
callq 0x228b0
movq -0x1e0(%rbp), %rdi
movq %rax, %rsi
callq 0x40f0
movq %rax, -0x1f0(%rbp)
jmp 0x1d357
movq -0x1f0(%rbp), %rdi
leaq 0x33f33(%rip), %rsi     # 0x51298
callq 0x4380
movq %rax, -0x1f8(%rbp)
jmp 0x1d373
movq -0x1f8(%rbp), %rdi
leaq 0x491e7(%rip), %rax     # 0x66568
movl (%rax), %esi
decl %esi
callq 0x4610
movq %rax, -0x200(%rbp)
jmp 0x1d393
movq -0x200(%rbp), %rdi
leaq 0x35679(%rip), %rsi     # 0x52a1a
callq 0x4380
movq %rax, -0x208(%rbp)
jmp 0x1d3af
movq -0x208(%rbp), %rdi
movq 0x48bf3(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x1d3c4
leaq -0x100(%rbp), %rdi
callq 0x46e8
jmp 0x1d3ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x46e8
jmp 0x1d5ff
jmp 0x1d3f1
leaq 0x49238(%rip), %rax     # 0x66630
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1d425
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x210(%rbp)
jmp 0x1d443
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
xorl %eax, %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rdi
callq 0x228b0
cmpq $0x0, %rax
jne 0x1d594
leaq 0x491d0(%rip), %rax     # 0x66630
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1d48e
movq -0x110(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x229a0
movl (%rax), %eax
movl %eax, -0x214(%rbp)
jmp 0x1d4ad
movq -0x110(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
xorl %eax, %eax
movl %eax, %esi
callq 0x229a0
movl (%rax), %eax
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
cmpl $0x0, %eax
jle 0x1d51a
leaq 0x49171(%rip), %rax     # 0x66630
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1d4ed
movq -0x110(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x229a0
movl (%rax), %eax
movl %eax, -0x218(%rbp)
jmp 0x1d50c
movq -0x110(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
xorl %eax, %eax
movl %eax, %esi
callq 0x229a0
movl (%rax), %eax
movl %eax, -0x218(%rbp)
movl -0x218(%rbp), %eax
movl %eax, -0x21c(%rbp)
jmp 0x1d527
movl $0x1, %eax
movl %eax, -0x21c(%rbp)
jmp 0x1d527
movl -0x21c(%rbp), %eax
movl %eax, -0x220(%rbp)
leaq 0x490f6(%rip), %rax     # 0x66630
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1d567
movq -0x110(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x229a0
movq %rax, -0x228(%rbp)
jmp 0x1d585
movq -0x110(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
xorl %eax, %eax
movl %eax, %esi
callq 0x229a0
movq %rax, -0x228(%rbp)
movl -0x220(%rbp), %ecx
movq -0x228(%rbp), %rax
movl %ecx, (%rax)
leaq 0x49095(%rip), %rax     # 0x66630
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1d5c8
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x230(%rbp)
jmp 0x1d5e6
movq -0x110(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
xorl %eax, %eax
movl %eax, %esi
callq 0x22650
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x229c0
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4630
nopl (%rax,%rax)