#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define ITER 4000

typedef struct Map{
	int length;
	double *A;
	int *x;
	int *dx;
	int *y;
	int *dy;
	int *delta;
	int *phi;
}Map;

typedef struct Coefs{
	int length;
	double *x;
	double *dx;
	double *y;
	double *dy;
	double *delta;
	double *phi;
}Coefs;

typedef struct Vars{
	double mass;
	double momentum;
	double kinEn;
	double gamma;
	double beta;
	double mAnomalyG;
	double spinTuneGgamma;
	double lRefOrbit;
}Vars;

void scanFile(FILE* fp, int *size){
	char* line = (char*)malloc(200*sizeof(char));
	line = fgets(line, 200, fp);
	if(strncmp(line, "     I  COEFFICIENT            ORDER EXPONENTS", 46)!=0){
		if(strncmp(line, "     ALL COMPONENTS ZERO ", 25)!=0){
			exit(EXIT_FAILURE);
		}else{
			*size=1;
		}
	}else{
		for((*size)=0;!strstr((line = fgets(line, 200, fp)), "------");(*size)++);
	}
	free(line);
}

void mallocMap(Map *m, int p){
	(*m).length = p;
	if(p>0){
		(*m).A = (double*)calloc(p,sizeof(double));
		(*m).x = (int*)calloc(p,sizeof(int));
		(*m).dx = (int*)calloc(p,sizeof(int));
		(*m).y = (int*)calloc(p,sizeof(int));
		(*m).dy = (int*)calloc(p,sizeof(int));
		(*m).delta = (int*)calloc(p,sizeof(int));
		(*m).phi = (int*)calloc(p,sizeof(int));
	}
}

void freeMap(Map *m){
	if((*m).length > 0){
		free((*m).A);
		free((*m).x);
		free((*m).dx);
		free((*m).y);
		free((*m).dy);
		free((*m).delta);
		free((*m).phi);
	}
}

void mallocCoefs(Coefs **c, int iter, int p){
	if(iter>0){
		int i;
		(*c) = (Coefs*) malloc(p*sizeof(Coefs));
		for(i=0;i<p;i++){
			(*c)[i].length = iter;
			(*c)[i].x = (double*)calloc(iter,sizeof(double));
			(*c)[i].dx = (double*)calloc(iter,sizeof(double));
			(*c)[i].y = (double*)calloc(iter,sizeof(double));
			(*c)[i].dy = (double*)calloc(iter,sizeof(double));
			(*c)[i].delta = (double*)calloc(iter,sizeof(double));
			(*c)[i].phi = (double*)calloc(iter,sizeof(double));
		}
	}
}

void freeCoefs(Coefs **c, int p){
	if((*c)[0].length > 0){
		int i;
		for(i=0;i<p;i++){
			free((*c)[i].x);
			free((*c)[i].dx);
			free((*c)[i].y);
			free((*c)[i].dy);
			free((*c)[i].delta);
			free((*c)[i].phi);
		}
		free(*c);
	}
}

void readMap(FILE *fp, Map *m, int nr){
	char* line = (char*)malloc(200*sizeof(char));
	line = fgets(line, 200, fp);
	int dum1, dum2;
	if(strncmp(line, "     I  COEFFICIENT            ORDER EXPONENTS", 46)!=0){
		if(strncmp(line, "     ALL COMPONENTS ZERO ", 25)!=0){
			exit(EXIT_FAILURE);
		}
		else{
			(*m).A[0] = 1.0;
			(*m).x[0] = nr == 0?1:0;
			(*m).dx[0] = nr == 1?1:0;
			(*m).y[0] = nr == 2?1:0;
			(*m).dy[0] = nr == 3?1:0;
			(*m).delta[0] = nr == 4?1:0;
			(*m).phi[0] = nr == 5?1:0;
		}
	}
	for(int i=0;!strstr((line = fgets(line, 200, fp)), "------");i++){
		//TODO read chars ipv ints
		sscanf(line,"%d %lf %d %d %d %d %d %d %d",
			&dum1,
			&((*m).A[i]),
			&dum2,
			&((*m).x[i]),
			&((*m).dx[i]),
			&((*m).y[i]),
			&((*m).dy[i]),
			&((*m).delta[i]),
			&((*m).phi[i])
			);
	}
	free(line);
}

