#include<bits/stdc++.h>
using namespace std;
#define pi (2.0*acos(0.0))
#define eps 1e-6
#define ll long long
#define inf (1<<29)
#define vi vector<int>
#define vll vector<ll>
#define sc(x) scanf("%d",&x)
#define scl(x) scanf("%lld",&x)
#define all(v) v.begin() , v.end()
#define me(a,val) memset( a , val ,sizeof(a) )
#define pb(x) push_back(x)
#define pii pair<int,int> 
#define mp(a,b) make_pair(a,b)
#define Q(x) (x) * (x)
#define L(x) ((x<<1) + 1)
#define R(x) ((x<<1) + 2)
#define M(x,y) ((x+y)>>1)
#define fi first
#define se second
#define MOD 1000000007
#define ios ios::sync_with_stdio(0)
#define TRADITIONAL 1
#define N 1024

typedef struct MatrixStruct {
	double **data;
	int height, width;
} Matrix;

void nrerror(string s){
	printf("Numerical Recipes run-time error...\n");
	printf("%s\n",s.c_str());
	printf("...now exiting to system...\n");
	exit(1);
}

double *dvector(int nl, int nh){
	double *v;
	v = (double *) calloc((unsigned) (nh-nl+1), sizeof(double));
	if (!v) nrerror("allocation failure in dvector()");
	return v-nl;
}

float *vector(int nl, int nh){
	float *v;
	v = (float *) calloc((unsigned) (nh-nl+1), sizeof(float));
	if (!v) nrerror("allocation failure in dvector()");
	return v-nl;
}

void free_dvector(double *v, int nl, int nh){
	free((char*) (v+nl));
}

void free_vector(float *v, int nl, int nh){
	free((char*) (v+nl));
}

float **matrix(int nrl,int nrh,int ncl,int nch){
	float **m;
	m = (float **) malloc((unsigned) (nrh-nrl+1)*sizeof(float*));
	if (!m) nrerror("allocation failure 1 in matrix()");
	m -= nrl;
	for(int i = nrl ; i <= nrh ; i++){
		m[i]=(float *) malloc((unsigned) (nch-ncl+1)*sizeof(float));
		if (!m[i]) nrerror("allocation failure 2 in matrix()");
		m[i] -= ncl;
	}
	return m;
}

void free_matrix(float **m,int nrl,int nrh,int ncl,int nch){
	for(int i = nrh ; i >= nrl ; i--) free((char*) (m[i]+ncl));
	free((char*) (m+nrl));
}

double **dmatrix(int nrl, int nrh, int ncl, int nch){
	double **m;
	m = (double **) calloc((unsigned) (nrh-nrl+1), sizeof(double*));
	if (!m) nrerror("allocation failure 1 in dmatrix()");
	m -= nrl;
	for(int i = nrl ; i <= nrh ; i++){
		m[i] = (double *) calloc((unsigned) (nch-ncl+1), sizeof(double));
		if (!m[i]) nrerror("allocation failure 2 in dmatrix()");
		m[i] -= ncl;
	}
	return m;
}

void free_dmatrix(double **m, int nrl, int nrh, int ncl, int nch){
	for(int i = nrh ; i >= nrl ; i--) free((char*) (m[i]+ncl));
	free((char*) (m+nrl));
}

/*
double log2(double x){
	return log10(x) / log10( 2.0 );
}
*/

void CreateMatrix(Matrix **M, int hei, int wid){
	Matrix *tmp;

	tmp = (Matrix *) calloc(1, sizeof(Matrix)); 
	tmp->data = (double **) calloc(hei, sizeof(double *));
	
	if (!(tmp->data)) {
		nrerror("allocation failure in CreateMatrix()");
		exit(1);
	}

	for (int h = 0 ; h < hei ; h++) {
		tmp->data[h] = (double *) calloc(wid, sizeof(double));
		if (!(tmp->data[h])) {
			nrerror("allocation failure in CreateMatrix()");
			exit(1);
		}
	}

	tmp->height = hei;
	tmp->width = wid;
	*M = tmp;
}

void FreeMatrix(Matrix *M){
	int hei = M->height;
	for(int h = 0 ; h < hei ; h++){
	     free(M->data[h]);
	}
	free(M->data);
	free(M);
}


void four1(double *data, int nn, int isign){
	int n, mmax, m, j, istep, i;
	double wtemp, wr, wpr, wpi, wi, theta;
	double tempr, tempi;
	n = nn << 1;
	j = 1;
	for (i=1;i<n;i+=2) {
		if (j > i) {
			swap(data[j],data[i]);
			swap(data[j+1],data[i+1]);
		}
		m = n >> 1;
		while (m >= 2 && j > m) {
			j -= m;
			m >>= 1;
		}
		j += m;
	}
	mmax = 2;
	while (n > mmax) {
		istep = 2*mmax;
		theta = 6.28318530717959/(isign*mmax);
		wtemp = sin(0.5*theta);
		wpr = -2.0*wtemp*wtemp;
		wpi = sin(theta);
		wr = 1.0;
		wi = 0.0;
		for (m=1;m<mmax;m+=2) {
			for (i=m;i<=n;i+=istep) {
				j = i+mmax;
				tempr = wr*data[j]-wi*data[j+1];
				tempi = wr*data[j+1]+wi*data[j];
				data[j] = data[i]-tempr;
				data[j+1] = data[i+1]-tempi;
				data[i] += tempr;
				data[i+1] += tempi;
			}
			wr = (wtemp=wr)*wpr-wi*wpi+wr;
			wi = wi*wpr+wtemp*wpi+wi;
		}
		mmax = istep;
	}
}

void four2(double **fftr, double **ffti, double **rdata, double **idata, int rs, int cs, int isign){
/************************************************************ 

   2-D fourier transform of data with real part stored in
   "rdata" and imaginary part in "idata" with size "rs" x
   "cs". The result is in "fftr" and "ffti". The isign is
   "isign" =  1 forward, and "isign" = -1 inverse 

*************************************************************/
        double **T, *tmp1, *tmp2;
        int i, j;

        tmp1 = dvector(1,2*cs);
        tmp2 = dvector(1,2*rs);
        T = dmatrix(1,2*rs,1,cs);

        for (i=1;i<=rs;i++) {
            for (j=1;j<=cs;j++) {
                tmp1[j*2-1] = rdata[i][j];
                tmp1[j*2] = idata[i][j];
            }
            four1(tmp1, cs, isign);
            for (j=1;j<=cs;j++) {
                T[i*2-1][j] = tmp1[j*2-1];
                T[i*2][j] = tmp1[j*2];
            }
        }

        for (i=1;i<=cs;i++) {
            for (j=1;j<=rs;j++) {
                tmp2[j*2-1] = T[j*2-1][i];
                tmp2[j*2] = T[j*2][i];
            }
            four1(tmp2,rs,isign);
            for (j=1;j<=rs;j++) {
                fftr[j][i] = tmp2[j*2-1];
                ffti[j][i] = tmp2[j*2];
            }
        }
        free_dvector(tmp1, 1, 2*cs);
        free_dvector(tmp2, 1, 2*rs);
        free_dmatrix(T, 1, 2*rs, 1, cs); 
}

void Mat_FFT2(Matrix *Output_real, Matrix *Output_imag, Matrix *Input_real, Matrix *Input_imag){
	int xs, ys, i, j;
	double **R, **I, **Fr, **Fi;

	xs = Input_real->height;
	ys = Input_real->width;

    R  = dmatrix(1,xs,1,ys);
    I  = dmatrix(1,xs,1,ys);
    Fr = dmatrix(1,xs,1,ys);
    Fi = dmatrix(1,xs,1,ys);
		
    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            R[i][j] = Input_real->data[i-1][j-1];
            I[i][j] = Input_imag->data[i-1][j-1];
        }

    four2(Fr, Fi, R, I, xs, ys, 1);         /* 2-D FFT */

    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            Output_real->data[i-1][j-1] = Fr[i][j];
            Output_imag->data[i-1][j-1] = Fi[i][j];
        }

    free_dmatrix(R,1,xs,1,ys);
    free_dmatrix(I,1,xs,1,ys);   
    free_dmatrix(Fr,1,xs,1,ys);
    free_dmatrix(Fi,1,xs,1,ys);   
}

void Mat_IFFT2(Matrix *Output_real, Matrix *Output_imag, Matrix *Input_real, Matrix *Input_imag){
	int xs, ys, i, j;
	double **R, **I, **Fr, **Fi, NN;

	xs = Input_real->height;
	ys = Input_real->width;

    R  = dmatrix(1,xs,1,ys);
    I  = dmatrix(1,xs,1,ys);
    Fr = dmatrix(1,xs,1,ys);
    Fi = dmatrix(1,xs,1,ys);

    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            R[i][j] = Input_real->data[i-1][j-1];
            I[i][j] = Input_imag->data[i-1][j-1];
        }

    four2(Fr, Fi, R, I, xs, ys, -1);         /* 2-D IFFT */

	NN = (double) (xs*ys);

    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            Output_real->data[i-1][j-1] = Fr[i][j]/NN;
            Output_imag->data[i-1][j-1] = Fi[i][j]/NN;
        }

    free_dmatrix(R,1,xs,1,ys);
    free_dmatrix(I,1,xs,1,ys);   
    free_dmatrix(Fr,1,xs,1,ys);
    free_dmatrix(Fi,1,xs,1,ys);   
}

void Mat_Copy(Matrix *A, Matrix *B, int h_target, int w_target, int h_begin, int w_begin, int h_end, int w_end){
	int i, j, h, w, h_done, w_done;
	if ((h_target >= 0)&&(h_target < A->height)&&(w_target >= 0)&&(w_target < A->width)) {
		if ((h_begin >= 0)&&(h_begin < B->height)&&(w_begin >= 0)&&(w_begin < B->width)) {
			h = h_end-h_begin+1;
			w = w_end-w_begin+1;
			if ((h >= 1)&&(w >= 1)) {
				h_done = h_target+h-1;
				w_done = w_target+w-1;
				if ((h_done < A->height)&&(w_done < A->width)) {
					for (i=0;i<h;i++) {
						for (j=0;j<w;j++) {
							A->data[i+h_target][j+w_target] = B->data[i+h_begin][j+w_begin];
						}
					}
				}
			}
		}
	}
	else {
		printf("matrix dimension error!\n");
		exit(1);
	}
}


void Mat_Product(Matrix *A, Matrix *B, Matrix *C){
	for(int h = 0 ; h < A->height ; h++)
		for(int w = 0 ; w < A->width ; w++)
			A->data[h][w] = B->data[h][w]*C->data[h][w];
}

void Mat_Sum(Matrix *A, Matrix *B, Matrix *C){
	for(int h = 0 ; h < A-> height ; h++)
		for(int w = 0 ; w < A->width ; w++)
			A->data[h][w] = B->data[h][w]+C->data[h][w];
}

void Mat_Substract(Matrix *A, Matrix *B, Matrix *C){
	for(int h = 0 ; h < A->height ; h++)
		for(int w = 0 ; w < A->width ; w++)
			A->data[h][w] = B->data[h][w]-C->data[h][w];
}

void Gabor(Matrix *Gr, Matrix *Gi, int s, int n, double Ul, double Uh, int scale, int orientation, int flag);

void GaborFilteredImg(Matrix *FilteredImg_real, Matrix *FilteredImg_imag, Matrix *img, int side, double Ul, double Uh, int scale, int orientation, int flag){
	int h, w, xs, ys, border, r1, r2, r3, r4, hei, wid, s, n, base;
	Matrix *IMG, *IMG_imag, *Gr, *Gi, *Tmp_1, *Tmp_2, *F_1, *F_2, *G_real, *G_imag, *F_real, *F_imag,*F;
	double m, v;
	
	base = scale*orientation;
	double *features; //exact memory
	features = (double *)malloc( 2 * scale * orientation * sizeof(double) );

	border = side;
	hei = img->height;
	wid = img->width;

	/* FFT2 */
	xs = (int) pow(2.0, ceil(log2((double)(img->height+2.0*border))));
	ys = (int) pow(2.0, ceil(log2((double)(img->width+2.0*border))));

	CreateMatrix(&IMG, xs, ys);

	r1 = img->width+border;
	r2 = img->width+2*border;
	for (h=0;h<border;h++) {
		for (w=0;w<border;w++)
			IMG->data[h][w] = img->data[border-1-h][border-1-w];
		for (w=border;w<r1;w++)
			IMG->data[h][w] = img->data[border-1-h][w-border];
		for (w=r1;w<r2;w++)
			IMG->data[h][w] = img->data[border-1-h][2*img->width-w+border-1];
	}

	r1 = img->height+border;
	r2 = img->width+border;
	r3 = img->width+2*border;
	for (h=border;h<r1;h++) {
		for (w=0;w<border;w++)
			IMG->data[h][w] = img->data[h-border][border-1-w];
		for (w=border;w<r2;w++)
			IMG->data[h][w] = img->data[h-border][w-border];
		for (w=r2;w<r3;w++)
			IMG->data[h][w] = img->data[h-border][2*img->width-w+border-1];
	}

	r1 = img->height+border;
	r2 = img->height+2*border;
	r3 = img->width+border;
	r4 = img->width+2*border;
	for (h=r1;h<r2;h++) {
		for (w=0;w<border;w++)
			IMG->data[h][w] = img->data[2*img->height-h+border-1][border-1-w];
		for (w=border;w<r3;w++)
			IMG->data[h][w] = img->data[2*img->height-h+border-1][w-border];
		for (w=r3;w<r4;w++)
			IMG->data[h][w] = img->data[2*img->height-h+border-1][2*img->width-w+border-1];
	}

	CreateMatrix(&F_real, xs, ys);
	CreateMatrix(&F_imag, xs, ys);
	CreateMatrix(&IMG_imag, xs, ys);

	Mat_FFT2(F_real, F_imag, IMG, IMG_imag);

	/* ----------- compute the Gabor filtered output ------------- */

	CreateMatrix(&Gr, 2*side+1, 2*side+1);
	CreateMatrix(&Gi, 2*side+1, 2*side+1);
	CreateMatrix(&Tmp_1, xs, ys);
	CreateMatrix(&Tmp_2, xs, ys);
	CreateMatrix(&F_1, xs, ys);
	CreateMatrix(&F_2, xs, ys);
	CreateMatrix(&G_real, xs, ys);
	CreateMatrix(&G_imag, xs, ys);
    CreateMatrix(&F, hei, wid);
    
	for (s=0;s<scale;s++){
		for (n=0;n<orientation;n++) {
			Gabor(Gr, Gi, s+1, n+1, Ul, Uh, scale, orientation, flag);//CUDA- 2 normales y logn
			Mat_Copy(F_1, Gr, 0, 0, 0, 0, 2*side, 2*side);//CUDA
			Mat_Copy(F_2, Gi, 0, 0, 0, 0, 2*side, 2*side);//CUDA
			Mat_FFT2(G_real, G_imag, F_1, F_2);//CUDA-no definido

			Mat_Product(Tmp_1, G_real, F_real);//CUDA
			Mat_Product(Tmp_2, G_imag, F_imag);//CUDA
			Mat_Substract(IMG, Tmp_1, Tmp_2);//CUDA

			Mat_Product(Tmp_1, G_real, F_imag);//CUDA
			Mat_Product(Tmp_2, G_imag, F_real);//CUDA
			Mat_Sum(IMG_imag, Tmp_1, Tmp_2);//CUDA

			Mat_IFFT2(Tmp_1, Tmp_2, IMG, IMG_imag);//CUDA-no definido
			
			//CUDA - logn
			m = 0;
			for (h=0;h<hei;h++)
				for (w=0;w<wid;w++) {
					F->data[h][w] = sqrt(pow(IMG->data[h][w], 2.0)+pow(IMG_imag->data[h][w], 2.0));
					m += F->data[h][w];
				}

			m /= (double) (hei*wid);
			features[s*orientation+n] = (float) m;
			
			//CUDA - logn
			v = 0;
			for (h=0;h<hei;h++)
				for (w=0;w<wid;w++)
					v += (F->data[h][w]-m)*(F->data[h][w]-m);

			v /= (double) (hei*wid);
			features[base+s*orientation+n] = (float) sqrt(v);
            
			Mat_Copy(FilteredImg_real, Tmp_1, s*hei, n*wid, 2*side, 2*side, hei+2*side-1, wid+2*side-1);//CUDA
			Mat_Copy(FilteredImg_imag, Tmp_2, s*hei, n*wid, 2*side, 2*side, hei+2*side-1, wid+2*side-1);//CUDA
		}
	}
	
    for(int i = 0 ; i < (2 * scale * orientation) ; i++)
        printf("%.8lf ",features[i]);
    printf("\n");
    cout << 2 * scale  * orientation << endl;
    
	FreeMatrix(Gr);
	FreeMatrix(Gi);
	FreeMatrix(Tmp_1);
	FreeMatrix(Tmp_2);
	FreeMatrix(F_1);
	FreeMatrix(F_2);
	FreeMatrix(G_real);
	FreeMatrix(G_imag);
	FreeMatrix(F_real);
	FreeMatrix(F_imag);
	FreeMatrix(IMG);
	FreeMatrix(IMG_imag);
}

/* ------------------------------------------------------------------------------------------------------
The Gabor function generates a Gabor filter with the selected index 's' and 'n' (scale and orientation, 
respectively) from a Gabor filter bank. This filter bank is designed by giving the range of spatial 
frequency (Uh and Ul) and the total number of scales and orientations used to partition the spectrum. 

The returned filter is stored in 'Gr' (real part) and 'Gi' (imaginary part).
--------------------------------------------------------------------------------------------------------*/
void Gabor(Matrix *Gr, Matrix *Gi, int s, int n, double Ul, double Uh, int scale, int orientation, int flag){
	double base, a, u0, z, Uvar, Vvar, Xvar, Yvar, X, Y, G, t1, t2, m;
	int x, y, side;

	base = Uh/Ul;
	a = pow(base, 1.0/(double)(scale-1));

	u0 = Uh/pow(a, (double) scale-s);

	Uvar = (a-1.0)*u0/((a+1.0)*sqrt(2.0*log(2.0)));

	z = -2.0*log(2.0)*(Uvar*Uvar)/u0;
	Vvar = tan(pi/(2*orientation))*(u0+z)/sqrt(2.0*log(2.0)-z*z/(Uvar*Uvar));

        Xvar = 1.0/(2.0*pi*Uvar);
        Yvar = 1.0/(2.0*pi*Vvar);

	t1 = cos(pi/orientation*(n-1.0));
	t2 = sin(pi/orientation*(n-1.0));

	side = (int) (Gr->height-1)/2;

	//CUDA
	for (x=0;x<2*side+1;x++) {
		for (y=0;y<2*side+1;y++) {
			X = (double) (x-side)*t1+ (double) (y-side)*t2;
			Y = (double) -(x-side)*t2+ (double) (y-side)*t1;
			G = 1.0/(2.0*pi*Xvar*Yvar)*pow(a, (double) scale-s)*exp(-0.5*((X*X)/(Xvar*Xvar)+(Y*Y)/(Yvar*Yvar)));
			Gr->data[x][y] = G*cos(2.0*pi*u0*X);
			Gi->data[x][y] = G*sin(2.0*pi*u0*X);
		}
	}

	/* if flag = 1, then remove the DC from the filter */
	

	if (flag == 1) {
	
		//CUDA - logn
		m = 0;
		for (x=0;x<2*side+1;x++)
			for (y=0;y<2*side+1;y++)
				m += Gr->data[x][y];

		m /= pow((double) 2.0*side+1, 2.0);
		
		
		//CUDA
		for (x=0;x<2*side+1;x++)
			for (y=0;y<2*side+1;y++)
				Gr->data[x][y] -= m;
	}	
}

int main(int argc, char **argv){
	int hei, wid, side, scale, orientation, flag;//, s, n;
	//Matrix *Gabor_r, *Gabor_i, *Gr, *Gi, *img, *F_r, *F_i;
	Matrix *img , *F_r , *F_i;
	FILE *fp;
	unsigned char *tmp; 
	//float *output;
	double Ul, Uh;
	/* --------------------------- Example --------------------------------
		scale = 3, 
		orientation = 4, 
		Uh (highest spatial frequency) = 0.4, 
		Ul (lowest spatial frequency) = 0.1,
		flag (removing the DC term) = 0 (False),
		side (filter dimension = (2*side+1)*(2*side+1)) = 60
	----------------------------------------------------------------------- */
	scale = 3;
	orientation = 4;
	Ul = 0.1;
	Uh = 0.4;
	flag = 0;
	side = 60;

	if (argc != 4) {
		printf("usage: %s <image_name> <height> <width>\n",argv[0]);
		exit(0);
	}
	
	hei = atoi(argv[2]);
	wid = atoi(argv[3]);

	tmp = (unsigned char *) calloc(hei*wid, sizeof(unsigned char));

	if ((fp = fopen(argv[1],"r")) == NULL) {
		printf("%s can not be open!\n", argv[1]);
		exit(0);
	}
	fread(tmp, sizeof(unsigned char), hei*wid, fp);
	fclose(fp);

	
	CreateMatrix(&img, hei, wid);
	for(int i = 0 ; i < hei ; i++)
		for(int j = 0 ; j < wid ; j++)
			img->data[i][j] = (double) (tmp[i*wid+j]);
			
	free(tmp);
		
	CreateMatrix(&F_r, hei*scale, wid*orientation);
	CreateMatrix(&F_i, hei*scale, wid*orientation);

	GaborFilteredImg(F_r, F_i, img, side, Ul, Uh, scale, orientation, flag);

	FreeMatrix(F_r);
	FreeMatrix(F_i);
	return 0;
}

	.file	"tmpxft_00326c8c_00000000-6_A.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB10850:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE10850:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Numerical Recipes run-time error...\n"
.LC1:
	.string	"%s\n"
.LC2:
	.string	"...now exiting to system...\n"
	.text
	.globl	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB10825:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rsi
	movq	%rdi, %rbx
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	(%rbx), %rdx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movl	$2, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE10825:
	.size	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.globl	_Z12free_dvectorPdii
	.type	_Z12free_dvectorPdii, @function
_Z12free_dvectorPdii:
.LFB10828:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	(%rdi,%rsi,8), %rdi
	jmp	free@PLT
	.cfi_endproc
.LFE10828:
	.size	_Z12free_dvectorPdii, .-_Z12free_dvectorPdii
	.globl	_Z11free_vectorPfii
	.type	_Z11free_vectorPfii, @function
_Z11free_vectorPfii:
.LFB10829:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	(%rdi,%rsi,4), %rdi
	jmp	free@PLT
	.cfi_endproc
.LFE10829:
	.size	_Z11free_vectorPfii, .-_Z11free_vectorPfii
	.globl	_Z11free_matrixPPfiiii
	.type	_Z11free_matrixPPfiiii, @function
_Z11free_matrixPPfiiii:
.LFB10831:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movslq	%ecx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	salq	$2, %r12
	movslq	%edx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movslq	%esi, %rbx
	pushq	%r8
	.cfi_def_cfa_offset 48
.L7:
	cmpl	%ebp, %ebx
	jg	.L11
	movq	0(%r13,%rbp,8), %rdi
	decq	%rbp
	addq	%r12, %rdi
	call	free@PLT
	jmp	.L7
.L11:
	popq	%rax
	.cfi_def_cfa_offset 40
	leaq	0(%r13,%rbx,8), %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
.LFE10831:
	.size	_Z11free_matrixPPfiiii, .-_Z11free_matrixPPfiiii
	.globl	_Z12free_dmatrixPPdiiii
	.type	_Z12free_dmatrixPPdiiii, @function
_Z12free_dmatrixPPdiiii:
.LFB10833:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movslq	%ecx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	salq	$3, %r12
	movslq	%edx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movslq	%esi, %rbx
	pushq	%r8
	.cfi_def_cfa_offset 48
.L13:
	cmpl	%ebp, %ebx
	jg	.L16
	movq	0(%r13,%rbp,8), %rdi
	decq	%rbp
	addq	%r12, %rdi
	call	free@PLT
	jmp	.L13
.L16:
	popq	%rax
	.cfi_def_cfa_offset 40
	leaq	0(%r13,%rbx,8), %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
.LFE10833:
	.size	_Z12free_dmatrixPPdiiii, .-_Z12free_dmatrixPPdiiii
	.globl	_Z10FreeMatrixP12MatrixStruct
	.type	_Z10FreeMatrixP12MatrixStruct, @function
_Z10FreeMatrixP12MatrixStruct:
.LFB10835:
	.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
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	8(%rdi), %r12d
	movq	%rdi, %rbx
.L18:
	movq	(%rbx), %rdi
	cmpl	%ebp, %r12d
	jle	.L21
	movq	(%rdi,%rbp,8), %rdi
	incq	%rbp
	call	free@PLT
	jmp	.L18
.L21:
	call	free@PLT
	movq	%rbx, %rdi
	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
.LFE10835:
	.size	_Z10FreeMatrixP12MatrixStruct, .-_Z10FreeMatrixP12MatrixStruct
	.globl	_Z5four1Pdii
	.type	_Z5four1Pdii, @function
