// File: narges64[P]SIMBA/common.cpp
// Function: parameter_value::load_inline_parameters(int, char**)
void parameter_value::load_inline_parameters(int argc, char ** argv)
{
	int pre_eql,next_eql;
	int res_eql;
	char *ptr;

	for (int i = 3; i < argc; i++){
			ptr = strchr(argv[i], '=');
			if (!ptr) continue;

			pre_eql = ptr - argv[i];
			next_eql = pre_eql + 1;
			while(argv[i][pre_eql-1] == ' ') pre_eql--;
			argv[i][pre_eql] = 0;

			if ((res_eql = strcmp(argv[i],"lun_number")) == 0){
				sscanf(argv[i] + next_eql, "%d", &lun_num);
			}else if((res_eql=strcmp(argv[i],"dram_capacity")) ==0){
				sscanf(argv[i] + next_eql,"%d",&dram_capacity);
			}else if((res_eql=strcmp(argv[i],"gcb_capacity")) ==0){
				sscanf(argv[i] + next_eql,"%d",&gcb_capacity);
			}else if((res_eql=strcmp(argv[i],"queue_length")) ==0){
					sscanf(argv[i] + next_eql,"%d",&queue_length);
			}else if((res_eql=strcmp(argv[i],"syn_rd_ratio")) == 0){
					sscanf(argv[i] + next_eql, "%f",&syn_rd_ratio);
			}else if((res_eql=strcmp(argv[i],"syn_interarrival_mean")) == 0){
					sscanf(argv[i] + next_eql, "%d",&syn_interarrival_mean);
			}else if((res_eql=strcmp(argv[i],"syn_req_size")) == 0){
					sscanf(argv[i] + next_eql, "%d",&syn_req_size);
			}else if((res_eql=strcmp(argv[i],"syn_req_count")) == 0){
					sscanf(argv[i] + next_eql, "%d",&syn_req_count);
			}else if((res_eql=strcmp(argv[i],"time_scale")) == 0){
					sscanf(argv[i] + next_eql,"%lf",&time_scale);
			}else if((res_eql=strcmp(argv[i],"gc_time_ratio")) == 0){
					sscanf(argv[i] + next_eql,"%f",&gc_time_ratio);
			}else if((res_eql=strcmp(argv[i],"trace_file")) == 0){
					sscanf(argv[i] + next_eql,"%s",trace_filename); 
			}else if((res_eql=strcmp(argv[i],"synthetic")) == 0){
					sscanf(argv[i] + next_eql,"%d",&synthetic); 
			}else if((res_eql=strcmp(argv[i],"gc_algorithm")) == 0){
					sscanf(argv[i] + next_eql,"%d",&gc_algorithm); 
			}else{
					printf("don't match\t %s\n",argv[i]);
			}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x3, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3d63
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x3d, %esi
callq 0x20a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x38b4
jmp 0x3d55
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jne 0x38fc
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x38d3
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba74(%rip), %rsi      # 0xf397
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3961
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x88, %rdx
leaq 0xb6d0(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d53
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba2e(%rip), %rsi      # 0xf3a2
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x39b2
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x8c, %rdx
leaq 0xb67f(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d51
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb9eb(%rip), %rsi      # 0xf3b0
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3a03
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x90, %rdx
leaq 0xb62e(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d4f
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb9a7(%rip), %rsi      # 0xf3bd
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3a51
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x78, %rdx
leaq 0xb5e0(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d4d
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb966(%rip), %rsi      # 0xf3ca
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3aa2
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x324, %rdx            # imm = 0x324
leaq 0xb743(%rip), %rsi      # 0xf1d9
movb $0x0, %al
callq 0x2100
jmp 0x3d4b
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb922(%rip), %rsi      # 0xf3d7
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3af3
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x330, %rdx            # imm = 0x330
leaq 0xb53e(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d49
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb8e7(%rip), %rsi      # 0xf3ed
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3b44
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x32c, %rdx            # imm = 0x32C
leaq 0xb4ed(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d47
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb8a3(%rip), %rsi      # 0xf3fa
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3b95
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x328, %rdx            # imm = 0x328
leaq 0xb49c(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d45
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb860(%rip), %rsi      # 0xf408
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3be6
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x80, %rdx
leaq 0xb782(%rip), %rsi      # 0xf35c
movb $0x0, %al
callq 0x2100
jmp 0x3d43
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb81a(%rip), %rsi      # 0xf413
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3c37
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x338, %rdx            # imm = 0x338
leaq 0xb5ae(%rip), %rsi      # 0xf1d9
movb $0x0, %al
callq 0x2100
jmp 0x3d41
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb7d7(%rip), %rsi      # 0xf421
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3c88
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movslq -0x20(%rbp), %rcx
addq %rcx, %rdi
movq 0x340(%rax), %rdx
leaq 0xb3ac(%rip), %rsi      # 0xf028
movb $0x0, %al
callq 0x2100
jmp 0x3d3f
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb6e1(%rip), %rsi      # 0xf37c
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3cd6
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x348, %rdx            # imm = 0x348
leaq 0xb358(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d3d
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb743(%rip), %rsi      # 0xf42c
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x3d21
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x74, %rdx
leaq 0xb30d(%rip), %rsi      # 0xf025
movb $0x0, %al
callq 0x2100
jmp 0x3d3b
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xb652(%rip), %rdi      # 0xf386
movb $0x0, %al
callq 0x2050
jmp 0x3d3d
jmp 0x3d3f
jmp 0x3d41
jmp 0x3d43
jmp 0x3d45
jmp 0x3d47
jmp 0x3d49
jmp 0x3d4b
jmp 0x3d4d
jmp 0x3d4f
jmp 0x3d51
jmp 0x3d53
jmp 0x3d55
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3882
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)