#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <chrono>

using namespace std;

#define kernel_width 7
#define threadsPerBlock 512
#define NUM_ITER_DFS 3
#define DFS_BLOCK_SIZE 8
float stoff(const char* s){
  float rez = 0, fact = 1;
  if (*s == '-'){
    s++;
    fact = -1;
  };
  for (int point_seen = 0; *s; s++){
    if (*s == '.'){
      point_seen = 1; 
      continue;
    };
    int d = *s - '0';
    if (d >= 0 && d <= 9){
      if (point_seen) fact /= 10.0f;
      rez = rez * 10.0f + (float)d;
    };
  };
  return rez * fact;
}

__global__ void kernel_blur(float* pixels, float* output, int width, int height, int N) {
    const float kernel[kernel_width][kernel_width] = {
        {0.00000067, 0.00002292, 0.00019117, 0.00038771, 0.00019117, 0.00002292, 0.00000067},
        {0.00002292, 0.00078633, 0.00655965, 0.01330373, 0.00655965, 0.00078633, 0.00002292},
        {0.00019117, 0.00655965, 0.05472157, 0.11098164, 0.05472157, 0.00655965, 0.00019117},
        {0.00038771, 0.01330373, 0.11098164, 0.22508352, 0.11098164, 0.01330373, 0.00038771},
        {0.00019117, 0.00655965, 0.05472157, 0.11098164, 0.05472157, 0.00655965, 0.00019117},
        {0.00002292, 0.00078633, 0.00655965, 0.01330373, 0.00655965, 0.00078633, 0.00002292},
        {0.00000067, 0.00002292, 0.00019117, 0.00038771, 0.00019117, 0.00002292, 0.00000067}
    };

    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        int row = index / width;
        int col = index % width;
        float sum = 0;
        float denom = 0;
        int rowStart = row - kernel_width/2;
        int rowEnd = row + kernel_width/2 + 1;
        int colStart = col - kernel_width/2;
        int colEnd = col + kernel_width/2 + 1;
        for (int smallRow = rowStart; smallRow < rowEnd; smallRow ++) {
            for (int smallCol = colStart; smallCol < colEnd; smallCol ++) {
                if (smallRow >= 0 && smallRow < height && smallCol >= 0 && smallCol < width) {
                    sum += kernel[smallRow - rowStart][smallCol - colStart] * pixels[smallRow * width + smallCol];
                    denom += kernel[smallRow - rowStart][smallCol - colStart];
                }
            }
        }
        output[index] = sum/denom;
    }   
}

__global__ void kernel_calculateGradient(float* pixelsAfterBlur, float* gradientMag, int* gradientAng, int width, int height, int N) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        int row = index / width;
        int col = index % width;
        float gy = (float) row == height - 1? 0 : pixelsAfterBlur[index + width] - pixelsAfterBlur[index];
        float gx = (float) col == width - 1? 0 : pixelsAfterBlur[index + 1] - pixelsAfterBlur[index];
        gradientMag[index] = sqrt(gx * gx + gy * gy);
        float ang;
        if (gx < 0.000001 && gx > -0.000001) ang = 90;
        else ang = atan(gy / gx) / 3.1415926 * 180.0;
        if (ang < 0)
            ang += 180;
        gradientAng[index] = ((int) (ang + 22.5) / 45) * 45;
    }
}

__global__ void kernel_doubleThreshold(float* pixelsAfterThin, int* pixelsStrongEdges, int* pixelsWeakEdges, int width, int height, float low_threshold, float high_threshold, int N) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        float val = pixelsAfterThin[index];
        if (val >= high_threshold){
            pixelsStrongEdges[index] = 1;
        }
        if (val < high_threshold && val >= low_threshold){
            pixelsWeakEdges[index] = 1;
        }
    }
}

__global__ void kernel_thin(float* pixelsAfterThin, int* gradientAng, float* gradientMag, int width, int height, int N) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        int row = index / width;
        int col = index % width;
        float mag = gradientMag[row * width + col];
        float magL = 0;
        float magR = 0;
        int ang = gradientAng[row * width + col];
        if (ang == 0 || ang == 180) {
            if (row > 0) magL = gradientMag[row * width + col - 1];
            if (row < height - 1) magR = gradientMag[row * width + col + 1];
        } 

        else if (ang == 45 || ang == 225) {
            if (row > 0 && col < width - 1) magL = gradientMag[(row + 1) * width + col + 1];

            if (row < height - 1 && col > 0) magR = gradientMag[(row - 1) * width + col - 1];
        } 

        else if (ang == 90 || ang == 270) {
            if (col > 0) magL = gradientMag[(row - 1) * width + col];

            if (col < width - 1) magR = gradientMag[(row + 1) * width + col];
        } 

        else if (ang == 135 || ang == 315) {
            if (row > 0 && col > 0) magL = gradientMag[(row + 1) * width + col - 1];

            if (row < height - 1 && col < width - 1) magR = gradientMag[(row - 1) * width + col + 1];
        }
        if (mag > magL && mag > magR) {
            pixelsAfterThin[row * width + col] = mag;
        } 
        else {
            pixelsAfterThin[row * width + col] = 0;
        }
    }
}


void blur(float* pixels, float* output, int width, int height, int N, int blocks) {
    float* cudaPixels;
    float* cudaOutput;
    cudaMalloc(&cudaPixels, N * sizeof(float));
    cudaMalloc(&cudaOutput, N * sizeof(float));
    cudaMemcpy(cudaPixels, pixels, N * sizeof(float), cudaMemcpyHostToDevice);
    kernel_blur<<<blocks, threadsPerBlock>>>(cudaPixels, cudaOutput, width, height, N);
    cudaDeviceSynchronize();
    cudaMemcpy(output, cudaOutput, N * sizeof(float), cudaMemcpyDeviceToHost);
    cudaFree(cudaPixels);
    cudaFree(cudaOutput);
}

void calculateGradient(float* pixelsAfterBlur, float* gradientMag, int* gradientAng, int width, int height, float* maxMag, int N, int blocks) {
    float* cudaPixels;
    float* cudaGradientMag;
    int* cudaGradientAng;
    cudaMalloc(&cudaPixels, N * sizeof(float));
    cudaMalloc(&cudaGradientAng, N * sizeof(int));
    cudaMalloc(&cudaGradientMag, N * sizeof(float));
    cudaMemcpy(cudaPixels, pixelsAfterBlur, N * sizeof(float), cudaMemcpyHostToDevice);
    kernel_calculateGradient<<<blocks, threadsPerBlock>>>(cudaPixels, cudaGradientMag, cudaGradientAng, width, height, N);
    cudaDeviceSynchronize();
    cudaMemcpy(gradientMag, cudaGradientMag, N * sizeof(float), cudaMemcpyDeviceToHost);
    cudaMemcpy(gradientAng, cudaGradientAng, N * sizeof(int), cudaMemcpyDeviceToHost);


    float max = 0;
    for (int i = 0; i < N; i++) {
        if (gradientMag[i] > max) {
            max = gradientMag[i];
        }
    }
    *maxMag = max;
    cudaFree(cudaPixels);
    cudaFree(cudaGradientAng);
    cudaFree(cudaGradientMag);
}

void thin(float* gradientMag, int* gradientAng, float* pixelsAfterThin, int width, int height, int N, int blocks) {
    float* cudaPixels;
    float* cudaGradientMag;
    int* cudaGradientAng;
    cudaMalloc(&cudaPixels, N * sizeof(float));
    cudaMalloc(&cudaGradientAng, N * sizeof(int));
    cudaMalloc(&cudaGradientMag, N * sizeof(float));
    cudaMemcpy(cudaPixels, pixelsAfterThin, N * sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(cudaGradientAng, gradientAng, N * sizeof(int), cudaMemcpyHostToDevice);
    cudaMemcpy(cudaGradientMag, gradientMag, N * sizeof(float), cudaMemcpyHostToDevice);
    kernel_thin<<<blocks, threadsPerBlock>>>(cudaPixels, cudaGradientAng, cudaGradientMag, width, height, N);
    cudaDeviceSynchronize();
    cudaMemcpy(pixelsAfterThin, cudaPixels, N * sizeof(float), cudaMemcpyDeviceToHost);
    cudaFree(cudaPixels);
    cudaFree(cudaGradientMag);
    cudaFree(cudaGradientAng);
}

void doubleThreshold(float* pixelsAfterThin, int* pixelsStrongEdges, int* pixelsWeakEdges, int width, int height, float low_threshold, float high_threshold, int N, int blocks) {
    float* cudaPixels;
    int* cudaStrongEdges;
    int* cudaWeakEdges;
    cudaMalloc(&cudaPixels, N * sizeof(float));
    cudaMalloc(&cudaStrongEdges, N * sizeof(int));
    cudaMalloc(&cudaWeakEdges, N * sizeof(int));
    cudaMemcpy(cudaPixels, pixelsAfterThin, N * sizeof(float), cudaMemcpyHostToDevice);
    kernel_doubleThreshold<<<blocks, threadsPerBlock>>>(cudaPixels, cudaStrongEdges, cudaWeakEdges, width, height, low_threshold, high_threshold, N);
    cudaDeviceSynchronize();
    cudaMemcpy(pixelsStrongEdges, cudaStrongEdges, N * sizeof(int), cudaMemcpyDeviceToHost);
    cudaMemcpy(pixelsWeakEdges, cudaWeakEdges, N * sizeof(int), cudaMemcpyDeviceToHost);
    cudaFree(cudaPixels);
    cudaFree(cudaStrongEdges);
    cudaFree(cudaWeakEdges);
}

__device__ __inline__ void push_back(int* stack, int* stack_pt, int val) {
    stack[*stack_pt] = val;
    *stack_pt ++;
}

__device__ __inline__ int empty(int* stack, int* stack_pt) {
    if (*stack_pt == 0) {
        return 1;
    } else {
        return 0;
    }
}

__device__ __inline__ int pop_back(int* stack, int* stack_pt) {
    int val = stack[*stack_pt - 1];
    *stack_pt --;
    return val;
}

__device__ __inline__ void dfsRange(int row, int col, int lorow, int hirow, int locol, int hicol, int* pixelsStrongEdges, int* pixelsWeakEdges, int* visited, int width, int height) {
    int stack[DFS_BLOCK_SIZE * DFS_BLOCK_SIZE];
    int stack_pt = 0;
    int idx = row * width + col;
    push_back(stack, &stack_pt, idx);
    while (!empty(stack, &stack_pt)) {
        idx = pop_back(stack, &stack_pt);
        if (pixelsWeakEdges[idx]) {
            pixelsStrongEdges[idx] = 1;
        }
        int id;
        if (pixelsStrongEdges[idx]) {
            if (row > lorow) {
                id = (row - 1) * width + col;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }
                if (col > locol) {
                    id = (row - 1) * width + col - 1;
                    if (!visited[id]){
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    } 
                }

                if (col < hicol - 1) {
                    id = (row - 1) * width + col + 1;
                    if (!visited[id]) {
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    } 
                }
            }

            if (row < hirow - 1) {
                id = (row + 1) * width + col;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }
                if (col > locol) {
                    id = (row + 1) * width + col - 1;
                    if (!visited[id]){
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    } 
                }

                if (col < hicol - 1) {
                    id = (row + 1) * width + col + 1;
                    if (!visited[id]) {
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    }
                }
            }

            if (col > locol) {
                id = row * width + col - 1;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }            
            }

            if (col < hicol - 1) {
                id = row * width + col + 1;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }               
            }
        }
    }    
}

__global__ void kernel_dfs(int numDiv, int* pixelsStrongEdges, int* pixelsWeakEdges, int* visited, int width, int height) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index >= numDiv * numDiv) return;
    int colIndex = index % numDiv;
    int rowIndex = index / numDiv;
    int colStart = colIndex * width / numDiv;
    int colEnd = (colIndex + 1) * width / numDiv;
    int rowStart = rowIndex * width / numDiv;
    int rowEnd = (rowIndex + 1) * width / numDiv;


    for (int row = rowStart; row < rowEnd; row ++) {
        for (int col = colStart; col < colEnd; col ++) {
            if (pixelsStrongEdges[row * width + col] == 1)
                dfsRange(row, col, 0, height, 0, width, pixelsStrongEdges, pixelsWeakEdges, visited, width, height);

        }
    }
}


__global__ void kernel_exchange(int numDiv, int* pixelsStrongEdges, int* pixelsWeakEdges, int* visited, int width, int height) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index >= numDiv * numDiv) return;
    int colIndex = index % numDiv;
    int rowIndex = index / numDiv;
    int colStart = colIndex * width / numDiv;
    int colEnd = (colIndex + 1) * width / numDiv;
    int rowStart = rowIndex * width / numDiv;
    int rowEnd = (rowIndex + 1) * width / numDiv;
    // Left
    if (colStart > 0) {
        for (int row = rowStart; row < rowEnd; row ++) {
            if (pixelsStrongEdges[row * width + colStart] == 1) {
                pixelsStrongEdges[row * width + colStart - 1] = 1;
            }
        }
    }

    // Right
    if (colEnd < width) {
        for (int row = rowStart; row < rowEnd; row ++) {
            if (pixelsStrongEdges[row * width + colEnd - 1] == 1) {
                pixelsStrongEdges[row * width + colEnd] = 1;
            }
        }
    }

    // Top
    if (rowStart > 0) {
        for (int col = colStart; col < colEnd; col ++) {
            if (pixelsStrongEdges[rowStart * width + col] == 1) {
                pixelsStrongEdges[(rowStart - 1) * width + col] = 1;
            }
        }
    }

    // Bottom
    if (rowEnd < height) {
        for (int col = colStart; col < colEnd; col ++) {
            if (pixelsStrongEdges[(rowEnd - 1) * width + col] == 1) {
                pixelsStrongEdges[rowEnd * width + col] = 1;
            }
        }
    }
}

void edgeTrack(int* pixelsStrongEdges, int* pixelsWeakEdges, int width, int height) {
    int* visited = (int*) calloc(sizeof(int), width * height);
    int numDiv = min((height + DFS_BLOCK_SIZE - 1)/DFS_BLOCK_SIZE
        , (width + DFS_BLOCK_SIZE - 1)/DFS_BLOCK_SIZE);
    int blocks = (numDiv * numDiv + threadsPerBlock - 1) / threadsPerBlock;
    for (int i = 0; i < NUM_ITER_DFS; i ++) {
        kernel_exchange<<<blocks, threadsPerBlock>>>(numDiv, pixelsStrongEdges, pixelsWeakEdges, visited, width, height);
        cudaDeviceSynchronize();
        kernel_dfs<<<blocks, threadsPerBlock>>>(numDiv, pixelsStrongEdges, pixelsWeakEdges, visited, width, height);
        cudaDeviceSynchronize();    
    }

}

float* split(string str, char delimiter, int numElts) {
    float* elts = (float*) malloc(sizeof(float) * numElts);
    stringstream ss(str);
    string tok;
    int i = 0; 

    while(getline(ss, tok, delimiter)) {
        elts[i++] = stoff(tok.c_str());
    }
 
    return elts;
}

int main(int argc, char** argv) {  

    if (argc != 2) {
        printf("usage: DisplayImage.out <Image_Path>\n");
            return -1;
    }

    float low_threshold = 0.1;
    float high_threshold = 0.15;
    float* pixels;
    int height;
    int width;

    string line;
    ifstream myfile (argv[1]);
    if (myfile.is_open()) {

        getline(myfile, line);
        height = stoff(line.c_str());
        getline(myfile, line);
        width = stoff(line.c_str());

        pixels = (float*) malloc(sizeof(float) * height * width);
        int idx = 0;
        while (getline(myfile, line)) {
            float* content = split(line, ' ', width);
            memcpy(pixels+idx, content, sizeof(float) * width);
            idx += width;
            free(content);
        }
        myfile.close();
    } 
    else {
        printf("Unable to open file"); 
        return -1;
    }

    int N = height * width;
    int blocks = (N + threadsPerBlock - 1) / threadsPerBlock;
    auto start = std::chrono::high_resolution_clock::now();

    // /* 1. blur */
    float* pixelsAfterBlur = (float*) malloc(sizeof(float)*height*width);
    blur(pixels, pixelsAfterBlur, width, height, N, blocks);
    auto ck2 = std::chrono::high_resolution_clock::now();

    /* 2. gradient */
    float* gradientMag = (float*) malloc(sizeof(float)*height*width);
    int* gradientAng = (int*) malloc(sizeof(int)*height*width);
    float maxMag = -1;
    calculateGradient(pixelsAfterBlur, gradientMag, gradientAng, width, height, &maxMag, N, blocks);
    auto ck3 = std::chrono::high_resolution_clock::now();

    /* 3. non-maximum suppresion */
    float* pixelsAfterThin = (float*) malloc(sizeof(float)*height*width);
    thin(gradientMag, gradientAng, pixelsAfterThin, width, height, N, blocks);
    auto ck4 = std::chrono::high_resolution_clock::now();

    /* 4. double thresholding */
    int* pixelsStrongEdges = (int*) calloc(sizeof(int), height*width);
    int* pixelsWeakEdges = (int*) calloc(sizeof(int), height*width);
    doubleThreshold(pixelsAfterThin, pixelsStrongEdges, pixelsWeakEdges, width, height, low_threshold * maxMag, high_threshold * maxMag, N, blocks);
    auto ck5 = std::chrono::high_resolution_clock::now();

    /* 5. edge tracking */
    edgeTrack(pixelsStrongEdges, pixelsWeakEdges, width, height);
    auto finish = std::chrono::high_resolution_clock::now();
    std::chrono::duration<double> elapsed = std::chrono::duration_cast<std::chrono::duration<double>>(finish - start);
    std::chrono::duration<double> blur_time = std::chrono::duration_cast<std::chrono::duration<double>>(ck2 - start);
    std::chrono::duration<double> grad_time = std::chrono::duration_cast<std::chrono::duration<double>>(ck3 - ck2);
    std::chrono::duration<double> sup_time = std::chrono::duration_cast<std::chrono::duration<double>>(ck4 - ck3);
    std::chrono::duration<double> db_ts = std::chrono::duration_cast<std::chrono::duration<double>>(ck5 - ck4);
    std::chrono::duration<double> ed_tk = std::chrono::duration_cast<std::chrono::duration<double>>(finish - ck5);
    std::cout << "Total: " << elapsed.count() << " seconds.\n";
    std::cout << "Blur: " << blur_time.count() << " seconds.\n";
    std::cout << "Gradient: " << grad_time.count() << " seconds.\n";
    std::cout << "Non-max sup: " << sup_time.count() << " seconds.\n";
    std::cout << "Double thresholding: " << db_ts.count() << " seconds.\n";
    std::cout << "Edge tracking: " << ed_tk.count() << " seconds.\n";

    /* 6. display */
    ofstream outfile ("result.txt");
    if (outfile.is_open()) {

        outfile << height << "\n";
        outfile << width << "\n";
        int idx = 0;
        for (int i = 0; i < height; i++) {
            for (int j = 0; j < width; j++) {
                outfile <<  pixelsStrongEdges[idx++] * 255 << " ";
            }
            outfile << "\n";
        }
        outfile.close();
    }

    return 0;
}
	.file	"tmpxft_0023072e_00000000-6_DisplayImage.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4303:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4303:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.type	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0, @function
_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0:
.LFB5131:
	.cfi_startproc
	jmp	cudaMalloc@PLT
	.cfi_endproc
.LFE5131:
	.size	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0, .-_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	.globl	_Z5stoffPKc
	.type	_Z5stoffPKc, @function
_Z5stoffPKc:
.LFB4285:
	.cfi_startproc
	endbr64
	cmpb	$45, (%rdi)
	movss	.LC1(%rip), %xmm1
	jne	.L4
	movss	.LC0(%rip), %xmm1
	incq	%rdi
.L4:
	movss	.LC3(%rip), %xmm2
	xorl	%edx, %edx
	xorps	%xmm0, %xmm0
.L5:
	movsbl	(%rdi), %eax
	testb	%al, %al
	je	.L15
	cmpb	$46, %al
	je	.L10
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L6
	testl	%edx, %edx
	je	.L7
	divss	%xmm2, %xmm1
