// File: /workspace/github_c_makefile_star2_O0/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: PutIntoInputStorage(inputstruct_s*, long)
void PutIntoInputStorage(struct inputstruct_s* inputstruct, long pos_index){
	long i;
	
	//Rho
	for(i=0;i<NgridTotal;i++){
		InputStorage[pos_index].rho_field[i]=inputstruct[0].rho_field[i];
    }
	//T
	for(i=0;i<NgridTotal;i++){
		InputStorage[pos_index].T_field[i]=inputstruct[0].T_field[i];
    }
    InputStorage[pos_index].R0=inputstruct[0].R0;
    InputStorage[pos_index].X0=inputstruct[0].X0;
    InputStorage[pos_index].Y0=inputstruct[0].Y0;
    InputStorage[pos_index].Z0=inputstruct[0].Z0;
    InputStorage[pos_index].Machedge=inputstruct[0].Machedge;
    InputStorage[pos_index].RelativeVelocityX=inputstruct[0].RelativeVelocityX;
    InputStorage[pos_index].RelativeVelocityY=inputstruct[0].RelativeVelocityY;
    InputStorage[pos_index].RelativeVelocityZ=inputstruct[0].RelativeVelocityZ;
    InputStorage[pos_index].InitScale=inputstruct[0].InitScale;
    InputStorage[pos_index].tparent=inputstruct[0].tparent;
    
    //Assigned values
    IsUsed[pos_index]=true; //space occupied
    InputPriority[pos_index]=PriorityFunction(inputstruct);
    //InputPriority[pos_index]=1.0/inputstruct.R0;
    
	NInputCurrent++; //one more input struct has been added
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq $0x0, (%rsp)
cmpq $0x8000, (%rsp)         # imm = 0x8000
jge 0x16dc8
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0xb99b(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movq (%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x16d86
movq $0x0, (%rsp)
cmpq $0x8000, (%rsp)         # imm = 0x8000
jge 0x16e1a
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
movsd 0x40000(%rax,%rcx,8), %xmm0
movq 0xb94d(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movq (%rsp), %rcx
movsd %xmm0, 0x40000(%rax,%rcx,8)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x16dd0
movq 0x10(%rsp), %rax
movsd 0x80000(%rax), %xmm0
movq 0xb912(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80000(%rax)
movq 0x10(%rsp), %rax
movsd 0x80008(%rax), %xmm0
movq 0xb8ea(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80008(%rax)
movq 0x10(%rsp), %rax
movsd 0x80010(%rax), %xmm0
movq 0xb8c2(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80010(%rax)
movq 0x10(%rsp), %rax
movsd 0x80018(%rax), %xmm0
movq 0xb89a(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80018(%rax)
movq 0x10(%rsp), %rax
movsd 0x80020(%rax), %xmm0
movq 0xb872(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80020(%rax)
movq 0x10(%rsp), %rax
movsd 0x80028(%rax), %xmm0
movq 0xb84a(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80028(%rax)
movq 0x10(%rsp), %rax
movsd 0x80030(%rax), %xmm0
movq 0xb822(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80030(%rax)
movq 0x10(%rsp), %rax
movsd 0x80038(%rax), %xmm0
movq 0xb7fa(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80038(%rax)
movq 0x10(%rsp), %rax
movsd 0x80040(%rax), %xmm0
movq 0xb7d2(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80040(%rax)
movq 0x10(%rsp), %rax
movsd 0x80048(%rax), %xmm0
movq 0xb7aa(%rip), %rax      # 0x22740
imulq $0x80050, 0x8(%rsp), %rcx # imm = 0x80050
addq %rcx, %rax
movsd %xmm0, 0x80048(%rax)
movq 0xb79f(%rip), %rax      # 0x22750
movq 0x8(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movq 0x10(%rsp), %rdi
callq 0x16ff0
movq 0xb77d(%rip), %rax      # 0x22748
movq 0x8(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0xb784(%rip), %rax      # 0x22760
addq $0x1, %rax
movq %rax, 0xb779(%rip)      # 0x22760
addq $0x18, %rsp
retq
nopl (%rax)