// File: /workspace/github_cpp_makefile_star2_O2/jmfenner92[P]Log-Parser/src/CmdRecord.cpp
// Function: CmdRecord::LookUpTable[abi:cxx11](int, int)
std::string CmdRecord::LookUpTable(int word, int bit_value)
{
	// declare necessary variables
	std::string printString = "";

	// switch over word number, then, possibly bit_value
	// while assembling printString
	switch(word)
	{
	case 0:
	{
		printString += "Word 0: Rec_Ctrl = ";
		switch(bit_value)
		{
		case 0: printString += "0 (no recording)"; break;
		case 2: printString += "2 (no processing)"; break;
		case 3: printString += "3 (processing & recording)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}	
	case 1:
	{
		printString += "Word 1: Cmd_Type = ";
		switch(bit_value)
		{
		case 4: printString += "4 (Type A)"; break;
		case 5:	printString += "5 (Type B)"; break;
		case 6: printString += "6 (Type C)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}
	case 4:
	{
		printString += "Word 4: Rec_Raw = ";
		switch(bit_value)
		{
		case 0: printString += "0 (disable)"; break;
		case 1: printString += "1 (enable)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}
	case 5: printString += "Word 5: Cmd_ID = " + patch::to_string(bit_value); break;
	case 10: printString += "Word 10: Num_Responses = " + patch::to_string(bit_value); break;
	case 15:
	{
		printString += "Word 15: Reset_Enable = ";
		switch(bit_value)
		{
		case 0: printString += "0 (disable)"; break;
		case 1: printString += "1 (enable)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}
	case 22:
	{
		printString += "Word 22: Direction = ";
		switch(bit_value)
		{
		case 0: printString += "0 (Right)"; break;
		case 1: printString += "1 (Left)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}	
	case 32: printString += "Word 32: Num_Samples = " + patch::to_string(bit_value); break;
	case 37:
	{
		printString += "Word 37: Parity = ";
		switch(bit_value)
		{
		case 0: printString += "0 (even)"; break;
		case 1: printString += "1 (odd)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}
	case 38:
	{
		printString += "Word 38: Test = ";
		switch(bit_value)
		{
		case 0: printString += "0 (disable)"; break;
		case 1: printString += "1 (enable)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}
	case 40:
	{
		printString += "Word 40: Ctrl_Enable = ";
		switch(bit_value)
		{
		case 0: printString += "0 (disable)"; break;
		case 1: printString += "1 (enable)"; break;
		default: printString += patch::to_string(bit_value) + " (unknown)"; break;
		}
		break;
	}
	case 41: printString += "Word 41: Code = " + patch::to_string(bit_value); break;
	default: printString += ""; break;
	}
	// attach endline to string?
	//printString += "\n";
	
	return printString;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %r15d
movq %rdi, %rbx
movl %ecx, -0x1c(%rbp)
leaq 0x20ae(%rip), %r14      # 0x5465
leaq -0x40(%rbp), %rdx
movq %r14, %rsi
callq 0x2c3c
cmpl $0xa, %r15d
jbe 0x3418
leal -0x20(%r15), %eax
cmpl $0x9, %eax
ja 0x3463
leaq 0x1d47(%rip), %rcx      # 0x5124
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1f40(%rip), %rsi      # 0x533a
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3abe
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
movl %r15d, %eax
leaq 0x1cd6(%rip), %rcx      # 0x50f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1dde(%rip), %rsi      # 0x5210
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x374a
cmpl $0x2, %eax
je 0x3741
cmpl $0x3, %eax
jne 0x3753
leaq 0x1de9(%rip), %r14      # 0x5247
jmp 0x3789
cmpl $0xf, %r15d
je 0x369d
cmpl $0x16, %r15d
jne 0x3789
leaq 0x1e93(%rip), %rsi      # 0x5311
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x3782
cmpl $0x1, %eax
jne 0x37c5
leaq 0x1e90(%rip), %r14      # 0x5331
jmp 0x3789
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1e12(%rip), %rsi      # 0x52cc
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3abe
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq 0x1d8e(%rip), %rsi      # 0x526d
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
jae 0x36d4
movl %eax, %eax
leaq 0x1ca9(%rip), %rcx      # 0x51a8
movslq (%rcx,%rax,4), %r14
addq %rcx, %r14
jmp 0x3789
leaq 0x1d90(%rip), %rsi      # 0x52a2
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x36c8
cmpl $0x1, %eax
je 0x36bc
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1d20(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1d6a(%rip), %rsi      # 0x52de
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3abe
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq 0x1dee(%rip), %rsi      # 0x5387
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x36c8
cmpl $0x1, %eax
je 0x36bc
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1c99(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq 0x1d64(%rip), %rsi      # 0x5352
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x3706
cmpl $0x1, %eax
jne 0x370f
leaq 0x1d5d(%rip), %r14      # 0x536e
jmp 0x3789
leaq 0x1d59(%rip), %rsi      # 0x5376
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x36c8
cmpl $0x1, %eax
je 0x36bc
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1c15(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1d20(%rip), %rsi      # 0x539f
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3abe
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq 0x1c54(%rip), %rsi      # 0x52f8
movq %rbx, %rdi
callq 0x22e0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x36c8
cmpl $0x1, %eax
jne 0x3796
leaq 0x1bfe(%rip), %r14      # 0x52c1
jmp 0x3789
leaq 0x1be6(%rip), %r14      # 0x52b5
jmp 0x3789
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1b7a(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq 0x1c58(%rip), %r14      # 0x5365
jmp 0x3789
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1b3f(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq 0x1aed(%rip), %r14      # 0x5235
jmp 0x3789
leaq 0x1ad3(%rip), %r14      # 0x5224
jmp 0x3789
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1afb(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq 0x1b9e(%rip), %r14      # 0x5327
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22e0
jmp 0x3804
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1ab8(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
jmp 0x37f2
leaq -0x60(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2c87
leaq 0x1a89(%rip), %rdx      # 0x5262
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a95
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2300
leaq -0x40(%rbp), %rdi
callq 0x20e0
leaq -0x60(%rbp), %rdi
callq 0x20e0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3850
jmp 0x3850
jmp 0x3860
jmp 0x3860
jmp 0x3872
jmp 0x3872
jmp 0x3850
jmp 0x3860
jmp 0x3872
jmp 0x3850
jmp 0x3850
jmp 0x3850
jmp 0x3860
jmp 0x3860
jmp 0x3860
jmp 0x3872
jmp 0x3872
jmp 0x3872
jmp 0x3850
jmp 0x3860
jmp 0x3872
jmp 0x3850
jmp 0x3860
jmp 0x3872
jmp 0x3850
jmp 0x3850
jmp 0x3860
jmp 0x3860
jmp 0x3872
jmp 0x3872
jmp 0x3850
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x20e0
jmp 0x3863
jmp 0x3860
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x20e0
jmp 0x3875
jmp 0x3872
jmp 0x3872
movq %rax, %r14
movq %rbx, %rdi
callq 0x20e0
movq %r14, %rdi
callq 0x22c0
nop