// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movq %rdx, 0x20(%rsp)
leaq 0x223e7(%rip), %r12     # 0x31590
cmpb $0x1, (%r12)
jne 0xf34e
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%rbx), %r12
movq %rsp, %rsi
movq %r12, %rdi
callq 0x4420
leaq 0x40(%rbx), %r14
movq %rsp, %rdi
callq 0x4598
movq 0x40(%rbx), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x44d0
leaq 0x50(%rbx), %rdi
movl %ebp, %r14d
movq %r14, %rsi
callq 0x4210
leaq 0x22280(%rip), %rax     # 0x31488
cmpb $0x1, (%rax)
jne 0xf452
movq 0x21db8(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
movq %rax, %r13
leaq 0x20(%rbx), %rsi
leaq 0x15739(%rip), %rdx     # 0x24977
leaq 0x48(%rsp), %rdi
callq 0xdeb2
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x4450
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x11123
leaq 0x18261(%rip), %rdx     # 0x274d1
movq %rsp, %rdi
leaq 0x68(%rsp), %rsi
callq 0xdeea
leaq 0x2230c(%rip), %r12     # 0x31590
movq %rsp, %rsi
movq %r13, %rdi
callq 0x42b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x4440
movq %rax, %rdi
movq %r15, %rsi
callq 0x15274
leaq 0x166d5(%rip), %rsi     # 0x25991
movq %rax, %rdi
callq 0x4300
xorl %ecx, %ecx
cmpb $0x0, (%r12)
movq 0x238(%rbx), %rdx
cmovneq %r14, %rcx
imulq $0x18, %rcx, %rcx
movq 0x8(%rdx,%rcx), %rsi
subq (%rdx,%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x4210
leaq 0x14fe4(%rip), %rsi     # 0x242da
movq %rax, %rdi
callq 0x4300
leaq 0x221c3(%rip), %rcx     # 0x314c8
movl (%rcx), %esi
decl %esi
movq %rax, %rdi
callq 0x44f0
leaq 0x16742(%rip), %rsi     # 0x25a5a
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
movq %rsp, %rdi
callq 0x4598
leaq 0x68(%rsp), %rdi
callq 0x4598
leaq 0x28(%rsp), %rdi
callq 0x4598
leaq 0x48(%rsp), %rdi
jmp 0xf446
leaq 0x22133(%rip), %rax     # 0x31488
cmpb $0x0, (%rax)
je 0xf44d
movq 0x21c6b(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
movq %rax, %r14
leaq 0x20(%rbx), %rsi
leaq 0x18146(%rip), %rdx     # 0x274d1
movq %r12, %r13
movq %rsp, %r12
movq %r12, %rdi
callq 0xdeb2
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %r12
callq 0x42b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x4440
movq %rax, %rdi
movq %r15, %rsi
callq 0x15274
leaq 0x165bd(%rip), %rsi     # 0x25991
movq %rax, %rdi
callq 0x4300
movl %ebp, %r14d
xorl %ecx, %ecx
cmpb $0x0, (%r12)
movq 0x238(%rbx), %rdx
cmovneq %r14, %rcx
imulq $0x18, %rcx, %rcx
movq 0x8(%rdx,%rcx), %rsi
subq (%rdx,%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x4210
leaq 0x14ec9(%rip), %rsi     # 0x242da
movq %rax, %rdi
callq 0x4300
leaq 0x220a8(%rip), %rcx     # 0x314c8
movl (%rcx), %esi
decl %esi
movq %rax, %rdi
callq 0x44f0
leaq 0x16627(%rip), %rsi     # 0x25a5a
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
movq %rsp, %rdi
callq 0x4598
jmp 0xf459
movl %ebp, %r14d
jmp 0xf459
leaq 0x22137(%rip), %r12     # 0x31590
movb (%r12), %cl
movq 0x238(%rbx), %rdi
xorl %eax, %eax
testb %cl, %cl
cmovneq %r14, %rax
imulq $0x18, %rax, %rax
movq 0x8(%rdi,%rax), %rdx
cmpq (%rdi,%rax), %rdx
jne 0xf4a0
xorl %edx, %edx
testb %cl, %cl
cmovneq %r14, %rdx
movq 0x220(%rbx), %rcx
movl (%rcx,%rdx,4), %esi
cmpl $0x2, %esi
pushq $0x1
popq %rdi
cmovgel %esi, %edi
movl %edi, (%rcx,%rdx,4)
movq 0x238(%rbx), %rdi
addq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0x1118a
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xf4db
movq %rax, %rbx
jmp 0xf4e5
movq %rax, %rbx
jmp 0xf4ef
jmp 0xf4f6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4598
leaq 0x68(%rsp), %rdi
callq 0x4598
leaq 0x28(%rsp), %rdi
callq 0x4598
leaq 0x48(%rsp), %rdi
jmp 0xf4fc
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4598
movq %rbx, %rdi
callq 0x4520
nop