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

#define Uw 1.0
#define ERMAX 0.0000005
#define xp(i) (float)i*delta
#define yp(j) (float)j*delta
#define position(i,j) j*Nx+i

void Caller(void);
void CavityCompute(void);
int GetComputeCondition(void);
void ComputeMain(int check);
void ApplyIC(float *U, float *V, int Nx, int Ny);
void ApplyBCCPU(float *W, float *Wnew, float *Psi, int Nx, int Ny, float delta);
void VorticityCPU(float *U, float *V, float *W, float *Wnew, float *Psi, float dt, float delta, int ReN, int Nx, int Ny);
void StreamCPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta );
void VeloCalcCPU(float *U, float *V, float *Psi, int Nx, int Ny, float delta);
float ErckCPU(float *W, float *Wnew, int Nx, int Ny);
void CavityCPU(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt);
void CavityCUDA(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt);
void ParaWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny);
void TechWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny);
int main(int argc, char* argv[])
{
    Caller();
    return 0;
}
void Caller(void)
{
    CavityCompute();
    return;
}
int GetComputeCondition(void)
{
    int check;
    printf("1: CPU, 2: CUDA\n");
    printf("Compute What? ");
    scanf("%d", &check);
    return check;
}
void CavityCompute(void)
{
    int check = GetComputeCondition();
    if((check != 1 )&& (check != 2))
    {
        printf("Wrong Input, Compute CPU\n");
        check = 1;
    }
    ComputeMain(check);
    return;
}
void ComputeMain(int check)
{
    int ReN=1000, Nx=256, N, SIZE;
    int Ny=Nx;
    float Lx=1.0, Ly=1.0, delta, dt=0.000001;
    //printf("Input ReN: ");
    //scanf("%d", &ReN);
    //printf("Input Lx: ");
    //scanf("%f", &Lx);
    //printf("Input Ly: ");
    //scanf("%f", &Ly);
    //printf("Input Nx (X-Grid Counter): ");
    //scanf("%d", &Nx);
    //printf("Input dt: ");
    //scanf("%f", &dt);
    delta = Lx / ((float)(Nx-1));
    //Ny = (int)(Ly/delta+1.0);
    N = Nx*Ny;
    SIZE = sizeof(float)*N;
    printf("Reynolds Number: %d, X-Grid: %d, Y=Grid: %d, GridSize=%f, dt=%f\n", ReN, Nx, Ny, delta, dt);

    float *U, *V, *W, *Psi;
    U = (float *)malloc(SIZE);
    V = (float *)malloc(SIZE);
    W = (float *)malloc(SIZE);
    Psi=(float *)malloc(SIZE);

    if(check == 1)
        CavityCPU(U, V, W, Psi, Nx, Ny, delta, ReN, dt);
    else if(check ==2)
        CavityCUDA(U, V, W, Psi, Nx, Ny, delta, ReN, dt);
    ParaWriter(check, U, V, W, Psi, ReN, Lx, Ly, delta, dt, Nx, Ny);
    TechWriter(check, U, V, W, Psi, ReN, Lx, Ly, delta, dt, Nx, Ny);
    free(U);
    free(V);
    free(W);
    free(Psi);
}
void ApplyIC(float *U, float *V, int Nx, int Ny)
{
    int i,j;
    j = Ny-1;
    for( i = 0 ; i < Nx ; i++)
    {
        int pos = position(i,j);
        U[pos]=Uw;
    }
    return;
}
void ApplyBCCPU(float *W, float *Wnew, float *Psi, int Nx, int Ny, float delta)
{
    int i, j, pos, SIZE=sizeof(float)*Nx*Ny;
    for (i=0;i<Nx;i++)
    {
        j=0;
        pos = position(i,j);
        W[pos]=2.0*(Psi[pos]-Psi[pos+Nx])/(delta*delta);
        j=Ny-1;
        pos = position(i,j);
        W[pos] = 2.0*(Psi[pos] - Psi[pos-Nx]) / (delta*delta) - 2.0*Uw/delta;
    }
    for(j=0;j<Ny;j++)
    {
        i=0;
        pos=position(i,j);
        W[pos]=2.0*(Psi[pos]-Psi[pos+1])/(delta*delta);
        i=Nx-1;
        pos=position(i,j);
        W[pos]=2.0*(Psi[pos]-Psi[pos-1])/(delta*delta);
    }
    memcpy(Wnew, W, SIZE);
    return;
}
void VorticityCPU(float *U, float *V, float *W, float *Wnew, float *Psi, float dt, float delta, int ReN, int Nx, int Ny)
{
    int i, j, pos;
    float c = 0.5*dt/delta;
    float d = dt/((float)ReN*delta*delta);
    for(j=1;j<Ny-1;j++)
    {
        for(i=1;i<Nx-1;i++)
        {
            pos=position(i,j);
            Wnew[pos] = (1.0 - 4.0*d)*W[pos] + (d - c*U[pos + 1])*W[pos + 1] + (d + c*U[pos - 1])*W[pos - 1] + (d - c*V[pos + Nx])*W[pos + Nx] + (d + c*V[pos - Nx])*W[pos - Nx];
        }
    }
    return;
}
void StreamCPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta )
{
    int i,j,pos,SIZE=sizeof(float)*Nx*Ny;
    int iter=0;
    float error=1.0;
    do{
	    for (j = 1; j < Ny - 1; j++)
		{
			for (i = 1; i < Nx - 1; i++)
			{
				pos = position(i, j);
				Psinew[pos] = 0.25*(Psi[pos+1] + Psinew[pos-1]+ Psi[pos+Nx]+ Psinew[pos-Nx]+ delta*delta*Wnew[pos]);
			}
		}
		iter++;
        if(iter%100==0)
            error = ErckCPU(Psi, Psinew, Nx, Ny);
        memcpy(Psi, Psinew, SIZE);
    } while(error >= ERMAX);
    return;
}
void VeloCalcCPU(float *U, float *V, float *Psi, int Nx, int Ny, float delta)
{
    int i,j,pos;
	for (j = 1; j < Ny-1; j++)
	{
		for (i = 1; i < Nx-1; i++)
		{
			pos = position(i, j);
			U[pos] = (Psi[pos + Nx] - Psi[pos - Nx]) / (2.0*delta);
			V[pos] = -(Psi[pos + 1] - Psi[pos - 1]) / (2.0*delta);
		}
	}
    return;
}
float ErckCPU(float *W, float *Wnew, int Nx, int Ny)
{
    int i,j,pos;
    float error = 0.0;
	for (j = 1; j < Ny-1; j++)
	{
		for (i = 1; i < Nx-1; i++)
		{
			pos = position(i, j);
			float ER = abs(Wnew[pos] - W[pos]);
			error += ER*ER;
		}
	}
	error = sqrt(error / ((float)((Nx-2)*(Ny-2))));
	return error;
}
void CavityCPU(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt)
{
    float *Wnew,*Psinew;
    int N=Nx*Ny;
    int SIZE=sizeof(float)*N;
    Wnew = (float *)malloc(SIZE);
    Psinew = (float *)malloc(SIZE);
    memset(U, 0.0, SIZE);
    memset(V, 0.0, SIZE);
    memset(W, 0.0, SIZE);
    memset(Wnew, 0.0, SIZE);
    memset(Psi, 0.0, SIZE);
    memset(Psinew, 0.0, SIZE);
    float timer = 0.0, error = 1.0;
    int iter = 0;
    ApplyIC(U, V, Nx, Ny);
    do{
        ApplyBCCPU(W, Wnew, Psi, Nx, Ny, delta);
        VorticityCPU(U, V, W, Wnew, Psi, dt, delta, ReN, Nx, Ny);
        StreamCPU(Wnew, Psi, Psinew, Nx, Ny, delta);
        VeloCalcCPU(U, V, Psi, Nx, Ny, delta);
        iter++;
        timer += dt;
        if(iter%100==0)
            error = ErckCPU(W, Wnew, Nx, Ny);
        printf("Time: %.6f, Iter: %d, Error: %.9f\r", timer, iter, error);
        memcpy(W, Wnew, SIZE);
    } while(error >= ERMAX);
    printf("\n");
    free(Wnew);
    free(Psinew);
    return;
}
__global__ void ApplyBCGPU(float *W, float *Wnew, float *Psi, int Nx, int Ny, float delta)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    //printf("blockDim.x=%d, Ny=%d\n", blockDim.x, Ny);
    if(threadIdx.x == 0)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx+Nx])/(delta*delta);
        Wnew[idx]=W[idx];
        return;
    }
    if(threadIdx.x == Ny-1)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx-Nx])/(delta*delta)-2.0*Uw/delta;
        Wnew[idx]=W[idx];
        return;
    }
    if(blockIdx.x == 0)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx+1])/(delta*delta);
        Wnew[idx]=W[idx];
        return;
    }
    if(blockIdx.x == Nx-1)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx-1])/(delta*delta);
        Wnew[idx]=W[idx];
        return;
    }
}
__global__ void VorticityGPU(float *U, float *V, float *W, float *Wnew, float *Psi, float c, float d, int Nx, int Ny)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    if(threadIdx.x == 0)
        return;
    if(threadIdx.x==Ny-1)
        return;
    if(blockIdx.x==0)
        return;
    if(blockIdx.x==Nx-1)
        return;
    Wnew[idx]=(1.0-4.0*d)*W[idx]+(d-c*U[idx+1])*W[idx+1]+(d+c*U[idx-1])*W[idx-1]+(d-c*V[idx+Nx])*W[idx+Nx]+(d+c*V[idx-Nx])*W[idx-Nx];
    return;
}
__global__ void _StreamGPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    if(threadIdx.x ==0)
        return;
    if(threadIdx.x == Ny-1)
        return;
    if(blockIdx.x == 0)
        return;
    if(blockIdx.x == Nx-1)
        return;
    Psinew[idx] = 0.25*(Psi[idx+1]+Psi[idx-1]+Psi[idx+Nx]+Psi[idx-Nx]+delta*delta*Wnew[idx]);
    return;
}
float ErckGPU(float *W, float *Wnew, int Nx, int Ny)
{
    float error=0.0;
    float *W_h, *Wnew_h;
    int SIZE = sizeof(float)*Nx*Ny;
    W_h = (float *)malloc(SIZE);
    Wnew_h=(float *)malloc(SIZE);
    cudaMemcpy(W_h, W, SIZE, cudaMemcpyDeviceToHost);
    cudaMemcpy(Wnew_h, Wnew, SIZE, cudaMemcpyDeviceToHost);
    cudaThreadSynchronize();
    error = ErckCPU(W_h, Wnew_h, Nx, Ny);
    return error;
}
void StreamGPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta, dim3 bs, dim3 ts)
{
    int iter=0, SIZE = sizeof(float)*Nx*Ny;
    float error=1.0;
    do{
        iter++;
        _StreamGPU <<< bs, ts>>> (Wnew, Psi, Psinew, Nx, Ny, delta);
        cudaThreadSynchronize();
        if(iter%100==0)
            error = ErckGPU(Psi, Psinew, Nx, Ny);
        cudaMemcpy(Psi, Psinew, SIZE, cudaMemcpyDeviceToDevice);
    }while(error >= ERMAX);
    return;
}
__global__ void VeloCalcGPU(float *U, float *V, float *Psi, int Nx, int Ny, float delta)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    if(threadIdx.x == 0)
        return;
    if(threadIdx.x == Ny-1)
        return;
    if(blockIdx.x == 0)
        return;
    if(blockIdx.x == Nx-1)
        return;
    U[idx] = (Psi[idx+Nx]-Psi[idx-Nx])/(2.0*delta);
    V[idx] = -(Psi[idx+1]-Psi[idx-1])/(2.0*delta);
    return;
}
void CavityCUDA(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt)
{
    float *U_dev, *V_dev, *W_dev, *Psi_dev, *Wnew_dev, *Psinew_dev;
    float c = 0.5*dt/delta;
    float d = dt/((float)ReN*delta*delta);
    int N=Nx*Ny;
    int SIZE=sizeof(float)*N;
    ApplyIC(U, V, Nx, Ny);
    cudaMalloc( (void**)& U_dev, SIZE);
    cudaMalloc( (void**)& V_dev, SIZE);
    cudaMalloc( (void**)& W_dev, SIZE);
    cudaMalloc( (void**)& Wnew_dev, SIZE);
    cudaMalloc( (void**)& Psi_dev, SIZE);
    cudaMalloc( (void**)& Psinew_dev, SIZE);

    cudaMemset( U_dev, 0.0, SIZE);
    cudaMemset( V_dev, 0.0, SIZE);
    cudaMemset( W_dev, 0.0, SIZE);
    cudaMemset( Wnew_dev, 0.0, SIZE);
    cudaMemset( Psi_dev, 0.0, SIZE);
    cudaMemset(Psinew_dev, 0.0, SIZE);

    cudaMemcpy(U_dev, U, SIZE, cudaMemcpyHostToDevice);
    cudaMemcpy(V_dev, V, SIZE, cudaMemcpyHostToDevice);
    cudaMemcpy(W_dev, W, SIZE, cudaMemcpyHostToDevice);
    cudaMemcpy(Wnew_dev, W, SIZE, cudaMemcpyHostToDevice);
    cudaMemcpy(Psi_dev, Psi, SIZE, cudaMemcpyHostToDevice);
    cudaMemcpy(Psinew_dev, Psi, SIZE, cudaMemcpyHostToDevice);

    dim3 bs(Ny,1,1);
    dim3 ts(Nx,1,1);

    float timer=0.0, error=1.0;
    int iter=0;
    do{
        ApplyBCGPU <<<bs,ts>>> (W_dev, Wnew_dev, Psi_dev, Nx, Ny, delta);
        cudaThreadSynchronize();
        VorticityGPU <<<bs,ts>>> (U_dev, V_dev, W_dev, Wnew_dev, Psi_dev, c, d, Nx, Ny);
        StreamGPU(Wnew_dev, Psi_dev, Psinew_dev, Nx, Ny, delta, bs, ts);
        VeloCalcGPU <<<bs,ts>>> (U_dev, V_dev, Psi_dev, Nx, Ny, delta);
        cudaThreadSynchronize();
        iter++;
        if(iter%100==0)
            error = ErckGPU(W_dev, Wnew_dev, Nx, Ny);
        //iter++;
        timer+=dt;
        printf("Time: %.6f, Iter: %d, Error: %.9f\r", timer, iter, error);
        cudaMemcpy(W_dev, Wnew_dev, SIZE, cudaMemcpyDeviceToDevice);
        cudaThreadSynchronize();
    } while(error >= ERMAX);
    cudaMemcpy(U, U_dev, SIZE, cudaMemcpyDeviceToHost);
    cudaMemcpy(V, V_dev, SIZE, cudaMemcpyDeviceToHost);
    cudaMemcpy(W, W_dev, SIZE, cudaMemcpyDeviceToHost);
    cudaMemcpy(Psi, Psi_dev, SIZE, cudaMemcpyDeviceToHost);

    cudaFree(U_dev);
    cudaFree(V_dev);
    cudaFree(W_dev);
    cudaFree(Wnew_dev);
    cudaFree(Psi_dev);
    cudaFree(Psinew_dev);
    return;
}
void ParaWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny)
{
    FILE *PR;
    char name[150] = "Error";
    if(checker==1)
        sprintf(name, "CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv", ReN, delta, Lx, Ly, dt);
    else if(checker==2)
        sprintf(name, "GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv", ReN, delta, Lx, Ly, dt);
    PR = fopen(name, "w");
    int i,j;
    fprintf(PR,"X,Y,U,V,Vorticity,StreamFunction\n");
    for( j = 0 ; j < Ny ; j++ )
    {
        for( i = 0 ; i < Nx ; i++ )
        {
            float x = xp(i);
            float y = yp(j);
            int pos = position(i, j);
            fprintf(PR, "%f,%f,%f,%f,%f,%f\n", x,y,U[pos],V[pos],W[pos],Psi[pos]);
        }
    }
    fclose(PR);
    return;
}
void TechWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny)
{
	FILE *TP;
	char name[150] = "Error";
	if(checker==1)
        sprintf(name, "CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat", ReN, delta, Lx, Ly, dt);
	else if(checker==2)
        sprintf(name, "GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat", ReN, delta, Lx, Ly, dt);
    TP = fopen(name, "w");
	int i, j;
	fprintf(TP, "VARIABLES = X, Y, U, V, Vorticity, StreamFunction\n");
	fprintf(TP, "zone i=%d j=%d\n", Nx, Ny);
	for (j = 0; j < Ny; j++)
	{
		for (i = 0; i < Nx; i++)
		{
			double x = xp(i);
			double y = yp(j);
			int pos = position(i, j);
			fprintf(TP, "%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", x, y, U[pos], V[pos], W[pos], Psi[pos]);
		}
	}
	fclose(TP);
}

	.file	"tmpxft_0022d9b8_00000000-6_Cavity04.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2046:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2046:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"1: CPU, 2: CUDA\n"
.LC1:
	.string	"Compute What? "
.LC2:
	.string	"%d"
	.text
	.globl	_Z19GetComputeConditionv
	.type	_Z19GetComputeConditionv, @function
_Z19GetComputeConditionv:
.LFB2029:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rsi
	movl	$2, %edi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	4(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc23_scanf@PLT
	movl	4(%rsp), %eax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z19GetComputeConditionv, .-_Z19GetComputeConditionv
	.globl	_Z7ApplyICPfS_ii
	.type	_Z7ApplyICPfS_ii, @function
_Z7ApplyICPfS_ii:
.LFB2032:
	.cfi_startproc
	endbr64
	decl	%ecx
	movss	.LC3(%rip), %xmm0
	xorl	%eax, %eax
	imull	%edx, %ecx
	movslq	%ecx, %rcx
	leaq	(%rdi,%rcx,4), %rcx
.L7:
	cmpl	%eax, %edx
	jle	.L9
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	jmp	.L7
.L9:
	ret
	.cfi_endproc
.LFE2032:
	.size	_Z7ApplyICPfS_ii, .-_Z7ApplyICPfS_ii
	.globl	_Z10ApplyBCCPUPfS_S_iif
	.type	_Z10ApplyBCCPUPfS_S_iif, @function
_Z10ApplyBCCPUPfS_S_iif:
.LFB2033:
	.cfi_startproc
	endbr64
	movq	%rsi, %r10
	leal	-1(%r8), %eax
	movslq	%ecx, %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	imull	%esi, %eax
	movl	%esi, %ecx
	movq	%rsi, %r11
	movq	%rdx, %rbp
	imull	%r8d, %ecx
	salq	$2, %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %r9
	movsd	.LC4(%rip), %xmm3
	movaps	%xmm0, %xmm1
	subq	%rsi, %rbp
	xorl	%edi, %edi
	cltq
	leaq	(%rdx,%rsi), %rbx
	sall	$2, %ecx
	salq	$2, %rax
.L11:
	cmpl	%edi, %r11d
	jle	.L16
	movss	(%rdx,%rdi,4), %xmm0
	movaps	%xmm1, %xmm2
	subss	(%rbx,%rdi,4), %xmm0
	cvtss2sd	%xmm1, %xmm4
	mulss	%xmm1, %xmm2
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm0, %xmm0
	cvtss2sd	%xmm2, %xmm2
	divsd	%xmm2, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r9,%rdi,4)
	movss	(%rdx,%rax), %xmm0
	incq	%rdi
	subss	0(%rbp,%rax), %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm0, %xmm0
	divsd	%xmm2, %xmm0
	movaps	%xmm3, %xmm2
	divsd	%xmm4, %xmm2
	subsd	%xmm2, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r9,%rax)
	addq	$4, %rax
	jmp	.L11
.L16:
	xorl	%edi, %edi
	xorl	%eax, %eax
	xorl	%r11d, %r11d
.L13:
	addq	%rsi, %rax
	cmpl	%r8d, %r11d
	jge	.L17
	movss	(%rdx,%rdi), %xmm0
	movaps	%xmm1, %xmm2
	subss	4(%rdx,%rdi), %xmm0
	incl	%r11d
	mulss	%xmm1, %xmm2
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm0, %xmm0
	cvtss2sd	%xmm2, %xmm2
	divsd	%xmm2, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r9,%rdi)
	movss	-4(%rdx,%rax), %xmm0
	addq	%rsi, %rdi
	subss	-8(%rdx,%rax), %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm0, %xmm0
	divsd	%xmm2, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -4(%r9,%rax)
	jmp	.L13