.L7:
	mulss	%xmm2, %xmm0
	cvtsi2ssl	%eax, %xmm3
	addss	%xmm3, %xmm0
	jmp	.L6
.L10:
	movl	$1, %edx
.L6:
	incq	%rdi
	jmp	.L5
.L15:
	mulss	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE4285:
	.size	_Z5stoffPKc, .-_Z5stoffPKc
	.globl	_Z36__device_stub__Z11kernel_blurPfS_iiiPfS_iii
	.type	_Z36__device_stub__Z11kernel_blurPfS_iiiPfS_iii, @function
_Z36__device_stub__Z11kernel_blurPfS_iiiPfS_iii:
.LFB4325:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 8(%rsp)
	leaq	40(%rsp), %rcx
	movl	%r8d, 4(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L16
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z11kernel_blurPfS_iii(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 176
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L16:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4325:
	.size	_Z36__device_stub__Z11kernel_blurPfS_iiiPfS_iii, .-_Z36__device_stub__Z11kernel_blurPfS_iiiPfS_iii
	.globl	_Z11kernel_blurPfS_iii
	.type	_Z11kernel_blurPfS_iii, @function
_Z11kernel_blurPfS_iii:
.LFB4326:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z11kernel_blurPfS_iiiPfS_iii
	.cfi_endproc
.LFE4326:
	.size	_Z11kernel_blurPfS_iii, .-_Z11kernel_blurPfS_iii
	.globl	_Z4blurPfS_iiii
	.type	_Z4blurPfS_iiii, @function
_Z4blurPfS_iiii:
.LFB4286:
	.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
	movl	%ecx, %r14d
	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
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%r8d, %rbx
	movq	%rbx, %rbp
	salq	$2, %rbx
	movq	%rbx, %rsi
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%r9d, 12(%rsp)
	leaq	16(%rsp), %rdi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	24(%rsp), %rdi
	movq	%rbx, %rsi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	16(%rsp), %rdi
	movq	%rbx, %rdx
	movq	%r15, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	12(%rsp), %r9d
	movl	$8388609, %edx
	movabsq	$4294967297, %rax
	movq	%rax, 36(%rsp)
	movl	40(%rsp), %esi
	xorl	%r8d, %r8d
	salq	$9, %rdx
	movl	%r9d, 32(%rsp)
	movq	32(%rsp), %rdi
	xorl	%r9d, %r9d
	movl	$1, %ecx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L22
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdi
	movl	%ebp, %r8d
	movl	%r14d, %ecx
	movl	%r13d, %edx
	call	_Z36__device_stub__Z11kernel_blurPfS_iiiPfS_iii
.L22:
	call	cudaDeviceSynchronize@PLT
	movq	24(%rsp), %rsi
	movq	%rbx, %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4286:
	.size	_Z4blurPfS_iiii, .-_Z4blurPfS_iiii
	.globl	_Z51__device_stub__Z24kernel_calculateGradientPfS_PiiiiPfS_Piiii
	.type	_Z51__device_stub__Z24kernel_calculateGradientPfS_PiiiiPfS_Piiii, @function
_Z51__device_stub__Z24kernel_calculateGradientPfS_PiiiiPfS_Piiii:
.LFB4327:
	.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)
	movl	%r9d, 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	.L25
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z24kernel_calculateGradientPfS_Piiii(%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
.L25:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4327:
	.size	_Z51__device_stub__Z24kernel_calculateGradientPfS_PiiiiPfS_Piiii, .-_Z51__device_stub__Z24kernel_calculateGradientPfS_PiiiiPfS_Piiii
	.globl	_Z24kernel_calculateGradientPfS_Piiii
	.type	_Z24kernel_calculateGradientPfS_Piiii, @function
_Z24kernel_calculateGradientPfS_Piiii:
.LFB4328:
	.cfi_startproc
	endbr64
	jmp	_Z51__device_stub__Z24kernel_calculateGradientPfS_PiiiiPfS_Piiii
	.cfi_endproc
.LFE4328:
	.size	_Z24kernel_calculateGradientPfS_Piiii, .-_Z24kernel_calculateGradientPfS_Piiii
	.globl	_Z17calculateGradientPfS_PiiiS_ii
	.type	_Z17calculateGradientPfS_PiiiS_ii, @function
_Z17calculateGradientPfS_PiiiS_ii:
.LFB4287:
	.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
	movl	%r8d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r9, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movslq	144(%rsp), %rax
	leaq	24(%rsp), %rdi
	salq	$2, %rax
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	8(%rsp), %rsi
	leaq	40(%rsp), %rdi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	8(%rsp), %rsi
	leaq	32(%rsp), %rdi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rdi
	movq	%r15, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	$8388609, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	152(%rsp), %eax
	salq	$9, %rdx
	movl	$1, %ecx
	movl	%eax, 48(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 52(%rsp)
	movq	48(%rsp), %rdi
	movl	56(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L31
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	%r14d, %r8d
	movl	%r13d, %ecx
	movl	144(%rsp), %r9d
	movq	24(%rsp), %rdi
	call	_Z51__device_stub__Z24kernel_calculateGradientPfS_PiiiiPfS_Piiii
.L31:
	call	cudaDeviceSynchronize@PLT
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	40(%rsp), %rsi
	movq	%r12, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.L32:
	cmpl	%eax, 144(%rsp)
	jle	.L37
	movss	(%rbx,%rax,4), %xmm1
	incq	%rax
	maxss	%xmm0, %xmm1
	movaps	%xmm1, %xmm0
	jmp	.L32
.L37:
	movq	24(%rsp), %rdi
	movss	%xmm0, 0(%rbp)
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	addq	$88, %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
.LFE4287:
	.size	_Z17calculateGradientPfS_PiiiS_ii, .-_Z17calculateGradientPfS_PiiiS_ii
	.globl	_Z52__device_stub__Z22kernel_doubleThresholdPfPiS0_iiffiPfPiS0_iiffi
	.type	_Z52__device_stub__Z22kernel_doubleThresholdPfPiS0_iiffiPfPiS0_iiffi, @function
_Z52__device_stub__Z22kernel_doubleThresholdPfPiS0_iiffiPfPiS0_iiffi:
.LFB4329:
	.cfi_startproc
	endbr64
	subq	$200, %rsp
	.cfi_def_cfa_offset 208
	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)
	movl	%r9d, 4(%rsp)
	movss	%xmm0, 12(%rsp)
	movss	%xmm1, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 184(%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)
	leaq	8(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 176(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L38
	pushq	64(%rsp)
	.cfi_def_cfa_offset 216
	leaq	_Z22kernel_doubleThresholdPfPiS0_iiffi(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 224
	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 216
	popq	%rdx
	.cfi_def_cfa_offset 208
.L38:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	addq	$200, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4329:
	.size	_Z52__device_stub__Z22kernel_doubleThresholdPfPiS0_iiffiPfPiS0_iiffi, .-_Z52__device_stub__Z22kernel_doubleThresholdPfPiS0_iiffiPfPiS0_iiffi
	.globl	_Z22kernel_doubleThresholdPfPiS0_iiffi
	.type	_Z22kernel_doubleThresholdPfPiS0_iiffi, @function
_Z22kernel_doubleThresholdPfPiS0_iiffi:
.LFB4330:
	.cfi_startproc
	endbr64
	jmp	_Z52__device_stub__Z22kernel_doubleThresholdPfPiS0_iiffiPfPiS0_iiffi
	.cfi_endproc
.LFE4330:
	.size	_Z22kernel_doubleThresholdPfPiS0_iiffi, .-_Z22kernel_doubleThresholdPfPiS0_iiffi
	.globl	_Z15doubleThresholdPfPiS0_iiffii
	.type	_Z15doubleThresholdPfPiS0_iiffii, @function
_Z15doubleThresholdPfPiS0_iiffii:
.LFB4289:
	.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
	movl	%r8d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%r9d, %ebx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movss	%xmm0, 12(%rsp)
	leaq	24(%rsp), %rdi
	movss	%xmm1, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movslq	%r9d, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	movq	%rax, (%rsp)
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	(%rsp), %rsi
	leaq	32(%rsp), %rdi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	(%rsp), %rsi
	leaq	40(%rsp), %rdi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	(%rsp), %rdx
	movq	24(%rsp), %rdi
	movq	%r15, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	$8388609, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	144(%rsp), %eax
	salq	$9, %rdx
	movl	$1, %ecx
	movl	%eax, 48(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 52(%rsp)
	movq	48(%rsp), %rdi
	movl	56(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	movss	8(%rsp), %xmm1
	movss	12(%rsp), %xmm0
	testl	%eax, %eax
	jne	.L44
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	%ebx, %r9d
	movl	%r14d, %r8d
	movq	24(%rsp), %rdi
	movl	%r13d, %ecx
	call	_Z52__device_stub__Z22kernel_doubleThresholdPfPiS0_iiffiPfPiS0_iiffi
.L44:
	call	cudaDeviceSynchronize@PLT
	movq	(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	%r12, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	(%rsp), %rdx
	movq	40(%rsp), %rsi
	movq	%rbp, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L45
	call	__stack_chk_fail@PLT
.L45:
	addq	$88, %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
.LFE4289:
	.size	_Z15doubleThresholdPfPiS0_iiffii, .-_Z15doubleThresholdPfPiS0_iiffii
	.globl	_Z38__device_stub__Z11kernel_thinPfPiS_iiiPfPiS_iii
	.type	_Z38__device_stub__Z11kernel_thinPfPiS_iiiPfPiS_iii, @function
_Z38__device_stub__Z11kernel_thinPfPiS_iiiPfPiS_iii:
.LFB4331:
	.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)
	movl	%r9d, 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	.L47
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z11kernel_thinPfPiS_iii(%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
.L47:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L49
	call	__stack_chk_fail@PLT
.L49:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4331:
	.size	_Z38__device_stub__Z11kernel_thinPfPiS_iiiPfPiS_iii, .-_Z38__device_stub__Z11kernel_thinPfPiS_iiiPfPiS_iii
	.globl	_Z11kernel_thinPfPiS_iii
	.type	_Z11kernel_thinPfPiS_iii, @function
_Z11kernel_thinPfPiS_iii:
.LFB4332:
	.cfi_startproc
	endbr64
	jmp	_Z38__device_stub__Z11kernel_thinPfPiS_iiiPfPiS_iii
	.cfi_endproc
.LFE4332:
	.size	_Z11kernel_thinPfPiS_iii, .-_Z11kernel_thinPfPiS_iii
	.globl	_Z4thinPfPiS_iiii
	.type	_Z4thinPfPiS_iiii, @function
_Z4thinPfPiS_iiii:
.LFB4288:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	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	%r9d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movslq	%r9d, %rax
	leaq	24(%rsp), %rdi
	salq	$2, %rax
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	8(%rsp), %rsi
	leaq	40(%rsp), %rdi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	8(%rsp), %rsi
	leaq	32(%rsp), %rdi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	40(%rsp), %rdi
	movq	%r15, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	$8388609, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	144(%rsp), %eax
	salq	$9, %rdx
	movl	$1, %ecx
	movl	%eax, 48(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 52(%rsp)
	movq	48(%rsp), %rdi
	movl	56(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L53
	movq	32(%rsp), %rdx
	movq	40(%rsp), %rsi
	movl	%ebp, %r9d
	movl	%r13d, %r8d
	movq	24(%rsp), %rdi
	movl	%r12d, %ecx
	call	_Z38__device_stub__Z11kernel_thinPfPiS_iiiPfPiS_iii
.L53:
	call	cudaDeviceSynchronize@PLT
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	addq	$88, %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
.LFE4288:
	.size	_Z4thinPfPiS_iiii, .-_Z4thinPfPiS_iiii
	.globl	_Z37__device_stub__Z10kernel_dfsiPiS_S_iiiPiS_S_ii
	.type	_Z37__device_stub__Z10kernel_dfsiPiS_S_iiiPiS_S_ii, @function
_Z37__device_stub__Z10kernel_dfsiPiS_S_iiiPiS_S_ii:
.LFB4333:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 44(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 40(%rsp)
	movl	%r9d, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	44(%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	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	40(%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	.L56
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z10kernel_dfsiPiS_S_ii(%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
.L56:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L58
	call	__stack_chk_fail@PLT
.L58:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4333:
	.size	_Z37__device_stub__Z10kernel_dfsiPiS_S_iiiPiS_S_ii, .-_Z37__device_stub__Z10kernel_dfsiPiS_S_iiiPiS_S_ii
	.globl	_Z10kernel_dfsiPiS_S_ii
	.type	_Z10kernel_dfsiPiS_S_ii, @function
_Z10kernel_dfsiPiS_S_ii:
.LFB4334:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z10kernel_dfsiPiS_S_iiiPiS_S_ii
	.cfi_endproc
.LFE4334:
	.size	_Z10kernel_dfsiPiS_S_ii, .-_Z10kernel_dfsiPiS_S_ii
	.globl	_Z42__device_stub__Z15kernel_exchangeiPiS_S_iiiPiS_S_ii
	.type	_Z42__device_stub__Z15kernel_exchangeiPiS_S_iiiPiS_S_ii, @function
_Z42__device_stub__Z15kernel_exchangeiPiS_S_iiiPiS_S_ii:
.LFB4335:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 44(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 40(%rsp)
	movl	%r9d, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	44(%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	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	40(%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	.L61
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z15kernel_exchangeiPiS_S_ii(%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
.L61:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L63
	call	__stack_chk_fail@PLT
.L63:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4335:
	.size	_Z42__device_stub__Z15kernel_exchangeiPiS_S_iiiPiS_S_ii, .-_Z42__device_stub__Z15kernel_exchangeiPiS_S_iiiPiS_S_ii
	.globl	_Z15kernel_exchangeiPiS_S_ii
	.type	_Z15kernel_exchangeiPiS_S_ii, @function
_Z15kernel_exchangeiPiS_S_ii:
.LFB4336:
	.cfi_startproc
	endbr64
	jmp	_Z42__device_stub__Z15kernel_exchangeiPiS_S_iiiPiS_S_ii
	.cfi_endproc
.LFE4336:
	.size	_Z15kernel_exchangeiPiS_S_ii, .-_Z15kernel_exchangeiPiS_S_ii
	.globl	_Z9edgeTrackPiS_ii
	.type	_Z9edgeTrackPiS_ii, @function
_Z9edgeTrackPiS_ii:
.LFB4294:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movabsq	$4294967297, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movabsq	$4294967808, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	7(%r12), %ebx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%rsi, 16(%rsp)
	movl	%edx, %esi
	imull	%ecx, %esi
	movq	%rdi, 8(%rsp)
	movl	$4, %edi
	movslq	%esi, %rsi
	call	calloc@PLT
	movl	$8, %ecx
	movl	$3, 28(%rsp)
	movq	%rax, (%rsp)
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	leal	7(%r13), %eax
	cltd
	idivl	%ecx
	cmpl	%eax, %ebx
	cmovg	%eax, %ebx
	movl	%ebx, %ebp
	imull	%ebx, %ebp
	addl	$511, %ebp
	sarl	$9, %ebp
.L69:
	movq	%r15, 44(%rsp)
	movl	48(%rsp), %esi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	%ebp, 40(%rsp)
	movq	40(%rsp), %rdi
	movq	%r14, %rdx
	movl	$1, %ecx
	movq	%r14, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L67
	movq	(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%r13d, %r9d
	movl	%r12d, %r8d
	movq	8(%rsp), %rsi
	movl	%ebx, %edi
	call	_Z42__device_stub__Z15kernel_exchangeiPiS_S_iiiPiS_S_ii
.L67:
	call	cudaDeviceSynchronize@PLT
	movq	%r15, 44(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	%ebp, 40(%rsp)
	movl	48(%rsp), %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	movq	40(%rsp), %rdi
	movq	%r14, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L68
	movq	(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%r13d, %r9d
	movl	%r12d, %r8d
	movq	8(%rsp), %rsi
	movl	%ebx, %edi
	call	_Z37__device_stub__Z10kernel_dfsiPiS_S_iiiPiS_S_ii
.L68:
	call	cudaDeviceSynchronize@PLT
	decl	28(%rsp)
	jne	.L69
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4294:
	.size	_Z9edgeTrackPiS_ii, .-_Z9edgeTrackPiS_ii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"_Z15kernel_exchangeiPiS_S_ii"
.LC5:
	.string	"_Z10kernel_dfsiPiS_S_ii"
.LC6:
	.string	"_Z11kernel_thinPfPiS_iii"
.LC7:
	.string	"_Z22kernel_doubleThresholdPfPiS0_iiffi"
.LC8:
	.string	"_Z24kernel_calculateGradientPfS_Piiii"
.LC9:
	.string	"_Z11kernel_blurPfS_iii"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4338:
	.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	.LC4(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z15kernel_exchangeiPiS_S_ii(%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	.LC5(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z10kernel_dfsiPiS_S_ii(%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	.LC6(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z11kernel_thinPfPiS_iii(%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	.LC7(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z22kernel_doubleThresholdPfPiS0_iiffi(%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	.LC8(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z24kernel_calculateGradientPfS_Piiii(%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	.LC9(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z11kernel_blurPfS_iii(%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
.LFE4338:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.text
	.globl	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci
	.type	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci, @function
_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci:
.LFB4295:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4295
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movslq	%edx, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdi, %r12
	leaq	0(,%rdx,4), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r13
	call	malloc@PLT
	movq	%r12, %rsi
	movl	$24, %edx
	movq	%r13, %rdi
	movq	%rax, %rbx
	movq	%rsp, %r12
.LEHB0:
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE0:
	leaq	16(%rsp), %rax
	movb	$0, 16(%rsp)
	movq	%rbx, %r14
	movq	%rax, (%rsp)
	xorl	%eax, %eax
	movq	%rax, 8(%rsp)
.L75:
	movsbl	%bpl, %edx
	movq	%r12, %rsi
	movq	%r13, %rdi
.LEHB1:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
.LEHE1:
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L83
	movq	(%rsp), %rdi
	addq	$4, %r14
	call	_Z5stoffPKc
	movss	%xmm0, -4(%r14)
	jmp	.L75
.L83:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	je	.L79
	jmp	.L81
.L80:
	endbr64
	movq	%rax, %rbx
.L77:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L81
	movq	%rbx, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L81:
	call	__stack_chk_fail@PLT
.L79:
	addq	$432, %rsp
	.cfi_def_cfa_offset 48
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4295:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4295:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4295-.LLSDACSB4295
.LLSDACSB4295:
	.uleb128 .LEHB0-.LFB4295
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4295
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L80-.LFB4295
	.uleb128 0
	.uleb128 .LEHB2-.LFB4295
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE4295:
	.text
	.size	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci, .-_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci
	.section	.rodata.str1.1
.LC10:
	.string	"usage: DisplayImage.out <Image_Path>\n"
.LC11:
	.string	"Unable to open file"
.LC15:
	.string	"Total: "
.LC16:
	.string	" seconds.\n"
.LC17:
	.string	"Blur: "
.LC18:
	.string	"Gradient: "
.LC19:
	.string	"Non-max sup: "
.LC20:
	.string	"Double thresholding: "
.LC21:
	.string	"Edge tracking: "
.LC22:
	.string	"result.txt"
.LC23:
	.string	"\n"
.LC24:
	.string	" "
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4297:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4297
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$1160, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	cmpl	$2, %edi
	je	.L85
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	orl	$-1, %ebx
.LEHB3:
	call	__printf_chk@PLT
.LEHE3:
	jmp	.L84
.L85:
	leaq	-1104(%rbp), %rax
	movq	8(%rsi), %rsi
	xorl	%r11d, %r11d
	movl	$8, %edx
	movq	%rax, -1120(%rbp)
	leaq	-576(%rbp), %rax
	movq	%rax, %rdi
	movq	%r11, -1112(%rbp)
	movb	$0, -1104(%rbp)
	movq	%rax, -1160(%rbp)
.LEHB4:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE4:
	leaq	-456(%rbp), %rdi
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	je	.L87
	leaq	-1120(%rbp), %r14
	movq	-1160(%rbp), %rdi
	movq	%r14, %rsi
.LEHB5:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	-1120(%rbp), %rdi
	movq	%r14, %rsi
	call	_Z5stoffPKc
	movq	-1160(%rbp), %rdi
	cvttss2sil	%xmm0, %r15d
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	-1120(%rbp), %rdi
	xorl	%ebx, %ebx
	call	_Z5stoffPKc
	cvttss2sil	%xmm0, %eax
	movslq	%eax, %r12
	movl	%eax, -1140(%rbp)
	movslq	%r15d, %rax
	imulq	%r12, %rax
	salq	$2, %r12
	movq	%rax, -1176(%rbp)
	salq	$2, %rax
	movq	%rax, %rdi
	movq	%rax, -1152(%rbp)
	call	malloc@PLT
	movq	%rax, %r13
	leaq	-1088(%rbp), %rax
	movq	%rax, -1168(%rbp)
.L88:
	movq	-1160(%rbp), %rdi
	movq	%r14, %rsi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L115
	movq	-1168(%rbp), %rdi
	movq	%r14, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE5:
	movl	-1140(%rbp), %edx
	movq	-1168(%rbp), %rdi
	movl	$32, %esi
.LEHB6:
	call	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci
.LEHE6:
	movq	-1168(%rbp), %rdi
	movq	%rax, -1184(%rbp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	-1152(%rbp), %rcx
	leaq	0(%r13,%rbx), %rdi
	movq	%r12, %rdx
	cmpq	%rbx, -1152(%rbp)
	movq	-1184(%rbp), %rsi
	cmovb	%rbx, %rcx
	subq	%rbx, %rcx
	addq	%r12, %rbx
	call	__memcpy_chk@PLT
	movq	-1184(%rbp), %rdi
	call	free@PLT
	jmp	.L88
.L115:
	movq	-1160(%rbp), %rdi
.LEHB7:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv@PLT
	jmp	.L116
.L87:
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	orl	$-1, %ebx
	jmp	.L91
.L116:
	movl	-1140(%rbp), %ebx
	movl	$512, %ecx
	imull	%r15d, %ebx
	leal	511(%rbx), %eax
	cltd
	idivl	%ecx
	movl	%eax, -1160(%rbp)
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movq	-1152(%rbp), %rdi
	movq	%rax, %r14
	call	malloc@PLT
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movq	%r13, %rdi
	movl	-1160(%rbp), %r9d
	movl	-1140(%rbp), %edx
	movq	%rax, %rsi
	movq	%rax, -1168(%rbp)
	call	_Z4blurPfS_iiii
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movq	-1152(%rbp), %rdi
	movq	%rax, -1184(%rbp)
	call	malloc@PLT
	movq	-1152(%rbp), %rdi
	movq	%rax, -1192(%rbp)
	call	malloc@PLT
	movl	-1140(%rbp), %ecx
	movl	%r15d, %r8d
	movl	$0xbf800000, -1124(%rbp)
	movq	%rax, %r12
	movl	-1160(%rbp), %eax
	movq	-1192(%rbp), %rsi
	leaq	-1124(%rbp), %r9
	movq	-1168(%rbp), %rdi
	movq	%r12, %rdx
	pushq	%rax
	pushq	%rbx
	.cfi_escape 0x2e,0x10
	call	_Z17calculateGradientPfS_PiiiS_ii
	popq	%r8
	popq	%r9
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movq	-1152(%rbp), %rdi
	movq	%rax, %r13
	call	malloc@PLT
	movl	%ebx, %r9d
	movl	%r15d, %r8d
	movq	%r12, %rsi
	movq	%rax, -1152(%rbp)
	pushq	%r10
	movl	-1160(%rbp), %eax
	movl	-1140(%rbp), %ecx
	movq	-1152(%rbp), %rdx
	pushq	%rax
	movq	-1192(%rbp), %rdi
	call	_Z4thinPfPiS_iiii
	popq	%rcx
	popq	%rsi
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movq	-1176(%rbp), %rsi
	movl	$4, %edi
	movq	%rax, %r12
	call	calloc@PLT
	movq	-1176(%rbp), %rsi
	movl	$4, %edi
	movq	%rax, -1168(%rbp)
	call	calloc@PLT
	movss	-1124(%rbp), %xmm1
	movl	%ebx, %r9d
	movl	%r15d, %r8d
	movss	.LC13(%rip), %xmm0
	movq	%rax, -1176(%rbp)
	pushq	%rdi
	movl	-1160(%rbp), %eax
	mulss	%xmm1, %xmm0
	movl	-1140(%rbp), %ecx
	movq	-1176(%rbp), %rdx
	mulss	.LC12(%rip), %xmm1
	movq	-1168(%rbp), %rsi
	pushq	%rax
	movq	-1152(%rbp), %rdi
	call	_Z15doubleThresholdPfPiS0_iiffii
	popq	%rax
	popq	%rdx
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	-1140(%rbp), %edx
	movq	-1176(%rbp), %rsi
	movl	%r15d, %ecx
	movq	-1168(%rbp), %rdi
	movq	%rax, %rbx
	.cfi_escape 0x2e,0
	call	_Z9edgeTrackPiS_ii
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movsd	.LC14(%rip), %xmm0
	movq	-1184(%rbp), %rcx
	leaq	.LC15(%rip), %rsi
	movq	%rax, %rdx
	subq	%rbx, %rax
	subq	%r14, %rdx
	cvtsi2sdq	%rdx, %xmm1
	movq	-1184(%rbp), %rdx
	subq	%r14, %rdx
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -1192(%rbp)
	cvtsi2sdq	%rdx, %xmm1
	movq	%r13, %rdx
	subq	%rcx, %rdx
	divsd	%xmm0, %xmm1
	movq	%xmm1, %r14
	cvtsi2sdq	%rdx, %xmm1
	movq	%r12, %rdx
	subq	%r13, %rdx
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -1176(%rbp)
	cvtsi2sdq	%rdx, %xmm1
	movq	%rbx, %rdx
	leaq	_ZSt4cout(%rip), %rbx
	subq	%r12, %rdx
	movq	%rbx, %rdi
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -1160(%rbp)
	cvtsi2sdq	%rdx, %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -1152(%rbp)
	cvtsi2sdq	%rax, %xmm1
	divsd	%xmm0, %xmm1
	movq	%xmm1, %r12
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	-1192(%rbp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC16(%rip), %r13
	movq	%rax, %rdi
	movq	%r13, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC17(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%r14, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r13, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	-1176(%rbp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r13, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC19(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	-1160(%rbp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r13, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC20(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	-1152(%rbp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r13, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC21(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%r12, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r13, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	-1088(%rbp), %rax
	movl	$16, %edx
	leaq	.LC22(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, -1152(%rbp)
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE7:
	leaq	-976(%rbp), %rdi
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	jne	.L92
.L97:
	movq	-1152(%rbp), %rdi
	xorl	%ebx, %ebx
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L91
.L92:
	movq	-1152(%rbp), %rdi
	movl	%r15d, %esi
.LEHB8:
	call	_ZNSolsEi@PLT
	leaq	.LC23(%rip), %r14
	movq	%rax, %rdi
	movq	%r14, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	-1140(%rbp), %esi
	movq	-1152(%rbp), %rdi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	movq	%r14, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
.L93:
	cmpl	%r15d, %r13d
	jge	.L95
	movslq	%r12d, %rbx
.L96:
	movl	%ebx, %eax
	movl	-1140(%rbp), %ecx
	subl	%r12d, %eax
	cmpl	%ecx, %eax
	jge	.L117
	movq	-1168(%rbp), %rax
	movq	-1152(%rbp), %rdi
	imull	$255, (%rax,%rbx,4), %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC24(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%rbx
	jmp	.L96
.L117:
	movq	-1152(%rbp), %rdi
	movq	%r14, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %r12d
	incl	%r13d
	jmp	.L93
.L95:
	movq	-1152(%rbp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv@PLT
.LEHE8:
	jmp	.L97
.L91:
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-1120(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L84
.L108:
	endbr64
	movq	%rax, %rbx
.L98:
	movq	-1168(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L99
.L109:
	endbr64
	movq	%rax, %rbx
.L100:
	movq	-1152(%rbp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L99
.L107:
	endbr64
	movq	%rax, %rbx
.L99:
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L101
.L106:
	endbr64
	movq	%rax, %rbx
.L101:
	leaq	-1120(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L114
	movq	%rbx, %rdi
.LEHB9:
	call	_Unwind_Resume@PLT
.LEHE9:
.L84:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L103
.L114:
	call	__stack_chk_fail@PLT
.L103:
	leaq	-40(%rbp), %rsp
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4297:
	.section	.gcc_except_table
.LLSDA4297:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4297-.LLSDACSB4297
.LLSDACSB4297:
	.uleb128 .LEHB3-.LFB4297
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB4-.LFB4297
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L106-.LFB4297
	.uleb128 0
	.uleb128 .LEHB5-.LFB4297
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L107-.LFB4297
	.uleb128 0
	.uleb128 .LEHB6-.LFB4297
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L108-.LFB4297
	.uleb128 0
	.uleb128 .LEHB7-.LFB4297
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L107-.LFB4297
	.uleb128 0
	.uleb128 .LEHB8-.LFB4297
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L109-.LFB4297
	.uleb128 0
	.uleb128 .LEHB9-.LFB4297
	.uleb128 .LEHE9-.LEHB9
	.uleb128 0
	.uleb128 0
.LLSDACSE4297:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	-1082130432
	.align 4
.LC1:
	.long	1065353216
	.align 4
.LC3:
	.long	1092616192
	.align 4
.LC12:
	.long	1041865114
	.align 4
.LC13:
	.long	1036831949
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC14:
	.long	0
	.long	1104006501
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <chrono>

using namespace std;

#define kernel_width 7
#define threadsPerBlock 512
#define NUM_ITER_DFS 3
#define DFS_BLOCK_SIZE 8
float stoff(const char* s){
  float rez = 0, fact = 1;
  if (*s == '-'){
    s++;
    fact = -1;
  };
  for (int point_seen = 0; *s; s++){
    if (*s == '.'){
      point_seen = 1; 
      continue;
    };
    int d = *s - '0';
    if (d >= 0 && d <= 9){
      if (point_seen) fact /= 10.0f;
      rez = rez * 10.0f + (float)d;
    };
  };
  return rez * fact;
}

__global__ void kernel_blur(float* pixels, float* output, int width, int height, int N) {
    const float kernel[kernel_width][kernel_width] = {
        {0.00000067, 0.00002292, 0.00019117, 0.00038771, 0.00019117, 0.00002292, 0.00000067},
        {0.00002292, 0.00078633, 0.00655965, 0.01330373, 0.00655965, 0.00078633, 0.00002292},
        {0.00019117, 0.00655965, 0.05472157, 0.11098164, 0.05472157, 0.00655965, 0.00019117},
        {0.00038771, 0.01330373, 0.11098164, 0.22508352, 0.11098164, 0.01330373, 0.00038771},
        {0.00019117, 0.00655965, 0.05472157, 0.11098164, 0.05472157, 0.00655965, 0.00019117},
        {0.00002292, 0.00078633, 0.00655965, 0.01330373, 0.00655965, 0.00078633, 0.00002292},
        {0.00000067, 0.00002292, 0.00019117, 0.00038771, 0.00019117, 0.00002292, 0.00000067}
    };

    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        int row = index / width;
        int col = index % width;
        float sum = 0;
        float denom = 0;
        int rowStart = row - kernel_width/2;
        int rowEnd = row + kernel_width/2 + 1;
        int colStart = col - kernel_width/2;
        int colEnd = col + kernel_width/2 + 1;
        for (int smallRow = rowStart; smallRow < rowEnd; smallRow ++) {
            for (int smallCol = colStart; smallCol < colEnd; smallCol ++) {
                if (smallRow >= 0 && smallRow < height && smallCol >= 0 && smallCol < width) {
                    sum += kernel[smallRow - rowStart][smallCol - colStart] * pixels[smallRow * width + smallCol];
                    denom += kernel[smallRow - rowStart][smallCol - colStart];
                }
            }
        }
        output[index] = sum/denom;
    }   
}

__global__ void kernel_calculateGradient(float* pixelsAfterBlur, float* gradientMag, int* gradientAng, int width, int height, int N) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        int row = index / width;
        int col = index % width;
        float gy = (float) row == height - 1? 0 : pixelsAfterBlur[index + width] - pixelsAfterBlur[index];
        float gx = (float) col == width - 1? 0 : pixelsAfterBlur[index + 1] - pixelsAfterBlur[index];
        gradientMag[index] = sqrt(gx * gx + gy * gy);
        float ang;
        if (gx < 0.000001 && gx > -0.000001) ang = 90;
        else ang = atan(gy / gx) / 3.1415926 * 180.0;
        if (ang < 0)
            ang += 180;
        gradientAng[index] = ((int) (ang + 22.5) / 45) * 45;
    }
}

__global__ void kernel_doubleThreshold(float* pixelsAfterThin, int* pixelsStrongEdges, int* pixelsWeakEdges, int width, int height, float low_threshold, float high_threshold, int N) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        float val = pixelsAfterThin[index];
        if (val >= high_threshold){
            pixelsStrongEdges[index] = 1;
        }
        if (val < high_threshold && val >= low_threshold){
            pixelsWeakEdges[index] = 1;
        }
    }
}

__global__ void kernel_thin(float* pixelsAfterThin, int* gradientAng, float* gradientMag, int width, int height, int N) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index < N) {
        int row = index / width;
        int col = index % width;
        float mag = gradientMag[row * width + col];
        float magL = 0;
        float magR = 0;
        int ang = gradientAng[row * width + col];
        if (ang == 0 || ang == 180) {
            if (row > 0) magL = gradientMag[row * width + col - 1];
            if (row < height - 1) magR = gradientMag[row * width + col + 1];
        } 

        else if (ang == 45 || ang == 225) {
            if (row > 0 && col < width - 1) magL = gradientMag[(row + 1) * width + col + 1];

            if (row < height - 1 && col > 0) magR = gradientMag[(row - 1) * width + col - 1];
        } 

        else if (ang == 90 || ang == 270) {
            if (col > 0) magL = gradientMag[(row - 1) * width + col];

            if (col < width - 1) magR = gradientMag[(row + 1) * width + col];
        } 

        else if (ang == 135 || ang == 315) {
            if (row > 0 && col > 0) magL = gradientMag[(row + 1) * width + col - 1];

            if (row < height - 1 && col < width - 1) magR = gradientMag[(row - 1) * width + col + 1];
        }
        if (mag > magL && mag > magR) {
            pixelsAfterThin[row * width + col] = mag;
        } 
        else {
            pixelsAfterThin[row * width + col] = 0;
        }
    }
}


void blur(float* pixels, float* output, int width, int height, int N, int blocks) {
    float* cudaPixels;
    float* cudaOutput;
    hipMalloc(&cudaPixels, N * sizeof(float));
    hipMalloc(&cudaOutput, N * sizeof(float));
    hipMemcpy(cudaPixels, pixels, N * sizeof(float), hipMemcpyHostToDevice);
    kernel_blur<<<blocks, threadsPerBlock>>>(cudaPixels, cudaOutput, width, height, N);
    hipDeviceSynchronize();
    hipMemcpy(output, cudaOutput, N * sizeof(float), hipMemcpyDeviceToHost);
    hipFree(cudaPixels);
    hipFree(cudaOutput);
}

void calculateGradient(float* pixelsAfterBlur, float* gradientMag, int* gradientAng, int width, int height, float* maxMag, int N, int blocks) {
    float* cudaPixels;
    float* cudaGradientMag;
    int* cudaGradientAng;
    hipMalloc(&cudaPixels, N * sizeof(float));
    hipMalloc(&cudaGradientAng, N * sizeof(int));
    hipMalloc(&cudaGradientMag, N * sizeof(float));
    hipMemcpy(cudaPixels, pixelsAfterBlur, N * sizeof(float), hipMemcpyHostToDevice);
    kernel_calculateGradient<<<blocks, threadsPerBlock>>>(cudaPixels, cudaGradientMag, cudaGradientAng, width, height, N);
    hipDeviceSynchronize();
    hipMemcpy(gradientMag, cudaGradientMag, N * sizeof(float), hipMemcpyDeviceToHost);
    hipMemcpy(gradientAng, cudaGradientAng, N * sizeof(int), hipMemcpyDeviceToHost);


    float max = 0;
    for (int i = 0; i < N; i++) {
        if (gradientMag[i] > max) {
            max = gradientMag[i];
        }
    }
    *maxMag = max;
    hipFree(cudaPixels);
    hipFree(cudaGradientAng);
    hipFree(cudaGradientMag);
}

void thin(float* gradientMag, int* gradientAng, float* pixelsAfterThin, int width, int height, int N, int blocks) {
    float* cudaPixels;
    float* cudaGradientMag;
    int* cudaGradientAng;
    hipMalloc(&cudaPixels, N * sizeof(float));
    hipMalloc(&cudaGradientAng, N * sizeof(int));
    hipMalloc(&cudaGradientMag, N * sizeof(float));
    hipMemcpy(cudaPixels, pixelsAfterThin, N * sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(cudaGradientAng, gradientAng, N * sizeof(int), hipMemcpyHostToDevice);
    hipMemcpy(cudaGradientMag, gradientMag, N * sizeof(float), hipMemcpyHostToDevice);
    kernel_thin<<<blocks, threadsPerBlock>>>(cudaPixels, cudaGradientAng, cudaGradientMag, width, height, N);
    hipDeviceSynchronize();
    hipMemcpy(pixelsAfterThin, cudaPixels, N * sizeof(float), hipMemcpyDeviceToHost);
    hipFree(cudaPixels);
    hipFree(cudaGradientMag);
    hipFree(cudaGradientAng);
}

void doubleThreshold(float* pixelsAfterThin, int* pixelsStrongEdges, int* pixelsWeakEdges, int width, int height, float low_threshold, float high_threshold, int N, int blocks) {
    float* cudaPixels;
    int* cudaStrongEdges;
    int* cudaWeakEdges;
    hipMalloc(&cudaPixels, N * sizeof(float));
    hipMalloc(&cudaStrongEdges, N * sizeof(int));
    hipMalloc(&cudaWeakEdges, N * sizeof(int));
    hipMemcpy(cudaPixels, pixelsAfterThin, N * sizeof(float), hipMemcpyHostToDevice);
    kernel_doubleThreshold<<<blocks, threadsPerBlock>>>(cudaPixels, cudaStrongEdges, cudaWeakEdges, width, height, low_threshold, high_threshold, N);
    hipDeviceSynchronize();
    hipMemcpy(pixelsStrongEdges, cudaStrongEdges, N * sizeof(int), hipMemcpyDeviceToHost);
    hipMemcpy(pixelsWeakEdges, cudaWeakEdges, N * sizeof(int), hipMemcpyDeviceToHost);
    hipFree(cudaPixels);
    hipFree(cudaStrongEdges);
    hipFree(cudaWeakEdges);
}

__device__ __inline__ void push_back(int* stack, int* stack_pt, int val) {
    stack[*stack_pt] = val;
    *stack_pt ++;
}

__device__ __inline__ int empty(int* stack, int* stack_pt) {
    if (*stack_pt == 0) {
        return 1;
    } else {
        return 0;
    }
}

__device__ __inline__ int pop_back(int* stack, int* stack_pt) {
    int val = stack[*stack_pt - 1];
    *stack_pt --;
    return val;
}

__device__ __inline__ void dfsRange(int row, int col, int lorow, int hirow, int locol, int hicol, int* pixelsStrongEdges, int* pixelsWeakEdges, int* visited, int width, int height) {
    int stack[DFS_BLOCK_SIZE * DFS_BLOCK_SIZE];
    int stack_pt = 0;
    int idx = row * width + col;
    push_back(stack, &stack_pt, idx);
    while (!empty(stack, &stack_pt)) {
        idx = pop_back(stack, &stack_pt);
        if (pixelsWeakEdges[idx]) {
            pixelsStrongEdges[idx] = 1;
        }
        int id;
        if (pixelsStrongEdges[idx]) {
            if (row > lorow) {
                id = (row - 1) * width + col;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }
                if (col > locol) {
                    id = (row - 1) * width + col - 1;
                    if (!visited[id]){
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    } 
                }

                if (col < hicol - 1) {
                    id = (row - 1) * width + col + 1;
                    if (!visited[id]) {
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    } 
                }
            }

            if (row < hirow - 1) {
                id = (row + 1) * width + col;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }
                if (col > locol) {
                    id = (row + 1) * width + col - 1;
                    if (!visited[id]){
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    } 
                }

                if (col < hicol - 1) {
                    id = (row + 1) * width + col + 1;
                    if (!visited[id]) {
                        push_back(stack, &stack_pt, id);
                        visited[id] = 1;
                    }
                }
            }

            if (col > locol) {
                id = row * width + col - 1;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }            
            }

            if (col < hicol - 1) {
                id = row * width + col + 1;
                if (!visited[id]) {
                    push_back(stack, &stack_pt, id);
                    visited[id] = 1;
                }               
            }
        }
    }    
}

__global__ void kernel_dfs(int numDiv, int* pixelsStrongEdges, int* pixelsWeakEdges, int* visited, int width, int height) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index >= numDiv * numDiv) return;
    int colIndex = index % numDiv;
    int rowIndex = index / numDiv;
    int colStart = colIndex * width / numDiv;
    int colEnd = (colIndex + 1) * width / numDiv;
    int rowStart = rowIndex * width / numDiv;
    int rowEnd = (rowIndex + 1) * width / numDiv;


    for (int row = rowStart; row < rowEnd; row ++) {
        for (int col = colStart; col < colEnd; col ++) {
            if (pixelsStrongEdges[row * width + col] == 1)
                dfsRange(row, col, 0, height, 0, width, pixelsStrongEdges, pixelsWeakEdges, visited, width, height);

        }
    }
}


__global__ void kernel_exchange(int numDiv, int* pixelsStrongEdges, int* pixelsWeakEdges, int* visited, int width, int height) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    if (index >= numDiv * numDiv) return;
    int colIndex = index % numDiv;
    int rowIndex = index / numDiv;
    int colStart = colIndex * width / numDiv;
    int colEnd = (colIndex + 1) * width / numDiv;
    int rowStart = rowIndex * width / numDiv;
    int rowEnd = (rowIndex + 1) * width / numDiv;
    // Left
    if (colStart > 0) {
        for (int row = rowStart; row < rowEnd; row ++) {
            if (pixelsStrongEdges[row * width + colStart] == 1) {
                pixelsStrongEdges[row * width + colStart - 1] = 1;
            }
        }
    }

    // Right
    if (colEnd < width) {
        for (int row = rowStart; row < rowEnd; row ++) {
            if (pixelsStrongEdges[row * width + colEnd - 1] == 1) {
                pixelsStrongEdges[row * width + colEnd] = 1;
            }
        }
    }

    // Top
    if (rowStart > 0) {
        for (int col = colStart; col < colEnd; col ++) {
            if (pixelsStrongEdges[rowStart * width + col] == 1) {
                pixelsStrongEdges[(rowStart - 1) * width + col] = 1;
            }
        }
    }

    // Bottom
    if (rowEnd < height) {
        for (int col = colStart; col < colEnd; col ++) {
            if (pixelsStrongEdges[(rowEnd - 1) * width + col] == 1) {
                pixelsStrongEdges[rowEnd * width + col] = 1;
            }
        }
    }
}

void edgeTrack(int* pixelsStrongEdges, int* pixelsWeakEdges, int width, int height) {
    int* visited = (int*) calloc(sizeof(int), width * height);
    int numDiv = min((height + DFS_BLOCK_SIZE - 1)/DFS_BLOCK_SIZE
        , (width + DFS_BLOCK_SIZE - 1)/DFS_BLOCK_SIZE);
    int blocks = (numDiv * numDiv + threadsPerBlock - 1) / threadsPerBlock;
    for (int i = 0; i < NUM_ITER_DFS; i ++) {
        kernel_exchange<<<blocks, threadsPerBlock>>>(numDiv, pixelsStrongEdges, pixelsWeakEdges, visited, width, height);
        hipDeviceSynchronize();
        kernel_dfs<<<blocks, threadsPerBlock>>>(numDiv, pixelsStrongEdges, pixelsWeakEdges, visited, width, height);
        hipDeviceSynchronize();    
    }

}

float* split(string str, char delimiter, int numElts) {
    float* elts = (float*) malloc(sizeof(float) * numElts);
    stringstream ss(str);
    string tok;
    int i = 0; 

    while(getline(ss, tok, delimiter)) {
        elts[i++] = stoff(tok.c_str());
    }
 
    return elts;
}

int main(int argc, char** argv) {  

    if (argc != 2) {
        printf("usage: DisplayImage.out <Image_Path>\n");
            return -1;
    }

    float low_threshold = 0.1;
    float high_threshold = 0.15;
    float* pixels;
    int height;
    int width;

    string line;
    ifstream myfile (argv[1]);
    if (myfile.is_open()) {

        getline(myfile, line);
        height = stoff(line.c_str());
        getline(myfile, line);
        width = stoff(line.c_str());

        pixels = (float*) malloc(sizeof(float) * height * width);
        int idx = 0;
        while (getline(myfile, line)) {
            float* content = split(line, ' ', width);
            memcpy(pixels+idx, content, sizeof(float) * width);
            idx += width;
            free(content);
        }
        myfile.close();
    } 
    else {
        printf("Unable to open file"); 
        return -1;
    }

    int N = height * width;
    int blocks = (N + threadsPerBlock - 1) / threadsPerBlock;
    auto start = std::chrono::high_resolution_clock::now();

    // /* 1. blur */
    float* pixelsAfterBlur = (float*) malloc(sizeof(float)*height*width);
    blur(pixels, pixelsAfterBlur, width, height, N, blocks);
    auto ck2 = std::chrono::high_resolution_clock::now();

    /* 2. gradient */
    float* gradientMag = (float*) malloc(sizeof(float)*height*width);
    int* gradientAng = (int*) malloc(sizeof(int)*height*width);
    float maxMag = -1;
    calculateGradient(pixelsAfterBlur, gradientMag, gradientAng, width, height, &maxMag, N, blocks);
    auto ck3 = std::chrono::high_resolution_clock::now();

    /* 3. non-maximum suppresion */
    float* pixelsAfterThin = (float*) malloc(sizeof(float)*height*width);
    thin(gradientMag, gradientAng, pixelsAfterThin, width, height, N, blocks);
    auto ck4 = std::chrono::high_resolution_clock::now();

    /* 4. double thresholding */
    int* pixelsStrongEdges = (int*) calloc(sizeof(int), height*width);
    int* pixelsWeakEdges = (int*) calloc(sizeof(int), height*width);
    doubleThreshold(pixelsAfterThin, pixelsStrongEdges, pixelsWeakEdges, width, height, low_threshold * maxMag, high_threshold * maxMag, N, blocks);
    auto ck5 = std::chrono::high_resolution_clock::now();

    /* 5. edge tracking */
    edgeTrack(pixelsStrongEdges, pixelsWeakEdges, width, height);
    auto finish = std::chrono::high_resolution_clock::now();
    std::chrono::duration<double> elapsed = std::chrono::duration_cast<std::chrono::duration<double>>(finish - start);
    std::chrono::duration<double> blur_time = std::chrono::duration_cast<std::chrono::duration<double>>(ck2 - start);
    std::chrono::duration<double> grad_time = std::chrono::duration_cast<std::chrono::duration<double>>(ck3 - ck2);
    std::chrono::duration<double> sup_time = std::chrono::duration_cast<std::chrono::duration<double>>(ck4 - ck3);
    std::chrono::duration<double> db_ts = std::chrono::duration_cast<std::chrono::duration<double>>(ck5 - ck4);
    std::chrono::duration<double> ed_tk = std::chrono::duration_cast<std::chrono::duration<double>>(finish - ck5);
    std::cout << "Total: " << elapsed.count() << " seconds.\n";
    std::cout << "Blur: " << blur_time.count() << " seconds.\n";
    std::cout << "Gradient: " << grad_time.count() << " seconds.\n";
    std::cout << "Non-max sup: " << sup_time.count() << " seconds.\n";
    std::cout << "Double thresholding: " << db_ts.count() << " seconds.\n";
    std::cout << "Edge tracking: " << ed_tk.count() << " seconds.\n";

    /* 6. display */
    ofstream outfile ("result.txt");
    if (outfile.is_open()) {

        outfile << height << "\n";
        outfile << width << "\n";
        int idx = 0;
        for (int i = 0; i < height; i++) {
            for (int j = 0; j < width; j++) {
                outfile <<  pixelsStrongEdges[idx++] * 255 << " ";
            }
            outfile << "\n";
        }
        outfile.close();
    }

    return 0;
}
	.text
	.file	"DisplayImage.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	2, 0x0                          # -- Begin function _Z5stoffPKc
.LCPI0_0:
	.long	0x3f800000                      # float 1
	.long	0xbf800000                      # float -1
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI0_1:
	.long	0x41200000                      # float 10
	.text
	.globl	_Z5stoffPKc
	.type	_Z5stoffPKc,@function
_Z5stoffPKc:                            # @_Z5stoffPKc
	.cfi_startproc
# %bb.0:
	xorl	%eax, %eax
	cmpb	$45, (%rdi)
	sete	%al
	movss	.LCPI0_0(,%rax,4), %xmm1        # xmm1 = mem[0],zero,zero,zero
	addq	%rax, %rdi
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
	movss	.LCPI0_1(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
.LBB0_1:                                # =>This Inner Loop Header: Depth=1
	movzbl	(%rdi), %ecx
	cmpl	$46, %ecx
	je	.LBB0_2
# %bb.3:                                #   in Loop: Header=BB0_1 Depth=1
	testl	%ecx, %ecx
	je	.LBB0_9
# %bb.4:                                #   in Loop: Header=BB0_1 Depth=1
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	ja	.LBB0_8
# %bb.5:                                #   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	je	.LBB0_7
# %bb.6:                                #   in Loop: Header=BB0_1 Depth=1
	divss	%xmm2, %xmm1
.LBB0_7:                                #   in Loop: Header=BB0_1 Depth=1
	addl	$-48, %ecx
	mulss	%xmm2, %xmm0
	xorps	%xmm3, %xmm3
	cvtsi2ss	%ecx, %xmm3
	addss	%xmm3, %xmm0
	jmp	.LBB0_8
.LBB0_2:                                #   in Loop: Header=BB0_1 Depth=1
	movl	$1, %eax
.LBB0_8:                                #   in Loop: Header=BB0_1 Depth=1
	incq	%rdi
	jmp	.LBB0_1
.LBB0_9:
	mulss	%xmm1, %xmm0
	retq
.Lfunc_end0:
	.size	_Z5stoffPKc, .Lfunc_end0-_Z5stoffPKc
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__kernel_blurPfS_iii # -- Begin function _Z26__device_stub__kernel_blurPfS_iii
	.type	_Z26__device_stub__kernel_blurPfS_iii,@function
_Z26__device_stub__kernel_blurPfS_iii:  # @_Z26__device_stub__kernel_blurPfS_iii
	.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	$128, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	8(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	4(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z11kernel_blurPfS_iii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	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_end1:
	.size	_Z26__device_stub__kernel_blurPfS_iii, .Lfunc_end1-_Z26__device_stub__kernel_blurPfS_iii
	.cfi_endproc
                                        # -- End function
	.globl	_Z39__device_stub__kernel_calculateGradientPfS_Piiii # -- Begin function _Z39__device_stub__kernel_calculateGradientPfS_Piiii
	.type	_Z39__device_stub__kernel_calculateGradientPfS_Piiii,@function
_Z39__device_stub__kernel_calculateGradientPfS_Piiii: # @_Z39__device_stub__kernel_calculateGradientPfS_Piiii
	.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
	movl	%r9d, (%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	$_Z24kernel_calculateGradientPfS_Piiii, %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_end2:
	.size	_Z39__device_stub__kernel_calculateGradientPfS_Piiii, .Lfunc_end2-_Z39__device_stub__kernel_calculateGradientPfS_Piiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi # -- Begin function _Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi
	.type	_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi,@function
_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi: # @_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi
	.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	$160, %rsp
	.cfi_def_cfa_offset 208
	.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	8(%rsp), %r10
	movss	%xmm1, (%r10)
	leaq	4(%rsp), %r11
	movl	%r9d, (%r11)
	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)
	movq	%r10, 48(%rbx)
	movq	%r11, 56(%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	$_Z22kernel_doubleThresholdPfPiS0_iiffi, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$176, %rsp
	.cfi_adjust_cfa_offset -176
	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_end3:
	.size	_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi, .Lfunc_end3-_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__kernel_thinPfPiS_iii # -- Begin function _Z26__device_stub__kernel_thinPfPiS_iii
	.type	_Z26__device_stub__kernel_thinPfPiS_iii,@function
_Z26__device_stub__kernel_thinPfPiS_iii: # @_Z26__device_stub__kernel_thinPfPiS_iii
	.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
	movl	%r9d, (%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	$_Z11kernel_thinPfPiS_iii, %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_end4:
	.size	_Z26__device_stub__kernel_thinPfPiS_iii, .Lfunc_end4-_Z26__device_stub__kernel_thinPfPiS_iii
	.cfi_endproc
                                        # -- End function
	.globl	_Z4blurPfS_iiii                 # -- Begin function _Z4blurPfS_iiii
	.type	_Z4blurPfS_iiii,@function
_Z4blurPfS_iiii:                        # @_Z4blurPfS_iiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%r9d, %r13d
	movl	%r8d, %ebp
	movl	%ecx, 12(%rsp)                  # 4-byte Spill
	movl	%edx, 8(%rsp)                   # 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r15
	movslq	%r8d, %rbx
	shlq	$2, %rbx
	leaq	16(%rsp), %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
	movq	%rsp, %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
	movq	(%r12), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%r13d, %edi
	btsq	$32, %rdi
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$512, %rdx                      # imm = 0x200
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB5_2
# %bb.1:
	movq	16(%rsp), %rdi
	movq	(%rsp), %rsi
	movl	8(%rsp), %edx                   # 4-byte Reload
	movl	12(%rsp), %ecx                  # 4-byte Reload
	movl	%ebp, %r8d
	callq	_Z26__device_stub__kernel_blurPfS_iii
.LBB5_2:
	callq	hipDeviceSynchronize
	movq	(%rsp), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	(%rsp), %rdi
	callq	hipFree
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z4blurPfS_iiii, .Lfunc_end5-_Z4blurPfS_iiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z17calculateGradientPfS_PiiiS_ii # -- Begin function _Z17calculateGradientPfS_PiiiS_ii
	.type	_Z17calculateGradientPfS_PiiiS_ii,@function
_Z17calculateGradientPfS_PiiiS_ii:      # @_Z17calculateGradientPfS_PiiiS_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
	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
	movq	%r9, 48(%rsp)                   # 8-byte Spill
	movl	%r8d, 28(%rsp)                  # 4-byte Spill
	movl	%ecx, 24(%rsp)                  # 4-byte Spill
	movq	%rdx, 40(%rsp)                  # 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movslq	112(%rsp), %r15
	movl	120(%rsp), %ebp
	movq	%r15, %r13
	shlq	$2, %r13
	leaq	32(%rsp), %r12
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	btsq	$32, %rbp
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$512, %rdx                      # imm = 0x200
	movq	%rbp, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_2
# %bb.1:
	movq	32(%rsp), %rdi
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
	movl	24(%rsp), %ecx                  # 4-byte Reload
	movl	28(%rsp), %r8d                  # 4-byte Reload
	movl	%r15d, %r9d
	callq	_Z39__device_stub__kernel_calculateGradientPfS_Piiii
.LBB6_2:
	callq	hipDeviceSynchronize
	movq	16(%rsp), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	8(%rsp), %rsi
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%r15d, %r15d
	jle	.LBB6_3
# %bb.5:                                # %.lr.ph.preheader
	movl	%r15d, %eax
	xorps	%xmm1, %xmm1
	xorl	%ecx, %ecx
.LBB6_6:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r14,%rcx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	maxss	%xmm1, %xmm0
	incq	%rcx
	movaps	%xmm0, %xmm1
	cmpq	%rcx, %rax
	jne	.LBB6_6
	jmp	.LBB6_4
.LBB6_3:
	xorps	%xmm0, %xmm0
.LBB6_4:                                # %._crit_edge
	movq	48(%rsp), %rax                  # 8-byte Reload
	movss	%xmm0, (%rax)
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	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_end6:
	.size	_Z17calculateGradientPfS_PiiiS_ii, .Lfunc_end6-_Z17calculateGradientPfS_PiiiS_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z4thinPfPiS_iiii               # -- Begin function _Z4thinPfPiS_iiii
	.type	_Z4thinPfPiS_iiii,@function
_Z4thinPfPiS_iiii:                      # @_Z4thinPfPiS_iiii
	.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
	movl	%r8d, 32(%rsp)                  # 4-byte Spill
	movl	%ecx, 28(%rsp)                  # 4-byte Spill
	movq	%rdx, %rbp
	movq	%rsi, %r12
	movq	%rdi, 48(%rsp)                  # 8-byte Spill
	movl	112(%rsp), %r13d
	movl	%r9d, 36(%rsp)                  # 4-byte Spill
	movslq	%r9d, %r14
	shlq	$2, %r14
	leaq	16(%rsp), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	40(%rsp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movq	(%r15), %rdi
	movq	%rbp, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbx), %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	8(%rsp), %rax
	movq	(%rax), %rdi
	movq	48(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	btsq	$32, %r13
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$512, %rdx                      # imm = 0x200
	movq	%r13, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB7_2
# %bb.1:
	movq	16(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	8(%rsp), %rdx
	movl	28(%rsp), %ecx                  # 4-byte Reload
	movl	32(%rsp), %r8d                  # 4-byte Reload
	movl	36(%rsp), %r9d                  # 4-byte Reload
	callq	_Z26__device_stub__kernel_thinPfPiS_iii
.LBB7_2:
	callq	hipDeviceSynchronize
	movq	16(%rsp), %rsi
	movq	%rbp, %rdi
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	40(%rsp), %rdi
	callq	hipFree
	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_end7:
	.size	_Z4thinPfPiS_iiii, .Lfunc_end7-_Z4thinPfPiS_iiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z15doubleThresholdPfPiS0_iiffii # -- Begin function _Z15doubleThresholdPfPiS0_iiffii
	.type	_Z15doubleThresholdPfPiS0_iiffii,@function
_Z15doubleThresholdPfPiS0_iiffii:       # @_Z15doubleThresholdPfPiS0_iiffii
	.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
	movl	%r9d, %ebp
	movss	%xmm1, 36(%rsp)                 # 4-byte Spill
	movss	%xmm0, 32(%rsp)                 # 4-byte Spill
	movl	%r8d, 28(%rsp)                  # 4-byte Spill
	movl	%ecx, 24(%rsp)                  # 4-byte Spill
	movq	%rdx, 48(%rsp)                  # 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	112(%rsp), %r12d
	movslq	%r9d, %r14
	shlq	$2, %r14
	leaq	40(%rsp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movq	(%rbx), %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	btsq	$32, %r12
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$512, %rdx                      # imm = 0x200
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_2
# %bb.1:
	movq	40(%rsp), %rdi
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
	movl	24(%rsp), %ecx                  # 4-byte Reload
	movl	28(%rsp), %r8d                  # 4-byte Reload
	movss	32(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	36(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movl	%ebp, %r9d
	callq	_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi
.LBB8_2:
	callq	hipDeviceSynchronize
	movq	16(%rsp), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	8(%rsp), %rsi
	movq	48(%rsp), %rdi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	40(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	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_end8:
	.size	_Z15doubleThresholdPfPiS0_iiffii, .Lfunc_end8-_Z15doubleThresholdPfPiS0_iiffii
	.cfi_endproc
                                        # -- End function
	.globl	_Z25__device_stub__kernel_dfsiPiS_S_ii # -- Begin function _Z25__device_stub__kernel_dfsiPiS_S_ii
	.type	_Z25__device_stub__kernel_dfsiPiS_S_ii,@function
_Z25__device_stub__kernel_dfsiPiS_S_ii: # @_Z25__device_stub__kernel_dfsiPiS_S_ii
	.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	20(%rsp), %rax
	movl	%edi, (%rax)
	leaq	56(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	48(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%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	$_Z10kernel_dfsiPiS_S_ii, %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_end9:
	.size	_Z25__device_stub__kernel_dfsiPiS_S_ii, .Lfunc_end9-_Z25__device_stub__kernel_dfsiPiS_S_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z30__device_stub__kernel_exchangeiPiS_S_ii # -- Begin function _Z30__device_stub__kernel_exchangeiPiS_S_ii
	.type	_Z30__device_stub__kernel_exchangeiPiS_S_ii,@function
_Z30__device_stub__kernel_exchangeiPiS_S_ii: # @_Z30__device_stub__kernel_exchangeiPiS_S_ii
	.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	20(%rsp), %rax
	movl	%edi, (%rax)
	leaq	56(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	48(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%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	$_Z15kernel_exchangeiPiS_S_ii, %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_end10:
	.size	_Z30__device_stub__kernel_exchangeiPiS_S_ii, .Lfunc_end10-_Z30__device_stub__kernel_exchangeiPiS_S_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z9edgeTrackPiS_ii              # -- Begin function _Z9edgeTrackPiS_ii
	.type	_Z9edgeTrackPiS_ii,@function
_Z9edgeTrackPiS_ii:                     # @_Z9edgeTrackPiS_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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movq	%rsi, 16(%rsp)                  # 8-byte Spill
	movq	%rdi, 8(%rsp)                   # 8-byte Spill
	movabsq	$4294967808, %r13               # imm = 0x100000200
	movl	%ecx, %eax
	imull	%edx, %eax
	movslq	%eax, %rsi
	movl	$4, %edi
	callq	calloc
	movq	%rax, (%rsp)                    # 8-byte Spill
	leal	7(%rbx), %eax
	leal	14(%rbx), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	leal	7(%r14), %eax
	leal	14(%r14), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	sarl	$3, %r15d
	cmpl	%r15d, %ecx
	cmovll	%ecx, %r15d
	movl	%r15d, %eax
	imull	%eax, %eax
	addl	$511, %eax                      # imm = 0x1FF
	shrl	$9, %eax
	leaq	(%rax,%r13), %r12
	addq	$-512, %r12                     # imm = 0xFE00
	movl	$3, %ebp
.LBB11_1:                               # =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB11_3
# %bb.2:                                #   in Loop: Header=BB11_1 Depth=1
	movl	%r15d, %edi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movq	(%rsp), %rcx                    # 8-byte Reload
	movl	%r14d, %r8d
	movl	%ebx, %r9d
	callq	_Z30__device_stub__kernel_exchangeiPiS_S_ii
.LBB11_3:                               #   in Loop: Header=BB11_1 Depth=1
	callq	hipDeviceSynchronize
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB11_5
# %bb.4:                                #   in Loop: Header=BB11_1 Depth=1
	movl	%r15d, %edi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movq	(%rsp), %rcx                    # 8-byte Reload
	movl	%r14d, %r8d
	movl	%ebx, %r9d
	callq	_Z25__device_stub__kernel_dfsiPiS_S_ii
.LBB11_5:                               #   in Loop: Header=BB11_1 Depth=1
	callq	hipDeviceSynchronize
	decl	%ebp
	jne	.LBB11_1
# %bb.6:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_Z9edgeTrackPiS_ii, .Lfunc_end11-_Z9edgeTrackPiS_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci # -- Begin function _Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci
	.type	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci,@function
_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci: # @_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %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	$424, %rsp                      # imm = 0x1A8
	.cfi_def_cfa_offset 480
	.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	%esi, %ebp
	movq	%rdi, %r15
	movslq	%edx, %rdi
	shlq	$2, %rdi
	callq	malloc
	movq	%rax, %rbx
	leaq	32(%rsp), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
	leaq	16(%rsp), %r12
	movq	%r12, -16(%r12)
	movq	$0, -8(%r12)
	movb	$0, (%r12)
	movsbl	%bpl, %ebp
	movq	%rsp, %r15
	movq	%rbx, %r13
.LBB12_1:                               # =>This Inner Loop Header: Depth=1
.Ltmp0:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebp, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp1:
# %bb.2:                                #   in Loop: Header=BB12_1 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	movq	(%rsp), %rdi
	jne	.LBB12_7
# %bb.3:                                #   in Loop: Header=BB12_1 Depth=1
	callq	_Z5stoffPKc
	movss	%xmm0, (%r13)
	addq	$4, %r13
	jmp	.LBB12_1
.LBB12_7:
	cmpq	%r12, %rdi
	je	.LBB12_9
# %bb.8:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i6
	callq	_ZdlPv
.LBB12_9:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit8
	leaq	32(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	160(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	movq	%rbx, %rax
	addq	$424, %rsp                      # imm = 0x1A8
	.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
.LBB12_4:
	.cfi_def_cfa_offset 480
.Ltmp2:
	movq	%rax, %rbx
	movq	(%rsp), %rdi
	cmpq	%r12, %rdi
	je	.LBB12_6
# %bb.5:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB12_6:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	leaq	32(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	160(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end12:
	.size	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci, .Lfunc_end12-_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table12:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp1-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Lfunc_end12-.Ltmp1            #   Call between .Ltmp1 and .Lfunc_end12
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI13_0:
	.long	0x3dcccccd                      # float 0.100000001
.LCPI13_1:
	.long	0x3e19999a                      # float 0.150000006
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI13_2:
	.quad	0x41cdcd6500000000              # double 1.0E+9
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %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	$1176, %rsp                     # imm = 0x498
	.cfi_def_cfa_offset 1232
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	cmpl	$2, %edi
	jne	.LBB13_1
# %bb.3:
	leaq	48(%rsp), %r14
	movq	%r14, -16(%r14)
	movq	$0, -8(%r14)
	movb	$0, (%r14)
	movq	8(%rsi), %rsi
.Ltmp3:
	leaq	656(%rsp), %rbx
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp4:
# %bb.4:
	leaq	776(%rsp), %rdi
	callq	_ZNKSt12__basic_fileIcE7is_openEv
	testb	%al, %al
	je	.LBB13_79
# %bb.5:
	movq	656(%rsp), %rax
	addq	-24(%rax), %rbx
.Ltmp6:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp7:
# %bb.6:                                # %.noexc
.Ltmp8:
	movsbl	%al, %edx
	leaq	656(%rsp), %rbx
	leaq	32(%rsp), %rsi
	movq	%rbx, %rdi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp9:
# %bb.7:                                # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
	movq	32(%rsp), %rdi
	callq	_Z5stoffPKc
	movss	%xmm0, 24(%rsp)                 # 4-byte Spill
	movq	656(%rsp), %rax
	addq	-24(%rax), %rbx
.Ltmp10:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp11:
# %bb.8:                                # %.noexc119
.Ltmp12:
	movsbl	%al, %edx
	leaq	656(%rsp), %r15
	leaq	32(%rsp), %rsi
	movq	%r15, %rdi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp13:
# %bb.9:                                # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit121
	cvttss2si	24(%rsp), %ebx          # 4-byte Folded Reload
	leaq	32(%rsp), %rax
	movq	(%rax), %rdi
	callq	_Z5stoffPKc
	cvttss2si	%xmm0, %eax
	movl	%ebx, 28(%rsp)                  # 4-byte Spill
	movslq	%ebx, %rdi
	movl	%eax, 24(%rsp)                  # 4-byte Spill
	movslq	%eax, %r12
	imulq	%r12, %rdi
	shlq	$2, %rdi
	movq	%rdi, 72(%rsp)                  # 8-byte Spill
	callq	malloc
	movq	%rax, %r14
	leaq	128(%rsp), %r13
	shlq	$2, %r12
	leaq	112(%rsp), %rbx
	movq	%rax, 64(%rsp)                  # 8-byte Spill
.LBB13_10:                              # =>This Inner Loop Header: Depth=1
	movq	656(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp15:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp16:
# %bb.11:                               # %.noexc122
                                        #   in Loop: Header=BB13_10 Depth=1
.Ltmp17:
	movsbl	%al, %edx
	movq	%r15, %rdi
	leaq	32(%rsp), %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp18:
# %bb.12:                               #   in Loop: Header=BB13_10 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB13_27
# %bb.13:                               #   in Loop: Header=BB13_10 Depth=1
	movq	%r13, 112(%rsp)
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdx
	addq	%rsi, %rdx
.Ltmp98:
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp99:
# %bb.14:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit
                                        #   in Loop: Header=BB13_10 Depth=1
.Ltmp101:
	movq	%rbx, %rdi
	movl	$32, %esi
	movl	24(%rsp), %edx                  # 4-byte Reload
	callq	_Z5splitNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEci
.Ltmp102:
# %bb.15:                               #   in Loop: Header=BB13_10 Depth=1
	movq	%rax, %rbp
	movq	112(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB13_17
# %bb.16:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB13_10 Depth=1
	callq	_ZdlPv
.LBB13_17:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
                                        #   in Loop: Header=BB13_10 Depth=1
	movq	%r14, %rdi
	movq	%rbp, %rsi
	movq	%r12, %rdx
	callq	memcpy@PLT
	movq	%rbp, %rdi
	callq	free
	addq	%r12, %r14
	jmp	.LBB13_10
.LBB13_1:
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$-1, %ebx
	jmp	.LBB13_2
.LBB13_79:
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$-1, %ebx
	jmp	.LBB13_80
.LBB13_27:
.Ltmp20:
	leaq	656(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv
.Ltmp21:
# %bb.28:
	movl	24(%rsp), %r14d                 # 4-byte Reload
	movl	%r14d, %r15d
	movl	28(%rsp), %ebp                  # 4-byte Reload
	imull	%ebp, %r15d
	leal	511(%r15), %eax
	leal	1022(%r15), %r13d
	testl	%eax, %eax
	cmovnsl	%eax, %r13d
	sarl	$9, %r13d
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, 88(%rsp)                  # 8-byte Spill
	movq	72(%rsp), %r12                  # 8-byte Reload
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %rbx
.Ltmp23:
	movq	64(%rsp), %rdi                  # 8-byte Reload
	movq	%rax, %rsi
	movl	%r14d, %edx
	movl	%ebp, %ecx
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	callq	_Z4blurPfS_iiii
.Ltmp24:
# %bb.29:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r12
	leaq	84(%rsp), %r9
	movl	$-1082130432, (%r9)             # imm = 0xBF800000
.Ltmp26:
	movl	%r13d, 8(%rsp)
	movl	%r15d, (%rsp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movl	24(%rsp), %ecx                  # 4-byte Reload
	movl	%ebp, %r8d
	callq	_Z17calculateGradientPfS_PiiiS_ii
.Ltmp27:
# %bb.30:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, 104(%rsp)                 # 8-byte Spill
	movq	72(%rsp), %rdi                  # 8-byte Reload
	callq	malloc
	movq	%rax, %rbx
.Ltmp29:
	movl	%r13d, (%rsp)
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	movl	24(%rsp), %ecx                  # 4-byte Reload
	movl	%ebp, %r8d
	movl	%r15d, %r9d
	callq	_Z4thinPfPiS_iiii
.Ltmp30:
# %bb.31:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, 96(%rsp)                  # 8-byte Spill
	movslq	%r15d, %r12
	movl	$4, %edi
	movq	%r12, %rsi
	callq	calloc
	movq	%rax, %r14
	movl	$4, %edi
	movq	%r12, %rsi
	callq	calloc
	movq	%rax, %r12
	movss	84(%rsp), %xmm1                 # xmm1 = mem[0],zero,zero,zero
	movss	.LCPI13_0(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	mulss	.LCPI13_1(%rip), %xmm1
.Ltmp32:
	movl	%r13d, (%rsp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movl	24(%rsp), %r13d                 # 4-byte Reload
	movl	%r13d, %ecx
	movl	%ebp, %r8d
	movl	%r15d, %r9d
	callq	_Z15doubleThresholdPfPiS0_iiffii
.Ltmp33:
# %bb.32:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %rbx
.Ltmp35:
	movq	%r14, 72(%rsp)                  # 8-byte Spill
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movl	%ebp, %ecx
	callq	_Z9edgeTrackPiS_ii
.Ltmp36:
# %bb.33:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %r15
.Ltmp38:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$7, %edx
	leaq	48(%rsp), %r14
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp39:
	movq	96(%rsp), %r12                  # 8-byte Reload
	movq	104(%rsp), %rbp                 # 8-byte Reload
# %bb.34:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movq	%r15, %rax
	subq	88(%rsp), %rax                  # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI13_2(%rip), %xmm0
.Ltmp40:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp41:
# %bb.35:                               # %_ZNSolsEd.exit
.Ltmp42:
	movl	$.L.str.3, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp43:
# %bb.36:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit142
.Ltmp44:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$6, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp45:
# %bb.37:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit144
.Ltmp46:
	movq	64(%rsp), %rax                  # 8-byte Reload
	subq	88(%rsp), %rax                  # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI13_2(%rip), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp47:
# %bb.38:                               # %_ZNSolsEd.exit146
.Ltmp48:
	movl	$.L.str.3, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp49:
# %bb.39:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit148
.Ltmp50:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp51:
# %bb.40:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit150
.Ltmp52:
	movq	%rbp, %rax
	subq	64(%rsp), %rax                  # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI13_2(%rip), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp53:
# %bb.41:                               # %_ZNSolsEd.exit152
.Ltmp54:
	movl	$.L.str.3, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp55:
# %bb.42:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit154
.Ltmp56:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.6, %esi
	movl	$13, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp57:
# %bb.43:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit156
.Ltmp58:
	movq	%r12, %rax
	subq	%rbp, %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI13_2(%rip), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp59:
# %bb.44:                               # %_ZNSolsEd.exit158
.Ltmp60:
	movl	$.L.str.3, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp61:
# %bb.45:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit160
.Ltmp62:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.7, %esi
	movl	$21, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp63:
# %bb.46:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit162
.Ltmp64:
	movq	%rbx, %rax
	subq	%r12, %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI13_2(%rip), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp65:
# %bb.47:                               # %_ZNSolsEd.exit164
.Ltmp66:
	movl	$.L.str.3, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp67:
# %bb.48:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit166
.Ltmp68:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.8, %esi
	movl	$15, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp69:
# %bb.49:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit168
.Ltmp70:
	subq	%rbx, %r15
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15, %xmm0
	divsd	.LCPI13_2(%rip), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp71:
# %bb.50:                               # %_ZNSolsEd.exit170
.Ltmp72:
	movl	$.L.str.3, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp73:
# %bb.51:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit172
.Ltmp75:
	leaq	144(%rsp), %rdi
	movl	$.L.str.9, %esi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp76:
# %bb.52:
	leaq	256(%rsp), %rdi
	callq	_ZNKSt12__basic_fileIcE7is_openEv
	testb	%al, %al
	je	.LBB13_68
# %bb.53:
.Ltmp78:
	leaq	144(%rsp), %rdi
	movl	28(%rsp), %r14d                 # 4-byte Reload
	movl	%r14d, %esi
	callq	_ZNSolsEi
.Ltmp79:
# %bb.54:
.Ltmp80:
	movl	$.L.str.10, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp81:
# %bb.55:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit174
.Ltmp82:
	leaq	144(%rsp), %rdi
	movl	%r13d, %esi
	callq	_ZNSolsEi
.Ltmp83:
# %bb.56:
.Ltmp84:
	movl	$.L.str.10, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp85:
# %bb.57:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit176.preheader
	testl	%r14d, %r14d
	jle	.LBB13_67
# %bb.58:                               # %.preheader.lr.ph
	movl	%r13d, %r15d
	xorl	%r12d, %r12d
	leaq	144(%rsp), %rbx
	xorl	%ebp, %ebp
.LBB13_59:                              # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_61 Depth 2
	testl	%r13d, %r13d
	jle	.LBB13_65
# %bb.60:                               # %.lr.ph.preheader
                                        #   in Loop: Header=BB13_59 Depth=1
	movslq	%ebp, %rax
	movq	72(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %r14
	xorl	%r13d, %r13d
.LBB13_61:                              # %.lr.ph
                                        #   Parent Loop BB13_59 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	(%r14,%r13,4), %eax
	movl	%eax, %esi
	shll	$8, %esi
	subl	%eax, %esi
.Ltmp87:
	movq	%rbx, %rdi
	callq	_ZNSolsEi
.Ltmp88:
# %bb.62:                               #   in Loop: Header=BB13_61 Depth=2
.Ltmp89:
	movl	$.L.str.11, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp90:
# %bb.63:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit180
                                        #   in Loop: Header=BB13_61 Depth=2
	incq	%r13
	cmpl	%r13d, %r15d
	jne	.LBB13_61
# %bb.64:                               # %._crit_edge.loopexit
                                        #   in Loop: Header=BB13_59 Depth=1
	addl	%r13d, %ebp
	movl	28(%rsp), %r14d                 # 4-byte Reload
	movl	24(%rsp), %r13d                 # 4-byte Reload
.LBB13_65:                              # %._crit_edge
                                        #   in Loop: Header=BB13_59 Depth=1
.Ltmp92:
	movl	$.L.str.10, %esi
	movl	$1, %edx
	movq	%rbx, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp93:
# %bb.66:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit178
                                        #   in Loop: Header=BB13_59 Depth=1
	incl	%r12d
	cmpl	%r14d, %r12d
	jne	.LBB13_59
.LBB13_67:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit176._crit_edge
.Ltmp95:
	leaq	144(%rsp), %rdi
	leaq	48(%rsp), %r14
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv
.Ltmp96:
.LBB13_68:
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	152(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, 144(%rsp,%rax)
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	392(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	xorl	%ebx, %ebx
.LBB13_80:
	leaq	656(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	32(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB13_2
# %bb.81:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i181
	callq	_ZdlPv
.LBB13_2:
	movl	%ebx, %eax
	addq	$1176, %rsp                     # imm = 0x498
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB13_76:
	.cfi_def_cfa_offset 1232
.Ltmp97:
	jmp	.LBB13_78
.LBB13_74:
.Ltmp77:
	jmp	.LBB13_83
.LBB13_73:
.Ltmp37:
	jmp	.LBB13_20
.LBB13_72:
.Ltmp34:
	jmp	.LBB13_20
.LBB13_71:
.Ltmp31:
	jmp	.LBB13_20
.LBB13_70:
.Ltmp28:
	jmp	.LBB13_20
.LBB13_69:
.Ltmp25:
	jmp	.LBB13_20
.LBB13_22:                              # %.loopexit.split-lp
.Ltmp22:
	jmp	.LBB13_20
.LBB13_77:
.Ltmp86:
	jmp	.LBB13_78
.LBB13_18:
.Ltmp5:
	movq	%rax, %rbx
	jmp	.LBB13_85
.LBB13_19:
.Ltmp14:
	jmp	.LBB13_20
.LBB13_75:
.Ltmp94:
	jmp	.LBB13_78
.LBB13_82:
.Ltmp74:
.LBB13_83:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128
	movq	%rax, %rbx
	jmp	.LBB13_84
.LBB13_24:
.Ltmp103:
	movq	%rax, %rbx
	movq	112(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB13_25
# %bb.26:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i126
	callq	_ZdlPv
	jmp	.LBB13_25
.LBB13_23:
.Ltmp100:
	jmp	.LBB13_20
.LBB13_21:                              # %.loopexit
.Ltmp19:
.LBB13_20:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128
	movq	%rax, %rbx
	jmp	.LBB13_25
.LBB13_88:
.Ltmp91:
.LBB13_78:
	movq	%rax, %rbx
	leaq	144(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
.LBB13_25:
	leaq	48(%rsp), %r14
.LBB13_84:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128
	leaq	656(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB13_85:
	movq	32(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB13_87
# %bb.86:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i184
	callq	_ZdlPv
.LBB13_87:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit186
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end13:
	.size	main, .Lfunc_end13-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table13:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Ltmp3-.Lfunc_begin1           # >> Call Site 1 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin1           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin1           # >> Call Site 2 <<
	.uleb128 .Ltmp13-.Ltmp6                 #   Call between .Ltmp6 and .Ltmp13
	.uleb128 .Ltmp14-.Lfunc_begin1          #     jumps to .Ltmp14
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp18-.Ltmp15                #   Call between .Ltmp15 and .Ltmp18
	.uleb128 .Ltmp19-.Lfunc_begin1          #     jumps to .Ltmp19
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp98-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp99-.Ltmp98                #   Call between .Ltmp98 and .Ltmp99
	.uleb128 .Ltmp100-.Lfunc_begin1         #     jumps to .Ltmp100
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp101-.Lfunc_begin1         # >> Call Site 5 <<
	.uleb128 .Ltmp102-.Ltmp101              #   Call between .Ltmp101 and .Ltmp102
	.uleb128 .Ltmp103-.Lfunc_begin1         #     jumps to .Ltmp103
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp102-.Lfunc_begin1         # >> Call Site 6 <<
	.uleb128 .Ltmp20-.Ltmp102               #   Call between .Ltmp102 and .Ltmp20
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp20-.Lfunc_begin1          # >> Call Site 7 <<
	.uleb128 .Ltmp21-.Ltmp20                #   Call between .Ltmp20 and .Ltmp21
	.uleb128 .Ltmp22-.Lfunc_begin1          #     jumps to .Ltmp22
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp23-.Lfunc_begin1          # >> Call Site 8 <<
	.uleb128 .Ltmp24-.Ltmp23                #   Call between .Ltmp23 and .Ltmp24
	.uleb128 .Ltmp25-.Lfunc_begin1          #     jumps to .Ltmp25
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp26-.Lfunc_begin1          # >> Call Site 9 <<
	.uleb128 .Ltmp27-.Ltmp26                #   Call between .Ltmp26 and .Ltmp27
	.uleb128 .Ltmp28-.Lfunc_begin1          #     jumps to .Ltmp28
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp29-.Lfunc_begin1          # >> Call Site 10 <<
	.uleb128 .Ltmp30-.Ltmp29                #   Call between .Ltmp29 and .Ltmp30
	.uleb128 .Ltmp31-.Lfunc_begin1          #     jumps to .Ltmp31
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp32-.Lfunc_begin1          # >> Call Site 11 <<
	.uleb128 .Ltmp33-.Ltmp32                #   Call between .Ltmp32 and .Ltmp33
	.uleb128 .Ltmp34-.Lfunc_begin1          #     jumps to .Ltmp34
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp35-.Lfunc_begin1          # >> Call Site 12 <<
	.uleb128 .Ltmp36-.Ltmp35                #   Call between .Ltmp35 and .Ltmp36
	.uleb128 .Ltmp37-.Lfunc_begin1          #     jumps to .Ltmp37
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp38-.Lfunc_begin1          # >> Call Site 13 <<
	.uleb128 .Ltmp73-.Ltmp38                #   Call between .Ltmp38 and .Ltmp73
	.uleb128 .Ltmp74-.Lfunc_begin1          #     jumps to .Ltmp74
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp75-.Lfunc_begin1          # >> Call Site 14 <<
	.uleb128 .Ltmp76-.Ltmp75                #   Call between .Ltmp75 and .Ltmp76
	.uleb128 .Ltmp77-.Lfunc_begin1          #     jumps to .Ltmp77
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp78-.Lfunc_begin1          # >> Call Site 15 <<
	.uleb128 .Ltmp85-.Ltmp78                #   Call between .Ltmp78 and .Ltmp85
	.uleb128 .Ltmp86-.Lfunc_begin1          #     jumps to .Ltmp86
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp87-.Lfunc_begin1          # >> Call Site 16 <<
	.uleb128 .Ltmp90-.Ltmp87                #   Call between .Ltmp87 and .Ltmp90
	.uleb128 .Ltmp91-.Lfunc_begin1          #     jumps to .Ltmp91
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp92-.Lfunc_begin1          # >> Call Site 17 <<
	.uleb128 .Ltmp93-.Ltmp92                #   Call between .Ltmp92 and .Ltmp93
	.uleb128 .Ltmp94-.Lfunc_begin1          #     jumps to .Ltmp94
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp95-.Lfunc_begin1          # >> Call Site 18 <<
	.uleb128 .Ltmp96-.Ltmp95                #   Call between .Ltmp95 and .Ltmp96
	.uleb128 .Ltmp97-.Lfunc_begin1          #     jumps to .Ltmp97
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp96-.Lfunc_begin1          # >> Call Site 19 <<
	.uleb128 .Lfunc_end13-.Ltmp96           #   Call between .Ltmp96 and .Lfunc_end13
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB14_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB14_3
.LBB14_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB14_3:
	testq	%r14, %r14
	je	.LBB14_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB14_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB14_7
.LBB14_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB14_7:                               # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end14:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag, .Lfunc_end14-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.text
	.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	.LBB15_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB15_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11kernel_blurPfS_iii, %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	$_Z24kernel_calculateGradientPfS_Piiii, %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	$_Z22kernel_doubleThresholdPfPiS0_iiffi, %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	$_Z11kernel_thinPfPiS_iii, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z10kernel_dfsiPiS_S_ii, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z15kernel_exchangeiPiS_S_ii, %esi
	movl	$.L__unnamed_6, %edx
	movl	$.L__unnamed_6, %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_end15:
	.size	__hip_module_ctor, .Lfunc_end15-__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	.LBB16_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
.LBB16_2:
	retq
.Lfunc_end16:
	.size	__hip_module_dtor, .Lfunc_end16-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z11kernel_blurPfS_iii,@object  # @_Z11kernel_blurPfS_iii
	.section	.rodata,"a",@progbits
	.globl	_Z11kernel_blurPfS_iii
	.p2align	3, 0x0
_Z11kernel_blurPfS_iii:
	.quad	_Z26__device_stub__kernel_blurPfS_iii
	.size	_Z11kernel_blurPfS_iii, 8

	.type	_Z24kernel_calculateGradientPfS_Piiii,@object # @_Z24kernel_calculateGradientPfS_Piiii
	.globl	_Z24kernel_calculateGradientPfS_Piiii
	.p2align	3, 0x0
_Z24kernel_calculateGradientPfS_Piiii:
	.quad	_Z39__device_stub__kernel_calculateGradientPfS_Piiii
	.size	_Z24kernel_calculateGradientPfS_Piiii, 8

	.type	_Z22kernel_doubleThresholdPfPiS0_iiffi,@object # @_Z22kernel_doubleThresholdPfPiS0_iiffi
	.globl	_Z22kernel_doubleThresholdPfPiS0_iiffi
	.p2align	3, 0x0
_Z22kernel_doubleThresholdPfPiS0_iiffi:
	.quad	_Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi
	.size	_Z22kernel_doubleThresholdPfPiS0_iiffi, 8

	.type	_Z11kernel_thinPfPiS_iii,@object # @_Z11kernel_thinPfPiS_iii
	.globl	_Z11kernel_thinPfPiS_iii
	.p2align	3, 0x0
_Z11kernel_thinPfPiS_iii:
	.quad	_Z26__device_stub__kernel_thinPfPiS_iii
	.size	_Z11kernel_thinPfPiS_iii, 8

	.type	_Z10kernel_dfsiPiS_S_ii,@object # @_Z10kernel_dfsiPiS_S_ii
	.globl	_Z10kernel_dfsiPiS_S_ii
	.p2align	3, 0x0
_Z10kernel_dfsiPiS_S_ii:
	.quad	_Z25__device_stub__kernel_dfsiPiS_S_ii
	.size	_Z10kernel_dfsiPiS_S_ii, 8

	.type	_Z15kernel_exchangeiPiS_S_ii,@object # @_Z15kernel_exchangeiPiS_S_ii
	.globl	_Z15kernel_exchangeiPiS_S_ii
	.p2align	3, 0x0
_Z15kernel_exchangeiPiS_S_ii:
	.quad	_Z30__device_stub__kernel_exchangeiPiS_S_ii
	.size	_Z15kernel_exchangeiPiS_S_ii, 8

	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"Unable to open file"
	.size	.L.str.1, 20

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Total: "
	.size	.L.str.2, 8

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	" seconds.\n"
	.size	.L.str.3, 11

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Blur: "
	.size	.L.str.4, 7

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Gradient: "
	.size	.L.str.5, 11

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"Non-max sup: "
	.size	.L.str.6, 14

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Double thresholding: "
	.size	.L.str.7, 22

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Edge tracking: "
	.size	.L.str.8, 16

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"result.txt"
	.size	.L.str.9, 11

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"\n"
	.size	.L.str.10, 2

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z11kernel_blurPfS_iii"
	.size	.L__unnamed_1, 23

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z24kernel_calculateGradientPfS_Piiii"
	.size	.L__unnamed_2, 38

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z22kernel_doubleThresholdPfPiS0_iiffi"
	.size	.L__unnamed_3, 39

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

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"_Z10kernel_dfsiPiS_S_ii"
	.size	.L__unnamed_5, 24

	.type	.L__unnamed_6,@object           # @5
.L__unnamed_6:
	.asciz	"_Z15kernel_exchangeiPiS_S_ii"
	.size	.L__unnamed_6, 29

	.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	"usage: DisplayImage.out <Image_Path>"
	.size	.Lstr, 37

	.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 _Z26__device_stub__kernel_blurPfS_iii
	.addrsig_sym _Z39__device_stub__kernel_calculateGradientPfS_Piiii
	.addrsig_sym _Z37__device_stub__kernel_doubleThresholdPfPiS0_iiffi
	.addrsig_sym _Z26__device_stub__kernel_thinPfPiS_iii
	.addrsig_sym _Z25__device_stub__kernel_dfsiPiS_S_ii
	.addrsig_sym _Z30__device_stub__kernel_exchangeiPiS_S_ii
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z11kernel_blurPfS_iii
	.addrsig_sym _Z24kernel_calculateGradientPfS_Piiii
	.addrsig_sym _Z22kernel_doubleThresholdPfPiS0_iiffi
	.addrsig_sym _Z11kernel_thinPfPiS_iii
	.addrsig_sym _Z10kernel_dfsiPiS_S_ii
	.addrsig_sym _Z15kernel_exchangeiPiS_S_ii
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z11kernel_blurPfS_iii  ; -- Begin function _Z11kernel_blurPfS_iii
	.globl	_Z11kernel_blurPfS_iii
	.p2align	8
	.type	_Z11kernel_blurPfS_iii,@function
_Z11kernel_blurPfS_iii:                 ; @_Z11kernel_blurPfS_iii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x2c
	s_load_b128 s[4:7], 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_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s6, v1
	s_cbranch_execz .LBB0_10
; %bb.1:
	s_ashr_i32 s2, s4, 31
	v_ashrrev_i32_e32 v2, 31, v1
	s_add_i32 s3, s4, s2
	s_load_b128 s[8:11], s[0:1], 0x0
	s_xor_b32 s3, s3, s2
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v4, v1, v2
	v_cvt_f32_u32_e32 v0, s3
	s_sub_i32 s6, 0, s3
	s_getpc_b64 s[0:1]
	s_add_u32 s0, s0, __const._Z11kernel_blurPfS_iii.kernel@rel32@lo+100
	s_addc_u32 s1, s1, __const._Z11kernel_blurPfS_iii.kernel@rel32@hi+108
	v_xor_b32_e32 v4, v4, v2
	v_rcp_iflag_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v0, v0
	v_mul_lo_u32 v3, s6, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v3, v0, v3
	v_add_nc_u32_e32 v0, v0, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v0, v4, v0
	v_mul_lo_u32 v3, v0, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v3, v4, v3
	v_add_nc_u32_e32 v4, 1, v0
	v_subrev_nc_u32_e32 v5, s3, v3
	v_cmp_le_u32_e32 vcc_lo, s3, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_dual_cndmask_b32 v3, v3, v5 :: v_dual_cndmask_b32 v0, v0, v4
	v_xor_b32_e32 v5, s2, v2
	s_mul_i32 s2, s4, 3
	v_cmp_le_u32_e32 vcc_lo, s3, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v4, 1, v0
	v_subrev_nc_u32_e32 v11, s2, v1
	s_mov_b32 s3, 0
	v_dual_cndmask_b32 v0, v0, v4 :: v_dual_add_nc_u32 v11, -3, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v0, v0, v5
	v_sub_nc_u32_e32 v10, v0, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_mul_lo_u32 v0, v10, s4
	v_add_nc_u32_e32 v9, -3, v10
	v_mad_i64_i32 v[14:15], null, v10, 28, 0
	v_add_nc_u32_e32 v12, 3, v10
	v_mov_b32_e32 v10, 0
	v_sub_nc_u32_e32 v3, v1, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_dual_mov_b32 v0, 0 :: v_dual_add_nc_u32 v13, 3, v3
	v_add_nc_u32_e32 v4, -3, v3
	v_ashrrev_i32_e32 v5, 31, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[5:6], 2, v[4:5]
	v_ashrrev_i32_e32 v4, 31, v3
	v_mad_i64_i32 v[7:8], null, v9, 28, v[5:6]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[4:5], 2, v[3:4]
	v_sub_co_u32 v4, vcc_lo, v7, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_co_ci_u32_e32 v5, vcc_lo, v8, v5, vcc_lo
	v_sub_co_u32 v4, vcc_lo, v4, v14
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_sub_co_ci_u32_e32 v5, vcc_lo, v5, v15, vcc_lo
	v_add_nc_u32_e32 v14, -4, v3
	v_add_co_u32 v3, vcc_lo, v4, s0
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v5, vcc_lo
.LBB0_2:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mov_b32 v5, v11 :: v_dual_mov_b32 v8, v4
	v_cmp_lt_i32_e32 vcc_lo, -1, v9
	v_cmp_gt_i32_e64 s0, s5, v9
	v_mov_b32_e32 v15, v14
	v_mov_b32_e32 v7, v3
	s_mov_b32 s6, 0
.LBB0_3:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_nc_u32_e32 v15, 1, v15
	s_and_saveexec_b32 s7, vcc_lo
	s_cbranch_execz .LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cmp_lt_i32_e64 s1, -1, v15
	v_cmp_gt_i32_e64 s2, s4, v15
	s_and_b32 s1, s0, s1
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	s_and_b32 s1, s2, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_saveexec_b32 s2, s1
	s_cbranch_execz .LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[16:17], 2, v[5:6]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v16, s1, s8, v16
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v17, s1, s9, v17, s1
	global_load_b32 v6, v[7:8], off
	global_load_b32 v16, v[16:17], off
	s_waitcnt vmcnt(1)
	v_add_f32_e32 v10, v10, v6
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v0, v6, v16
.LBB0_6:                                ; %Flow
                                        ;   in Loop: Header=BB0_3 Depth=2
	s_or_b32 exec_lo, exec_lo, s2
.LBB0_7:                                ;   in Loop: Header=BB0_3 Depth=2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_or_b32 exec_lo, exec_lo, s7
	v_cmp_ge_i32_e64 s1, v15, v13
	v_add_co_u32 v7, s2, v7, 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_add_co_ci_u32_e64 v8, s2, 0, v8, s2
	v_add_nc_u32_e32 v5, 1, v5
	s_or_b32 s6, s1, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s6
	v_add_nc_u32_e32 v5, 1, v9
	v_cmp_ge_i32_e32 vcc_lo, v9, v12
	v_add_co_u32 v3, s0, v3, 28
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(SALU_CYCLE_1)
	v_add_co_ci_u32_e64 v4, s0, 0, v4, s0
	v_add_nc_u32_e32 v11, s4, v11
	v_mov_b32_e32 v9, v5
	s_or_b32 s3, vcc_lo, s3
	s_and_not1_b32 exec_lo, exec_lo, s3
	s_cbranch_execnz .LBB0_2
; %bb.9:
	s_or_b32 exec_lo, exec_lo, s3
	v_div_scale_f32 v3, null, v10, v10, v0
	v_div_scale_f32 v6, vcc_lo, v0, v10, v0
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f32_e32 v4, v3
	s_waitcnt_depctr 0xfff
	v_fma_f32 v5, -v3, v4, 1.0
	v_fmac_f32_e32 v4, v5, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v5, v6, v4
	v_fma_f32 v7, -v3, v5, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v5, v7, v4
	v_fma_f32 v3, -v3, v5, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f32 v3, v3, v4, v5
	v_div_fixup_f32 v3, v3, v10, v0
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v0, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v1, vcc_lo, s11, v2, vcc_lo
	global_store_b32 v[0:1], v3, off
.LBB0_10:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11kernel_blurPfS_iii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.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 18
		.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	_Z11kernel_blurPfS_iii, .Lfunc_end0-_Z11kernel_blurPfS_iii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 836
; NumSgprs: 18
; NumVgprs: 18
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 18
; 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	_Z24kernel_calculateGradientPfS_Piiii ; -- Begin function _Z24kernel_calculateGradientPfS_Piiii
	.globl	_Z24kernel_calculateGradientPfS_Piiii
	.p2align	8
	.type	_Z24kernel_calculateGradientPfS_Piiii,@function
_Z24kernel_calculateGradientPfS_Piiii:  ; @_Z24kernel_calculateGradientPfS_Piiii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b128 s[8:11], s[0:1], 0x18
	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_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s10, v1
	s_cbranch_execz .LBB1_8
; %bb.1:
	s_ashr_i32 s2, s8, 31
	v_ashrrev_i32_e32 v2, 31, v1
	s_add_i32 s3, s8, s2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_xor_b32 s3, s3, s2
	v_add_nc_u32_e32 v4, v1, v2
	v_cvt_f32_u32_e32 v0, s3
	s_sub_i32 s4, 0, s3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v4, v4, v2
	v_rcp_iflag_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v0, v0
	v_mul_lo_u32 v3, s4, v0
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[10:11], s[0:1], 0x10
	s_add_i32 s0, s9, -1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v3, v0, v3
	v_add_nc_u32_e32 v0, v0, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v0, v4, v0
	v_mul_lo_u32 v3, v0, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v3, v4, v3
	v_add_nc_u32_e32 v4, 1, v0
	v_subrev_nc_u32_e32 v5, s3, v3
	v_cmp_le_u32_e32 vcc_lo, s3, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_dual_cndmask_b32 v3, v3, v5 :: v_dual_cndmask_b32 v0, v0, v4
	v_xor_b32_e32 v5, s2, v2
	v_cmp_le_u32_e32 vcc_lo, s3, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_mov_b32 v3, 0 :: v_dual_add_nc_u32 v4, 1, v0
	v_cndmask_b32_e32 v0, v0, v4, vcc_lo
	v_cvt_f32_i32_e32 v4, s0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v0, v0, v5
	v_sub_nc_u32_e32 v0, v0, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f32_i32_e32 v5, v0
	v_cmp_neq_f32_e32 vcc_lo, v5, v4
	v_mov_b32_e32 v4, 0
	s_and_saveexec_b32 s0, vcc_lo
	s_cbranch_execz .LBB1_3
; %bb.2:
	v_lshlrev_b64 v[4:5], 2, v[1:2]
	s_mov_b32 s9, s2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	s_lshl_b64 s[2:3], s[8:9], 2
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v4, vcc_lo, s4, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s5, v5, 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
	s_clause 0x1
	global_load_b32 v6, v[6:7], off
	global_load_b32 v4, v[4:5], off
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v4, v6, v4
.LBB1_3:
	s_or_b32 exec_lo, exec_lo, s0
	v_mul_lo_u32 v0, v0, s8
	s_add_i32 s0, s8, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cvt_f32_i32_e32 v6, s0
	s_mov_b32 s0, exec_lo
	v_sub_nc_u32_e32 v0, v1, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cvt_f32_i32_e32 v5, v0
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	v_cmpx_neq_f32_e32 v5, v6
	s_cbranch_execz .LBB1_5
; %bb.4:
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v2, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v1, vcc_lo
	global_load_b64 v[2:3], v[2:3], off
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v3, v3, v2
.LBB1_5:                                ; %._crit_edge
	s_or_b32 exec_lo, exec_lo, s0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[5:6], v3
	v_mul_f32_e32 v2, v3, v3
	s_mov_b32 s3, 0x3eb0c6f7
	s_mov_b32 s2, 0xa0b5ed8d
	v_fmac_f32_e32 v2, v4, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_f32_e32 v7, 0x4f800000, v2
	v_cmp_gt_f32_e32 vcc_lo, 0xf800000, v2
	v_cndmask_b32_e32 v2, v2, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(SALU_CYCLE_1)
	v_sqrt_f32_e32 v7, v2
	s_waitcnt_depctr 0xfff
	v_add_nc_u32_e32 v8, -1, v7
	v_cmp_ngt_f64_e64 s0, s[2:3], v[5:6]
	s_mov_b32 s3, 0xbeb0c6f7
	v_cmp_nlt_f64_e64 s1, s[2:3], v[5:6]
	v_add_nc_u32_e32 v5, 1, v7
	v_fma_f32 v6, -v8, v7, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v9, -v5, v7, v2
	v_cmp_ge_f32_e64 s2, 0, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v6, v7, v8, s2
	v_cmp_lt_f32_e64 s2, 0, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v5, v6, v5, s2
	v_mul_f32_e32 v6, 0x37800000, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v5, v5, v6, vcc_lo
	v_cmp_class_f32_e64 vcc_lo, v2, 0x260
	v_cndmask_b32_e32 v7, v5, v2, vcc_lo
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v5, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v6, vcc_lo, s7, v1, vcc_lo
	v_mov_b32_e32 v2, 0x42b40000
	s_or_b32 s1, s0, s1
	global_store_b32 v[5:6], v7, off
	s_and_saveexec_b32 s0, s1
	s_cbranch_execz .LBB1_7
; %bb.6:
	v_div_scale_f32 v2, null, v3, v3, v4
	v_div_scale_f32 v7, vcc_lo, v4, v3, v4
	s_mov_b32 s1, 0x3b2d2a58
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_rcp_f32_e32 v5, v2
	s_mov_b32 s2, 0x4d12d84a
	s_mov_b32 s3, 0x400921fb
	s_waitcnt_depctr 0xfff
	v_fma_f32 v6, -v2, v5, 1.0
	v_fmac_f32_e32 v5, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v6, v7, v5
	v_fma_f32 v8, -v2, v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, v8, v5
	v_fma_f32 v2, -v2, v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f32 v2, v2, v5, v6
	v_div_fixup_f32 v2, v2, v3, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_rcp_f32_e64 v3, |v2|
	v_cmp_gt_f32_e64 vcc_lo, |v2|, 1.0
	s_waitcnt_depctr 0xfff
	v_cndmask_b32_e64 v3, |v2|, v3, vcc_lo
	v_mul_f32_e32 v4, v3, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmaak_f32 v5, s1, v4, 0xbc7a590c
	v_fmaak_f32 v5, v4, v5, 0x3d29fb3f
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmaak_f32 v5, v4, v5, 0xbd97d4d7
	v_fmaak_f32 v5, v4, v5, 0x3dd931b2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmaak_f32 v5, v4, v5, 0xbe1160e6
	v_fmaak_f32 v5, v4, v5, 0x3e4cb8bf
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmaak_f32 v5, v4, v5, 0xbeaaaa62
	v_mul_f32_e32 v4, v4, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v3, v3, v4
	v_sub_f32_e32 v4, 0x3fc90fdb, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v3, v3, v4, vcc_lo
	v_bfi_b32 v2, 0x7fffffff, v3, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[2:3], v2
	v_div_scale_f64 v[4:5], null, s[2:3], s[2:3], v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[6:7], v[4:5]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[8:9], -v[4:5], v[6:7], 1.0
	v_fma_f64 v[6:7], v[6:7], v[8:9], v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[8:9], -v[4:5], v[6:7], 1.0
	v_fma_f64 v[6:7], v[6:7], v[8:9], v[6:7]
	v_div_scale_f64 v[8:9], vcc_lo, v[2:3], s[2:3], v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[10:11], v[8:9], v[6:7]
	v_fma_f64 v[4:5], -v[4:5], v[10:11], v[8:9]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[4:5], v[4:5], v[6:7], v[10:11]
	v_div_fixup_f64 v[2:3], v[4:5], s[2:3], v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[2:3], 0x40668000, v[2:3]
	v_cvt_f32_f64_e32 v2, v[2:3]
.LBB1_7:
	s_or_b32 exec_lo, exec_lo, s0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_f32_e32 v3, 0x43340000, v2
	v_cmp_gt_f32_e32 vcc_lo, 0, v2
	v_cndmask_b32_e32 v2, v2, v3, 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_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[2:3], v2
	v_add_f64 v[2:3], 0x40368000, v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_i32_f64_e32 v2, v[2:3]
	v_mul_hi_i32 v3, 0xb60b60b7, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v2, v3, v2
	v_lshrrev_b32_e32 v3, 31, v2
	v_ashrrev_i32_e32 v2, 5, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v2, v2, v3
	v_mul_lo_u32 v2, v2, 45
	global_store_b32 v[0:1], v2, off
.LBB1_8:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z24kernel_calculateGradientPfS_Piiii
		.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 12
		.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	_Z24kernel_calculateGradientPfS_Piiii, .Lfunc_end1-_Z24kernel_calculateGradientPfS_Piiii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1228
; NumSgprs: 18
; NumVgprs: 12
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 12
; 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	_Z22kernel_doubleThresholdPfPiS0_iiffi ; -- Begin function _Z22kernel_doubleThresholdPfPiS0_iiffi
	.globl	_Z22kernel_doubleThresholdPfPiS0_iiffi
	.p2align	8
	.type	_Z22kernel_doubleThresholdPfPiS0_iiffi,@function
_Z22kernel_doubleThresholdPfPiS0_iiffi: ; @_Z22kernel_doubleThresholdPfPiS0_iiffi
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x3c
	s_load_b128 s[4:7], s[0:1], 0x20
	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_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s6, v1
	s_cbranch_execz .LBB2_5
; %bb.1:
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x0
	s_load_b64 s[2:3], s[0:1], 0x10
	v_ashrrev_i32_e32 v2, 31, v1
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s8, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s9, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0)
	v_cmpx_le_f32_e32 s5, v2
	s_cbranch_execz .LBB2_3
; %bb.2:
	v_add_co_u32 v3, vcc_lo, s10, v0
	v_add_co_ci_u32_e32 v4, vcc_lo, s11, v1, vcc_lo
	v_mov_b32_e32 v5, 1
	global_store_b32 v[3:4], v5, off
.LBB2_3:
	s_or_b32 exec_lo, exec_lo, s0
	v_cmp_gt_f32_e32 vcc_lo, s5, v2
	v_cmp_le_f32_e64 s0, s4, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, vcc_lo, s0
	s_and_b32 exec_lo, exec_lo, s0
	s_cbranch_execz .LBB2_5
; %bb.4:
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	v_mov_b32_e32 v2, 1
	global_store_b32 v[0:1], v2, off
.LBB2_5:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z22kernel_doubleThresholdPfPiS0_iiffi
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.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 6
		.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	_Z22kernel_doubleThresholdPfPiS0_iiffi, .Lfunc_end2-_Z22kernel_doubleThresholdPfPiS0_iiffi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 232
; NumSgprs: 18
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 6
; 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	_Z11kernel_thinPfPiS_iii ; -- Begin function _Z11kernel_thinPfPiS_iii
	.globl	_Z11kernel_thinPfPiS_iii
	.p2align	8
	.type	_Z11kernel_thinPfPiS_iii,@function
_Z11kernel_thinPfPiS_iii:               ; @_Z11kernel_thinPfPiS_iii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b128 s[8:11], s[0:1], 0x18
	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[4:5], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s10, v4
	s_cbranch_execz .LBB3_56
; %bb.1:                                ; %NodeBlock159
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[2:3], s[0:1], 0x10
	v_ashrrev_i32_e32 v5, 31, v4
	s_ashr_i32 s0, s8, 31
	s_mov_b32 s10, 0
	s_add_i32 s1, s8, s0
	s_mov_b32 s13, 0
	v_lshlrev_b64 v[0:1], 2, v[4:5]
	s_xor_b32 s1, s1, s0
	v_add_nc_u32_e32 v10, v4, v5
	v_cvt_f32_u32_e32 v6, s1
	s_mov_b32 s12, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v10, v10, v5
	v_rcp_iflag_f32_e32 v6, v6
	v_xor_b32_e32 v5, s0, v5
	s_mov_b32 s0, exec_lo
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s7, v1, vcc_lo
	s_sub_i32 s6, 0, s1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v6, 0x4f7ffffe, v6
	s_mov_b32 s7, 0
	global_load_b32 v9, v[2:3], off
	v_add_co_u32 v2, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s3, v1, vcc_lo
	v_cvt_u32_f32_e32 v6, v6
	global_load_b32 v7, v[2:3], off
	v_mul_lo_u32 v8, s6, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v8, v6, v8
	v_add_nc_u32_e32 v6, v6, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v6, v10, v6
	v_mul_lo_u32 v8, v6, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v8, v10, v8
	v_add_nc_u32_e32 v10, 1, v6
	v_subrev_nc_u32_e32 v11, s1, v8
	v_cmp_le_u32_e32 vcc_lo, s1, v8
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v6, v6, v10, vcc_lo
	v_cndmask_b32_e32 v8, v8, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v10, 1, v6
	v_cmp_le_u32_e32 vcc_lo, s1, v8
	s_mov_b32 s1, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v6, v6, v10, vcc_lo
                                        ; implicit-def: $vgpr10
	v_xor_b32_e32 v6, v6, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_sub_nc_u32_e32 v8, v6, v5
	s_waitcnt vmcnt(1)
	v_cmpx_lt_i32_e32 0xb3, v9
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB3_15
; %bb.2:                                ; %NodeBlock157
	s_mov_b32 s6, 0
	s_mov_b32 s11, 0
	s_mov_b32 s1, exec_lo
                                        ; implicit-def: $vgpr10
	v_cmpx_lt_i32_e32 0x10d, v9
	s_xor_b32 s1, exec_lo, s1
	s_cbranch_execz .LBB3_8
; %bb.3:                                ; %NodeBlock155
	s_mov_b32 s12, exec_lo
                                        ; implicit-def: $sgpr13
	v_cmpx_lt_i32_e32 0x13a, v9
	s_xor_b32 s12, exec_lo, s12
; %bb.4:                                ; %LeafBlock153
	v_cmp_eq_u32_e32 vcc_lo, 0x13b, v9
	s_mov_b32 s13, 0
	s_and_b32 s6, vcc_lo, exec_lo
; %bb.5:                                ; %Flow162
	s_or_saveexec_b32 s12, s12
	v_mov_b32_e32 v10, s13
	s_xor_b32 exec_lo, exec_lo, s12
; %bb.6:                                ; %LeafBlock151
	v_cmp_eq_u32_e32 vcc_lo, 0x10e, v9
	v_mov_b32_e32 v10, 0
	s_and_b32 s11, vcc_lo, exec_lo
; %bb.7:                                ; %Flow163
	s_or_b32 exec_lo, exec_lo, s12
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 s11, s11, exec_lo
	s_and_b32 s6, s6, exec_lo
.LBB3_8:                                ; %Flow161
	s_or_saveexec_b32 s1, s1
	s_mov_b32 s12, 0
	s_xor_b32 exec_lo, exec_lo, s1
	s_cbranch_execz .LBB3_14
; %bb.9:                                ; %NodeBlock149
	s_mov_b32 s13, exec_lo
                                        ; implicit-def: $sgpr14
	v_cmpx_lt_i32_e32 0xe0, v9
	s_xor_b32 s13, exec_lo, s13
; %bb.10:                               ; %LeafBlock147
	v_cmp_eq_u32_e32 vcc_lo, 0xe1, v9
	s_mov_b32 s14, 0
	s_and_b32 s7, vcc_lo, exec_lo
; %bb.11:                               ; %Flow165
	s_or_saveexec_b32 s13, s13
	v_mov_b32_e32 v10, s14
	s_xor_b32 exec_lo, exec_lo, s13
; %bb.12:                               ; %LeafBlock145
	v_cmp_eq_u32_e32 vcc_lo, 0xb4, v9
	v_mov_b32_e32 v10, 0
	s_and_b32 s12, vcc_lo, exec_lo
; %bb.13:                               ; %Flow166
	s_or_b32 exec_lo, exec_lo, s13
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 s12, s12, exec_lo
	s_and_b32 s7, s7, exec_lo
.LBB3_14:                               ; %Flow164
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 s1, s12, exec_lo
	s_and_b32 s7, s7, exec_lo
	s_and_b32 s12, s11, exec_lo
	s_and_b32 s13, s6, exec_lo
.LBB3_15:                               ; %Flow
	s_or_saveexec_b32 s0, s0
	v_mul_lo_u32 v11, v8, s8
	s_mov_b32 s11, 0
	s_xor_b32 exec_lo, exec_lo, s0
	s_cbranch_execz .LBB3_21
; %bb.16:                               ; %NodeBlock143
	s_mov_b32 s14, 0
	s_mov_b32 s11, -1
	s_mov_b32 s15, s13
	s_mov_b32 s6, exec_lo
                                        ; implicit-def: $sgpr10
	v_cmpx_lt_i32_e32 0x59, v9
	s_cbranch_execz .LBB3_20
; %bb.17:                               ; %NodeBlock141
	s_mov_b32 s14, -1
	s_mov_b32 s15, s13
	s_mov_b32 s11, exec_lo
                                        ; implicit-def: $sgpr10
	v_cmpx_lt_i32_e32 0x86, v9
; %bb.18:                               ; %LeafBlock139
	v_cmp_eq_u32_e32 vcc_lo, 0x87, v9
	s_and_not1_b32 s15, s13, exec_lo
	s_mov_b32 s10, 0
	s_xor_b32 s14, exec_lo, -1
	s_and_b32 s16, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s15, s15, s16
; %bb.19:                               ; %Flow169
	s_or_b32 exec_lo, exec_lo, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 s16, s13, exec_lo
	s_and_b32 s15, s15, exec_lo
	s_xor_b32 s11, exec_lo, -1
	s_and_b32 s14, s14, exec_lo
	s_or_b32 s15, s16, s15
.LBB3_20:                               ; %Flow168
	s_or_b32 exec_lo, exec_lo, s6
	v_mov_b32_e32 v10, s10
	s_and_not1_b32 s6, s13, exec_lo
	s_and_b32 s13, s15, exec_lo
	s_and_b32 s11, s11, exec_lo
	s_and_b32 s10, s14, exec_lo
	s_or_b32 s13, s6, s13
.LBB3_21:                               ; %Flow167
	s_or_b32 exec_lo, exec_lo, s0
	s_delay_alu instid0(VALU_DEP_1)
	v_sub_nc_u32_e32 v4, v4, v11
	v_mov_b32_e32 v12, v10
	s_mov_b32 s6, 0
                                        ; implicit-def: $vgpr5_vgpr6
	s_and_saveexec_b32 s14, s13
	s_cbranch_execz .LBB3_27
; %bb.22:
	v_min_i32_e32 v5, v8, v4
	v_mov_b32_e32 v10, 0
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_lt_i32_e32 0, v5
	s_cbranch_execz .LBB3_24
; %bb.23:
	v_add3_u32 v5, v11, s8, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v6, 31, v5
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	global_load_b32 v10, v[5:6], off offset:-4
.LBB3_24:
	s_or_b32 exec_lo, exec_lo, s0
	s_add_i32 s0, s9, -1
	s_add_i32 s13, s8, -1
	v_cmp_gt_i32_e32 vcc_lo, s0, v8
	v_cmp_gt_i32_e64 s0, s13, v4
                                        ; implicit-def: $vgpr5_vgpr6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, vcc_lo, s0
	s_and_saveexec_b32 s13, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s13
; %bb.25:
	v_add_nc_u32_e32 v12, -1, v8
	s_mov_b32 s6, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[5:6], null, v12, s8, v[4:5]
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	v_add_co_u32 v5, vcc_lo, s2, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	v_add_co_u32 v5, vcc_lo, v5, 4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, 0, v6, vcc_lo
; %bb.26:                               ; %Flow171
	s_or_b32 exec_lo, exec_lo, s0
	v_mov_b32_e32 v12, 0
	s_and_b32 s6, s6, exec_lo
.LBB3_27:                               ; %Flow170
	s_or_b32 exec_lo, exec_lo, s14
	s_and_saveexec_b32 s0, s10
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB3_29
; %bb.28:                               ; %LeafBlock137
	v_cmp_eq_u32_e32 vcc_lo, 0x5a, v9
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v10, 0
	v_mov_b32_e32 v12, 0
	s_and_not1_b32 s10, s12, exec_lo
                                        ; implicit-def: $vgpr5_vgpr6
	s_and_b32 s12, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s12, s10, s12
.LBB3_29:                               ; %Flow172
	s_or_b32 exec_lo, exec_lo, s0
	s_and_saveexec_b32 s0, s12
	s_cbranch_execz .LBB3_35
; %bb.30:
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v10, 0
	s_mov_b32 s10, exec_lo
	v_cmpx_lt_i32_e32 0, v4
	s_cbranch_execz .LBB3_32
; %bb.31:
	v_subrev_nc_u32_e32 v5, s8, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v5, v5, v4
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	v_add_co_u32 v5, vcc_lo, s2, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	global_load_b32 v10, v[5:6], off
.LBB3_32:
	s_or_b32 exec_lo, exec_lo, s10
	s_add_i32 s10, s8, -1
                                        ; implicit-def: $vgpr5_vgpr6
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s10, v4
	s_mov_b32 s10, s6
	s_and_saveexec_b32 s12, vcc_lo
	s_xor_b32 s12, exec_lo, s12
; %bb.33:
	v_add3_u32 v5, v11, s8, v4
	s_or_b32 s10, s6, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v6, 31, v5
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
; %bb.34:                               ; %Flow174
	s_or_b32 exec_lo, exec_lo, s12
	v_mov_b32_e32 v12, 0
	s_and_not1_b32 s6, s6, exec_lo
	s_and_b32 s10, s10, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s6, s6, s10
.LBB3_35:                               ; %Flow173
	s_or_b32 exec_lo, exec_lo, s0
	s_mov_b32 s10, 0
	s_and_saveexec_b32 s0, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB3_39
; %bb.36:                               ; %NodeBlock
	s_mov_b32 s10, -1
	s_mov_b32 s11, s7
	s_mov_b32 s13, exec_lo
                                        ; implicit-def: $sgpr12
	v_cmpx_lt_i32_e32 44, v9
; %bb.37:                               ; %LeafBlock135
	v_cmp_eq_u32_e32 vcc_lo, 45, v9
	s_and_not1_b32 s11, s7, exec_lo
	s_mov_b32 s12, 0
	s_xor_b32 s10, exec_lo, -1
	s_and_b32 s14, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s11, s11, s14
; %bb.38:                               ; %Flow176
	s_or_b32 exec_lo, exec_lo, s13
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 s7, s7, exec_lo
	s_and_b32 s11, s11, exec_lo
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v10, s12
	v_mov_b32_e32 v12, s12
	s_and_b32 s10, s10, exec_lo
	s_or_b32 s7, s7, s11
                                        ; implicit-def: $vgpr5_vgpr6
.LBB3_39:                               ; %Flow175
	s_or_b32 exec_lo, exec_lo, s0
	s_and_saveexec_b32 s11, s7
	s_cbranch_execz .LBB3_45
; %bb.40:
	s_add_i32 s0, s8, -1
	v_cmp_lt_i32_e32 vcc_lo, 0, v8
	v_cmp_gt_i32_e64 s0, s0, v4
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v10, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s7, vcc_lo, s0
	s_and_saveexec_b32 s0, s7
	s_cbranch_execz .LBB3_42
; %bb.41:
	v_add3_u32 v5, v11, s8, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v6, 31, v5
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	global_load_b32 v10, v[5:6], off offset:4
.LBB3_42:
	s_or_b32 exec_lo, exec_lo, s0
	s_add_i32 s0, s9, -1
	v_cmp_lt_i32_e32 vcc_lo, 0, v4
	v_cmp_gt_i32_e64 s0, s0, v8
	s_mov_b32 s7, s6
                                        ; implicit-def: $vgpr5_vgpr6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, s0, vcc_lo
	s_and_saveexec_b32 s12, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s12
; %bb.43:
	v_subrev_nc_u32_e32 v5, s8, v11
	s_or_b32 s7, s6, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v4, v5, v4
	v_ashrrev_i32_e32 v5, 31, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[4:5], 2, v[4:5]
	v_add_co_u32 v4, vcc_lo, s2, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v5, vcc_lo
	v_add_co_u32 v5, vcc_lo, v4, -4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, -1, v6, vcc_lo
; %bb.44:                               ; %Flow178
	s_or_b32 exec_lo, exec_lo, s0
	v_mov_b32_e32 v12, 0
	s_and_not1_b32 s0, s6, exec_lo
	s_and_b32 s2, s7, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s6, s0, s2
.LBB3_45:                               ; %Flow177
	s_or_b32 exec_lo, exec_lo, s11
	s_and_saveexec_b32 s0, s10
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB3_47
; %bb.46:                               ; %LeafBlock
	v_cmp_eq_u32_e32 vcc_lo, 0, v9
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v10, 0
	v_mov_b32_e32 v12, 0
	s_and_not1_b32 s1, s1, exec_lo
                                        ; implicit-def: $vgpr5_vgpr6
	s_and_b32 s2, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s1, s1, s2
.LBB3_47:                               ; %Flow179
	s_or_b32 exec_lo, exec_lo, s0
	s_and_saveexec_b32 s0, s1
	s_cbranch_execz .LBB3_53
; %bb.48:
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v10, 0
	s_mov_b32 s1, exec_lo
	v_cmpx_lt_i32_e32 0, v8
	s_cbranch_execz .LBB3_50
; %bb.49:
	global_load_b32 v10, v[2:3], off offset:-4
.LBB3_50:
	s_or_b32 exec_lo, exec_lo, s1
	s_add_i32 s1, s9, -1
                                        ; implicit-def: $vgpr5_vgpr6
	s_delay_alu instid0(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s1, v8
	s_mov_b32 s1, s6
	s_and_saveexec_b32 s2, vcc_lo
; %bb.51:
	v_add_co_u32 v5, vcc_lo, v2, 4
	v_add_co_ci_u32_e32 v6, vcc_lo, 0, v3, vcc_lo
	s_or_b32 s1, s6, exec_lo
; %bb.52:                               ; %Flow181
	s_or_b32 exec_lo, exec_lo, s2
	v_mov_b32_e32 v12, 0
	s_and_not1_b32 s2, s6, exec_lo
	s_and_b32 s1, s1, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s6, s2, s1
.LBB3_53:                               ; %Flow180
	s_or_b32 exec_lo, exec_lo, s0
	s_and_saveexec_b32 s0, s6
	s_cbranch_execz .LBB3_55
; %bb.54:                               ; %.sink.split
	global_load_b32 v12, v[5:6], off
.LBB3_55:                               ; %.sink.split115
	s_or_b32 exec_lo, exec_lo, s0
	s_waitcnt vmcnt(0)
	v_cmp_gt_f32_e32 vcc_lo, v7, v10
	v_cmp_gt_f32_e64 s0, v7, v12
	s_delay_alu instid0(VALU_DEP_1)
	s_and_b32 vcc_lo, vcc_lo, s0
	v_cndmask_b32_e32 v2, 0, v7, vcc_lo
	v_add_co_u32 v0, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s5, v1, vcc_lo
	global_store_b32 v[0:1], v2, off
.LBB3_56:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11kernel_thinPfPiS_iii
		.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 13
		.amdhsa_next_free_sgpr 17
		.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	_Z11kernel_thinPfPiS_iii, .Lfunc_end3-_Z11kernel_thinPfPiS_iii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1760
; NumSgprs: 19
; NumVgprs: 13
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 19
; NumVGPRsForWavesPerEU: 13
; 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	_Z10kernel_dfsiPiS_S_ii ; -- Begin function _Z10kernel_dfsiPiS_S_ii
	.globl	_Z10kernel_dfsiPiS_S_ii
	.p2align	8
	.type	_Z10kernel_dfsiPiS_S_ii,@function
_Z10kernel_dfsiPiS_S_ii:                ; @_Z10kernel_dfsiPiS_S_ii
; %bb.0:                                ; %.loopexit
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10kernel_dfsiPiS_S_ii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 40
		.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 1
		.amdhsa_next_free_sgpr 1
		.amdhsa_reserve_vcc 0
		.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_end4:
	.size	_Z10kernel_dfsiPiS_S_ii, .Lfunc_end4-_Z10kernel_dfsiPiS_S_ii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4
; NumSgprs: 0
; NumVgprs: 0
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 1
; NumVGPRsForWavesPerEU: 1
; 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	_Z15kernel_exchangeiPiS_S_ii ; -- Begin function _Z15kernel_exchangeiPiS_S_ii
	.globl	_Z15kernel_exchangeiPiS_S_ii
	.p2align	8
	.type	_Z15kernel_exchangeiPiS_S_ii,@function
_Z15kernel_exchangeiPiS_S_ii:           ; @_Z15kernel_exchangeiPiS_S_ii
; %bb.0:
	s_clause 0x1
	s_load_b32 s3, s[0:1], 0x34
	s_load_b32 s2, s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mad_u64_u32 v[1:2], null, s15, s3, v[0:1]
	s_mul_i32 s3, s2, s2
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s3, v1
	s_and_saveexec_b32 s3, vcc_lo
	s_cbranch_execz .LBB5_21
; %bb.1:
	s_ashr_i32 s6, s2, 31
	v_ashrrev_i32_e32 v3, 31, v1
	s_add_i32 s3, s2, s6
	s_load_b64 s[4:5], s[0:1], 0x20
	s_xor_b32 s7, s3, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v4, v1, v3
	v_cvt_f32_u32_e32 v0, s7
	s_sub_i32 s3, 0, s7
	v_xor_b32_e32 v4, v4, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v0, v0
	v_xor_b32_e32 v3, s6, v3
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	v_cvt_u32_f32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v2, s3, v0
	v_mul_hi_u32 v2, v0, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v7, v0, v2
	v_mul_hi_u32 v0, v4, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v2, v0, s7
	v_sub_nc_u32_e32 v2, v4, v2
	v_add_nc_u32_e32 v4, 1, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_subrev_nc_u32_e32 v5, s7, v2
	v_cmp_le_u32_e32 vcc_lo, s7, v2
	v_cndmask_b32_e32 v0, v0, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v2, v2, v5, vcc_lo
	v_add_nc_u32_e32 v4, 1, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_le_u32_e32 vcc_lo, s7, v2
	v_cndmask_b32_e32 v0, v0, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v0, v0, v3
	v_sub_nc_u32_e32 v0, v0, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v2, v0, s2
	s_waitcnt lgkmcnt(0)
	v_mul_lo_u32 v0, v0, s4
	v_sub_nc_u32_e32 v1, v1, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v2, 31, v0
	v_mul_lo_u32 v9, v1, s4
	v_add_nc_u32_e32 v1, s4, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v0, v0, v2
	v_xor_b32_e32 v0, v0, v2
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_ashrrev_i32_e32 v4, 31, v9
	v_xor_b32_e32 v2, s6, v2
	v_mul_hi_u32 v6, v0, v7
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v5, v9, v4
	v_xor_b32_e32 v8, v5, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v5, v6, s7
	v_mul_hi_u32 v11, v8, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_4)
	v_sub_nc_u32_e32 v0, v0, v5
	v_xor_b32_e32 v5, s6, v4
	v_add_nc_u32_e32 v4, 1, v6
	v_mul_lo_u32 v13, v11, s7
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v15, s7, v0
	v_cmp_le_u32_e32 vcc_lo, s7, v0
	v_cndmask_b32_e32 v0, v0, v15, vcc_lo
	v_ashrrev_i32_e32 v3, 31, v1
	v_sub_nc_u32_e32 v8, v8, v13
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_dual_cndmask_b32 v4, v6, v4 :: v_dual_add_nc_u32 v1, v1, v3
	v_subrev_nc_u32_e32 v13, s7, v8
	v_cmp_le_u32_e64 s2, s7, v8
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v1, v1, v3
	v_xor_b32_e32 v3, s6, v3
	v_mul_hi_u32 v10, v1, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v12, v10, s7
	v_add_nc_u32_e32 v14, 1, v10
	v_sub_nc_u32_e32 v1, v1, v12
	v_add_nc_u32_e32 v12, 1, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_cmp_le_u32_e32 vcc_lo, s7, v1
	v_subrev_nc_u32_e32 v6, s7, v1
	v_cndmask_b32_e64 v11, v11, v12, s2
	v_add_nc_u32_e32 v12, 1, v4
	v_cndmask_b32_e32 v10, v10, v14, vcc_lo
	s_delay_alu instid0(VALU_DEP_4)
	v_cndmask_b32_e32 v1, v1, v6, vcc_lo
	v_cndmask_b32_e64 v6, v8, v13, s2
	v_cmp_le_u32_e32 vcc_lo, s7, v0
	v_add_nc_u32_e32 v8, 1, v11
	v_add_nc_u32_e32 v13, 1, v10
	s_load_b64 s[2:3], s[0:1], 0x8
	s_mov_b32 s1, 0
	v_cndmask_b32_e32 v0, v4, v12, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s7, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_xor_b32_e32 v6, v0, v2
	v_cndmask_b32_e32 v4, v11, v8, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s7, v1
	v_sub_nc_u32_e32 v8, v6, v2
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v0, v4, v5
	v_cndmask_b32_e32 v1, v10, v13, vcc_lo
	v_sub_nc_u32_e32 v4, v0, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v1, v1, v3
	v_cmp_lt_i32_e64 s0, 0, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v6, v1, v3
	v_cmp_lt_i32_e32 vcc_lo, v8, v6
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, s0, vcc_lo
	s_and_saveexec_b32 s8, s0
	s_cbranch_execz .LBB5_6
; %bb.2:                                ; %.lr.ph.preheader
	v_mad_u64_u32 v[1:2], null, s4, v8, v[0:1]
	v_dual_mov_b32 v10, 1 :: v_dual_mov_b32 v11, v8
	s_delay_alu instid0(VALU_DEP_2)
	v_sub_nc_u32_e32 v1, v1, v5
.LBB5_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	s_mov_b32 s9, exec_lo
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v2, s0, s2, v2
	v_add_co_ci_u32_e64 v3, s0, s3, v3, s0
	global_load_b32 v12, v[2:3], off
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u32_e32 1, v12
	s_cbranch_execz .LBB5_5
; %bb.4:                                ;   in Loop: Header=BB5_3 Depth=1
	global_store_b32 v[2:3], v10, off offset:-4
.LBB5_5:                                ;   in Loop: Header=BB5_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s9
	v_add_nc_u32_e32 v11, 1, v11
	v_add_nc_u32_e32 v1, s4, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_ge_i32_e64 s0, v11, v6
	s_or_b32 s1, s0, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s1
	s_cbranch_execnz .LBB5_3
.LBB5_6:                                ; %Flow122
	s_or_b32 exec_lo, exec_lo, s8
	v_add_nc_u32_e32 v1, s4, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_add_nc_u32_e32 v1, v1, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v1, v1, v2
	v_xor_b32_e32 v2, s6, v2
	v_mul_hi_u32 v3, v1, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v7, v3, s7
	v_sub_nc_u32_e32 v1, v1, v7
	v_add_nc_u32_e32 v7, 1, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_subrev_nc_u32_e32 v9, s7, v1
	v_cmp_le_u32_e64 s0, s7, v1
	v_cndmask_b32_e64 v3, v3, v7, s0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v1, v1, v9, s0
	v_add_nc_u32_e32 v7, 1, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_le_u32_e64 s0, s7, v1
	v_cndmask_b32_e64 v1, v3, v7, s0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v1, v1, v2
	v_sub_nc_u32_e32 v7, v1, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_gt_i32_e64 s0, s4, v7
	s_and_b32 s1, s0, vcc_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_saveexec_b32 s0, s1
	s_cbranch_execz .LBB5_11
; %bb.7:                                ; %.lr.ph92.preheader
	v_mad_u64_u32 v[10:11], null, s4, v8, v[1:2]
	v_mov_b32_e32 v9, 1
	s_mov_b32 s1, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_sub_nc_u32_e32 v1, v10, v2
	v_mov_b32_e32 v10, v8
.LBB5_8:                                ; %.lr.ph92
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	s_mov_b32 s6, exec_lo
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s2, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s3, v3, vcc_lo
	global_load_b32 v11, v[2:3], off offset:-4
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u32_e32 1, v11
	s_cbranch_execz .LBB5_10
; %bb.9:                                ;   in Loop: Header=BB5_8 Depth=1
	global_store_b32 v[2:3], v9, off
.LBB5_10:                               ;   in Loop: Header=BB5_8 Depth=1
	s_or_b32 exec_lo, exec_lo, s6
	v_add_nc_u32_e32 v10, 1, v10
	v_add_nc_u32_e32 v1, s4, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_ge_i32_e32 vcc_lo, v10, v6
	s_or_b32 s1, vcc_lo, s1
	s_and_not1_b32 exec_lo, exec_lo, s1
	s_cbranch_execnz .LBB5_8
.LBB5_11:                               ; %Flow120
	s_or_b32 exec_lo, exec_lo, s0
	v_cmp_lt_i32_e64 s0, 0, v8
	v_cmp_lt_i32_e32 vcc_lo, v4, v7
	s_mov_b32 s6, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, s0, vcc_lo
	s_and_saveexec_b32 s7, s0
	s_cbranch_execz .LBB5_16
; %bb.12:                               ; %.lr.ph94
	v_mul_lo_u32 v8, v8, s4
	v_mov_b32_e32 v3, 1
	v_mov_b32_e32 v9, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v1, v0, v8
	v_subrev_nc_u32_e32 v8, s4, v8
	v_sub_nc_u32_e32 v1, v1, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v1, s0, s2, v1
	v_add_co_ci_u32_e64 v2, s0, s3, v2, s0
.LBB5_13:                               ; =>This Inner Loop Header: Depth=1
	global_load_b32 v10, v[1:2], off
	s_mov_b32 s1, exec_lo
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u32_e32 1, v10
	s_cbranch_execz .LBB5_15
; %bb.14:                               ;   in Loop: Header=BB5_13 Depth=1
	v_add_nc_u32_e32 v10, v8, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v11, 31, v10
	v_lshlrev_b64 v[10:11], 2, v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v10, s0, s2, v10
	v_add_co_ci_u32_e64 v11, s0, s3, v11, s0
	global_store_b32 v[10:11], v3, off
.LBB5_15:                               ;   in Loop: Header=BB5_13 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	v_add_nc_u32_e32 v9, 1, v9
	v_add_co_u32 v1, s1, v1, 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e64 v2, s1, 0, v2, s1
	v_cmp_ge_i32_e64 s0, v9, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s6, s0, s6
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB5_13
.LBB5_16:                               ; %Flow118
	s_or_b32 exec_lo, exec_lo, s7
	v_cmp_gt_i32_e64 s0, s5, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, s0, vcc_lo
	s_and_b32 exec_lo, exec_lo, s0
	s_cbranch_execz .LBB5_21
; %bb.17:                               ; %.lr.ph96
	v_add_nc_u32_e32 v3, -1, v6
	s_mov_b32 s1, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_mad_u64_u32 v[1:2], null, v3, s4, v[0:1]
	v_mul_lo_u32 v2, v6, s4
	v_mov_b32_e32 v3, 1
	v_sub_nc_u32_e32 v0, v1, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
.LBB5_18:                               ; =>This Inner Loop Header: Depth=1
	global_load_b32 v5, v[0:1], off
	s_mov_b32 s0, exec_lo
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u32_e32 1, v5
	s_cbranch_execz .LBB5_20
; %bb.19:                               ;   in Loop: Header=BB5_18 Depth=1
	v_add_nc_u32_e32 v5, v2, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v6, 31, v5
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	global_store_b32 v[5:6], v3, off
.LBB5_20:                               ;   in Loop: Header=BB5_18 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	v_add_nc_u32_e32 v4, 1, v4
	v_add_co_u32 v0, s0, v0, 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e64 v1, s0, 0, v1, s0
	v_cmp_ge_i32_e32 vcc_lo, v4, v7
	s_or_b32 s1, vcc_lo, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s1
	s_cbranch_execnz .LBB5_18
.LBB5_21:                               ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z15kernel_exchangeiPiS_S_ii
		.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 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_end5:
	.size	_Z15kernel_exchangeiPiS_S_ii, .Lfunc_end5-_Z15kernel_exchangeiPiS_S_ii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1512
; 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
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__const._Z11kernel_blurPfS_iii.kernel,@object ; @__const._Z11kernel_blurPfS_iii.kernel
	.section	.rodata,"a",@progbits
	.p2align	4, 0x0
__const._Z11kernel_blurPfS_iii.kernel:
	.long	0x3533da0d                      ; float 6.7000002E-7
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x39cb458e                      ; float 3.87709995E-4
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x3533da0d                      ; float 6.7000002E-7
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x3a4e21b7                      ; float 7.86330027E-4
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x3c59f7e3                      ; float 0.0133037297
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x3a4e21b7                      ; float 7.86330027E-4
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x3d6023ba                      ; float 0.0547215715
	.long	0x3de34a58                      ; float 0.110981643
	.long	0x3d6023ba                      ; float 0.0547215715
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x39cb458e                      ; float 3.87709995E-4
	.long	0x3c59f7e3                      ; float 0.0133037297
	.long	0x3de34a58                      ; float 0.110981643
	.long	0x3e667c4b                      ; float 0.225083515
	.long	0x3de34a58                      ; float 0.110981643
	.long	0x3c59f7e3                      ; float 0.0133037297
	.long	0x39cb458e                      ; float 3.87709995E-4
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x3d6023ba                      ; float 0.0547215715
	.long	0x3de34a58                      ; float 0.110981643
	.long	0x3d6023ba                      ; float 0.0547215715
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x3a4e21b7                      ; float 7.86330027E-4
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x3c59f7e3                      ; float 0.0133037297
	.long	0x3bd6f255                      ; float 0.00655964995
	.long	0x3a4e21b7                      ; float 7.86330027E-4
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x3533da0d                      ; float 6.7000002E-7
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x39cb458e                      ; float 3.87709995E-4
	.long	0x394874ce                      ; float 1.91169995E-4
	.long	0x37c04453                      ; float 2.29199995E-5
	.long	0x3533da0d                      ; float 6.7000002E-7
	.size	__const._Z11kernel_blurPfS_iii.kernel, 196

	.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
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         20
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         36
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         44
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         46
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         48
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         50
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         52
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         54
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         96
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11kernel_blurPfS_iii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11kernel_blurPfS_iii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     18
    .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:           _Z24kernel_calculateGradientPfS_Piiii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z24kernel_calculateGradientPfS_Piiii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     12
    .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:         36
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     by_value
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         52
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         56
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         60
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         62
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         64
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         66
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         68
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         70
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         112
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 304
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z22kernel_doubleThresholdPfPiS0_iiffi
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z22kernel_doubleThresholdPfPiS0_iiffi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .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:           _Z11kernel_thinPfPiS_iii
    .private_segment_fixed_size: 0
    .sgpr_count:     19
    .sgpr_spill_count: 0
    .symbol:         _Z11kernel_thinPfPiS_iii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     13
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .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
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         36
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 40
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z10kernel_dfsiPiS_S_ii
    .private_segment_fixed_size: 0
    .sgpr_count:     0
    .sgpr_spill_count: 0
    .symbol:         _Z10kernel_dfsiPiS_S_ii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     0
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .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
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         36
        .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:           _Z15kernel_exchangeiPiS_S_ii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z15kernel_exchangeiPiS_S_ii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     16
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