void readVars(FILE *fp, Vars *v){
	char* line = (char*)malloc(200*sizeof(char));
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store muon mass\n");
	if (sscanf(line,"Muon Mass =   %lf MeV/c^2",&((*v).mass)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store muon momentum\n");
	if (sscanf(line,"Muon Momentum =   %lf MeV/c",&((*v).momentum)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store muon kin energy\n");
	if (sscanf(line,"Muon Kinetic Energy =   %lf MeV",&((*v).kinEn)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon gamma\n");
	if (sscanf(line,"Muon gamma =   %lf",&((*v).gamma)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon beta\n");
	if (sscanf(line,"Muon beta =  %lf",&((*v).beta)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon Anomaly G\n");
	if (sscanf(line,"Muon Anomaly G =  %lf",&((*v).mAnomalyG)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon Spin Tune G.gamma\n");
	if (sscanf(line,"Muon Spin Tune G.gamma =  %lf",&((*v).spinTuneGgamma)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	if (sscanf(line," L    %lf",&((*v).lRefOrbit)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	if (line[1] !='P') exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	if (line[1] !='A') exit(EXIT_FAILURE);
	free(line);
}

void sumArrayHelper(double *nums, int length, int interval){
	int index = 0;
	int next = interval/2;
	do{
		if(next < length){
			nums[index] += nums[next];
		}
		index += interval;
		next += interval;
	} while (index < length);
}

double sumArray(double *nums, int length){
	if(length <= 0){
		return 0;
	}
	int interval = 2;
	while(interval < length*2){
		sumArrayHelper(nums, length, interval);
		interval *= 2;
	}
	return nums[0];
}

void scanCoefs(char *fileName, int *count){
	char* line = (char*)malloc(200*sizeof(char));
	FILE *fp = fopen(fileName, "r");
	if( fp == NULL ){
		fprintf(stderr, "Error while opening the coefficients file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	for((*count)=0;fgets(line, 200, fp) != NULL;(*count)++){
		if( strncmp(line, "\n", 1)==0 || strncmp(line, "\0", 1)==0){
			(*count)--;
		}
	}
	if(!feof(fp)){
		fprintf(stderr, "Something was wrong with the coefficient file!");
		exit(EXIT_FAILURE);
	}
	fclose(fp);
	free(line);
}

void getCoefs(Coefs *c){
	fprintf(stderr, "Begin values of the 6 dimentions: ");

	scanf("%lf %lf %lf %lf %lf %lf",
		&((*c).x[0]),
		&((*c).dx[0]),
		&((*c).y[0]),
		&((*c).dy[0]),
		&((*c).delta[0]),
		&((*c).phi[0])
		);
}

void readCoefs(Coefs **c, char *fileName, int count){
	FILE *fp = fopen(fileName, "r");
	if( fp == NULL ){
		fprintf(stderr, "Error while opening the coefficients file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	int i;
	for(i=0;i<count;i++){
		fscanf(fp, "%lf %lf %lf %lf %lf %lf",
			&((*c)[i].x[0]),
			&((*c)[i].dx[0]),
			&((*c)[i].y[0]),
			&((*c)[i].dy[0]),
			&((*c)[i].delta[0]),
			&((*c)[i].phi[0])
			);
	}
	fclose(fp);
}

void calcCoefs(Coefs *c, int idx, Map *m, double *newValue){
	double *nums = (double*)calloc((*m).length,sizeof(double));

	for(int i = 0; i < (*m).length; i++) {
		nums[i] = (*m).A[i] * pow((*c).x[idx],(*m).x[i])
			* pow((*c).dx[idx],(*m).dx[i])
			* pow((*c).y[idx],(*m).y[i])
			* pow((*c).dy[idx],(*m).dy[i])
			* pow((*c).delta[idx],(*m).delta[i])
			* pow((*c).phi[idx],(*m).phi[i]);
	}

	*newValue = sumArray(nums, (*m).length);
	free(nums);
}

int main(int argc, char **argv){
	char fileName[200] = "";
	char coefsFileName[200] = "";
	char outputFileName[200] = "";
	int separateFiles = 0;
	int xSize, dxSize, ySize, dySize, deltaSize, phiSize, argcCounter, particleCount = 1, iter = ITER;
	Map x, dx, y, dy, delta, phi;
	Coefs *c;
	Vars v;

	// Read the program arguments
	argcCounter = argc;
	while ((argcCounter > 1) && (argv[1][0] == '-'))
	{
		if(argv[1][2] == '=' && argv[1][3] != '\0'){
			switch (argv[1][1]){
			case 'm':
				sprintf(fileName, "%s",&argv[1][3]);
				break;

			case 'c':
				sprintf(coefsFileName ,"%s",&argv[1][3]);
				break;

			case 'o':
				sprintf(outputFileName ,"%s",&argv[1][3]);
				break;

			case 'i':
				sscanf(&argv[1][3] ,"%d", &iter);
				break;

			default:
				fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
				exit(EXIT_FAILURE);
			}
		}else{
			switch (argv[1][1]){
			case 's':
				separateFiles = 1;
				break;
			case '-':
				if(!strstr(&argv[1][2], "help") || argv[1][6] != '\0'){
					fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
					exit(EXIT_FAILURE);
				}
			case 'h':
				if(strstr(&argv[1][2], "help") ||  argv[1][2] == '\0'){
					printf("Calculates a certain amount of steps of a charged particle in a inhomogeneous\nmagnetic field.\n\n");
					printf("<executable> (-h|--help) | <executable> [-m=<mapFileName>] [-c=<coeffFileName>]\n[-o=<outputFileName> [-s]] [-i=<nr>]\n\n");
					printf("-h, --help\t\t Display help\n");
					printf("-m=<mapFileName>\t Set the map file to be <mapFileName>. If not set, it\n\t\t\t will be asked for in the program itself.\n");
					printf("-c=<coeffFileName>\t Set the coefficients file to be <coeffFileName>. If\n\t\t\t not set, it will be asked for in the program itself.\n\t\t\t Note that the coefficients file supports multiple\n\t\t\t particles, while if the program is run without this\n\t\t\t file, it supports only one particle.\n");
					printf("-o=<outputFileName>\t Set the output file to be <outputFileName>. If not\n\t\t\t set, it will default to stdout\n");
					printf("-s\t\t\t Choose if you want one output file or (if applicable)\n\t\t\t multiple output files. Note that this parameter can\n\t\t\t only be set if an output file is set.\n");
					printf("-i=<nr>\t\t\t Set the number of iterations to <nr>. If not set, it\n\t\t\t will default to 4000.\n");
					exit(EXIT_SUCCESS);
				}else{
					fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
					exit(EXIT_FAILURE);
				}
				break;

			default:
				fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
				exit(EXIT_FAILURE);
			}
		}
		++argv;
		--argcCounter;
	}
	if(separateFiles == 1 && strncmp(outputFileName, "\0", 1)==0){
		fprintf(stderr, "-s shouldn't be used without setting an output file");
		exit(EXIT_FAILURE);
	}

	// if not set in argument, ask for file name of the map file
	if(strncmp(fileName, "\0", 1)==0){
		fprintf(stderr, "Filename of the map: ");
		scanf("%s", fileName);
	}

	// use the map file to gather the sizes of the 6 coefficients
	fprintf(stderr, "open file\n");
	FILE *scanFileP = fopen(fileName, "r");
	fprintf(stderr, "check if file is NULL\n");
	if( scanFileP == NULL ){
		fprintf(stderr, "Error while opening the map file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	fprintf(stderr, "Get map sizes\n");
	char* line = (char*)malloc(200*sizeof(char));
	do{
		line = fgets(line, 200, scanFileP);
	}while(!strstr(line, " A "));
	free(line);
	scanFile(scanFileP, &xSize);
	scanFile(scanFileP, &dxSize);
	scanFile(scanFileP, &ySize);
	scanFile(scanFileP, &dySize);
	scanFile(scanFileP, &deltaSize);
	scanFile(scanFileP, &phiSize);
	fclose(scanFileP);
	fprintf(stderr, "\nmap sizes: %d %d %d %d %d %d\n", xSize, dxSize, ySize, dySize, deltaSize, phiSize);

	// allocate memory for the map
	fprintf(stderr, "\nmap x\n");
	mallocMap(&x, xSize);
	fprintf(stderr, "map dx\n");
	mallocMap(&dx, dxSize);
	fprintf(stderr, "map y\n");
	mallocMap(&y, ySize);
	fprintf(stderr, "map dy\n");
	mallocMap(&dy, dySize);
	fprintf(stderr, "map delta\n");
	mallocMap(&delta, deltaSize);
	fprintf(stderr, "map phi\n");
	mallocMap(&phi, phiSize);

	// read some variables and the map lines from the map file
	fprintf(stderr, "open file\n");
	FILE *mapFileP = fopen(fileName, "r");
	fprintf(stderr, "check if file is NULL\n");
	if( mapFileP == NULL ){
		fprintf(stderr, "Error while opening the map file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	fprintf(stderr, "read vars");
	readVars(mapFileP,&v);
	fprintf(stderr, "read x\n");
	readMap(mapFileP, &x, 0);
	fprintf(stderr, "read dx\n");
	readMap(mapFileP, &dx, 1);
	fprintf(stderr, "read y\n");
	readMap(mapFileP, &y, 2);
	fprintf(stderr, "read dy\n");
	readMap(mapFileP, &dy, 3);
	fprintf(stderr, "read delta\n");
	readMap(mapFileP, &delta, 4);
	fprintf(stderr, "read phi\n");
	readMap(mapFileP, &phi, 5);
	fclose(mapFileP);


	// allocate mempry for the coefficients

	// read the coefficients from user input
	if(strncmp(coefsFileName, "\0", 1)==0){
		fprintf(stderr, "map coefs\n");
		mallocCoefs(&c, iter, particleCount);
		fprintf(stderr, "read coefs\n");
		getCoefs(c);
	}else{
		scanCoefs(coefsFileName, &particleCount);
		fprintf(stderr, "map coefs\n");
		mallocCoefs(&c, iter, particleCount);
		fprintf(stderr, "read coefs\n");
		readCoefs(&c, coefsFileName, particleCount);
		fprintf(stderr, "Particle count: %d\n", particleCount);
	}
	// calculate the coefficients for 4000 iterations
	for(int n = 0;n < particleCount;n++){
		for(int i = 0;i < iter-1;i++){
			calcCoefs(&c[n], i, &x, &(c[n].x[i+1]));
			calcCoefs(&c[n], i, &dx, &(c[n].dx[i+1]));
			calcCoefs(&c[n], i, &y, &(c[n].y[i+1]));
			calcCoefs(&c[n], i, &dy, &(c[n].dy[i+1]));
			calcCoefs(&c[n], i, &delta, &(c[n].delta[i+1]));
			calcCoefs(&c[n], i, &phi, &(c[n].phi[i+1]));
		}

		// show or save the coefficients 
		FILE* outputFile;
		char fullOutputFileName[200] = "";
		if(!strncmp(outputFileName, "\0", 1)==0){
			if(separateFiles==1){
				sprintf(fullOutputFileName, "part%09d.%s", n+1, outputFileName);
			}else{
				sprintf(fullOutputFileName, "%s", outputFileName);
			}
			if(n==0){
				outputFile = fopen(fullOutputFileName, "w");
			}else{
				if(separateFiles==1){
					outputFile = fopen(fullOutputFileName, "w");
				}else{
					outputFile = fopen(fullOutputFileName, "a");
				}
			}
			if( outputFile == NULL ){
				fprintf(stderr, "Error while opening the output file: %s\n", fullOutputFileName);
				exit(EXIT_FAILURE);
			}
		}else{
			outputFile = stdout;
		}
		for(int i = 0;i < iter;i++){
			fprintf(outputFile, "%10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n", c[n].x[i], c[n].dx[i], c[n].y[i], c[n].dy[i], c[n].delta[i], c[n].phi[i]);
		}
		fprintf(outputFile, "\n");
		if(!strncmp(outputFileName, "\0", 1)==0){
			fclose(outputFile);
		}
	}

	// clean up the heap and tell that the computation is finished
	freeMap(&x);
	freeMap(&dx);
	freeMap(&y);
	freeMap(&dy);
	freeMap(&delta);
	freeMap(&phi);
	freeCoefs(&c, particleCount);
	fprintf(stderr, "Output is created. Press Enter to continue...\n");
	getchar();
	if(strncmp(coefsFileName, "\0", 1)==0){
		getchar();
	}
	return 0;
}

	.file	"tmpxft_00255db5_00000000-6_kernel.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2043:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2043:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"     I  COEFFICIENT            ORDER EXPONENTS"
.LC1:
	.string	"     ALL COMPONENTS ZERO "
.LC2:
	.string	"------"
	.text
	.globl	_Z8scanFileP8_IO_FILEPi
	.type	_Z8scanFileP8_IO_FILEPi, @function
_Z8scanFileP8_IO_FILEPi:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	movl	$200, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	pushq	%rdx
	.cfi_def_cfa_offset 48
	call	malloc@PLT
	movq	%r12, %rcx
	movl	$200, %edx
	movl	$200, %esi
	movq	%rax, %rdi
	call	__fgets_chk@PLT
	movl	$46, %edx
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L3
	movl	$25, %edx
	leaq	.LC1(%rip), %rsi
	movq	%rbx, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L4
	movl	$1, %edi
	call	exit@PLT
.L4:
	movl	$1, 0(%rbp)
	jmp	.L5
.L3:
	movl	%eax, 0(%rbp)
	orq	$-1, %rsi
	movq	%rbx, %rdi
	movq	%r12, %rcx
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	%r13, %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L5
	movl	0(%rbp), %eax
	incl	%eax
	jmp	.L3
.L5:
	popq	%rax
	.cfi_def_cfa_offset 40
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE2027:
	.size	_Z8scanFileP8_IO_FILEPi, .-_Z8scanFileP8_IO_FILEPi
	.globl	_Z9mallocMapP3Mapi
	.type	_Z9mallocMapP3Mapi, @function
_Z9mallocMapP3Mapi:
.LFB2028:
	.cfi_startproc
	endbr64
	movl	%esi, (%rdi)
	testl	%esi, %esi
	jle	.L14
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movslq	%esi, %rbx
	movl	$8, %esi
	pushq	%rax
	.cfi_def_cfa_offset 32
	movq	%rbx, %rdi
	call	calloc@PLT
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%rax, 8(%rbp)
	call	calloc@PLT
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%rax, 16(%rbp)
	call	calloc@PLT
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%rax, 24(%rbp)
	call	calloc@PLT
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%rax, 32(%rbp)
	call	calloc@PLT
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%rax, 40(%rbp)
	call	calloc@PLT
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%rax, 48(%rbp)
	call	calloc@PLT
	movq	%rax, 56(%rbp)
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z9mallocMapP3Mapi, .-_Z9mallocMapP3Mapi
	.globl	_Z7freeMapP3Map
	.type	_Z7freeMapP3Map, @function
_Z7freeMapP3Map:
.LFB2029:
	.cfi_startproc
	endbr64
	cmpl	$0, (%rdi)
	jle	.L17
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	call	free@PLT
	movq	16(%rbx), %rdi
	call	free@PLT
	movq	24(%rbx), %rdi
	call	free@PLT
	movq	32(%rbx), %rdi
	call	free@PLT
	movq	40(%rbx), %rdi
	call	free@PLT
	movq	48(%rbx), %rdi
	call	free@PLT
	movq	56(%rbx), %rdi
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 8
	jmp	free@PLT
.L17:
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z7freeMapP3Map, .-_Z7freeMapP3Map
	.globl	_Z11mallocCoefsPP5Coefsii
	.type	_Z11mallocCoefsPP5Coefsii, @function
_Z11mallocCoefsPP5Coefsii:
.LFB2030:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L28
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rdi, %rbp
	movslq	%edx, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	imulq	$56, %rdi, %rdi
	call	malloc@PLT
	movq	%rax, 0(%rbp)
	movq	%rax, %rbx
	movslq	%r12d, %rbp
.L24:
	cmpl	%r14d, %r13d
	jle	.L31
	movl	%r12d, (%rbx)
	movl	$8, %esi
	movq	%rbp, %rdi
	incl	%r14d
	addq	$56, %rbx
	call	calloc@PLT
	movl	$8, %esi
	movq	%rbp, %rdi
	movq	%rax, -48(%rbx)
	call	calloc@PLT
	movl	$8, %esi
	movq	%rbp, %rdi
	movq	%rax, -40(%rbx)
	call	calloc@PLT
	movl	$8, %esi
	movq	%rbp, %rdi
	movq	%rax, -32(%rbx)
	call	calloc@PLT
	movl	$8, %esi
	movq	%rbp, %rdi
	movq	%rax, -24(%rbx)
	call	calloc@PLT
	movl	$8, %esi
	movq	%rbp, %rdi
	movq	%rax, -16(%rbx)
	call	calloc@PLT
	movq	%rax, -8(%rbx)
	jmp	.L24
.L31:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z11mallocCoefsPP5Coefsii, .-_Z11mallocCoefsPP5Coefsii
	.globl	_Z9freeCoefsPP5Coefsi
	.type	_Z9freeCoefsPP5Coefsi, @function
_Z9freeCoefsPP5Coefsi:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	cmpl	$0, (%rax)
	jg	.L39
	ret
.L39:
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 48
.L33:
	movq	(%rbx), %rdi
	cmpl	%r12d, %r13d
	jle	.L42
	imulq	$56, %r12, %rbp
	incq	%r12
	movq	8(%rdi,%rbp), %rdi
	call	free@PLT
	movq	(%rbx), %rax
	movq	16(%rax,%rbp), %rdi
	call	free@PLT
	movq	(%rbx), %rax
	movq	24(%rax,%rbp), %rdi
	call	free@PLT
	movq	(%rbx), %rax
	movq	32(%rax,%rbp), %rdi
	call	free@PLT
	movq	(%rbx), %rax
	movq	40(%rax,%rbp), %rdi
	call	free@PLT
	movq	(%rbx), %rax
	movq	48(%rax,%rbp), %rdi
	call	free@PLT
	jmp	.L33
.L42:
	popq	%rax
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE2031:
	.size	_Z9freeCoefsPP5Coefsi, .-_Z9freeCoefsPP5Coefsi
	.section	.rodata.str1.1
.LC4:
	.string	"%d %lf %d %d %d %d %d %d %d"
	.text
	.globl	_Z7readMapP8_IO_FILEP3Mapi
	.type	_Z7readMapP8_IO_FILEP3Mapi, @function
_Z7readMapP8_IO_FILEP3Mapi:
.LFB2032:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rdi, %r13
	movl	$200, %edi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rsi, %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	movl	$200, %edx
	movl	$200, %esi
	movq	%r13, %rcx
	movq	%rax, %rdi
	call	__fgets_chk@PLT
	movl	$46, %edx
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbp
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L44
	movl	$25, %edx
	leaq	.LC1(%rip), %rsi
	movq	%rbp, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L45
	movl	$1, %edi
	call	exit@PLT
.L45:
	movq	8(%rbx), %rax
	movq	.LC3(%rip), %rcx
	xorl	%edx, %edx
	testl	%r12d, %r12d
	sete	%dl
	movq	%rcx, (%rax)
	movq	16(%rbx), %rax
	movl	%edx, (%rax)
	movq	24(%rbx), %rax
	xorl	%edx, %edx
	cmpl	$1, %r12d
	sete	%dl
	movl	%edx, (%rax)
	movq	32(%rbx), %rax
	xorl	%edx, %edx
	cmpl	$2, %r12d
	sete	%dl
	movl	%edx, (%rax)
	movq	40(%rbx), %rax
	xorl	%edx, %edx
	cmpl	$3, %r12d
	sete	%dl
	movl	%edx, (%rax)
	movq	48(%rbx), %rax
	xorl	%edx, %edx
	cmpl	$4, %r12d
	sete	%dl
	movl	%edx, (%rax)
	xorl	%edx, %edx
	movq	56(%rbx), %rax
	cmpl	$5, %r12d
	sete	%dl
	movl	%edx, (%rax)
.L44:
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %r14
.L46:
	orq	$-1, %rsi
	movq	%rbp, %rdi
	movq	%r13, %rcx
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	%r14, %rsi
	movq	%rax, %rdi
	movq	%rax, %rbp
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L53
	movq	%rsp, %rdx
	leaq	(%r12,%r12), %rcx
	addq	8(%rbx), %rcx
	pushq	%rsi
	.cfi_def_cfa_offset 72
	movq	56(%rbx), %rax
	leaq	.LC4(%rip), %rsi
	movq	%rbp, %rdi
	addq	%r12, %rax
	pushq	%rax
	.cfi_def_cfa_offset 80
	movq	48(%rbx), %rax
	addq	%r12, %rax
	pushq	%rax
	.cfi_def_cfa_offset 88
	movq	40(%rbx), %rax
	addq	%r12, %rax
	pushq	%rax
	.cfi_def_cfa_offset 96
	movq	32(%rbx), %rax
	addq	%r12, %rax
	pushq	%rax
	.cfi_def_cfa_offset 104
	movq	24(%rbx), %rax
	addq	%r12, %rax
	pushq	%rax
	.cfi_def_cfa_offset 112
	movq	16(%rbx), %r9
	xorl	%eax, %eax
	addq	%r12, %r9
	addq	$4, %r12
	leaq	52(%rsp), %r8
	call	__isoc23_sscanf@PLT
	addq	$48, %rsp
	.cfi_def_cfa_offset 64
	jmp	.L46
.L53:
	movq	%rbp, %rdi
	call	free@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2032:
	.size	_Z7readMapP8_IO_FILEP3Mapi, .-_Z7readMapP8_IO_FILEP3Mapi
	.section	.rodata.str1.1
.LC5:
	.string	"check and store muon mass\n"
.LC6:
	.string	"Muon Mass =   %lf MeV/c^2"
.LC7:
	.string	"check and store muon momentum\n"
.LC8:
	.string	"Muon Momentum =   %lf MeV/c"
.LC9:
	.string	"check and store muon kin energy\n"
.LC10:
	.string	"Muon Kinetic Energy =   %lf MeV"
.LC11:
	.string	"check and store Muon gamma\n"
.LC12:
	.string	"Muon gamma =   %lf"
.LC13:
	.string	"check and store Muon beta\n"
.LC14:
	.string	"Muon beta =  %lf"
.LC15:
	.string	"check and store Muon Anomaly G\n"
.LC16:
	.string	"Muon Anomaly G =  %lf"
.LC17:
	.string	"check and store Muon Spin Tune G.gamma\n"
.LC18:
	.string	"Muon Spin Tune G.gamma =  %lf"
.LC19:
	.string	" L    %lf"
	.text
	.globl	_Z8readVarsP8_IO_FILEP4Vars
	.type	_Z8readVarsP8_IO_FILEP4Vars, @function
_Z8readVarsP8_IO_FILEP4Vars:
.LFB2033:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	movl	$200, %edi
	call	malloc@PLT
	movq	%rbx, %rcx
	movl	$200, %edx
	movl	$200, %esi
	movq	%rax, %rdi
	call	__fgets_chk@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC5(%rip), %rdx
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	movq	%rbp, %rdx
	movq	%r12, %rdi
	leaq	.LC6(%rip), %rsi
	call	__isoc23_sscanf@PLT
	decl	%eax
	je	.L55
.L56:
	movl	$1, %edi
	call	exit@PLT
.L55:
	movq	%rbx, %rcx
	orq	$-1, %rsi
	movq	%r12, %rdi
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC7(%rip), %rdx
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	leaq	8(%rbp), %rdx
	movq	%r12, %rdi
	leaq	.LC8(%rip), %rsi
	call	__isoc23_sscanf@PLT
	decl	%eax
	jne	.L56
	movq	%rbx, %rcx
	orq	$-1, %rsi
	movq	%r12, %rdi
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC9(%rip), %rdx
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	leaq	16(%rbp), %rdx
	movq	%r12, %rdi
	leaq	.LC10(%rip), %rsi
	call	__isoc23_sscanf@PLT
	decl	%eax
	jne	.L56
	movq	%rbx, %rcx
	orq	$-1, %rsi
	movq	%r12, %rdi
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC11(%rip), %rdx
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	leaq	24(%rbp), %rdx
	movq	%r12, %rdi
	leaq	.LC12(%rip), %rsi
	call	__isoc23_sscanf@PLT
	decl	%eax
	jne	.L56
	movq	%rbx, %rcx
	orq	$-1, %rsi
	movq	%r12, %rdi
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC13(%rip), %rdx
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	leaq	32(%rbp), %rdx
	movq	%r12, %rdi
	leaq	.LC14(%rip), %rsi
	call	__isoc23_sscanf@PLT
	decl	%eax
	jne	.L56
	movq	%rbx, %rcx
	orq	$-1, %rsi
	movq	%r12, %rdi
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC15(%rip), %rdx
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	leaq	40(%rbp), %rdx
	movq	%r12, %rdi
	leaq	.LC16(%rip), %rsi
	call	__isoc23_sscanf@PLT
	decl	%eax
	jne	.L56
	movq	%rbx, %rcx
	orq	$-1, %rsi
	movq	%r12, %rdi
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC17(%rip), %rdx
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	leaq	48(%rbp), %rdx
	movq	%r12, %rdi
	leaq	.LC18(%rip), %rsi
	call	__isoc23_sscanf@PLT
	decl	%eax
	jne	.L56
	orq	$-1, %rsi
	movq	%r12, %rdi
	movq	%rbx, %rcx
	movl	$200, %edx
	call	__fgets_chk@PLT
	leaq	56(%rbp), %rdx
	leaq	.LC19(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__isoc23_sscanf@PLT
	decl	%eax
	jne	.L56
	orq	$-1, %rsi
	movq	%r12, %rdi
	movq	%rbx, %rcx
	movl	$200, %edx
	call	__fgets_chk@PLT
	cmpb	$80, 1(%rax)
	movq	%rax, %rdi
	jne	.L56
	orq	$-1, %rsi
	movq	%rbx, %rcx
	movl	$200, %edx
	call	__fgets_chk@PLT
	cmpb	$65, 1(%rax)
	movq	%rax, %rdi
	jne	.L56
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE2033:
	.size	_Z8readVarsP8_IO_FILEP4Vars, .-_Z8readVarsP8_IO_FILEP4Vars
	.globl	_Z14sumArrayHelperPdii
	.type	_Z14sumArrayHelperPdii, @function
_Z14sumArrayHelperPdii:
.LFB2034:
	.cfi_startproc
	endbr64
	movslq	%edx, %rcx
	movq	%rdi, %r8
	movl	$2, %edi
	movl	%ecx, %eax
	leaq	0(,%rcx,8), %r10
	cltd
	idivl	%edi
	movq	%r8, %rdi
	movslq	%eax, %rdx
.L60:
	cmpl	%edx, %esi
	jle	.L59
	movsd	(%rdi), %xmm0
	addsd	(%r8,%rdx,8), %xmm0
	movsd	%xmm0, (%rdi)
.L59:
	addq	%rcx, %rdx
	addq	%r10, %rdi
	movl	%edx, %r9d
	subl	%eax, %r9d
	cmpl	%r9d, %esi
	jg	.L60
	ret
	.cfi_endproc
.LFE2034:
	.size	_Z14sumArrayHelperPdii, .-_Z14sumArrayHelperPdii
	.globl	_Z8sumArrayPdi
	.type	_Z8sumArrayPdi, @function
_Z8sumArrayPdi:
.LFB2035:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L67
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r11
	leal	(%rsi,%rsi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	$2, %ebx
.L64:
	cmpl	%ebp, %ebx
	jge	.L72
	movl	%ebx, %edx
	movq	%r11, %rdi
	addl	%ebx, %ebx
	call	_Z14sumArrayHelperPdii
	jmp	.L64
.L72:
	movsd	(%r11), %xmm0
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L67:
	.cfi_restore 3
	.cfi_restore 6
	xorps	%xmm0, %xmm0
	ret
	.cfi_endproc
.LFE2035:
	.size	_Z8sumArrayPdi, .-_Z8sumArrayPdi
	.section	.rodata.str1.1
.LC21:
	.string	"r"
.LC22:
	.string	"Error while opening the coefficients file: %s\n"
.LC23:
	.string	"Something was wrong with the coefficient file!"
	.text
	.globl	_Z9scanCoefsPcPi
	.type	_Z9scanCoefsPcPi, @function
_Z9scanCoefsPcPi:
.LFB2036:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r13
	movl	$200, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	pushq	%rdx
	.cfi_def_cfa_offset 48
	call	malloc@PLT
	leaq	.LC21(%rip), %rsi
	movq	%r13, %rdi
	movq	%rax, %r12
	call	fopen@PLT
	movq	%rax, %rbx
	xorl	%eax, %eax
	testq	%rbx, %rbx
	jne	.L74
	movq	stderr(%rip), %rdi
	movq	%r13, %rcx
	movl	$2, %esi
	leaq	.LC22(%rip), %rdx
	call	__fprintf_chk@PLT
	jmp	.L86
.L77:
	movb	(%r12), %al
	testb	%al, %al
	je	.L80
	cmpb	$10, %al
	je	.L80
.L75:
	movl	0(%rbp), %eax
	incl	%eax
.L74:
	movl	%eax, 0(%rbp)
	movq	%rbx, %rcx
	movl	$200, %edx
	movl	$200, %esi
	movq	%r12, %rdi
	call	__fgets_chk@PLT
	testq	%rax, %rax
	jne	.L77
	jmp	.L87
.L80:
	decl	0(%rbp)
	jmp	.L75
.L87:
	movq	%rbx, %rdi
	call	feof@PLT
	testl	%eax, %eax
	jne	.L78
	movq	stderr(%rip), %rdi
	leaq	.LC23(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
.L86:
	movl	$1, %edi
	call	exit@PLT
.L78:
	movq	%rbx, %rdi
	call	fclose@PLT
	popq	%rax
	.cfi_def_cfa_offset 40
	movq	%r12, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE2036:
	.size	_Z9scanCoefsPcPi, .-_Z9scanCoefsPcPi
	.section	.rodata.str1.1
.LC24:
	.string	"Begin values of the 6 dimentions: "
.LC25:
	.string	"%lf %lf %lf %lf %lf %lf"
	.text
	.globl	_Z8getCoefsP5Coefs
	.type	_Z8getCoefsP5Coefs, @function
_Z8getCoefsP5Coefs:
.LFB2037:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC24(%rip), %rdx
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movq	24(%rbx), %rcx
	movq	16(%rbx), %rdx
	leaq	.LC25(%rip), %rdi
	movq	8(%rbx), %rsi
	pushq	%rax
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	pushq	48(%rbx)
	.cfi_def_cfa_offset 32
	movq	40(%rbx), %r9
	movq	32(%rbx), %r8
	call	__isoc23_scanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rcx
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2037:
	.size	_Z8getCoefsP5Coefs, .-_Z8getCoefsP5Coefs
	.globl	_Z9readCoefsPP5CoefsPci
	.type	_Z9readCoefsPP5CoefsPci, @function
_Z9readCoefsPP5CoefsPci:
.LFB2038:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	leaq	.LC21(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	movq	%r15, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	pushq	%r8
	.cfi_def_cfa_offset 64
	call	fopen@PLT
	testq	%rax, %rax
	jne	.L95
	movq	stderr(%rip), %rdi
	movq	%r15, %rcx
	movl	$2, %esi
	xorl	%eax, %eax
	leaq	.LC22(%rip), %rdx
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L95:
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	leaq	.LC25(%rip), %r13
.L91:
	cmpl	%r14d, %ebp
	jle	.L97
	imulq	$56, %r14, %rax
	addq	(%r12), %rax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	16(%rax), %rcx
	movq	8(%rax), %rdx
	incq	%r14
	movq	32(%rax), %r9
	movq	24(%rax), %r8
	pushq	48(%rax)
	.cfi_def_cfa_offset 72
	pushq	40(%rax)
	.cfi_def_cfa_offset 80
	xorl	%eax, %eax
	call	__isoc23_fscanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 72
	popq	%rcx
	.cfi_def_cfa_offset 64
	jmp	.L91
.L97:
	popq	%rax
	.cfi_def_cfa_offset 56
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	fclose@PLT
	.cfi_endproc
.LFE2038:
	.size	_Z9readCoefsPP5CoefsPci, .-_Z9readCoefsPP5CoefsPci
	.globl	_Z9calcCoefsP5CoefsiP3MapPd
	.type	_Z9calcCoefsP5CoefsiP3MapPd, @function
_Z9calcCoefsP5CoefsiP3MapPd:
.LFB2039:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rcx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%esi, %rbx
	movl	$8, %esi
	salq	$3, %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movslq	(%rdx), %rdi
	movq	%rdi, %r15
	call	calloc@PLT
	movq	%rax, 8(%rsp)
.L99:
	cmpl	%ebp, %r15d
	jle	.L102
	movq	8(%r13), %rax
	movq	8(%r12), %rcx
	movsd	(%rax,%rbp,8), %xmm2
	movq	16(%r13), %rax
	movsd	(%rcx,%rbx), %xmm0
	cvtsi2sdl	(%rax,%rbp,4), %xmm1
	movsd	%xmm2, 16(%rsp)
	call	pow@PLT
	movq	24(%r13), %rax
	movq	16(%r12), %rcx
	movsd	%xmm0, 56(%rsp)
	cvtsi2sdl	(%rax,%rbp,4), %xmm1
	movsd	(%rcx,%rbx), %xmm0
	call	pow@PLT
	movq	32(%r13), %rax
	movq	24(%r12), %rcx
	movsd	%xmm0, 48(%rsp)
	cvtsi2sdl	(%rax,%rbp,4), %xmm1
	movsd	(%rcx,%rbx), %xmm0
	call	pow@PLT
	movq	40(%r13), %rax
	movq	32(%r12), %rcx
	movsd	%xmm0, 40(%rsp)
	cvtsi2sdl	(%rax,%rbp,4), %xmm1
	movsd	(%rcx,%rbx), %xmm0
	call	pow@PLT
	movq	48(%r13), %rax
	movq	40(%r12), %rcx
	movsd	%xmm0, 32(%rsp)
	cvtsi2sdl	(%rax,%rbp,4), %xmm1
	movsd	(%rcx,%rbx), %xmm0
	call	pow@PLT
	movq	56(%r13), %rax
	movq	48(%r12), %rcx
	movsd	%xmm0, 24(%rsp)
	cvtsi2sdl	(%rax,%rbp,4), %xmm1
	movsd	(%rcx,%rbx), %xmm0
	call	pow@PLT
	movq	8(%rsp), %rax
	movaps	%xmm0, %xmm1
	movsd	16(%rsp), %xmm0
	mulsd	56(%rsp), %xmm0
	mulsd	48(%rsp), %xmm0
	mulsd	40(%rsp), %xmm0
	mulsd	32(%rsp), %xmm0
	mulsd	24(%rsp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, (%rax,%rbp,8)
	incq	%rbp
	jmp	.L99
.L102:
	movq	8(%rsp), %rdi
	movl	%r15d, %esi
	call	_Z8sumArrayPdi
	movq	8(%rsp), %rdi
	movsd	%xmm0, (%r14)
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE2039:
	.size	_Z9calcCoefsP5CoefsiP3MapPd, .-_Z9calcCoefsP5CoefsiP3MapPd
	.section	.rodata.str1.1
.LC26:
	.string	"%s"
.LC27:
	.string	"%d"
.LC28:
	.string	"Wrong Argument: %s\n"
.LC29:
	.string	"help"
.LC30:
	.string	"Calculates a certain amount of steps of a charged particle in a inhomogeneous\nmagnetic field.\n\n"
.LC31:
	.string	"<executable> (-h|--help) | <executable> [-m=<mapFileName>] [-c=<coeffFileName>]\n[-o=<outputFileName> [-s]] [-i=<nr>]\n\n"
.LC32:
	.string	"-h, --help\t\t Display help\n"
.LC33:
	.string	"-m=<mapFileName>\t Set the map file to be <mapFileName>. If not set, it\n\t\t\t will be asked for in the program itself.\n"
.LC34:
	.ascii	"-c=<coeffFileName>\t Set "
	.string	"the coefficients file to be <coeffFileName>. If\n\t\t\t not set, it will be asked for in the program itself.\n\t\t\t Note that the coefficients file supports multiple\n\t\t\t particles, while if the program is run without this\n\t\t\t file, it supports only one particle.\n"
.LC35:
	.string	"-o=<outputFileName>\t Set the output file to be <outputFileName>. If not\n\t\t\t set, it will default to stdout\n"
.LC36:
	.string	"-s\t\t\t Choose if you want one output file or (if applicable)\n\t\t\t multiple output files. Note that this parameter can\n\t\t\t only be set if an output file is set.\n"
.LC37:
	.string	"-i=<nr>\t\t\t Set the number of iterations to <nr>. If not set, it\n\t\t\t will default to 4000.\n"
.LC38:
	.string	"-s shouldn't be used without setting an output file"
.LC39:
	.string	"Filename of the map: "
.LC40:
	.string	"open file\n"
.LC41:
	.string	"check if file is NULL\n"
.LC42:
	.string	"Error while opening the map file: %s\n"
.LC43:
	.string	"Get map sizes\n"
.LC44:
	.string	" A "
.LC45:
	.string	"\nmap sizes: %d %d %d %d %d %d\n"
.LC46:
	.string	"\nmap x\n"
.LC47:
	.string	"map dx\n"
.LC48:
	.string	"map y\n"
.LC49:
	.string	"map dy\n"
.LC50:
	.string	"map delta\n"
.LC51:
	.string	"map phi\n"
.LC52:
	.string	"read vars"
.LC53:
	.string	"read x\n"
.LC54:
	.string	"read dx\n"
.LC55:
	.string	"read y\n"
.LC56:
	.string	"read dy\n"
.LC57:
	.string	"read delta\n"
.LC58:
	.string	"read phi\n"
.LC59:
	.string	"map coefs\n"
.LC60:
	.string	"read coefs\n"
.LC61:
	.string	"Particle count: %d\n"
.LC62:
	.string	"part%09d.%s"
.LC63:
	.string	"w"
.LC64:
	.string	"a"
.LC65:
	.string	"Error while opening the output file: %s\n"
.LC66:
	.string	"%10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n"
.LC67:
	.string	"\n"
.LC68:
	.string	"Output is created. Press Enter to continue...\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2040:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	xorl	%edx, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$1352, %rsp
	.cfi_def_cfa_offset 1408
	movq	%fs:40, %rax
	movq	%rax, 1336(%rsp)
	xorl	%eax, %eax
	leaq	536(%rsp), %rdi
	movl	%edx, 44(%rsp)
	leaq	536(%rsp), %rbp
	movl	$1, 72(%rsp)
	leaq	736(%rsp), %r14
	leaq	936(%rsp), %r15
	movl	$4000, 76(%rsp)
	rep stosl
	leaq	736(%rsp), %rdi
	movl	$50, %ecx
	rep stosl
	leaq	936(%rsp), %rdi
	movl	$50, %ecx
	rep stosl
.L104:
	cmpl	$1, %r12d
	jle	.L119
	movq	8(%rbx), %rcx
	cmpb	$45, (%rcx)
	jne	.L119
	movb	2(%rcx), %r13b
	movb	1(%rcx), %al
	cmpb	$61, %r13b
	jne	.L105
	cmpb	$0, 3(%rcx)
	je	.L105
	cmpb	$109, %al
	leaq	3(%rcx), %r8
	je	.L106
	jg	.L107
	cmpb	$99, %al
	je	.L108
	cmpb	$105, %al
	jne	.L117
	leaq	76(%rsp), %rdx
	leaq	.LC27(%rip), %rsi
	movq	%r8, %rdi
	xorl	%eax, %eax
	call	__isoc23_sscanf@PLT
	jmp	.L112
.L107:
	cmpb	$111, %al
	jne	.L117
	leaq	.LC26(%rip), %rcx
	movl	$200, %edx
	movl	$2, %esi
	movq	%r15, %rdi
	jmp	.L159
.L106:
	leaq	.LC26(%rip), %rcx
	movl	$200, %edx
	movl	$2, %esi
	movq	%rbp, %rdi
	jmp	.L159
.L108:
	leaq	.LC26(%rip), %rcx
	movl	$200, %edx
	movl	$2, %esi
	movq	%r14, %rdi
.L159:
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	jmp	.L112
.L105:
	cmpb	$104, %al
	je	.L114
	cmpb	$115, %al
	je	.L144
	cmpb	$45, %al
	leaq	.LC28(%rip), %rdx
	jne	.L162
	leaq	2(%rcx), %rdi
	leaq	.LC29(%rip), %rsi
	movq	%rcx, 8(%rsp)
	call	strstr@PLT
	movq	8(%rsp), %rcx
	leaq	.LC28(%rip), %rdx
	testq	%rax, %rax
	je	.L162
	cmpb	$0, 6(%rcx)
	jne	.L162
.L114:
	leaq	2(%rcx), %rdi
	leaq	.LC29(%rip), %rsi
	movq	%rcx, 8(%rsp)
	call	strstr@PLT
	testb	%r13b, %r13b
	je	.L145
	testq	%rax, %rax
	movq	8(%rsp), %rcx
	je	.L117
.L145:
	leaq	.LC30(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC31(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC32(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC33(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC34(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC35(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC36(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$2, %edi
	leaq	.LC37(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%edi, %edi
.L161:
	call	exit@PLT
.L117:
	leaq	.LC28(%rip), %rdx
	jmp	.L162
.L144:
	movl	$1, 44(%rsp)
.L112:
	addq	$8, %rbx
	decl	%r12d
	jmp	.L104
.L119:
	cmpl	$1, 44(%rsp)
	movq	stderr(%rip), %rdi
	jne	.L121
	cmpb	$0, 936(%rsp)
	jne	.L121
	leaq	.LC38(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	jmp	.L163
.L121:
	cmpb	$0, 536(%rsp)
	jne	.L122
	movl	$2, %esi
	leaq	.LC39(%rip), %rdx
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movq	%rbp, %rsi
	leaq	.LC26(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc23_scanf@PLT
.L122:
	movq	stderr(%rip), %rdi
	leaq	.LC40(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	leaq	.LC21(%rip), %rsi
	movq	%rbp, %rdi
	call	fopen@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC41(%rip), %rdx
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	testq	%rbx, %rbx
	movq	stderr(%rip), %rdi
	je	.L165
	leaq	.LC43(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$200, %edi
	leaq	.LC44(%rip), %r12
	call	malloc@PLT
	movq	%rax, %rdi
.L124:
	orq	$-1, %rsi
	movq	%rbx, %rcx
	movl	$200, %edx
	call	__fgets_chk@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	strstr@PLT
	movq	8(%rsp), %rdi
	testq	%rax, %rax
	je	.L124
	call	free@PLT
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	call	_Z8scanFileP8_IO_FILEPi
	leaq	52(%rsp), %rsi
	movq	%rbx, %rdi
	call	_Z8scanFileP8_IO_FILEPi
	leaq	56(%rsp), %rsi
	movq	%rbx, %rdi
	call	_Z8scanFileP8_IO_FILEPi
	leaq	60(%rsp), %rsi
	movq	%rbx, %rdi
	call	_Z8scanFileP8_IO_FILEPi
	leaq	64(%rsp), %rsi
	movq	%rbx, %rdi
	call	_Z8scanFileP8_IO_FILEPi
	leaq	68(%rsp), %rsi
	movq	%rbx, %rdi
	call	_Z8scanFileP8_IO_FILEPi
	movq	%rbx, %rdi
	call	fclose@PLT
	movl	68(%rsp), %ebx
	movl	64(%rsp), %r12d
	leaq	.LC45(%rip), %rdx
	movl	60(%rsp), %r13d
	movl	56(%rsp), %r9d
	movl	$2, %esi
	movl	52(%rsp), %r15d
	movl	48(%rsp), %r14d
	pushq	%rax
	.cfi_def_cfa_offset 1416
	xorl	%eax, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 1424
	movq	stderr(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 1432
	movl	%r15d, %r8d
	movl	%r14d, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 1440
	movl	%r9d, 40(%rsp)
	call	__fprintf_chk@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 1408
	movl	$2, %esi
	xorl	%eax, %eax
	movq	stderr(%rip), %rdi
	leaq	.LC46(%rip), %rdx
	call	__fprintf_chk@PLT
	leaq	88(%rsp), %rax
	movl	%r14d, %esi
	leaq	280(%rsp), %r14
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
	call	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC47(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	leaq	152(%rsp), %rax
	movl	%r15d, %esi
	leaq	216(%rsp), %r15
	movq	%rax, %rdi
	movq	%rax, 24(%rsp)
	call	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC48(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	8(%rsp), %esi
	movq	%r15, %rdi
	call	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC49(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%r13d, %esi
	movq	%r14, %rdi
	leaq	344(%rsp), %r13
	call	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC50(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%r12d, %esi
	movq	%r13, %rdi
	leaq	408(%rsp), %r12
	call	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC51(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%ebx, %esi
	movq	%r12, %rdi
	call	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC40(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	leaq	.LC21(%rip), %rsi
	movq	%rbp, %rdi
	call	fopen@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC41(%rip), %rdx
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	testq	%rbx, %rbx
	movq	stderr(%rip), %rdi
	jne	.L125
.L165:
	movq	%rbp, %rcx
	leaq	.LC42(%rip), %rdx
	movl	$2, %esi
	jmp	.L164
.L125:
	leaq	.LC52(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	leaq	472(%rsp), %rsi
	movq	%rbx, %rdi
	call	_Z8readVarsP8_IO_FILEP4Vars
	movq	stderr(%rip), %rdi
	leaq	.LC53(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movq	16(%rsp), %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC54(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movq	24(%rsp), %rsi
	movl	$1, %edx
	movq	%rbx, %rdi
	call	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC55(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$2, %edx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	call	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC56(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$3, %edx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC57(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$4, %edx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rdi
	leaq	.LC58(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$5, %edx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_Z7readMapP8_IO_FILEP3Mapi
	movq	%rbx, %rdi
	leaq	.LC60(%rip), %r12
	call	fclose@PLT
	leaq	80(%rsp), %rax
	cmpb	$0, 736(%rsp)
	leaq	.LC59(%rip), %rdx
	movq	%rax, 32(%rsp)
	jne	.L126
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	76(%rsp), %esi
	movq	32(%rsp), %rdi
	movl	$1, %edx
	call	_Z11mallocCoefsPP5Coefsii
	movq	%r12, %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	movq	stderr(%rip), %rdi
	call	__fprintf_chk@PLT
	movq	80(%rsp), %rdi
	call	_Z8getCoefsP5Coefs
.L128:
	xorl	%r12d, %r12d
	jmp	.L127
.L126:
	leaq	736(%rsp), %rbp
	leaq	72(%rsp), %rsi
	movq	%rbp, %rdi
	call	_Z9scanCoefsPcPi
	movq	stderr(%rip), %rdi
	leaq	.LC59(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	72(%rsp), %ebx
	movl	76(%rsp), %esi
	movq	32(%rsp), %rdi
	movl	%ebx, %edx
	call	_Z11mallocCoefsPP5Coefsii
	movq	%r12, %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	movq	stderr(%rip), %rdi
	call	__fprintf_chk@PLT
	movq	32(%rsp), %rdi
	movl	%ebx, %edx
	movq	%rbp, %rsi
	call	_Z9readCoefsPP5CoefsPci
	movq	stderr(%rip), %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	leaq	.LC61(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	jmp	.L128
.L131:
	movl	$2, %esi
	movl	$200, %edx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	leaq	.LC26(%rip), %rcx
	call	__sprintf_chk@PLT
	leaq	.LC64(%rip), %rsi
	testq	%r12, %r12
	je	.L132
.L160:
	movq	%rbx, %rdi
	call	fopen@PLT
	movq	%rax, %rbp
	testq	%rax, %rax
	jne	.L136
	movq	%rbx, %rcx
	leaq	.LC65(%rip), %rdx
.L162:
	movq	stderr(%rip), %rdi
	movl	$2, %esi
.L164:
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
.L163:
	movl	$1, %edi
	jmp	.L161
.L167:
	xorl	%eax, %eax
	leaq	.LC67(%rip), %rdx
	movl	$2, %esi
	movq	%rbp, %rdi
	call	__fprintf_chk@PLT
	cmpb	$0, 936(%rsp)
	je	.L139
	movq	%rbp, %rdi
	call	fclose@PLT
.L139:
	incq	%r12
.L127:
	movl	72(%rsp), %ebx
	cmpl	%r12d, %ebx
	jle	.L140
	imulq	$56, %r12, %r14
	xorl	%r13d, %r13d
	leaq	216(%rsp), %r15
.L141:
	movl	76(%rsp), %eax
	movl	%r13d, 8(%rsp)
	incq	%r13
	leal	-1(%r13), %ecx
	leal	-1(%rax), %edx
	cmpl	%ecx, %edx
	jle	.L166
	movq	80(%rsp), %rbx
	leaq	0(,%r13,8), %rbp
	movq	16(%rsp), %rdx
	movl	8(%rsp), %esi
	addq	%r14, %rbx
	movq	8(%rbx), %rcx
	movq	%rbx, %rdi
	addq	%rbp, %rcx
	call	_Z9calcCoefsP5CoefsiP3MapPd
	movq	16(%rbx), %rcx
	movl	8(%rsp), %esi
	movq	%rbx, %rdi
	movq	24(%rsp), %rdx
	addq	%rbp, %rcx
	call	_Z9calcCoefsP5CoefsiP3MapPd
	movq	24(%rbx), %rcx
	movl	8(%rsp), %esi
	movq	%r15, %rdx
	movq	%rbx, %rdi
	addq	%rbp, %rcx
	call	_Z9calcCoefsP5CoefsiP3MapPd
	movq	32(%rbx), %rcx
	movl	8(%rsp), %esi
	movq	%rbx, %rdi
	leaq	280(%rsp), %rdx
	addq	%rbp, %rcx
	call	_Z9calcCoefsP5CoefsiP3MapPd
	movq	40(%rbx), %rcx
	movl	8(%rsp), %esi
	movq	%rbx, %rdi
	leaq	344(%rsp), %rdx
	addq	%rbp, %rcx
	call	_Z9calcCoefsP5CoefsiP3MapPd
	movq	48(%rbx), %rcx
	movl	8(%rsp), %esi
	movq	%rbx, %rdi
	leaq	408(%rsp), %rdx
	addq	%rbp, %rcx
	call	_Z9calcCoefsP5CoefsiP3MapPd
	jmp	.L141
.L166:
	xorl	%eax, %eax
	leaq	1136(%rsp), %rdi
	movl	$50, %ecx
	cmpb	$0, 936(%rsp)
	rep stosl
	leaq	1136(%rsp), %rbx
	je	.L130
	cmpl	$1, 44(%rsp)
	leaq	936(%rsp), %r8
	jne	.L131
	movq	%r8, %r9
	movl	$200, %edx
	leal	1(%r12), %r8d
	movq	%rbx, %rdi
	leaq	.LC62(%rip), %rcx
	movl	$2, %esi
	call	__sprintf_chk@PLT
.L132:
	leaq	.LC63(%rip), %rsi
	jmp	.L160
.L130:
	movq	stdout(%rip), %rbp
.L136:
	xorl	%r13d, %r13d
	leaq	.LC66(%rip), %rbx
.L137:
	cmpl	%r13d, 76(%rsp)
	jle	.L167
	movq	80(%rsp), %rax
	addq	%r14, %rax
	movq	40(%rax), %rdi
	movq	32(%rax), %rsi
	movq	16(%rax), %rdx
	movq	48(%rax), %r8
	movq	24(%rax), %rcx
	movq	8(%rax), %rax
	movsd	(%rdi,%r13,8), %xmm4
	movsd	(%rsi,%r13,8), %xmm3
	movq	%rbp, %rdi
	movl	$2, %esi
	movsd	(%rax,%r13,8), %xmm0
	movsd	(%rdx,%r13,8), %xmm1
	movb	$6, %al
	movq	%rbx, %rdx
	movsd	(%r8,%r13,8), %xmm5
	movsd	(%rcx,%r13,8), %xmm2
	incq	%r13
	call	__fprintf_chk@PLT
	jmp	.L137
.L140:
	movq	16(%rsp), %rdi
	call	_Z7freeMapP3Map
	movq	24(%rsp), %rdi
	call	_Z7freeMapP3Map
	leaq	216(%rsp), %rdi
	call	_Z7freeMapP3Map
	leaq	280(%rsp), %rdi
	call	_Z7freeMapP3Map
	leaq	344(%rsp), %rdi
	call	_Z7freeMapP3Map
	leaq	408(%rsp), %rdi
	call	_Z7freeMapP3Map
	movq	32(%rsp), %rdi
	movl	%ebx, %esi
	call	_Z9freeCoefsPP5Coefsi
	movq	stderr(%rip), %rdi
	leaq	.LC68(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	call	getchar@PLT
	cmpb	$0, 736(%rsp)
	jne	.L142
	call	getchar@PLT
.L142:
	movq	1336(%rsp), %rax
	subq	%fs:40, %rax
	je	.L143
	call	__stack_chk_fail@PLT
.L143:
	addq	$1352, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2040:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2066:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2066:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define ITER 4000

typedef struct Map{
	int length;
	double *A;
	int *x;
	int *dx;
	int *y;
	int *dy;
	int *delta;
	int *phi;
}Map;

typedef struct Coefs{
	int length;
	double *x;
	double *dx;
	double *y;
	double *dy;
	double *delta;
	double *phi;
}Coefs;

typedef struct Vars{
	double mass;
	double momentum;
	double kinEn;
	double gamma;
	double beta;
	double mAnomalyG;
	double spinTuneGgamma;
	double lRefOrbit;
}Vars;

void scanFile(FILE* fp, int *size){
	char* line = (char*)malloc(200*sizeof(char));
	line = fgets(line, 200, fp);
	if(strncmp(line, "     I  COEFFICIENT            ORDER EXPONENTS", 46)!=0){
		if(strncmp(line, "     ALL COMPONENTS ZERO ", 25)!=0){
			exit(EXIT_FAILURE);
		}else{
			*size=1;
		}
	}else{
		for((*size)=0;!strstr((line = fgets(line, 200, fp)), "------");(*size)++);
	}
	free(line);
}

void mallocMap(Map *m, int p){
	(*m).length = p;
	if(p>0){
		(*m).A = (double*)calloc(p,sizeof(double));
		(*m).x = (int*)calloc(p,sizeof(int));
		(*m).dx = (int*)calloc(p,sizeof(int));
		(*m).y = (int*)calloc(p,sizeof(int));
		(*m).dy = (int*)calloc(p,sizeof(int));
		(*m).delta = (int*)calloc(p,sizeof(int));
		(*m).phi = (int*)calloc(p,sizeof(int));
	}
}

void freeMap(Map *m){
	if((*m).length > 0){
		free((*m).A);
		free((*m).x);
		free((*m).dx);
		free((*m).y);
		free((*m).dy);
		free((*m).delta);
		free((*m).phi);
	}
}

void mallocCoefs(Coefs **c, int iter, int p){
	if(iter>0){
		int i;
		(*c) = (Coefs*) malloc(p*sizeof(Coefs));
		for(i=0;i<p;i++){
			(*c)[i].length = iter;
			(*c)[i].x = (double*)calloc(iter,sizeof(double));
			(*c)[i].dx = (double*)calloc(iter,sizeof(double));
			(*c)[i].y = (double*)calloc(iter,sizeof(double));
			(*c)[i].dy = (double*)calloc(iter,sizeof(double));
			(*c)[i].delta = (double*)calloc(iter,sizeof(double));
			(*c)[i].phi = (double*)calloc(iter,sizeof(double));
		}
	}
}

void freeCoefs(Coefs **c, int p){
	if((*c)[0].length > 0){
		int i;
		for(i=0;i<p;i++){
			free((*c)[i].x);
			free((*c)[i].dx);
			free((*c)[i].y);
			free((*c)[i].dy);
			free((*c)[i].delta);
			free((*c)[i].phi);
		}
		free(*c);
	}
}

void readMap(FILE *fp, Map *m, int nr){
	char* line = (char*)malloc(200*sizeof(char));
	line = fgets(line, 200, fp);
	int dum1, dum2;
	if(strncmp(line, "     I  COEFFICIENT            ORDER EXPONENTS", 46)!=0){
		if(strncmp(line, "     ALL COMPONENTS ZERO ", 25)!=0){
			exit(EXIT_FAILURE);
		}
		else{
			(*m).A[0] = 1.0;
			(*m).x[0] = nr == 0?1:0;
			(*m).dx[0] = nr == 1?1:0;
			(*m).y[0] = nr == 2?1:0;
			(*m).dy[0] = nr == 3?1:0;
			(*m).delta[0] = nr == 4?1:0;
			(*m).phi[0] = nr == 5?1:0;
		}
	}
	for(int i=0;!strstr((line = fgets(line, 200, fp)), "------");i++){
		//TODO read chars ipv ints
		sscanf(line,"%d %lf %d %d %d %d %d %d %d",
			&dum1,
			&((*m).A[i]),
			&dum2,
			&((*m).x[i]),
			&((*m).dx[i]),
			&((*m).y[i]),
			&((*m).dy[i]),
			&((*m).delta[i]),
			&((*m).phi[i])
			);
	}
	free(line);
}

void readVars(FILE *fp, Vars *v){
	char* line = (char*)malloc(200*sizeof(char));
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store muon mass\n");
	if (sscanf(line,"Muon Mass =   %lf MeV/c^2",&((*v).mass)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store muon momentum\n");
	if (sscanf(line,"Muon Momentum =   %lf MeV/c",&((*v).momentum)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store muon kin energy\n");
	if (sscanf(line,"Muon Kinetic Energy =   %lf MeV",&((*v).kinEn)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon gamma\n");
	if (sscanf(line,"Muon gamma =   %lf",&((*v).gamma)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon beta\n");
	if (sscanf(line,"Muon beta =  %lf",&((*v).beta)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon Anomaly G\n");
	if (sscanf(line,"Muon Anomaly G =  %lf",&((*v).mAnomalyG)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	fprintf(stderr, "check and store Muon Spin Tune G.gamma\n");
	if (sscanf(line,"Muon Spin Tune G.gamma =  %lf",&((*v).spinTuneGgamma)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	if (sscanf(line," L    %lf",&((*v).lRefOrbit)) != 1) exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	if (line[1] !='P') exit(EXIT_FAILURE);
	line = fgets(line, 200, fp);
	if (line[1] !='A') exit(EXIT_FAILURE);
	free(line);
}

void sumArrayHelper(double *nums, int length, int interval){
	int index = 0;
	int next = interval/2;
	do{
		if(next < length){
			nums[index] += nums[next];
		}
		index += interval;
		next += interval;
	} while (index < length);
}

double sumArray(double *nums, int length){
	if(length <= 0){
		return 0;
	}
	int interval = 2;
	while(interval < length*2){
		sumArrayHelper(nums, length, interval);
		interval *= 2;
	}
	return nums[0];
}

void scanCoefs(char *fileName, int *count){
	char* line = (char*)malloc(200*sizeof(char));
	FILE *fp = fopen(fileName, "r");
	if( fp == NULL ){
		fprintf(stderr, "Error while opening the coefficients file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	for((*count)=0;fgets(line, 200, fp) != NULL;(*count)++){
		if( strncmp(line, "\n", 1)==0 || strncmp(line, "\0", 1)==0){
			(*count)--;
		}
	}
	if(!feof(fp)){
		fprintf(stderr, "Something was wrong with the coefficient file!");
		exit(EXIT_FAILURE);
	}
	fclose(fp);
	free(line);
}

void getCoefs(Coefs *c){
	fprintf(stderr, "Begin values of the 6 dimentions: ");

	scanf("%lf %lf %lf %lf %lf %lf",
		&((*c).x[0]),
		&((*c).dx[0]),
		&((*c).y[0]),
		&((*c).dy[0]),
		&((*c).delta[0]),
		&((*c).phi[0])
		);
}

void readCoefs(Coefs **c, char *fileName, int count){
	FILE *fp = fopen(fileName, "r");
	if( fp == NULL ){
		fprintf(stderr, "Error while opening the coefficients file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	int i;
	for(i=0;i<count;i++){
		fscanf(fp, "%lf %lf %lf %lf %lf %lf",
			&((*c)[i].x[0]),
			&((*c)[i].dx[0]),
			&((*c)[i].y[0]),
			&((*c)[i].dy[0]),
			&((*c)[i].delta[0]),
			&((*c)[i].phi[0])
			);
	}
	fclose(fp);
}

void calcCoefs(Coefs *c, int idx, Map *m, double *newValue){
	double *nums = (double*)calloc((*m).length,sizeof(double));

	for(int i = 0; i < (*m).length; i++) {
		nums[i] = (*m).A[i] * pow((*c).x[idx],(*m).x[i])
			* pow((*c).dx[idx],(*m).dx[i])
			* pow((*c).y[idx],(*m).y[i])
			* pow((*c).dy[idx],(*m).dy[i])
			* pow((*c).delta[idx],(*m).delta[i])
			* pow((*c).phi[idx],(*m).phi[i]);
	}

	*newValue = sumArray(nums, (*m).length);
	free(nums);
}

int main(int argc, char **argv){
	char fileName[200] = "";
	char coefsFileName[200] = "";
	char outputFileName[200] = "";
	int separateFiles = 0;
	int xSize, dxSize, ySize, dySize, deltaSize, phiSize, argcCounter, particleCount = 1, iter = ITER;
	Map x, dx, y, dy, delta, phi;
	Coefs *c;
	Vars v;

	// Read the program arguments
	argcCounter = argc;
	while ((argcCounter > 1) && (argv[1][0] == '-'))
	{
		if(argv[1][2] == '=' && argv[1][3] != '\0'){
			switch (argv[1][1]){
			case 'm':
				sprintf(fileName, "%s",&argv[1][3]);
				break;

			case 'c':
				sprintf(coefsFileName ,"%s",&argv[1][3]);
				break;

			case 'o':
				sprintf(outputFileName ,"%s",&argv[1][3]);
				break;

			case 'i':
				sscanf(&argv[1][3] ,"%d", &iter);
				break;

			default:
				fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
				exit(EXIT_FAILURE);
			}
		}else{
			switch (argv[1][1]){
			case 's':
				separateFiles = 1;
				break;
			case '-':
				if(!strstr(&argv[1][2], "help") || argv[1][6] != '\0'){
					fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
					exit(EXIT_FAILURE);
				}
			case 'h':
				if(strstr(&argv[1][2], "help") ||  argv[1][2] == '\0'){
					printf("Calculates a certain amount of steps of a charged particle in a inhomogeneous\nmagnetic field.\n\n");
					printf("<executable> (-h|--help) | <executable> [-m=<mapFileName>] [-c=<coeffFileName>]\n[-o=<outputFileName> [-s]] [-i=<nr>]\n\n");
					printf("-h, --help\t\t Display help\n");
					printf("-m=<mapFileName>\t Set the map file to be <mapFileName>. If not set, it\n\t\t\t will be asked for in the program itself.\n");
					printf("-c=<coeffFileName>\t Set the coefficients file to be <coeffFileName>. If\n\t\t\t not set, it will be asked for in the program itself.\n\t\t\t Note that the coefficients file supports multiple\n\t\t\t particles, while if the program is run without this\n\t\t\t file, it supports only one particle.\n");
					printf("-o=<outputFileName>\t Set the output file to be <outputFileName>. If not\n\t\t\t set, it will default to stdout\n");
					printf("-s\t\t\t Choose if you want one output file or (if applicable)\n\t\t\t multiple output files. Note that this parameter can\n\t\t\t only be set if an output file is set.\n");
					printf("-i=<nr>\t\t\t Set the number of iterations to <nr>. If not set, it\n\t\t\t will default to 4000.\n");
					exit(EXIT_SUCCESS);
				}else{
					fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
					exit(EXIT_FAILURE);
				}
				break;

			default:
				fprintf(stderr, "Wrong Argument: %s\n", argv[1]);
				exit(EXIT_FAILURE);
			}
		}
		++argv;
		--argcCounter;
	}
	if(separateFiles == 1 && strncmp(outputFileName, "\0", 1)==0){
		fprintf(stderr, "-s shouldn't be used without setting an output file");
		exit(EXIT_FAILURE);
	}

	// if not set in argument, ask for file name of the map file
	if(strncmp(fileName, "\0", 1)==0){
		fprintf(stderr, "Filename of the map: ");
		scanf("%s", fileName);
	}

	// use the map file to gather the sizes of the 6 coefficients
	fprintf(stderr, "open file\n");
	FILE *scanFileP = fopen(fileName, "r");
	fprintf(stderr, "check if file is NULL\n");
	if( scanFileP == NULL ){
		fprintf(stderr, "Error while opening the map file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	fprintf(stderr, "Get map sizes\n");
	char* line = (char*)malloc(200*sizeof(char));
	do{
		line = fgets(line, 200, scanFileP);
	}while(!strstr(line, " A "));
	free(line);
	scanFile(scanFileP, &xSize);
	scanFile(scanFileP, &dxSize);
	scanFile(scanFileP, &ySize);
	scanFile(scanFileP, &dySize);
	scanFile(scanFileP, &deltaSize);
	scanFile(scanFileP, &phiSize);
	fclose(scanFileP);
	fprintf(stderr, "\nmap sizes: %d %d %d %d %d %d\n", xSize, dxSize, ySize, dySize, deltaSize, phiSize);

	// allocate memory for the map
	fprintf(stderr, "\nmap x\n");
	mallocMap(&x, xSize);
	fprintf(stderr, "map dx\n");
	mallocMap(&dx, dxSize);
	fprintf(stderr, "map y\n");
	mallocMap(&y, ySize);
	fprintf(stderr, "map dy\n");
	mallocMap(&dy, dySize);
	fprintf(stderr, "map delta\n");
	mallocMap(&delta, deltaSize);
	fprintf(stderr, "map phi\n");
	mallocMap(&phi, phiSize);

	// read some variables and the map lines from the map file
	fprintf(stderr, "open file\n");
	FILE *mapFileP = fopen(fileName, "r");
	fprintf(stderr, "check if file is NULL\n");
	if( mapFileP == NULL ){
		fprintf(stderr, "Error while opening the map file: %s\n", fileName);
		exit(EXIT_FAILURE);
	}
	fprintf(stderr, "read vars");
	readVars(mapFileP,&v);
	fprintf(stderr, "read x\n");
	readMap(mapFileP, &x, 0);
	fprintf(stderr, "read dx\n");
	readMap(mapFileP, &dx, 1);
	fprintf(stderr, "read y\n");
	readMap(mapFileP, &y, 2);
	fprintf(stderr, "read dy\n");
	readMap(mapFileP, &dy, 3);
	fprintf(stderr, "read delta\n");
	readMap(mapFileP, &delta, 4);
	fprintf(stderr, "read phi\n");
	readMap(mapFileP, &phi, 5);
	fclose(mapFileP);


	// allocate mempry for the coefficients

	// read the coefficients from user input
	if(strncmp(coefsFileName, "\0", 1)==0){
		fprintf(stderr, "map coefs\n");
		mallocCoefs(&c, iter, particleCount);
		fprintf(stderr, "read coefs\n");
		getCoefs(c);
	}else{
		scanCoefs(coefsFileName, &particleCount);
		fprintf(stderr, "map coefs\n");
		mallocCoefs(&c, iter, particleCount);
		fprintf(stderr, "read coefs\n");
		readCoefs(&c, coefsFileName, particleCount);
		fprintf(stderr, "Particle count: %d\n", particleCount);
	}
	// calculate the coefficients for 4000 iterations
	for(int n = 0;n < particleCount;n++){
		for(int i = 0;i < iter-1;i++){
			calcCoefs(&c[n], i, &x, &(c[n].x[i+1]));
			calcCoefs(&c[n], i, &dx, &(c[n].dx[i+1]));
			calcCoefs(&c[n], i, &y, &(c[n].y[i+1]));
			calcCoefs(&c[n], i, &dy, &(c[n].dy[i+1]));
			calcCoefs(&c[n], i, &delta, &(c[n].delta[i+1]));
			calcCoefs(&c[n], i, &phi, &(c[n].phi[i+1]));
		}

		// show or save the coefficients 
		FILE* outputFile;
		char fullOutputFileName[200] = "";
		if(!strncmp(outputFileName, "\0", 1)==0){
			if(separateFiles==1){
				sprintf(fullOutputFileName, "part%09d.%s", n+1, outputFileName);
			}else{
				sprintf(fullOutputFileName, "%s", outputFileName);
			}
			if(n==0){
				outputFile = fopen(fullOutputFileName, "w");
			}else{
				if(separateFiles==1){
					outputFile = fopen(fullOutputFileName, "w");
				}else{
					outputFile = fopen(fullOutputFileName, "a");
				}
			}
			if( outputFile == NULL ){
				fprintf(stderr, "Error while opening the output file: %s\n", fullOutputFileName);
				exit(EXIT_FAILURE);
			}
		}else{
			outputFile = stdout;
		}
		for(int i = 0;i < iter;i++){
			fprintf(outputFile, "%10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n", c[n].x[i], c[n].dx[i], c[n].y[i], c[n].dy[i], c[n].delta[i], c[n].phi[i]);
		}
		fprintf(outputFile, "\n");
		if(!strncmp(outputFileName, "\0", 1)==0){
			fclose(outputFile);
		}
	}

	// clean up the heap and tell that the computation is finished
	freeMap(&x);
	freeMap(&dx);
	freeMap(&y);
	freeMap(&dy);
	freeMap(&delta);
	freeMap(&phi);
	freeCoefs(&c, particleCount);
	fprintf(stderr, "Output is created. Press Enter to continue...\n");
	getchar();
	if(strncmp(coefsFileName, "\0", 1)==0){
		getchar();
	}
	return 0;
}

	.text
	.file	"kernel.hip"
	.globl	_Z8scanFileP8_IO_FILEPi         # -- Begin function _Z8scanFileP8_IO_FILEPi
	.type	_Z8scanFileP8_IO_FILEPi,@function
_Z8scanFileP8_IO_FILEPi:                # @_Z8scanFileP8_IO_FILEPi
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	$200, %edi
	callq	malloc
	movq	%rax, %rdi
	movl	$200, %esi
	movq	%r15, %rdx
	callq	fgets
	movq	%rax, %r14
	movl	$.L.str, %esi
	movl	$46, %edx
	movq	%rax, %rdi
	callq	strncmp
	testl	%eax, %eax
	je	.LBB0_1
# %bb.4:
	movl	$.L.str.1, %esi
	movl	$25, %edx
	movq	%r14, %rdi
	callq	strncmp
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.5:
	movl	$1, (%rbx)
.LBB0_6:                                # %.loopexit
	movq	%r14, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.LBB0_1:                                # %.preheader
	.cfi_def_cfa_offset 32
	movl	$0, (%rbx)
.LBB0_2:                                # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$200, %esi
	movq	%r15, %rdx
	callq	fgets
	movq	%rax, %r14
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	strstr
	testq	%rax, %rax
	jne	.LBB0_6
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB0_2 Depth=1
	incl	(%rbx)
	jmp	.LBB0_2
.LBB0_7:
	movl	$1, %edi
	callq	exit
.Lfunc_end0:
	.size	_Z8scanFileP8_IO_FILEPi, .Lfunc_end0-_Z8scanFileP8_IO_FILEPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z9mallocMapP3Mapi              # -- Begin function _Z9mallocMapP3Mapi
	.type	_Z9mallocMapP3Mapi,@function
_Z9mallocMapP3Mapi:                     # @_Z9mallocMapP3Mapi
	.cfi_startproc
# %bb.0:
	movl	%esi, (%rdi)
	testl	%esi, %esi
	jle	.LBB1_2
# %bb.1:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movl	%esi, %r14d
	movl	$8, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, 8(%rbx)
	movl	$4, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, 16(%rbx)
	movl	$4, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, 24(%rbx)
	movl	$4, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, 32(%rbx)
	movl	$4, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, 40(%rbx)
	movl	$4, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, 48(%rbx)
	movl	$4, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, 56(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
.LBB1_2:
	retq
.Lfunc_end1:
	.size	_Z9mallocMapP3Mapi, .Lfunc_end1-_Z9mallocMapP3Mapi
	.cfi_endproc
                                        # -- End function
	.globl	_Z7freeMapP3Map                 # -- Begin function _Z7freeMapP3Map
	.type	_Z7freeMapP3Map,@function
_Z7freeMapP3Map:                        # @_Z7freeMapP3Map
	.cfi_startproc
# %bb.0:
	cmpl	$0, (%rdi)
	jle	.LBB2_1
# %bb.2:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	free
	movq	16(%rbx), %rdi
	callq	free
	movq	24(%rbx), %rdi
	callq	free
	movq	32(%rbx), %rdi
	callq	free
	movq	40(%rbx), %rdi
	callq	free
	movq	48(%rbx), %rdi
	callq	free
	movq	56(%rbx), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.LBB2_1:
	.cfi_restore %rbx
	retq
.Lfunc_end2:
	.size	_Z7freeMapP3Map, .Lfunc_end2-_Z7freeMapP3Map
	.cfi_endproc
                                        # -- End function
	.globl	_Z11mallocCoefsPP5Coefsii       # -- Begin function _Z11mallocCoefsPP5Coefsii
	.type	_Z11mallocCoefsPP5Coefsii,@function
_Z11mallocCoefsPP5Coefsii:              # @_Z11mallocCoefsPP5Coefsii
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB3_5
# %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebp
	movl	%esi, %ebx
	movq	%rdi, %r14
	movslq	%edx, %r15
	imulq	$56, %r15, %rdi
	callq	malloc
	movq	%rax, (%r14)
	testl	%r15d, %r15d
	jle	.LBB3_4
# %bb.2:                                # %.lr.ph
	movl	%ebx, %r15d
	movl	%ebp, %eax
	imulq	$56, %rax, %r12
	xorl	%r13d, %r13d
.LBB3_3:                                # =>This Inner Loop Header: Depth=1
	movq	(%r14), %rbp
	movl	%ebx, (%rbp,%r13)
	movl	$8, %esi
	movq	%r15, %rdi
	callq	calloc
	movq	%rax, 8(%rbp,%r13)
	movl	$8, %esi
	movq	%r15, %rdi
	callq	calloc
	movq	(%r14), %rcx
	movq	%rax, 16(%rcx,%r13)
	movl	$8, %esi
	movq	%r15, %rdi
	callq	calloc
	movq	(%r14), %rcx
	movq	%rax, 24(%rcx,%r13)
	movl	$8, %esi
	movq	%r15, %rdi
	callq	calloc
	movq	(%r14), %rcx
	movq	%rax, 32(%rcx,%r13)
	movl	$8, %esi
	movq	%r15, %rdi
	callq	calloc
	movq	(%r14), %rcx
	movq	%rax, 40(%rcx,%r13)
	movl	$8, %esi
	movq	%r15, %rdi
	callq	calloc
	movq	(%r14), %rcx
	movq	%rax, 48(%rcx,%r13)
	addq	$56, %r13
	cmpq	%r13, %r12
	jne	.LBB3_3
.LBB3_4:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB3_5:                                # %.loopexit
	retq
.Lfunc_end3:
	.size	_Z11mallocCoefsPP5Coefsii, .Lfunc_end3-_Z11mallocCoefsPP5Coefsii
	.cfi_endproc
                                        # -- End function
	.globl	_Z9freeCoefsPP5Coefsi           # -- Begin function _Z9freeCoefsPP5Coefsi
	.type	_Z9freeCoefsPP5Coefsi,@function
_Z9freeCoefsPP5Coefsi:                  # @_Z9freeCoefsPP5Coefsi
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	cmpl	$0, (%rdi)
	jle	.LBB4_6
# %bb.1:                                # %.preheader
	testl	%esi, %esi
	jle	.LBB4_5
# %bb.2:                                # %.lr.ph.preheader
	movl	%esi, %eax
	imulq	$56, %rax, %r14
	xorl	%r15d, %r15d
.LBB4_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	8(%rax,%r15), %rdi
	callq	free
	movq	(%rbx), %rax
	movq	16(%rax,%r15), %rdi
	callq	free
	movq	(%rbx), %rax
	movq	24(%rax,%r15), %rdi
	callq	free
	movq	(%rbx), %rax
	movq	32(%rax,%r15), %rdi
	callq	free
	movq	(%rbx), %rax
	movq	40(%rax,%r15), %rdi
	callq	free
	movq	(%rbx), %rax
	movq	48(%rax,%r15), %rdi
	callq	free
	addq	$56, %r15
	cmpq	%r15, %r14
	jne	.LBB4_3
# %bb.4:                                # %._crit_edge.loopexit
	movq	(%rbx), %rdi
.LBB4_5:                                # %._crit_edge
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.LBB4_6:
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z9freeCoefsPP5Coefsi, .Lfunc_end4-_Z9freeCoefsPP5Coefsi
	.cfi_endproc
                                        # -- End function
	.globl	_Z7readMapP8_IO_FILEP3Mapi      # -- Begin function _Z7readMapP8_IO_FILEP3Mapi
	.type	_Z7readMapP8_IO_FILEP3Mapi,@function
_Z7readMapP8_IO_FILEP3Mapi:             # @_Z7readMapP8_IO_FILEP3Mapi
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebp
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$200, %edi
	callq	malloc
	movq	%rax, %rdi
	movl	$200, %esi
	movq	%r14, %rdx
	callq	fgets
	movq	%rax, %r15
	movl	$.L.str, %esi
	movl	$46, %edx
	movq	%rax, %rdi
	callq	strncmp
	testl	%eax, %eax
	je	.LBB5_3
# %bb.1:
	movl	$.L.str.1, %esi
	movl	$25, %edx
	movq	%r15, %rdi
	callq	strncmp
	testl	%eax, %eax
	jne	.LBB5_7
# %bb.2:
	movq	8(%rbx), %rax
	movabsq	$4607182418800017408, %rcx      # imm = 0x3FF0000000000000
	movq	%rcx, (%rax)
	xorl	%eax, %eax
	testl	%ebp, %ebp
	sete	%al
	movq	16(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	cmpl	$1, %ebp
	sete	%al
	movq	24(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	cmpl	$2, %ebp
	sete	%al
	movq	32(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	cmpl	$3, %ebp
	sete	%al
	movq	40(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	cmpl	$4, %ebp
	sete	%al
	movq	48(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	cmpl	$5, %ebp
	sete	%al
	movq	56(%rbx), %rcx
	movl	%eax, (%rcx)
.LBB5_3:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%r14, %rdx
	callq	fgets
	movq	%rax, %r15
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	strstr
	testq	%rax, %rax
	jne	.LBB5_6
# %bb.4:                                # %.lr.ph
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	movq	%r14, (%rsp)                    # 8-byte Spill
.LBB5_5:                                # =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rcx
	addq	%rbp, %rcx
	movq	16(%rbx), %r9
	addq	%r12, %r9
	movq	24(%rbx), %r10
	addq	%r12, %r10
	movq	32(%rbx), %r11
	addq	%r12, %r11
	movq	40(%rbx), %r13
	addq	%r12, %r13
	movq	48(%rbx), %r14
	addq	%r12, %r14
	movq	%r15, %rdi
	movq	%r15, 8(%rsp)                   # 8-byte Spill
	movq	%rbx, %r15
	movq	56(%rbx), %rbx
	addq	%r12, %rbx
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	$.L.str.3, %esi
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %r8
	xorl	%eax, %eax
	pushq	%rbx
	movq	%r15, %rbx
	.cfi_adjust_cfa_offset 8
	pushq	%r14
	movq	24(%rsp), %r14                  # 8-byte Reload
	.cfi_adjust_cfa_offset 8
	pushq	%r13
	.cfi_adjust_cfa_offset 8
	pushq	%r11
	.cfi_adjust_cfa_offset 8
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	callq	__isoc23_sscanf
	addq	$48, %rsp
	.cfi_adjust_cfa_offset -48
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movl	$200, %esi
	movq	%r14, %rdx
	callq	fgets
	movq	%rax, %r15
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	strstr
	addq	$4, %r12
	addq	$8, %rbp
	testq	%rax, %rax
	je	.LBB5_5
.LBB5_6:                                # %._crit_edge
	movq	%r15, %rdi
	callq	free
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB5_7:
	.cfi_def_cfa_offset 80
	movl	$1, %edi
	callq	exit
.Lfunc_end5:
	.size	_Z7readMapP8_IO_FILEP3Mapi, .Lfunc_end5-_Z7readMapP8_IO_FILEP3Mapi
	.cfi_endproc
                                        # -- End function
	.globl	_Z8readVarsP8_IO_FILEP4Vars     # -- Begin function _Z8readVarsP8_IO_FILEP4Vars
	.type	_Z8readVarsP8_IO_FILEP4Vars,@function
_Z8readVarsP8_IO_FILEP4Vars:            # @_Z8readVarsP8_IO_FILEP4Vars
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	$200, %edi
	callq	malloc
	movq	%rax, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	movq	stderr(%rip), %rcx
	movl	$.L.str.4, %edi
	movl	$26, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movl	$.L.str.5, %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.1:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	movq	stderr(%rip), %rcx
	movl	$.L.str.6, %edi
	movl	$30, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	8(%r14), %rdx
	movl	$.L.str.7, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.2:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	movq	stderr(%rip), %rcx
	movl	$.L.str.8, %edi
	movl	$32, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	16(%r14), %rdx
	movl	$.L.str.9, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.3:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	movq	stderr(%rip), %rcx
	movl	$.L.str.10, %edi
	movl	$27, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	24(%r14), %rdx
	movl	$.L.str.11, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.4:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	movq	stderr(%rip), %rcx
	movl	$.L.str.12, %edi
	movl	$26, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	32(%r14), %rdx
	movl	$.L.str.13, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.5:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	movq	stderr(%rip), %rcx
	movl	$.L.str.14, %edi
	movl	$31, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	40(%r14), %rdx
	movl	$.L.str.15, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.6:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	movq	stderr(%rip), %rcx
	movl	$.L.str.16, %edi
	movl	$39, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	48(%r14), %rdx
	movl	$.L.str.17, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.7:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r15
	addq	$56, %r14
	movl	$.L.str.18, %esi
	movq	%rax, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	cmpl	$1, %eax
	jne	.LBB6_11
# %bb.8:
	movq	%r15, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	cmpb	$80, 1(%rax)
	jne	.LBB6_11
# %bb.9:
	movq	%rax, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	cmpb	$65, 1(%rax)
	jne	.LBB6_11
# %bb.10:
	movq	%rax, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.LBB6_11:
	.cfi_def_cfa_offset 32
	movl	$1, %edi
	callq	exit
.Lfunc_end6:
	.size	_Z8readVarsP8_IO_FILEP4Vars, .Lfunc_end6-_Z8readVarsP8_IO_FILEP4Vars
	.cfi_endproc
                                        # -- End function
	.globl	_Z14sumArrayHelperPdii          # -- Begin function _Z14sumArrayHelperPdii
	.type	_Z14sumArrayHelperPdii,@function
_Z14sumArrayHelperPdii:                 # @_Z14sumArrayHelperPdii
	.cfi_startproc
# %bb.0:
	movl	%edx, %r8d
	shrl	$31, %r8d
	addl	%edx, %r8d
	sarl	%r8d
	movslq	%edx, %rax
	movslq	%esi, %rcx
	movslq	%r8d, %rdx
	leaq	(%rdi,%rdx,8), %rsi
	xorl	%r8d, %r8d
.LBB7_1:                                # =>This Inner Loop Header: Depth=1
	leaq	(%rdx,%r8), %r9
	cmpq	%rcx, %r9
	jge	.LBB7_3
# %bb.2:                                #   in Loop: Header=BB7_1 Depth=1
	movsd	(%rsi,%r8,8), %xmm0             # xmm0 = mem[0],zero
	addsd	(%rdi,%r8,8), %xmm0
	movsd	%xmm0, (%rdi,%r8,8)
.LBB7_3:                                #   in Loop: Header=BB7_1 Depth=1
	addq	%rax, %r8
	cmpq	%rcx, %r8
	jl	.LBB7_1
# %bb.4:
	retq
.Lfunc_end7:
	.size	_Z14sumArrayHelperPdii, .Lfunc_end7-_Z14sumArrayHelperPdii
	.cfi_endproc
                                        # -- End function
	.globl	_Z8sumArrayPdi                  # -- Begin function _Z8sumArrayPdi
	.type	_Z8sumArrayPdi,@function
_Z8sumArrayPdi:                         # @_Z8sumArrayPdi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB8_1
# %bb.2:                                # %.preheader
	cmpl	$1, %esi
	je	.LBB8_9
# %bb.3:                                # %.lr.ph
	movl	%esi, %eax
	movl	$2, %ecx
.LBB8_4:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_5 Depth 2
	movl	%ecx, %r8d
	sarl	%r8d
	movslq	%ecx, %rdx
	movslq	%r8d, %r8
	leaq	(%rdi,%r8,8), %r9
	xorl	%r10d, %r10d
.LBB8_5:                                #   Parent Loop BB8_4 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	leaq	(%r8,%r10), %r11
	cmpq	%rax, %r11
	jge	.LBB8_7
# %bb.6:                                #   in Loop: Header=BB8_5 Depth=2
	movsd	(%r9,%r10,8), %xmm0             # xmm0 = mem[0],zero
	addsd	(%rdi,%r10,8), %xmm0
	movsd	%xmm0, (%rdi,%r10,8)
.LBB8_7:                                #   in Loop: Header=BB8_5 Depth=2
	addq	%rdx, %r10
	cmpq	%rax, %r10
	jl	.LBB8_5
# %bb.8:                                # %_Z14sumArrayHelperPdii.exit
                                        #   in Loop: Header=BB8_4 Depth=1
	leal	(%rcx,%rcx), %edx
	cmpl	%esi, %ecx
	movl	%edx, %ecx
	jb	.LBB8_4
.LBB8_9:                                # %._crit_edge
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	retq
.LBB8_1:
	xorps	%xmm0, %xmm0
	retq
.Lfunc_end8:
	.size	_Z8sumArrayPdi, .Lfunc_end8-_Z8sumArrayPdi
	.cfi_endproc
                                        # -- End function
	.globl	_Z9scanCoefsPcPi                # -- Begin function _Z9scanCoefsPcPi
	.type	_Z9scanCoefsPcPi,@function
_Z9scanCoefsPcPi:                       # @_Z9scanCoefsPcPi
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	$200, %edi
	callq	malloc
	movq	%rax, %rbx
	movl	$.L.str.19, %esi
	movq	%r12, %rdi
	callq	fopen
	testq	%rax, %rax
	je	.LBB9_10
# %bb.1:                                # %.preheader
	movq	%rax, %r15
	movl	$0, (%r14)
.LBB9_2:                                # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$200, %esi
	movq	%r15, %rdx
	callq	fgets
	testq	%rax, %rax
	je	.LBB9_8
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB9_2 Depth=1
	movzbl	(%rbx), %eax
	testl	%eax, %eax
	je	.LBB9_5
# %bb.4:                                # %.lr.ph
                                        #   in Loop: Header=BB9_2 Depth=1
	cmpl	$10, %eax
	jne	.LBB9_6
.LBB9_5:                                #   in Loop: Header=BB9_2 Depth=1
	movl	(%r14), %eax
	decl	%eax
	jmp	.LBB9_7
.LBB9_6:                                # %.lr.ph._crit_edge
                                        #   in Loop: Header=BB9_2 Depth=1
	movl	(%r14), %eax
.LBB9_7:                                #   in Loop: Header=BB9_2 Depth=1
	incl	%eax
	movl	%eax, (%r14)
	jmp	.LBB9_2
.LBB9_8:                                # %._crit_edge
	movq	%r15, %rdi
	callq	feof
	testl	%eax, %eax
	je	.LBB9_12
# %bb.9:
	movq	%r15, %rdi
	callq	fclose
	movq	%rbx, %rdi
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.LBB9_10:
	.cfi_def_cfa_offset 48
	movq	stderr(%rip), %rdi
	movl	$.L.str.20, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	fprintf
	jmp	.LBB9_11
.LBB9_12:
	movq	stderr(%rip), %rcx
	movl	$.L.str.23, %edi
	movl	$46, %esi
	movl	$1, %edx
	callq	fwrite@PLT
.LBB9_11:
	movl	$1, %edi
	callq	exit
.Lfunc_end9:
	.size	_Z9scanCoefsPcPi, .Lfunc_end9-_Z9scanCoefsPcPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z8getCoefsP5Coefs              # -- Begin function _Z8getCoefsP5Coefs
	.type	_Z8getCoefsP5Coefs,@function
_Z8getCoefsP5Coefs:                     # @_Z8getCoefsP5Coefs
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	stderr(%rip), %rcx
	movl	$.L.str.24, %edi
	movl	$34, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rcx
	movq	32(%rbx), %r8
	movq	40(%rbx), %r9
	movq	48(%rbx), %rax
	movq	%rax, (%rsp)
	movl	$.L.str.25, %edi
	xorl	%eax, %eax
	callq	__isoc23_scanf
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_Z8getCoefsP5Coefs, .Lfunc_end10-_Z8getCoefsP5Coefs
	.cfi_endproc
                                        # -- End function
	.globl	_Z9readCoefsPP5CoefsPci         # -- Begin function _Z9readCoefsPP5CoefsPci
	.type	_Z9readCoefsPP5CoefsPci,@function
_Z9readCoefsPP5CoefsPci:                # @_Z9readCoefsPP5CoefsPci
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebp
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	$.L.str.19, %esi
	movq	%r15, %rdi
	callq	fopen
	testq	%rax, %rax
	je	.LBB11_5
# %bb.1:                                # %.preheader
	movq	%rax, %r14
	testl	%ebp, %ebp
	jle	.LBB11_4
# %bb.2:                                # %.lr.ph.preheader
	movl	%ebp, %eax
	imulq	$56, %rax, %r15
	xorl	%r12d, %r12d
.LBB11_3:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	8(%rax,%r12), %rdx
	movq	16(%rax,%r12), %rcx
	movq	24(%rax,%r12), %r8
	movq	32(%rax,%r12), %r9
	movups	40(%rax,%r12), %xmm0
	movups	%xmm0, (%rsp)
	movl	$.L.str.25, %esi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	addq	$56, %r12
	cmpq	%r12, %r15
	jne	.LBB11_3
.LBB11_4:                               # %._crit_edge
	movq	%r14, %rdi
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	fclose                          # TAILCALL
.LBB11_5:
	.cfi_def_cfa_offset 64
	movq	stderr(%rip), %rdi
	movl	$.L.str.20, %esi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end11:
	.size	_Z9readCoefsPP5CoefsPci, .Lfunc_end11-_Z9readCoefsPP5CoefsPci
	.cfi_endproc
                                        # -- End function
	.globl	_Z9calcCoefsP5CoefsiP3MapPd     # -- Begin function _Z9calcCoefsP5CoefsiP3MapPd
	.type	_Z9calcCoefsP5CoefsiP3MapPd,@function
_Z9calcCoefsP5CoefsiP3MapPd:            # @_Z9calcCoefsP5CoefsiP3MapPd
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movl	%esi, %ebp
	movq	%rdi, %r12
	movslq	(%rdx), %r13
	movl	$8, %esi
	movq	%r13, %rdi
	callq	calloc
	movq	%rax, %r14
	testq	%r13, %r13
	jle	.LBB12_4
# %bb.1:                                # %.lr.ph
	movq	%rbx, 16(%rsp)                  # 8-byte Spill
	movslq	%ebp, %rbp
	xorl	%ebx, %ebx
.LBB12_2:                               # =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movsd	(%rax,%rbx,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	8(%r12), %rax
	movsd	(%rax,%rbp,8), %xmm0            # xmm0 = mem[0],zero
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%rcx,%rbx,4), %xmm1
	callq	pow
	mulsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	16(%r12), %rax
	movsd	(%rax,%rbp,8), %xmm0            # xmm0 = mem[0],zero
	movq	24(%r15), %rax
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%rax,%rbx,4), %xmm1
	callq	pow
	mulsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	24(%r12), %rax
	movsd	(%rax,%rbp,8), %xmm0            # xmm0 = mem[0],zero
	movq	32(%r15), %rax
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%rax,%rbx,4), %xmm1
	callq	pow
	mulsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	32(%r12), %rax
	movsd	(%rax,%rbp,8), %xmm0            # xmm0 = mem[0],zero
	movq	40(%r15), %rax
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%rax,%rbx,4), %xmm1
	callq	pow
	mulsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	40(%r12), %rax
	movsd	(%rax,%rbp,8), %xmm0            # xmm0 = mem[0],zero
	movq	48(%r15), %rax
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%rax,%rbx,4), %xmm1
	callq	pow
	mulsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	48(%r12), %rax
	movsd	(%rax,%rbp,8), %xmm0            # xmm0 = mem[0],zero
	movq	56(%r15), %rax
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%rax,%rbx,4), %xmm1
	callq	pow
	mulsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, (%r14,%rbx,8)
	incq	%rbx
	movslq	(%r15), %r13
	cmpq	%r13, %rbx
	jl	.LBB12_2
# %bb.3:
	movq	16(%rsp), %rbx                  # 8-byte Reload
.LBB12_4:                               # %._crit_edge
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_Z8sumArrayPdi
	movsd	%xmm0, (%rbx)
	movq	%r14, %rdi
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.Lfunc_end12:
	.size	_Z9calcCoefsP5CoefsiP3MapPd, .Lfunc_end12-_Z9calcCoefsP5CoefsiP3MapPd
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$1352, %rsp                     # imm = 0x548
	.cfi_def_cfa_offset 1408
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movl	%edi, %ebp
	leaq	464(%rsp), %rdi
	movl	$0, 16(%rsp)                    # 4-byte Folded Spill
	movl	$200, %edx
	xorl	%esi, %esi
	callq	memset@PLT
	leaq	880(%rsp), %rdi
	movl	$200, %edx
	xorl	%esi, %esi
	callq	memset@PLT
	leaq	672(%rsp), %rdi
	movl	$200, %edx
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$1, 20(%rsp)
	movl	$4000, 4(%rsp)                  # imm = 0xFA0
	cmpl	$2, %ebp
	jl	.LBB13_16
# %bb.1:                                # %.lr.ph.preheader
	addq	$8, %rbx
	incl	%ebp
	leaq	672(%rsp), %r15
	xorl	%r12d, %r12d
.LBB13_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %r14
	cmpb	$45, (%r14)
	jne	.LBB13_14
# %bb.3:                                #   in Loop: Header=BB13_2 Depth=1
	movb	2(%r14), %r13b
	cmpb	$61, %r13b
	jne	.LBB13_8
# %bb.4:                                #   in Loop: Header=BB13_2 Depth=1
	cmpb	$0, 3(%r14)
	je	.LBB13_8
# %bb.5:                                #   in Loop: Header=BB13_2 Depth=1
	movsbl	1(%r14), %ecx
	addl	$-99, %ecx
	rorl	%ecx
	cmpl	$6, %ecx
	ja	.LBB13_54
# %bb.6:                                #   in Loop: Header=BB13_2 Depth=1
	leaq	3(%r14), %rax
	jmpq	*.LJTI13_0(,%rcx,8)
.LBB13_7:                               #   in Loop: Header=BB13_2 Depth=1
	leaq	880(%rsp), %rdi
	jmp	.LBB13_11
.LBB13_8:                               #   in Loop: Header=BB13_2 Depth=1
	movzbl	1(%r14), %eax
	movl	$1, %r12d
	cmpl	$115, %eax
	je	.LBB13_13
	jmp	.LBB13_46
.LBB13_9:                               #   in Loop: Header=BB13_2 Depth=1
	leaq	464(%rsp), %rdi
	jmp	.LBB13_11
.LBB13_10:                              #   in Loop: Header=BB13_2 Depth=1
	movq	%r15, %rdi
.LBB13_11:                              #   in Loop: Header=BB13_2 Depth=1
	movq	%rax, %rsi
	callq	strcpy@PLT
	jmp	.LBB13_13
.LBB13_12:                              #   in Loop: Header=BB13_2 Depth=1
	movl	$.L.str.27, %esi
	movq	%rax, %rdi
	leaq	4(%rsp), %rdx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
.LBB13_13:                              #   in Loop: Header=BB13_2 Depth=1
	addq	$8, %rbx
	decl	%ebp
	cmpl	$2, %ebp
	jg	.LBB13_2
.LBB13_14:                              # %.critedge
	cmpl	$1, %r12d
	sete	%al
	movl	%eax, 16(%rsp)                  # 4-byte Spill
	jne	.LBB13_16
# %bb.15:                               # %.critedge
	cmpb	$0, 672(%rsp)
	je	.LBB13_59
.LBB13_16:                              # %.critedge.thread
	cmpb	$0, 464(%rsp)
	jne	.LBB13_18
# %bb.17:
	movq	stderr(%rip), %rcx
	movl	$.L.str.39, %edi
	movl	$21, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	464(%rsp), %rsi
	movl	$.L.str.26, %edi
	xorl	%eax, %eax
	callq	__isoc23_scanf
.LBB13_18:
	movq	stderr(%rip), %rcx
	movl	$.L.str.40, %edi
	movl	$10, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	464(%rsp), %rdi
	movl	$.L.str.19, %esi
	callq	fopen
	movq	%rax, %rbx
	movq	stderr(%rip), %rcx
	movl	$.L.str.41, %edi
	movl	$22, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movq	stderr(%rip), %rcx
	testq	%rbx, %rbx
	je	.LBB13_58
# %bb.19:
	movl	$.L.str.43, %edi
	movl	$14, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movl	$200, %edi
	callq	malloc
	movq	%rax, %r14
.LBB13_20:                              # =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$200, %esi
	movq	%rbx, %rdx
	callq	fgets
	movq	%rax, %r14
	movl	$.L.str.44, %esi
	movq	%rax, %rdi
	callq	strstr
	testq	%rax, %rax
	je	.LBB13_20
# %bb.21:
	movq	%r14, %rdi
	callq	free
	leaq	76(%rsp), %r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_Z8scanFileP8_IO_FILEPi
	leaq	72(%rsp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_Z8scanFileP8_IO_FILEPi
	leaq	68(%rsp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_Z8scanFileP8_IO_FILEPi
	leaq	36(%rsp), %rsi
	movq	%rbx, %rdi
	callq	_Z8scanFileP8_IO_FILEPi
	leaq	64(%rsp), %rbp
	movq	%rbx, %rdi
	movq	%rbp, %rsi
	callq	_Z8scanFileP8_IO_FILEPi
	leaq	60(%rsp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z8scanFileP8_IO_FILEPi
	movq	%rbx, %rdi
	callq	fclose
	movq	stderr(%rip), %rdi
	movl	(%r13), %r13d
	movl	(%r12), %r12d
	movl	(%r15), %r15d
	leaq	36(%rsp), %rax
	movl	(%rax), %ebx
	movl	(%rbp), %ebp
	movl	(%r14), %r14d
	movl	$.L.str.45, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	xorl	%eax, %eax
	pushq	%r14
	.cfi_adjust_cfa_offset 8
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	callq	fprintf
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	stderr(%rip), %rcx
	movl	$.L.str.46, %edi
	movl	$7, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	400(%rsp), %rdi
	movl	%r13d, %esi
	callq	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.47, %edi
	movl	$7, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	336(%rsp), %rdi
	movl	%r12d, %esi
	callq	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.48, %edi
	movl	$6, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	272(%rsp), %rdi
	movl	%r15d, %esi
	callq	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.49, %edi
	movl	$7, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	208(%rsp), %rdi
	movl	%ebx, %esi
	callq	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.50, %edi
	movl	$10, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	144(%rsp), %rdi
	movl	%ebp, %esi
	callq	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.51, %edi
	movl	$8, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	80(%rsp), %rdi
	movl	%r14d, %esi
	callq	_Z9mallocMapP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.40, %edi
	movl	$10, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	464(%rsp), %rdi
	movl	$.L.str.19, %esi
	callq	fopen
	movq	%rax, %rbx
	movq	stderr(%rip), %rcx
	movl	$.L.str.41, %edi
	movl	$22, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movq	stderr(%rip), %rcx
	testq	%rbx, %rbx
	je	.LBB13_58
# %bb.22:
	movl	$.L.str.52, %edi
	movl	$9, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	1288(%rsp), %rsi
	movq	%rbx, %rdi
	callq	_Z8readVarsP8_IO_FILEP4Vars
	movq	stderr(%rip), %rcx
	movl	$.L.str.53, %edi
	movl	$7, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	400(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.54, %edi
	movl	$8, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	336(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.55, %edi
	movl	$7, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	272(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.56, %edi
	movl	$8, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	208(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.57, %edi
	movl	$11, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	144(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_Z7readMapP8_IO_FILEP3Mapi
	movq	stderr(%rip), %rcx
	movl	$.L.str.58, %edi
	movl	$9, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	leaq	80(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$5, %edx
	callq	_Z7readMapP8_IO_FILEP3Mapi
	movq	%rbx, %rdi
	callq	fclose
	cmpb	$0, 880(%rsp)
	jne	.LBB13_24
# %bb.23:                               # %.thread186
	movq	stderr(%rip), %rcx
	movl	$.L.str.59, %edi
	movl	$10, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movl	4(%rsp), %esi
	leaq	24(%rsp), %rbx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_Z11mallocCoefsPP5Coefsii
	movq	stderr(%rip), %rcx
	movl	$.L.str.60, %edi
	movl	$11, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movq	(%rbx), %rdi
	callq	_Z8getCoefsP5Coefs
	jmp	.LBB13_25
.LBB13_24:
	leaq	880(%rsp), %rbx
	leaq	20(%rsp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z9scanCoefsPcPi
	movq	stderr(%rip), %rcx
	movl	$.L.str.59, %edi
	movl	$10, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movl	4(%rsp), %esi
	movl	(%r14), %ebp
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	movl	%ebp, %edx
	callq	_Z11mallocCoefsPP5Coefsii
	movq	stderr(%rip), %rcx
	movl	$.L.str.60, %edi
	movl	$11, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%ebp, %edx
	callq	_Z9readCoefsPP5CoefsPci
	movq	stderr(%rip), %rdi
	movl	$.L.str.61, %esi
	movl	%ebp, %edx
	xorl	%eax, %eax
	callq	fprintf
	testl	%ebp, %ebp
	jle	.LBB13_43
.LBB13_25:                              # %.preheader.preheader
	movq	24(%rsp), %r13
	movl	20(%rsp), %ebp
	movslq	%ebp, %rax
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	leaq	1088(%rsp), %rbx
	xorl	%eax, %eax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movl	%ebp, 32(%rsp)                  # 4-byte Spill
	movq	%r13, 40(%rsp)                  # 8-byte Spill
.LBB13_26:                              # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_28 Depth 2
                                        #     Child Loop BB13_39 Depth 2
	movl	4(%rsp), %r12d
	cmpl	$2, %r12d
	jl	.LBB13_30
# %bb.27:                               # %.lr.ph152
                                        #   in Loop: Header=BB13_26 Depth=1
	imulq	$56, 8(%rsp), %rax              # 8-byte Folded Reload
	leaq	(%rax,%r13), %r14
	addq	%rax, %r13
	addq	$8, %r13
	movl	$8, %ebp
	xorl	%r15d, %r15d
.LBB13_28:                              #   Parent Loop BB13_26 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	leaq	1(%r15), %rbx
	movq	(%r13), %rcx
	addq	%rbp, %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	400(%rsp), %rdx
	callq	_Z9calcCoefsP5CoefsiP3MapPd
	movq	8(%r13), %rcx
	addq	%rbp, %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	336(%rsp), %rdx
	callq	_Z9calcCoefsP5CoefsiP3MapPd
	movq	16(%r13), %rcx
	addq	%rbp, %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	272(%rsp), %rdx
	callq	_Z9calcCoefsP5CoefsiP3MapPd
	movq	24(%r13), %rcx
	addq	%rbp, %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	208(%rsp), %rdx
	callq	_Z9calcCoefsP5CoefsiP3MapPd
	movq	32(%r13), %rcx
	addq	%rbp, %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	144(%rsp), %rdx
	callq	_Z9calcCoefsP5CoefsiP3MapPd
	movq	40(%r13), %rcx
	addq	%rbp, %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	80(%rsp), %rdx
	callq	_Z9calcCoefsP5CoefsiP3MapPd
	movslq	4(%rsp), %r12
	leaq	-1(%r12), %rax
	addq	$8, %rbp
	movq	%rbx, %r15
	cmpq	%rax, %rbx
	jl	.LBB13_28
# %bb.29:                               #   in Loop: Header=BB13_26 Depth=1
	movl	32(%rsp), %ebp                  # 4-byte Reload
	movq	40(%rsp), %r13                  # 8-byte Reload
	leaq	1088(%rsp), %rbx
.LBB13_30:                              # %._crit_edge
                                        #   in Loop: Header=BB13_26 Depth=1
	movl	$200, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	cmpb	$0, 672(%rsp)
	je	.LBB13_33
# %bb.31:                               #   in Loop: Header=BB13_26 Depth=1
	cmpb	$0, 16(%rsp)                    # 1-byte Folded Reload
	je	.LBB13_34
# %bb.32:                               #   in Loop: Header=BB13_26 Depth=1
	movq	8(%rsp), %rax                   # 8-byte Reload
	leal	1(%rax), %edx
	movl	$.L.str.62, %esi
	movq	%rbx, %rdi
	leaq	672(%rsp), %rcx
	xorl	%eax, %eax
	callq	sprintf
	movl	$.L.str.63, %esi
	jmp	.LBB13_35
.LBB13_33:                              #   in Loop: Header=BB13_26 Depth=1
	movq	stdout(%rip), %r14
	jmp	.LBB13_37
.LBB13_34:                              # %.thread
                                        #   in Loop: Header=BB13_26 Depth=1
	movq	%rbx, %rdi
	leaq	672(%rsp), %rsi
	callq	strcpy@PLT
	cmpq	$0, 8(%rsp)                     # 8-byte Folded Reload
	movl	$.L.str.64, %esi
	movl	$.L.str.63, %eax
	cmoveq	%rax, %rsi
.LBB13_35:                              # %.thread124
                                        #   in Loop: Header=BB13_26 Depth=1
	movq	%rbx, %rdi
	callq	fopen
	testq	%rax, %rax
	je	.LBB13_50
# %bb.36:                               # %._crit_edge181
                                        #   in Loop: Header=BB13_26 Depth=1
	movq	%rax, %r14
	movl	4(%rsp), %r12d
.LBB13_37:                              #   in Loop: Header=BB13_26 Depth=1
	testl	%r12d, %r12d
	jle	.LBB13_40
# %bb.38:                               # %.lr.ph155.preheader
                                        #   in Loop: Header=BB13_26 Depth=1
	imulq	$56, 8(%rsp), %rax              # 8-byte Folded Reload
	leaq	(%rax,%r13), %rbx
	addq	$8, %rbx
	xorl	%r15d, %r15d
.LBB13_39:                              # %.lr.ph155
                                        #   Parent Loop BB13_26 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rax
	movsd	(%rax,%r15,8), %xmm0            # xmm0 = mem[0],zero
	movq	8(%rbx), %rax
	movsd	(%rax,%r15,8), %xmm1            # xmm1 = mem[0],zero
	movq	16(%rbx), %rax
	movsd	(%rax,%r15,8), %xmm2            # xmm2 = mem[0],zero
	movq	24(%rbx), %rax
	movsd	(%rax,%r15,8), %xmm3            # xmm3 = mem[0],zero
	movq	32(%rbx), %rax
	movsd	(%rax,%r15,8), %xmm4            # xmm4 = mem[0],zero
	movq	40(%rbx), %rax
	movsd	(%rax,%r15,8), %xmm5            # xmm5 = mem[0],zero
	movl	$.L.str.66, %esi
	movq	%r14, %rdi
	movb	$6, %al
	callq	fprintf
	incq	%r15
	movslq	4(%rsp), %rax
	cmpq	%rax, %r15
	jl	.LBB13_39
.LBB13_40:                              # %._crit_edge156
                                        #   in Loop: Header=BB13_26 Depth=1
	movl	$10, %edi
	movq	%r14, %rsi
	callq	fputc@PLT
	cmpb	$0, 672(%rsp)
	je	.LBB13_42
# %bb.41:                               #   in Loop: Header=BB13_26 Depth=1
	movq	%r14, %rdi
	callq	fclose
.LBB13_42:                              #   in Loop: Header=BB13_26 Depth=1
	movq	8(%rsp), %rcx                   # 8-byte Reload
	incq	%rcx
	movq	%rcx, %rax
	movq	%rcx, 8(%rsp)                   # 8-byte Spill
	cmpq	48(%rsp), %rcx                  # 8-byte Folded Reload
	leaq	1088(%rsp), %rbx
	jl	.LBB13_26
.LBB13_43:                              # %._crit_edge160
	leaq	400(%rsp), %rdi
	callq	_Z7freeMapP3Map
	leaq	336(%rsp), %rdi
	callq	_Z7freeMapP3Map
	leaq	272(%rsp), %rdi
	callq	_Z7freeMapP3Map
	leaq	208(%rsp), %rdi
	callq	_Z7freeMapP3Map
	leaq	144(%rsp), %rdi
	callq	_Z7freeMapP3Map
	leaq	80(%rsp), %rdi
	callq	_Z7freeMapP3Map
	leaq	24(%rsp), %rdi
	movl	%ebp, %esi
	callq	_Z9freeCoefsPP5Coefsi
	movq	stderr(%rip), %rcx
	movl	$.L.str.67, %edi
	movl	$46, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	callq	getchar
	cmpb	$0, 880(%rsp)
	jne	.LBB13_45
# %bb.44:
	callq	getchar
.LBB13_45:
	xorl	%eax, %eax
	addq	$1352, %rsp                     # imm = 0x548
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB13_46:
	.cfi_def_cfa_offset 1408
	cmpl	$104, %eax
	je	.LBB13_51
# %bb.47:
	cmpl	$45, %eax
	jne	.LBB13_54
# %bb.48:
	leaq	2(%r14), %rbx
	movl	$.L.str.29, %esi
	movq	%rbx, %rdi
	callq	strstr
	testq	%rax, %rax
	je	.LBB13_54
# %bb.49:
	cmpb	$0, 6(%r14)
	je	.LBB13_52
	jmp	.LBB13_54
.LBB13_50:
	movq	stderr(%rip), %rdi
	leaq	1088(%rsp), %rdx
	movl	$.L.str.65, %esi
	jmp	.LBB13_55
.LBB13_51:                              # %.loopexit.loopexit
	leaq	2(%r14), %rbx
.LBB13_52:                              # %.loopexit
	movl	$.L.str.29, %esi
	movq	%rbx, %rdi
	callq	strstr
	testb	%r13b, %r13b
	je	.LBB13_57
# %bb.53:                               # %.loopexit
	testq	%rax, %rax
	jne	.LBB13_57
.LBB13_54:
	movq	stderr(%rip), %rdi
	movl	$.L.str.28, %esi
	movq	%r14, %rdx
.LBB13_55:
	xorl	%eax, %eax
	callq	fprintf
.LBB13_56:
	movl	$1, %edi
	callq	exit
.LBB13_57:
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	movl	$.Lstr.4, %edi
	callq	puts@PLT
	movl	$.Lstr.5, %edi
	callq	puts@PLT
	movl	$.Lstr.6, %edi
	callq	puts@PLT
	movl	$.Lstr.7, %edi
	callq	puts@PLT
	xorl	%edi, %edi
	callq	exit
.LBB13_58:
	leaq	464(%rsp), %rdx
	movl	$.L.str.42, %esi
	movq	%rcx, %rdi
	jmp	.LBB13_55
.LBB13_59:
	movq	stderr(%rip), %rcx
	movl	$.L.str.38, %edi
	movl	$51, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	jmp	.LBB13_56
.Lfunc_end13:
	.size	main, .Lfunc_end13-main
	.cfi_endproc
	.section	.rodata,"a",@progbits
	.p2align	3, 0x0
.LJTI13_0:
	.quad	.LBB13_7
	.quad	.LBB13_54
	.quad	.LBB13_54
	.quad	.LBB13_12
	.quad	.LBB13_54
	.quad	.LBB13_9
	.quad	.LBB13_10
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"     I  COEFFICIENT            ORDER EXPONENTS"
	.size	.L.str, 47

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"     ALL COMPONENTS ZERO "
	.size	.L.str.1, 26

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"------"
	.size	.L.str.2, 7

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"%d %lf %d %d %d %d %d %d %d"
	.size	.L.str.3, 28

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"check and store muon mass\n"
	.size	.L.str.4, 27

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Muon Mass =   %lf MeV/c^2"
	.size	.L.str.5, 26

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"check and store muon momentum\n"
	.size	.L.str.6, 31

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Muon Momentum =   %lf MeV/c"
	.size	.L.str.7, 28

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"check and store muon kin energy\n"
	.size	.L.str.8, 33

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Muon Kinetic Energy =   %lf MeV"
	.size	.L.str.9, 32

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"check and store Muon gamma\n"
	.size	.L.str.10, 28

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Muon gamma =   %lf"
	.size	.L.str.11, 19

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"check and store Muon beta\n"
	.size	.L.str.12, 27

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"Muon beta =  %lf"
	.size	.L.str.13, 17

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"check and store Muon Anomaly G\n"
	.size	.L.str.14, 32

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"Muon Anomaly G =  %lf"
	.size	.L.str.15, 22

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"check and store Muon Spin Tune G.gamma\n"
	.size	.L.str.16, 40

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"Muon Spin Tune G.gamma =  %lf"
	.size	.L.str.17, 30

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	" L    %lf"
	.size	.L.str.18, 10

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"r"
	.size	.L.str.19, 2

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"Error while opening the coefficients file: %s\n"
	.size	.L.str.20, 47

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"Something was wrong with the coefficient file!"
	.size	.L.str.23, 47

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"Begin values of the 6 dimentions: "
	.size	.L.str.24, 35

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	"%lf %lf %lf %lf %lf %lf"
	.size	.L.str.25, 24

	.type	.L.str.26,@object               # @.str.26
.L.str.26:
	.asciz	"%s"
	.size	.L.str.26, 3

	.type	.L.str.27,@object               # @.str.27
.L.str.27:
	.asciz	"%d"
	.size	.L.str.27, 3

	.type	.L.str.28,@object               # @.str.28
.L.str.28:
	.asciz	"Wrong Argument: %s\n"
	.size	.L.str.28, 20

	.type	.L.str.29,@object               # @.str.29
.L.str.29:
	.asciz	"help"
	.size	.L.str.29, 5

	.type	.L.str.38,@object               # @.str.38
.L.str.38:
	.asciz	"-s shouldn't be used without setting an output file"
	.size	.L.str.38, 52

	.type	.L.str.39,@object               # @.str.39
.L.str.39:
	.asciz	"Filename of the map: "
	.size	.L.str.39, 22

	.type	.L.str.40,@object               # @.str.40
.L.str.40:
	.asciz	"open file\n"
	.size	.L.str.40, 11

	.type	.L.str.41,@object               # @.str.41
.L.str.41:
	.asciz	"check if file is NULL\n"
	.size	.L.str.41, 23

	.type	.L.str.42,@object               # @.str.42
.L.str.42:
	.asciz	"Error while opening the map file: %s\n"
	.size	.L.str.42, 38

	.type	.L.str.43,@object               # @.str.43
.L.str.43:
	.asciz	"Get map sizes\n"
	.size	.L.str.43, 15

	.type	.L.str.44,@object               # @.str.44
.L.str.44:
	.asciz	" A "
	.size	.L.str.44, 4

	.type	.L.str.45,@object               # @.str.45
.L.str.45:
	.asciz	"\nmap sizes: %d %d %d %d %d %d\n"
	.size	.L.str.45, 31

	.type	.L.str.46,@object               # @.str.46
.L.str.46:
	.asciz	"\nmap x\n"
	.size	.L.str.46, 8

	.type	.L.str.47,@object               # @.str.47
.L.str.47:
	.asciz	"map dx\n"
	.size	.L.str.47, 8

	.type	.L.str.48,@object               # @.str.48
.L.str.48:
	.asciz	"map y\n"
	.size	.L.str.48, 7

	.type	.L.str.49,@object               # @.str.49
.L.str.49:
	.asciz	"map dy\n"
	.size	.L.str.49, 8

	.type	.L.str.50,@object               # @.str.50
.L.str.50:
	.asciz	"map delta\n"
	.size	.L.str.50, 11

	.type	.L.str.51,@object               # @.str.51
.L.str.51:
	.asciz	"map phi\n"
	.size	.L.str.51, 9

	.type	.L.str.52,@object               # @.str.52
.L.str.52:
	.asciz	"read vars"
	.size	.L.str.52, 10

	.type	.L.str.53,@object               # @.str.53
.L.str.53:
	.asciz	"read x\n"
	.size	.L.str.53, 8

	.type	.L.str.54,@object               # @.str.54
.L.str.54:
	.asciz	"read dx\n"
	.size	.L.str.54, 9

	.type	.L.str.55,@object               # @.str.55
.L.str.55:
	.asciz	"read y\n"
	.size	.L.str.55, 8

	.type	.L.str.56,@object               # @.str.56
.L.str.56:
	.asciz	"read dy\n"
	.size	.L.str.56, 9

	.type	.L.str.57,@object               # @.str.57
.L.str.57:
	.asciz	"read delta\n"
	.size	.L.str.57, 12

	.type	.L.str.58,@object               # @.str.58
.L.str.58:
	.asciz	"read phi\n"
	.size	.L.str.58, 10

	.type	.L.str.59,@object               # @.str.59
.L.str.59:
	.asciz	"map coefs\n"
	.size	.L.str.59, 11

	.type	.L.str.60,@object               # @.str.60
.L.str.60:
	.asciz	"read coefs\n"
	.size	.L.str.60, 12

	.type	.L.str.61,@object               # @.str.61
.L.str.61:
	.asciz	"Particle count: %d\n"
	.size	.L.str.61, 20

	.type	.L.str.62,@object               # @.str.62
.L.str.62:
	.asciz	"part%09d.%s"
	.size	.L.str.62, 12

	.type	.L.str.63,@object               # @.str.63
.L.str.63:
	.asciz	"w"
	.size	.L.str.63, 2

	.type	.L.str.64,@object               # @.str.64
.L.str.64:
	.asciz	"a"
	.size	.L.str.64, 2

	.type	.L.str.65,@object               # @.str.65
.L.str.65:
	.asciz	"Error while opening the output file: %s\n"
	.size	.L.str.65, 41

	.type	.L.str.66,@object               # @.str.66
.L.str.66:
	.asciz	"%10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n"
	.size	.L.str.66, 43

	.type	.L.str.67,@object               # @.str.67
.L.str.67:
	.asciz	"Output is created. Press Enter to continue...\n"
	.size	.L.str.67, 47

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"Calculates a certain amount of steps of a charged particle in a inhomogeneous\nmagnetic field.\n"
	.size	.Lstr, 95

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"<executable> (-h|--help) | <executable> [-m=<mapFileName>] [-c=<coeffFileName>]\n[-o=<outputFileName> [-s]] [-i=<nr>]\n"
	.size	.Lstr.1, 118

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"-h, --help\t\t Display help"
	.size	.Lstr.2, 26

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"-m=<mapFileName>\t Set the map file to be <mapFileName>. If not set, it\n\t\t\t will be asked for in the program itself."
	.size	.Lstr.3, 116

	.type	.Lstr.4,@object                 # @str.4
.Lstr.4:
	.asciz	"-c=<coeffFileName>\t Set the coefficients file to be <coeffFileName>. If\n\t\t\t not set, it will be asked for in the program itself.\n\t\t\t Note that the coefficients file supports multiple\n\t\t\t particles, while if the program is run without this\n\t\t\t file, it supports only one particle."
	.size	.Lstr.4, 280

	.type	.Lstr.5,@object                 # @str.5
.Lstr.5:
	.asciz	"-o=<outputFileName>\t Set the output file to be <outputFileName>. If not\n\t\t\t set, it will default to stdout"
	.size	.Lstr.5, 107

	.type	.Lstr.6,@object                 # @str.6
.Lstr.6:
	.asciz	"-s\t\t\t Choose if you want one output file or (if applicable)\n\t\t\t multiple output files. Note that this parameter can\n\t\t\t only be set if an output file is set."
	.size	.Lstr.6, 158

	.type	.Lstr.7,@object                 # @str.7
.Lstr.7:
	.asciz	"-i=<nr>\t\t\t Set the number of iterations to <nr>. If not set, it\n\t\t\t will default to 4000."
	.size	.Lstr.7, 90

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