.L17:
	movslq	%ecx, %rcx
	movq	%r10, %rdi
	movq	%r9, %rsi
	rep movsb
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2033:
	.size	_Z10ApplyBCCPUPfS_S_iif, .-_Z10ApplyBCCPUPfS_S_iif
	.globl	_Z12VorticityCPUPfS_S_S_S_ffiii
	.type	_Z12VorticityCPUPfS_S_S_S_ffiii, @function
_Z12VorticityCPUPfS_S_S_S_ffiii:
.LFB2034:
	.cfi_startproc
	endbr64
	cvtss2sd	%xmm0, %xmm2
	movaps	%xmm1, %xmm3
	cvtss2sd	%xmm1, %xmm1
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mulsd	.LC5(%rip), %xmm2
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r10
	movq	%rdi, %r8
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movsd	.LC6(%rip), %xmm4
	movq	%rdx, %rsi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movsd	.LC7(%rip), %xmm5
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$1, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	56(%rsp), %r13
	movq	%rcx, %rbx
	divsd	%xmm1, %xmm2
	cvtsi2ssl	%r9d, %xmm1
	movl	64(%rsp), %eax
	movq	%r13, %r11
	movl	%r13d, %r9d
	leal	-1(%r13), %r15d
	leal	-1(%rax), %r12d
	mulss	%xmm3, %xmm1
	mulss	%xmm3, %xmm1
	divss	%xmm1, %xmm0
	cvtsd2ss	%xmm2, %xmm2
.L19:
	cmpl	%ebp, %r12d
	jle	.L18
	movslq	%r9d, %rax
	xorl	%edi, %edi
	leaq	0(,%rax,4), %rdx
	leaq	(%rax,%r13), %rcx
	subq	%r13, %rax
	salq	$2, %rcx
	salq	$2, %rax
	leaq	(%rbx,%rdx), %r14
.L22:
	incq	%rdi
	addq	$4, %rcx
	addq	$4, %rax
	cmpl	%edi, %r15d
	jle	.L24
	movss	8(%r8,%rdx), %xmm3
	cvtss2sd	%xmm0, %xmm6
	mulsd	%xmm4, %xmm6
	movaps	%xmm0, %xmm1
	mulss	%xmm2, %xmm3
	subss	%xmm3, %xmm1
	mulss	8(%rsi,%rdx), %xmm1
	movaps	%xmm5, %xmm3
	subsd	%xmm6, %xmm3
	cvtss2sd	4(%rsi,%rdx), %xmm6
	mulsd	%xmm6, %xmm3
	movss	(%r10,%rcx), %xmm6
	cvtss2sd	%xmm1, %xmm1
	mulss	%xmm2, %xmm6
	addsd	%xmm3, %xmm1
	movss	(%r8,%rdx), %xmm3
	mulss	%xmm2, %xmm3
	addss	%xmm0, %xmm3
	mulss	(%rsi,%rdx), %xmm3
	addq	$4, %rdx
	cvtss2sd	%xmm3, %xmm3
	addsd	%xmm3, %xmm1
	movaps	%xmm0, %xmm3
	subss	%xmm6, %xmm3
	mulss	(%rsi,%rcx), %xmm3
	cvtss2sd	%xmm3, %xmm3
	addsd	%xmm3, %xmm1
	movss	(%r10,%rax), %xmm3
	mulss	%xmm2, %xmm3
	addss	%xmm0, %xmm3
	mulss	(%rsi,%rax), %xmm3
	cvtss2sd	%xmm3, %xmm3
	addsd	%xmm3, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%r14,%rdi,4)
	jmp	.L22
.L24:
	incl	%ebp
	addl	%r11d, %r9d
	jmp	.L19
.L18:
	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
.LFE2034:
	.size	_Z12VorticityCPUPfS_S_S_S_ffiii, .-_Z12VorticityCPUPfS_S_S_S_ffiii
	.globl	_Z11VeloCalcCPUPfS_S_iif
	.type	_Z11VeloCalcCPUPfS_S_iif, @function
_Z11VeloCalcCPUPfS_S_iif:
.LFB2036:
	.cfi_startproc
	endbr64
	movslq	%ecx, %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r10
	movq	%rsi, %r11
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	salq	$2, %rax
	movq	%rdx, %rbp
	movl	%ecx, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	%rax, %rbp
	leaq	(%rdx,%rax), %rbx
	movl	$1, %r9d
	decl	%r8d
	leal	-1(%rcx), %r12d
	movss	.LC8(%rip), %xmm3
.L26:
	cmpl	%r9d, %r8d
	jle	.L25
	movslq	%edi, %rax
	movl	$1, %esi
	salq	$2, %rax
.L29:
	addq	$4, %rax
	cmpl	%esi, %r12d
	jle	.L31
	movss	(%rbx,%rax), %xmm1
	cvtss2sd	%xmm0, %xmm2
	subss	0(%rbp,%rax), %xmm1
	addsd	%xmm2, %xmm2
	incl	%esi
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%r10,%rax)
	movss	4(%rdx,%rax), %xmm1
	subss	-4(%rdx,%rax), %xmm1
	xorps	%xmm3, %xmm1
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%r11,%rax)
	jmp	.L29
.L31:
	incl	%r9d
	addl	%ecx, %edi
	jmp	.L26
.L25:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2036:
	.size	_Z11VeloCalcCPUPfS_S_iif, .-_Z11VeloCalcCPUPfS_S_iif
	.globl	_Z7ErckCPUPfS_ii
	.type	_Z7ErckCPUPfS_ii, @function
_Z7ErckCPUPfS_ii:
.LFB2037:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %r10
	movl	%edx, %r8d
	xorps	%xmm0, %xmm0
	movl	$1, %r9d
	leal	-1(%rcx), %r11d
	leal	-1(%rdx), %ebx
.L33:
	cmpl	%r9d, %r11d
	jle	.L35
	movslq	%r8d, %rax
	movl	$1, %edi
	salq	$2, %rax
.L36:
	addq	$4, %rax
	cmpl	%edi, %ebx
	jle	.L38
	movss	(%rsi,%rax), %xmm1
	subss	(%r10,%rax), %xmm1
	incl	%edi
	mulss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	jmp	.L36
.L38:
	incl	%r9d
	addl	%edx, %r8d
	jmp	.L33
.L35:
	subl	$2, %edx
	subl	$2, %ecx
	popq	%rbx
	.cfi_def_cfa_offset 8
	imull	%ecx, %edx
	cvtsi2ssl	%edx, %xmm1
	divss	%xmm1, %xmm0
	jmp	sqrtf@PLT
	.cfi_endproc
.LFE2037:
	.size	_Z7ErckCPUPfS_ii, .-_Z7ErckCPUPfS_ii
	.globl	_Z9StreamCPUPfS_S_iif
	.type	_Z9StreamCPUPfS_S_iif, @function
_Z9StreamCPUPfS_S_iif:
.LFB2035:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%ecx, %rax
	movq	%rdi, %r9
	movq	%rdx, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movaps	%xmm0, %xmm2
	movl	%r8d, %r15d
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%eax, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	imull	%r8d, %r12d
	movq	%rax, %rbp
	salq	$2, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	%rax, %rdi
	movq	%rdx, %rbx
	leaq	(%rsi,%rax), %r10
	sall	$2, %r12d
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movss	.LC3(%rip), %xmm0
	movslq	%r12d, %r12
	movq	%rdi, (%rsp)
.L45:
	movl	%ebp, %ecx
	leal	-1(%r15), %edi
	leal	-1(%rbp), %r11d
	movl	$1, %esi
.L40:
	cmpl	%esi, %edi
	jle	.L42
	movslq	%ecx, %rax
	movl	$1, %edx
	salq	$2, %rax
.L43:
	addq	$4, %rax
	cmpl	%edx, %r11d
	jle	.L48
	movaps	%xmm2, %xmm3
	movq	(%rsp), %r8
	movss	4(%r13,%rax), %xmm1
	incl	%edx
	mulss	%xmm2, %xmm3
	addss	-4(%rbx,%rax), %xmm1
	addss	(%r10,%rax), %xmm1
	mulss	(%r9,%rax), %xmm3
	addss	(%r8,%rax), %xmm1
	addss	%xmm3, %xmm1
	mulss	.LC10(%rip), %xmm1
	movss	%xmm1, (%rbx,%rax)
	jmp	.L43
.L48:
	incl	%esi
	addl	%ebp, %ecx
	jmp	.L40
.L42:
	incl	%r14d
	movl	$100, %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L44
	movl	%r15d, %ecx
	movl	%ebp, %edx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movq	%r9, 16(%rsp)
	movq	%r10, 8(%rsp)
	movss	%xmm2, 28(%rsp)
	call	_Z7ErckCPUPfS_ii
	movss	28(%rsp), %xmm2
	movq	16(%rsp), %r9
	movq	8(%rsp), %r10
.L44:
	cvtss2sd	%xmm0, %xmm1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rcx
	rep movsb
	comisd	.LC11(%rip), %xmm1
	jnb	.L45
	addq	$40, %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
.LFE2035:
	.size	_Z9StreamCPUPfS_S_iif, .-_Z9StreamCPUPfS_S_iif
	.section	.rodata.str1.1
.LC12:
	.string	"Time: %.6f, Iter: %d, Error: %.9f\r"
.LC13:
	.string	"\n"
	.text
	.globl	_Z9CavityCPUPfS_S_S_iifif
	.type	_Z9CavityCPUPfS_S_S_iifif, @function
_Z9CavityCPUPfS_S_S_iifif:
.LFB2038:
	.cfi_startproc
	endbr64
	movl	%r8d, %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	imull	%r9d, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sall	$2, %eax
	movl	%r9d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	cltq
	movl	%r8d, %ebx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 24(%rsp)
	movq	%rax, %rdi
	movl	128(%rsp), %r15d
	movss	%xmm0, 32(%rsp)
	movss	%xmm1, 52(%rsp)
	movq	%rdx, 16(%rsp)
	movq	%rax, (%rsp)
	call	malloc@PLT
	movq	(%rsp), %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	24(%rsp), %rdi
	movq	(%rsp), %rcx
	xorl	%esi, %esi
	movq	%rax, 40(%rsp)
	movl	%r14d, %eax
	rep stosb
	movq	(%rsp), %rcx
	movq	%r13, %rdi
	rep stosb
	movq	16(%rsp), %rdi
	movq	(%rsp), %rcx
	rep stosb
	movq	(%rsp), %rcx
	movq	8(%rsp), %rdi
	movq	%rcx, %rdx
	call	__memset_chk@PLT
	movq	(%rsp), %rcx
	movl	%r14d, %eax
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%r14d, %r14d
	rep stosb
	movq	(%rsp), %rcx
	movq	40(%rsp), %rdi
	movq	%rcx, %rdx
	call	__memset_chk@PLT
	movq	24(%rsp), %rdi
	movl	%ebp, %ecx
	movl	%ebx, %edx
	movq	%r13, %rsi
	call	_Z7ApplyICPfS_ii
	movss	.LC3(%rip), %xmm3
	movl	$0x00000000, 36(%rsp)
	movss	%xmm3, 48(%rsp)
.L51:
	movss	32(%rsp), %xmm0
	movq	8(%rsp), %rsi
	movl	%ebp, %r8d
	movl	%ebx, %ecx
	movq	16(%rsp), %rdi
	movq	%r12, %rdx
	incl	%r14d
	call	_Z10ApplyBCCPUPfS_S_iif
	pushq	%rbp
	.cfi_def_cfa_offset 136
	movl	%r15d, %r9d
	movq	%r12, %r8
	pushq	%rbx
	.cfi_def_cfa_offset 144
	movss	48(%rsp), %xmm1
	movq	%r13, %rsi
	movss	68(%rsp), %xmm0
	movq	24(%rsp), %rcx
	movq	32(%rsp), %rdx
	movq	40(%rsp), %rdi
	call	_Z12VorticityCPUPfS_S_S_S_ffiii
	movss	48(%rsp), %xmm0
	movl	%ebp, %r8d
	movl	%ebx, %ecx
	movq	56(%rsp), %rdx
	movq	24(%rsp), %rdi
	movq	%r12, %rsi
	call	_Z9StreamCPUPfS_S_iif
	movss	48(%rsp), %xmm0
	movl	%ebx, %ecx
	movq	%r12, %rdx
	movq	40(%rsp), %rdi
	movl	%ebp, %r8d
	movq	%r13, %rsi
	call	_Z11VeloCalcCPUPfS_S_iif
	movss	52(%rsp), %xmm2
	movl	$100, %ecx
	addss	68(%rsp), %xmm2
	movss	%xmm2, 52(%rsp)
	popq	%rax
	.cfi_def_cfa_offset 136
	movl	%r14d, %eax
	popq	%rdx
	.cfi_def_cfa_offset 128
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L50
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdi
	movl	%ebp, %ecx
	movl	%ebx, %edx
	call	_Z7ErckCPUPfS_ii
	movss	%xmm0, 48(%rsp)
.L50:
	movl	$2, %edi
	leaq	.LC12(%rip), %rsi
	movl	%r14d, %edx
	movb	$2, %al
	cvtss2sd	48(%rsp), %xmm1
	cvtss2sd	36(%rsp), %xmm0
	movsd	%xmm1, 56(%rsp)
	call	__printf_chk@PLT
	movsd	56(%rsp), %xmm1
	movq	16(%rsp), %rdi
	comisd	.LC11(%rip), %xmm1
	movq	8(%rsp), %rsi
	movq	(%rsp), %rcx
	rep movsb
	jnb	.L51
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	40(%rsp), %rdi
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE2038:
	.size	_Z9CavityCPUPfS_S_S_iifif, .-_Z9CavityCPUPfS_S_S_iifif
	.globl	_Z7ErckGPUPfS_ii
	.type	_Z7ErckGPUPfS_ii, @function
_Z7ErckGPUPfS_ii:
.LFB2039:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	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	%ecx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edx, %ebx
	imull	%ecx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	sall	$2, %ebx
	movslq	%ebx, %rbx
	movq	%rbx, %rdi
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rbx, %rdx
	movq	%r15, %rsi
	movq	%rax, %r12
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	%rbx, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	call	cudaThreadSynchronize@PLT
	movq	8(%rsp), %rdi
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%ebp, %ecx
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	%r13d, %edx
	popq	%rbp
	.cfi_def_cfa_offset 40
	movq	%r12, %rsi
	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	_Z7ErckCPUPfS_ii
	.cfi_endproc
.LFE2039:
	.size	_Z7ErckGPUPfS_ii, .-_Z7ErckGPUPfS_ii
	.section	.rodata.str1.1
.LC14:
	.string	"CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv"
.LC15:
	.string	"GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv"
.LC16:
	.string	"w"
.LC17:
	.string	"X,Y,U,V,Vorticity,StreamFunction\n"
.LC18:
	.string	"%f,%f,%f,%f,%f,%f\n"
	.text
	.globl	_Z10ParaWriteriPfS_S_S_iffffii
	.type	_Z10ParaWriteriPfS_S_S_iffffii, @function
_Z10ParaWriteriPfS_S_S_iffffii:
.LFB2042:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edi, %r10d
	movaps	%xmm0, %xmm4
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	movl	%r9d, %r8d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	movl	$134, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdx, %rbp
	xorl	%edx, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movss	%xmm2, 12(%rsp)
	leaq	50(%rsp), %rdi
	leaq	34(%rsp), %r15
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	movabsq	$491496043077, %rax
	movq	%rdx, 42(%rsp)
	movq	%rax, 34(%rsp)
	xorl	%eax, %eax
	cmpl	$1, %r10d
	rep stosb
	jne	.L57
	cvtss2sd	%xmm2, %xmm0
	leaq	.LC14(%rip), %rcx
	cvtss2sd	%xmm1, %xmm2
	cvtss2sd	%xmm3, %xmm3
	cvtss2sd	%xmm4, %xmm1
	jmp	.L65
.L57:
	cmpl	$2, %r10d
	jne	.L58
	leaq	.LC15(%rip), %rcx
	cvtss2sd	%xmm1, %xmm2
	cvtss2sd	%xmm3, %xmm3
	cvtss2sd	%xmm4, %xmm1
	cvtss2sd	12(%rsp), %xmm0
.L65:
	movl	$150, %edx
	movl	$2, %esi
	movq	%r15, %rdi
	movb	$4, %al
	call	__sprintf_chk@PLT
.L58:
	leaq	.LC16(%rip), %rsi
	movq	%r15, %rdi
	call	fopen@PLT
	leaq	.LC17(%rip), %rdx
	movl	$2, %esi
	movq	%rax, 16(%rsp)
	movq	%rax, %rdi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
.L59:
	cmpl	264(%rsp), %r9d
	jge	.L61
	movslq	%r10d, %rcx
	xorl	%r14d, %r14d
	leaq	0(,%rcx,4), %r15
.L62:
	cmpl	256(%rsp), %r14d
	jge	.L66
	cvtsi2ssl	%r9d, %xmm1
	mulss	12(%rsp), %xmm1
	movb	$6, %al
	movq	16(%rsp), %rdi
	cvtsi2ssl	%r14d, %xmm0
	mulss	12(%rsp), %xmm0
	movl	$2, %esi
	movl	%r10d, 28(%rsp)
	leaq	.LC18(%rip), %rdx
	movl	%r9d, 24(%rsp)
	incl	%r14d
	cvtss2sd	0(%r13,%r15), %xmm5
	cvtss2sd	(%r12,%r15), %xmm4
	cvtss2sd	0(%rbp,%r15), %xmm3
	cvtss2sd	(%rbx,%r15), %xmm2
	addq	$4, %r15
	cvtss2sd	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm0
	call	__fprintf_chk@PLT
	movl	28(%rsp), %r10d
	movl	24(%rsp), %r9d
	jmp	.L62
.L66:
	incl	%r9d
	addl	256(%rsp), %r10d
	jmp	.L59
.L61:
	movq	16(%rsp), %rdi
	call	fclose@PLT
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	je	.L63
	call	__stack_chk_fail@PLT
.L63:
	addq	$200, %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
.LFE2042:
	.size	_Z10ParaWriteriPfS_S_S_iffffii, .-_Z10ParaWriteriPfS_S_S_iffffii
	.section	.rodata.str1.1
.LC19:
	.string	"CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat"
.LC20:
	.string	"GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat"
.LC21:
	.string	"VARIABLES = X, Y, U, V, Vorticity, StreamFunction\n"
.LC22:
	.string	"zone i=%d j=%d\n"
.LC23:
	.string	"%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n"
	.text
	.globl	_Z10TechWriteriPfS_S_S_iffffii
	.type	_Z10TechWriteriPfS_S_S_iffffii, @function
_Z10TechWriteriPfS_S_S_iffffii:
.LFB2043:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edi, %r10d
	movaps	%xmm0, %xmm4
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	movl	%r9d, %r8d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	movl	$134, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdx, %rbp
	xorl	%edx, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movss	%xmm2, 20(%rsp)
	leaq	50(%rsp), %rdi
	leaq	34(%rsp), %r15
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	movabsq	$491496043077, %rax
	movq	%rdx, 42(%rsp)
	movq	%rax, 34(%rsp)
	xorl	%eax, %eax
	cmpl	$1, %r10d
	rep stosb
	jne	.L68
	cvtss2sd	%xmm2, %xmm0
	leaq	.LC19(%rip), %rcx
	cvtss2sd	%xmm1, %xmm2
	cvtss2sd	%xmm3, %xmm3
	cvtss2sd	%xmm4, %xmm1
	jmp	.L76
.L68:
	cmpl	$2, %r10d
	jne	.L69
	leaq	.LC20(%rip), %rcx
	cvtss2sd	%xmm1, %xmm2
	cvtss2sd	%xmm3, %xmm3
	cvtss2sd	%xmm4, %xmm1
	cvtss2sd	20(%rsp), %xmm0
.L76:
	movl	$150, %edx
	movl	$2, %esi
	movq	%r15, %rdi
	movb	$4, %al
	call	__sprintf_chk@PLT
