// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/ConfigReader.cpp
// Function: CasHMC::SetField(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SetField(string field_name, string field_value)
{
	int i;
	istringstream val_st(field_value);
	
	for(i=0; configMap[i].fieldPtr != NULL; i++) {
		if(field_name.compare(configMap[i].fieldName) == 0) {
			switch(configMap[i].fieldType) {
			case STRING: {
				//LINK_PRIORITY_SCHEME
				if(configMap[i].fieldName == "LINK_PRIORITY") {
					if(field_value == "ROUND_ROBIN") {
						LINK_PRIORITY = ROUND_ROBIN;
					}
					else if(field_value == "BUFFER_AWARE") {
						LINK_PRIORITY = BUFFER_AWARE;
					}
					else {
						ERROR(" == Error - Unknown field_value ["<<field_value<<"] for field_name ["<<field_name<<"] in ini file");
						exit(0);
					}
				}
				//LINK_POWER_MANAGEMENT
				else if(configMap[i].fieldName == "LINK_POWER") {
					if(field_value == "NO_MANAGEMENT") {
						LINK_POWER = NO_MANAGEMENT;
					}
					else if(field_value == "QUIESCE_SLEEP") {
						LINK_POWER = QUIESCE_SLEEP;
					}
					else if(field_value == "MSHR") {
						LINK_POWER = MSHR;
					}
					else if(field_value == "LINK_MONITOR") {
						LINK_POWER = LINK_MONITOR;
					}
					else if(field_value == "AUTONOMOUS") {
						LINK_POWER = AUTONOMOUS;
					}
					else {
						ERROR(" == Error - Unknown field_value ["<<field_value<<"] for field_name ["<<field_name<<"] in ini file");
						exit(0);
					}
				}
				//MAPPING_SCHEME
				else if(configMap[i].fieldName == "ADDRESS_MAPPING") {
					if(field_value == "MAX_BLOCK_32B") {
						ADDRESS_MAPPING = MAX_BLOCK_32B;
					}
					else if(field_value == "MAX_BLOCK_64B") {
						ADDRESS_MAPPING = MAX_BLOCK_64B;
					}
					else if(field_value == "MAX_BLOCK_128B") {
						ADDRESS_MAPPING = MAX_BLOCK_128B;
					}
					else if(field_value == "MAX_BLOCK_256B") {
						ADDRESS_MAPPING = MAX_BLOCK_256B;
					}
					else {
						ERROR(" == Error - Unknown field_value ["<<field_value<<"] for field_name ["<<field_name<<"] in ini file");
						exit(0);
					}
				}
				break;
			}
			case BOOL: {
				if(field_value == "true" || field_value == "1") {
					*((bool *)configMap[i].fieldPtr) = true;
				}
				else {
					*((bool *)configMap[i].fieldPtr) = false;
				}
				break;
			}
			case INT: {
				int val;
				val_st >> val;
				*((int *)configMap[i].fieldPtr) = val;
				break;
			}
			case UNSIGNED_CLK: {
				double val;
				val_st >> val;
				unsigned val_by_clk = ceil(val/tCK);
				*((unsigned *)configMap[i].fieldPtr) = val_by_clk;
				break;
			}
			case UINT64: {
				uint64_t val;
				val_st >> val;
				*((uint64_t *)configMap[i].fieldPtr) = val;
				break;
			}
			case DOUBLE: {
				double val;
				val_st >> val;
				*((double *)configMap[i].fieldPtr) = val;
				break;
			}
			}
			configMap[i].wasSet = true;
			break;
		}
	}
	
	if(configMap[i].fieldPtr == NULL) {
		ERROR(" == Error - Unknown field ["<<field_name<<"] in ini file");
		exit(0);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x44c0
leaq 0x1f8a2(%rip), %r15     # 0x315f0
cmpq $0x0, 0x20(%r15)
je 0x12029
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4040
addq $0x30, %r15
testl %eax, %eax
jne 0x11d4e
movl -0x8(%r15), %eax
cmpq $0x5, %rax
ja 0x12004
leaq 0x13cff(%rip), %rcx     # 0x25a80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x30(%r15), %r12
leaq 0x13e15(%rip), %rsi     # 0x25baa
movq %r12, %rdi
callq 0xde4e
testb %al, %al
je 0x11e7a
leaq 0x12e48(%rip), %rsi     # 0x24bf4
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11eac
andl $0x0, 0x1f721(%rip)     # 0x314e4
jmp 0x12004
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x41b0
movq (%rsp), %rax
movq -0x10(%r15), %rcx
movq %rax, (%rcx)
jmp 0x11ed9
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x41e0
movl (%rsp), %eax
movq -0x10(%r15), %rcx
movl %eax, (%rcx)
jmp 0x11ed9
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x4200
movsd (%rsp), %xmm0
divsd 0x1f786(%rip), %xmm0    # 0x315a0
callq 0x4080
cvttsd2si %xmm0, %rax
movq -0x10(%r15), %rcx
movl %eax, (%rcx)
jmp 0x11ed9
leaq 0x13fb2(%rip), %rsi     # 0x25de8
movq %r14, %rdi
callq 0xde4e
testb %al, %al
jne 0x11e55
leaq 0x13df4(%rip), %rsi     # 0x25c3d
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11ed2
movq -0x10(%r15), %rax
movb $0x1, (%rax)
jmp 0x11ed9
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x4200
movsd (%rsp), %xmm0
movq -0x10(%r15), %rax
movsd %xmm0, (%rax)
jmp 0x11ed9
leaq 0x13d37(%rip), %rsi     # 0x25bb8
movq %r12, %rdi
callq 0xde4e
testb %al, %al
je 0x11ee3
leaq 0x12d93(%rip), %rsi     # 0x24c27
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11f1c
andl $0x0, 0x1f641(%rip)     # 0x314e8
jmp 0x12004
leaq 0x12d4d(%rip), %rsi     # 0x24c00
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x120ae
movl $0x1, 0x1f617(%rip)     # 0x314e4
jmp 0x12004
movq -0x10(%r15), %rax
movb $0x0, (%rax)
movb $0x1, -0x4(%r15)
jmp 0x12010
leaq 0x13d97(%rip), %rsi     # 0x25c81
movq %r12, %rdi
callq 0xde4e
testb %al, %al
je 0x12004
leaq 0x13ead(%rip), %rsi     # 0x25dae
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11f3e
movl $0x20, 0x1f675(%rip)    # 0x3158c
jmp 0x12004
leaq 0x12d12(%rip), %rsi     # 0x24c35
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11f60
movl $0x1, 0x1f5af(%rip)     # 0x314e8
jmp 0x12004
leaq 0x13e77(%rip), %rsi     # 0x25dbc
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11f82
movl $0x40, 0x1f631(%rip)    # 0x3158c
jmp 0x12004
leaq 0x12cdc(%rip), %rsi     # 0x24c43
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11fa1
movl $0x2, 0x1f56b(%rip)     # 0x314e8
jmp 0x12004
leaq 0x13e41(%rip), %rsi     # 0x25dca
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11fc0
movl $0x80, 0x1f5ed(%rip)    # 0x3158c
jmp 0x12004
leaq 0x12ca0(%rip), %rsi     # 0x24c48
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x11fe3
movl $0x3, 0x1f52a(%rip)     # 0x314e8
jmp 0x12004
leaq 0x13e12(%rip), %rsi     # 0x25dd9
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x1214b
movl $0x100, 0x1f5ab(%rip)   # imm = 0x100
jmp 0x12004
leaq 0x12c6b(%rip), %rsi     # 0x24c55
movq %r14, %rdi
callq 0xde4e
testb %al, %al
je 0x121e8
movl $0x4, 0x1f4e4(%rip)     # 0x314e8
movb $0x1, -0x4(%r15)
cmpq $0x0, -0x10(%r15)
je 0x12029
leaq 0x8(%rsp), %rdi
callq 0x4170
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1efc0(%rip), %rdi     # 0x30ff0
leaq 0x11feb(%rip), %rsi     # 0x24022
callq 0x4300
leaq 0x13ce9(%rip), %rsi     # 0x25d2c
movq %rax, %rdi
callq 0x4300
leaq 0x12825(%rip), %rsi     # 0x24877
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movl $0x149, %esi            # imm = 0x149
callq 0x44f0
leaq 0x11fd3(%rip), %rsi     # 0x24041
movq %rax, %rdi
callq 0x4300
leaq 0x13d70(%rip), %rsi     # 0x25ded
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42b0
leaq 0x13d09(%rip), %rsi     # 0x25da0
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
xorl %edi, %edi
callq 0x4370
movq 0x1ef3b(%rip), %rdi     # 0x30ff0
leaq 0x11f66(%rip), %rsi     # 0x24022
callq 0x4300
leaq 0x13c64(%rip), %rsi     # 0x25d2c
movq %rax, %rdi
callq 0x4300
leaq 0x127a0(%rip), %rsi     # 0x24877
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movl $0xf1, %esi
callq 0x44f0
leaq 0x11f4e(%rip), %rsi     # 0x24041
movq %rax, %rdi
callq 0x4300
leaq 0x13c69(%rip), %rsi     # 0x25d6b
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %r14, %rsi
callq 0x42b0
leaq 0x13c71(%rip), %rsi     # 0x25d8d
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42b0
leaq 0x13c6a(%rip), %rsi     # 0x25da0
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
jmp 0x120a7
movq 0x1ee9e(%rip), %rdi     # 0x30ff0
leaq 0x11ec9(%rip), %rsi     # 0x24022
callq 0x4300
leaq 0x13bc7(%rip), %rsi     # 0x25d2c
movq %rax, %rdi
callq 0x4300
leaq 0x12703(%rip), %rsi     # 0x24877
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movl $0x11a, %esi            # imm = 0x11A
callq 0x44f0
leaq 0x11eb1(%rip), %rsi     # 0x24041
movq %rax, %rdi
callq 0x4300
leaq 0x13bcc(%rip), %rsi     # 0x25d6b
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %r14, %rsi
callq 0x42b0
leaq 0x13bd4(%rip), %rsi     # 0x25d8d
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42b0
leaq 0x13bcd(%rip), %rsi     # 0x25da0
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
jmp 0x120a7
movq 0x1ee01(%rip), %rdi     # 0x30ff0
leaq 0x11e2c(%rip), %rsi     # 0x24022
callq 0x4300
leaq 0x13b2a(%rip), %rsi     # 0x25d2c
movq %rax, %rdi
callq 0x4300
leaq 0x12666(%rip), %rsi     # 0x24877
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movl $0x107, %esi            # imm = 0x107
callq 0x44f0
leaq 0x11e14(%rip), %rsi     # 0x24041
movq %rax, %rdi
callq 0x4300
leaq 0x13b2f(%rip), %rsi     # 0x25d6b
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %r14, %rsi
callq 0x42b0
leaq 0x13b37(%rip), %rsi     # 0x25d8d
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42b0
leaq 0x13b30(%rip), %rsi     # 0x25da0
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
jmp 0x120a7
jmp 0x1228f
jmp 0x1228f
jmp 0x1228f
jmp 0x1228f
jmp 0x1228f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4520