// File: gvaumour[P]cache-simulator/src/common.cc
// Function: init_default_parameters()
void
init_default_parameters()
{
	simu_parameters.enableBP = false;
	simu_parameters.enableMigration= false;
	simu_parameters.flagTest = true;	
	simu_parameters.printDebug = false;
		
	simu_parameters.prefetchDegree = 2;
	simu_parameters.prefetchStreams = 16; 
	simu_parameters.enablePrefetch = false;
	simu_parameters.strongInclusivity = false;
	
	simu_parameters.sram_assoc = 4;
	simu_parameters.nvm_assoc = 12;
	simu_parameters.nb_sets = 2048;
	
	simu_parameters.saturation_threshold = 2;	
	simu_parameters.cost_threshold = -5;
	
	simu_parameters.mediumrd_def = 4;

	simu_parameters.traceLLC = false;

	/********* Predictor Config *************/ 
	simu_parameters.nb_sampled_sets = 2048;
	simu_parameters.simulate_conflicts = false;
	simu_parameters.size_MT_NVMtags = 4;
	simu_parameters.size_MT_SRAMtags = 4;
	simu_parameters.MT_counter_th = 2;
	simu_parameters.MT_timeframe = 1E4;
	simu_parameters.nb_MTcouters_sampling = 1;
	simu_parameters.enableFullSRAMtraffic = false;

	/********* DBAMB Config *************/ 
	simu_parameters.window_size = 20; 
	simu_parameters.learningTH = 20;
	simu_parameters.deadSaturationCouter = 3;

	simu_parameters.rap_assoc = 128;
	simu_parameters.rap_sets = 128;
	
	simu_parameters.ratio_RWcost = -1;
		
	simu_parameters.readDatasetFile = false;
	simu_parameters.writeDatasetFile = false;
	simu_parameters.enableDatasetSpilling = false;
	simu_parameters.datasetFile = RAP_DATASET_FIRSTALLOC;

	simu_parameters.optTarget = EnergyParameters();
	simu_parameters.DBAMB_signature = "first_pc";
	
	simu_parameters.DBAMB_begin_bit = 0;
	simu_parameters.DBAMB_end_bit = 64;
	
	simu_parameters.enableReuseErrorComputation = false;
	simu_parameters.enablePCHistoryTracking = false;
	/***************************************/ 
	

	/********* Perceptron Config *************/ 	
//	simu_parameters.perceptron_features = { "Addr_LSB", "Addr_MSB", "PC_LSB", "PC_MSB"};
	simu_parameters.perceptron_BP_features = { "MissPC_0" , "Addr_2" };
	simu_parameters.perceptron_Allocation_features = { "MissPC_LSB"};
	simu_parameters.perceptron_windowSize = 16;
	
	simu_parameters.perceptron_bypass_threshold = 3;
	simu_parameters.perceptron_bypass_learning = 11;
	simu_parameters.perceptron_allocation_threshold = 5;
	simu_parameters.perceptron_allocation_learning = 11;

	simu_parameters.perceptron_compute_variance = false;
	simu_parameters.perceptron_table_size = 256;
	simu_parameters.perceptron_counter_size = 32;
	simu_parameters.perceptron_drawFeatureMaps = false;

	simu_parameters.perceptron_enableBypass = false;
	/***************************************/ 
	
	/*********** PHC Config ******************/ 
	simu_parameters.PHC_features = {"Addr_3"};
	simu_parameters.PHC_cost_threshold = 0;
	simu_parameters.PHC_cost_mediumRead = -4124;
	simu_parameters.PHC_cost_mediumWrite = -3702;
	simu_parameters.PHC_cost_shortWrite = 405;
	simu_parameters.PHC_cost_shortRead = -35;

	/************ Cerebron Config ************/ 
	simu_parameters.Cerebron_activation_function = "linear";
	simu_parameters.Cerebron_resetEnergyValues = false;
	simu_parameters.Cerebron_separateLearning = false;
	simu_parameters.Cerebron_lowConfidence = false;
	simu_parameters.Cerebron_enableMigration = false;

	simu_parameters.Cerebron_fastlearning = true;
	simu_parameters.Cerebron_independantLearning = true;
	simu_parameters.Cerebron_RDmodel = true;

	/*
	simu_parameters.Cerebron_fastlearning = false;
	simu_parameters.Cerebron_independantLearning = false;
	simu_parameters.Cerebron_RDmodel = false;
	*/
	simu_parameters.Cerebron_decrement_value = 1;

	/************ SimplePerceptron Config *********/ 
	simu_parameters.simple_perceptron_features =  {"Addr_3"};
	simu_parameters.simple_perceptron_learningTreshold = 5;
	simu_parameters.simple_perceptron_fastLearning = false;
	simu_parameters.simple_perceptron_independantLearning = false;
	simu_parameters.simple_perceptron_enableMigration = false;


	simu_parameters.nbCores = 1;
	simu_parameters.policy = "SimplePerceptron";

}