_Z5four1Pdii:
.LFB10836:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$1, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%edx, %r13d
	movl	$1, %edx
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leal	(%rsi,%rsi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdi, %rbx
	movl	%ebp, %edi
	sarl	%edi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
.L23:
	cmpl	%eax, %ebp
	jle	.L40
	cmpl	%eax, %edx
	jle	.L24
	movslq	%edx, %rcx
	movsd	(%rbx,%rax,8), %xmm1
	salq	$3, %rcx
	leaq	(%rbx,%rcx), %rsi
	leaq	8(%rbx,%rcx), %rcx
	movsd	(%rsi), %xmm0
	movsd	%xmm1, (%rsi)
	movsd	8(%rbx,%rax,8), %xmm1
	movsd	%xmm0, (%rbx,%rax,8)
	movsd	(%rcx), %xmm0
	movsd	%xmm1, (%rcx)
	movsd	%xmm0, 8(%rbx,%rax,8)
.L24:
	movl	%edi, %ecx
.L25:
	cmpl	$1, %ecx
	jle	.L35
	cmpl	%edx, %ecx
	jge	.L35
	subl	%ecx, %edx
	sarl	%ecx
	jmp	.L25
.L35:
	addl	%ecx, %edx
	addq	$2, %rax
	jmp	.L23
.L40:
	movl	$2, %r12d
.L29:
	cmpl	%ebp, %r12d
	jge	.L41
	movl	%r12d, %eax
	movsd	.LC5(%rip), %xmm7
	leal	(%r12,%r12), %r14d
	imull	%r13d, %eax
	cvtsi2sdl	%eax, %xmm0
	divsd	%xmm0, %xmm7
	movsd	.LC6(%rip), %xmm0
	mulsd	%xmm7, %xmm0
	movsd	%xmm7, (%rsp)
	call	sin@PLT
	movsd	.LC7(%rip), %xmm4
	mulsd	%xmm0, %xmm4
	mulsd	%xmm0, %xmm4
	movsd	(%rsp), %xmm0
	movsd	%xmm4, 8(%rsp)
	call	sin@PLT
	movslq	%r14d, %r9
	movslq	%r12d, %r8
	leaq	8(%rbx), %rsi
	movsd	8(%rsp), %xmm4
	movaps	%xmm0, %xmm5
	salq	$3, %r8
	xorps	%xmm2, %xmm2
	movsd	.LC4(%rip), %xmm1
	leaq	0(,%r9,8), %r10
	movl	$1, %ecx
.L30:
	cmpl	%ecx, %r12d
	jle	.L34
	leaq	(%rsi,%r8), %rdx
	movq	%rsi, %rax
	movq	%rcx, %rdi
.L32:
	cmpl	%edi, %ebp
	jl	.L42
	movsd	(%rdx), %xmm6
	movsd	8(%rdx), %xmm0
	addq	%r9, %rdi
	movaps	%xmm6, %xmm3
	movaps	%xmm0, %xmm7
	mulsd	%xmm1, %xmm3
	mulsd	%xmm2, %xmm7
	mulsd	%xmm2, %xmm6
	mulsd	%xmm1, %xmm0
	subsd	%xmm7, %xmm3
	addsd	%xmm6, %xmm0
	movsd	(%rax), %xmm6
	subsd	%xmm3, %xmm6
	movsd	%xmm6, (%rdx)
	movsd	8(%rax), %xmm6
	subsd	%xmm0, %xmm6
	movsd	%xmm6, 8(%rdx)
	addsd	(%rax), %xmm3
	addsd	8(%rax), %xmm0
	addq	%r10, %rdx
	movsd	%xmm3, (%rax)
	movsd	%xmm0, 8(%rax)
	addq	%r10, %rax
	jmp	.L32
.L42:
	movaps	%xmm1, %xmm0
	movaps	%xmm2, %xmm3
	movaps	%xmm1, %xmm6
	addq	$2, %rcx
	mulsd	%xmm5, %xmm3
	addq	$16, %rsi
	mulsd	%xmm4, %xmm0
	mulsd	%xmm5, %xmm6
	subsd	%xmm3, %xmm0
	movaps	%xmm2, %xmm3
	mulsd	%xmm4, %xmm3
	addsd	%xmm0, %xmm1
	addsd	%xmm6, %xmm3
	addsd	%xmm3, %xmm2
	jmp	.L30
.L34:
	movl	%r14d, %r12d
	jmp	.L29
.L41:
	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
.LFE10836:
	.size	_Z5four1Pdii, .-_Z5four1Pdii
	.section	.rodata.str1.1
.LC8:
	.string	"matrix dimension error!\n"
	.text
	.globl	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	.type	_Z8Mat_CopyP12MatrixStructS0_iiiiii, @function
_Z8Mat_CopyP12MatrixStructS0_iiiiii:
.LFB10841:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	testl	%edx, %edx
	js	.L44
	movslq	%ecx, %rax
	movl	8(%rdi), %ebp
	testl	%eax, %eax
	js	.L44
	cmpl	%edx, %ebp
	jle	.L44
	movl	12(%rdi), %r12d
	cmpl	%eax, %r12d
	jle	.L44
	testl	%r8d, %r8d
	js	.L43
	movq	%rsi, %r11
	cmpl	%r8d, 8(%rsi)
	jle	.L43
	testl	%r9d, %r9d
	js	.L43
	cmpl	%r9d, 12(%rsi)
	jle	.L43
	movl	32(%rsp), %esi
	movl	40(%rsp), %r10d
	subl	%r8d, %esi
	subl	%r9d, %r10d
	leal	1(%rsi), %ecx
	leal	1(%r10), %ebx
	testl	%ecx, %ecx
	jle	.L43
	testl	%ebx, %ebx
	jle	.L43
	addl	%eax, %ebx
	cmpl	%ebx, %r12d
	jl	.L43
	addl	%edx, %ecx
	cmpl	%ecx, %ebp
	jl	.L43
	movq	(%r11), %rcx
	movslq	%r8d, %r8
	movslq	%edx, %rdx
	movslq	%r9d, %r9
	salq	$3, %r9
	salq	$3, %rax
	leaq	(%rcx,%r8,8), %r8
	movq	(%rdi), %rcx
	leaq	(%rcx,%rdx,8), %r11
	xorl	%ecx, %ecx
.L46:
	movq	(%r8,%rcx,8), %rbx
	movq	(%r11,%rcx,8), %rdi
	xorl	%edx, %edx
	addq	%r9, %rbx
	addq	%rax, %rdi
.L47:
	movsd	(%rbx,%rdx,8), %xmm0
	movsd	%xmm0, (%rdi,%rdx,8)
	incq	%rdx
	leal	-1(%rdx), %ebp
	cmpl	%ebp, %r10d
	jg	.L47
	incq	%rcx
	leal	-1(%rcx), %edx
	cmpl	%edx, %esi
	jg	.L46
	jmp	.L43
.L44:
	movl	$2, %edi
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L43:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10841:
	.size	_Z8Mat_CopyP12MatrixStructS0_iiiiii, .-_Z8Mat_CopyP12MatrixStructS0_iiiiii
	.globl	_Z11Mat_ProductP12MatrixStructS0_S0_
	.type	_Z11Mat_ProductP12MatrixStructS0_S0_, @function
_Z11Mat_ProductP12MatrixStructS0_S0_:
.LFB10842:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movq	%rdx, %r8
	xorl	%edx, %edx
	movq	%rsi, %rdi
	movl	8(%rcx), %r10d
	cmpl	%edx, %r10d
	jg	.L77
	ret
.L77:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
.L75:
	movl	12(%rcx), %r9d
	leaq	0(,%rdx,8), %rsi
	xorl	%eax, %eax
.L72:
	cmpl	%eax, %r9d
	jle	.L78
	movq	(%rdi), %rbx
	movq	(%rcx), %r11
	movq	(%rbx,%rsi), %rbp
	movq	(%r8), %rbx
	movq	(%r11,%rsi), %r11
	movq	(%rbx,%rsi), %rbx
	movsd	0(%rbp,%rax,8), %xmm0
	mulsd	(%rbx,%rax,8), %xmm0
	movsd	%xmm0, (%r11,%rax,8)
	incq	%rax
	jmp	.L72
.L78:
	incq	%rdx
	cmpl	%edx, %r10d
	jg	.L75
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10842:
	.size	_Z11Mat_ProductP12MatrixStructS0_S0_, .-_Z11Mat_ProductP12MatrixStructS0_S0_
	.globl	_Z7Mat_SumP12MatrixStructS0_S0_
	.type	_Z7Mat_SumP12MatrixStructS0_S0_, @function
_Z7Mat_SumP12MatrixStructS0_S0_:
.LFB10843:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movq	%rdx, %r8
	xorl	%edx, %edx
	movq	%rsi, %rdi
	movl	8(%rcx), %r10d
	cmpl	%edx, %r10d
	jg	.L88
	ret
.L88:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
.L86:
	movl	12(%rcx), %r9d
	leaq	0(,%rdx,8), %rsi
	xorl	%eax, %eax
.L83:
	cmpl	%eax, %r9d
	jle	.L89
	movq	(%rdi), %rbx
	movq	(%rcx), %r11
	movq	(%rbx,%rsi), %rbp
	movq	(%r8), %rbx
	movq	(%r11,%rsi), %r11
	movq	(%rbx,%rsi), %rbx
	movsd	0(%rbp,%rax,8), %xmm0
	addsd	(%rbx,%rax,8), %xmm0
	movsd	%xmm0, (%r11,%rax,8)
	incq	%rax
	jmp	.L83
.L89:
	incq	%rdx
	cmpl	%edx, %r10d
	jg	.L86
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10843:
	.size	_Z7Mat_SumP12MatrixStructS0_S0_, .-_Z7Mat_SumP12MatrixStructS0_S0_
	.globl	_Z13Mat_SubstractP12MatrixStructS0_S0_
	.type	_Z13Mat_SubstractP12MatrixStructS0_S0_, @function
_Z13Mat_SubstractP12MatrixStructS0_S0_:
.LFB10844:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movq	%rdx, %r8
	xorl	%edx, %edx
	movq	%rsi, %rdi
	movl	8(%rcx), %r10d
	cmpl	%edx, %r10d
	jg	.L99
	ret
.L99:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
.L97:
	movl	12(%rcx), %r9d
	leaq	0(,%rdx,8), %rsi
	xorl	%eax, %eax
.L94:
	cmpl	%eax, %r9d
	jle	.L100
	movq	(%rdi), %rbx
	movq	(%rcx), %r11
	movq	(%rbx,%rsi), %rbp
	movq	(%r8), %rbx
	movq	(%r11,%rsi), %r11
	movq	(%rbx,%rsi), %rbx
	movsd	0(%rbp,%rax,8), %xmm0
	subsd	(%rbx,%rax,8), %xmm0
	movsd	%xmm0, (%r11,%rax,8)
	incq	%rax
	jmp	.L94
.L100:
	incq	%rdx
	cmpl	%edx, %r10d
	jg	.L97
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10844:
	.size	_Z13Mat_SubstractP12MatrixStructS0_S0_, .-_Z13Mat_SubstractP12MatrixStructS0_S0_
	.globl	_Z5GaborP12MatrixStructS0_iiddiii
	.type	_Z5GaborP12MatrixStructS0_iiddiii, @function
_Z5GaborP12MatrixStructS0_iiddiii:
.LFB10846:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%r8), %eax
	movaps	%xmm1, %xmm2
	movaps	%xmm0, %xmm3
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	cvtsi2sdl	%eax, %xmm1
	movaps	%xmm2, %xmm0
	movl	%ecx, %r15d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	divsd	%xmm3, %xmm0
	movl	%r9d, %r14d
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movsd	.LC4(%rip), %xmm7
	movsd	%xmm2, 8(%rsp)
	divsd	%xmm1, %xmm7
	movaps	%xmm7, %xmm1
	call	pow@PLT
	cvtsi2sdl	%ebp, %xmm1
	xorl	%ebp, %ebp
	movsd	%xmm0, (%rsp)
	cvtsi2sdl	%r12d, %xmm0
	subsd	%xmm0, %xmm1
	movsd	(%rsp), %xmm0
	movsd	%xmm1, 56(%rsp)
	call	pow@PLT
	movsd	8(%rsp), %xmm2
	leal	(%r14,%r14), %eax
	cvtsi2sdl	%eax, %xmm3
	divsd	%xmm0, %xmm2
	movsd	.LC4(%rip), %xmm0
	addsd	(%rsp), %xmm0
	mulsd	.LC9(%rip), %xmm0
	movsd	%xmm2, 8(%rsp)
	movsd	(%rsp), %xmm2
	subsd	.LC4(%rip), %xmm2
	mulsd	8(%rsp), %xmm2
	divsd	%xmm0, %xmm2
	movaps	%xmm2, %xmm4
	movsd	%xmm2, 40(%rsp)
	mulsd	%xmm2, %xmm4
	movaps	%xmm4, %xmm0
	movsd	%xmm4, 24(%rsp)
	mulsd	.LC10(%rip), %xmm0
	divsd	8(%rsp), %xmm0
	movsd	%xmm0, 16(%rsp)
	movsd	.LC11(%rip), %xmm0
	divsd	%xmm3, %xmm0
	call	tan@PLT
	movsd	16(%rsp), %xmm3
	movsd	24(%rsp), %xmm4
	movsd	%xmm0, 32(%rsp)
	movsd	.LC12(%rip), %xmm0
	mulsd	%xmm3, %xmm3
	divsd	%xmm4, %xmm3
	subsd	%xmm3, %xmm0
	call	sqrt@PLT
	movsd	40(%rsp), %xmm2
	mulsd	.LC13(%rip), %xmm2
	leaq	136(%rsp), %rax
	movaps	%xmm0, %xmm3
	movsd	16(%rsp), %xmm0
	addsd	8(%rsp), %xmm0
	movq	%rax, 40(%rsp)
	mulsd	32(%rsp), %xmm0
	movsd	.LC4(%rip), %xmm7
	leaq	128(%rsp), %rax
	movsd	.LC4(%rip), %xmm6
	movq	40(%rsp), %rdi
	movq	%rax, %rsi
	movq	%rax, 48(%rsp)
	divsd	%xmm2, %xmm7
	cvtsi2sdl	%r14d, %xmm2
	divsd	%xmm3, %xmm0
	movsd	%xmm7, 24(%rsp)
	mulsd	.LC13(%rip), %xmm0
	divsd	%xmm0, %xmm6
	movsd	.LC11(%rip), %xmm0
	divsd	%xmm2, %xmm0
	cvtsi2sdl	%r15d, %xmm2
	subsd	.LC4(%rip), %xmm2
	movsd	%xmm6, 16(%rsp)
	mulsd	%xmm2, %xmm0
	call	sincos@PLT
	movl	8(%r13), %eax
	movl	$2, %ecx
	movsd	128(%rsp), %xmm4
	movsd	136(%rsp), %xmm5
	movsd	56(%rsp), %xmm1
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %r14d
	leal	(%rax,%rax), %r15d
.L102:
	cmpl	%ebp, %r15d
	jl	.L117
	movl	%ebp, %edx
	movsd	.LC4(%rip), %xmm7
	leaq	0(,%rbp,8), %rcx
	xorl	%r12d, %r12d
	subl	%r14d, %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r14d, %edx
	subl	%ebp, %edx
	mulsd	%xmm4, %xmm0
	movsd	%xmm0, 56(%rsp)
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm5, %xmm0
	movsd	%xmm0, 64(%rsp)
	movsd	.LC13(%rip), %xmm0
	mulsd	24(%rsp), %xmm0
	mulsd	16(%rsp), %xmm0
	divsd	%xmm0, %xmm7
	movsd	%xmm7, 72(%rsp)
.L103:
	movl	%r12d, %esi
	movq	%rcx, 120(%rsp)
	subl	%r14d, %esi
	movsd	%xmm5, 112(%rsp)
	cvtsi2sdl	%esi, %xmm2
	movsd	%xmm4, 104(%rsp)
	movsd	%xmm1, 88(%rsp)
	movaps	%xmm2, %xmm0
	mulsd	%xmm5, %xmm0
	addsd	56(%rsp), %xmm0
	mulsd	%xmm4, %xmm2
	addsd	64(%rsp), %xmm2
	movsd	%xmm0, 32(%rsp)
	movsd	(%rsp), %xmm0
	movsd	%xmm2, 96(%rsp)
	call	pow@PLT
	movsd	24(%rsp), %xmm6
	movsd	96(%rsp), %xmm2
	movsd	%xmm0, 80(%rsp)
	movsd	32(%rsp), %xmm0
	mulsd	%xmm6, %xmm6
	mulsd	%xmm0, %xmm0
	mulsd	%xmm2, %xmm2
	divsd	%xmm6, %xmm0
	movsd	16(%rsp), %xmm6
	mulsd	%xmm6, %xmm6
	divsd	%xmm6, %xmm2
	addsd	%xmm2, %xmm0
	mulsd	.LC14(%rip), %xmm0
	call	exp@PLT
	movsd	80(%rsp), %xmm3
	mulsd	72(%rsp), %xmm3
	movq	48(%rsp), %rsi
	movq	40(%rsp), %rdi
	movaps	%xmm3, %xmm2
	mulsd	%xmm0, %xmm2
	movsd	.LC13(%rip), %xmm0
	mulsd	8(%rsp), %xmm0
	mulsd	32(%rsp), %xmm0
	movsd	%xmm2, 80(%rsp)
	call	sincos@PLT
	movsd	80(%rsp), %xmm2
	movq	0(%r13), %rsi
	movsd	128(%rsp), %xmm3
	movq	120(%rsp), %rcx
	movsd	136(%rsp), %xmm0
	movsd	88(%rsp), %xmm1
	mulsd	%xmm2, %xmm3
	movq	(%rsi,%rcx), %rsi
	movsd	104(%rsp), %xmm4
	mulsd	%xmm2, %xmm0
	movsd	112(%rsp), %xmm5
	movsd	%xmm3, (%rsi,%r12,8)
	movq	(%rbx), %rsi
	movq	(%rsi,%rcx), %rsi
	movsd	%xmm0, (%rsi,%r12,8)
	incq	%r12
	cmpl	%r12d, %r15d
	jge	.L103
	incq	%rbp
	jmp	.L102
.L117:
	cmpl	$1, 208(%rsp)
	jne	.L101
	xorl	%edx, %edx
	xorps	%xmm1, %xmm1
.L105:
	cmpl	%edx, %r15d
	jl	.L107
	movq	0(%r13), %rax
	movq	(%rax,%rdx,8), %rcx
	xorl	%eax, %eax
.L106:
	addsd	(%rcx,%rax,8), %xmm1
	incq	%rax
	cmpl	%eax, %r15d
	jge	.L106
	incq	%rdx
	jmp	.L105
.L107:
	cvtsi2sdl	%r14d, %xmm0
	xorl	%edx, %edx
	addsd	%xmm0, %xmm0
	addsd	.LC4(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	divsd	%xmm0, %xmm1
.L108:
	cmpl	%edx, %r15d
	jl	.L101
	movq	0(%r13), %rax
	movq	(%rax,%rdx,8), %rcx
	xorl	%eax, %eax
.L109:
	movsd	(%rcx,%rax,8), %xmm0
	subsd	%xmm1, %xmm0
	movsd	%xmm0, (%rcx,%rax,8)
	incq	%rax
	cmpl	%eax, %r15d
	jge	.L109
	incq	%rdx
	jmp	.L108
.L101:
	addq	$152, %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
	ret
	.cfi_endproc
.LFE10846:
	.size	_Z5GaborP12MatrixStructS0_iiddiii, .-_Z5GaborP12MatrixStructS0_iiddiii
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB10873:
	.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
.LFE10873:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC15:
	.string	"basic_string: construction from null is not valid"
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC5IS3_EEPKcRKS3_,comdat
	.align 2
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_:
.LFB11453:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	jne	.L121
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L126
	leaq	.LC15(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L121:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L123
	movq	%rsp, %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@PLT
	movq	%rax, (%rbx)
	movq	(%rsp), %rax
	movq	%rax, 16(%rbx)
.L123:
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	(%rsp), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rbx)
	movb	$0, (%rdx,%rax)
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L124
.L126:
	call	__stack_chk_fail@PLT
.L124:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE11453:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.section	.rodata.str1.1
.LC16:
	.string	"allocation failure in dvector()"
	.text
	.globl	_Z7dvectorii
	.type	_Z7dvectorii, @function
_Z7dvectorii:
.LFB10826:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA10826
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movslq	%edi, %rbx
	subl	%ebx, %esi
	leal	1(%rsi), %edi
	movl	$8, %esi
	subq	$56, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	calloc@PLT
	testq	%rax, %rax
	jne	.L128
	leaq	8(%rsp), %rbp
	leaq	7(%rsp), %rdx
	leaq	.LC16(%rip), %rsi
	movq	%rbp, %rdi
.LEHB0:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE0:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L134
	movq	%rbp, %rdi
.LEHB1:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE1:
.L128:
	salq	$3, %rbx
	subq	%rbx, %rax
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L132
	jmp	.L134
.L133:
	endbr64
	movq	%rax, %rbx
.L130:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L134
	movq	%rbx, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L134:
	call	__stack_chk_fail@PLT
.L132:
	addq	$56, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10826:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA10826:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE10826-.LLSDACSB10826
.LLSDACSB10826:
	.uleb128 .LEHB0-.LFB10826
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB10826
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L133-.LFB10826
	.uleb128 0
	.uleb128 .LEHB2-.LFB10826
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE10826:
	.text
	.size	_Z7dvectorii, .-_Z7dvectorii
	.globl	_Z6vectorii
	.type	_Z6vectorii, @function
_Z6vectorii:
.LFB10827:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA10827
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movslq	%edi, %rbx
	subl	%ebx, %esi
	leal	1(%rsi), %edi
	movl	$4, %esi
	subq	$56, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	calloc@PLT
	testq	%rax, %rax
	jne	.L138
	leaq	8(%rsp), %rbp
	leaq	7(%rsp), %rdx
	leaq	.LC16(%rip), %rsi
	movq	%rbp, %rdi
.LEHB3:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE3:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L144
	movq	%rbp, %rdi
.LEHB4:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE4:
.L138:
	salq	$2, %rbx
	subq	%rbx, %rax
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L142
	jmp	.L144
.L143:
	endbr64
	movq	%rax, %rbx
.L140:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L144
	movq	%rbx, %rdi
.LEHB5:
	call	_Unwind_Resume@PLT
.LEHE5:
.L144:
	call	__stack_chk_fail@PLT
.L142:
	addq	$56, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10827:
	.section	.gcc_except_table
.LLSDA10827:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE10827-.LLSDACSB10827
.LLSDACSB10827:
	.uleb128 .LEHB3-.LFB10827
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB4-.LFB10827
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L143-.LFB10827
	.uleb128 0
	.uleb128 .LEHB5-.LFB10827
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE10827:
	.text
	.size	_Z6vectorii, .-_Z6vectorii
	.section	.rodata.str1.1
.LC17:
	.string	"allocation failure 1 in matrix()"
.LC18:
	.string	"allocation failure 2 in matrix()"
	.text
	.globl	_Z6matrixiiii
	.type	_Z6matrixiiii, @function
_Z6matrixiiii:
.LFB10830:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA10830
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movslq	%edx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movslq	%edi, %rbx
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movl	%esi, %eax
	subl	%ebx, %eax
	leal	1(%rax), %edi
	salq	$3, %rdi
	call	malloc@PLT
	testq	%rax, %rax
	jne	.L148
	leaq	8(%rsp), %rbp
	leaq	7(%rsp), %rdx
	leaq	.LC17(%rip), %rsi
	movq	%rbp, %rdi
.LEHB6:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE6:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L164
	movq	%rbp, %rdi
.LEHB7:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE7:
.L148:
	subl	%ebp, %r14d
	movq	%rax, %r12
	salq	$2, %rbp
	leaq	0(,%rbx,8), %rax
	incl	%r14d
	subq	%rax, %r12
	negq	%rbp
	salq	$2, %r14
.L150:
	cmpl	%ebx, %r13d
	jl	.L166
	movq	%r14, %rdi
	call	malloc@PLT
	movq	%rax, (%r12,%rbx,8)
	testq	%rax, %rax
	jne	.L151
	leaq	8(%rsp), %rbp
	leaq	7(%rsp), %rdx
	leaq	.LC18(%rip), %rsi
	movq	%rbp, %rdi
.LEHB8:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE8:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L164
	movq	%rbp, %rdi
.LEHB9:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE9:
.L151:
	addq	%rbp, %rax
	movq	%rax, (%r12,%rbx,8)
	incq	%rbx
	jmp	.L150
.L159:
	endbr64
	jmp	.L165
.L160:
	endbr64
.L165:
	movq	%rax, %rbx
.L156:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L164
	movq	%rbx, %rdi
.LEHB10:
	call	_Unwind_Resume@PLT
.LEHE10:
.L166:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L158
.L164:
	call	__stack_chk_fail@PLT
.L158:
	addq	$48, %rsp
	.cfi_def_cfa_offset 48
	movq	%r12, %rax
	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
.LFE10830:
	.section	.gcc_except_table
.LLSDA10830:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE10830-.LLSDACSB10830
.LLSDACSB10830:
	.uleb128 .LEHB6-.LFB10830
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB7-.LFB10830
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L159-.LFB10830
	.uleb128 0
	.uleb128 .LEHB8-.LFB10830
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB9-.LFB10830
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L160-.LFB10830
	.uleb128 0
	.uleb128 .LEHB10-.LFB10830
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
.LLSDACSE10830:
	.text
	.size	_Z6matrixiiii, .-_Z6matrixiiii
	.section	.rodata.str1.1
.LC19:
	.string	"allocation failure 1 in dmatrix()"
.LC20:
	.string	"allocation failure 2 in dmatrix()"
	.text
	.globl	_Z7dmatrixiiii
	.type	_Z7dmatrixiiii, @function
_Z7dmatrixiiii:
.LFB10832:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA10832
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%edi, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movl	%esi, %eax
	movl	$8, %esi
	subl	%ebx, %eax
	leal	1(%rax), %edi
	call	calloc@PLT
	testq	%rax, %rax
	jne	.L168
	leaq	8(%rsp), %rbp
	leaq	7(%rsp), %rdx
	leaq	.LC19(%rip), %rsi
	movq	%rbp, %rdi
.LEHB11:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE11:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L184
	movq	%rbp, %rdi
.LEHB12:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE12:
.L168:
	movslq	%r15d, %r12
	movq	%rax, %rbp
	leaq	0(,%rbx,8), %rax
	subl	%r15d, %r13d
	salq	$3, %r12
	subq	%rax, %rbp
	negq	%r12
.L170:
	cmpl	%ebx, %r14d
	jl	.L186
	leal	1(%r13), %edi
	movl	$8, %esi
	call	calloc@PLT
	movq	%rax, 0(%rbp,%rbx,8)
	testq	%rax, %rax
	jne	.L171
	leaq	8(%rsp), %rbp
	leaq	7(%rsp), %rdx
	leaq	.LC20(%rip), %rsi
	movq	%rbp, %rdi
.LEHB13:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE13:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L184
	movq	%rbp, %rdi
.LEHB14:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE14:
.L171:
	addq	%r12, %rax
	movq	%rax, 0(%rbp,%rbx,8)
	incq	%rbx
	jmp	.L170
.L179:
	endbr64
	jmp	.L185
.L180:
	endbr64
.L185:
	movq	%rax, %rbx
.L176:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L184
	movq	%rbx, %rdi
.LEHB15:
	call	_Unwind_Resume@PLT
.LEHE15:
.L186:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L178
.L184:
	call	__stack_chk_fail@PLT
.L178:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbp, %rax
	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
.LFE10832:
	.section	.gcc_except_table
.LLSDA10832:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE10832-.LLSDACSB10832
.LLSDACSB10832:
	.uleb128 .LEHB11-.LFB10832
	.uleb128 .LEHE11-.LEHB11
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB12-.LFB10832
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L179-.LFB10832
	.uleb128 0
	.uleb128 .LEHB13-.LFB10832
	.uleb128 .LEHE13-.LEHB13
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB14-.LFB10832
	.uleb128 .LEHE14-.LEHB14
	.uleb128 .L180-.LFB10832
	.uleb128 0
	.uleb128 .LEHB15-.LFB10832
	.uleb128 .LEHE15-.LEHB15
	.uleb128 0
	.uleb128 0
.LLSDACSE10832:
	.text
	.size	_Z7dmatrixiiii, .-_Z7dmatrixiiii
	.globl	_Z5four2PPdS0_S0_S0_iii
	.type	_Z5four2PPdS0_S0_S0_iii, @function
_Z5four2PPdS0_S0_S0_iii:
.LFB10838:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rcx, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%r9d, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	112(%rsp), %eax
	movq	%rdi, 24(%rsp)
	movl	$1, %edi
	movq	%rsi, 32(%rsp)
	leal	(%r9,%r9), %esi
	movl	%r8d, 12(%rsp)
	movl	%eax, 20(%rsp)
	call	_Z7dvectorii
	movl	$1, %edi
	movq	%rax, %r12
	movl	12(%rsp), %eax
	addl	%eax, %eax
	movl	%eax, %esi
	movl	%eax, 16(%rsp)
	call	_Z7dvectorii
	movl	16(%rsp), %esi
	movl	%ebx, %ecx
	movl	$1, %edx
	movl	$1, %edi
	movq	%rax, %rbp
	call	_Z7dmatrixiiii
	movl	$1, %ecx
	movq	%rax, %r13
.L188:
	cmpl	%ecx, 12(%rsp)
	jl	.L201
	movl	$8, %eax
	movl	$1, %edx
.L192:
	cmpl	%ebx, %edx
	jg	.L202
	movq	(%r14,%rcx,8), %rsi
	incl	%edx
	movsd	(%rsi,%rax), %xmm0
	movq	(%r15,%rcx,8), %rsi
	movsd	%xmm0, -8(%r12,%rax,2)
	movsd	(%rsi,%rax), %xmm0
	movsd	%xmm0, (%r12,%rax,2)
	addq	$8, %rax
	jmp	.L192
.L202:
	movl	20(%rsp), %edx
	movl	%ebx, %esi
	movq	%r12, %rdi
	movq	%rcx, 40(%rsp)
	call	_Z5four1Pdii
	movq	40(%rsp), %rcx
	movl	$8, %edx
	movl	$1, %esi
	leal	(%rcx,%rcx), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%r13,%rax), %rdi
	addq	%r13, %rax