.L69:
	leaq	.LC16(%rip), %rsi
	movq	%r15, %rdi
	call	fopen@PLT
	leaq	.LC21(%rip), %rdx
	movl	$2, %esi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	264(%rsp), %r8d
	xorl	%eax, %eax
	movl	256(%rsp), %ecx
	movq	8(%rsp), %rdi
	leaq	.LC22(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
.L70:
	cmpl	264(%rsp), %r9d
	jge	.L72
	movslq	%r10d, %rcx
	xorl	%r14d, %r14d
	leaq	0(,%rcx,4), %r15
.L73:
	cmpl	256(%rsp), %r14d
	jge	.L77
	cvtsi2ssl	%r9d, %xmm1
	mulss	20(%rsp), %xmm1
	movb	$6, %al
	movq	8(%rsp), %rdi
	cvtsi2ssl	%r14d, %xmm0
	mulss	20(%rsp), %xmm0
	movl	$2, %esi
	movl	%r10d, 28(%rsp)
	leaq	.LC23(%rip), %rdx
	movl	%r9d, 24(%rsp)
	incl	%r14d
	cvtss2sd	0(%r13,%r15), %xmm5
	cvtss2sd	(%r12,%r15), %xmm4
	cvtss2sd	0(%rbp,%r15), %xmm3
	cvtss2sd	(%rbx,%r15), %xmm2
	addq	$4, %r15
	cvtss2sd	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm0
	call	__fprintf_chk@PLT
	movl	28(%rsp), %r10d
	movl	24(%rsp), %r9d
	jmp	.L73
.L77:
	incl	%r9d
	addl	256(%rsp), %r10d
	jmp	.L70
.L72:
	movq	8(%rsp), %rdi
	call	fclose@PLT
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	je	.L74
	call	__stack_chk_fail@PLT
.L74:
	addq	$200, %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
.LFE2043:
	.size	_Z10TechWriteriPfS_S_S_iffffii, .-_Z10TechWriteriPfS_S_S_iffffii
	.globl	_Z37__device_stub__Z10ApplyBCGPUPfS_S_iifPfS_S_iif
	.type	_Z37__device_stub__Z10ApplyBCGPUPfS_S_iifPfS_S_iif, @function
_Z37__device_stub__Z10ApplyBCGPUPfS_S_iifPfS_S_iif:
.LFB2068:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L78
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z10ApplyBCGPUPfS_S_iif(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L78:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L80
	call	__stack_chk_fail@PLT
.L80:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2068:
	.size	_Z37__device_stub__Z10ApplyBCGPUPfS_S_iifPfS_S_iif, .-_Z37__device_stub__Z10ApplyBCGPUPfS_S_iifPfS_S_iif
	.globl	_Z10ApplyBCGPUPfS_S_iif
	.type	_Z10ApplyBCGPUPfS_S_iif, @function
_Z10ApplyBCGPUPfS_S_iif:
.LFB2069:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z10ApplyBCGPUPfS_S_iifPfS_S_iif
	.cfi_endproc
.LFE2069:
	.size	_Z10ApplyBCGPUPfS_S_iif, .-_Z10ApplyBCGPUPfS_S_iif
	.globl	_Z44__device_stub__Z12VorticityGPUPfS_S_S_S_ffiiPfS_S_S_S_ffii
	.type	_Z44__device_stub__Z12VorticityGPUPfS_S_S_S_ffiiPfS_S_S_S_ffii, @function
_Z44__device_stub__Z12VorticityGPUPfS_S_S_S_ffiiPfS_S_S_S_ffii:
.LFB2070:
	.cfi_startproc
	endbr64
	subq	$216, %rsp
	.cfi_def_cfa_offset 224
	movq	%rdi, 56(%rsp)
	leaq	80(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	92(%rsp), %rsi
	movq	%rdx, 40(%rsp)
	leaq	64(%rsp), %rdx
	movq	%rcx, 32(%rsp)
	leaq	72(%rsp), %rcx
	movq	%r8, 24(%rsp)
	movl	%r9d, 12(%rsp)
	movss	%xmm0, 20(%rsp)
	movss	%xmm1, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 200(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movl	$1, 88(%rsp)
	movq	%rax, 128(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	224(%rsp), %rax
	movq	%rax, 192(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 80(%rsp)
	movq	%rax, 92(%rsp)
	movl	$1, 100(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L83
	pushq	72(%rsp)
	.cfi_def_cfa_offset 232
	leaq	_Z12VorticityGPUPfS_S_S_S_ffii(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 240
	movq	108(%rsp), %rcx
	movl	116(%rsp), %r8d
	movq	96(%rsp), %rsi
	movl	104(%rsp), %edx
	leaq	144(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 232
	popq	%rdx
	.cfi_def_cfa_offset 224
.L83:
	movq	200(%rsp), %rax
	subq	%fs:40, %rax
	je	.L85
	call	__stack_chk_fail@PLT
.L85:
	addq	$216, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2070:
	.size	_Z44__device_stub__Z12VorticityGPUPfS_S_S_S_ffiiPfS_S_S_S_ffii, .-_Z44__device_stub__Z12VorticityGPUPfS_S_S_S_ffiiPfS_S_S_S_ffii
	.globl	_Z12VorticityGPUPfS_S_S_S_ffii
	.type	_Z12VorticityGPUPfS_S_S_S_ffii, @function
_Z12VorticityGPUPfS_S_S_S_ffii:
.LFB2071:
	.cfi_startproc
	endbr64
	jmp	_Z44__device_stub__Z12VorticityGPUPfS_S_S_S_ffiiPfS_S_S_S_ffii
	.cfi_endproc
.LFE2071:
	.size	_Z12VorticityGPUPfS_S_S_S_ffii, .-_Z12VorticityGPUPfS_S_S_S_ffii
	.globl	_Z37__device_stub__Z10_StreamGPUPfS_S_iifPfS_S_iif
	.type	_Z37__device_stub__Z10_StreamGPUPfS_S_iifPfS_S_iif, @function
_Z37__device_stub__Z10_StreamGPUPfS_S_iifPfS_S_iif:
.LFB2072:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L88
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z10_StreamGPUPfS_S_iif(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L88:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L90
	call	__stack_chk_fail@PLT
.L90:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2072:
	.size	_Z37__device_stub__Z10_StreamGPUPfS_S_iifPfS_S_iif, .-_Z37__device_stub__Z10_StreamGPUPfS_S_iifPfS_S_iif
	.globl	_Z10_StreamGPUPfS_S_iif
	.type	_Z10_StreamGPUPfS_S_iif, @function
_Z10_StreamGPUPfS_S_iif:
.LFB2073:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z10_StreamGPUPfS_S_iifPfS_S_iif
	.cfi_endproc
.LFE2073:
	.size	_Z10_StreamGPUPfS_S_iif, .-_Z10_StreamGPUPfS_S_iif
	.globl	_Z9StreamGPUPfS_S_iif4dim3S0_
	.type	_Z9StreamGPUPfS_S_iif4dim3S0_, @function
_Z9StreamGPUPfS_S_iif4dim3S0_:
.LFB2040:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r8d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%ecx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%ecx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	imull	%r8d, %ebp
	movq	%rdx, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movss	.LC3(%rip), %xmm1
	sall	$2, %ebp
	movq	%rsi, (%rsp)
	movslq	%ebp, %rbp
	movss	%xmm0, 12(%rsp)
	movss	%xmm1, 8(%rsp)
.L96:
	movl	104(%rsp), %ecx
	movq	96(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	80(%rsp), %rdi
	movl	88(%rsp), %esi
	incl	%r14d
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L94
	movss	12(%rsp), %xmm0
	movq	(%rsp), %rsi
	movl	%r13d, %r8d
	movl	%r12d, %ecx
	movq	%rbx, %rdx
	movq	%r15, %rdi
	call	_Z37__device_stub__Z10_StreamGPUPfS_S_iifPfS_S_iif
.L94:
	call	cudaThreadSynchronize@PLT
	movl	%r14d, %eax
	movl	$100, %ecx
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L95
	movq	(%rsp), %rdi
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movq	%rbx, %rsi
	call	_Z7ErckGPUPfS_ii
	movss	%xmm0, 8(%rsp)
.L95:
	movq	(%rsp), %rdi
	movl	$3, %ecx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	call	cudaMemcpy@PLT
	cvtss2sd	8(%rsp), %xmm0
	comisd	.LC11(%rip), %xmm0
	jnb	.L96
	addq	$24, %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
.LFE2040:
	.size	_Z9StreamGPUPfS_S_iif4dim3S0_, .-_Z9StreamGPUPfS_S_iif4dim3S0_
	.globl	_Z38__device_stub__Z11VeloCalcGPUPfS_S_iifPfS_S_iif
	.type	_Z38__device_stub__Z11VeloCalcGPUPfS_S_iifPfS_S_iif, @function
_Z38__device_stub__Z11VeloCalcGPUPfS_S_iifPfS_S_iif:
.LFB2074:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L99
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z11VeloCalcGPUPfS_S_iif(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L99:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L101
	call	__stack_chk_fail@PLT
.L101:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2074:
	.size	_Z38__device_stub__Z11VeloCalcGPUPfS_S_iifPfS_S_iif, .-_Z38__device_stub__Z11VeloCalcGPUPfS_S_iifPfS_S_iif
	.globl	_Z11VeloCalcGPUPfS_S_iif
	.type	_Z11VeloCalcGPUPfS_S_iif, @function
_Z11VeloCalcGPUPfS_S_iif:
.LFB2075:
	.cfi_startproc
	endbr64
	jmp	_Z38__device_stub__Z11VeloCalcGPUPfS_S_iifPfS_S_iif
	.cfi_endproc
.LFE2075:
	.size	_Z11VeloCalcGPUPfS_S_iif, .-_Z11VeloCalcGPUPfS_S_iif
	.globl	_Z10CavityCUDAPfS_S_S_iifif
	.type	_Z10CavityCUDAPfS_S_S_iifif, @function
_Z10CavityCUDAPfS_S_S_iifif:
.LFB2041:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC12(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	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
	movl	%r9d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%r8d, %ebx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movss	%xmm0, 16(%rsp)
	cvtss2sd	%xmm1, %xmm0
	mulsd	.LC5(%rip), %xmm0
	movss	%xmm1, 40(%rsp)
	cvtss2sd	16(%rsp), %xmm1
	movss	40(%rsp), %xmm2
	movq	%rdx, 24(%rsp)
	movl	%r8d, %edx
	movq	%rcx, 32(%rsp)
	movl	%r9d, %ecx
	divsd	%xmm1, %xmm0
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	cvtsd2ss	%xmm0, %xmm4
	movss	%xmm4, 48(%rsp)
	cvtsi2ssl	208(%rsp), %xmm0
	mulss	16(%rsp), %xmm0
	mulss	16(%rsp), %xmm0
	divss	%xmm0, %xmm2
	movss	%xmm2, 52(%rsp)
	call	_Z7ApplyICPfS_ii
	movl	%r8d, %eax
	leaq	64(%rsp), %rdi
	imull	%r9d, %eax
	sall	$2, %eax
	cltq
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	72(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	80(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	96(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	88(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	104(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rdx
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	8(%rsp), %rdx
	movq	72(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	8(%rsp), %rdx
	movq	80(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	8(%rsp), %rdx
	movq	96(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	8(%rsp), %rdx
	movq	88(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	8(%rsp), %rdx
	movq	104(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	8(%rsp), %rdx
	movq	64(%rsp), %rdi
	movq	%r13, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	72(%rsp), %rdi
	movq	%r12, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	80(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	96(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$1, %ecx
	movq	88(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$1, %ecx
	movq	104(%rsp), %rdi
	call	cudaMemcpy@PLT
	movss	.LC3(%rip), %xmm7
	movabsq	$4294967297, %rax
	movl	%ebp, 112(%rsp)
	movq	%rax, 116(%rsp)
	movl	%ebx, 124(%rsp)
	movq	%rax, 128(%rsp)
	movl	$0x00000000, 20(%rsp)
	movss	%xmm7, 44(%rsp)
.L109:
	movq	124(%rsp), %rdx
	movq	112(%rsp), %rdi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	132(%rsp), %ecx
	movl	120(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L105
	movss	16(%rsp), %xmm0
	movq	88(%rsp), %rdx
	movl	%ebp, %r8d
	movl	%ebx, %ecx
	movq	96(%rsp), %rsi
	movq	80(%rsp), %rdi
	call	_Z37__device_stub__Z10ApplyBCGPUPfS_S_iifPfS_S_iif
.L105:
	call	cudaThreadSynchronize@PLT
	movq	124(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	132(%rsp), %ecx
	movq	112(%rsp), %rdi
	movl	120(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L106
	pushq	%rax
	.cfi_def_cfa_offset 216
	movl	%ebx, %r9d
	pushq	%rbp
	.cfi_def_cfa_offset 224
	movss	68(%rsp), %xmm1
	movss	64(%rsp), %xmm0
	movq	104(%rsp), %r8
	movq	112(%rsp), %rcx
	movq	96(%rsp), %rdx
	movq	88(%rsp), %rsi
	movq	80(%rsp), %rdi
	call	_Z44__device_stub__Z12VorticityGPUPfS_S_S_S_ffiiPfS_S_S_S_ffii
	popq	%rdx
	.cfi_def_cfa_offset 216
	popq	%rcx
	.cfi_def_cfa_offset 208
.L106:
	subq	$32, %rsp
	.cfi_def_cfa_offset 240
	movl	%ebp, %r8d
	movl	%ebx, %ecx
	movq	156(%rsp), %rax
	movss	48(%rsp), %xmm0
	movq	136(%rsp), %rdx
	movq	120(%rsp), %rsi
	movq	%rax, 16(%rsp)
	movl	164(%rsp), %eax
	movq	128(%rsp), %rdi
	movl	%eax, 24(%rsp)
	movq	144(%rsp), %rax
	movq	%rax, (%rsp)
	movl	152(%rsp), %eax
	movl	%eax, 8(%rsp)
	call	_Z9StreamGPUPfS_S_iif4dim3S0_
	movl	164(%rsp), %ecx
	addq	$32, %rsp
	.cfi_def_cfa_offset 208
	movq	124(%rsp), %rdx
	movq	112(%rsp), %rdi
	movl	120(%rsp), %esi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L107
	movss	16(%rsp), %xmm0
	movq	88(%rsp), %rdx
	movl	%ebp, %r8d
	movl	%ebx, %ecx
	movq	72(%rsp), %rsi
	movq	64(%rsp), %rdi
	call	_Z38__device_stub__Z11VeloCalcGPUPfS_S_iifPfS_S_iif
.L107:
	call	cudaThreadSynchronize@PLT
	incl	%r14d
	movl	$100, %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L108
	movq	96(%rsp), %rsi
	movq	80(%rsp), %rdi
	movl	%ebp, %ecx
	movl	%ebx, %edx
	call	_Z7ErckGPUPfS_ii
	movss	%xmm0, 44(%rsp)
.L108:
	movss	20(%rsp), %xmm3
	movl	%r14d, %edx
	movq	%r15, %rsi
	movb	$2, %al
	addss	40(%rsp), %xmm3
	movl	$2, %edi
	cvtss2sd	44(%rsp), %xmm1
	movsd	%xmm1, 56(%rsp)
	movss	%xmm3, 20(%rsp)
	cvtss2sd	%xmm3, %xmm0
	call	__printf_chk@PLT
	movq	8(%rsp), %rdx
	movq	96(%rsp), %rsi
	movl	$3, %ecx
	movq	80(%rsp), %rdi
	call	cudaMemcpy@PLT
	call	cudaThreadSynchronize@PLT
	movsd	56(%rsp), %xmm1
	comisd	.LC11(%rip), %xmm1
	jnb	.L109
	movq	8(%rsp), %rdx
	movq	64(%rsp), %rsi
	movl	$2, %ecx
	movq	%r13, %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	72(%rsp), %rsi
	movq	%r12, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	80(%rsp), %rsi
	movl	$2, %ecx
	movq	24(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	88(%rsp), %rsi
	movl	$2, %ecx
	movq	32(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rdi
	call	cudaFree@PLT
	movq	80(%rsp), %rdi
	call	cudaFree@PLT
	movq	96(%rsp), %rdi
	call	cudaFree@PLT
	movq	88(%rsp), %rdi
	call	cudaFree@PLT
	movq	104(%rsp), %rdi
	call	cudaFree@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L110
	call	__stack_chk_fail@PLT
.L110:
	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
.LFE2041:
	.size	_Z10CavityCUDAPfS_S_S_iifif, .-_Z10CavityCUDAPfS_S_S_iifif
	.section	.rodata.str1.1
.LC26:
	.string	"Reynolds Number: %d, X-Grid: %d, Y=Grid: %d, GridSize=%f, dt=%f\n"
	.text
	.globl	_Z11ComputeMaini
	.type	_Z11ComputeMaini, @function
_Z11ComputeMaini:
.LFB2031:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movsd	.LC24(%rip), %xmm1
	movl	%edi, %r14d
	movb	$2, %al
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	$256, %r8d
	movl	$256, %ecx
	movsd	.LC25(%rip), %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	$1000, %edx
	movl	$2, %edi
	leaq	.LC26(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	__printf_chk@PLT
	movl	$262144, %edi
	call	malloc@PLT
	movl	$262144, %edi
	movq	%rax, %r13
	call	malloc@PLT
	movl	$262144, %edi
	movq	%rax, %r12
	call	malloc@PLT
	movl	$262144, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	movq	%rax, %rbx
	cmpl	$1, %r14d
	jne	.L114
	pushq	%r10
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movss	.LC27(%rip), %xmm1
	movq	%rax, %rcx
	movq	%rbp, %rdx
	pushq	$1000
	.cfi_def_cfa_offset 64
	movl	$256, %r9d
	movq	%r12, %rsi
	movq	%r13, %rdi
	movss	.LC28(%rip), %xmm0
	movl	$256, %r8d
	call	_Z9CavityCPUPfS_S_S_iifif
	jmp	.L117
.L114:
	.cfi_restore_state
	cmpl	$2, %r14d
	jne	.L115
	pushq	%r9
	.cfi_def_cfa_offset 56
	movss	.LC27(%rip), %xmm1
	movq	%rax, %rcx
	movq	%rbp, %rdx
	pushq	$1000
	.cfi_def_cfa_offset 64
	movl	$256, %r9d
	movq	%r12, %rsi
	movq	%r13, %rdi
	movss	.LC28(%rip), %xmm0
	movl	$256, %r8d
	call	_Z10CavityCUDAPfS_S_S_iifif
.L117:
	popq	%rdi
	.cfi_def_cfa_offset 56
	popq	%r8
	.cfi_def_cfa_offset 48
.L115:
	pushq	$256
	.cfi_def_cfa_offset 56
	movq	%rbx, %r8
	movq	%rbp, %rcx
	movq	%r12, %rdx
	pushq	$256
	.cfi_def_cfa_offset 64
	movq	%r13, %rsi
	movl	%r14d, %edi
	movss	.LC3(%rip), %xmm1
	movss	.LC27(%rip), %xmm3
	movss	.LC28(%rip), %xmm2
	movl	$1000, %r9d
	movaps	%xmm1, %xmm0
	call	_Z10ParaWriteriPfS_S_S_iffffii
	popq	%rax
	.cfi_def_cfa_offset 56
	popq	%rdx
	.cfi_def_cfa_offset 48
	pushq	$256
	.cfi_def_cfa_offset 56
	pushq	$256
	.cfi_def_cfa_offset 64
	movq	%rbp, %rcx
	movq	%r13, %rsi
	movq	%rbx, %r8
	movss	.LC3(%rip), %xmm1
	movq	%r12, %rdx
	movl	$1000, %r9d
	movl	%r14d, %edi
	movss	.LC27(%rip), %xmm3
	movss	.LC28(%rip), %xmm2
	movaps	%xmm1, %xmm0
	call	_Z10TechWriteriPfS_S_S_iffffii
	movq	%r13, %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	popq	%rcx
	.cfi_def_cfa_offset 56
	movq	%rbx, %rdi
	popq	%rsi
	.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
	jmp	free@PLT
	.cfi_endproc
.LFE2031:
	.size	_Z11ComputeMaini, .-_Z11ComputeMaini
	.section	.rodata.str1.1
.LC29:
	.string	"Wrong Input, Compute CPU\n"
	.text
	.globl	_Z13CavityComputev
	.type	_Z13CavityComputev, @function
_Z13CavityComputev:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%rdx
	.cfi_def_cfa_offset 16
	call	_Z19GetComputeConditionv
	movl	%eax, %edi
	decl	%eax
	cmpl	$1, %eax
	jbe	.L119
	movl	$2, %edi
	leaq	.LC29(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, %edi
.L119:
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Z11ComputeMaini
	.cfi_endproc
.LFE2030:
	.size	_Z13CavityComputev, .-_Z13CavityComputev
	.globl	_Z6Callerv
	.type	_Z6Callerv, @function
_Z6Callerv:
.LFB2028:
	.cfi_startproc
	endbr64
	jmp	_Z13CavityComputev
	.cfi_endproc
.LFE2028:
	.size	_Z6Callerv, .-_Z6Callerv
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z13CavityComputev
	xorl	%eax, %eax
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	main, .-main
	.section	.rodata.str1.1
.LC30:
	.string	"_Z11VeloCalcGPUPfS_S_iif"
.LC31:
	.string	"_Z10_StreamGPUPfS_S_iif"
.LC32:
	.string	"_Z12VorticityGPUPfS_S_S_S_ffii"
.LC33:
	.string	"_Z10ApplyBCGPUPfS_S_iif"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2077:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC30(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z11VeloCalcGPUPfS_S_iif(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC31(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z10_StreamGPUPfS_S_iif(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC32(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z12VorticityGPUPfS_S_S_S_ffii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC33(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z10ApplyBCGPUPfS_S_iif(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2077:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC3:
	.long	1065353216
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	0
	.long	1073741824
	.align 8
.LC5:
	.long	0
	.long	1071644672
	.align 8
.LC6:
	.long	0
	.long	1074790400
	.align 8
.LC7:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC8:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst4
	.align 4
.LC10:
	.long	1048576000
	.section	.rodata.cst8
	.align 8
.LC11:
	.long	-1598689907
	.long	1050724087
	.align 8
.LC24:
	.long	-1610612736
	.long	1051772663
	.align 8
.LC25:
	.long	536870912
	.long	1064308752
	.section	.rodata.cst4
	.align 4
.LC27:
	.long	897988541
	.align 4
.LC28:
	.long	998277249
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


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

#define Uw 1.0
#define ERMAX 0.0000005
#define xp(i) (float)i*delta
#define yp(j) (float)j*delta
#define position(i,j) j*Nx+i

void Caller(void);
void CavityCompute(void);
int GetComputeCondition(void);
void ComputeMain(int check);
void ApplyIC(float *U, float *V, int Nx, int Ny);
void ApplyBCCPU(float *W, float *Wnew, float *Psi, int Nx, int Ny, float delta);
void VorticityCPU(float *U, float *V, float *W, float *Wnew, float *Psi, float dt, float delta, int ReN, int Nx, int Ny);
void StreamCPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta );
void VeloCalcCPU(float *U, float *V, float *Psi, int Nx, int Ny, float delta);
float ErckCPU(float *W, float *Wnew, int Nx, int Ny);
void CavityCPU(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt);
void CavityCUDA(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt);
void ParaWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny);
void TechWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny);
int main(int argc, char* argv[])
{
    Caller();
    return 0;
}
void Caller(void)
{
    CavityCompute();
    return;
}
int GetComputeCondition(void)
{
    int check;
    printf("1: CPU, 2: CUDA\n");
    printf("Compute What? ");
    scanf("%d", &check);
    return check;
}
void CavityCompute(void)
{
    int check = GetComputeCondition();
    if((check != 1 )&& (check != 2))
    {
        printf("Wrong Input, Compute CPU\n");
        check = 1;
    }
    ComputeMain(check);
    return;
}
void ComputeMain(int check)
{
    int ReN=1000, Nx=256, N, SIZE;
    int Ny=Nx;
    float Lx=1.0, Ly=1.0, delta, dt=0.000001;
    //printf("Input ReN: ");
    //scanf("%d", &ReN);
    //printf("Input Lx: ");
    //scanf("%f", &Lx);
    //printf("Input Ly: ");
    //scanf("%f", &Ly);
    //printf("Input Nx (X-Grid Counter): ");
    //scanf("%d", &Nx);
    //printf("Input dt: ");
    //scanf("%f", &dt);
    delta = Lx / ((float)(Nx-1));
    //Ny = (int)(Ly/delta+1.0);
    N = Nx*Ny;
    SIZE = sizeof(float)*N;
    printf("Reynolds Number: %d, X-Grid: %d, Y=Grid: %d, GridSize=%f, dt=%f\n", ReN, Nx, Ny, delta, dt);

    float *U, *V, *W, *Psi;
    U = (float *)malloc(SIZE);
    V = (float *)malloc(SIZE);
    W = (float *)malloc(SIZE);
    Psi=(float *)malloc(SIZE);

    if(check == 1)
        CavityCPU(U, V, W, Psi, Nx, Ny, delta, ReN, dt);
    else if(check ==2)
        CavityCUDA(U, V, W, Psi, Nx, Ny, delta, ReN, dt);
    ParaWriter(check, U, V, W, Psi, ReN, Lx, Ly, delta, dt, Nx, Ny);
    TechWriter(check, U, V, W, Psi, ReN, Lx, Ly, delta, dt, Nx, Ny);
    free(U);
    free(V);
    free(W);
    free(Psi);
}
void ApplyIC(float *U, float *V, int Nx, int Ny)
{
    int i,j;
    j = Ny-1;
    for( i = 0 ; i < Nx ; i++)
    {
        int pos = position(i,j);
        U[pos]=Uw;
    }
    return;
}
void ApplyBCCPU(float *W, float *Wnew, float *Psi, int Nx, int Ny, float delta)
{
    int i, j, pos, SIZE=sizeof(float)*Nx*Ny;
    for (i=0;i<Nx;i++)
    {
        j=0;
        pos = position(i,j);
        W[pos]=2.0*(Psi[pos]-Psi[pos+Nx])/(delta*delta);
        j=Ny-1;
        pos = position(i,j);
        W[pos] = 2.0*(Psi[pos] - Psi[pos-Nx]) / (delta*delta) - 2.0*Uw/delta;
    }
    for(j=0;j<Ny;j++)
    {
        i=0;
        pos=position(i,j);
        W[pos]=2.0*(Psi[pos]-Psi[pos+1])/(delta*delta);
        i=Nx-1;
        pos=position(i,j);
        W[pos]=2.0*(Psi[pos]-Psi[pos-1])/(delta*delta);
    }
    memcpy(Wnew, W, SIZE);
    return;
}
void VorticityCPU(float *U, float *V, float *W, float *Wnew, float *Psi, float dt, float delta, int ReN, int Nx, int Ny)
{
    int i, j, pos;
    float c = 0.5*dt/delta;
    float d = dt/((float)ReN*delta*delta);
    for(j=1;j<Ny-1;j++)
    {
        for(i=1;i<Nx-1;i++)
        {
            pos=position(i,j);
            Wnew[pos] = (1.0 - 4.0*d)*W[pos] + (d - c*U[pos + 1])*W[pos + 1] + (d + c*U[pos - 1])*W[pos - 1] + (d - c*V[pos + Nx])*W[pos + Nx] + (d + c*V[pos - Nx])*W[pos - Nx];
        }
    }
    return;
}
void StreamCPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta )
{
    int i,j,pos,SIZE=sizeof(float)*Nx*Ny;
    int iter=0;
    float error=1.0;
    do{
	    for (j = 1; j < Ny - 1; j++)
		{
			for (i = 1; i < Nx - 1; i++)
			{
				pos = position(i, j);
				Psinew[pos] = 0.25*(Psi[pos+1] + Psinew[pos-1]+ Psi[pos+Nx]+ Psinew[pos-Nx]+ delta*delta*Wnew[pos]);
			}
		}
		iter++;
        if(iter%100==0)
            error = ErckCPU(Psi, Psinew, Nx, Ny);
        memcpy(Psi, Psinew, SIZE);
    } while(error >= ERMAX);
    return;
}
void VeloCalcCPU(float *U, float *V, float *Psi, int Nx, int Ny, float delta)
{
    int i,j,pos;
	for (j = 1; j < Ny-1; j++)
	{
		for (i = 1; i < Nx-1; i++)
		{
			pos = position(i, j);
			U[pos] = (Psi[pos + Nx] - Psi[pos - Nx]) / (2.0*delta);
			V[pos] = -(Psi[pos + 1] - Psi[pos - 1]) / (2.0*delta);
		}
	}
    return;
}
float ErckCPU(float *W, float *Wnew, int Nx, int Ny)
{
    int i,j,pos;
    float error = 0.0;
	for (j = 1; j < Ny-1; j++)
	{
		for (i = 1; i < Nx-1; i++)
		{
			pos = position(i, j);
			float ER = abs(Wnew[pos] - W[pos]);
			error += ER*ER;
		}
	}
	error = sqrt(error / ((float)((Nx-2)*(Ny-2))));
	return error;
}
void CavityCPU(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt)
{
    float *Wnew,*Psinew;
    int N=Nx*Ny;
    int SIZE=sizeof(float)*N;
    Wnew = (float *)malloc(SIZE);
    Psinew = (float *)malloc(SIZE);
    memset(U, 0.0, SIZE);
    memset(V, 0.0, SIZE);
    memset(W, 0.0, SIZE);
    memset(Wnew, 0.0, SIZE);
    memset(Psi, 0.0, SIZE);
    memset(Psinew, 0.0, SIZE);
    float timer = 0.0, error = 1.0;
    int iter = 0;
    ApplyIC(U, V, Nx, Ny);
    do{
        ApplyBCCPU(W, Wnew, Psi, Nx, Ny, delta);
        VorticityCPU(U, V, W, Wnew, Psi, dt, delta, ReN, Nx, Ny);
        StreamCPU(Wnew, Psi, Psinew, Nx, Ny, delta);
        VeloCalcCPU(U, V, Psi, Nx, Ny, delta);
        iter++;
        timer += dt;
        if(iter%100==0)
            error = ErckCPU(W, Wnew, Nx, Ny);
        printf("Time: %.6f, Iter: %d, Error: %.9f\r", timer, iter, error);
        memcpy(W, Wnew, SIZE);
    } while(error >= ERMAX);
    printf("\n");
    free(Wnew);
    free(Psinew);
    return;
}
__global__ void ApplyBCGPU(float *W, float *Wnew, float *Psi, int Nx, int Ny, float delta)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    //printf("blockDim.x=%d, Ny=%d\n", blockDim.x, Ny);
    if(threadIdx.x == 0)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx+Nx])/(delta*delta);
        Wnew[idx]=W[idx];
        return;
    }
    if(threadIdx.x == Ny-1)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx-Nx])/(delta*delta)-2.0*Uw/delta;
        Wnew[idx]=W[idx];
        return;
    }
    if(blockIdx.x == 0)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx+1])/(delta*delta);
        Wnew[idx]=W[idx];
        return;
    }
    if(blockIdx.x == Nx-1)
    {
        W[idx]=2.0*(Psi[idx]-Psi[idx-1])/(delta*delta);
        Wnew[idx]=W[idx];
        return;
    }
}
__global__ void VorticityGPU(float *U, float *V, float *W, float *Wnew, float *Psi, float c, float d, int Nx, int Ny)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    if(threadIdx.x == 0)
        return;
    if(threadIdx.x==Ny-1)
        return;
    if(blockIdx.x==0)
        return;
    if(blockIdx.x==Nx-1)
        return;
    Wnew[idx]=(1.0-4.0*d)*W[idx]+(d-c*U[idx+1])*W[idx+1]+(d+c*U[idx-1])*W[idx-1]+(d-c*V[idx+Nx])*W[idx+Nx]+(d+c*V[idx-Nx])*W[idx-Nx];
    return;
}
__global__ void _StreamGPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    if(threadIdx.x ==0)
        return;
    if(threadIdx.x == Ny-1)
        return;
    if(blockIdx.x == 0)
        return;
    if(blockIdx.x == Nx-1)
        return;
    Psinew[idx] = 0.25*(Psi[idx+1]+Psi[idx-1]+Psi[idx+Nx]+Psi[idx-Nx]+delta*delta*Wnew[idx]);
    return;
}
float ErckGPU(float *W, float *Wnew, int Nx, int Ny)
{
    float error=0.0;
    float *W_h, *Wnew_h;
    int SIZE = sizeof(float)*Nx*Ny;
    W_h = (float *)malloc(SIZE);
    Wnew_h=(float *)malloc(SIZE);
    hipMemcpy(W_h, W, SIZE, hipMemcpyDeviceToHost);
    hipMemcpy(Wnew_h, Wnew, SIZE, hipMemcpyDeviceToHost);
    hipDeviceSynchronize();
    error = ErckCPU(W_h, Wnew_h, Nx, Ny);
    return error;
}
void StreamGPU(float *Wnew, float *Psi, float *Psinew, int Nx, int Ny, float delta, dim3 bs, dim3 ts)
{
    int iter=0, SIZE = sizeof(float)*Nx*Ny;
    float error=1.0;
    do{
        iter++;
        _StreamGPU <<< bs, ts>>> (Wnew, Psi, Psinew, Nx, Ny, delta);
        hipDeviceSynchronize();
        if(iter%100==0)
            error = ErckGPU(Psi, Psinew, Nx, Ny);
        hipMemcpy(Psi, Psinew, SIZE, hipMemcpyDeviceToDevice);
    }while(error >= ERMAX);
    return;
}
__global__ void VeloCalcGPU(float *U, float *V, float *Psi, int Nx, int Ny, float delta)
{
    int idx = blockIdx.x*blockDim.x+threadIdx.x;
    if(threadIdx.x == 0)
        return;
    if(threadIdx.x == Ny-1)
        return;
    if(blockIdx.x == 0)
        return;
    if(blockIdx.x == Nx-1)
        return;
    U[idx] = (Psi[idx+Nx]-Psi[idx-Nx])/(2.0*delta);
    V[idx] = -(Psi[idx+1]-Psi[idx-1])/(2.0*delta);
    return;
}
void CavityCUDA(float *U, float *V, float *W, float *Psi, int Nx, int Ny, float delta, int ReN, float dt)
{
    float *U_dev, *V_dev, *W_dev, *Psi_dev, *Wnew_dev, *Psinew_dev;
    float c = 0.5*dt/delta;
    float d = dt/((float)ReN*delta*delta);
    int N=Nx*Ny;
    int SIZE=sizeof(float)*N;
    ApplyIC(U, V, Nx, Ny);
    hipMalloc( (void**)& U_dev, SIZE);
    hipMalloc( (void**)& V_dev, SIZE);
    hipMalloc( (void**)& W_dev, SIZE);
    hipMalloc( (void**)& Wnew_dev, SIZE);
    hipMalloc( (void**)& Psi_dev, SIZE);
    hipMalloc( (void**)& Psinew_dev, SIZE);

    hipMemset( U_dev, 0.0, SIZE);
    hipMemset( V_dev, 0.0, SIZE);
    hipMemset( W_dev, 0.0, SIZE);
    hipMemset( Wnew_dev, 0.0, SIZE);
    hipMemset( Psi_dev, 0.0, SIZE);
    hipMemset(Psinew_dev, 0.0, SIZE);

    hipMemcpy(U_dev, U, SIZE, hipMemcpyHostToDevice);
    hipMemcpy(V_dev, V, SIZE, hipMemcpyHostToDevice);
    hipMemcpy(W_dev, W, SIZE, hipMemcpyHostToDevice);
    hipMemcpy(Wnew_dev, W, SIZE, hipMemcpyHostToDevice);
    hipMemcpy(Psi_dev, Psi, SIZE, hipMemcpyHostToDevice);
    hipMemcpy(Psinew_dev, Psi, SIZE, hipMemcpyHostToDevice);

    dim3 bs(Ny,1,1);
    dim3 ts(Nx,1,1);

    float timer=0.0, error=1.0;
    int iter=0;
    do{
        ApplyBCGPU <<<bs,ts>>> (W_dev, Wnew_dev, Psi_dev, Nx, Ny, delta);
        hipDeviceSynchronize();
        VorticityGPU <<<bs,ts>>> (U_dev, V_dev, W_dev, Wnew_dev, Psi_dev, c, d, Nx, Ny);
        StreamGPU(Wnew_dev, Psi_dev, Psinew_dev, Nx, Ny, delta, bs, ts);
        VeloCalcGPU <<<bs,ts>>> (U_dev, V_dev, Psi_dev, Nx, Ny, delta);
        hipDeviceSynchronize();
        iter++;
        if(iter%100==0)
            error = ErckGPU(W_dev, Wnew_dev, Nx, Ny);
        //iter++;
        timer+=dt;
        printf("Time: %.6f, Iter: %d, Error: %.9f\r", timer, iter, error);
        hipMemcpy(W_dev, Wnew_dev, SIZE, hipMemcpyDeviceToDevice);
        hipDeviceSynchronize();
    } while(error >= ERMAX);
    hipMemcpy(U, U_dev, SIZE, hipMemcpyDeviceToHost);
    hipMemcpy(V, V_dev, SIZE, hipMemcpyDeviceToHost);
    hipMemcpy(W, W_dev, SIZE, hipMemcpyDeviceToHost);
    hipMemcpy(Psi, Psi_dev, SIZE, hipMemcpyDeviceToHost);

    hipFree(U_dev);
    hipFree(V_dev);
    hipFree(W_dev);
    hipFree(Wnew_dev);
    hipFree(Psi_dev);
    hipFree(Psinew_dev);
    return;
}
void ParaWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny)
{
    FILE *PR;
    char name[150] = "Error";
    if(checker==1)
        sprintf(name, "CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv", ReN, delta, Lx, Ly, dt);
    else if(checker==2)
        sprintf(name, "GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv", ReN, delta, Lx, Ly, dt);
    PR = fopen(name, "w");
    int i,j;
    fprintf(PR,"X,Y,U,V,Vorticity,StreamFunction\n");
    for( j = 0 ; j < Ny ; j++ )
    {
        for( i = 0 ; i < Nx ; i++ )
        {
            float x = xp(i);
            float y = yp(j);
            int pos = position(i, j);
            fprintf(PR, "%f,%f,%f,%f,%f,%f\n", x,y,U[pos],V[pos],W[pos],Psi[pos]);
        }
    }
    fclose(PR);
    return;
}
void TechWriter(int checker, float *U, float *V, float *W, float *Psi, int ReN, float Lx, float Ly, float delta, float dt, int Nx, int Ny)
{
	FILE *TP;
	char name[150] = "Error";
	if(checker==1)
        sprintf(name, "CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat", ReN, delta, Lx, Ly, dt);
	else if(checker==2)
        sprintf(name, "GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat", ReN, delta, Lx, Ly, dt);
    TP = fopen(name, "w");
	int i, j;
	fprintf(TP, "VARIABLES = X, Y, U, V, Vorticity, StreamFunction\n");
	fprintf(TP, "zone i=%d j=%d\n", Nx, Ny);
	for (j = 0; j < Ny; j++)
	{
		for (i = 0; i < Nx; i++)
		{
			double x = xp(i);
			double y = yp(j);
			int pos = position(i, j);
			fprintf(TP, "%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", x, y, U[pos], V[pos], W[pos], Psi[pos]);
		}
	}
	fclose(TP);
}

	.text
	.file	"Cavity04.hip"
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	_Z13CavityComputev
	xorl	%eax, %eax
	popq	%rcx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
                                        # -- End function
	.globl	_Z6Callerv                      # -- Begin function _Z6Callerv
	.type	_Z6Callerv,@function
_Z6Callerv:                             # @_Z6Callerv
	.cfi_startproc
# %bb.0:
	jmp	_Z13CavityComputev              # TAILCALL
.Lfunc_end1:
	.size	_Z6Callerv, .Lfunc_end1-_Z6Callerv
	.cfi_endproc
                                        # -- End function
	.globl	_Z13CavityComputev              # -- Begin function _Z13CavityComputev
	.type	_Z13CavityComputev,@function
_Z13CavityComputev:                     # @_Z13CavityComputev
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	_Z19GetComputeConditionv
	movl	%eax, %ecx
	addl	$-3, %ecx
	cmpl	$-3, %ecx
	ja	.LBB2_2
# %bb.1:
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$1, %eax
.LBB2_2:
	movl	%eax, %edi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Z11ComputeMaini                # TAILCALL
.Lfunc_end2:
	.size	_Z13CavityComputev, .Lfunc_end2-_Z13CavityComputev
	.cfi_endproc
                                        # -- End function
	.globl	_Z19GetComputeConditionv        # -- Begin function _Z19GetComputeConditionv
	.type	_Z19GetComputeConditionv,@function
_Z19GetComputeConditionv:               # @_Z19GetComputeConditionv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -16
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	leaq	12(%rsp), %rbx
	movl	$.L.str.2, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	__isoc23_scanf
	movl	(%rbx), %eax
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z19GetComputeConditionv, .Lfunc_end3-_Z19GetComputeConditionv
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z11ComputeMaini
.LCPI4_0:
	.quad	0x3f70101020000000              # double 0.0039215688593685627
.LCPI4_1:
	.quad	0x3eb0c6f7a0000000              # double 9.9999999747524271E-7
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI4_2:
	.long	0x3b808081                      # float 0.00392156886
.LCPI4_3:
	.long	0x358637bd                      # float 9.99999997E-7
.LCPI4_4:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z11ComputeMaini
	.type	_Z11ComputeMaini,@function
_Z11ComputeMaini:                       # @_Z11ComputeMaini
	.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
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edi, %ebx
	movsd	.LCPI4_0(%rip), %xmm0           # xmm0 = mem[0],zero
	movsd	.LCPI4_1(%rip), %xmm1           # xmm1 = mem[0],zero
	movl	$.L.str.4, %edi
	movl	$1000, %esi                     # imm = 0x3E8
	movl	$256, %edx                      # imm = 0x100
	movl	$256, %ecx                      # imm = 0x100
	movb	$2, %al
	callq	printf
	movl	$262144, %edi                   # imm = 0x40000
	callq	malloc
	movq	%rax, %r14
	movl	$262144, %edi                   # imm = 0x40000
	callq	malloc
	movq	%rax, %r15
	movl	$262144, %edi                   # imm = 0x40000
	callq	malloc
	movq	%rax, %r12
	movl	$262144, %edi                   # imm = 0x40000
	callq	malloc
	movq	%rax, %r13
	cmpl	$2, %ebx
	je	.LBB4_3
# %bb.1:
	cmpl	$1, %ebx
	jne	.LBB4_5
# %bb.2:
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movss	.LCPI4_2(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI4_3(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movl	$256, %r8d                      # imm = 0x100
	movl	$256, %r9d                      # imm = 0x100
	pushq	$1000                           # imm = 0x3E8
	.cfi_adjust_cfa_offset 8
	callq	_Z9CavityCPUPfS_S_S_iifif
	jmp	.LBB4_4
.LBB4_3:
	.cfi_def_cfa_offset 64
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movss	.LCPI4_2(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI4_3(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movl	$256, %r8d                      # imm = 0x100
	movl	$256, %r9d                      # imm = 0x100
	pushq	$1000                           # imm = 0x3E8
	.cfi_adjust_cfa_offset 8
	callq	_Z10CavityCUDAPfS_S_S_iifif
.LBB4_4:
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
.LBB4_5:
	movl	$256, %ebp                      # imm = 0x100
	movss	.LCPI4_4(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI4_2(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	movss	.LCPI4_3(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	%r13, %r8
	movl	$1000, %r9d                     # imm = 0x3E8
	movaps	%xmm0, %xmm1
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	callq	_Z10ParaWriteriPfS_S_S_iffffii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	%r13, %r8
	movl	$1000, %r9d                     # imm = 0x3E8
	movss	.LCPI4_4(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm1
	movss	.LCPI4_2(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	movss	.LCPI4_3(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	callq	_Z10TechWriteriPfS_S_S_iffffii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	%r14, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
	movq	%r12, %rdi
	callq	free
	movq	%r13, %rdi
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.Lfunc_end4:
	.size	_Z11ComputeMaini, .Lfunc_end4-_Z11ComputeMaini
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z9CavityCPUPfS_S_S_iifif
.LCPI5_0:
	.long	0x3f800000                      # float 1
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI5_1:
	.quad	0x3ea0c6f7a0b5ed8d              # double 4.9999999999999998E-7
	.text
	.globl	_Z9CavityCPUPfS_S_S_iifif
	.type	_Z9CavityCPUPfS_S_S_iifif,@function
_Z9CavityCPUPfS_S_S_iifif:              # @_Z9CavityCPUPfS_S_S_iifif
	.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	$104, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	movss	%xmm0, (%rsp)                   # 4-byte Spill
                                        # kill: def $r9d killed $r9d def $r9
	movl	%r8d, %ebx
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	160(%rsp), %eax
	movl	%eax, 48(%rsp)                  # 4-byte Spill
	movl	%r8d, %eax
	movq	%r9, 32(%rsp)                   # 8-byte Spill
	imull	%r9d, %eax
	shll	$2, %eax
	movslq	%eax, %rbp
	movl	$1, %edi
	movq	%rbp, %rsi
	callq	calloc@PLT
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movq	%rbp, %rsi
	callq	calloc@PLT
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movq	%r13, 56(%rsp)                  # 8-byte Spill
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%rbp, %rdx
	callq	memset@PLT
	movq	%r12, 88(%rsp)                  # 8-byte Spill
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%rbp, %rdx
	callq	memset@PLT
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rbp, %rdx
	callq	memset@PLT
	movq	%r15, 96(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%rbp, 80(%rsp)                  # 8-byte Spill
	movq	%rbp, %rdx
	callq	memset@PLT
	movq	%rbx, 24(%rsp)                  # 8-byte Spill
	testl	%ebx, %ebx
	jle	.LBB5_3
# %bb.1:                                # %.lr.ph.i
	movq	32(%rsp), %rax                  # 8-byte Reload
	decl	%eax
	movq	24(%rsp), %rdx                  # 8-byte Reload
	imull	%edx, %eax
	movslq	%eax, %rcx
	movl	%edx, %eax
	movq	56(%rsp), %rdx                  # 8-byte Reload
	leaq	(%rdx,%rcx,4), %rcx
	xorl	%edx, %edx
.LBB5_2:                                # =>This Inner Loop Header: Depth=1
	movl	$1065353216, (%rcx,%rdx,4)      # imm = 0x3F800000
	incq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB5_2
.LBB5_3:                                # %_Z7ApplyICPfS_ii.exit.preheader
	movss	.LCPI5_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	xorpd	%xmm0, %xmm0
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	movl	$-1, %r15d
	movl	$1, %ebp
	movq	16(%rsp), %rbx                  # 8-byte Reload
	movq	%r14, 72(%rsp)                  # 8-byte Spill
	movq	24(%rsp), %r13                  # 8-byte Reload
	movq	88(%rsp), %r12                  # 8-byte Reload
.LBB5_4:                                # %_Z7ApplyICPfS_ii.exit
                                        # =>This Inner Loop Header: Depth=1
	movl	%r15d, 52(%rsp)                 # 4-byte Spill
	movl	%ebp, %eax
	imulq	$1374389535, %rax, %rax         # imm = 0x51EB851F
	shrq	$37, %rax
	imull	$100, %eax, %eax
	movl	%eax, 40(%rsp)                  # 4-byte Spill
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	96(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	%r13d, %ecx
	movq	32(%rsp), %r14                  # 8-byte Reload
	movl	%r14d, %r8d
	movss	(%rsp), %xmm0                   # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z10ApplyBCCPUPfS_S_iif
	movq	56(%rsp), %r15                  # 8-byte Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	72(%rsp), %rdx                  # 8-byte Reload
	movq	16(%rsp), %rcx                  # 8-byte Reload
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	(%rsp), %xmm1                   # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movl	48(%rsp), %r9d                  # 4-byte Reload
	pushq	%r14
	.cfi_adjust_cfa_offset 8
	pushq	%r13
	.cfi_adjust_cfa_offset 8
	callq	_Z12VorticityCPUPfS_S_S_S_ffiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	16(%rsp), %rdi                  # 8-byte Reload
	movq	%rbx, %rsi
	movq	64(%rsp), %rdx                  # 8-byte Reload
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	movss	(%rsp), %xmm0                   # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z9StreamCPUPfS_S_iif
	movq	%r15, %rdi
	movl	52(%rsp), %r15d                 # 4-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	16(%rsp), %rbx                  # 8-byte Reload
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	movq	72(%rsp), %r14                  # 8-byte Reload
	movss	(%rsp), %xmm0                   # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z11VeloCalcCPUPfS_S_iif
	addl	%r15d, 40(%rsp)                 # 4-byte Folded Spill
	jne	.LBB5_6
# %bb.5:                                #   in Loop: Header=BB5_4 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	24(%rsp), %rdx                  # 8-byte Reload
                                        # kill: def $edx killed $edx killed $rdx
	movq	32(%rsp), %rcx                  # 8-byte Reload
                                        # kill: def $ecx killed $ecx killed $rcx
	callq	_Z7ErckCPUPfS_ii
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
.LBB5_6:                                #   in Loop: Header=BB5_4 Depth=1
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	12(%rsp), %xmm0                 # 4-byte Folded Reload
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	4(%rsp), %xmm1                  # 4-byte Folded Reload
	movsd	%xmm1, 40(%rsp)                 # 8-byte Spill
	movl	$.L.str.5, %edi
	movl	%ebp, %esi
	movb	$2, %al
	callq	printf
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	80(%rsp), %rdx                  # 8-byte Reload
	callq	memcpy@PLT
	decl	%r15d
	incl	%ebp
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	ucomisd	.LCPI5_1(%rip), %xmm0
	jae	.LBB5_4
# %bb.7:
	movl	$10, %edi
	callq	putchar@PLT
	movq	%rbx, %rdi
	callq	free
	movq	64(%rsp), %rdi                  # 8-byte Reload
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	free                            # TAILCALL
.Lfunc_end5:
	.size	_Z9CavityCPUPfS_S_S_iifif, .Lfunc_end5-_Z9CavityCPUPfS_S_S_iifif
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z10CavityCUDAPfS_S_S_iifif
.LCPI6_0:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI6_2:
	.quad	0x3ea0c6f7a0b5ed8d              # double 4.9999999999999998E-7
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI6_1:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z10CavityCUDAPfS_S_S_iifif
	.type	_Z10CavityCUDAPfS_S_S_iifif,@function
_Z10CavityCUDAPfS_S_S_iifif:            # @_Z10CavityCUDAPfS_S_S_iifif
	.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	$168, %rsp
	.cfi_def_cfa_offset 224
	.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, %ebp
	movq	%rcx, 112(%rsp)                 # 8-byte Spill
	movq	%rdx, 104(%rsp)                 # 8-byte Spill
	movq	%rsi, 96(%rsp)                  # 8-byte Spill
	movss	%xmm1, 40(%rsp)                 # 4-byte Spill
	cvtss2sd	%xmm1, %xmm3
	mulsd	.LCPI6_0(%rip), %xmm3
	xorps	%xmm1, %xmm1
	cvtsi2ssl	224(%rsp), %xmm1
	cvtss2sd	%xmm0, %xmm2
	divsd	%xmm2, %xmm3
	mulss	%xmm0, %xmm1
	movss	%xmm0, 28(%rsp)                 # 4-byte Spill
	mulss	%xmm0, %xmm1
	movl	%r8d, %eax
	imull	%r9d, %eax
	shll	$2, %eax
	testl	%r8d, %r8d
	movq	%rdi, 88(%rsp)                  # 8-byte Spill
	jle	.LBB6_1
# %bb.2:                                # %.lr.ph.i
	leal	-1(%r12), %ecx
	imull	%ebp, %ecx
	movslq	%ecx, %rcx
	movl	%ebp, %esi
	leaq	(%rdi,%rcx,4), %rcx
	xorl	%edx, %edx
.LBB6_3:                                # =>This Inner Loop Header: Depth=1
	movl	$1065353216, (%rcx,%rdx,4)      # imm = 0x3F800000
	incq	%rdx
	cmpq	%rdx, %rsi
	jne	.LBB6_3
# %bb.4:
	movq	%rsi, 48(%rsp)                  # 8-byte Spill
	jmp	.LBB6_5
.LBB6_1:                                # %._Z7ApplyICPfS_ii.exit_crit_edge
	movl	%ebp, %ecx
	movq	%rcx, 48(%rsp)                  # 8-byte Spill
.LBB6_5:                                # %_Z7ApplyICPfS_ii.exit
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm3, %xmm0
	movss	%xmm0, 84(%rsp)                 # 4-byte Spill
	movss	40(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	movss	%xmm0, 80(%rsp)                 # 4-byte Spill
	movslq	%eax, %r13
	leaq	72(%rsp), %r15
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	64(%rsp), %r14
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	32(%rsp), %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	movq	(%r15), %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	hipMemset
	movq	(%r14), %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	hipMemset
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	hipMemset
	leaq	8(%rsp), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	hipMemset
	leaq	16(%rsp), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	hipMemset
	leaq	56(%rsp), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	hipMemset
	movq	(%r15), %rdi
	movq	88(%rsp), %rsi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r14), %rdi
	movq	96(%rsp), %rsi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbx), %rdi
	movq	104(%rsp), %rbx                 # 8-byte Reload
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	8(%rsp), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	16(%rsp), %rax
	movq	(%rax), %rdi
	movq	112(%rsp), %rbx                 # 8-byte Reload
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	56(%rsp), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	movq	%r13, 120(%rsp)                 # 8-byte Spill
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%r12d, %ebx
	btsq	$32, %rbx
	movq	48(%rsp), %r13                  # 8-byte Reload
	btsq	$32, %r13
	xorps	%xmm1, %xmm1
	movss	.LCPI6_1(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 44(%rsp)                 # 4-byte Spill
	movl	$-1, %r15d
	movl	$1, %r14d
	movq	%r13, 48(%rsp)                  # 8-byte Spill
.LBB6_6:                                # =>This Inner Loop Header: Depth=1
	movss	%xmm1, 4(%rsp)                  # 4-byte Spill
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_8
# %bb.7:                                #   in Loop: Header=BB6_6 Depth=1
	movq	32(%rsp), %rdi
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdx
	movl	%ebp, %ecx
	movl	%r12d, %r8d
	movss	28(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z25__device_stub__ApplyBCGPUPfS_S_iif
.LBB6_8:                                #   in Loop: Header=BB6_6 Depth=1
	callq	hipDeviceSynchronize
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_10
# %bb.9:                                #   in Loop: Header=BB6_6 Depth=1
	movq	72(%rsp), %rdi
	movq	64(%rsp), %rsi
	movq	32(%rsp), %rdx
	movq	8(%rsp), %rcx
	movq	16(%rsp), %r8
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movss	92(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	88(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movl	%ebp, %r9d
	pushq	%r12
	.cfi_adjust_cfa_offset 8
	callq	_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
.LBB6_10:                               #   in Loop: Header=BB6_6 Depth=1
	movq	8(%rsp), %rdi
	movq	16(%rsp), %rsi
	movq	56(%rsp), %rdx
	movq	%rbx, 136(%rsp)
	movl	$1, %r9d
	movl	%r9d, 144(%rsp)
	movq	%r13, 152(%rsp)
	movl	%r9d, 160(%rsp)
	movl	144(%rsp), %eax
	movl	%ebp, %ecx
	movl	%r12d, %r8d
	movss	28(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	pushq	%r9
	.cfi_adjust_cfa_offset 8
	pushq	%r13
	.cfi_adjust_cfa_offset 8
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	pushq	%rbx
	.cfi_adjust_cfa_offset 8
	callq	_Z9StreamGPUPfS_S_iif4dim3S0_
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_12
# %bb.11:                               #   in Loop: Header=BB6_6 Depth=1
	movq	72(%rsp), %rdi
	movq	64(%rsp), %rsi
	movq	16(%rsp), %rdx
	movl	%ebp, %ecx
	movl	%r12d, %r8d
	movss	28(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z26__device_stub__VeloCalcGPUPfS_S_iif
.LBB6_12:                               #   in Loop: Header=BB6_6 Depth=1
	movl	%r14d, %eax
	imulq	$1374389535, %rax, %rax         # imm = 0x51EB851F
	shrq	$37, %rax
	movl	%ebp, %r13d
	movq	%r12, %rbp
	imull	$100, %eax, %r12d
	addl	%r15d, %r12d
	callq	hipDeviceSynchronize
	testl	%r12d, %r12d
	movq	%rbp, %r12
	movl	%r13d, %ebp
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	jne	.LBB6_14
# %bb.13:                               #   in Loop: Header=BB6_6 Depth=1
	movq	32(%rsp), %rdi
	movq	8(%rsp), %rsi
	movl	%ebp, %edx
	movl	%r12d, %ecx
	callq	_Z7ErckGPUPfS_ii
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movss	%xmm0, 44(%rsp)                 # 4-byte Spill
.LBB6_14:                               #   in Loop: Header=BB6_6 Depth=1
	addss	40(%rsp), %xmm1                 # 4-byte Folded Reload
	movss	%xmm1, 4(%rsp)                  # 4-byte Spill
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	44(%rsp), %xmm1                 # 4-byte Folded Reload
	movsd	%xmm1, 128(%rsp)                # 8-byte Spill
	movl	$.L.str.5, %edi
	movl	%r14d, %esi
	movb	$2, %al
	callq	printf
	movq	32(%rsp), %rdi
	movq	8(%rsp), %rsi
	movq	120(%rsp), %rdx                 # 8-byte Reload
	movl	$3, %ecx
	callq	hipMemcpy
	callq	hipDeviceSynchronize
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	decl	%r15d
	incl	%r14d
	movsd	128(%rsp), %xmm0                # 8-byte Reload
                                        # xmm0 = mem[0],zero
	ucomisd	.LCPI6_2(%rip), %xmm0
	movq	48(%rsp), %r13                  # 8-byte Reload
	jae	.LBB6_6
# %bb.15:
	movq	72(%rsp), %rsi
	movq	88(%rsp), %rdi                  # 8-byte Reload
	movq	120(%rsp), %rbx                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	64(%rsp), %rsi
	movq	96(%rsp), %rdi                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	32(%rsp), %rsi
	movq	104(%rsp), %rdi                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rsi
	movq	112(%rsp), %rdi                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	72(%rsp), %rdi
	callq	hipFree
	movq	64(%rsp), %rdi
	callq	hipFree
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	56(%rsp), %rdi
	callq	hipFree
	addq	$168, %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_end6:
	.size	_Z10CavityCUDAPfS_S_S_iifif, .Lfunc_end6-_Z10CavityCUDAPfS_S_S_iifif
	.cfi_endproc
                                        # -- End function
	.globl	_Z10ParaWriteriPfS_S_S_iffffii  # -- Begin function _Z10ParaWriteriPfS_S_S_iffffii
	.type	_Z10ParaWriteriPfS_S_S_iffffii,@function
_Z10ParaWriteriPfS_S_S_iffffii:         # @_Z10ParaWriteriPfS_S_S_iffffii
	.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	$248, %rsp
	.cfi_def_cfa_offset 304
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movss	%xmm3, 32(%rsp)                 # 4-byte Spill
	movss	%xmm2, 4(%rsp)                  # 4-byte Spill
	movss	%xmm1, 24(%rsp)                 # 4-byte Spill
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	movl	%r9d, %r14d
	movq	%r8, 80(%rsp)                   # 8-byte Spill
	movq	%rcx, 72(%rsp)                  # 8-byte Spill
	movq	%rdx, 64(%rsp)                  # 8-byte Spill
	movq	%rsi, 56(%rsp)                  # 8-byte Spill
	movl	%edi, %r13d
	movl	312(%rsp), %ebx
	movl	304(%rsp), %ebp
	leaq	96(%rsp), %r15
	movl	$150, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$1869771333, (%r15)             # imm = 0x6F727245
	movb	$114, 4(%r15)
	cmpl	$1, %r13d
	je	.LBB7_1
# %bb.2:
	cmpl	$2, %r13d
	jne	.LBB7_5
# %bb.3:
	movl	$.L.str.8, %esi
	jmp	.LBB7_4
.LBB7_1:
	movl	$.L.str.7, %esi
.LBB7_4:                                # %.sink.split
	xorps	%xmm0, %xmm0
	cvtss2sd	4(%rsp), %xmm0                  # 4-byte Folded Reload
	xorps	%xmm1, %xmm1
	cvtss2sd	8(%rsp), %xmm1                  # 4-byte Folded Reload
	xorps	%xmm2, %xmm2
	cvtss2sd	24(%rsp), %xmm2                 # 4-byte Folded Reload
	xorps	%xmm3, %xmm3
	cvtss2sd	32(%rsp), %xmm3                 # 4-byte Folded Reload
	leaq	96(%rsp), %rdi
	movl	%r14d, %edx
	movb	$4, %al
	callq	sprintf
.LBB7_5:
	leaq	96(%rsp), %rdi
	movl	$.L.str.9, %esi
	callq	fopen
	movl	$.L.str.10, %edi
	movl	$33, %esi
	movl	$1, %edx
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	%rax, %rcx
	callq	fwrite@PLT
	testl	%ebx, %ebx
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	jle	.LBB7_11
# %bb.6:                                # %.preheader.lr.ph
	movl	%ebx, %eax
	movq	%rax, 88(%rsp)                  # 8-byte Spill
	movl	%ebp, %r14d
	xorl	%eax, %eax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	%ebp, 44(%rsp)                  # 4-byte Spill
	movq	48(%rsp), %rbx                  # 8-byte Reload
.LBB7_7:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_9 Depth 2
	testl	%ebp, %ebp
	jle	.LBB7_10
# %bb.8:                                # %.lr.ph
                                        #   in Loop: Header=BB7_7 Depth=1
	movl	8(%rsp), %eax                   # 4-byte Reload
	movq	80(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, 32(%rsp)                  # 8-byte Spill
	movq	72(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %rbp
	movq	64(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %r15
	xorps	%xmm0, %xmm0
	cvtsi2ssl	16(%rsp), %xmm0         # 4-byte Folded Reload
	movq	56(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %r12
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	xorl	%r13d, %r13d
.LBB7_9:                                #   Parent Loop BB7_7 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm2, %xmm2
	cvtss2sd	(%r12,%r13,4), %xmm2
	xorps	%xmm3, %xmm3
	cvtss2sd	(%r15,%r13,4), %xmm3
	xorps	%xmm4, %xmm4
	cvtss2sd	(%rbp,%r13,4), %xmm4
	movq	32(%rsp), %rax                  # 8-byte Reload
	xorps	%xmm5, %xmm5
	cvtss2sd	(%rax,%r13,4), %xmm5
	movl	$.L.str.11, %esi
	movq	%rbx, %rdi
	movsd	24(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movb	$6, %al
	callq	fprintf
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	incq	%r13
	cmpq	%r13, %r14
	jne	.LBB7_9
.LBB7_10:                               # %._crit_edge
                                        #   in Loop: Header=BB7_7 Depth=1
	movq	16(%rsp), %rcx                  # 8-byte Reload
	incq	%rcx
	movl	44(%rsp), %ebp                  # 4-byte Reload
	movq	8(%rsp), %rax                   # 8-byte Reload
	addl	%ebp, %eax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	%rcx, %rax
	movq	%rcx, 16(%rsp)                  # 8-byte Spill
	cmpq	88(%rsp), %rcx                  # 8-byte Folded Reload
	jne	.LBB7_7
.LBB7_11:                               # %._crit_edge42
	movq	48(%rsp), %rdi                  # 8-byte Reload
	addq	$248, %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	fclose                          # TAILCALL
.Lfunc_end7:
	.size	_Z10ParaWriteriPfS_S_S_iffffii, .Lfunc_end7-_Z10ParaWriteriPfS_S_S_iffffii
	.cfi_endproc
                                        # -- End function
	.globl	_Z10TechWriteriPfS_S_S_iffffii  # -- Begin function _Z10TechWriteriPfS_S_S_iffffii
	.type	_Z10TechWriteriPfS_S_S_iffffii,@function
_Z10TechWriteriPfS_S_S_iffffii:         # @_Z10TechWriteriPfS_S_S_iffffii
	.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	$248, %rsp
	.cfi_def_cfa_offset 304
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movss	%xmm3, 32(%rsp)                 # 4-byte Spill
	movss	%xmm2, 4(%rsp)                  # 4-byte Spill
	movss	%xmm1, 24(%rsp)                 # 4-byte Spill
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	movl	%r9d, %r14d
	movq	%r8, 80(%rsp)                   # 8-byte Spill
	movq	%rcx, 72(%rsp)                  # 8-byte Spill
	movq	%rdx, 64(%rsp)                  # 8-byte Spill
	movq	%rsi, 56(%rsp)                  # 8-byte Spill
	movl	%edi, %r13d
	movl	312(%rsp), %ebp
	movl	304(%rsp), %ebx
	leaq	96(%rsp), %r15
	movl	$150, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$1869771333, (%r15)             # imm = 0x6F727245
	movb	$114, 4(%r15)
	cmpl	$1, %r13d
	je	.LBB8_1
# %bb.2:
	cmpl	$2, %r13d
	jne	.LBB8_5
# %bb.3:
	movl	$.L.str.13, %esi
	jmp	.LBB8_4
.LBB8_1:
	movl	$.L.str.12, %esi
.LBB8_4:                                # %.sink.split
	xorps	%xmm0, %xmm0
	cvtss2sd	4(%rsp), %xmm0                  # 4-byte Folded Reload
	xorps	%xmm1, %xmm1
	cvtss2sd	8(%rsp), %xmm1                  # 4-byte Folded Reload
	xorps	%xmm2, %xmm2
	cvtss2sd	24(%rsp), %xmm2                 # 4-byte Folded Reload
	xorps	%xmm3, %xmm3
	cvtss2sd	32(%rsp), %xmm3                 # 4-byte Folded Reload
	leaq	96(%rsp), %rdi
	movl	%r14d, %edx
	movb	$4, %al
	callq	sprintf
.LBB8_5:
	leaq	96(%rsp), %rdi
	movl	$.L.str.9, %esi
	callq	fopen
	movq	%rax, %r14
	movl	$.L.str.14, %edi
	movl	$50, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	fwrite@PLT
	xorl	%eax, %eax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movl	$.L.str.15, %esi
	movq	%r14, 48(%rsp)                  # 8-byte Spill
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%ebp, %ecx
	xorl	%eax, %eax
	callq	fprintf
	testl	%ebp, %ebp
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	jle	.LBB8_11
# %bb.6:                                # %.preheader.lr.ph
	movl	%ebp, %eax
	movq	%rax, 88(%rsp)                  # 8-byte Spill
	movl	%ebx, %r15d
	xorl	%eax, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	%ebx, 44(%rsp)                  # 4-byte Spill
	movq	48(%rsp), %r14                  # 8-byte Reload
.LBB8_7:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_9 Depth 2
	testl	%ebx, %ebx
	jle	.LBB8_10
# %bb.8:                                # %.lr.ph
                                        #   in Loop: Header=BB8_7 Depth=1
	movl	8(%rsp), %eax                   # 4-byte Reload
	movq	80(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, 32(%rsp)                  # 8-byte Spill
	movq	72(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %rbp
	movq	64(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %rbx
	xorps	%xmm0, %xmm0
	cvtsi2ssl	16(%rsp), %xmm0         # 4-byte Folded Reload
	movq	56(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %r12
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	xorl	%r13d, %r13d
.LBB8_9:                                #   Parent Loop BB8_7 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm2, %xmm2
	cvtss2sd	(%r12,%r13,4), %xmm2
	xorps	%xmm3, %xmm3
	cvtss2sd	(%rbx,%r13,4), %xmm3
	xorps	%xmm4, %xmm4
	cvtss2sd	(%rbp,%r13,4), %xmm4
	movq	32(%rsp), %rax                  # 8-byte Reload
	xorps	%xmm5, %xmm5
	cvtss2sd	(%rax,%r13,4), %xmm5
	movl	$.L.str.16, %esi
	movq	%r14, %rdi
	movsd	24(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movb	$6, %al
	callq	fprintf
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	incq	%r13
	cmpq	%r13, %r15
	jne	.LBB8_9
.LBB8_10:                               # %._crit_edge
                                        #   in Loop: Header=BB8_7 Depth=1
	movq	16(%rsp), %rcx                  # 8-byte Reload
	incq	%rcx
	movl	44(%rsp), %ebx                  # 4-byte Reload
	movq	8(%rsp), %rax                   # 8-byte Reload
	addl	%ebx, %eax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	%rcx, %rax
	movq	%rcx, 16(%rsp)                  # 8-byte Spill
	cmpq	88(%rsp), %rcx                  # 8-byte Folded Reload
	jne	.LBB8_7
.LBB8_11:                               # %._crit_edge45
	movq	48(%rsp), %rdi                  # 8-byte Reload
	addq	$248, %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	fclose                          # TAILCALL
.Lfunc_end8:
	.size	_Z10TechWriteriPfS_S_S_iffffii, .Lfunc_end8-_Z10TechWriteriPfS_S_S_iffffii
	.cfi_endproc
                                        # -- End function
	.globl	_Z7ApplyICPfS_ii                # -- Begin function _Z7ApplyICPfS_ii
	.type	_Z7ApplyICPfS_ii,@function
_Z7ApplyICPfS_ii:                       # @_Z7ApplyICPfS_ii
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB9_3
# %bb.1:                                # %.lr.ph
	decl	%ecx
	imull	%edx, %ecx
	movslq	%ecx, %rcx
	movl	%edx, %eax
	leaq	(%rdi,%rcx,4), %rcx
	xorl	%edx, %edx
.LBB9_2:                                # =>This Inner Loop Header: Depth=1
	movl	$1065353216, (%rcx,%rdx,4)      # imm = 0x3F800000
	incq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB9_2
.LBB9_3:                                # %._crit_edge
	retq
.Lfunc_end9:
	.size	_Z7ApplyICPfS_ii, .Lfunc_end9-_Z7ApplyICPfS_ii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z10ApplyBCCPUPfS_S_iif
.LCPI10_0:
	.quad	0x4000000000000000              # double 2
	.text
	.globl	_Z10ApplyBCCPUPfS_S_iif
	.type	_Z10ApplyBCCPUPfS_S_iif,@function
_Z10ApplyBCCPUPfS_S_iif:                # @_Z10ApplyBCCPUPfS_S_iif
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
                                        # kill: def $r8d killed $r8d def $r8
	movq	%rsi, %rax
	movq	%rdi, %rsi
	movaps	%xmm0, %xmm1
	mulss	%xmm0, %xmm1
	testl	%ecx, %ecx
	jle	.LBB10_3
# %bb.1:                                # %.lr.ph
	cvtss2sd	%xmm1, %xmm2
	leal	-1(%r8), %r9d
	imull	%ecx, %r9d
	cvtss2sd	%xmm0, %xmm3
	movsd	.LCPI10_0(%rip), %xmm0          # xmm0 = mem[0],zero
	divsd	%xmm3, %xmm0
	movl	%ecx, %edi
	movslq	%r9d, %rbx
	leaq	(%rdx,%rdi,4), %r9
	leaq	(,%rbx,4), %r10
	shlq	$2, %rdi
	subq	%rdi, %r10
	addq	%rdx, %r10
	leaq	(%rdx,%rbx,4), %r11
	leaq	(%rsi,%rbx,4), %rbx
	xorl	%r14d, %r14d
.LBB10_2:                               # =>This Inner Loop Header: Depth=1
	movss	(%rdx,%r14), %xmm3              # xmm3 = mem[0],zero,zero,zero
	subss	(%r9,%r14), %xmm3
	cvtss2sd	%xmm3, %xmm3
	addsd	%xmm3, %xmm3
	divsd	%xmm2, %xmm3
	cvtsd2ss	%xmm3, %xmm3
	movss	%xmm3, (%rsi,%r14)
	movss	(%r11,%r14), %xmm3              # xmm3 = mem[0],zero,zero,zero
	subss	(%r10,%r14), %xmm3
	cvtss2sd	%xmm3, %xmm3
	addsd	%xmm3, %xmm3
	divsd	%xmm2, %xmm3
	subsd	%xmm0, %xmm3
	cvtsd2ss	%xmm3, %xmm3
	movss	%xmm3, (%rbx,%r14)
	addq	$4, %r14
	cmpq	%r14, %rdi
	jne	.LBB10_2
.LBB10_3:                               # %.preheader
	testl	%r8d, %r8d
	jle	.LBB10_6
# %bb.4:                                # %.lr.ph63
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	movslq	%ecx, %rdi
	movl	%r8d, %r9d
	leaq	(%rdx,%rdi,4), %r10
	addq	$-4, %r10
	leaq	(%rsi,%rdi,4), %r11
	addq	$-4, %r11
	shlq	$2, %rdi
	xorl	%ebx, %ebx
.LBB10_5:                               # =>This Inner Loop Header: Depth=1
	movss	(%rdx,%rbx), %xmm1              # xmm1 = mem[0],zero,zero,zero
	subss	4(%rdx,%rbx), %xmm1
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm1, %xmm1
	divsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%rsi,%rbx)
	movss	(%r10,%rbx), %xmm1              # xmm1 = mem[0],zero,zero,zero
	subss	-4(%r10,%rbx), %xmm1
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm1, %xmm1
	divsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%r11,%rbx)
	addq	%rdi, %rbx
	decq	%r9
	jne	.LBB10_5
.LBB10_6:                               # %._crit_edge
	imull	%r8d, %ecx
	shll	$2, %ecx
	movslq	%ecx, %rdx
	movq	%rax, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	memcpy@PLT                      # TAILCALL
.Lfunc_end10:
	.size	_Z10ApplyBCCPUPfS_S_iif, .Lfunc_end10-_Z10ApplyBCCPUPfS_S_iif
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z12VorticityCPUPfS_S_S_S_ffiii
.LCPI11_0:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI11_1:
	.quad	0xc010000000000000              # double -4
.LCPI11_2:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z12VorticityCPUPfS_S_S_S_ffiii
	.type	_Z12VorticityCPUPfS_S_S_S_ffiii,@function
_Z12VorticityCPUPfS_S_S_S_ffiii:        # @_Z12VorticityCPUPfS_S_S_S_ffiii
	.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
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	48(%rsp), %eax
	cmpl	$3, %eax
	jl	.LBB11_6
# %bb.1:                                # %.preheader.lr.ph
	cvtss2sd	%xmm0, %xmm2
	mulsd	.LCPI11_0(%rip), %xmm2
	cvtss2sd	%xmm1, %xmm3
	divsd	%xmm3, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	movl	40(%rsp), %r8d
	xorps	%xmm3, %xmm3
	cvtsi2ss	%r9d, %xmm3
	mulss	%xmm1, %xmm3
	mulss	%xmm1, %xmm3
	divss	%xmm3, %xmm0
	decl	%eax
	leal	-1(%r8), %r14d
	xorps	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm1
	mulsd	.LCPI11_1(%rip), %xmm1
	addsd	.LCPI11_2(%rip), %xmm1
	movslq	%r8d, %rbx
	leaq	(,%rbx,4), %r9
	leaq	4(%rcx,%rbx,4), %rcx
	leaq	8(%rdx,%rbx,4), %r10
	leaq	(%rdi,%rbx,4), %rdi
	addq	$8, %rdi
	leaq	(%rdx,%rbx,8), %r11
	addq	$4, %r11
	leaq	(%rsi,%rbx,8), %rbx
	addq	$4, %rbx
	addq	$4, %rsi
	leaq	-4(,%r14,4), %r14
	movl	$1, %r15d
.LBB11_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB11_4 Depth 2
	cmpl	$3, %r8d
	jl	.LBB11_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB11_2 Depth=1
	xorl	%r12d, %r12d
.LBB11_4:                               #   Parent Loop BB11_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm3, %xmm3
	cvtss2sd	-4(%r10,%r12), %xmm3
	mulsd	%xmm1, %xmm3
	movss	(%rdi,%r12), %xmm4              # xmm4 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm4
	movaps	%xmm0, %xmm5
	subss	%xmm4, %xmm5
	mulss	(%r10,%r12), %xmm5
	xorps	%xmm4, %xmm4
	cvtss2sd	%xmm5, %xmm4
	movss	-8(%rdi,%r12), %xmm5            # xmm5 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm5
	addss	%xmm0, %xmm5
	mulss	-8(%r10,%r12), %xmm5
	addsd	%xmm3, %xmm4
	movss	(%rbx,%r12), %xmm3              # xmm3 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm3
	movaps	%xmm0, %xmm6
	subss	%xmm3, %xmm6
	xorps	%xmm3, %xmm3
	cvtss2sd	%xmm5, %xmm3
	mulss	(%r11,%r12), %xmm6
	addsd	%xmm4, %xmm3
	xorps	%xmm4, %xmm4
	cvtss2sd	%xmm6, %xmm4
	addsd	%xmm3, %xmm4
	movss	(%rsi,%r12), %xmm3              # xmm3 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm3
	addss	%xmm0, %xmm3
	mulss	4(%rdx,%r12), %xmm3
	cvtss2sd	%xmm3, %xmm3
	addsd	%xmm4, %xmm3
	cvtsd2ss	%xmm3, %xmm3
	movss	%xmm3, (%rcx,%r12)
	addq	$4, %r12
	cmpq	%r12, %r14
	jne	.LBB11_4
.LBB11_5:                               # %._crit_edge
                                        #   in Loop: Header=BB11_2 Depth=1
	incq	%r15
	addq	%r9, %rcx
	addq	%r9, %r10
	addq	%r9, %rdi
	addq	%r9, %r11
	addq	%r9, %rbx
	addq	%r9, %rsi
	addq	%r9, %rdx
	cmpq	%rax, %r15
	jne	.LBB11_2
.LBB11_6:                               # %._crit_edge50
	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_end11:
	.size	_Z12VorticityCPUPfS_S_S_S_ffiii, .Lfunc_end11-_Z12VorticityCPUPfS_S_S_S_ffiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z9StreamCPUPfS_S_iif
.LCPI12_0:
	.long	0x3f800000                      # float 1
.LCPI12_1:
	.long	0x3e800000                      # float 0.25
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI12_2:
	.quad	0x3ea0c6f7a0b5ed8d              # double 4.9999999999999998E-7
	.text
	.globl	_Z9StreamCPUPfS_S_iif
	.type	_Z9StreamCPUPfS_S_iif,@function
_Z9StreamCPUPfS_S_iif:                  # @_Z9StreamCPUPfS_S_iif
	.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
                                        # kill: def $r8d killed $r8d def $r8
	movl	%ecx, %r14d
	movl	%ecx, %eax
	imull	%r8d, %eax
	shll	$2, %eax
	movq	%r8, 32(%rsp)                   # 8-byte Spill
	leal	-1(%r8), %ebp
	leal	-1(%r14), %ecx
	mulss	%xmm0, %xmm0
	cltq
	movq	%rax, 80(%rsp)                  # 8-byte Spill
	movslq	%r14d, %rax
	leaq	(,%rax,4), %r13
	leaq	(%rdx,%rax,4), %rbx
	leaq	4(%rsi,%rax,8), %r8
	movq	%r8, 72(%rsp)                   # 8-byte Spill
	movq	%rsi, 16(%rsp)                  # 8-byte Spill
	leaq	8(%rsi,%rax,4), %rsi
	movq	%rsi, 64(%rsp)                  # 8-byte Spill
	leaq	4(%rdi,%rax,4), %rsi
	movq	%rsi, 56(%rsp)                  # 8-byte Spill
	leaq	4(%rdx,%rax,4), %rax
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	%rdx, 24(%rsp)                  # 8-byte Spill
	leaq	4(%rdx), %rax
	movq	%rax, 40(%rsp)                  # 8-byte Spill
	leaq	-4(,%rcx,4), %r12
	movss	.LCPI12_0(%rip), %xmm1          # xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, 8(%rsp)                  # 4-byte Spill
	xorl	%r15d, %r15d
	movss	.LCPI12_1(%rip), %xmm3          # xmm3 = mem[0],zero,zero,zero
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
.LBB12_1:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB12_3 Depth 2
                                        #       Child Loop BB12_5 Depth 3
	cmpl	$3, 32(%rsp)                    # 4-byte Folded Reload
	jl	.LBB12_7
# %bb.2:                                # %.preheader.preheader
                                        #   in Loop: Header=BB12_1 Depth=1
	movl	$1, %eax
	movq	40(%rsp), %rcx                  # 8-byte Reload
	movq	48(%rsp), %rdx                  # 8-byte Reload
	movq	56(%rsp), %rsi                  # 8-byte Reload
	movq	64(%rsp), %rdi                  # 8-byte Reload
	movq	72(%rsp), %r8                   # 8-byte Reload
	xorl	%r9d, %r9d
.LBB12_3:                               # %.preheader
                                        #   Parent Loop BB12_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB12_5 Depth 3
	cmpl	$3, %r14d
	jl	.LBB12_6
# %bb.4:                                # %.lr.ph
                                        #   in Loop: Header=BB12_3 Depth=2
	movq	%r13, %r10
	imulq	%r9, %r10
	movss	(%rbx,%r10), %xmm2              # xmm2 = mem[0],zero,zero,zero
	xorl	%r10d, %r10d
.LBB12_5:                               #   Parent Loop BB12_1 Depth=1
                                        #     Parent Loop BB12_3 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	addss	(%rdi,%r10), %xmm2
	addss	(%r8,%r10), %xmm2
	addss	(%rcx,%r10), %xmm2
	movss	(%rsi,%r10), %xmm1              # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	%xmm2, %xmm1
	mulss	%xmm3, %xmm1
	movss	%xmm1, (%rdx,%r10)
	addq	$4, %r10
	movaps	%xmm1, %xmm2
	cmpq	%r10, %r12
	jne	.LBB12_5
.LBB12_6:                               # %._crit_edge
                                        #   in Loop: Header=BB12_3 Depth=2
	incq	%rax
	incq	%r9
	addq	%r13, %r8
	addq	%r13, %rdi
	addq	%r13, %rsi
	addq	%r13, %rdx
	addq	%r13, %rcx
	cmpq	%rbp, %rax
	jne	.LBB12_3
.LBB12_7:                               # %._crit_edge41
                                        #   in Loop: Header=BB12_1 Depth=1
	incl	%r15d
	imull	$-1030792151, %r15d, %eax       # imm = 0xC28F5C29
	rorl	$2, %eax
	cmpl	$42949672, %eax                 # imm = 0x28F5C28
	ja	.LBB12_9
# %bb.8:                                #   in Loop: Header=BB12_1 Depth=1
	movq	16(%rsp), %rdi                  # 8-byte Reload
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movl	%r14d, %edx
	movq	32(%rsp), %rcx                  # 8-byte Reload
                                        # kill: def $ecx killed $ecx killed $rcx
	callq	_Z7ErckCPUPfS_ii
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
.LBB12_9:                               #   in Loop: Header=BB12_1 Depth=1
	movq	16(%rsp), %rdi                  # 8-byte Reload
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movq	80(%rsp), %rdx                  # 8-byte Reload
	callq	memcpy@PLT
	xorps	%xmm0, %xmm0
	cvtss2sd	8(%rsp), %xmm0                  # 4-byte Folded Reload
	ucomisd	.LCPI12_2(%rip), %xmm0
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI12_1(%rip), %xmm3          # xmm3 = mem[0],zero,zero,zero
	jae	.LBB12_1
# %bb.10:
	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
.Lfunc_end12:
	.size	_Z9StreamCPUPfS_S_iif, .Lfunc_end12-_Z9StreamCPUPfS_S_iif
	.cfi_endproc
                                        # -- End function
	.globl	_Z7ErckCPUPfS_ii                # -- Begin function _Z7ErckCPUPfS_ii
	.type	_Z7ErckCPUPfS_ii,@function
_Z7ErckCPUPfS_ii:                       # @_Z7ErckCPUPfS_ii
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
                                        # kill: def $ecx killed $ecx def $rcx
                                        # kill: def $edx killed $edx def $rdx
	xorps	%xmm1, %xmm1
	xorps	%xmm0, %xmm0
	cmpl	$3, %ecx
	jl	.LBB13_6
# %bb.1:                                # %.preheader.lr.ph
	leal	-1(%rcx), %eax
	leal	-1(%rdx), %r8d
	movl	$1, %r9d
	movl	%edx, %r10d
.LBB13_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_4 Depth 2
	cmpl	$3, %edx
	jl	.LBB13_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB13_2 Depth=1
	movl	%r10d, %ebx
	leaq	(%rdi,%rbx,4), %r11
	leaq	(%rsi,%rbx,4), %rbx
	movl	$1, %r14d
.LBB13_4:                               #   Parent Loop BB13_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rbx,%r14,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	subss	(%r11,%r14,4), %xmm2
	mulss	%xmm2, %xmm2
	addss	%xmm2, %xmm0
	incq	%r14
	cmpq	%r14, %r8
	jne	.LBB13_4
.LBB13_5:                               # %._crit_edge
                                        #   in Loop: Header=BB13_2 Depth=1
	incq	%r9
	addl	%edx, %r10d
	cmpq	%rax, %r9
	jne	.LBB13_2
.LBB13_6:                               # %._crit_edge25
	addl	$-2, %edx
	addl	$-2, %ecx
	imull	%edx, %ecx
	xorps	%xmm2, %xmm2
	cvtsi2ss	%ecx, %xmm2
	divss	%xmm2, %xmm0
	ucomiss	%xmm1, %xmm0
	jb	.LBB13_8
# %bb.7:                                # %._crit_edge25.split
	sqrtss	%xmm0, %xmm0
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB13_8:                               # %call.sqrt
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	sqrtf@PLT                       # TAILCALL
.Lfunc_end13:
	.size	_Z7ErckCPUPfS_ii, .Lfunc_end13-_Z7ErckCPUPfS_ii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z11VeloCalcCPUPfS_S_iif
.LCPI14_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.text
	.globl	_Z11VeloCalcCPUPfS_S_iif
	.type	_Z11VeloCalcCPUPfS_S_iif,@function
_Z11VeloCalcCPUPfS_S_iif:               # @_Z11VeloCalcCPUPfS_S_iif
	.cfi_startproc
# %bb.0:
                                        # kill: def $r8d killed $r8d def $r8
                                        # kill: def $ecx killed $ecx def $rcx
	cmpl	$3, %r8d
	jl	.LBB14_7
# %bb.1:                                # %.preheader.lr.ph
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	decl	%r8d
	leal	-1(%rcx), %r11d
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm0, %xmm0
	movslq	%ecx, %rbx
	leaq	4(%rdx,%rbx,8), %rax
	leaq	(,%rbx,4), %r9
	leaq	8(%rdx,%rbx,4), %r10
	leaq	4(%rsi,%rbx,4), %rsi
	leaq	(%rdi,%rbx,4), %rdi
	addq	$4, %rdi
	leaq	-4(,%r11,4), %r11
	movl	$1, %ebx
	movaps	.LCPI14_0(%rip), %xmm1          # xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
.LBB14_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB14_4 Depth 2
	cmpl	$3, %ecx
	jl	.LBB14_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB14_2 Depth=1
	xorl	%r14d, %r14d
.LBB14_4:                               #   Parent Loop BB14_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rax,%r14), %xmm2              # xmm2 = mem[0],zero,zero,zero
	subss	4(%rdx,%r14), %xmm2
	cvtss2sd	%xmm2, %xmm2
	divsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	movss	%xmm2, (%rdi,%r14)
	movss	(%r10,%r14), %xmm2              # xmm2 = mem[0],zero,zero,zero
	subss	-8(%r10,%r14), %xmm2
	xorps	%xmm1, %xmm2
	cvtss2sd	%xmm2, %xmm2
	divsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	movss	%xmm2, (%rsi,%r14)
	addq	$4, %r14
	cmpq	%r14, %r11
	jne	.LBB14_4
.LBB14_5:                               # %._crit_edge
                                        #   in Loop: Header=BB14_2 Depth=1
	incq	%rbx
	addq	%r9, %rax
	addq	%r9, %r10
	addq	%r9, %rsi
	addq	%r9, %rdi
	addq	%r9, %rdx
	cmpq	%r8, %rbx
	jne	.LBB14_2
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
.LBB14_7:                               # %._crit_edge27
	retq
.Lfunc_end14:
	.size	_Z11VeloCalcCPUPfS_S_iif, .Lfunc_end14-_Z11VeloCalcCPUPfS_S_iif
	.cfi_endproc
                                        # -- End function
	.globl	_Z25__device_stub__ApplyBCGPUPfS_S_iif # -- Begin function _Z25__device_stub__ApplyBCGPUPfS_S_iif
	.type	_Z25__device_stub__ApplyBCGPUPfS_S_iif,@function
_Z25__device_stub__ApplyBCGPUPfS_S_iif: # @_Z25__device_stub__ApplyBCGPUPfS_S_iif
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movss	%xmm0, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z10ApplyBCGPUPfS_S_iif, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.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
	retq
.Lfunc_end15:
	.size	_Z25__device_stub__ApplyBCGPUPfS_S_iif, .Lfunc_end15-_Z25__device_stub__ApplyBCGPUPfS_S_iif
	.cfi_endproc
                                        # -- End function
	.globl	_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii # -- Begin function _Z27__device_stub__VorticityGPUPfS_S_S_S_ffii
	.type	_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii,@function
_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii: # @_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$192, %rsp
	.cfi_def_cfa_offset 240
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	72(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	64(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	56(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	48(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	20(%rsp), %r8
	movss	%xmm0, (%r8)
	leaq	16(%rsp), %r10
	movss	%xmm1, (%r10)
	leaq	12(%rsp), %r11
	movl	%r9d, (%r11)
	leaq	112(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	movq	%r10, 48(%rbx)
	movq	%r11, 56(%rbx)
	leaq	240(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	96(%rsp), %r14
	leaq	80(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z12VorticityGPUPfS_S_S_S_ffii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$208, %rsp
	.cfi_adjust_cfa_offset -208
	popq	%rbx
	.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
	retq
.Lfunc_end16:
	.size	_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii, .Lfunc_end16-_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii
	.cfi_endproc
                                        # -- End function
	.globl	_Z25__device_stub___StreamGPUPfS_S_iif # -- Begin function _Z25__device_stub___StreamGPUPfS_S_iif
	.type	_Z25__device_stub___StreamGPUPfS_S_iif,@function
_Z25__device_stub___StreamGPUPfS_S_iif: # @_Z25__device_stub___StreamGPUPfS_S_iif
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movss	%xmm0, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z10_StreamGPUPfS_S_iif, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.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
	retq
.Lfunc_end17:
	.size	_Z25__device_stub___StreamGPUPfS_S_iif, .Lfunc_end17-_Z25__device_stub___StreamGPUPfS_S_iif
	.cfi_endproc
                                        # -- End function
	.globl	_Z7ErckGPUPfS_ii                # -- Begin function _Z7ErckGPUPfS_ii
	.type	_Z7ErckGPUPfS_ii,@function
_Z7ErckGPUPfS_ii:                       # @_Z7ErckGPUPfS_ii
	.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
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%ecx, %ebx
	movl	%edx, %ebp
	movq	%rsi, (%rsp)                    # 8-byte Spill
	movq	%rdi, %r15
	movl	%edx, %eax
	imull	%ecx, %eax
	shll	$2, %eax
	movslq	%eax, %r12
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	%r14, %rdi
	movq	(%rsp), %rsi                    # 8-byte Reload
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	callq	hipDeviceSynchronize
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ebp, %edx
	movl	%ebx, %ecx
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	_Z7ErckCPUPfS_ii                # TAILCALL
.Lfunc_end18:
	.size	_Z7ErckGPUPfS_ii, .Lfunc_end18-_Z7ErckGPUPfS_ii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z9StreamGPUPfS_S_iif4dim3S0_
.LCPI19_0:
	.long	0x3f800000                      # float 1
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI19_1:
	.quad	0x3ea0c6f7a0b5ed8d              # double 4.9999999999999998E-7
	.text
	.globl	_Z9StreamGPUPfS_S_iif4dim3S0_
	.type	_Z9StreamGPUPfS_S_iif4dim3S0_,@function
_Z9StreamGPUPfS_S_iif4dim3S0_:          # @_Z9StreamGPUPfS_S_iif4dim3S0_
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movss	%xmm0, 20(%rsp)                 # 4-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, 32(%rsp)                  # 8-byte Spill
	movl	%ecx, 8(%rsp)                   # 4-byte Spill
	movl	%ecx, %eax
	movl	%r8d, 12(%rsp)                  # 4-byte Spill
	imull	%r8d, %eax
	shll	$2, %eax
	movq	112(%rsp), %rcx
	movq	%rcx, 48(%rsp)                  # 8-byte Spill
	movl	120(%rsp), %ecx
	movl	%ecx, 28(%rsp)                  # 4-byte Spill
	movq	128(%rsp), %rcx
	movq	%rcx, 40(%rsp)                  # 8-byte Spill
	movl	136(%rsp), %ecx
	movl	%ecx, 24(%rsp)                  # 4-byte Spill
	movslq	%eax, %r13
	movss	.LCPI19_0(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 16(%rsp)                 # 4-byte Spill
	movl	$-1, %r12d
	movl	$1, %ebx
.LBB19_1:                               # =>This Inner Loop Header: Depth=1
	movq	48(%rsp), %rdi                  # 8-byte Reload
	movl	28(%rsp), %esi                  # 4-byte Reload
	movq	40(%rsp), %rdx                  # 8-byte Reload
	movl	24(%rsp), %ecx                  # 4-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB19_3
# %bb.2:                                #   in Loop: Header=BB19_1 Depth=1
	movq	32(%rsp), %rdi                  # 8-byte Reload
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	8(%rsp), %ecx                   # 4-byte Reload
	movl	12(%rsp), %r8d                  # 4-byte Reload
	movss	20(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z25__device_stub___StreamGPUPfS_S_iif
.LBB19_3:                               #   in Loop: Header=BB19_1 Depth=1
	movl	%ebx, %eax
	imulq	$1374389535, %rax, %rax         # imm = 0x51EB851F
	shrq	$37, %rax
	imull	$100, %eax, %ebp
	addl	%r12d, %ebp
	callq	hipDeviceSynchronize
	testl	%ebp, %ebp
	jne	.LBB19_5
# %bb.4:                                #   in Loop: Header=BB19_1 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	8(%rsp), %edx                   # 4-byte Reload
	movl	12(%rsp), %ecx                  # 4-byte Reload
	callq	_Z7ErckGPUPfS_ii
	movss	%xmm0, 16(%rsp)                 # 4-byte Spill
.LBB19_5:                               #   in Loop: Header=BB19_1 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	movl	$3, %ecx
	callq	hipMemcpy
	xorps	%xmm0, %xmm0
	cvtss2sd	16(%rsp), %xmm0                 # 4-byte Folded Reload
	decl	%r12d
	incl	%ebx
	ucomisd	.LCPI19_1(%rip), %xmm0
	jae	.LBB19_1
# %bb.6:
	addq	$56, %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_end19:
	.size	_Z9StreamGPUPfS_S_iif4dim3S0_, .Lfunc_end19-_Z9StreamGPUPfS_S_iif4dim3S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__VeloCalcGPUPfS_S_iif # -- Begin function _Z26__device_stub__VeloCalcGPUPfS_S_iif
	.type	_Z26__device_stub__VeloCalcGPUPfS_S_iif,@function
_Z26__device_stub__VeloCalcGPUPfS_S_iif: # @_Z26__device_stub__VeloCalcGPUPfS_S_iif
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movss	%xmm0, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z11VeloCalcGPUPfS_S_iif, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.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
	retq
.Lfunc_end20:
	.size	_Z26__device_stub__VeloCalcGPUPfS_S_iif, .Lfunc_end20-_Z26__device_stub__VeloCalcGPUPfS_S_iif
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB21_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB21_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z10ApplyBCGPUPfS_S_iif, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12VorticityGPUPfS_S_S_S_ffii, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z10_StreamGPUPfS_S_iif, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11VeloCalcGPUPfS_S_iif, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end21:
	.size	__hip_module_ctor, .Lfunc_end21-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB22_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB22_2:
	retq
.Lfunc_end22:
	.size	__hip_module_dtor, .Lfunc_end22-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"Compute What? "
	.size	.L.str.1, 15

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

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Reynolds Number: %d, X-Grid: %d, Y=Grid: %d, GridSize=%f, dt=%f\n"
	.size	.L.str.4, 65

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Time: %.6f, Iter: %d, Error: %.9f\r"
	.size	.L.str.5, 35

	.type	_Z10ApplyBCGPUPfS_S_iif,@object # @_Z10ApplyBCGPUPfS_S_iif
	.section	.rodata,"a",@progbits
	.globl	_Z10ApplyBCGPUPfS_S_iif
	.p2align	3, 0x0
_Z10ApplyBCGPUPfS_S_iif:
	.quad	_Z25__device_stub__ApplyBCGPUPfS_S_iif
	.size	_Z10ApplyBCGPUPfS_S_iif, 8

	.type	_Z12VorticityGPUPfS_S_S_S_ffii,@object # @_Z12VorticityGPUPfS_S_S_S_ffii
	.globl	_Z12VorticityGPUPfS_S_S_S_ffii
	.p2align	3, 0x0
_Z12VorticityGPUPfS_S_S_S_ffii:
	.quad	_Z27__device_stub__VorticityGPUPfS_S_S_S_ffii
	.size	_Z12VorticityGPUPfS_S_S_S_ffii, 8

	.type	_Z10_StreamGPUPfS_S_iif,@object # @_Z10_StreamGPUPfS_S_iif
	.globl	_Z10_StreamGPUPfS_S_iif
	.p2align	3, 0x0
_Z10_StreamGPUPfS_S_iif:
	.quad	_Z25__device_stub___StreamGPUPfS_S_iif
	.size	_Z10_StreamGPUPfS_S_iif, 8

	.type	_Z11VeloCalcGPUPfS_S_iif,@object # @_Z11VeloCalcGPUPfS_S_iif
	.globl	_Z11VeloCalcGPUPfS_S_iif
	.p2align	3, 0x0
_Z11VeloCalcGPUPfS_S_iif:
	.quad	_Z26__device_stub__VeloCalcGPUPfS_S_iif
	.size	_Z11VeloCalcGPUPfS_S_iif, 8

	.type	.L.str.7,@object                # @.str.7
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.7:
	.asciz	"CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv"
	.size	.L.str.7, 50

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.csv"
	.size	.L.str.8, 50

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

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"X,Y,U,V,Vorticity,StreamFunction\n"
	.size	.L.str.10, 34

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"%f,%f,%f,%f,%f,%f\n"
	.size	.L.str.11, 19

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"CPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat"
	.size	.L.str.12, 50

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"GPU, Re=%d, delta=%f, Lx=%.1f, Ly=%.1f, dt=%f.dat"
	.size	.L.str.13, 50

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"VARIABLES = X, Y, U, V, Vorticity, StreamFunction\n"
	.size	.L.str.14, 51

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"zone i=%d j=%d\n"
	.size	.L.str.15, 16

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n"
	.size	.L.str.16, 25

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z10ApplyBCGPUPfS_S_iif"
	.size	.L__unnamed_1, 24

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z12VorticityGPUPfS_S_S_S_ffii"
	.size	.L__unnamed_2, 31

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z10_StreamGPUPfS_S_iif"
	.size	.L__unnamed_3, 24

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z11VeloCalcGPUPfS_S_iif"
	.size	.L__unnamed_4, 25

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.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	"Wrong Input, Compute CPU"
	.size	.Lstr, 25

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"1: CPU, 2: CUDA"
	.size	.Lstr.1, 16

	.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 _Z25__device_stub__ApplyBCGPUPfS_S_iif
	.addrsig_sym _Z27__device_stub__VorticityGPUPfS_S_S_S_ffii
	.addrsig_sym _Z25__device_stub___StreamGPUPfS_S_iif
	.addrsig_sym _Z26__device_stub__VeloCalcGPUPfS_S_iif
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z10ApplyBCGPUPfS_S_iif
	.addrsig_sym _Z12VorticityGPUPfS_S_S_S_ffii
	.addrsig_sym _Z10_StreamGPUPfS_S_iif
	.addrsig_sym _Z11VeloCalcGPUPfS_S_iif
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z10ApplyBCGPUPfS_S_iif ; -- Begin function _Z10ApplyBCGPUPfS_S_iif
	.globl	_Z10ApplyBCGPUPfS_S_iif
	.p2align	8
	.type	_Z10ApplyBCGPUPfS_S_iif,@function
_Z10ApplyBCGPUPfS_S_iif:                ; @_Z10ApplyBCGPUPfS_S_iif
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x34
	s_load_b64 s[8:9], s[0:1], 0x10
	s_load_b128 s[4:7], s[0:1], 0x18
	s_mov_b32 s3, exec_lo
                                        ; implicit-def: $vgpr3_vgpr4
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, 0
	v_cmpx_ne_u32_e32 0, v0
	s_xor_b32 s3, exec_lo, s3
	s_cbranch_execz .LBB0_14
; %bb.1:
	s_add_i32 s2, s5, -1
	s_mov_b32 s7, -1
	v_cmp_ne_u32_e32 vcc_lo, s2, v0
	s_mov_b32 s5, 0
                                        ; implicit-def: $vgpr3_vgpr4
	s_and_saveexec_b32 s2, vcc_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s2, exec_lo, s2
	s_cbranch_execz .LBB0_11
; %bb.2:
	s_cmp_lg_u32 s15, 0
	s_cbranch_scc0 .LBB0_5
; %bb.3:
	s_add_i32 s7, s4, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s15, s7
	s_cbranch_scc0 .LBB0_6
; %bb.4:
	v_ashrrev_i32_e32 v2, 31, v1
	s_mov_b32 s5, -1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	v_add_co_u32 v3, vcc_lo, s8, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	global_load_b64 v[3:4], v[3:4], off offset:-4
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v0, v4, v3
	v_cvt_f64_f32_e32 v[3:4], v0
	v_mul_f32_e64 v0, s6, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cvt_f64_f32_e32 v[5:6], v0
	v_add_f64 v[3:4], v[3:4], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f64 v[7:8], null, v[5:6], v[5:6], v[3:4]
	v_rcp_f64_e32 v[9:10], v[7:8]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	v_div_scale_f64 v[11:12], vcc_lo, v[3:4], v[5:6], v[3:4]
	v_mul_f64 v[13:14], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[7:8], -v[7:8], v[13:14], v[11:12]
	v_div_fmas_f64 v[7:8], v[7:8], v[9:10], v[13:14]
	s_delay_alu instid0(VALU_DEP_1)
	v_div_fixup_f64 v[3:4], v[7:8], v[5:6], v[3:4]
	s_branch .LBB0_7
.LBB0_5:
                                        ; implicit-def: $vgpr3_vgpr4
	s_branch .LBB0_8
.LBB0_6:
                                        ; implicit-def: $vgpr3_vgpr4
.LBB0_7:                                ; %Flow81
	s_mov_b32 s7, 0
.LBB0_8:                                ; %Flow80
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 vcc_lo, exec_lo, s7
	s_cbranch_vccz .LBB0_10
; %bb.9:
	v_mov_b32_e32 v2, 0
	s_mov_b32 s5, -1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	v_add_co_u32 v3, vcc_lo, s8, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	global_load_b64 v[3:4], v[3:4], off
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v0, v3, v4
	v_cvt_f64_f32_e32 v[3:4], v0
	v_mul_f32_e64 v0, s6, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cvt_f64_f32_e32 v[5:6], v0
	v_add_f64 v[3:4], v[3:4], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f64 v[7:8], null, v[5:6], v[5:6], v[3:4]
	v_rcp_f64_e32 v[9:10], v[7:8]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	v_div_scale_f64 v[11:12], vcc_lo, v[3:4], v[5:6], v[3:4]
	v_mul_f64 v[13:14], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[7:8], -v[7:8], v[13:14], v[11:12]
	v_div_fmas_f64 v[7:8], v[7:8], v[9:10], v[13:14]
	s_delay_alu instid0(VALU_DEP_1)
	v_div_fixup_f64 v[3:4], v[7:8], v[5:6], v[3:4]
.LBB0_10:                               ; %Flow82
	s_and_b32 s5, s5, exec_lo
.LBB0_11:                               ; %Flow79
	s_and_not1_saveexec_b32 s7, s2
	s_cbranch_execz .LBB0_13
; %bb.12:
	v_subrev_nc_u32_e32 v3, s4, v1
	v_ashrrev_i32_e32 v2, 31, v1
	v_cvt_f64_f32_e32 v[7:8], s6
	s_or_b32 s5, s5, exec_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[5:6], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	v_add_co_u32 v5, vcc_lo, s8, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v6, vcc_lo, s9, v6, vcc_lo
	v_add_co_u32 v3, vcc_lo, s8, v3
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	s_clause 0x1
	global_load_b32 v0, v[5:6], off
	global_load_b32 v3, v[3:4], off
	v_div_scale_f64 v[11:12], null, v[7:8], v[7:8], 2.0
	v_rcp_f64_e32 v[15:16], v[11:12]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[19:20], -v[11:12], v[15:16], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[15:16], v[15:16], v[19:20], v[15:16]
	v_fma_f64 v[19:20], -v[11:12], v[15:16], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_fma_f64 v[15:16], v[15:16], v[19:20], v[15:16]
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v0, v0, v3
	v_cvt_f64_f32_e32 v[3:4], v0
	v_mul_f32_e64 v0, s6, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cvt_f64_f32_e32 v[5:6], v0
	v_add_f64 v[3:4], v[3:4], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[9:10], null, v[5:6], v[5:6], v[3:4]
	v_div_scale_f64 v[21:22], vcc_lo, v[3:4], v[5:6], v[3:4]
	v_rcp_f64_e32 v[13:14], v[9:10]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[17:18], -v[9:10], v[13:14], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[13:14], v[13:14], v[17:18], v[13:14]
	v_fma_f64 v[17:18], -v[9:10], v[13:14], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[13:14], v[13:14], v[17:18], v[13:14]
	v_div_scale_f64 v[17:18], s2, 2.0, v[7:8], 2.0
	v_mul_f64 v[19:20], v[21:22], v[13:14]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f64 v[23:24], v[17:18], v[15:16]
	v_fma_f64 v[9:10], -v[9:10], v[19:20], v[21:22]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[11:12], -v[11:12], v[23:24], v[17:18]
	v_div_fmas_f64 v[9:10], v[9:10], v[13:14], v[19:20]
	s_mov_b32 vcc_lo, s2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[11:12], v[11:12], v[15:16], v[23:24]
	v_div_fixup_f64 v[3:4], v[9:10], v[5:6], v[3:4]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[5:6], v[11:12], v[7:8], 2.0
	v_add_f64 v[3:4], v[3:4], -v[5:6]
.LBB0_13:                               ; %Flow83
	s_or_b32 exec_lo, exec_lo, s7
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 s2, s5, exec_lo
.LBB0_14:                               ; %Flow
	s_and_not1_saveexec_b32 s3, s3
	s_cbranch_execz .LBB0_16
; %bb.15:
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	s_ashr_i32 s5, s4, 31
	s_or_b32 s2, s2, exec_lo
	s_lshl_b64 s[4:5], s[4:5], 2
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s8, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, v3, s4
	v_add_co_ci_u32_e32 v6, vcc_lo, s5, v4, vcc_lo
	s_clause 0x1
	global_load_b32 v0, v[3:4], off
	global_load_b32 v3, v[5:6], off
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v0, v0, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[3:4], v0
	v_mul_f32_e64 v0, s6, s6
	v_cvt_f64_f32_e32 v[5:6], v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[3:4], v[3:4], v[3:4]
	v_div_scale_f64 v[7:8], null, v[5:6], v[5:6], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[9:10], v[7:8]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	v_div_scale_f64 v[11:12], vcc_lo, v[3:4], v[5:6], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[13:14], v[11:12], v[9:10]
	v_fma_f64 v[7:8], -v[7:8], v[13:14], v[11:12]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[7:8], v[7:8], v[9:10], v[13:14]
	v_div_fixup_f64 v[3:4], v[7:8], v[5:6], v[3:4]
.LBB0_16:                               ; %Flow84
	s_or_b32 exec_lo, exec_lo, s3
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB0_18
; %bb.17:                               ; %.sink.split
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_cvt_f32_f64_e32 v4, v[3:4]
	s_load_b128 s[0:3], s[0:1], 0x0
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s0, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_store_b32 v[2:3], v4, off
	global_store_b32 v[0:1], v4, off
.LBB0_18:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10ApplyBCGPUPfS_S_iif
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 25
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z10ApplyBCGPUPfS_S_iif, .Lfunc_end0-_Z10ApplyBCGPUPfS_S_iif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1236
; NumSgprs: 18
; NumVgprs: 25
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 3
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 25
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z12VorticityGPUPfS_S_S_S_ffii ; -- Begin function _Z12VorticityGPUPfS_S_S_S_ffii
	.globl	_Z12VorticityGPUPfS_S_S_S_ffii
	.p2align	8
	.type	_Z12VorticityGPUPfS_S_S_S_ffii,@function
_Z12VorticityGPUPfS_S_S_S_ffii:         ; @_Z12VorticityGPUPfS_S_S_S_ffii
; %bb.0:
	s_load_b128 s[8:11], s[0:1], 0x28
	v_cmp_ne_u32_e32 vcc_lo, 0, v0
	s_waitcnt lgkmcnt(0)
	s_add_i32 s2, s11, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_ne_u32_e64 s2, s2, v0
	s_and_b32 s2, vcc_lo, s2
	s_cmp_lg_u32 s15, 0
	s_cselect_b32 s3, -1, 0
	s_add_i32 s4, s10, -1
	s_and_b32 s2, s3, s2
	s_cmp_lg_u32 s15, s4
	s_cselect_b32 s3, -1, 0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, s2, s3
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB1_2
; %bb.1:
	s_clause 0x1
	s_load_b32 s11, s[0:1], 0x44
	s_load_b256 s[0:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s11, s11, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[3:4], null, s15, s11, v[0:1]
	s_ashr_i32 s11, s10, 31
	v_ashrrev_i32_e32 v4, 31, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[4:5], 2, v[3:4]
	v_add_co_u32 v6, vcc_lo, s0, v4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s1, v5, vcc_lo
	v_add_co_u32 v8, vcc_lo, s4, v4
	v_add_co_ci_u32_e32 v9, vcc_lo, s5, v5, vcc_lo
	s_lshl_b64 s[0:1], s[10:11], 2
	global_load_b32 v10, v[6:7], off offset:4
	global_load_b96 v[0:2], v[8:9], off offset:-4
	global_load_b32 v11, v[6:7], off offset:-4
	v_add_nc_u32_e32 v6, s10, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v7, 31, v6
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v6, vcc_lo, s2, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	v_add_co_u32 v8, vcc_lo, v8, s0
	v_add_co_ci_u32_e32 v9, vcc_lo, s1, v9, vcc_lo
	global_load_b32 v12, v[6:7], off
	global_load_b32 v13, v[8:9], off
	v_subrev_nc_u32_e32 v6, s10, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v7, 31, v6
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, s2, v6
	v_add_co_ci_u32_e32 v9, vcc_lo, s3, v7, vcc_lo
	v_add_co_u32 v6, vcc_lo, s4, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v7, vcc_lo
	global_load_b32 v14, v[8:9], off
	global_load_b32 v15, v[6:7], off
	v_cvt_f64_f32_e32 v[6:7], s9
	s_waitcnt vmcnt(6)
	v_fma_f32 v3, -v10, s8, s9
	s_waitcnt vmcnt(5)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f32_e32 v8, v2, v3
	v_fma_f64 v[2:3], v[6:7], -4.0, 1.0
	v_cvt_f64_f32_e32 v[6:7], v1
	s_waitcnt vmcnt(4)
	v_fma_f32 v1, v11, s8, s9
	v_cvt_f64_f32_e32 v[8:9], v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v0, v0, v1
	v_cvt_f64_f32_e32 v[0:1], v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_fma_f64 v[2:3], v[2:3], v[6:7], v[8:9]
	s_waitcnt vmcnt(3)
	v_fma_f32 v6, -v12, s8, s9
	s_waitcnt vmcnt(2)
	v_mul_f32_e32 v6, v13, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cvt_f64_f32_e32 v[6:7], v6
	v_add_f64 v[0:1], v[2:3], v[0:1]
	s_waitcnt vmcnt(1)
	v_fma_f32 v2, v14, s8, s9
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v2, v15, v2
	v_cvt_f64_f32_e32 v[2:3], v2
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[0:1], v[0:1], v[6:7]
	v_add_f64 v[0:1], v[0:1], v[2:3]
	s_delay_alu instid0(VALU_DEP_1)
	v_cvt_f32_f64_e32 v2, v[0:1]
	v_add_co_u32 v0, vcc_lo, s6, v4
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v5, vcc_lo
	global_store_b32 v[0:1], v2, off
.LBB1_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12VorticityGPUPfS_S_S_S_ffii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 312
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 16
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z12VorticityGPUPfS_S_S_S_ffii, .Lfunc_end1-_Z12VorticityGPUPfS_S_S_S_ffii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 528
; NumSgprs: 18
; NumVgprs: 16
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 16
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z10_StreamGPUPfS_S_iif ; -- Begin function _Z10_StreamGPUPfS_S_iif
	.globl	_Z10_StreamGPUPfS_S_iif
	.p2align	8
	.type	_Z10_StreamGPUPfS_S_iif,@function
_Z10_StreamGPUPfS_S_iif:                ; @_Z10_StreamGPUPfS_S_iif
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x18
	v_cmp_ne_u32_e32 vcc_lo, 0, v0
	s_waitcnt lgkmcnt(0)
	s_add_i32 s2, s5, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_ne_u32_e64 s2, s2, v0
	s_and_b32 s2, vcc_lo, s2
	s_cmp_lg_u32 s15, 0
	s_cselect_b32 s3, -1, 0
	s_add_i32 s5, s4, -1
	s_and_b32 s2, s3, s2
	s_cmp_lg_u32 s15, s5
	s_cselect_b32 s3, -1, 0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, s2, s3
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB2_2
; %bb.1:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b128 s[8:11], s[0:1], 0x0
	s_ashr_i32 s5, s4, 31
	s_load_b64 s[0:1], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_lshl_b64 s[2:3], s[4:5], 2
	v_ashrrev_i32_e32 v2, 31, v1
	v_subrev_nc_u32_e32 v0, s4, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_add_co_u32 v4, vcc_lo, s10, v2
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s11, v3, vcc_lo
	v_add_co_u32 v6, vcc_lo, v4, s2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v5, vcc_lo
	v_add_co_u32 v0, vcc_lo, s10, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s11, v1, vcc_lo
	s_clause 0x3
	global_load_b32 v6, v[6:7], off
	global_load_b32 v7, v[0:1], off
	global_load_b32 v8, v[4:5], off offset:4
	global_load_b32 v4, v[4:5], off offset:-4
	v_add_co_u32 v0, vcc_lo, s8, v2
	v_add_co_ci_u32_e32 v1, vcc_lo, s9, v3, vcc_lo
	global_load_b32 v0, v[0:1], off
	s_waitcnt vmcnt(1)
	v_add_f32_e32 v1, v8, v4
	v_mul_f32_e64 v4, s6, s6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v1, v1, v6
	v_add_f32_e32 v1, v1, v7
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v1, v4, v0
	v_add_co_u32 v0, vcc_lo, s0, v2
	v_mul_f32_e32 v4, 0x3e800000, v1
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v3, vcc_lo
	global_store_b32 v[0:1], v4, off
.LBB2_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10_StreamGPUPfS_S_iif
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z10_StreamGPUPfS_S_iif, .Lfunc_end2-_Z10_StreamGPUPfS_S_iif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 352
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z11VeloCalcGPUPfS_S_iif ; -- Begin function _Z11VeloCalcGPUPfS_S_iif
	.globl	_Z11VeloCalcGPUPfS_S_iif
	.p2align	8
	.type	_Z11VeloCalcGPUPfS_S_iif,@function
_Z11VeloCalcGPUPfS_S_iif:               ; @_Z11VeloCalcGPUPfS_S_iif
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x18
	v_cmp_ne_u32_e32 vcc_lo, 0, v0
	s_waitcnt lgkmcnt(0)
	s_add_i32 s2, s5, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_ne_u32_e64 s2, s2, v0
	s_and_b32 s2, vcc_lo, s2
	s_cmp_lg_u32 s15, 0
	s_cselect_b32 s3, -1, 0
	s_add_i32 s5, s4, -1
	s_and_b32 s2, s3, s2
	s_cmp_lg_u32 s15, s5
	s_cselect_b32 s3, -1, 0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, s2, s3
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB3_2
; %bb.1:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b64 s[8:9], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_load_b128 s[0:3], s[0:1], 0x0
	v_add_nc_u32_e32 v2, s4, v1
	v_subrev_nc_u32_e32 v4, s4, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v3, 31, v2
	v_ashrrev_i32_e32 v5, 31, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_lshlrev_b64 v[4:5], 2, v[4:5]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v2, vcc_lo, s8, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s9, v3, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v4, vcc_lo, s8, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s9, v5, vcc_lo
	s_clause 0x1
	global_load_b32 v0, v[2:3], off
	global_load_b32 v4, v[4:5], off
	v_cvt_f64_f32_e32 v[2:3], s6
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v0, v0, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[3:4], v[2:3], v[2:3]
	v_ashrrev_i32_e32 v2, 31, v1
	v_cvt_f64_f32_e32 v[5:6], v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	v_div_scale_f64 v[7:8], null, v[3:4], v[3:4], v[5:6]
	v_div_scale_f64 v[13:14], vcc_lo, v[5:6], v[3:4], v[5:6]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[9:10], v[7:8]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[11:12], v[13:14], v[9:10]
	v_fma_f64 v[7:8], -v[7:8], v[11:12], v[13:14]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[7:8], v[7:8], v[9:10], v[11:12]
	v_div_fixup_f64 v[5:6], v[7:8], v[3:4], v[5:6]
	s_delay_alu instid0(VALU_DEP_1)
	v_cvt_f32_f64_e32 v9, v[5:6]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v5, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v6, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v7, vcc_lo, s8, v0
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v1, vcc_lo
	global_store_b32 v[5:6], v9, off
	s_clause 0x1
	global_load_b32 v2, v[7:8], off offset:4
	global_load_b32 v5, v[7:8], off offset:-4
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v2, v2, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e64 v[5:6], -v2
	v_div_scale_f64 v[7:8], null, v[3:4], v[3:4], v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[9:10], v[7:8]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[11:12], -v[7:8], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	v_div_scale_f64 v[11:12], vcc_lo, v[5:6], v[3:4], v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[13:14], v[11:12], v[9:10]
	v_fma_f64 v[7:8], -v[7:8], v[13:14], v[11:12]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_div_fmas_f64 v[7:8], v[7:8], v[9:10], v[13:14]
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	v_div_fixup_f64 v[2:3], v[7:8], v[3:4], v[5:6]
	s_delay_alu instid0(VALU_DEP_1)
	v_cvt_f32_f64_e32 v2, v[2:3]
	global_store_b32 v[0:1], v2, off
.LBB3_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11VeloCalcGPUPfS_S_iif
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 15
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end3:
	.size	_Z11VeloCalcGPUPfS_S_iif, .Lfunc_end3-_Z11VeloCalcGPUPfS_S_iif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 596
; NumSgprs: 18
; NumVgprs: 15
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 15
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.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_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z10ApplyBCGPUPfS_S_iif
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z10ApplyBCGPUPfS_S_iif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     25
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     by_value
      - .offset:         44
        .size:           4
        .value_kind:     by_value
      - .offset:         48
        .size:           4
        .value_kind:     by_value
      - .offset:         52
        .size:           4
        .value_kind:     by_value
      - .offset:         56
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         60
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         64
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         68
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         70
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         72
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         74
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         76
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         78
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         112
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         120
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 312
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12VorticityGPUPfS_S_S_S_ffii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12VorticityGPUPfS_S_S_S_ffii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     16
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z10_StreamGPUPfS_S_iif
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z10_StreamGPUPfS_S_iif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11VeloCalcGPUPfS_S_iif
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11VeloCalcGPUPfS_S_iif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     15
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