// Assembly:
subq $0x2d8, %rsp            # imm = 0x2D8
movb $0x0, 0x2d6da(%rip)     # 0x94098
movb $0x0, 0x2d6d4(%rip)     # 0x94099
movb $0x1, 0x2d6d8(%rip)     # 0x940a4
movb $0x0, 0x2d61d(%rip)     # 0x93ff0
movl $0x2, 0x2d69f(%rip)     # 0x9407c
movl $0x10, 0x2d699(%rip)    # 0x94080
movb $0x0, 0x2d68d(%rip)     # 0x9407b
movb $0x0, 0x2d685(%rip)     # 0x9407a
movl $0x4, 0x2d629(%rip)     # 0x94028
movl $0xc, 0x2d627(%rip)     # 0x94030
movl $0x800, 0x2d621(%rip)   # imm = 0x800
movl $0x2, 0x2d68b(%rip)     # 0x940a8
movl $0xfffffffb, 0x2d685(%rip) # imm = 0xFFFFFFFB
movl $0x4, 0x2d7bb(%rip)     # 0x941ec
movb $0x0, 0x2d641(%rip)     # 0x94079
movl $0x800, 0x2d5f6(%rip)   # imm = 0x800
movb $0x0, 0x2d62f(%rip)     # 0x94078
movl $0x4, 0x2d661(%rip)     # 0x940b4
movl $0x4, 0x2d653(%rip)     # 0x940b0
movl $0x2, 0x2d651(%rip)     # 0x940b8
movq $0x2710, 0x2d64e(%rip) # imm = 0x2710
movl $0x1, 0x2d64c(%rip)     # 0x940c8
movb $0x0, 0x2d649(%rip)     # 0x940cc
movl $0x14, 0x2d603(%rip)    # 0x94090
movl $0x14, 0x2d5fd(%rip)    # 0x94094
movl $0x3, 0x2d5eb(%rip)     # 0x9408c
movl $0x80, 0x2d5f1(%rip)    # 0x9409c
movl $0x80, 0x2d5eb(%rip)    # 0x940a0
movl $0xbf800000, 0x2d611(%rip) # imm = 0xBF800000
movb $0x0, 0x2d683(%rip)     # 0x94149
movb $0x0, 0x2d67d(%rip)     # 0x9414a
movb $0x0, 0x2d674(%rip)     # 0x94148
leaq 0x2d675(%rip), %rdi     # 0x94150
leaq 0xd682(%rip), %rsi      # 0x74164
callq 0x5520
leaq 0x290(%rsp), %rdi
movq %rdi, 0x148(%rsp)
callq 0x67920
movq 0x148(%rsp), %rsi
leaq 0x2d5cd(%rip), %rdi     # 0x940d8
callq 0x67b70
movq 0x148(%rsp), %rdi
callq 0x67bd0
leaq 0x2d5fc(%rip), %rdi     # 0x94120
leaq 0xb3a5(%rip), %rsi      # 0x71ed0
callq 0x5520
movl $0x0, 0x2d606(%rip)     # 0x94140
movl $0x40, 0x2d600(%rip)    # 0x94144
movb $0x0, 0x2d539(%rip)     # 0x94084
movb $0x0, 0x2d533(%rip)     # 0x94085
movb $0x1, 0x222(%rsp)
leaq 0x240(%rsp), %rax
movq %rax, 0x150(%rsp)
movq %rax, 0x238(%rsp)
leaq 0x237(%rsp), %rdi
movq %rdi, 0x158(%rsp)
callq 0x56a0
movq 0x150(%rsp), %rdi
movq 0x158(%rsp), %rdx
leaq 0xd5e1(%rip), %rsi      # 0x7417f
callq 0x5530
jmp 0x66ba5
leaq 0x260(%rsp), %rax
movq %rax, 0x138(%rsp)
movq %rax, 0x238(%rsp)
leaq 0x223(%rsp), %rdi
movq %rdi, 0x140(%rsp)
callq 0x56a0
movq 0x138(%rsp), %rdi
movq 0x140(%rsp), %rdx
leaq 0xd59f(%rip), %rsi      # 0x74188
callq 0x5530
jmp 0x66bf0
movb $0x0, 0x222(%rsp)
leaq 0x240(%rsp), %rax
movq %rax, 0x280(%rsp)
movq $0x2, 0x288(%rsp)
movq 0x280(%rsp), %rsi
movq 0x288(%rsp), %rdx
leaq 0x2d545(%rip), %rdi     # 0x94170
callq 0x67be0
jmp 0x66c32
leaq 0x240(%rsp), %rax
movq %rax, 0x128(%rsp)
addq $0x40, %rax
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x120(%rsp)
callq 0x5768
movq 0x128(%rsp), %rcx
movq 0x120(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x130(%rsp)
jne 0x66c4e
leaq 0x223(%rsp), %rdi
callq 0x53e0
leaq 0x237(%rsp), %rdi
callq 0x53e0
movb $0x1, 0x1e6(%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x110(%rsp)
movq %rax, 0x1e8(%rsp)
leaq 0x1e7(%rsp), %rdi
movq %rdi, 0x118(%rsp)
callq 0x56a0
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rdx
leaq 0xc36c(%rip), %rsi      # 0x73056
callq 0x5530
jmp 0x66cf1
movb $0x0, 0x1e6(%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x210(%rsp)
movq $0x1, 0x218(%rsp)
movq 0x210(%rsp), %rsi
movq 0x218(%rsp), %rdx
leaq 0x2d45c(%rip), %rdi     # 0x94188
callq 0x67be0
jmp 0x66d33
leaq 0x1f0(%rsp), %rax
movq %rax, 0x100(%rsp)
addq $0x20, %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0xf8(%rsp)
callq 0x5768
movq 0x100(%rsp), %rcx
movq 0xf8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x108(%rsp)
jne 0x66d4f
leaq 0x1e7(%rsp), %rdi
callq 0x53e0
movl $0x10, 0x2d408(%rip)    # 0x941a4
movl $0x3, 0x2d402(%rip)     # 0x941a8
movl $0xb, 0x2d3fc(%rip)     # 0x941ac
movl $0x5, 0x2d3f6(%rip)     # 0x941b0
movl $0xb, 0x2d3f0(%rip)     # 0x941b4
movb $0x0, 0x2d3f2(%rip)     # 0x941bd
movl $0x100, 0x2d3e3(%rip)   # imm = 0x100
movl $0x20, 0x2d3c1(%rip)    # 0x941a0
movb $0x0, 0x2d3d6(%rip)     # 0x941bc
movb $0x0, 0x2d3d1(%rip)     # 0x941be
movb $0x1, 0x1a6(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq %rax, 0x1a8(%rsp)
leaq 0x1a7(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
callq 0x56a0
movq 0xe8(%rsp), %rdi
movq 0xf0(%rsp), %rdx
leaq 0xd356(%rip), %rsi      # 0x7418f
callq 0x5530
jmp 0x66e40
movb $0x0, 0x1a6(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0x1d0(%rsp)
movq $0x1, 0x1d8(%rsp)
movq 0x1d0(%rsp), %rsi
movq 0x1d8(%rsp), %rdx
leaq 0x2d345(%rip), %rdi     # 0x941c0
callq 0x67be0
jmp 0x66e82
leaq 0x1b0(%rsp), %rax
movq %rax, 0xd8(%rsp)
addq $0x20, %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0xd0(%rsp)
callq 0x5768
movq 0xd8(%rsp), %rcx
movq 0xd0(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0xe0(%rsp)
jne 0x66e9e
leaq 0x1a7(%rsp), %rdi
callq 0x53e0
movl $0x0, 0x2d2ed(%rip)     # 0x941d8
movl $0xffffefe4, 0x2d2e7(%rip) # imm = 0xFFFFEFE4
movl $0xfffff18a, 0x2d2e1(%rip) # imm = 0xFFFFF18A
movl $0x195, 0x2d2db(%rip)   # imm = 0x195
movl $0xffffffdd, 0x2d2d5(%rip) # imm = 0xFFFFFFDD
leaq 0x2d2d6(%rip), %rdi     # 0x941f0
leaq 0xa123(%rip), %rsi      # 0x71044
callq 0x5520
movb $0x0, 0x2d2e5(%rip)     # 0x94212
movb $0x0, 0x2d2e0(%rip)     # 0x94214
movb $0x0, 0x2d2d6(%rip)     # 0x94211
movb $0x0, 0x2d2d1(%rip)     # 0x94213
movb $0x1, 0x2d2cc(%rip)     # 0x94215
movb $0x1, 0x2d2c0(%rip)     # 0x94210
movb $0x1, 0x2d2bf(%rip)     # 0x94216
movl $0x1, 0x2d2b7(%rip)     # 0x94218
movb $0x1, 0x166(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq %rax, 0x168(%rsp)
leaq 0x167(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x56a0
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rdx
leaq 0xd1e2(%rip), %rsi      # 0x7418f
callq 0x5530
jmp 0x66fb4
movb $0x0, 0x166(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0x190(%rsp)
movq $0x1, 0x198(%rsp)
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
leaq 0x2d231(%rip), %rdi     # 0x94220
callq 0x67be0
jmp 0x66ff6
leaq 0x170(%rsp), %rax
movq %rax, 0xb0(%rsp)
addq $0x20, %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0xa8(%rsp)
callq 0x5768
movq 0xb0(%rsp), %rcx
movq 0xa8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0xb8(%rsp)
jne 0x67012
leaq 0x167(%rsp), %rdi
callq 0x53e0
movl $0x5, 0x2d1d9(%rip)     # 0x94238
movb $0x0, 0x2d1d6(%rip)     # 0x9423c
movb $0x0, 0x2d1d0(%rip)     # 0x9423d
movb $0x0, 0x2d1ca(%rip)     # 0x9423e
movl $0x1, 0x2cfae(%rip)     # 0x9402c
leaq 0x2cf6b(%rip), %rdi     # 0x93ff0
addq $0x68, %rdi
leaq 0xb761(%rip), %rsi      # 0x727f1
callq 0x5520
addq $0x2d8, %rsp            # imm = 0x2D8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0x67141
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0x67134
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x240(%rsp), %rax
movq %rax, 0x98(%rsp)
addq $0x40, %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x90(%rsp)
callq 0x5768
movq 0x98(%rsp), %rcx
movq 0x90(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0xa0(%rsp)
jne 0x670fc
jmp 0x67134
leaq 0x223(%rsp), %rdi
callq 0x53e0
leaq 0x237(%rsp), %rdi
callq 0x53e0
testb $0x1, 0x222(%rsp)
jne 0x6715a
jmp 0x671af
movq 0x238(%rsp), %rax
leaq 0x240(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x88(%rsp)
je 0x671ad
movq 0x88(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x80(%rsp)
callq 0x5768
movq 0x80(%rsp), %rax
leaq 0x240(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x88(%rsp)
jne 0x67177
jmp 0x671af
jmp 0x67418
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0x6721d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x70(%rsp)
addq $0x20, %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x68(%rsp)
callq 0x5768
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x78(%rsp)
jne 0x671f4
jmp 0x6721d
leaq 0x1e7(%rsp), %rdi
callq 0x53e0
testb $0x1, 0x1e6(%rsp)
jne 0x67236
jmp 0x6727c
movq 0x1e8(%rsp), %rax
leaq 0x1f0(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x60(%rsp)
je 0x6727a
movq 0x60(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x58(%rsp)
callq 0x5768
movq 0x58(%rsp), %rax
leaq 0x1f0(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x60(%rsp)
jne 0x67250
jmp 0x6727c
jmp 0x67418
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0x672ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0x48(%rsp)
addq $0x20, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x40(%rsp)
callq 0x5768
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x50(%rsp)
jne 0x672c1
jmp 0x672ea
leaq 0x1a7(%rsp), %rdi
callq 0x53e0
testb $0x1, 0x1a6(%rsp)
jne 0x67303
jmp 0x67349
movq 0x1a8(%rsp), %rax
leaq 0x1b0(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x38(%rsp)
je 0x67347
movq 0x38(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x30(%rsp)
callq 0x5768
movq 0x30(%rsp), %rax
leaq 0x1b0(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x38(%rsp)
jne 0x6731d
jmp 0x67349
jmp 0x67418
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0x673b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x20, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x18(%rsp)
callq 0x5768
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0x6738e
jmp 0x673b7
leaq 0x167(%rsp), %rdi
callq 0x53e0
testb $0x1, 0x166(%rsp)
jne 0x673d0
jmp 0x67416
movq 0x168(%rsp), %rax
leaq 0x170(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x10(%rsp)
je 0x67414
movq 0x10(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x8(%rsp)
callq 0x5768
movq 0x8(%rsp), %rax
leaq 0x170(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x10(%rsp)
jne 0x673ea
jmp 0x67416
jmp 0x67418
movq 0x228(%rsp), %rdi
callq 0x5690
nopw %cs:(%rax,%rax)
nop