.L190:
	cmpl	%ebx, %esi
	jg	.L203
	movsd	-8(%r12,%rdx,2), %xmm0
	movq	(%rdi), %r10
	incl	%esi
	movsd	%xmm0, (%r10,%rdx)
	movq	(%rax), %r10
	movsd	(%r12,%rdx,2), %xmm0
	movsd	%xmm0, (%r10,%rdx)
	addq	$8, %rdx
	jmp	.L190
.L203:
	incq	%rcx
	jmp	.L188
.L201:
	xorl	%r15d, %r15d
.L193:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jl	.L197
	leaq	8(,%r15,8), %r14
	xorl	%eax, %eax
	movl	$1, %edx
.L198:
	movl	12(%rsp), %edi
	addq	$16, %rax
	cmpl	%edi, %edx
	jg	.L204
	movq	-8(%r13,%rax), %rcx
	incl	%edx
	movsd	(%rcx,%r14), %xmm0
	movq	0(%r13,%rax), %rcx
	movsd	%xmm0, -8(%rbp,%rax)
	movsd	(%rcx,%r14), %xmm0
	movsd	%xmm0, 0(%rbp,%rax)
	jmp	.L198
.L204:
	movl	20(%rsp), %edx
	movl	%edi, %esi
	movq	%rbp, %rdi
	call	_Z5four1Pdii
	leaq	8(%rbp), %rdx
	xorl	%eax, %eax
.L195:
	incq	%rax
	cmpl	%eax, 12(%rsp)
	jl	.L205
	movq	24(%rsp), %rsi
	movsd	(%rdx), %xmm0
	addq	$16, %rdx
	movq	32(%rsp), %rdi
	movq	(%rsi,%rax,8), %rcx
	movsd	%xmm0, (%rcx,%r14)
	movq	(%rdi,%rax,8), %rcx
	movsd	-8(%rdx), %xmm0
	movsd	%xmm0, (%rcx,%r14)
	jmp	.L195
.L205:
	incq	%r15
	jmp	.L193
.L197:
	leaq	8(%r12), %rdi
	call	free@PLT
	leaq	8(%rbp), %rdi
	call	free@PLT
	movl	16(%rsp), %edx
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	movl	%ebx, %r8d
	movq	%r13, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$1, %ecx
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	$1, %esi
	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	_Z12free_dmatrixPPdiiii
	.cfi_endproc
.LFE10838:
	.size	_Z5four2PPdS0_S0_S0_iii, .-_Z5four2PPdS0_S0_S0_iii
	.globl	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	.type	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_, @function
_Z8Mat_FFT2P12MatrixStructS0_S0_S0_:
.LFB10839:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	movl	$1, %edi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	8(%rdx), %eax
	movq	%rcx, 24(%rsp)
	movl	%eax, 8(%rsp)
	movl	12(%rdx), %eax
	movl	$1, %edx
	movl	8(%rsp), %esi
	movl	%eax, %ecx
	movl	%eax, 12(%rsp)
	call	_Z7dmatrixiiii
	movl	12(%rsp), %ecx
	movl	8(%rsp), %esi
	movl	$1, %edx
	movl	$1, %edi
	movq	%rax, %r13
	call	_Z7dmatrixiiii
	movl	12(%rsp), %ecx
	movl	8(%rsp), %esi
	movl	$1, %edx
	movl	$1, %edi
	movq	%rax, %r12
	call	_Z7dmatrixiiii
	movl	12(%rsp), %ecx
	movl	8(%rsp), %esi
	movl	$1, %edx
	movl	$1, %edi
	movq	%rax, %rbp
	call	_Z7dmatrixiiii
	movl	8(%rbx), %edi
	movq	24(%rsp), %r8
	movl	$1, %edx
	movq	%rax, 16(%rsp)
.L207:
	cmpl	%edx, %edi
	jl	.L209
	movl	12(%rbx), %r10d
	leaq	-8(,%rdx,8), %rsi
	xorl	%eax, %eax
	movl	$1, %ecx
.L210:
	leaq	8(%rax), %r9
	cmpl	%ecx, %r10d
	jl	.L216
	movq	(%rbx), %r11
	incl	%ecx
	movq	(%r11,%rsi), %r11
	movsd	(%r11,%rax), %xmm0
	movq	0(%r13,%rdx,8), %r11
	movsd	%xmm0, 8(%r11,%rax)
	movq	(%r8), %r11
	movq	(%r11,%rsi), %r11
	movsd	(%r11,%rax), %xmm0
	movq	(%r12,%rdx,8), %r11
	movsd	%xmm0, 8(%r11,%rax)
	movq	%r9, %rax
	jmp	.L210
.L216:
	incq	%rdx
	jmp	.L207
.L209:
	pushq	%rax
	.cfi_def_cfa_offset 104
	movq	%r12, %rcx
	movq	%r13, %rdx
	movq	%rbp, %rdi
	pushq	$1
	.cfi_def_cfa_offset 112
	movl	24(%rsp), %r8d
	movq	32(%rsp), %rsi
	movl	28(%rsp), %r9d
	call	_Z5four2PPdS0_S0_S0_iii
	movl	8(%rbx), %r8d
	popq	%rdx
	.cfi_def_cfa_offset 104
	movl	$1, %esi
	popq	%rcx
	.cfi_def_cfa_offset 96
	xorl	%edx, %edx
.L211:
	cmpl	%esi, %r8d
	jl	.L213
	movl	12(%rbx), %edi
	movl	$8, %eax
	movl	$1, %ecx
.L214:
	cmpl	%ecx, %edi
	jl	.L217
	movq	8(%rbp,%rdx), %r9
	movq	16(%rsp), %r10
	incl	%ecx
	movsd	(%r9,%rax), %xmm0
	movq	(%r14), %r9
	movq	(%r9,%rdx), %r9
	movsd	%xmm0, -8(%r9,%rax)
	movq	8(%r10,%rdx), %r9
	movsd	(%r9,%rax), %xmm0
	movq	(%r15), %r9
	movq	(%r9,%rdx), %r9
	movsd	%xmm0, -8(%r9,%rax)
	addq	$8, %rax
	jmp	.L214
.L217:
	incl	%esi
	addq	$8, %rdx
	jmp	.L211
.L213:
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movq	%r13, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	call	_Z12free_dmatrixPPdiiii
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	call	_Z12free_dmatrixPPdiiii
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movq	%rbp, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	call	_Z12free_dmatrixPPdiiii
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movl	$1, %ecx
	movq	16(%rsp), %rdi
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	movl	$1, %esi
	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	_Z12free_dmatrixPPdiiii
	.cfi_endproc
.LFE10839:
	.size	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_, .-_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	.globl	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_
	.type	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_, @function
_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_:
.LFB10840:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	movl	$1, %edi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	8(%rdx), %eax
	movq	%rcx, 24(%rsp)
	movl	%eax, 8(%rsp)
	movl	12(%rdx), %eax
	movl	$1, %edx
	movl	8(%rsp), %esi
	movl	%eax, %ecx
	movl	%eax, 12(%rsp)
	call	_Z7dmatrixiiii
	movl	12(%rsp), %ecx
	movl	8(%rsp), %esi
	movl	$1, %edx
	movl	$1, %edi
	movq	%rax, %r13
	call	_Z7dmatrixiiii
	movl	12(%rsp), %ecx
	movl	8(%rsp), %esi
	movl	$1, %edx
	movl	$1, %edi
	movq	%rax, %r12
	call	_Z7dmatrixiiii
	movl	12(%rsp), %ecx
	movl	8(%rsp), %esi
	movl	$1, %edx
	movl	$1, %edi
	movq	%rax, %rbp
	call	_Z7dmatrixiiii
	movl	8(%rbx), %edi
	movq	24(%rsp), %r8
	movl	$1, %edx
	movq	%rax, 16(%rsp)
.L219:
	cmpl	%edx, %edi
	jl	.L221
	movl	12(%rbx), %r10d
	leaq	-8(,%rdx,8), %rsi
	xorl	%eax, %eax
	movl	$1, %ecx
.L222:
	leaq	8(%rax), %r9
	cmpl	%ecx, %r10d
	jl	.L228
	movq	(%rbx), %r11
	incl	%ecx
	movq	(%r11,%rsi), %r11
	movsd	(%r11,%rax), %xmm0
	movq	0(%r13,%rdx,8), %r11
	movsd	%xmm0, 8(%r11,%rax)
	movq	(%r8), %r11
	movq	(%r11,%rsi), %r11
	movsd	(%r11,%rax), %xmm0
	movq	(%r12,%rdx,8), %r11
	movsd	%xmm0, 8(%r11,%rax)
	movq	%r9, %rax
	jmp	.L222
.L228:
	incq	%rdx
	jmp	.L219
.L221:
	pushq	%rax
	.cfi_def_cfa_offset 104
	movq	%r12, %rcx
	movq	%r13, %rdx
	movq	%rbp, %rdi
	pushq	$-1
	.cfi_def_cfa_offset 112
	movl	24(%rsp), %r8d
	movq	32(%rsp), %rsi
	movl	28(%rsp), %r9d
	call	_Z5four2PPdS0_S0_S0_iii
	movl	24(%rsp), %eax
	movl	28(%rsp), %edi
	movl	$1, %esi
	movl	8(%rbx), %r8d
	popq	%rdx
	.cfi_def_cfa_offset 104
	xorl	%edx, %edx
	imull	%edi, %eax
	popq	%rcx
	.cfi_def_cfa_offset 96
	cvtsi2sdl	%eax, %xmm1
.L223:
	cmpl	%esi, %r8d
	jl	.L225
	movl	12(%rbx), %edi
	movl	$8, %eax
	movl	$1, %ecx
.L226:
	cmpl	%ecx, %edi
	jl	.L229
	movq	8(%rbp,%rdx), %r11
	movq	(%r14), %r9
	incl	%ecx
	movq	16(%rsp), %r10
	movsd	(%r11,%rax), %xmm0
	movq	(%r9,%rdx), %r9
	movq	8(%r10,%rdx), %r11
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%r9,%rax)
	movsd	(%r11,%rax), %xmm0
	movq	(%r15), %r9
	divsd	%xmm1, %xmm0
	movq	(%r9,%rdx), %r9
	movsd	%xmm0, -8(%r9,%rax)
	addq	$8, %rax
	jmp	.L226
.L229:
	incl	%esi
	addq	$8, %rdx
	jmp	.L223
.L225:
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movq	%r13, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	call	_Z12free_dmatrixPPdiiii
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	call	_Z12free_dmatrixPPdiiii
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movq	%rbp, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	call	_Z12free_dmatrixPPdiiii
	movl	12(%rsp), %r8d
	movl	8(%rsp), %edx
	movl	$1, %ecx
	movq	16(%rsp), %rdi
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	movl	$1, %esi
	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	_Z12free_dmatrixPPdiiii
	.cfi_endproc
.LFE10840:
	.size	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_, .-_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_
	.section	.rodata.str1.1
.LC21:
	.string	"allocation failure in CreateMatrix()"
	.text
	.globl	_Z12CreateMatrixPP12MatrixStructii
	.type	_Z12CreateMatrixPP12MatrixStructii, @function
_Z12CreateMatrixPP12MatrixStructii:
.LFB10834:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA10834
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%r15d, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	movl	$1, %edi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	movl	$16, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	call	calloc@PLT
	movslq	%ebp, %rdi
	movl	$8, %esi
	movq	%rax, %rbx
	call	calloc@PLT
	movq	%rax, (%rbx)
	movq	%rax, %r12
	movslq	%r13d, %rax
	movq	%rax, 8(%rsp)
	testq	%r12, %r12
	jne	.L231
	leaq	24(%rsp), %rbp
	leaq	23(%rsp), %rdx
	leaq	.LC21(%rip), %rsi
	movq	%rbp, %rdi
.LEHB16:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE16:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L245
	movq	%rbp, %rdi
.LEHB17:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE17:
.L234:
	movq	8(%rsp), %rdi
	movl	$8, %esi
	call	calloc@PLT
	movq	%rax, (%r12,%r15,8)
	incq	%r15
	testq	%rax, %rax
	je	.L250
.L231:
	cmpl	%r15d, %ebp
	jg	.L234
	jmp	.L251
.L250:
	leaq	24(%rsp), %rbp
	leaq	23(%rsp), %rdx
	leaq	.LC21(%rip), %rsi
	movq	%rbp, %rdi
.LEHB18:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE18:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L245
	movq	%rbp, %rdi
.LEHB19:
	call	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE19:
.L251:
	movl	%ebp, 8(%rbx)
	movl	%r13d, 12(%rbx)
	movq	%rbx, (%r14)
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L239
	jmp	.L245
.L241:
	endbr64
	jmp	.L249
.L242:
	endbr64
.L249:
	movq	%rax, %rbx
.L237:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L245
	movq	%rbx, %rdi
.LEHB20:
	call	_Unwind_Resume@PLT
.LEHE20:
.L245:
	call	__stack_chk_fail@PLT
.L239:
	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
	ret
	.cfi_endproc
.LFE10834:
	.section	.gcc_except_table
.LLSDA10834:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE10834-.LLSDACSB10834
.LLSDACSB10834:
	.uleb128 .LEHB16-.LFB10834
	.uleb128 .LEHE16-.LEHB16
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB17-.LFB10834
	.uleb128 .LEHE17-.LEHB17
	.uleb128 .L241-.LFB10834
	.uleb128 0
	.uleb128 .LEHB18-.LFB10834
	.uleb128 .LEHE18-.LEHB18
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB19-.LFB10834
	.uleb128 .LEHE19-.LEHB19
	.uleb128 .L242-.LFB10834
	.uleb128 0
	.uleb128 .LEHB20-.LFB10834
	.uleb128 .LEHE20-.LEHB20
	.uleb128 0
	.uleb128 0
.LLSDACSE10834:
	.text
	.size	_Z12CreateMatrixPP12MatrixStructii, .-_Z12CreateMatrixPP12MatrixStructii
	.section	.rodata.str1.1
.LC23:
	.string	"%.8lf "
.LC24:
	.string	"\n"
	.text
	.globl	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
	.type	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii, @function
_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii:
.LFB10845:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%ecx, %ebx
	leal	(%rbx,%rbx), %r15d
	subq	$296, %rsp
	.cfi_def_cfa_offset 352
	movl	352(%rsp), %eax
	movl	%r8d, 96(%rsp)
	movl	%r9d, 48(%rsp)
	movq	%rsi, 144(%rsp)
	movq	%rdi, 136(%rsp)
	movl	%eax, 168(%rsp)
	movsd	%xmm1, 160(%rsp)
	movsd	%xmm0, 152(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 280(%rsp)
	movl	%r8d, %eax
	imull	%r9d, %eax
	movl	%eax, 100(%rsp)
	addl	%eax, %eax
	movslq	%eax, %rdi
	movl	%eax, 52(%rsp)
	salq	$3, %rdi
	call	malloc@PLT
	cvtsi2sdl	%ebx, %xmm2
	movq	%rax, 72(%rsp)
	movl	8(%rbp), %eax
	movl	%eax, 16(%rsp)
	cvtsi2sdl	16(%rsp), %xmm0
	addsd	%xmm2, %xmm2
	movl	12(%rbp), %eax
	movl	%eax, 20(%rsp)
	addsd	%xmm2, %xmm0
	movsd	%xmm2, 8(%rsp)
	call	log2@PLT
	call	ceil@PLT
	movaps	%xmm0, %xmm1
	movsd	.LC22(%rip), %xmm0
	call	pow@PLT
	movsd	8(%rsp), %xmm2
	cvttsd2sil	%xmm0, %eax
	cvtsi2sdl	20(%rsp), %xmm0
	movl	%eax, (%rsp)
	addsd	%xmm2, %xmm0
	call	log2@PLT
	call	ceil@PLT
	movaps	%xmm0, %xmm1
	movsd	.LC22(%rip), %xmm0
	call	pow@PLT
	movl	(%rsp), %esi
	leaq	176(%rsp), %rdi
	cvttsd2sil	%xmm0, %eax
	movl	%eax, %edx
	movl	%eax, 8(%rsp)
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	12(%rbp), %edx
	movslq	%ebx, %r8
	xorl	%edi, %edi
	movq	176(%rsp), %r12
	leaq	-8(,%r8,8), %r9
	leal	(%rdx,%rbx), %eax
	addl	%edx, %edx
	movslq	%edx, %rdx
	leal	(%rbx,%rax), %esi
	addq	%r8, %rdx
	movl	%esi, 24(%rsp)
	leaq	0(,%r8,8), %rsi
	leaq	0(,%rdx,8), %rcx
	movq	%rcx, 32(%rsp)
.L253:
	cmpl	%edi, %ebx
	jle	.L294
	movq	0(%rbp), %rdx
	movq	(%r12), %rcx
	movq	(%rdx,%r9), %rdx
	movq	(%rcx,%rdi,8), %r10
	xorl	%ecx, %ecx
	leaq	(%rdx,%rsi), %r13
.L254:
	imulq	$-8, %rcx, %r11
	movsd	-8(%r13,%r11), %xmm0
	movsd	%xmm0, (%r10,%rcx,8)
	incq	%rcx
	cmpl	%ecx, %ebx
	jg	.L254
	movq	%rdx, %r11
	movq	%r8, %rcx
.L255:
	cmpl	%ecx, %eax
	jle	.L295
	movsd	(%r11), %xmm0
	addq	$8, %r11
	movsd	%xmm0, (%r10,%rcx,8)
	incq	%rcx
	jmp	.L255
.L295:
	movq	32(%rsp), %r11
	movslq	%eax, %rcx
	addq	%r11, %rdx
.L257:
	cmpl	%ecx, 24(%rsp)
	jle	.L296
	imulq	$-8, %rcx, %r11
	movsd	-8(%rdx,%r11), %xmm0
	movsd	%xmm0, (%r10,%rcx,8)
	incq	%rcx
	jmp	.L257
.L296:
	incq	%rdi
	subq	$8, %r9
	jmp	.L253
.L294:
	movslq	%eax, %rcx
	movl	8(%rbp), %r11d
	movq	%rsi, %rdi
	xorl	%r8d, %r8d
	salq	$3, %rcx
	movq	%rcx, 56(%rsp)
	leal	(%r11,%rbx), %edx
.L260:
	leal	(%rbx,%r8), %ecx
	cmpl	%ecx, %edx
	jle	.L266
	movslq	%r8d, %rcx
	movq	%rsi, %r13
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	salq	$3, %rcx
.L267:
	subq	$8, %r13
	cmpl	%ebx, %r9d
	jge	.L297
	movq	0(%rbp), %r14
	incl	%r9d
	movq	(%r14,%rcx), %r14
	movsd	(%r14,%r13), %xmm0
	movq	(%r12), %r14
	movq	(%r14,%rdi), %r14
	movsd	%xmm0, (%r14,%r10)
	addq	$8, %r10
	jmp	.L267
.L297:
	movl	%ebx, %r10d
	xorl	%r9d, %r9d
.L262:
	cmpl	%eax, %r10d
	jge	.L298
	movq	0(%rbp), %r13
	incl	%r10d
	movq	0(%r13,%rcx), %r13
	movsd	0(%r13,%r9), %xmm0
	movq	(%r12), %r13
	movq	0(%r13,%rdi), %r14
	addq	%r9, %r14
	addq	$8, %r9
	movsd	%xmm0, (%r14,%rsi)
	jmp	.L262
.L298:
	movl	%eax, 40(%rsp)
	movq	56(%rsp), %r10
.L264:
	movl	24(%rsp), %r9d
	leaq	8(%r10), %r13
	cmpl	%r9d, 40(%rsp)
	jge	.L299
	movq	0(%rbp), %r14
	movq	32(%rsp), %r9
	incl	40(%rsp)
	movq	(%r14,%rcx), %r14
	subq	%r13, %r9
	movsd	(%r14,%r9), %xmm0
	movq	(%r12), %r14
	movq	(%r14,%rdi), %r14
	movsd	%xmm0, (%r14,%r10)
	movq	%r13, %r10
	jmp	.L264
.L299:
	incq	%r8
	addq	$8, %rdi
	jmp	.L260
.L266:
	leal	(%rbx,%r11,2), %edi
	movslq	%edx, %rcx
	leal	(%rbx,%rdx), %r13d
	movl	%edi, 40(%rsp)
	salq	$3, %rcx
.L268:
	cmpl	%r13d, %edx
	jge	.L274
	movl	40(%rsp), %edi
	movq	%rsi, %r10
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	subl	%edx, %edi
	movslq	%edi, %rdi
	leaq	-8(,%rdi,8), %rdi
.L275:
	subq	$8, %r10
	cmpl	%ebx, %r8d
	jge	.L300
	movq	0(%rbp), %r14
	incl	%r8d
	movq	(%r14,%rdi), %r14
	movsd	(%r14,%r10), %xmm0
	movq	(%r12), %r14
	movq	(%r14,%rcx), %r14
	movsd	%xmm0, (%r14,%r9)
	addq	$8, %r9
	jmp	.L275
.L300:
	movl	%ebx, %r9d
	xorl	%r8d, %r8d
.L270:
	cmpl	%eax, %r9d
	jge	.L301
	movq	0(%rbp), %r10
	incl	%r9d
	movq	(%r10,%rdi), %r10
	movsd	(%r10,%r8), %xmm0
	movq	(%r12), %r10
	movq	(%r10,%rcx), %r11
	addq	%r8, %r11
	addq	$8, %r8
	movsd	%xmm0, (%r11,%rsi)
	jmp	.L270
.L301:
	movq	56(%rsp), %r9
	movl	%eax, %r8d
.L272:
	movl	24(%rsp), %r11d
	leaq	8(%r9), %r10
	cmpl	%r11d, %r8d
	jge	.L302
	movq	0(%rbp), %r11
	movq	32(%rsp), %r14
	incl	%r8d
	movq	(%r11,%rdi), %r11
	subq	%r10, %r14
	movsd	(%r11,%r14), %xmm0
	movq	(%r12), %r14
	movq	(%r14,%rcx), %r14
	movsd	%xmm0, (%r14,%r9)
	movq	%r10, %r9
	jmp	.L272
.L302:
	incl	%edx
	addq	$8, %rcx
	jmp	.L268
.L274:
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	256(%rsp), %rdi
	leal	1(%r15), %ebx
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	264(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	184(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movq	184(%rsp), %rax
	movq	%r12, %rdx
	movq	%rax, 24(%rsp)
	movq	264(%rsp), %rax
	movq	24(%rsp), %rcx
	movq	%rax, 32(%rsp)
	movq	256(%rsp), %rax
	movq	32(%rsp), %rsi
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	movl	%ebx, %edx
	movl	%ebx, %esi
	leaq	192(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	%ebx, %edx
	movl	%ebx, %esi
	leaq	200(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	208(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	216(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	224(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	232(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	240(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	leaq	248(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	20(%rsp), %edx
	movl	16(%rsp), %esi
	leaq	272(%rsp), %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movl	16(%rsp), %ebx
	movl	20(%rsp), %eax
	xorl	%ecx, %ecx
	movl	%ecx, 56(%rsp)
	imull	%ebx, %eax
	movl	20(%rsp), %ebx
	movl	%ecx, 68(%rsp)
	addl	%r15d, %ebx
	movl	%ebx, 172(%rsp)
	movl	%eax, 132(%rsp)
	xorl	%eax, %eax
.L276:
	movl	96(%rsp), %ebx
	cmpl	%ebx, %eax
	jge	.L291
	movslq	56(%rsp), %rdx
	movq	72(%rsp), %rbx
	incl	%eax
	movl	56(%rsp), %esi
	movl	%eax, 128(%rsp)
	leaq	(%rbx,%rdx,8), %rbx
	movq	%rbx, 120(%rsp)
	movl	100(%rsp), %ebx
	leal	(%rbx,%rsi), %edx
	movq	72(%rsp), %rbx
	movslq	%edx, %rdx
	leaq	(%rbx,%rdx,8), %rbx
	xorl	%edx, %edx
	movl	%edx, 64(%rsp)
	movq	%rbx, 112(%rsp)
	xorl	%ebx, %ebx
.L287:
	movq	200(%rsp), %rax
	movq	192(%rsp), %r14
	movq	224(%rsp), %r13
	movq	232(%rsp), %rbp
	movq	%rax, 104(%rsp)
	movq	248(%rsp), %rax
	movq	%rax, 80(%rsp)
	movq	240(%rsp), %rax
	movq	%rax, 88(%rsp)
	movq	208(%rsp), %rax
	movq	%rax, (%rsp)
	movq	216(%rsp), %rax
	movq	%rax, 8(%rsp)
	cmpl	%ebx, 48(%rsp)
	jle	.L303
	pushq	%r9
	.cfi_def_cfa_offset 360
	movl	176(%rsp), %eax
	movq	%r14, %rdi
	leal	1(%rbx), %ecx
	pushq	%rax
	.cfi_def_cfa_offset 368
	movl	64(%rsp), %r9d
	movsd	168(%rsp), %xmm0
	movl	112(%rsp), %r8d
	movsd	176(%rsp), %xmm1
	movl	144(%rsp), %edx
	movq	120(%rsp), %rsi
	call	_Z5GaborP12MatrixStructS0_iiddiii
	popq	%r10
	.cfi_def_cfa_offset 360
	popq	%r11
	.cfi_def_cfa_offset 352
	pushq	%r15
	.cfi_def_cfa_offset 360
	pushq	%r15
	.cfi_def_cfa_offset 368
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	call	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	popq	%r14
	.cfi_def_cfa_offset 360
	popq	%rax
	.cfi_def_cfa_offset 352
	pushq	%r15
	.cfi_def_cfa_offset 360
	pushq	%r15
	.cfi_def_cfa_offset 368
	movq	120(%rsp), %rsi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	movq	%rbp, %rdi
	call	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	popq	%rax
	.cfi_def_cfa_offset 360
	popq	%rdx
	.cfi_def_cfa_offset 352
	movq	%rbp, %rcx
	movq	80(%rsp), %rsi
	movq	88(%rsp), %rdi
	movq	%r13, %rdx
	xorl	%r13d, %r13d
	call	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	movq	40(%rsp), %rdx
	movq	88(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	32(%rsp), %rdx
	movq	80(%rsp), %rsi
	movq	8(%rsp), %rdi
	call	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	movq	%r12, %rdi
	call	_Z13Mat_SubstractP12MatrixStructS0_S0_
	movq	32(%rsp), %rdx
	movq	88(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	40(%rsp), %rdx
	movq	80(%rsp), %rsi
	movq	8(%rsp), %rdi
	call	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	movq	24(%rsp), %rdi
	call	_Z7Mat_SumP12MatrixStructS0_S0_
	movq	24(%rsp), %rcx
	movq	8(%rsp), %rsi
	movq	%r12, %rdx
	movq	(%rsp), %rdi
	call	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_
	xorps	%xmm1, %xmm1
.L277:
	cmpl	%r13d, 16(%rsp)
	jle	.L279
	leaq	0(,%r13,8), %r14
	xorl	%ebp, %ebp
.L280:
	movq	272(%rsp), %rax
	cmpl	%ebp, 20(%rsp)
	jle	.L304
	movq	(%r12), %rdx
	movq	(%rax), %rax
	movsd	%xmm1, 88(%rsp)
	movq	24(%rsp), %rsi
	movq	(%rdx,%r14), %rdx
	movq	(%rax,%r14), %rax
	movsd	(%rdx,%rbp,8), %xmm0
	movq	(%rsi), %rdx
	leaq	(%rax,%rbp,8), %rax
	movq	%rax, 80(%rsp)
	movq	(%rdx,%r14), %rdx
	mulsd	%xmm0, %xmm0
	movsd	(%rdx,%rbp,8), %xmm2
	incq	%rbp
	mulsd	%xmm2, %xmm2
	addsd	%xmm2, %xmm0
	call	sqrt@PLT
	movq	80(%rsp), %rax
	movsd	88(%rsp), %xmm1
	movsd	%xmm0, (%rax)
	addsd	%xmm0, %xmm1
	jmp	.L280
.L304:
	incq	%r13
	jmp	.L277
.L279:
	cvtsi2sdl	132(%rsp), %xmm3
	movq	120(%rsp), %rax
	xorl	%edx, %edx
	movq	272(%rsp), %rsi
	divsd	%xmm3, %xmm1
	cvtsd2ss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, (%rax,%rbx,8)
	xorps	%xmm0, %xmm0
.L281:
	cmpl	%edx, 16(%rsp)
	jle	.L283
	leaq	0(,%rdx,8), %rcx
	xorl	%eax, %eax
.L284:
	cmpl	%eax, 20(%rsp)
	jle	.L305
	movq	(%rsi), %rdi
	movq	(%rdi,%rcx), %rdi
	movsd	(%rdi,%rax,8), %xmm2
	incq	%rax
	subsd	%xmm1, %xmm2
	mulsd	%xmm2, %xmm2
	addsd	%xmm2, %xmm0
	jmp	.L284
.L305:
	incq	%rdx
	jmp	.L281
.L283:
	divsd	%xmm3, %xmm0
	call	sqrt@PLT
	movq	112(%rsp), %rax
	movl	%r15d, %r9d
	movl	%r15d, %r8d
	cvtsd2ss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, (%rax,%rbx,8)
	movl	172(%rsp), %eax
	incq	%rbx
	leal	-1(%rax), %r13d
	movl	16(%rsp), %eax
	pushq	%r13
	.cfi_def_cfa_offset 360
	leal	-1(%r15,%rax), %ebp
	pushq	%rbp
	.cfi_def_cfa_offset 368
	movl	84(%rsp), %edx
	movq	152(%rsp), %rdi
	movl	80(%rsp), %ecx
	movq	16(%rsp), %rsi
	call	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	popq	%rcx
	.cfi_def_cfa_offset 360
	popq	%rsi
	.cfi_def_cfa_offset 352
	pushq	%r13
	.cfi_def_cfa_offset 360
	pushq	%rbp
	.cfi_def_cfa_offset 368
	movl	80(%rsp), %ecx
	movl	%r15d, %r8d
	movl	%r15d, %r9d
	movl	84(%rsp), %edx
	movq	24(%rsp), %rsi
	movq	160(%rsp), %rdi
	call	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	movl	36(%rsp), %ecx
	addl	%ecx, 80(%rsp)
	popq	%rdi
	.cfi_def_cfa_offset 360
	popq	%r8
	.cfi_def_cfa_offset 352
	jmp	.L287
.L303:
	movl	16(%rsp), %esi
	movl	48(%rsp), %ecx
	addl	%esi, 68(%rsp)
	movl	128(%rsp), %eax
	addl	%ecx, 56(%rsp)
	jmp	.L276
.L291:
	xorl	%ebp, %ebp
	leaq	.LC23(%rip), %rbx
.L286:
	cmpl	%ebp, 52(%rsp)
	jle	.L306
	movq	72(%rsp), %rax
	movq	%rbx, %rsi
	movl	$2, %edi
	movsd	(%rax,%rbp,8), %xmm0
	movb	$1, %al
	incq	%rbp
	call	__printf_chk@PLT
	jmp	.L286
.L306:
	leaq	.LC24(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	52(%rsp), %esi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	movq	192(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	200(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	208(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	216(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	224(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	232(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	240(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	248(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	40(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	32(%rsp), %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	%r12, %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	280(%rsp), %rax
	subq	%fs:40, %rax
	je	.L289
	call	__stack_chk_fail@PLT
.L289:
	movq	24(%rsp), %rdi
	addq	$296, %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	_Z10FreeMatrixP12MatrixStruct
	.cfi_endproc
.LFE10845:
	.size	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii, .-_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
	.section	.rodata.str1.1
.LC25:
	.string	"usage: %s <image_name> <height> <width>\n"
.LC26:
	.string	"r"
.LC27:
	.string	"%s can not be open!\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB10847:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	cmpl	$4, %edi
	je	.L308
	movq	(%rsi), %rdx
	movl	$2, %edi
	leaq	.LC25(%rip), %rsi
	jmp	.L316
.L308:
	movq	16(%rsi), %rdi
	call	atoi@PLT
	movq	24(%r12), %rdi
	movl	%eax, %ebp
	call	atoi@PLT
	movl	%ebp, %r15d
	movl	$1, %esi
	imull	%eax, %r15d
	movl	%eax, %ebx
	movslq	%r15d, %r15
	movq	%r15, %rdi
	call	calloc@PLT
	movq	8(%r12), %rdi
	leaq	.LC26(%rip), %rsi
	movq	%rax, %r13
	call	fopen@PLT
	movq	%rax, %r14
	testq	%rax, %rax
	jne	.L309
	movq	8(%r12), %rdx
	leaq	.LC27(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
.L316:
	call	__printf_chk@PLT
	xorl	%edi, %edi
	call	exit@PLT
.L309:
	movq	%rax, %r8
	movq	%r15, %rcx
	movl	$1, %edx
	movq	%r15, %rsi
	movq	%r13, %rdi
	call	__fread_chk@PLT
	movq	%r14, %rdi
	call	fclose@PLT
	movl	%ebx, %edx
	movl	%ebp, %esi
	movq	%rsp, %rdi
	call	_Z12CreateMatrixPP12MatrixStructii
	movq	(%rsp), %r12
	xorl	%esi, %esi
	xorl	%edx, %edx
.L310:
	cmpl	%edx, %ebp
	jle	.L312
	movslq	%esi, %rcx
	leaq	0(,%rdx,8), %rdi
	xorl	%eax, %eax
	addq	%r13, %rcx
.L313:
	cmpl	%eax, %ebx
	jle	.L317
	movzbl	(%rcx,%rax), %r9d
	movq	(%r12), %r8
	cvtsi2sdl	%r9d, %xmm0
	movq	(%r8,%rdi), %r8
	movsd	%xmm0, (%r8,%rax,8)
	incq	%rax
	jmp	.L313
.L317:
	incq	%rdx
	addl	%ebx, %esi
	jmp	.L310
.L312:
	sall	$2, %ebx
	leal	0(%rbp,%rbp,2), %ebp
	movq	%r13, %rdi
	call	free@PLT
	leaq	8(%rsp), %rdi
	movl	%ebx, %edx
	movl	%ebp, %esi
	call	_Z12CreateMatrixPP12MatrixStructii
	leaq	16(%rsp), %rdi
	movl	%ebx, %edx
	movl	%ebp, %esi
	call	_Z12CreateMatrixPP12MatrixStructii
	movq	16(%rsp), %rbx
	movq	%r12, %rdx
	movq	8(%rsp), %rbp
	pushq	%rax
	.cfi_def_cfa_offset 104
	movl	$60, %ecx
	movsd	.LC28(%rip), %xmm1
	movl	$4, %r9d
	pushq	$0
	.cfi_def_cfa_offset 112
	movsd	.LC29(%rip), %xmm0
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	movl	$3, %r8d
	call	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
	movq	%rbp, %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	movq	%rbx, %rdi
	call	_Z10FreeMatrixP12MatrixStruct
	popq	%rdx
	.cfi_def_cfa_offset 104
	popq	%rcx
	.cfi_def_cfa_offset 96
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L314
	call	__stack_chk_fail@PLT
.L314:
	addq	$40, %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
.LFE10847:
	.size	main, .-main
	.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
.LC4:
	.long	0
	.long	1072693248
	.align 8
.LC5:
	.long	1413754140
	.long	1075388923
	.align 8
.LC6:
	.long	0
	.long	1071644672
	.align 8
.LC7:
	.long	0
	.long	-1073741824
	.align 8
.LC9:
	.long	-464847805
	.long	1072879275
	.align 8
.LC10:
	.long	-17155601
	.long	-1074385342
	.align 8
.LC11:
	.long	1413754136
	.long	1074340347
	.align 8
.LC12:
	.long	-17155601
	.long	1073098306
	.align 8
.LC13:
	.long	1413754136
	.long	1075388923
	.align 8
.LC14:
	.long	0
	.long	-1075838976
	.align 8
.LC22:
	.long	0
	.long	1073741824
	.align 8
.LC28:
	.long	-1717986918
	.long	1071225241
	.align 8
.LC29:
	.long	-1717986918
	.long	1069128089
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.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<bits/stdc++.h>
using namespace std;
#define pi (2.0*acos(0.0))
#define eps 1e-6
#define ll long long
#define inf (1<<29)
#define vi vector<int>
#define vll vector<ll>
#define sc(x) scanf("%d",&x)
#define scl(x) scanf("%lld",&x)
#define all(v) v.begin() , v.end()
#define me(a,val) memset( a , val ,sizeof(a) )
#define pb(x) push_back(x)
#define pii pair<int,int> 
#define mp(a,b) make_pair(a,b)
#define Q(x) (x) * (x)
#define L(x) ((x<<1) + 1)
#define R(x) ((x<<1) + 2)
#define M(x,y) ((x+y)>>1)
#define fi first
#define se second
#define MOD 1000000007
#define ios ios::sync_with_stdio(0)
#define TRADITIONAL 1
#define N 1024

typedef struct MatrixStruct {
	double **data;
	int height, width;
} Matrix;

void nrerror(string s){
	printf("Numerical Recipes run-time error...\n");
	printf("%s\n",s.c_str());
	printf("...now exiting to system...\n");
	exit(1);
}

double *dvector(int nl, int nh){
	double *v;
	v = (double *) calloc((unsigned) (nh-nl+1), sizeof(double));
	if (!v) nrerror("allocation failure in dvector()");
	return v-nl;
}

float *vector(int nl, int nh){
	float *v;
	v = (float *) calloc((unsigned) (nh-nl+1), sizeof(float));
	if (!v) nrerror("allocation failure in dvector()");
	return v-nl;
}

void free_dvector(double *v, int nl, int nh){
	free((char*) (v+nl));
}

void free_vector(float *v, int nl, int nh){
	free((char*) (v+nl));
}

float **matrix(int nrl,int nrh,int ncl,int nch){
	float **m;
	m = (float **) malloc((unsigned) (nrh-nrl+1)*sizeof(float*));
	if (!m) nrerror("allocation failure 1 in matrix()");
	m -= nrl;
	for(int i = nrl ; i <= nrh ; i++){
		m[i]=(float *) malloc((unsigned) (nch-ncl+1)*sizeof(float));
		if (!m[i]) nrerror("allocation failure 2 in matrix()");
		m[i] -= ncl;
	}
	return m;
}

void free_matrix(float **m,int nrl,int nrh,int ncl,int nch){
	for(int i = nrh ; i >= nrl ; i--) free((char*) (m[i]+ncl));
	free((char*) (m+nrl));
}

double **dmatrix(int nrl, int nrh, int ncl, int nch){
	double **m;
	m = (double **) calloc((unsigned) (nrh-nrl+1), sizeof(double*));
	if (!m) nrerror("allocation failure 1 in dmatrix()");
	m -= nrl;
	for(int i = nrl ; i <= nrh ; i++){
		m[i] = (double *) calloc((unsigned) (nch-ncl+1), sizeof(double));
		if (!m[i]) nrerror("allocation failure 2 in dmatrix()");
		m[i] -= ncl;
	}
	return m;
}

void free_dmatrix(double **m, int nrl, int nrh, int ncl, int nch){
	for(int i = nrh ; i >= nrl ; i--) free((char*) (m[i]+ncl));
	free((char*) (m+nrl));
}

/*
double log2(double x){
	return log10(x) / log10( 2.0 );
}
*/

void CreateMatrix(Matrix **M, int hei, int wid){
	Matrix *tmp;

	tmp = (Matrix *) calloc(1, sizeof(Matrix)); 
	tmp->data = (double **) calloc(hei, sizeof(double *));
	
	if (!(tmp->data)) {
		nrerror("allocation failure in CreateMatrix()");
		exit(1);
	}

	for (int h = 0 ; h < hei ; h++) {
		tmp->data[h] = (double *) calloc(wid, sizeof(double));
		if (!(tmp->data[h])) {
			nrerror("allocation failure in CreateMatrix()");
			exit(1);
		}
	}

	tmp->height = hei;
	tmp->width = wid;
	*M = tmp;
}

void FreeMatrix(Matrix *M){
	int hei = M->height;
	for(int h = 0 ; h < hei ; h++){
	     free(M->data[h]);
	}
	free(M->data);
	free(M);
}


void four1(double *data, int nn, int isign){
	int n, mmax, m, j, istep, i;
	double wtemp, wr, wpr, wpi, wi, theta;
	double tempr, tempi;
	n = nn << 1;
	j = 1;
	for (i=1;i<n;i+=2) {
		if (j > i) {
			swap(data[j],data[i]);
			swap(data[j+1],data[i+1]);
		}
		m = n >> 1;
		while (m >= 2 && j > m) {
			j -= m;
			m >>= 1;
		}
		j += m;
	}
	mmax = 2;
	while (n > mmax) {
		istep = 2*mmax;
		theta = 6.28318530717959/(isign*mmax);
		wtemp = sin(0.5*theta);
		wpr = -2.0*wtemp*wtemp;
		wpi = sin(theta);
		wr = 1.0;
		wi = 0.0;
		for (m=1;m<mmax;m+=2) {
			for (i=m;i<=n;i+=istep) {
				j = i+mmax;
				tempr = wr*data[j]-wi*data[j+1];
				tempi = wr*data[j+1]+wi*data[j];
				data[j] = data[i]-tempr;
				data[j+1] = data[i+1]-tempi;
				data[i] += tempr;
				data[i+1] += tempi;
			}
			wr = (wtemp=wr)*wpr-wi*wpi+wr;
			wi = wi*wpr+wtemp*wpi+wi;
		}
		mmax = istep;
	}
}

void four2(double **fftr, double **ffti, double **rdata, double **idata, int rs, int cs, int isign){
/************************************************************ 

   2-D fourier transform of data with real part stored in
   "rdata" and imaginary part in "idata" with size "rs" x
   "cs". The result is in "fftr" and "ffti". The isign is
   "isign" =  1 forward, and "isign" = -1 inverse 

*************************************************************/
        double **T, *tmp1, *tmp2;
        int i, j;

        tmp1 = dvector(1,2*cs);
        tmp2 = dvector(1,2*rs);
        T = dmatrix(1,2*rs,1,cs);

        for (i=1;i<=rs;i++) {
            for (j=1;j<=cs;j++) {
                tmp1[j*2-1] = rdata[i][j];
                tmp1[j*2] = idata[i][j];
            }
            four1(tmp1, cs, isign);
            for (j=1;j<=cs;j++) {
                T[i*2-1][j] = tmp1[j*2-1];
                T[i*2][j] = tmp1[j*2];
            }
        }

        for (i=1;i<=cs;i++) {
            for (j=1;j<=rs;j++) {
                tmp2[j*2-1] = T[j*2-1][i];
                tmp2[j*2] = T[j*2][i];
            }
            four1(tmp2,rs,isign);
            for (j=1;j<=rs;j++) {
                fftr[j][i] = tmp2[j*2-1];
                ffti[j][i] = tmp2[j*2];
            }
        }
        free_dvector(tmp1, 1, 2*cs);
        free_dvector(tmp2, 1, 2*rs);
        free_dmatrix(T, 1, 2*rs, 1, cs); 
}

void Mat_FFT2(Matrix *Output_real, Matrix *Output_imag, Matrix *Input_real, Matrix *Input_imag){
	int xs, ys, i, j;
	double **R, **I, **Fr, **Fi;

	xs = Input_real->height;
	ys = Input_real->width;

    R  = dmatrix(1,xs,1,ys);
    I  = dmatrix(1,xs,1,ys);
    Fr = dmatrix(1,xs,1,ys);
    Fi = dmatrix(1,xs,1,ys);
		
    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            R[i][j] = Input_real->data[i-1][j-1];
            I[i][j] = Input_imag->data[i-1][j-1];
        }

    four2(Fr, Fi, R, I, xs, ys, 1);         /* 2-D FFT */

    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            Output_real->data[i-1][j-1] = Fr[i][j];
            Output_imag->data[i-1][j-1] = Fi[i][j];
        }

    free_dmatrix(R,1,xs,1,ys);
    free_dmatrix(I,1,xs,1,ys);   
    free_dmatrix(Fr,1,xs,1,ys);
    free_dmatrix(Fi,1,xs,1,ys);   
}

void Mat_IFFT2(Matrix *Output_real, Matrix *Output_imag, Matrix *Input_real, Matrix *Input_imag){
	int xs, ys, i, j;
	double **R, **I, **Fr, **Fi, NN;

	xs = Input_real->height;
	ys = Input_real->width;

    R  = dmatrix(1,xs,1,ys);
    I  = dmatrix(1,xs,1,ys);
    Fr = dmatrix(1,xs,1,ys);
    Fi = dmatrix(1,xs,1,ys);

    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            R[i][j] = Input_real->data[i-1][j-1];
            I[i][j] = Input_imag->data[i-1][j-1];
        }

    four2(Fr, Fi, R, I, xs, ys, -1);         /* 2-D IFFT */

	NN = (double) (xs*ys);

    for (i=1;i<=Input_real->height;i++) 
        for (j=1;j<=Input_real->width;j++) {
            Output_real->data[i-1][j-1] = Fr[i][j]/NN;
            Output_imag->data[i-1][j-1] = Fi[i][j]/NN;
        }

    free_dmatrix(R,1,xs,1,ys);
    free_dmatrix(I,1,xs,1,ys);   
    free_dmatrix(Fr,1,xs,1,ys);
    free_dmatrix(Fi,1,xs,1,ys);   
}

void Mat_Copy(Matrix *A, Matrix *B, int h_target, int w_target, int h_begin, int w_begin, int h_end, int w_end){
	int i, j, h, w, h_done, w_done;
	if ((h_target >= 0)&&(h_target < A->height)&&(w_target >= 0)&&(w_target < A->width)) {
		if ((h_begin >= 0)&&(h_begin < B->height)&&(w_begin >= 0)&&(w_begin < B->width)) {
			h = h_end-h_begin+1;
			w = w_end-w_begin+1;
			if ((h >= 1)&&(w >= 1)) {
				h_done = h_target+h-1;
				w_done = w_target+w-1;
				if ((h_done < A->height)&&(w_done < A->width)) {
					for (i=0;i<h;i++) {
						for (j=0;j<w;j++) {
							A->data[i+h_target][j+w_target] = B->data[i+h_begin][j+w_begin];
						}
					}
				}
			}
		}
	}
	else {
		printf("matrix dimension error!\n");
		exit(1);
	}
}


void Mat_Product(Matrix *A, Matrix *B, Matrix *C){
	for(int h = 0 ; h < A->height ; h++)
		for(int w = 0 ; w < A->width ; w++)
			A->data[h][w] = B->data[h][w]*C->data[h][w];
}

void Mat_Sum(Matrix *A, Matrix *B, Matrix *C){
	for(int h = 0 ; h < A-> height ; h++)
		for(int w = 0 ; w < A->width ; w++)
			A->data[h][w] = B->data[h][w]+C->data[h][w];
}

void Mat_Substract(Matrix *A, Matrix *B, Matrix *C){
	for(int h = 0 ; h < A->height ; h++)
		for(int w = 0 ; w < A->width ; w++)
			A->data[h][w] = B->data[h][w]-C->data[h][w];
}

void Gabor(Matrix *Gr, Matrix *Gi, int s, int n, double Ul, double Uh, int scale, int orientation, int flag);

void GaborFilteredImg(Matrix *FilteredImg_real, Matrix *FilteredImg_imag, Matrix *img, int side, double Ul, double Uh, int scale, int orientation, int flag){
	int h, w, xs, ys, border, r1, r2, r3, r4, hei, wid, s, n, base;
	Matrix *IMG, *IMG_imag, *Gr, *Gi, *Tmp_1, *Tmp_2, *F_1, *F_2, *G_real, *G_imag, *F_real, *F_imag,*F;
	double m, v;
	
	base = scale*orientation;
	double *features; //exact memory
	features = (double *)malloc( 2 * scale * orientation * sizeof(double) );

	border = side;
	hei = img->height;
	wid = img->width;

	/* FFT2 */
	xs = (int) pow(2.0, ceil(log2((double)(img->height+2.0*border))));
	ys = (int) pow(2.0, ceil(log2((double)(img->width+2.0*border))));

	CreateMatrix(&IMG, xs, ys);

	r1 = img->width+border;
	r2 = img->width+2*border;
	for (h=0;h<border;h++) {
		for (w=0;w<border;w++)
			IMG->data[h][w] = img->data[border-1-h][border-1-w];
		for (w=border;w<r1;w++)
			IMG->data[h][w] = img->data[border-1-h][w-border];
		for (w=r1;w<r2;w++)
			IMG->data[h][w] = img->data[border-1-h][2*img->width-w+border-1];
	}

	r1 = img->height+border;
	r2 = img->width+border;
	r3 = img->width+2*border;
	for (h=border;h<r1;h++) {
		for (w=0;w<border;w++)
			IMG->data[h][w] = img->data[h-border][border-1-w];
		for (w=border;w<r2;w++)
			IMG->data[h][w] = img->data[h-border][w-border];
		for (w=r2;w<r3;w++)
			IMG->data[h][w] = img->data[h-border][2*img->width-w+border-1];
	}

	r1 = img->height+border;
	r2 = img->height+2*border;
	r3 = img->width+border;
	r4 = img->width+2*border;
	for (h=r1;h<r2;h++) {
		for (w=0;w<border;w++)
			IMG->data[h][w] = img->data[2*img->height-h+border-1][border-1-w];
		for (w=border;w<r3;w++)
			IMG->data[h][w] = img->data[2*img->height-h+border-1][w-border];
		for (w=r3;w<r4;w++)
			IMG->data[h][w] = img->data[2*img->height-h+border-1][2*img->width-w+border-1];
	}

	CreateMatrix(&F_real, xs, ys);
	CreateMatrix(&F_imag, xs, ys);
	CreateMatrix(&IMG_imag, xs, ys);

	Mat_FFT2(F_real, F_imag, IMG, IMG_imag);

	/* ----------- compute the Gabor filtered output ------------- */

	CreateMatrix(&Gr, 2*side+1, 2*side+1);
	CreateMatrix(&Gi, 2*side+1, 2*side+1);
	CreateMatrix(&Tmp_1, xs, ys);
	CreateMatrix(&Tmp_2, xs, ys);
	CreateMatrix(&F_1, xs, ys);
	CreateMatrix(&F_2, xs, ys);
	CreateMatrix(&G_real, xs, ys);
	CreateMatrix(&G_imag, xs, ys);
    CreateMatrix(&F, hei, wid);
    
	for (s=0;s<scale;s++){
		for (n=0;n<orientation;n++) {
			Gabor(Gr, Gi, s+1, n+1, Ul, Uh, scale, orientation, flag);//CUDA- 2 normales y logn
			Mat_Copy(F_1, Gr, 0, 0, 0, 0, 2*side, 2*side);//CUDA
			Mat_Copy(F_2, Gi, 0, 0, 0, 0, 2*side, 2*side);//CUDA
			Mat_FFT2(G_real, G_imag, F_1, F_2);//CUDA-no definido

			Mat_Product(Tmp_1, G_real, F_real);//CUDA
			Mat_Product(Tmp_2, G_imag, F_imag);//CUDA
			Mat_Substract(IMG, Tmp_1, Tmp_2);//CUDA

			Mat_Product(Tmp_1, G_real, F_imag);//CUDA
			Mat_Product(Tmp_2, G_imag, F_real);//CUDA
			Mat_Sum(IMG_imag, Tmp_1, Tmp_2);//CUDA

			Mat_IFFT2(Tmp_1, Tmp_2, IMG, IMG_imag);//CUDA-no definido
			
			//CUDA - logn
			m = 0;
			for (h=0;h<hei;h++)
				for (w=0;w<wid;w++) {
					F->data[h][w] = sqrt(pow(IMG->data[h][w], 2.0)+pow(IMG_imag->data[h][w], 2.0));
					m += F->data[h][w];
				}

			m /= (double) (hei*wid);
			features[s*orientation+n] = (float) m;
			
			//CUDA - logn
			v = 0;
			for (h=0;h<hei;h++)
				for (w=0;w<wid;w++)
					v += (F->data[h][w]-m)*(F->data[h][w]-m);

			v /= (double) (hei*wid);
			features[base+s*orientation+n] = (float) sqrt(v);
            
			Mat_Copy(FilteredImg_real, Tmp_1, s*hei, n*wid, 2*side, 2*side, hei+2*side-1, wid+2*side-1);//CUDA
			Mat_Copy(FilteredImg_imag, Tmp_2, s*hei, n*wid, 2*side, 2*side, hei+2*side-1, wid+2*side-1);//CUDA
		}
	}
	
    for(int i = 0 ; i < (2 * scale * orientation) ; i++)
        printf("%.8lf ",features[i]);
    printf("\n");
    cout << 2 * scale  * orientation << endl;
    
	FreeMatrix(Gr);
	FreeMatrix(Gi);
	FreeMatrix(Tmp_1);
	FreeMatrix(Tmp_2);
	FreeMatrix(F_1);
	FreeMatrix(F_2);
	FreeMatrix(G_real);
	FreeMatrix(G_imag);
	FreeMatrix(F_real);
	FreeMatrix(F_imag);
	FreeMatrix(IMG);
	FreeMatrix(IMG_imag);
}

/* ------------------------------------------------------------------------------------------------------
The Gabor function generates a Gabor filter with the selected index 's' and 'n' (scale and orientation, 
respectively) from a Gabor filter bank. This filter bank is designed by giving the range of spatial 
frequency (Uh and Ul) and the total number of scales and orientations used to partition the spectrum. 

The returned filter is stored in 'Gr' (real part) and 'Gi' (imaginary part).
--------------------------------------------------------------------------------------------------------*/
void Gabor(Matrix *Gr, Matrix *Gi, int s, int n, double Ul, double Uh, int scale, int orientation, int flag){
	double base, a, u0, z, Uvar, Vvar, Xvar, Yvar, X, Y, G, t1, t2, m;
	int x, y, side;

	base = Uh/Ul;
	a = pow(base, 1.0/(double)(scale-1));

	u0 = Uh/pow(a, (double) scale-s);

	Uvar = (a-1.0)*u0/((a+1.0)*sqrt(2.0*log(2.0)));

	z = -2.0*log(2.0)*(Uvar*Uvar)/u0;
	Vvar = tan(pi/(2*orientation))*(u0+z)/sqrt(2.0*log(2.0)-z*z/(Uvar*Uvar));

        Xvar = 1.0/(2.0*pi*Uvar);
        Yvar = 1.0/(2.0*pi*Vvar);

	t1 = cos(pi/orientation*(n-1.0));
	t2 = sin(pi/orientation*(n-1.0));

	side = (int) (Gr->height-1)/2;

	//CUDA
	for (x=0;x<2*side+1;x++) {
		for (y=0;y<2*side+1;y++) {
			X = (double) (x-side)*t1+ (double) (y-side)*t2;
			Y = (double) -(x-side)*t2+ (double) (y-side)*t1;
			G = 1.0/(2.0*pi*Xvar*Yvar)*pow(a, (double) scale-s)*exp(-0.5*((X*X)/(Xvar*Xvar)+(Y*Y)/(Yvar*Yvar)));
			Gr->data[x][y] = G*cos(2.0*pi*u0*X);
			Gi->data[x][y] = G*sin(2.0*pi*u0*X);
		}
	}

	/* if flag = 1, then remove the DC from the filter */
	

	if (flag == 1) {
	
		//CUDA - logn
		m = 0;
		for (x=0;x<2*side+1;x++)
			for (y=0;y<2*side+1;y++)
				m += Gr->data[x][y];

		m /= pow((double) 2.0*side+1, 2.0);
		
		
		//CUDA
		for (x=0;x<2*side+1;x++)
			for (y=0;y<2*side+1;y++)
				Gr->data[x][y] -= m;
	}	
}

int main(int argc, char **argv){
	int hei, wid, side, scale, orientation, flag;//, s, n;
	//Matrix *Gabor_r, *Gabor_i, *Gr, *Gi, *img, *F_r, *F_i;
	Matrix *img , *F_r , *F_i;
	FILE *fp;
	unsigned char *tmp; 
	//float *output;
	double Ul, Uh;
	/* --------------------------- Example --------------------------------
		scale = 3, 
		orientation = 4, 
		Uh (highest spatial frequency) = 0.4, 
		Ul (lowest spatial frequency) = 0.1,
		flag (removing the DC term) = 0 (False),
		side (filter dimension = (2*side+1)*(2*side+1)) = 60
	----------------------------------------------------------------------- */
	scale = 3;
	orientation = 4;
	Ul = 0.1;
	Uh = 0.4;
	flag = 0;
	side = 60;

	if (argc != 4) {
		printf("usage: %s <image_name> <height> <width>\n",argv[0]);
		exit(0);
	}
	
	hei = atoi(argv[2]);
	wid = atoi(argv[3]);

	tmp = (unsigned char *) calloc(hei*wid, sizeof(unsigned char));

	if ((fp = fopen(argv[1],"r")) == NULL) {
		printf("%s can not be open!\n", argv[1]);
		exit(0);
	}
	fread(tmp, sizeof(unsigned char), hei*wid, fp);
	fclose(fp);

	
	CreateMatrix(&img, hei, wid);
	for(int i = 0 ; i < hei ; i++)
		for(int j = 0 ; j < wid ; j++)
			img->data[i][j] = (double) (tmp[i*wid+j]);
			
	free(tmp);
		
	CreateMatrix(&F_r, hei*scale, wid*orientation);
	CreateMatrix(&F_i, hei*scale, wid*orientation);

	GaborFilteredImg(F_r, F_i, img, side, Ul, Uh, scale, orientation, flag);

	FreeMatrix(F_r);
	FreeMatrix(F_i);
	return 0;
}

	.text
	.file	"A.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE # -- Begin function _Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movl	$.Lstr, %edi
	callq	puts@PLT
	movq	(%rbx), %rdi
	callq	puts@PLT
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$1, %edi
	callq	exit
.Lfunc_end0:
	.size	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end0-_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
                                        # -- End function
	.globl	_Z7dvectorii                    # -- Begin function _Z7dvectorii
	.type	_Z7dvectorii,@function
_Z7dvectorii:                           # @_Z7dvectorii
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
                                        # kill: def $esi killed $esi def $rsi
	movl	%edi, %ebx
	subl	%edi, %esi
	leal	1(%rsi), %edi
	movl	$8, %esi
	callq	calloc
	testq	%rax, %rax
	je	.LBB1_2
# %bb.1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movslq	%ebx, %rcx
	shlq	$3, %rcx
	subq	%rcx, %rax
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB1_2:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	.cfi_def_cfa_offset 48
	leaq	16(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	%rsp, %rbx
	movl	$.L.str.3, %esi
	movl	$.L.str.3+31, %edx
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	%rbx, %rdi
	callq	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Lfunc_end1:
	.size	_Z7dvectorii, .Lfunc_end1-_Z7dvectorii
	.cfi_endproc
                                        # -- End function
	.globl	_Z6vectorii                     # -- Begin function _Z6vectorii
	.type	_Z6vectorii,@function
_Z6vectorii:                            # @_Z6vectorii
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
                                        # kill: def $esi killed $esi def $rsi
	movl	%edi, %ebx
	subl	%edi, %esi
	leal	1(%rsi), %edi
	movl	$4, %esi
	callq	calloc
	testq	%rax, %rax
	je	.LBB2_2
# %bb.1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movslq	%ebx, %rcx
	shlq	$2, %rcx
	subq	%rcx, %rax
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB2_2:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	.cfi_def_cfa_offset 48
	leaq	16(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	%rsp, %rbx
	movl	$.L.str.3, %esi
	movl	$.L.str.3+31, %edx
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	%rbx, %rdi
	callq	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Lfunc_end2:
	.size	_Z6vectorii, .Lfunc_end2-_Z6vectorii
	.cfi_endproc
                                        # -- End function
	.globl	_Z12free_dvectorPdii            # -- Begin function _Z12free_dvectorPdii
	.type	_Z12free_dvectorPdii,@function
_Z12free_dvectorPdii:                   # @_Z12free_dvectorPdii
	.cfi_startproc
# %bb.0:
	movslq	%esi, %rax
	leaq	(%rdi,%rax,8), %rdi
	jmp	free                            # TAILCALL
.Lfunc_end3:
	.size	_Z12free_dvectorPdii, .Lfunc_end3-_Z12free_dvectorPdii
	.cfi_endproc
                                        # -- End function
	.globl	_Z11free_vectorPfii             # -- Begin function _Z11free_vectorPfii
	.type	_Z11free_vectorPfii,@function
_Z11free_vectorPfii:                    # @_Z11free_vectorPfii
	.cfi_startproc
# %bb.0:
	movslq	%esi, %rax
	leaq	(%rdi,%rax,4), %rdi
	jmp	free                            # TAILCALL
.Lfunc_end4:
	.size	_Z11free_vectorPfii, .Lfunc_end4-_Z11free_vectorPfii
	.cfi_endproc
                                        # -- End function
	.globl	_Z6matrixiiii                   # -- Begin function _Z6matrixiiii
	.type	_Z6matrixiiii,@function
_Z6matrixiiii:                          # @_Z6matrixiiii
	.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	$72, %rsp
	.cfi_def_cfa_offset 128
	.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	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r14d
	movl	%edi, %ebp
	movl	%esi, %edi
	subl	%ebp, %edi
	incl	%edi
	shlq	$3, %rdi
	callq	malloc
	testq	%rax, %rax
	je	.LBB5_1
# %bb.3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	%rax, %r15
	subl	%ebp, %r14d
	jl	.LBB5_8
# %bb.4:                                # %.lr.ph
	subl	%r12d, %ebx
	incl	%ebx
	shlq	$2, %rbx
	movslq	%r12d, %r12
	negq	%r12
	incl	%r14d
	xorl	%r13d, %r13d
.LBB5_5:                                # =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	malloc
	testq	%rax, %rax
	je	.LBB5_6
# %bb.7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit36
                                        #   in Loop: Header=BB5_5 Depth=1
	leaq	(%rax,%r12,4), %rax
	movq	%rax, (%r15,%r13,8)
	incq	%r13
	cmpl	%r13d, %r14d
	jne	.LBB5_5
.LBB5_8:                                # %._crit_edge
	movslq	%ebp, %rax
	shlq	$3, %rax
	subq	%rax, %r15
	movq	%r15, %rax
	addq	$72, %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_6:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit33
	.cfi_def_cfa_offset 128
	leaq	24(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	8(%rsp), %rbx
	movl	$.L.str.5, %esi
	movl	$.L.str.5+32, %edx
.LBB5_2:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	%rbx, %rdi
	callq	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LBB5_1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	leaq	56(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	40(%rsp), %rbx
	movl	$.L.str.4, %esi
	movl	$.L.str.4+32, %edx
	jmp	.LBB5_2
.Lfunc_end5:
	.size	_Z6matrixiiii, .Lfunc_end5-_Z6matrixiiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z11free_matrixPPfiiii          # -- Begin function _Z11free_matrixPPfiiii
	.type	_Z11free_matrixPPfiiii,@function
_Z11free_matrixPPfiiii:                 # @_Z11free_matrixPPfiiii
	.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	%rdi, %rbx
	cmpl	%esi, %edx
	jge	.LBB6_3
# %bb.1:                                # %.._crit_edge_crit_edge
	movslq	%esi, %r14
	jmp	.LBB6_2
.LBB6_3:                                # %.lr.ph
	movslq	%ecx, %r15
	movslq	%edx, %r12
	movslq	%esi, %r14
	incq	%r12
	shlq	$2, %r15
.LBB6_4:                                # =>This Inner Loop Header: Depth=1
	movq	-8(%rbx,%r12,8), %rdi
	addq	%r15, %rdi
	callq	free
	decq	%r12
	cmpq	%r14, %r12
	jg	.LBB6_4
.LBB6_2:                                # %._crit_edge
	leaq	(%rbx,%r14,8), %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
.Lfunc_end6:
	.size	_Z11free_matrixPPfiiii, .Lfunc_end6-_Z11free_matrixPPfiiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z7dmatrixiiii                  # -- Begin function _Z7dmatrixiiii
	.type	_Z7dmatrixiiii,@function
_Z7dmatrixiiii:                         # @_Z7dmatrixiiii
	.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	$72, %rsp
	.cfi_def_cfa_offset 128
	.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	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r14d
	movl	%edi, %ebp
	movl	%esi, %edi
	subl	%ebp, %edi
	incl	%edi
	movl	$8, %esi
	callq	calloc
	testq	%rax, %rax
	je	.LBB7_1
# %bb.3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	%rax, %r15
	subl	%ebp, %r14d
	jl	.LBB7_8
# %bb.4:                                # %.lr.ph
	subl	%r12d, %ebx
	incl	%ebx
	movslq	%r12d, %r12
	negq	%r12
	incl	%r14d
	xorl	%r13d, %r13d
.LBB7_5:                                # =>This Inner Loop Header: Depth=1
	movl	$8, %esi
	movq	%rbx, %rdi
	callq	calloc
	testq	%rax, %rax
	je	.LBB7_6
# %bb.7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit36
                                        #   in Loop: Header=BB7_5 Depth=1
	leaq	(%rax,%r12,8), %rax
	movq	%rax, (%r15,%r13,8)
	incq	%r13
	cmpl	%r13d, %r14d
	jne	.LBB7_5
.LBB7_8:                                # %._crit_edge
	movslq	%ebp, %rax
	shlq	$3, %rax
	subq	%rax, %r15
	movq	%r15, %rax
	addq	$72, %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
.LBB7_6:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit33
	.cfi_def_cfa_offset 128
	leaq	24(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	8(%rsp), %rbx
	movl	$.L.str.7, %esi
	movl	$.L.str.7+33, %edx
.LBB7_2:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	%rbx, %rdi
	callq	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LBB7_1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	leaq	56(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	40(%rsp), %rbx
	movl	$.L.str.6, %esi
	movl	$.L.str.6+33, %edx
	jmp	.LBB7_2
.Lfunc_end7:
	.size	_Z7dmatrixiiii, .Lfunc_end7-_Z7dmatrixiiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z12free_dmatrixPPdiiii         # -- Begin function _Z12free_dmatrixPPdiiii
	.type	_Z12free_dmatrixPPdiiii,@function
_Z12free_dmatrixPPdiiii:                # @_Z12free_dmatrixPPdiiii
	.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	%rdi, %rbx
	cmpl	%esi, %edx
	jge	.LBB8_3
# %bb.1:                                # %.._crit_edge_crit_edge
	movslq	%esi, %r14
	jmp	.LBB8_2
.LBB8_3:                                # %.lr.ph
	movslq	%ecx, %r15
	movslq	%edx, %r12
	movslq	%esi, %r14
	incq	%r12
	shlq	$3, %r15
.LBB8_4:                                # =>This Inner Loop Header: Depth=1
	movq	-8(%rbx,%r12,8), %rdi
	addq	%r15, %rdi
	callq	free
	decq	%r12
	cmpq	%r14, %r12
	jg	.LBB8_4
.LBB8_2:                                # %._crit_edge
	leaq	(%rbx,%r14,8), %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
.Lfunc_end8:
	.size	_Z12free_dmatrixPPdiiii, .Lfunc_end8-_Z12free_dmatrixPPdiiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z12CreateMatrixPP12MatrixStructii # -- Begin function _Z12CreateMatrixPP12MatrixStructii
	.type	_Z12CreateMatrixPP12MatrixStructii,@function
_Z12CreateMatrixPP12MatrixStructii:     # @_Z12CreateMatrixPP12MatrixStructii
	.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	$88, %rsp
	.cfi_def_cfa_offset 144
	.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, 12(%rsp)                  # 4-byte Spill
	movl	%esi, %ebp
	movq	%rdi, 16(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	$16, %esi
	callq	calloc
	movq	%rax, %r15
	movslq	%ebp, %rdi
	movl	$8, %esi
	callq	calloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	.LBB9_3
# %bb.1:                                # %.preheader
	testl	%ebp, %ebp
	jle	.LBB9_8
# %bb.2:                                # %.lr.ph
	movq	%rax, %r12
	movslq	12(%rsp), %r13                  # 4-byte Folded Reload
	movl	%ebp, %r14d
	xorl	%ebx, %ebx
.LBB9_6:                                # =>This Inner Loop Header: Depth=1
	movl	$8, %esi
	movq	%r13, %rdi
	callq	calloc
	movq	%rax, (%r12,%rbx,8)
	testq	%rax, %rax
	je	.LBB9_7
# %bb.5:                                #   in Loop: Header=BB9_6 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	.LBB9_6
.LBB9_8:                                # %._crit_edge
	movl	%ebp, 8(%r15)
	movl	12(%rsp), %eax                  # 4-byte Reload
	movl	%eax, 12(%r15)
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	%r15, (%rax)
	addq	$88, %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
.LBB9_7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit28
	.cfi_def_cfa_offset 144
	leaq	40(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	24(%rsp), %rbx
.LBB9_4:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	movl	$.L.str.8, %esi
	movl	$.L.str.8+36, %edx
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	%rbx, %rdi
	callq	_Z7nrerrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LBB9_3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	leaq	72(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	56(%rsp), %rbx
	jmp	.LBB9_4
.Lfunc_end9:
	.size	_Z12CreateMatrixPP12MatrixStructii, .Lfunc_end9-_Z12CreateMatrixPP12MatrixStructii
	.cfi_endproc
                                        # -- End function
	.globl	_Z10FreeMatrixP12MatrixStruct   # -- Begin function _Z10FreeMatrixP12MatrixStruct
	.type	_Z10FreeMatrixP12MatrixStruct,@function
_Z10FreeMatrixP12MatrixStruct:          # @_Z10FreeMatrixP12MatrixStruct
	.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
	movl	8(%rdi), %r14d
	testl	%r14d, %r14d
	jle	.LBB10_3
# %bb.1:                                # %.lr.ph.preheader
	xorl	%r15d, %r15d
.LBB10_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	(%rax,%r15,8), %rdi
	callq	free
	incq	%r15
	cmpq	%r15, %r14
	jne	.LBB10_2
.LBB10_3:                               # %._crit_edge
	movq	(%rbx), %rdi
	callq	free
	movq	%rbx, %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
.Lfunc_end10:
	.size	_Z10FreeMatrixP12MatrixStruct, .Lfunc_end10-_Z10FreeMatrixP12MatrixStruct
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z5four1Pdii
.LCPI11_0:
	.quad	0x401921fb54442d1c              # double 6.2831853071795898
.LCPI11_1:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI11_2:
	.quad	0xc000000000000000              # double -2
.LCPI11_3:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z5four1Pdii
	.type	_Z5four1Pdii,@function
_Z5four1Pdii:                           # @_Z5four1Pdii
	.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	$32, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
                                        # kill: def $esi killed $esi def $rsi
	leal	(%rsi,%rsi), %ebp
	cmpl	$2, %ebp
	jl	.LBB11_20
# %bb.1:                                # %.lr.ph96
	movl	%edx, %ebx
	movq	%rdi, %r14
	andl	$2147483647, %esi               # imm = 0x7FFFFFFF
	movl	%ebp, %eax
	movl	$1, %ecx
	movl	$1, %edx
.LBB11_2:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB11_10 Depth 2
	movslq	%ecx, %rdi
	cmpq	%rdi, %rdx
	jge	.LBB11_4
# %bb.3:                                #   in Loop: Header=BB11_2 Depth=1
	movsd	(%r14,%rdi,8), %xmm0            # xmm0 = mem[0],zero
	movsd	(%r14,%rdx,8), %xmm1            # xmm1 = mem[0],zero
	movsd	%xmm1, (%r14,%rdi,8)
	movsd	%xmm0, (%r14,%rdx,8)
	movsd	8(%r14,%rdi,8), %xmm0           # xmm0 = mem[0],zero
	movsd	8(%r14,%rdx,8), %xmm1           # xmm1 = mem[0],zero
	movsd	%xmm1, 8(%r14,%rdi,8)
	movsd	%xmm0, 8(%r14,%rdx,8)
.LBB11_4:                               #   in Loop: Header=BB11_2 Depth=1
	cmpl	$2, %esi
	jb	.LBB11_5
# %bb.8:                                #   in Loop: Header=BB11_2 Depth=1
	cmpl	%esi, %ecx
	jle	.LBB11_5
# %bb.9:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB11_2 Depth=1
	movl	%esi, %edi
.LBB11_10:                              # %.lr.ph
                                        #   Parent Loop BB11_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%edi, %r8d
	subl	%edi, %ecx
	shrl	%edi
	cmpl	$4, %r8d
	jb	.LBB11_12
# %bb.11:                               # %.lr.ph
                                        #   in Loop: Header=BB11_10 Depth=2
	cmpl	%edi, %ecx
	jg	.LBB11_10
	jmp	.LBB11_12
.LBB11_5:                               #   in Loop: Header=BB11_2 Depth=1
	movl	%esi, %edi
.LBB11_12:                              # %._crit_edge
                                        #   in Loop: Header=BB11_2 Depth=1
	addl	%edi, %ecx
	addq	$2, %rdx
	cmpq	%rax, %rdx
	jb	.LBB11_2
# %bb.6:                                # %.preheader89
	cmpl	$2, %ebp
	je	.LBB11_20
# %bb.7:                                # %.lr.ph105.preheader
	addq	$8, %r14
	movl	$2, %r15d
.LBB11_14:                              # %.lr.ph105
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB11_16 Depth 2
                                        #       Child Loop BB11_18 Depth 3
	movl	%r15d, %r12d
	leal	(%r12,%r12), %r15d
	movl	%r12d, %eax
	imull	%ebx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movsd	.LCPI11_0(%rip), %xmm1          # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, 24(%rsp)                 # 8-byte Spill
	movapd	%xmm1, %xmm0
	mulsd	.LCPI11_1(%rip), %xmm0
	callq	sin
	movsd	%xmm0, 16(%rsp)                 # 8-byte Spill
	movapd	%xmm0, %xmm1
	mulsd	.LCPI11_2(%rip), %xmm1
	movsd	%xmm1, 8(%rsp)                  # 8-byte Spill
	movsd	24(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	sin
	movsd	16(%rsp), %xmm7                 # 8-byte Reload
                                        # xmm7 = mem[0],zero
	cmpl	$2, %r12d
	jl	.LBB11_13
# %bb.15:                               # %.preheader.preheader
                                        #   in Loop: Header=BB11_14 Depth=1
	mulsd	8(%rsp), %xmm7                  # 8-byte Folded Reload
	movl	%r15d, %eax
	movl	%r12d, %ecx
	shlq	$3, %rax
	xorpd	%xmm1, %xmm1
	movl	$1, %edx
	movq	%r14, %rsi
	movsd	.LCPI11_3(%rip), %xmm2          # xmm2 = mem[0],zero
.LBB11_16:                              # %.preheader
                                        #   Parent Loop BB11_14 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB11_18 Depth 3
	cmpl	%edx, %ebp
	jl	.LBB11_19
# %bb.17:                               # %.lr.ph99.preheader
                                        #   in Loop: Header=BB11_16 Depth=2
	movl	%edx, %edi
	movq	%rsi, %r8
.LBB11_18:                              # %.lr.ph99
                                        #   Parent Loop BB11_14 Depth=1
                                        #     Parent Loop BB11_16 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%r8,%rcx,8), %xmm3             # xmm3 = mem[0],zero
	movsd	8(%r8,%rcx,8), %xmm4            # xmm4 = mem[0],zero
	movapd	%xmm2, %xmm5
	mulsd	%xmm3, %xmm5
	movapd	%xmm1, %xmm6
	mulsd	%xmm4, %xmm6
	subsd	%xmm6, %xmm5
	mulsd	%xmm2, %xmm4
	mulsd	%xmm1, %xmm3
	addsd	%xmm4, %xmm3
	movsd	(%r8), %xmm4                    # xmm4 = mem[0],zero
	subsd	%xmm5, %xmm4
	movsd	%xmm4, (%r8,%rcx,8)
	movsd	8(%r8), %xmm4                   # xmm4 = mem[0],zero
	movapd	%xmm4, %xmm6
	subsd	%xmm3, %xmm6
	movsd	%xmm6, 8(%r8,%rcx,8)
	addsd	(%r8), %xmm5
	movsd	%xmm5, (%r8)
	addsd	%xmm4, %xmm3
	movsd	%xmm3, 8(%r8)
	addq	%rax, %r8
	addl	%r15d, %edi
	cmpl	%edi, %ebp
	jge	.LBB11_18
.LBB11_19:                              # %._crit_edge100
                                        #   in Loop: Header=BB11_16 Depth=2
	movapd	%xmm7, %xmm3
	mulsd	%xmm2, %xmm3
	movapd	%xmm0, %xmm4
	mulsd	%xmm1, %xmm4
	subsd	%xmm4, %xmm3
	addsd	%xmm2, %xmm3
	movapd	%xmm7, %xmm4
	mulsd	%xmm1, %xmm4
	mulsd	%xmm0, %xmm2
	addsd	%xmm4, %xmm2
	addsd	%xmm2, %xmm1
	addq	$2, %rdx
	addq	$16, %rsi
	movapd	%xmm3, %xmm2
	cmpl	%edx, %r12d
	jg	.LBB11_16
.LBB11_13:                              # %.loopexit
                                        #   in Loop: Header=BB11_14 Depth=1
	cmpl	%r15d, %ebp
	jg	.LBB11_14
.LBB11_20:                              # %._crit_edge106
	addq	$32, %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
	retq
.Lfunc_end11:
	.size	_Z5four1Pdii, .Lfunc_end11-_Z5four1Pdii
	.cfi_endproc
                                        # -- End function
	.globl	_Z5four2PPdS0_S0_S0_iii         # -- Begin function _Z5four2PPdS0_S0_S0_iii
	.type	_Z5four2PPdS0_S0_S0_iii,@function
_Z5four2PPdS0_S0_S0_iii:                # @_Z5four2PPdS0_S0_S0_iii
	.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	$72, %rsp
	.cfi_def_cfa_offset 128
	.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	%r9d, %r12d
	movl	%r8d, %r15d
	movq	%rcx, 48(%rsp)                  # 8-byte Spill
	movq	%rdx, 40(%rsp)                  # 8-byte Spill
	movq	%rsi, 64(%rsp)                  # 8-byte Spill
	movq	%rdi, 56(%rsp)                  # 8-byte Spill
	movl	128(%rsp), %eax
	movl	%eax, 12(%rsp)                  # 4-byte Spill
	leal	(%r12,%r12), %esi
	movl	$1, %edi
	callq	_Z7dvectorii
	movq	%rax, %rbp
	leal	(%r15,%r15), %ebx
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_Z7dvectorii
	movq	%rax, %r13
	movl	$1, %edi
	movl	%ebx, 36(%rsp)                  # 4-byte Spill
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_Z7dmatrixiiii
	movq	%rax, %r14
	movq	%r15, 24(%rsp)                  # 8-byte Spill
	testl	%r15d, %r15d
	jle	.LBB12_4
# %bb.1:                                # %.preheader85.lr.ph
	leal	1(%r12), %ebx
	movq	24(%rsp), %rax                  # 8-byte Reload
	incl	%eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	shlq	$3, %rbx
	movl	$1, %r15d
.LBB12_2:                               # %.preheader85
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB12_13 Depth 2
                                        #     Child Loop BB12_16 Depth 2
	testl	%r12d, %r12d
	jle	.LBB12_3
# %bb.12:                               # %.lr.ph
                                        #   in Loop: Header=BB12_2 Depth=1
	movq	40(%rsp), %rax                  # 8-byte Reload
	movq	(%rax,%r15,8), %rax
	movq	48(%rsp), %rcx                  # 8-byte Reload
	movq	(%rcx,%r15,8), %rcx
	movl	$8, %edx
.LBB12_13:                              #   Parent Loop BB12_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rax,%rdx), %xmm0              # xmm0 = mem[0],zero
	movsd	%xmm0, -8(%rbp,%rdx,2)
	movsd	(%rcx,%rdx), %xmm0              # xmm0 = mem[0],zero
	movsd	%xmm0, (%rbp,%rdx,2)
	addq	$8, %rdx
	cmpq	%rdx, %rbx
	jne	.LBB12_13
# %bb.14:                               # %._crit_edge
                                        #   in Loop: Header=BB12_2 Depth=1
	movq	%rbp, %rdi
	movl	%r12d, %esi
	movl	12(%rsp), %edx                  # 4-byte Reload
	callq	_Z5four1Pdii
	testl	%r12d, %r12d
	jle	.LBB12_17
# %bb.15:                               # %.lr.ph91
                                        #   in Loop: Header=BB12_2 Depth=1
	movq	%r15, %rcx
	shlq	$4, %rcx
	movq	-8(%r14,%rcx), %rax
	movq	(%r14,%rcx), %rcx
	movl	$8, %edx
.LBB12_16:                              #   Parent Loop BB12_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	-8(%rbp,%rdx,2), %xmm0          # xmm0 = mem[0],zero
	movsd	%xmm0, (%rax,%rdx)
	movsd	(%rbp,%rdx,2), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, (%rcx,%rdx)
	addq	$8, %rdx
	cmpq	%rdx, %rbx
	jne	.LBB12_16
	jmp	.LBB12_17
.LBB12_3:                               # %._crit_edge.thread
                                        #   in Loop: Header=BB12_2 Depth=1
	movq	%rbp, %rdi
	movl	%r12d, %esi
	movl	12(%rsp), %edx                  # 4-byte Reload
	callq	_Z5four1Pdii
.LBB12_17:                              # %._crit_edge92
                                        #   in Loop: Header=BB12_2 Depth=1
	incq	%r15
	cmpq	16(%rsp), %r15                  # 8-byte Folded Reload
	jne	.LBB12_2
.LBB12_4:                               # %.preheader84
	movq	%r12, 16(%rsp)                  # 8-byte Spill
	testl	%r12d, %r12d
	movq	24(%rsp), %rsi                  # 8-byte Reload
	jle	.LBB12_20
# %bb.5:                                # %.preheader.lr.ph
	leal	1(%rsi), %r15d
	movq	16(%rsp), %rax                  # 8-byte Reload
	incl	%eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movq	%r15, %rbx
	shlq	$4, %rbx
	shlq	$3, %r15
	movl	$1, %r12d
.LBB12_6:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB12_8 Depth 2
                                        #     Child Loop BB12_11 Depth 2
	testl	%esi, %esi
	jle	.LBB12_18
# %bb.7:                                # %.lr.ph97.preheader
                                        #   in Loop: Header=BB12_6 Depth=1
	movl	$16, %eax
.LBB12_8:                               # %.lr.ph97
                                        #   Parent Loop BB12_6 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	-8(%r14,%rax), %rcx
	movsd	(%rcx,%r12,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, -8(%r13,%rax)
	movq	(%r14,%rax), %rcx
	movsd	(%rcx,%r12,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, (%r13,%rax)
	addq	$16, %rax
	cmpq	%rax, %rbx
	jne	.LBB12_8
# %bb.9:                                # %._crit_edge98
                                        #   in Loop: Header=BB12_6 Depth=1
	movq	%r13, %rdi
                                        # kill: def $esi killed $esi killed $rsi
	movl	12(%rsp), %edx                  # 4-byte Reload
	callq	_Z5four1Pdii
	movq	24(%rsp), %rsi                  # 8-byte Reload
	testl	%esi, %esi
	movq	64(%rsp), %rdx                  # 8-byte Reload
	movq	56(%rsp), %rdi                  # 8-byte Reload
	jle	.LBB12_19
# %bb.10:                               # %.lr.ph102.preheader
                                        #   in Loop: Header=BB12_6 Depth=1
	movl	$8, %eax
.LBB12_11:                              # %.lr.ph102
                                        #   Parent Loop BB12_6 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	-8(%r13,%rax,2), %xmm0          # xmm0 = mem[0],zero
	movq	(%rdi,%rax), %rcx
	movsd	%xmm0, (%rcx,%r12,8)
	movsd	(%r13,%rax,2), %xmm0            # xmm0 = mem[0],zero
	movq	(%rdx,%rax), %rcx
	movsd	%xmm0, (%rcx,%r12,8)
	addq	$8, %rax
	cmpq	%rax, %r15
	jne	.LBB12_11
	jmp	.LBB12_19
.LBB12_18:                              # %._crit_edge98.thread
                                        #   in Loop: Header=BB12_6 Depth=1
	movq	%r13, %rdi
                                        # kill: def $esi killed $esi killed $rsi
	movl	12(%rsp), %edx                  # 4-byte Reload
	callq	_Z5four1Pdii
	movq	24(%rsp), %rsi                  # 8-byte Reload
.LBB12_19:                              # %._crit_edge103
                                        #   in Loop: Header=BB12_6 Depth=1
	incq	%r12
	cmpq	16(%rsp), %r12                  # 8-byte Folded Reload
	jne	.LBB12_6
.LBB12_20:                              # %._crit_edge106
	addq	$8, %rbp
	movq	%rbp, %rdi
	callq	free
	addq	$8, %r13
	movq	%r13, %rdi
	callq	free
	movq	%r14, %rdi
	movl	$1, %esi
	movl	36(%rsp), %edx                  # 4-byte Reload
	movl	$1, %ecx
	addq	$72, %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	_Z12free_dmatrixPPdiiii         # TAILCALL
.Lfunc_end12:
	.size	_Z5four2PPdS0_S0_S0_iii, .Lfunc_end12-_Z5four2PPdS0_S0_S0_iii
	.cfi_endproc
                                        # -- End function
	.globl	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_ # -- Begin function _Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	.type	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_,@function
_Z8Mat_FFT2P12MatrixStructS0_S0_S0_:    # @_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	.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, %r15
	movq	%rdx, %r14
	movq	%rsi, 32(%rsp)                  # 8-byte Spill
	movq	%rdi, 24(%rsp)                  # 8-byte Spill
	movl	8(%rdx), %ebx
	movl	12(%rdx), %r12d
	movl	$1, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_Z7dmatrixiiii
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_Z7dmatrixiiii
	movq	%rax, %r13
	movl	$1, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_Z7dmatrixiiii
	movq	%rax, %rbp
	movl	$1, %edi
	movl	%ebx, 12(%rsp)                  # 4-byte Spill
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, 8(%rsp)                  # 4-byte Spill
	movl	%r12d, %ecx
	movq	16(%rsp), %r12                  # 8-byte Reload
	callq	_Z7dmatrixiiii
	movq	%rax, %rbx
	movl	8(%r14), %eax
	testl	%eax, %eax
	jle	.LBB13_6
# %bb.1:                                # %.preheader68.lr.ph
	movl	12(%r14), %ecx
	leal	1(%rcx), %edx
	incq	%rax
	decq	%rdx
	movl	$1, %esi
.LBB13_2:                               # %.preheader68
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_4 Depth 2
	testl	%ecx, %ecx
	jle	.LBB13_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB13_2 Depth=1
	movq	(%r14), %rdi
	movq	-8(%rdi,%rsi,8), %rdi
	movq	(%r12,%rsi,8), %r8
	movq	(%r15), %r9
	movq	-8(%r9,%rsi,8), %r9
	movq	(%r13,%rsi,8), %r10
	xorl	%r11d, %r11d
.LBB13_4:                               #   Parent Loop BB13_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rdi,%r11,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%r8,%r11,8)
	movsd	(%r9,%r11,8), %xmm0             # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%r10,%r11,8)
	incq	%r11
	cmpq	%r11, %rdx
	jne	.LBB13_4
.LBB13_5:                               # %._crit_edge
                                        #   in Loop: Header=BB13_2 Depth=1
	incq	%rsi
	cmpq	%rax, %rsi
	jne	.LBB13_2
.LBB13_6:                               # %._crit_edge73
	movl	$1, (%rsp)
	movq	%rbp, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movl	12(%rsp), %r15d                 # 4-byte Reload
	movl	%r15d, %r8d
	movl	8(%rsp), %r9d                   # 4-byte Reload
	callq	_Z5four2PPdS0_S0_S0_iii
	movl	8(%r14), %eax
	testl	%eax, %eax
	jle	.LBB13_12
# %bb.7:                                # %.preheader.lr.ph
	movl	12(%r14), %ecx
	leal	1(%rcx), %edx
	incq	%rax
	decq	%rdx
	movl	$1, %esi
.LBB13_8:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_10 Depth 2
	testl	%ecx, %ecx
	jle	.LBB13_11
# %bb.9:                                # %.lr.ph76
                                        #   in Loop: Header=BB13_8 Depth=1
	movq	(%rbp,%rsi,8), %rdi
	movq	24(%rsp), %r8                   # 8-byte Reload
	movq	(%r8), %r8
	movq	-8(%r8,%rsi,8), %r8
	movq	(%rbx,%rsi,8), %r9
	movq	32(%rsp), %r10                  # 8-byte Reload
	movq	(%r10), %r10
	movq	-8(%r10,%rsi,8), %r10
	xorl	%r11d, %r11d
.LBB13_10:                              #   Parent Loop BB13_8 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	8(%rdi,%r11,8), %xmm0           # xmm0 = mem[0],zero
	movsd	%xmm0, (%r8,%r11,8)
	movsd	8(%r9,%r11,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, (%r10,%r11,8)
	incq	%r11
	cmpq	%r11, %rdx
	jne	.LBB13_10
.LBB13_11:                              # %._crit_edge77
                                        #   in Loop: Header=BB13_8 Depth=1
	incq	%rsi
	cmpq	%rax, %rsi
	jne	.LBB13_8
.LBB13_12:                              # %._crit_edge80
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_Z12free_dmatrixPPdiiii
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_Z12free_dmatrixPPdiiii
	movq	%rbp, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_Z12free_dmatrixPPdiiii
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	addq	$40, %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	_Z12free_dmatrixPPdiiii         # TAILCALL
.Lfunc_end13:
	.size	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_, .Lfunc_end13-_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_ # -- Begin function _Z9Mat_IFFT2P12MatrixStructS0_S0_S0_
	.type	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_,@function
_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_:   # @_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	.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, %r15
	movq	%rdx, %r14
	movq	%rsi, 32(%rsp)                  # 8-byte Spill
	movq	%rdi, 24(%rsp)                  # 8-byte Spill
	movl	8(%rdx), %ebx
	movl	12(%rdx), %r12d
	movl	$1, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_Z7dmatrixiiii
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_Z7dmatrixiiii
	movq	%rax, %r13
	movl	$1, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_Z7dmatrixiiii
	movq	%rax, %rbp
	movl	$1, %edi
	movl	%ebx, 12(%rsp)                  # 4-byte Spill
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r12d, 8(%rsp)                  # 4-byte Spill
	movl	%r12d, %ecx
	movq	16(%rsp), %r12                  # 8-byte Reload
	callq	_Z7dmatrixiiii
	movq	%rax, %rbx
	movl	8(%r14), %eax
	testl	%eax, %eax
	jle	.LBB14_6
# %bb.1:                                # %.preheader72.lr.ph
	movl	12(%r14), %ecx
	leal	1(%rcx), %edx
	incq	%rax
	decq	%rdx
	movl	$1, %esi
.LBB14_2:                               # %.preheader72
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB14_4 Depth 2
	testl	%ecx, %ecx
	jle	.LBB14_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB14_2 Depth=1
	movq	(%r14), %rdi
	movq	-8(%rdi,%rsi,8), %rdi
	movq	(%r12,%rsi,8), %r8
	movq	(%r15), %r9
	movq	-8(%r9,%rsi,8), %r9
	movq	(%r13,%rsi,8), %r10
	xorl	%r11d, %r11d
.LBB14_4:                               #   Parent Loop BB14_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rdi,%r11,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%r8,%r11,8)
	movsd	(%r9,%r11,8), %xmm0             # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%r10,%r11,8)
	incq	%r11
	cmpq	%r11, %rdx
	jne	.LBB14_4
.LBB14_5:                               # %._crit_edge
                                        #   in Loop: Header=BB14_2 Depth=1
	incq	%rsi
	cmpq	%rax, %rsi
	jne	.LBB14_2
.LBB14_6:                               # %._crit_edge77
	movl	$-1, (%rsp)
	movq	%rbp, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movl	12(%rsp), %r15d                 # 4-byte Reload
	movl	%r15d, %r8d
	movl	8(%rsp), %r12d                  # 4-byte Reload
	movl	%r12d, %r9d
	callq	_Z5four2PPdS0_S0_S0_iii
	movl	8(%r14), %eax
	testl	%eax, %eax
	jle	.LBB14_12
# %bb.7:                                # %.preheader.lr.ph
	imull	%r15d, %r12d
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r12d, %xmm0
	movl	12(%r14), %ecx
	leal	1(%rcx), %edx
	incq	%rax
	decq	%rdx
	movl	$1, %esi
.LBB14_8:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB14_10 Depth 2
	testl	%ecx, %ecx
	jle	.LBB14_11
# %bb.9:                                # %.lr.ph80
                                        #   in Loop: Header=BB14_8 Depth=1
	movq	(%rbp,%rsi,8), %rdi
	movq	24(%rsp), %r8                   # 8-byte Reload
	movq	(%r8), %r8
	movq	-8(%r8,%rsi,8), %r8
	movq	(%rbx,%rsi,8), %r9
	movq	32(%rsp), %r10                  # 8-byte Reload
	movq	(%r10), %r10
	movq	-8(%r10,%rsi,8), %r10
	xorl	%r11d, %r11d
.LBB14_10:                              #   Parent Loop BB14_8 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	8(%rdi,%r11,8), %xmm1           # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%r8,%r11,8)
	movsd	8(%r9,%r11,8), %xmm1            # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%r10,%r11,8)
	incq	%r11
	cmpq	%r11, %rdx
	jne	.LBB14_10
.LBB14_11:                              # %._crit_edge81
                                        #   in Loop: Header=BB14_8 Depth=1
	incq	%rsi
	cmpq	%rax, %rsi
	jne	.LBB14_8
.LBB14_12:                              # %._crit_edge84
	movq	16(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_Z12free_dmatrixPPdiiii
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_Z12free_dmatrixPPdiiii
	movq	%rbp, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_Z12free_dmatrixPPdiiii
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	addq	$40, %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	_Z12free_dmatrixPPdiiii         # TAILCALL
.Lfunc_end14:
	.size	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_, .Lfunc_end14-_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z8Mat_CopyP12MatrixStructS0_iiiiii # -- Begin function _Z8Mat_CopyP12MatrixStructS0_iiiiii
	.type	_Z8Mat_CopyP12MatrixStructS0_iiiiii,@function
_Z8Mat_CopyP12MatrixStructS0_iiiiii:    # @_Z8Mat_CopyP12MatrixStructS0_iiiiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.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 %rbp, -16
                                        # kill: def $ecx killed $ecx def $rcx
                                        # kill: def $edx killed $edx def $rdx
	testl	%edx, %edx
	js	.LBB15_17
# %bb.1:
	testl	%ecx, %ecx
	js	.LBB15_17
# %bb.2:
	movl	8(%rdi), %ebx
	cmpl	%edx, %ebx
	jle	.LBB15_17
# %bb.3:
	movl	12(%rdi), %r11d
	cmpl	%ecx, %r11d
	jle	.LBB15_17
# %bb.4:
	testl	%r8d, %r8d
	js	.LBB15_16
# %bb.5:
	testl	%r9d, %r9d
	js	.LBB15_16
# %bb.6:
	cmpl	%r8d, 8(%rsi)
	jle	.LBB15_16
# %bb.7:
	cmpl	%r9d, 12(%rsi)
	jle	.LBB15_16
# %bb.8:
	movl	32(%rsp), %eax
	subl	%r8d, %eax
	js	.LBB15_16
# %bb.9:
	movl	40(%rsp), %r10d
	subl	%r9d, %r10d
	js	.LBB15_16
# %bb.10:
	leal	(%rax,%rdx), %ebp
	cmpl	%ebx, %ebp
	jge	.LBB15_16
# %bb.11:
	leal	(%r10,%rcx), %ebx
	cmpl	%r11d, %ebx
	jge	.LBB15_16
# %bb.12:                               # %.preheader60
	movl	%r9d, %r9d
	movl	%ecx, %ecx
	incl	%r10d
	movl	%r8d, %r8d
	shlq	$3, %r8
	addq	(%rsi), %r8
	movl	%edx, %edx
	shlq	$3, %rdx
	addq	(%rdi), %rdx
	incl	%eax
	xorl	%esi, %esi
	shlq	$3, %r9
	shlq	$3, %rcx
.LBB15_13:                              # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB15_14 Depth 2
	movq	(%r8,%rsi,8), %rdi
	addq	%r9, %rdi
	movq	(%rdx,%rsi,8), %r11
	addq	%rcx, %r11
	xorl	%ebx, %ebx
.LBB15_14:                              #   Parent Loop BB15_13 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rdi,%rbx,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, (%r11,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r10
	jne	.LBB15_14
# %bb.15:                               # %._crit_edge
                                        #   in Loop: Header=BB15_13 Depth=1
	incq	%rsi
	cmpq	%rax, %rsi
	jne	.LBB15_13
.LBB15_16:                              # %.loopexit
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB15_17:
	.cfi_def_cfa_offset 32
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	movl	$1, %edi
	callq	exit
.Lfunc_end15:
	.size	_Z8Mat_CopyP12MatrixStructS0_iiiiii, .Lfunc_end15-_Z8Mat_CopyP12MatrixStructS0_iiiiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z11Mat_ProductP12MatrixStructS0_S0_ # -- Begin function _Z11Mat_ProductP12MatrixStructS0_S0_
	.type	_Z11Mat_ProductP12MatrixStructS0_S0_,@function
_Z11Mat_ProductP12MatrixStructS0_S0_:   # @_Z11Mat_ProductP12MatrixStructS0_S0_
	.cfi_startproc
# %bb.0:
	movl	8(%rdi), %eax
	testl	%eax, %eax
	jle	.LBB16_7
# %bb.1:                                # %.preheader.lr.ph
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	12(%rdi), %ecx
	xorl	%r8d, %r8d
.LBB16_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB16_4 Depth 2
	testl	%ecx, %ecx
	jle	.LBB16_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB16_2 Depth=1
	movq	(%rsi), %r9
	movq	(%r9,%r8,8), %r9
	movq	(%rdx), %r10
	movq	(%r10,%r8,8), %r10
	movq	(%rdi), %r11
	movq	(%r11,%r8,8), %r11
	xorl	%ebx, %ebx
.LBB16_4:                               #   Parent Loop BB16_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r9,%rbx,8), %xmm0             # xmm0 = mem[0],zero
	mulsd	(%r10,%rbx,8), %xmm0
	movsd	%xmm0, (%r11,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	.LBB16_4
.LBB16_5:                               # %._crit_edge
                                        #   in Loop: Header=BB16_2 Depth=1
	incq	%r8
	cmpq	%rax, %r8
	jne	.LBB16_2
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
.LBB16_7:                               # %._crit_edge17
	retq
.Lfunc_end16:
	.size	_Z11Mat_ProductP12MatrixStructS0_S0_, .Lfunc_end16-_Z11Mat_ProductP12MatrixStructS0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z7Mat_SumP12MatrixStructS0_S0_ # -- Begin function _Z7Mat_SumP12MatrixStructS0_S0_
	.type	_Z7Mat_SumP12MatrixStructS0_S0_,@function
_Z7Mat_SumP12MatrixStructS0_S0_:        # @_Z7Mat_SumP12MatrixStructS0_S0_
	.cfi_startproc
# %bb.0:
	movl	8(%rdi), %eax
	testl	%eax, %eax
	jle	.LBB17_7
# %bb.1:                                # %.preheader.lr.ph
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	12(%rdi), %ecx
	xorl	%r8d, %r8d
.LBB17_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB17_4 Depth 2
	testl	%ecx, %ecx
	jle	.LBB17_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB17_2 Depth=1
	movq	(%rsi), %r9
	movq	(%r9,%r8,8), %r9
	movq	(%rdx), %r10
	movq	(%r10,%r8,8), %r10
	movq	(%rdi), %r11
	movq	(%r11,%r8,8), %r11
	xorl	%ebx, %ebx
.LBB17_4:                               #   Parent Loop BB17_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r9,%rbx,8), %xmm0             # xmm0 = mem[0],zero
	addsd	(%r10,%rbx,8), %xmm0
	movsd	%xmm0, (%r11,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	.LBB17_4
.LBB17_5:                               # %._crit_edge
                                        #   in Loop: Header=BB17_2 Depth=1
	incq	%r8
	cmpq	%rax, %r8
	jne	.LBB17_2
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
.LBB17_7:                               # %._crit_edge17
	retq
.Lfunc_end17:
	.size	_Z7Mat_SumP12MatrixStructS0_S0_, .Lfunc_end17-_Z7Mat_SumP12MatrixStructS0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z13Mat_SubstractP12MatrixStructS0_S0_ # -- Begin function _Z13Mat_SubstractP12MatrixStructS0_S0_
	.type	_Z13Mat_SubstractP12MatrixStructS0_S0_,@function
_Z13Mat_SubstractP12MatrixStructS0_S0_: # @_Z13Mat_SubstractP12MatrixStructS0_S0_
	.cfi_startproc
# %bb.0:
	movl	8(%rdi), %eax
	testl	%eax, %eax
	jle	.LBB18_7
# %bb.1:                                # %.preheader.lr.ph
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	12(%rdi), %ecx
	xorl	%r8d, %r8d
.LBB18_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB18_4 Depth 2
	testl	%ecx, %ecx
	jle	.LBB18_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB18_2 Depth=1
	movq	(%rsi), %r9
	movq	(%r9,%r8,8), %r9
	movq	(%rdx), %r10
	movq	(%r10,%r8,8), %r10
	movq	(%rdi), %r11
	movq	(%r11,%r8,8), %r11
	xorl	%ebx, %ebx
.LBB18_4:                               #   Parent Loop BB18_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r9,%rbx,8), %xmm0             # xmm0 = mem[0],zero
	subsd	(%r10,%rbx,8), %xmm0
	movsd	%xmm0, (%r11,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	.LBB18_4
.LBB18_5:                               # %._crit_edge
                                        #   in Loop: Header=BB18_2 Depth=1
	incq	%r8
	cmpq	%rax, %r8
	jne	.LBB18_2
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
.LBB18_7:                               # %._crit_edge17
	retq
.Lfunc_end18:
	.size	_Z13Mat_SubstractP12MatrixStructS0_S0_, .Lfunc_end18-_Z13Mat_SubstractP12MatrixStructS0_S0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
.LCPI19_0:
	.quad	0x0000000000000000              # double 0
	.text
	.globl	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
	.type	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii,@function
_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii: # @_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
	.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	$408, %rsp                      # imm = 0x198
	.cfi_def_cfa_offset 464
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
                                        # kill: def $r8d killed $r8d def $r8
	movsd	%xmm1, 344(%rsp)                # 8-byte Spill
	movsd	%xmm0, 336(%rsp)                # 8-byte Spill
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, 328(%rsp)                 # 8-byte Spill
	movq	%rdi, 320(%rsp)                 # 8-byte Spill
	movl	464(%rsp), %eax
	movq	%rax, 312(%rsp)                 # 8-byte Spill
	movq	%r8, %rax
	movq	%r8, 64(%rsp)                   # 8-byte Spill
	movl	%r9d, 28(%rsp)                  # 4-byte Spill
	imull	%r9d, %eax
	addl	%eax, %eax
	movl	%eax, 92(%rsp)                  # 4-byte Spill
	movslq	%eax, %rdi
	shlq	$3, %rdi
	callq	malloc
	movq	%rax, 96(%rsp)                  # 8-byte Spill
	movl	8(%r14), %eax
	movl	12(%r14), %r13d
	movq	%rax, 56(%rsp)                  # 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r12d, %xmm1
	addsd	%xmm1, %xmm1
	movsd	%xmm1, 8(%rsp)                  # 8-byte Spill
	addsd	%xmm1, %xmm0
	callq	log2
	callq	ceil@PLT
	callq	exp2@PLT
	cvttsd2si	%xmm0, %ebp
	xorps	%xmm0, %xmm0
	cvtsi2sdl	12(%r14), %xmm0
	addsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	callq	log2
	callq	ceil@PLT
	callq	exp2@PLT
	cvttsd2si	%xmm0, %edx
	leaq	400(%rsp), %rbx
	movq	%rbx, %rdi
	movl	%ebp, 80(%rsp)                  # 4-byte Spill
	movl	%ebp, %esi
	movl	%edx, 72(%rsp)                  # 4-byte Spill
	callq	_Z12CreateMatrixPP12MatrixStructii
	movq	%r14, %r15
	movl	12(%r14), %ebp
	leal	(%r12,%rbp), %eax
	movl	%eax, 32(%rsp)                  # 4-byte Spill
	leal	(%r12,%r12), %eax
	movq	%rax, 40(%rsp)                  # 8-byte Spill
	leal	(%rbp,%r12,2), %eax
	movq	(%rbx), %rcx
	movq	%rcx, 16(%rsp)                  # 8-byte Spill
	movl	%r12d, %ecx
	movslq	%eax, %rdx
	testl	%r12d, %r12d
	jle	.LBB19_11
# %bb.1:                                # %.preheader293.lr.ph
	leal	-1(%r12), %edi
	movslq	32(%rsp), %r8                   # 4-byte Folded Reload
	movq	(%r15), %rax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %r10
	leaq	(,%rdi,8), %r9
	xorl	%ebx, %ebx
.LBB19_2:                               # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB19_3 Depth 2
                                        #     Child Loop BB19_6 Depth 2
                                        #     Child Loop BB19_9 Depth 2
	movq	%rdi, %rax
	subq	%rbx, %rax
	movq	(%r10,%rbx,8), %r14
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movq	(%rsi,%rax,8), %rsi
	addq	%r9, %rsi
	xorl	%eax, %eax
.LBB19_3:                               #   Parent Loop BB19_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%r14,%rax,8)
	incq	%rax
	addq	$-8, %rsi
	cmpq	%rax, %rcx
	jne	.LBB19_3
# %bb.4:                                # %.preheader292
                                        #   in Loop: Header=BB19_2 Depth=1
	movq	%rbx, %r14
	notq	%r14
	testl	%ebp, %ebp
	jle	.LBB19_7
# %bb.5:                                # %.lr.ph296
                                        #   in Loop: Header=BB19_2 Depth=1
	leaq	(,%r14,8), %rax
	addq	(%r15), %rax
	movq	(%rax,%rcx,8), %rsi
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	movq	%rcx, %r11
.LBB19_6:                               #   Parent Loop BB19_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%rax,%r11,8)
	incq	%r11
	addq	$8, %rsi
	cmpq	%r8, %r11
	jl	.LBB19_6
.LBB19_7:                               # %.preheader291
                                        #   in Loop: Header=BB19_2 Depth=1
	cmpl	%r12d, 40(%rsp)                 # 4-byte Folded Reload
	jle	.LBB19_10
# %bb.8:                                # %.lr.ph298
                                        #   in Loop: Header=BB19_2 Depth=1
	shlq	$3, %r14
	addq	(%r15), %r14
	movq	(%r14,%rcx,8), %r14
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rsi
	movl	%ebp, %eax
	movq	%r8, %r11
.LBB19_9:                               #   Parent Loop BB19_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cltq
	movsd	-8(%r14,%rax,8), %xmm0          # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi,%r11,8)
	incq	%r11
	decl	%eax
	cmpq	%rdx, %r11
	jl	.LBB19_9
.LBB19_10:                              # %._crit_edge
                                        #   in Loop: Header=BB19_2 Depth=1
	incq	%rbx
	cmpq	%rcx, %rbx
	jne	.LBB19_2
.LBB19_11:                              # %._crit_edge300
	movl	8(%r15), %eax
	leal	(%rax,%r12), %esi
	movl	%esi, 8(%rsp)                   # 4-byte Spill
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	testl	%eax, %eax
	jle	.LBB19_23
# %bb.12:                               # %.preheader290.lr.ph
	movslq	%r12d, %r9
	movslq	32(%rsp), %rdi                  # 4-byte Folded Reload
	movslq	8(%rsp), %rax                   # 4-byte Folded Reload
	leaq	-8(,%r9,8), %rbx
	movq	%r9, %r14
.LBB19_13:                              # %.preheader290
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB19_15 Depth 2
                                        #     Child Loop BB19_18 Depth 2
                                        #     Child Loop BB19_21 Depth 2
	testl	%r12d, %r12d
	movq	16(%rsp), %r11                  # 8-byte Reload
	jle	.LBB19_16
# %bb.14:                               # %.lr.ph302
                                        #   in Loop: Header=BB19_13 Depth=1
	movq	(%r15), %r8
	movq	%r14, %r10
	subq	%r9, %r10
	movq	(%r11), %rsi
	movq	(%rsi,%r14,8), %rsi
	movq	(%r8,%r10,8), %r8
	addq	%rbx, %r8
	xorl	%r10d, %r10d
.LBB19_15:                              #   Parent Loop BB19_13 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r8), %xmm0                    # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi,%r10,8)
	incq	%r10
	addq	$-8, %r8
	cmpq	%r10, %rcx
	jne	.LBB19_15
.LBB19_16:                              # %.preheader289
                                        #   in Loop: Header=BB19_13 Depth=1
	testl	%ebp, %ebp
	jle	.LBB19_19
# %bb.17:                               # %.lr.ph304
                                        #   in Loop: Header=BB19_13 Depth=1
	movq	(%r15), %rsi
	movq	%r14, %r8
	subq	%r9, %r8
	movq	(%rsi,%r8,8), %rsi
	movq	(%r11), %r8
	movq	(%r8,%r14,8), %r8
	movq	%r9, %r10
.LBB19_18:                              #   Parent Loop BB19_13 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%r8,%r10,8)
	incq	%r10
	addq	$8, %rsi
	cmpq	%rdi, %r10
	jl	.LBB19_18
.LBB19_19:                              # %.preheader288
                                        #   in Loop: Header=BB19_13 Depth=1
	cmpl	%r12d, 40(%rsp)                 # 4-byte Folded Reload
	jle	.LBB19_22
# %bb.20:                               # %.lr.ph306
                                        #   in Loop: Header=BB19_13 Depth=1
	movq	(%r15), %rsi
	movq	%r14, %r8
	subq	%r9, %r8
	movq	(%rsi,%r8,8), %rsi
	movq	16(%rsp), %r8                   # 8-byte Reload
	movq	(%r8), %r8
	movq	(%r8,%r14,8), %r8
	movl	%ebp, %r11d
	movq	%rdi, %r10
.LBB19_21:                              #   Parent Loop BB19_13 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movslq	%r11d, %r11
	movsd	-8(%rsi,%r11,8), %xmm0          # xmm0 = mem[0],zero
	movsd	%xmm0, (%r8,%r10,8)
	incq	%r10
	decl	%r11d
	cmpq	%rdx, %r10
	jl	.LBB19_21
.LBB19_22:                              # %._crit_edge307
                                        #   in Loop: Header=BB19_13 Depth=1
	incq	%r14
	cmpq	%rax, %r14
	jl	.LBB19_13
.LBB19_23:                              # %._crit_edge311
	cmpl	%r12d, 40(%rsp)                 # 4-byte Folded Reload
	jle	.LBB19_34
# %bb.24:                               # %.preheader287.lr.ph
	movslq	32(%rsp), %r10                  # 4-byte Folded Reload
	movslq	%r12d, %r9
	movslq	8(%rsp), %r8                    # 4-byte Folded Reload
	movq	48(%rsp), %rsi                  # 8-byte Reload
	movl	%esi, %eax
	addl	40(%rsp), %eax                  # 4-byte Folded Reload
	leal	(%r12,%rsi,2), %edi
	cltq
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	(%r15), %rax
	movq	16(%rsp), %rsi                  # 8-byte Reload
	movq	(%rsi), %rbx
	movq	%r9, 32(%rsp)                   # 8-byte Spill
	leaq	-8(,%r9,8), %rsi
	movq	%rsi, 48(%rsp)                  # 8-byte Spill
.LBB19_25:                              # %.preheader287
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB19_27 Depth 2
                                        #     Child Loop BB19_30 Depth 2
                                        #     Child Loop BB19_32 Depth 2
	testl	%r12d, %r12d
	jle	.LBB19_28
# %bb.26:                               # %.lr.ph313
                                        #   in Loop: Header=BB19_25 Depth=1
	movq	(%r15), %rsi
	movl	%edi, %r9d
	subl	%r8d, %r9d
	movslq	%r9d, %r11
	movq	16(%rsp), %r9                   # 8-byte Reload
	movq	(%r9), %r9
	movq	(%r9,%r8,8), %r9
	movq	-8(%rsi,%r11,8), %r14
	addq	48(%rsp), %r14                  # 8-byte Folded Reload
	xorl	%esi, %esi
.LBB19_27:                              #   Parent Loop BB19_25 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r14), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%r9,%rsi,8)
	incq	%rsi
	addq	$-8, %r14
	cmpq	%rsi, %rcx
	jne	.LBB19_27
.LBB19_28:                              # %.preheader286
                                        #   in Loop: Header=BB19_25 Depth=1
	testl	%ebp, %ebp
	jle	.LBB19_31
# %bb.29:                               # %.lr.ph315
                                        #   in Loop: Header=BB19_25 Depth=1
	movq	(%r15), %rsi
	movl	%edi, %r9d
	subl	%r8d, %r9d
	movslq	%r9d, %r9
	movq	-8(%rsi,%r9,8), %r9
	movq	16(%rsp), %rsi                  # 8-byte Reload
	movq	(%rsi), %rsi
	movq	(%rsi,%r8,8), %r11
	movq	32(%rsp), %rsi                  # 8-byte Reload
.LBB19_30:                              #   Parent Loop BB19_25 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r9), %xmm0                    # xmm0 = mem[0],zero
	movsd	%xmm0, (%r11,%rsi,8)
	incq	%rsi
	addq	$8, %r9
	cmpq	%r10, %rsi
	jl	.LBB19_30
.LBB19_31:                              # %.lr.ph317
                                        #   in Loop: Header=BB19_25 Depth=1
	movl	%edi, %esi
	subl	%r8d, %esi
	movslq	%esi, %rsi
	movq	-8(%rax,%rsi,8), %r9
	movq	(%rbx,%r8,8), %r14
	movl	%ebp, %r11d
	movq	%r10, %rsi
.LBB19_32:                              #   Parent Loop BB19_25 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movslq	%r11d, %r11
	movsd	-8(%r9,%r11,8), %xmm0           # xmm0 = mem[0],zero
	movsd	%xmm0, (%r14,%rsi,8)
	incq	%rsi
	decl	%r11d
	cmpq	%rdx, %rsi
	jl	.LBB19_32
# %bb.33:                               # %._crit_edge318
                                        #   in Loop: Header=BB19_25 Depth=1
	incq	%r8
	cmpq	8(%rsp), %r8                    # 8-byte Folded Reload
	jl	.LBB19_25
.LBB19_34:                              # %._crit_edge324
	leaq	384(%rsp), %rbx
	movq	%rbx, %rdi
	movl	80(%rsp), %ebp                  # 4-byte Reload
	movl	%ebp, %esi
	movl	72(%rsp), %r15d                 # 4-byte Reload
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	376(%rsp), %r14
	movq	%r14, %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	392(%rsp), %r12
	movq	%r12, %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	movq	(%rbx), %rdi
	movq	(%r14), %rsi
	movq	(%r12), %rcx
	movq	%rdi, 104(%rsp)                 # 8-byte Spill
	movq	%rsi, 120(%rsp)                 # 8-byte Spill
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movq	%rcx, 112(%rsp)                 # 8-byte Spill
	callq	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	movq	40(%rsp), %r14                  # 8-byte Reload
	movl	%r14d, %ebx
	orl	$1, %ebx
	leaq	208(%rsp), %rdi
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	200(%rsp), %rdi
	movl	%ebx, %esi
	movl	%ebx, %edx
	movq	%r14, %rbx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	192(%rsp), %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	184(%rsp), %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	176(%rsp), %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	168(%rsp), %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	160(%rsp), %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	152(%rsp), %rdi
	movl	%ebp, %esi
	movl	%r15d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	368(%rsp), %rdi
	movq	56(%rsp), %rsi                  # 8-byte Reload
                                        # kill: def $esi killed $esi killed $rsi
	movl	%r13d, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	cmpl	$0, 64(%rsp)                    # 4-byte Folded Reload
	jle	.LBB19_50
# %bb.35:                               # %.preheader284.lr.ph
	movq	208(%rsp), %rax
	movq	%rax, 304(%rsp)                 # 8-byte Spill
	movq	200(%rsp), %rax
	movq	%rax, 296(%rsp)                 # 8-byte Spill
	movq	176(%rsp), %rax
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	movq	168(%rsp), %rax
	movq	%rax, 288(%rsp)                 # 8-byte Spill
	movq	160(%rsp), %rax
	movq	%rax, 280(%rsp)                 # 8-byte Spill
	movq	152(%rsp), %rax
	movq	%rax, 272(%rsp)                 # 8-byte Spill
	movq	192(%rsp), %rax
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	184(%rsp), %rax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	368(%rsp), %rax
	movq	%rax, 240(%rsp)                 # 8-byte Spill
	movq	56(%rsp), %rcx                  # 8-byte Reload
	movl	%ecx, %eax
	imull	%r13d, %eax
	cvtsi2sd	%eax, %xmm1
	leal	(%rbx,%rcx), %eax
	decl	%eax
	movq	%rax, 264(%rsp)                 # 8-byte Spill
	leal	-1(%rbx,%r13), %eax
	movq	%rax, 256(%rsp)                 # 8-byte Spill
	movl	64(%rsp), %eax                  # 4-byte Reload
	movq	%rax, 224(%rsp)                 # 8-byte Spill
	movslq	28(%rsp), %rax                  # 4-byte Folded Reload
	movq	%rax, 216(%rsp)                 # 8-byte Spill
	movl	%eax, %eax
	movq	%rax, 248(%rsp)                 # 8-byte Spill
	xorpd	%xmm0, %xmm0
	movsd	%xmm1, 144(%rsp)                # 8-byte Spill
	divsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 232(%rsp)                # 8-byte Spill
	xorl	%eax, %eax
.LBB19_36:                              # %.preheader284
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB19_38 Depth 2
                                        #       Child Loop BB19_40 Depth 3
                                        #         Child Loop BB19_42 Depth 4
                                        #       Child Loop BB19_46 Depth 3
                                        #         Child Loop BB19_48 Depth 4
	movq	%rax, %rsi
	incq	%rax
	movq	%rax, 136(%rsp)                 # 8-byte Spill
	cmpl	$0, 28(%rsp)                    # 4-byte Folded Reload
	jle	.LBB19_59
# %bb.37:                               # %.lr.ph343
                                        #   in Loop: Header=BB19_36 Depth=1
	movq	%rsi, %rax
	imulq	216(%rsp), %rax                 # 8-byte Folded Reload
	movq	64(%rsp), %rcx                  # 8-byte Reload
	addl	%esi, %ecx
	imull	28(%rsp), %ecx                  # 4-byte Folded Reload
	movslq	%ecx, %rcx
	movq	96(%rsp), %rdx                  # 8-byte Reload
	leaq	(%rdx,%rax,8), %rax
	movq	%rax, 128(%rsp)                 # 8-byte Spill
	leaq	(%rdx,%rcx,8), %rax
	movq	%rax, 352(%rsp)                 # 8-byte Spill
	imull	56(%rsp), %esi                  # 4-byte Folded Reload
	movq	%rsi, 360(%rsp)                 # 8-byte Spill
	xorl	%ecx, %ecx
.LBB19_38:                              #   Parent Loop BB19_36 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB19_40 Depth 3
                                        #         Child Loop BB19_42 Depth 4
                                        #       Child Loop BB19_46 Depth 3
                                        #         Child Loop BB19_48 Depth 4
	movq	%rcx, 72(%rsp)                  # 8-byte Spill
	incq	%rcx
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movq	312(%rsp), %r15                 # 8-byte Reload
	movq	%r15, %rdi
	movq	304(%rsp), %r12                 # 8-byte Reload
	movq	%r12, %rsi
	movq	144(%rsp), %rdx                 # 8-byte Reload
                                        # kill: def $edx killed $edx killed $rdx
	movq	%rcx, 88(%rsp)                  # 8-byte Spill
                                        # kill: def $ecx killed $ecx killed $rcx
	movsd	344(%rsp), %xmm0                # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	352(%rsp), %xmm1                # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movq	72(%rsp), %r8                   # 8-byte Reload
                                        # kill: def $r8d killed $r8d killed $r8
	movl	36(%rsp), %r9d                  # 4-byte Reload
	pushq	320(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	_Z5GaborP12MatrixStructS0_iiddiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	32(%rsp), %rdi                  # 8-byte Reload
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	.cfi_adjust_cfa_offset 8
	pushq	%rbx
	.cfi_adjust_cfa_offset 8
	callq	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	288(%rsp), %r15                 # 8-byte Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	.cfi_adjust_cfa_offset 8
	pushq	%rbx
	.cfi_adjust_cfa_offset 8
	callq	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	48(%rsp), %r14                  # 8-byte Reload
	movq	280(%rsp), %rbx                 # 8-byte Reload
	movq	%rbx, %rdi
	movq	272(%rsp), %rbp                 # 8-byte Reload
	movq	%rbp, %rsi
	movq	32(%rsp), %rdx                  # 8-byte Reload
	movq	%r15, %rcx
	callq	_Z8Mat_FFT2P12MatrixStructS0_S0_S0_
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	104(%rsp), %r15                 # 8-byte Reload
	movq	%r15, %rdx
	callq	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movq	%rbp, %rsi
	movq	120(%rsp), %r12                 # 8-byte Reload
	movq	%r12, %rdx
	callq	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	16(%rsp), %rdi                  # 8-byte Reload
	movq	%r14, %rsi
	movq	8(%rsp), %rdx                   # 8-byte Reload
	callq	_Z13Mat_SubstractP12MatrixStructS0_S0_
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movq	%rbp, %rsi
	movq	%r15, %rdx
	movq	8(%rsp), %rbx                   # 8-byte Reload
	callq	_Z11Mat_ProductP12MatrixStructS0_S0_
	movq	112(%rsp), %r12                 # 8-byte Reload
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_Z7Mat_SumP12MatrixStructS0_S0_
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movq	%r12, %rcx
	callq	_Z9Mat_IFFT2P12MatrixStructS0_S0_S0_
	movq	56(%rsp), %r9                   # 8-byte Reload
	testl	%r9d, %r9d
	jle	.LBB19_54
# %bb.39:                               # %.preheader283.preheader
                                        #   in Loop: Header=BB19_38 Depth=2
	xorpd	%xmm1, %xmm1
	xorl	%eax, %eax
	movq	16(%rsp), %r8                   # 8-byte Reload
	movq	40(%rsp), %rbx                  # 8-byte Reload
	movq	240(%rsp), %r10                 # 8-byte Reload
	movq	72(%rsp), %r15                  # 8-byte Reload
.LBB19_40:                              # %.preheader283
                                        #   Parent Loop BB19_36 Depth=1
                                        #     Parent Loop BB19_38 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB19_42 Depth 4
	testl	%r13d, %r13d
	jle	.LBB19_43
# %bb.41:                               # %.lr.ph327
                                        #   in Loop: Header=BB19_40 Depth=3
	movq	(%r8), %rcx
	movq	(%rcx,%rax,8), %rcx
	movq	(%r12), %rdx
	movq	(%rdx,%rax,8), %rdx
	movq	(%r10), %rsi
	movq	(%rsi,%rax,8), %rsi
	xorl	%edi, %edi
.LBB19_42:                              #   Parent Loop BB19_36 Depth=1
                                        #     Parent Loop BB19_38 Depth=2
                                        #       Parent Loop BB19_40 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	movsd	(%rcx,%rdi,8), %xmm0            # xmm0 = mem[0],zero
	mulsd	%xmm0, %xmm0
	movsd	(%rdx,%rdi,8), %xmm2            # xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm2
	addsd	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	sqrtsd	%xmm2, %xmm0
	movsd	%xmm0, (%rsi,%rdi,8)
	addsd	%xmm0, %xmm1
	incq	%rdi
	cmpq	%rdi, %r13
	jne	.LBB19_42
.LBB19_43:                              # %._crit_edge328
                                        #   in Loop: Header=BB19_40 Depth=3
	incq	%rax
	cmpq	%r9, %rax
	jne	.LBB19_40
# %bb.44:                               # %._crit_edge331
                                        #   in Loop: Header=BB19_38 Depth=2
	divsd	144(%rsp), %xmm1                # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movq	128(%rsp), %rax                 # 8-byte Reload
	movsd	%xmm0, (%rax,%r15,8)
	xorps	%xmm0, %xmm0
	testl	%r9d, %r9d
	jle	.LBB19_55
# %bb.45:                               # %.preheader282.preheader
                                        #   in Loop: Header=BB19_38 Depth=2
	xorl	%eax, %eax
.LBB19_46:                              # %.preheader282
                                        #   Parent Loop BB19_36 Depth=1
                                        #     Parent Loop BB19_38 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB19_48 Depth 4
	testl	%r13d, %r13d
	jle	.LBB19_49
# %bb.47:                               # %.lr.ph335
                                        #   in Loop: Header=BB19_46 Depth=3
	movq	(%r10), %rcx
	movq	(%rcx,%rax,8), %rcx
	xorl	%edx, %edx
.LBB19_48:                              #   Parent Loop BB19_36 Depth=1
                                        #     Parent Loop BB19_38 Depth=2
                                        #       Parent Loop BB19_46 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	movsd	(%rcx,%rdx,8), %xmm2            # xmm2 = mem[0],zero
	subsd	%xmm1, %xmm2
	mulsd	%xmm2, %xmm2
	addsd	%xmm2, %xmm0
	incq	%rdx
	cmpq	%rdx, %r13
	jne	.LBB19_48
.LBB19_49:                              # %._crit_edge336
                                        #   in Loop: Header=BB19_46 Depth=3
	incq	%rax
	cmpq	%r9, %rax
	jne	.LBB19_46
	jmp	.LBB19_55
.LBB19_54:                              # %._crit_edge331.thread
                                        #   in Loop: Header=BB19_38 Depth=2
	movsd	232(%rsp), %xmm0                # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movq	128(%rsp), %rax                 # 8-byte Reload
	movq	72(%rsp), %r15                  # 8-byte Reload
	movsd	%xmm0, (%rax,%r15,8)
	xorpd	%xmm0, %xmm0
	movq	40(%rsp), %rbx                  # 8-byte Reload
.LBB19_55:                              # %._crit_edge340
                                        #   in Loop: Header=BB19_38 Depth=2
	divsd	144(%rsp), %xmm0                # 8-byte Folded Reload
	ucomisd	.LCPI19_0(%rip), %xmm0
	jb	.LBB19_57
# %bb.56:                               #   in Loop: Header=BB19_38 Depth=2
	sqrtsd	%xmm0, %xmm0
	jmp	.LBB19_58
.LBB19_57:                              # %call.sqrt
                                        #   in Loop: Header=BB19_38 Depth=2
	callq	sqrt
.LBB19_58:                              # %._crit_edge340.split
                                        #   in Loop: Header=BB19_38 Depth=2
	cvtsd2ss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movq	352(%rsp), %rax                 # 8-byte Reload
	movsd	%xmm0, (%rax,%r15,8)
	imull	%r13d, %r15d
	movq	320(%rsp), %rdi                 # 8-byte Reload
	movq	48(%rsp), %rsi                  # 8-byte Reload
	movq	360(%rsp), %r14                 # 8-byte Reload
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movl	%ebx, %r9d
	movq	256(%rsp), %rbp                 # 8-byte Reload
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	movq	272(%rsp), %r12                 # 8-byte Reload
	pushq	%r12
	.cfi_adjust_cfa_offset 8
	callq	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	328(%rsp), %rdi                 # 8-byte Reload
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movl	%ebx, %r9d
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	pushq	%r12
	.cfi_adjust_cfa_offset 8
	callq	_Z8Mat_CopyP12MatrixStructS0_iiiiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	80(%rsp), %rax                  # 8-byte Reload
	movq	%rax, %rcx
	cmpq	248(%rsp), %rax                 # 8-byte Folded Reload
	jne	.LBB19_38
.LBB19_59:                              # %._crit_edge344
                                        #   in Loop: Header=BB19_36 Depth=1
	movq	136(%rsp), %rcx                 # 8-byte Reload
	movq	%rcx, %rax
	cmpq	224(%rsp), %rcx                 # 8-byte Folded Reload
	jne	.LBB19_36
.LBB19_50:                              # %.preheader
	movl	92(%rsp), %ebp                  # 4-byte Reload
	testl	%ebp, %ebp
	movq	96(%rsp), %r15                  # 8-byte Reload
	jle	.LBB19_53
# %bb.51:                               # %.lr.ph347.preheader
	movl	%ebp, %ebx
	xorl	%r14d, %r14d
.LBB19_52:                              # %.lr.ph347
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%r15,%r14,8), %xmm0            # xmm0 = mem[0],zero
	movl	$.L.str.10, %edi
	movb	$1, %al
	callq	printf
	incq	%r14
	cmpq	%r14, %rbx
	jne	.LBB19_52
.LBB19_53:                              # %._crit_edge348
	movl	$10, %edi
	callq	putchar@PLT
	movl	$_ZSt4cout, %edi
	movl	%ebp, %esi
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	208(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	200(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	192(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	184(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	176(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	168(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	160(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	152(%rsp), %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	104(%rsp), %rdi                 # 8-byte Reload
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	120(%rsp), %rdi                 # 8-byte Reload
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	16(%rsp), %rdi                  # 8-byte Reload
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	112(%rsp), %rdi                 # 8-byte Reload
	addq	$408, %rsp                      # imm = 0x198
	.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	_Z10FreeMatrixP12MatrixStruct   # TAILCALL
.Lfunc_end19:
	.size	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii, .Lfunc_end19-_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z5GaborP12MatrixStructS0_iiddiii
.LCPI20_0:
	.quad	0x3ff0000000000000              # double 1
.LCPI20_1:
	.quad	0xbff0000000000000              # double -1
.LCPI20_2:
	.quad	0x3ff2d6abe44afc43              # double 1.1774100225154747
.LCPI20_3:
	.quad	0xbff62e42fefa39ef              # double -1.3862943611198906
.LCPI20_4:
	.quad	0x400921fb54442d18              # double 3.1415926535897931
.LCPI20_5:
	.quad	0x3ff62e42fefa39ef              # double 1.3862943611198906
.LCPI20_6:
	.quad	0x401921fb54442d18              # double 6.2831853071795862
.LCPI20_7:
	.quad	0xbfe0000000000000              # double -0.5
	.text
	.globl	_Z5GaborP12MatrixStructS0_iiddiii
	.type	_Z5GaborP12MatrixStructS0_iiddiii,@function
_Z5GaborP12MatrixStructS0_iiddiii:      # @_Z5GaborP12MatrixStructS0_iiddiii
	.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	$136, %rsp
	.cfi_def_cfa_offset 192
	.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	%r9d, %r15d
	movl	%r8d, %r12d
	movapd	%xmm1, %xmm2
	movsd	%xmm1, 16(%rsp)                 # 8-byte Spill
	movl	%ecx, %ebp
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leal	-1(%r12), %eax
	cvtsi2sd	%eax, %xmm3
	divsd	%xmm0, %xmm2
	movsd	.LCPI20_0(%rip), %xmm1          # xmm1 = mem[0],zero
	divsd	%xmm3, %xmm1
	movapd	%xmm2, %xmm0
	callq	pow
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r12d, %xmm1
	movsd	%xmm0, 64(%rsp)                 # 8-byte Spill
	xorps	%xmm2, %xmm2
	cvtsi2sd	%r13d, %xmm2
	subsd	%xmm2, %xmm1
	movsd	%xmm1, 128(%rsp)                # 8-byte Spill
	callq	pow
	movsd	16(%rsp), %xmm2                 # 8-byte Reload
                                        # xmm2 = mem[0],zero
	divsd	%xmm0, %xmm2
	movsd	.LCPI20_1(%rip), %xmm1          # xmm1 = mem[0],zero
	movsd	64(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	%xmm0, %xmm1
	mulsd	%xmm2, %xmm1
	addsd	.LCPI20_0(%rip), %xmm0
	mulsd	.LCPI20_2(%rip), %xmm0
	divsd	%xmm0, %xmm1
	movsd	%xmm1, 40(%rsp)                 # 8-byte Spill
	mulsd	%xmm1, %xmm1
	movsd	%xmm1, (%rsp)                   # 8-byte Spill
	movsd	.LCPI20_3(%rip), %xmm0          # xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm0
	leal	(%r15,%r15), %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	movsd	%xmm2, 16(%rsp)                 # 8-byte Spill
	divsd	%xmm2, %xmm0
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movsd	.LCPI20_4(%rip), %xmm0          # xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	callq	tan
	movapd	%xmm0, %xmm2
	movsd	8(%rsp), %xmm1                  # 8-byte Reload
                                        # xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm1
	divsd	(%rsp), %xmm1                   # 8-byte Folded Reload
	movsd	.LCPI20_5(%rip), %xmm0          # xmm0 = mem[0],zero
	subsd	%xmm1, %xmm0
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	movsd	%xmm2, 32(%rsp)                 # 8-byte Spill
	jb	.LBB20_2
# %bb.1:
	sqrtsd	%xmm0, %xmm0
	jmp	.LBB20_3
.LBB20_2:                               # %call.sqrt
	callq	sqrt
.LBB20_3:                               # %.split
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	xorps	%xmm2, %xmm2
	cvtsi2sd	%r15d, %xmm2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ebp, %xmm0
	movsd	.LCPI20_4(%rip), %xmm1          # xmm1 = mem[0],zero
	divsd	%xmm2, %xmm1
	addsd	.LCPI20_1(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, (%rsp)                   # 8-byte Spill
	callq	cos
	movsd	%xmm0, 56(%rsp)                 # 8-byte Spill
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	sin
	movl	8(%rbx), %ecx
	testl	%ecx, %ecx
	js	.LBB20_19
# %bb.4:                                # %.preheader107.lr.ph
	movapd	%xmm0, %xmm4
	leal	-1(%rcx), %eax
	shrl	$31, %eax
	movq	%rcx, 72(%rsp)                  # 8-byte Spill
	addl	%ecx, %eax
	decl	%eax
	movl	%eax, %ecx
	sarl	%ecx
	xorl	%ebp, %ebp
	andl	$-2, %eax
	movsd	16(%rsp), %xmm2                 # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	%xmm2, %xmm0
	movsd	32(%rsp), %xmm6                 # 8-byte Reload
                                        # xmm6 = mem[0],zero
	mulsd	%xmm0, %xmm6
	divsd	24(%rsp), %xmm6                 # 8-byte Folded Reload
	movsd	.LCPI20_6(%rip), %xmm0          # xmm0 = mem[0],zero
	mulsd	%xmm0, %xmm6
	movsd	.LCPI20_0(%rip), %xmm3          # xmm3 = mem[0],zero
	movapd	%xmm3, %xmm5
	divsd	%xmm6, %xmm5
	movsd	40(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	movapd	%xmm3, %xmm6
	divsd	%xmm1, %xmm6
	movapd	%xmm6, %xmm1
	mulsd	%xmm0, %xmm1
	mulsd	%xmm5, %xmm1
	divsd	%xmm1, %xmm3
	movsd	%xmm3, 120(%rsp)                # 8-byte Spill
	mulsd	%xmm6, %xmm6
	movsd	%xmm6, 96(%rsp)                 # 8-byte Spill
	mulsd	%xmm5, %xmm5
	movsd	%xmm5, 104(%rsp)                # 8-byte Spill
	mulsd	%xmm0, %xmm2
	movsd	%xmm2, 16(%rsp)                 # 8-byte Spill
	movl	%ecx, %edx
	movq	%rdx, 88(%rsp)                  # 8-byte Spill
	movl	$0, %r13d
	movq	%rax, 80(%rsp)                  # 8-byte Spill
	cmovgl	%eax, %r13d
	orl	$1, %r13d
	movl	%ecx, 52(%rsp)                  # 4-byte Spill
	movl	%ecx, %r12d
	negl	%r12d
	movsd	56(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	%xmm4, 112(%rsp)                # 8-byte Spill
.LBB20_5:                               # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB20_6 Depth 2
	movl	%ebp, %eax
	subl	88(%rsp), %eax                  # 4-byte Folded Reload
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	mulsd	%xmm0, %xmm1
	movsd	%xmm1, 32(%rsp)                 # 8-byte Spill
	negl	%eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	mulsd	%xmm4, %xmm1
	movsd	%xmm1, 24(%rsp)                 # 8-byte Spill
	xorl	%r15d, %r15d
.LBB20_6:                               #   Parent Loop BB20_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	leal	(%r12,%r15), %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	mulsd	%xmm1, %xmm4
	addsd	32(%rsp), %xmm4                 # 8-byte Folded Reload
	movsd	%xmm4, 8(%rsp)                  # 8-byte Spill
	mulsd	%xmm0, %xmm1
	addsd	24(%rsp), %xmm1                 # 8-byte Folded Reload
	movsd	%xmm1, 40(%rsp)                 # 8-byte Spill
	movsd	64(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	128(%rsp), %xmm1                # 8-byte Reload
                                        # xmm1 = mem[0],zero
	callq	pow
	mulsd	120(%rsp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, (%rsp)                   # 8-byte Spill
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	mulsd	%xmm0, %xmm0
	divsd	96(%rsp), %xmm0                 # 8-byte Folded Reload
	movsd	40(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm1
	divsd	104(%rsp), %xmm1                # 8-byte Folded Reload
	addsd	%xmm0, %xmm1
	mulsd	.LCPI20_7(%rip), %xmm1
	movapd	%xmm1, %xmm0
	callq	exp
	mulsd	(%rsp), %xmm0                   # 8-byte Folded Reload
	movsd	%xmm0, (%rsp)                   # 8-byte Spill
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	mulsd	16(%rsp), %xmm0                 # 8-byte Folded Reload
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	callq	cos
	mulsd	(%rsp), %xmm0                   # 8-byte Folded Reload
	movq	(%rbx), %rax
	movq	(%rax,%rbp,8), %rax
	movsd	%xmm0, (%rax,%r15,8)
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	sin
	movsd	112(%rsp), %xmm4                # 8-byte Reload
                                        # xmm4 = mem[0],zero
	mulsd	(%rsp), %xmm0                   # 8-byte Folded Reload
	movq	(%r14), %rax
	movq	(%rax,%rbp,8), %rax
	movsd	%xmm0, (%rax,%r15,8)
	movsd	56(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	incq	%r15
	cmpq	%r15, %r13
	jne	.LBB20_6
# %bb.7:                                # %._crit_edge
                                        #   in Loop: Header=BB20_5 Depth=1
	incq	%rbp
	cmpq	%r13, %rbp
	jne	.LBB20_5
# %bb.8:                                # %._crit_edge112
	cmpl	$1, 192(%rsp)
	movq	80(%rsp), %r8                   # 8-byte Reload
	movq	72(%rsp), %r9                   # 8-byte Reload
	jne	.LBB20_19
# %bb.9:                                # %._crit_edge112
	testl	%r9d, %r9d
	js	.LBB20_19
# %bb.10:                               # %.preheader105.lr.ph
	xorl	%eax, %eax
	testl	%r8d, %r8d
	movl	$0, %ecx
	cmovgl	%r8d, %ecx
	orl	$1, %ecx
	movq	(%rbx), %rdx
	xorpd	%xmm0, %xmm0
.LBB20_11:                              # %.lr.ph116
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB20_12 Depth 2
	movq	(%rdx,%rax,8), %rsi
	xorl	%edi, %edi
.LBB20_12:                              #   Parent Loop BB20_11 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	addsd	(%rsi,%rdi,8), %xmm0
	incq	%rdi
	cmpq	%rdi, %r13
	jne	.LBB20_12
# %bb.13:                               # %._crit_edge117
                                        #   in Loop: Header=BB20_11 Depth=1
	incq	%rax
	cmpq	%rcx, %rax
	jne	.LBB20_11
# %bb.14:                               # %._crit_edge122
	testl	%r9d, %r9d
	js	.LBB20_19
# %bb.15:                               # %.preheader.lr.ph
	xorps	%xmm1, %xmm1
	cvtsi2sdl	52(%rsp), %xmm1         # 4-byte Folded Reload
	addsd	%xmm1, %xmm1
	addsd	.LCPI20_0(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	divsd	%xmm1, %xmm0
	xorl	%eax, %eax
	testl	%r8d, %r8d
	cmovlel	%eax, %r8d
	orl	$1, %r8d
	movq	(%rbx), %rcx
.LBB20_16:                              # %.lr.ph126
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB20_17 Depth 2
	movq	(%rcx,%rax,8), %rdx
	xorl	%esi, %esi
.LBB20_17:                              #   Parent Loop BB20_16 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rdx,%rsi,8), %xmm1            # xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	movsd	%xmm1, (%rdx,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %r8
	jne	.LBB20_17
# %bb.18:                               # %._crit_edge127
                                        #   in Loop: Header=BB20_16 Depth=1
	incq	%rax
	cmpq	%r8, %rax
	jne	.LBB20_16
.LBB20_19:                              # %.loopexit
	addq	$136, %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
.Lfunc_end20:
	.size	_Z5GaborP12MatrixStructS0_iiddiii, .Lfunc_end20-_Z5GaborP12MatrixStructS0_iiddiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI21_0:
	.quad	0x3fb999999999999a              # double 0.10000000000000001
.LCPI21_1:
	.quad	0x3fd999999999999a              # double 0.40000000000000002
	.text
	.globl	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	$40, %rsp
	.cfi_def_cfa_offset 96
	.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, %r12
	cmpl	$4, %edi
	jne	.LBB21_1
# %bb.3:
	movq	16(%r12), %rdi
	callq	atoi
	movl	%eax, %r14d
	movq	24(%r12), %rdi
	callq	atoi
	movl	%eax, %ebx
	imull	%r14d, %eax
	movslq	%eax, %r13
	movl	$1, %esi
	movq	%r13, %rdi
	callq	calloc
	movq	%rax, %r15
	movq	8(%r12), %rdi
	movl	$.L.str.13, %esi
	callq	fopen
	testq	%rax, %rax
	je	.LBB21_4
# %bb.5:
	movq	%rax, %rbp
	movl	$1, %esi
	movq	%r15, %rdi
	movq	%r13, %rdx
	movq	%rax, %rcx
	callq	fread
	movq	%rbp, %rdi
	callq	fclose
	leaq	32(%rsp), %r12
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	movq	(%r12), %r12
	testl	%r14d, %r14d
	jle	.LBB21_11
# %bb.6:                                # %.preheader.lr.ph
	movl	%r14d, %eax
	movl	%ebx, %ecx
	xorl	%edx, %edx
	xorl	%esi, %esi
.LBB21_7:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB21_9 Depth 2
	testl	%ebx, %ebx
	jle	.LBB21_10
# %bb.8:                                # %.lr.ph
                                        #   in Loop: Header=BB21_7 Depth=1
	movl	%edx, %edi
	addq	%r15, %rdi
	movq	(%r12), %r8
	movq	(%r8,%rsi,8), %r8
	xorl	%r9d, %r9d
.LBB21_9:                               #   Parent Loop BB21_7 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movzbl	(%rdi,%r9), %r10d
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r10d, %xmm0
	movsd	%xmm0, (%r8,%r9,8)
	incq	%r9
	cmpq	%r9, %rcx
	jne	.LBB21_9
.LBB21_10:                              # %._crit_edge
                                        #   in Loop: Header=BB21_7 Depth=1
	incq	%rsi
	addl	%ebx, %edx
	cmpq	%rax, %rsi
	jne	.LBB21_7
.LBB21_11:                              # %._crit_edge48
	movq	%r15, %rdi
	callq	free
	leal	(%r14,%r14,2), %ebp
	shll	$2, %ebx
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	movl	%ebp, %esi
	movl	%ebx, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	leaq	16(%rsp), %r15
	movq	%r15, %rdi
	movl	%ebp, %esi
	movl	%ebx, %edx
	callq	_Z12CreateMatrixPP12MatrixStructii
	movq	(%r14), %rbx
	movq	(%r15), %r14
	movl	$0, (%rsp)
	movsd	.LCPI21_0(%rip), %xmm0          # xmm0 = mem[0],zero
	movsd	.LCPI21_1(%rip), %xmm1          # xmm1 = mem[0],zero
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	$60, %ecx
	movl	$3, %r8d
	movl	$4, %r9d
	callq	_Z16GaborFilteredImgP12MatrixStructS0_S0_iddiii
	movq	%rbx, %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	movq	%r14, %rdi
	callq	_Z10FreeMatrixP12MatrixStruct
	xorl	%eax, %eax
	addq	$40, %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
.LBB21_1:
	.cfi_def_cfa_offset 96
	movq	(%r12), %rsi
	movl	$.L.str.12, %edi
	jmp	.LBB21_2
.LBB21_4:
	movq	8(%r12), %rsi
	movl	$.L.str.14, %edi
.LBB21_2:
	xorl	%eax, %eax
	callq	printf
	xorl	%edi, %edi
	callq	exit
.Lfunc_end21:
	.size	main, .Lfunc_end21-main
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB22_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB22_3
.LBB22_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB22_3:
	testq	%r14, %r14
	je	.LBB22_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB22_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB22_7
.LBB22_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB22_7:                               # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	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
	retq
.Lfunc_end22:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end22-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.type	.L.str.3,@object                # @.str.3
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.3:
	.asciz	"allocation failure in dvector()"
	.size	.L.str.3, 32

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"allocation failure 1 in matrix()"
	.size	.L.str.4, 33

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"allocation failure 2 in matrix()"
	.size	.L.str.5, 33

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"allocation failure 1 in dmatrix()"
	.size	.L.str.6, 34

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"allocation failure 2 in dmatrix()"
	.size	.L.str.7, 34

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"allocation failure in CreateMatrix()"
	.size	.L.str.8, 37

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

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"usage: %s <image_name> <height> <width>\n"
	.size	.L.str.12, 41

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

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"%s can not be open!\n"
	.size	.L.str.14, 21

	.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	"Numerical Recipes run-time error..."
	.size	.Lstr, 36

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"...now exiting to system..."
	.size	.Lstr.1, 28

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"matrix dimension error!"
	.size	.Lstr.2, 24

	.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 __gxx_personality_v0
	.addrsig_sym _ZSt4cout
	.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
