#define LIMIT -999
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>

void runTest(int argc, char **argv);
int maximum(int a, int b, int c)
{
    int k;
    if (a <= b)
        k = b;
    else
        k = a;
    if (k <= c)
        return (c);
    else
        return (k);
}

__device__ int maximum_dev(int a, int b, int c)
{
    int k;
    if (a <= b)
        k = b;
    else
        k = a;
    if (k <= c)
        return (c);
    else
        return (k);
}

int blosum62[24][24] = {
    {4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3, -2, 0, -2, -1, 0, -4},
    {-1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1, -3, -2, -3, -1, 0, -1, -4},
    {-2, 0, 6, 1, -3, 0, 0, 0, 1, -3, -3, 0, -2, -3, -2, 1, 0, -4, -2, -3, 3, 0, -1, -4},
    {-2, -2, 1, 6, -3, 0, 2, -1, -1, -3, -4, -1, -3, -3, -1, 0, -1, -4, -3, -3, 4, 1, -1, -4},
    {0, -3, -3, -3, 9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1, -1, -2, -2, -1, -3, -3, -2, -4},
    {-1, 1, 0, 0, -3, 5, 2, -2, 0, -3, -2, 1, 0, -3, -1, 0, -1, -2, -1, -2, 0, 3, -1, -4},
    {-1, 0, 0, 2, -4, 2, 5, -2, 0, -3, -3, 1, -2, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4},
    {0, -2, 0, -1, -3, -2, -2, 6, -2, -4, -4, -2, -3, -3, -2, 0, -2, -2, -3, -3, -1, -2, -1, -4},
    {-2, 0, 1, -1, -3, 0, 0, -2, 8, -3, -3, -1, -2, -1, -2, -1, -2, -2, 2, -3, 0, 0, -1, -4},
    {-1, -3, -3, -3, -1, -3, -3, -4, -3, 4, 2, -3, 1, 0, -3, -2, -1, -3, -1, 3, -3, -3, -1, -4},
    {-1, -2, -3, -4, -1, -2, -3, -4, -3, 2, 4, -2, 2, 0, -3, -2, -1, -2, -1, 1, -4, -3, -1, -4},
    {-1, 2, 0, -1, -3, 1, 1, -2, -1, -3, -2, 5, -1, -3, -1, 0, -1, -3, -2, -2, 0, 1, -1, -4},
    {-1, -1, -2, -3, -1, 0, -2, -3, -2, 1, 2, -1, 5, 0, -2, -1, -1, -1, -1, 1, -3, -1, -1, -4},
    {-2, -3, -3, -3, -2, -3, -3, -3, -1, 0, 0, -3, 0, 6, -4, -2, -2, 1, 3, -1, -3, -3, -1, -4},
    {-1, -2, -2, -1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4, 7, -1, -1, -4, -3, -2, -2, -1, -2, -4},
    {1, -1, 1, 0, -1, 0, 0, 0, -1, -2, -2, 0, -1, -2, -1, 4, 1, -3, -2, -2, 0, 0, 0, -4},
    {0, -1, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1, 1, 5, -2, -2, 0, -1, -1, 0, -4},
    {-3, -3, -4, -4, -2, -2, -3, -2, -2, -3, -2, -3, -1, 1, -4, -3, -2, 11, 2, -3, -4, -3, -2, -4},
    {-2, -2, -2, -3, -2, -1, -2, -3, 2, -1, -1, -2, -1, 3, -3, -2, -2, 2, 7, -1, -3, -2, -1, -4},
    {0, -3, -3, -3, -1, -2, -2, -3, -3, 3, 1, -2, 1, -1, -2, -2, 0, -3, -1, 4, -3, -2, -1, -4},
    {-2, -1, 3, 4, -3, 0, 1, -1, 0, -3, -4, 0, -3, -3, -2, 0, -1, -4, -3, -3, 4, 1, -1, -4},
    {-1, 0, 0, 1, -3, 3, 4, -2, 0, -3, -3, 1, -1, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4},
    {0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, 0, 0, -2, -1, -1, -1, -1, -1, -4},
    {-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 1}};

double gettime()
{
    struct timeval t;
    gettimeofday(&t, NULL);
    return t.tv_sec + t.tv_usec * 1e-6;
}

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

    return EXIT_SUCCESS;
}

void usage(int argc, char **argv)
{
    fprintf(stderr, "Usage: %s <max_rows/max_cols> <penalty>\n", argv[0]);
    fprintf(stderr, "\t<dimension>      - x and y dimensions\n");
    fprintf(stderr, "\t<penalty>        - penalty(positive integer)\n");
    exit(1);
}

typedef int thread_idx_t;

__global__ void kernel_init_reference(int *reference, int *blosum62, int *input_itemsets, int num_rows, int num_cols)
{
    const thread_idx_t thread_idx_i = threadIdx.y + (thread_idx_t)blockIdx.y * blockDim.y;
    const thread_idx_t thread_idx_j = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;

    if (thread_idx_i < num_rows && thread_idx_j < num_cols)
        reference[thread_idx_i * num_cols + thread_idx_j] =
            blosum62
            [
                input_itemsets[thread_idx_i * num_cols]
            * 24 +
                input_itemsets[thread_idx_j]
            ];
}

__global__ void kernel_init_input_itemsets(int *input_itemsets, int num_cols, int penalty)
{
    const thread_idx_t thread_idx = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;

    if (thread_idx < num_cols)
    {
        input_itemsets[thread_idx * num_cols] = -thread_idx * penalty;
        input_itemsets[thread_idx] = -thread_idx * penalty;
    }
}

__global__ void kernel_top_left_processing(int *input_itemsets, int *reference, int num_cols, int i, int penalty) {
    __shared__ int s_input_itemsets_nw[1024];
    __shared__ int s_input_itemsets_w[1025];
    const thread_idx_t thread_idx = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;
    const thread_idx_t tid = threadIdx.x;

    const int index = (thread_idx + 1) * num_cols + (i + 1 - thread_idx);
    s_input_itemsets_nw[tid] = input_itemsets[index - 1 - num_cols] + reference[index];
    s_input_itemsets_w[tid + 1] = input_itemsets[index - 1];

    if (tid == 0)
        s_input_itemsets_w[0] = input_itemsets[index - num_cols];

    __syncthreads();

    if (thread_idx <= i)
    {
        input_itemsets[index] = maximum_dev(s_input_itemsets_nw[tid],
            s_input_itemsets_w[tid + 1] - penalty,
            s_input_itemsets_w[tid] - penalty);
    }
}

__global__ void kernel_bottom_right_processing(int *input_itemsets, int *reference, int num_cols, int i, int penalty) {
    __shared__ int s_input_itemsets_nw[1024];
    __shared__ int s_input_itemsets_n[1025];
    const thread_idx_t thread_idx = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;
    const thread_idx_t tid = threadIdx.x;
    const int index = (num_cols - thread_idx - 2) * num_cols + thread_idx + num_cols - i - 2;

    s_input_itemsets_nw[tid] = input_itemsets[index - 1 - num_cols] + reference[index];
    s_input_itemsets_n[tid + 1] = input_itemsets[index - num_cols];

    if (tid == 0)
        s_input_itemsets_n[0] = input_itemsets[index - 1];

    __syncthreads();

    if (thread_idx <= i) {
        input_itemsets[index] = maximum_dev(s_input_itemsets_nw[tid],
            s_input_itemsets_n[tid + 1] - penalty,
            s_input_itemsets_n[tid] - penalty);
    }
}

void runTest(int argc, char **argv)
{
    int max_rows, max_cols, penalty;
    int *input_itemsets, *reference;

    if (argc == 3)
    {
        max_cols = max_rows = atoi(argv[1]);
        penalty = atoi(argv[2]);
    }
    else
    {
        usage(argc, argv);
    }

    max_rows = max_rows + 1;
    max_cols = max_cols + 1;
    cudaMallocHost(&reference, max_rows * max_cols * sizeof(int));
    input_itemsets = (int *)calloc(max_rows * max_cols, sizeof(int));

    if (!input_itemsets)
        fprintf(stderr, "error: can not allocate memory");

    // srand(time(NULL));
    srand(0);

    printf("Start Needleman-Wunsch\n");

    for (int i = 1; i < max_rows; i++)
    {
        input_itemsets[i * max_cols] = rand() % 10 + 1;
    }
    for (int j = 1; j < max_cols; j++)
    {
        input_itemsets[j] = rand() % 10 + 1;
    }

    int *reference_dev;
    int *input_itemsets_dev;
    int *blosum62_dev;

    cudaStream_t reference_copy_stream;

    cudaStreamCreateWithFlags(&reference_copy_stream, cudaStreamNonBlocking);

    const size_t size = max_rows * max_cols * sizeof(int);

    cudaMalloc(&reference_dev, size);
    cudaMalloc(&input_itemsets_dev, size);
    cudaMalloc(&blosum62_dev, sizeof(blosum62));

    cudaMemcpy(input_itemsets_dev, input_itemsets, size, cudaMemcpyHostToDevice);
    cudaMemcpy(blosum62_dev, blosum62, sizeof(blosum62), cudaMemcpyHostToDevice);

    const dim3 block_size(32, 32, 1);
    const size_t grid_cols = (max_cols + block_size.x - 1) / block_size.x;
    const size_t grid_rows = (max_rows + block_size.y - 1) / block_size.y;
    const dim3 grid_size(grid_cols, grid_rows, 1);

    kernel_init_reference<<< grid_size, block_size >>>(reference_dev, blosum62_dev, input_itemsets_dev, max_rows, max_cols);

    cudaMemcpyAsync(reference, reference_dev, size, cudaMemcpyDeviceToHost, reference_copy_stream);
    kernel_init_input_itemsets<<< ceil(max_cols / 1024.0), 1024 >>>(input_itemsets_dev, max_cols, penalty);

    printf("Processing top-left matrix\n");
    for (int i = 0; i < max_cols - 2; i++)
    {
        kernel_top_left_processing<<<ceil((i + 1) / 1024.0), 1024>>>(input_itemsets_dev, reference_dev, max_cols, i, penalty);
    }

    printf("Processing bottom-right matrix\n");
    for (int i = max_cols - 4; i >= 0; i--)
    {
        kernel_bottom_right_processing<<<ceil((i + 1) / 1024.0), 1024>>>(input_itemsets_dev, reference_dev, max_cols, i, penalty);
    }

    cudaMemcpy(input_itemsets, input_itemsets_dev, size, cudaMemcpyDeviceToHost);

    cudaStreamDestroy(reference_copy_stream);

    cudaFree(reference_dev);
    cudaFree(input_itemsets_dev);
    cudaFree(blosum62_dev);

#define TRACEBACK
#ifdef TRACEBACK

    FILE *fpo = fopen("result.txt", "w");
    fprintf(fpo, "print traceback value:\n");

    for (int i = max_rows - 2, j = max_rows - 2; i >= 0, j >= 0;)
    {
        int nw, n, w, traceback;
        if (i == max_rows - 2 && j == max_rows - 2)
            fprintf(fpo, "%d ", input_itemsets[i * max_cols + j]);
        if (i == 0 && j == 0)
            break;
        if (i > 0 && j > 0)
        {
            nw = input_itemsets[(i - 1) * max_cols + j - 1];
            w = input_itemsets[i * max_cols + j - 1];
            n = input_itemsets[(i - 1) * max_cols + j];
        }
        else if (i == 0)
        {
            nw = n = LIMIT;
            w = input_itemsets[i * max_cols + j - 1];
        }
        else if (j == 0)
        {
            nw = w = LIMIT;
            n = input_itemsets[(i - 1) * max_cols + j];
        }

        //traceback = maximum(nw, w, n);
        int new_nw, new_w, new_n;
        new_nw = nw + reference[i * max_cols + j];
        new_w = w - penalty;
        new_n = n - penalty;

        traceback = maximum(new_nw, new_w, new_n);
        if (traceback == new_nw)
            traceback = nw;
        if (traceback == new_w)
            traceback = w;
        if (traceback == new_n)
            traceback = n;

        fprintf(fpo, "%d ", traceback);

        if (traceback == nw)
        {
            i--;
            j--;
            continue;
        }

        else if (traceback == w)
        {
            j--;
            continue;
        }

        else if (traceback == n)
        {
            i--;
            continue;
        }
    }

    fclose(fpo);

#endif

    cudaFreeHost(reference);
    free(input_itemsets);
}

	.file	"tmpxft_002e7a73_00000000-6_needle_parallel.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2035:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2035:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z7maximumiii
	.type	_Z7maximumiii, @function
_Z7maximumiii:
.LFB2027:
	.cfi_startproc
	endbr64
	cmpl	%edx, %esi
	movl	%edi, %eax
	cmovl	%edx, %esi
	cmpl	%edi, %esi
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z7maximumiii, .-_Z7maximumiii
	.globl	_Z11maximum_deviii
	.type	_Z11maximum_deviii, @function
_Z11maximum_deviii:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE2028:
	.size	_Z11maximum_deviii, .-_Z11maximum_deviii
	.globl	_Z7gettimev
	.type	_Z7gettimev, @function
_Z7gettimev:
.LFB2029:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdi
	call	gettimeofday@PLT
	cvtsi2sdq	16(%rsp), %xmm0
	mulsd	.LC0(%rip), %xmm0
	cvtsi2sdq	8(%rsp), %xmm1
	addsd	%xmm1, %xmm0
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z7gettimev, .-_Z7gettimev
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Usage: %s <max_rows/max_cols> <penalty>\n"
.LC2:
	.string	"\t<dimension>      - x and y dimensions\n"
.LC3:
	.string	"\t<penalty>        - penalty(positive integer)\n"
	.text
	.globl	_Z5usageiPPc
	.type	_Z5usageiPPc, @function
_Z5usageiPPc:
.LFB2031:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	leaq	.LC1(%rip), %rdx
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	(%rsi), %rcx
	xorl	%eax, %eax
	movl	$2, %esi
	movq	stderr(%rip), %rdi
	call	__fprintf_chk@PLT
	movq	stderr(%rip), %rdi
	leaq	.LC2(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movq	stderr(%rip), %rdi
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE2031:
	.size	_Z5usageiPPc, .-_Z5usageiPPc
	.globl	_Z47__device_stub__Z21kernel_init_referencePiS_S_iiPiS_S_ii
	.type	_Z47__device_stub__Z21kernel_init_referencePiS_S_iiPiS_S_ii, @function
_Z47__device_stub__Z21kernel_init_referencePiS_S_iiPiS_S_ii:
.LFB2057:
	.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
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	40(%rsp), %rcx
	movl	%r8d, (%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	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%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	.L11
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z21kernel_init_referencePiS_S_ii(%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
.L11:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2057:
	.size	_Z47__device_stub__Z21kernel_init_referencePiS_S_iiPiS_S_ii, .-_Z47__device_stub__Z21kernel_init_referencePiS_S_iiPiS_S_ii
	.globl	_Z21kernel_init_referencePiS_S_ii
	.type	_Z21kernel_init_referencePiS_S_ii, @function
_Z21kernel_init_referencePiS_S_ii:
.LFB2058:
	.cfi_startproc
	endbr64
	jmp	_Z47__device_stub__Z21kernel_init_referencePiS_S_iiPiS_S_ii
	.cfi_endproc
.LFE2058:
	.size	_Z21kernel_init_referencePiS_S_ii, .-_Z21kernel_init_referencePiS_S_ii
	.globl	_Z48__device_stub__Z26kernel_init_input_itemsetsPiiiPiii
	.type	_Z48__device_stub__Z26kernel_init_input_itemsetsPiiiPiii, @function
_Z48__device_stub__Z26kernel_init_input_itemsetsPiiiPiii:
.LFB2059:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	32(%rsp), %rdi
	movl	%esi, 4(%rsp)
	leaq	44(%rsp), %rsi
	movl	%edx, (%rsp)
	leaq	16(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L16
	pushq	24(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z26kernel_init_input_itemsetsPiii(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 144
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L16:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2059:
	.size	_Z48__device_stub__Z26kernel_init_input_itemsetsPiiiPiii, .-_Z48__device_stub__Z26kernel_init_input_itemsetsPiiiPiii
	.globl	_Z26kernel_init_input_itemsetsPiii
	.type	_Z26kernel_init_input_itemsetsPiii, @function
_Z26kernel_init_input_itemsetsPiii:
.LFB2060:
	.cfi_startproc
	endbr64
	jmp	_Z48__device_stub__Z26kernel_init_input_itemsetsPiiiPiii
	.cfi_endproc
.LFE2060:
	.size	_Z26kernel_init_input_itemsetsPiii, .-_Z26kernel_init_input_itemsetsPiii
	.globl	_Z51__device_stub__Z26kernel_top_left_processingPiS_iiiPiS_iii
	.type	_Z51__device_stub__Z26kernel_top_left_processingPiS_iiiPiS_iii, @function
_Z51__device_stub__Z26kernel_top_left_processingPiS_iiiPiS_iii:
.LFB2061:
	.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	.L21
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z26kernel_top_left_processingPiS_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
.L21:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2061:
	.size	_Z51__device_stub__Z26kernel_top_left_processingPiS_iiiPiS_iii, .-_Z51__device_stub__Z26kernel_top_left_processingPiS_iiiPiS_iii
	.globl	_Z26kernel_top_left_processingPiS_iii
	.type	_Z26kernel_top_left_processingPiS_iii, @function
_Z26kernel_top_left_processingPiS_iii:
.LFB2062:
	.cfi_startproc
	endbr64
	jmp	_Z51__device_stub__Z26kernel_top_left_processingPiS_iiiPiS_iii
	.cfi_endproc
.LFE2062:
	.size	_Z26kernel_top_left_processingPiS_iii, .-_Z26kernel_top_left_processingPiS_iii
	.globl	_Z55__device_stub__Z30kernel_bottom_right_processingPiS_iiiPiS_iii
	.type	_Z55__device_stub__Z30kernel_bottom_right_processingPiS_iiiPiS_iii, @function
_Z55__device_stub__Z30kernel_bottom_right_processingPiS_iiiPiS_iii:
.LFB2063:
	.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	.L26
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z30kernel_bottom_right_processingPiS_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
.L26:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2063:
	.size	_Z55__device_stub__Z30kernel_bottom_right_processingPiS_iiiPiS_iii, .-_Z55__device_stub__Z30kernel_bottom_right_processingPiS_iiiPiS_iii
	.globl	_Z30kernel_bottom_right_processingPiS_iii
	.type	_Z30kernel_bottom_right_processingPiS_iii, @function
_Z30kernel_bottom_right_processingPiS_iii:
.LFB2064:
	.cfi_startproc
	endbr64
	jmp	_Z55__device_stub__Z30kernel_bottom_right_processingPiS_iiiPiS_iii
	.cfi_endproc
.LFE2064:
	.size	_Z30kernel_bottom_right_processingPiS_iii, .-_Z30kernel_bottom_right_processingPiS_iii
	.section	.rodata.str1.1
.LC4:
	.string	"error: can not allocate memory"
.LC5:
	.string	"Start Needleman-Wunsch\n"
.LC7:
	.string	"Processing top-left matrix\n"
.LC8:
	.string	"Processing bottom-right matrix\n"
.LC9:
	.string	"w"
.LC10:
	.string	"result.txt"
.LC11:
	.string	"print traceback value:\n"
.LC12:
	.string	"%d "
	.text
	.globl	_Z7runTestiPPc
	.type	_Z7runTestiPPc, @function
_Z7runTestiPPc:
.LFB2032:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	cmpl	$3, %edi
	jne	.L32
	movq	8(%rsi), %rdi
	movq	%rsi, (%rsp)
	call	atoi@PLT
	movq	(%rsp), %rsi
	movl	%eax, %r12d
	leal	1(%r12), %ebx
	movq	16(%rsi), %rdi
	movl	%ebx, %ebp
	call	atoi@PLT
	imull	%ebx, %ebp
	leaq	32(%rsp), %rdi
	xorl	%edx, %edx
	movl	%eax, 20(%rsp)
	movslq	%ebp, %rbp
	leaq	0(,%rbp,4), %rax
	movq	%rax, %rsi
	movq	%rax, (%rsp)
	call	cudaHostAlloc@PLT
	movq	%rbp, %rdi
	movl	$4, %esi
	call	calloc@PLT
	movq	%rax, %rbp
	testq	%rax, %rax
	jne	.L34
	movq	stderr(%rip), %rdi
	leaq	.LC4(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	jmp	.L34
.L32:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L82
	call	_Z5usageiPPc
.L34:
	xorl	%edi, %edi
	movslq	%ebx, %r15
	movl	$1, %r13d
	call	srand@PLT
	salq	$2, %r15
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	leaq	0(%rbp,%r15), %rsi
.L36:
	cmpl	%ebx, %r13d
	jge	.L83
	movq	%rsi, 24(%rsp)
	incl	%r13d
	call	rand@PLT
	movl	$10, %ecx
	movq	24(%rsp), %rsi
	cltd
	idivl	%ecx
	incl	%edx
	movl	%edx, (%rsi)
	addq	%r15, %rsi
	jmp	.L36
.L83:
	xorl	%r15d, %r15d
	movl	$10, %r13d
.L38:
	incq	%r15
	cmpl	%r15d, %ebx
	jle	.L84
	call	rand@PLT
	cltd
	idivl	%r13d
	incl	%edx
	movl	%edx, 0(%rbp,%r15,4)
	jmp	.L38
.L84:
	leaq	64(%rsp), %rdi
	movl	$1, %esi
	call	cudaStreamCreateWithFlags@PLT
	movq	(%rsp), %rsi
	leaq	40(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	(%rsp), %rsi
	leaq	48(%rsp), %rdi
	call	cudaMalloc@PLT
	leaq	56(%rsp), %rdi
	movl	$2304, %esi
	call	cudaMalloc@PLT
	movq	(%rsp), %rdx
	movq	48(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	movl	$1, %ecx
	movl	$2304, %edx
	leaq	blosum62(%rip), %rsi
	call	cudaMemcpy@PLT
	leal	32(%r12), %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	shrl	$5, %eax
	movl	$1, %ecx
	movabsq	$137438953504, %rdx
	movl	$1, %esi
	movl	%eax, 84(%rsp)
	movl	%eax, 88(%rsp)
	movq	84(%rsp), %rdi
	movl	$1, 92(%rsp)
	movq	%rdx, 72(%rsp)
	movl	$1, 80(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L40
	movq	48(%rsp), %rdx
	movq	56(%rsp), %rsi
	movl	%ebx, %r8d
	movl	%ebx, %ecx
	movq	40(%rsp), %rdi
	call	_Z47__device_stub__Z21kernel_init_referencePiS_S_iiPiS_S_ii
.L40:
	movq	64(%rsp), %r8
	movq	(%rsp), %rdx
	movl	$2, %ecx
	movabsq	$4294968320, %r13
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	cudaMemcpyAsync@PLT
	cvtsi2sdl	%ebx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	movq	%r13, 108(%rsp)
	movl	$1, 116(%rsp)
	call	ceil@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r13, %rdx
	cvttsd2siq	%xmm0, %rax
	movl	$1, %ecx
	movl	%eax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 100(%rsp)
	movq	96(%rsp), %rdi
	movl	104(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L41
	movl	20(%rsp), %edx
	movq	48(%rsp), %rdi
	movl	%ebx, %esi
	call	_Z48__device_stub__Z26kernel_init_input_itemsetsPiiiPiii
.L41:
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movabsq	$4294968320, %r15
	call	__printf_chk@PLT
	xorl	%r10d, %r10d
.L42:
	leal	-1(%r12), %r13d
	cmpl	%r10d, %r13d
	jle	.L85
	leal	1(%r10), %r13d
	movl	%r10d, 24(%rsp)
	cvtsi2sdl	%r13d, %xmm0
	mulsd	.LC6(%rip), %xmm0
	movq	%r15, 108(%rsp)
	movl	$1, 116(%rsp)
	call	ceil@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r15, %rdx
	cvttsd2siq	%xmm0, %rax
	movl	$1, %ecx
	movl	%eax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 100(%rsp)
	movq	96(%rsp), %rdi
	movl	104(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	movl	24(%rsp), %r10d
	testl	%eax, %eax
	jne	.L43
	movl	20(%rsp), %r8d
	movq	40(%rsp), %rsi
	movl	%r10d, %ecx
	movl	%ebx, %edx
	movq	48(%rsp), %rdi
	call	_Z51__device_stub__Z26kernel_top_left_processingPiS_iiiPiS_iii
.L43:
	movl	%r13d, %r10d
	jmp	.L42
.L85:
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	subl	$3, %r12d
	call	__printf_chk@PLT
	movabsq	$4294968320, %r15
.L45:
	testl	%r12d, %r12d
	js	.L86
	leal	1(%r12), %eax
	movq	%r15, 108(%rsp)
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC6(%rip), %xmm0
	movl	$1, 116(%rsp)
	call	ceil@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r15, %rdx
	cvttsd2siq	%xmm0, %rax
	movl	$1, %ecx
	movl	%eax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 100(%rsp)
	movq	96(%rsp), %rdi
	movl	104(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L46
	movl	20(%rsp), %r8d
	movq	40(%rsp), %rsi
	movl	%r12d, %ecx
	movl	%ebx, %edx
	movq	48(%rsp), %rdi
	call	_Z55__device_stub__Z30kernel_bottom_right_processingPiS_iiiPiS_iii
.L46:
	decl	%r12d
	jmp	.L45
.L86:
	movq	(%rsp), %rdx
	movq	48(%rsp), %rsi
	movq	%rbp, %rdi
	movl	%r13d, %r12d
	movl	$2, %ecx
	movl	%r13d, %r15d
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rdi
	call	cudaStreamDestroy@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	leaq	.LC9(%rip), %rsi
	leaq	.LC10(%rip), %rdi
	call	fopen@PLT
	leaq	.LC11(%rip), %rdx
	movl	$2, %esi
	movq	%rax, (%rsp)
	movq	%rax, %rdi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	jmp	.L48
.L82:
	call	__stack_chk_fail@PLT
.L61:
	cmpl	%r15d, %r13d
	je	.L87
.L49:
	movl	%r15d, %eax
	orl	%r12d, %eax
	je	.L62
	movl	%r15d, %eax
	imull	%ebx, %eax
	leal	(%r12,%rax), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	testl	%r15d, %r15d
	jle	.L52
	testl	%r12d, %r12d
	jle	.L52
	subl	%ebx, %eax
	movl	-4(%rbp,%rcx), %ecx
	addl	%r12d, %eax
	cltq
	movl	%ecx, 16(%rsp)
	movl	-4(%rbp,%rax,4), %r14d
	movl	0(%rbp,%rax,4), %eax
	movl	%eax, 12(%rsp)
.L53:
	movq	32(%rsp), %rax
	movl	20(%rsp), %ecx
	movq	(%rsp), %rdi
	movl	(%rax,%rdx,4), %esi
	movl	20(%rsp), %eax
	movl	16(%rsp), %edx
	addl	%r14d, %esi
	subl	%eax, %edx
	movl	12(%rsp), %eax
	subl	%ecx, %eax
	cmpl	%edx, %esi
	movl	%edx, %ecx
	cmovge	%esi, %ecx
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	cmpl	%esi, %ecx
	movl	$2, %esi
	cmove	%r14d, %ecx
	cmpl	%edx, %ecx
	cmove	16(%rsp), %ecx
	leaq	.LC12(%rip), %rdx
	cmpl	%eax, %ecx
	cmove	12(%rsp), %ecx
	xorl	%eax, %eax
	movl	%ecx, 24(%rsp)
	call	__fprintf_chk@PLT
	movl	24(%rsp), %ecx
	cmpl	%ecx, %r14d
	jne	.L58
	decl	%r15d
.L81:
	decl	%r12d
.L48:
	testl	%r12d, %r12d
	jns	.L61
	jmp	.L62
.L87:
	cmpl	%r12d, %r13d
	jne	.L49
	movl	%r15d, %eax
	movq	(%rsp), %rdi
	movl	$2, %esi
	leaq	.LC12(%rip), %rdx
	imull	%ebx, %eax
	addl	%r12d, %eax
	cltq
	movl	0(%rbp,%rax,4), %ecx
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	jmp	.L49
.L62:
	movq	(%rsp), %rdi
	call	fclose@PLT
	movq	32(%rsp), %rdi
	call	cudaFreeHost@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L82
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%rbp, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free@PLT
.L52:
	.cfi_restore_state
	testl	%r15d, %r15d
	jne	.L54
	movslq	%r12d, %rax
	movl	$-999, 12(%rsp)
	movl	-4(%rbp,%rax,4), %eax
	movl	%eax, 16(%rsp)
	jmp	.L80
.L54:
	testl	%r12d, %r12d
	jne	.L53
	subl	%ebx, %eax
	movl	$-999, 16(%rsp)
	cltq
	movl	0(%rbp,%rax,4), %eax
	movl	%eax, 12(%rsp)
.L80:
	movl	$-999, %r14d
	jmp	.L53
.L58:
	cmpl	%ecx, 16(%rsp)
	je	.L81
	cmpl	%ecx, 12(%rsp)
	jne	.L48
	decl	%r15d
	jmp	.L48
	.cfi_endproc
.LFE2032:
	.size	_Z7runTestiPPc, .-_Z7runTestiPPc
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z7runTestiPPc
	xorl	%eax, %eax
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	main, .-main
	.section	.rodata.str1.1
.LC13:
	.string	"_Z30kernel_bottom_right_processingPiS_iii"
.LC14:
	.string	"_Z26kernel_top_left_processingPiS_iii"
.LC15:
	.string	"_Z26kernel_init_input_itemsetsPiii"
.LC16:
	.string	"_Z21kernel_init_referencePiS_S_ii"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2066:
	.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	.LC13(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z30kernel_bottom_right_processingPiS_iii(%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	.LC14(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z26kernel_top_left_processingPiS_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	.LC15(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z26kernel_init_input_itemsetsPiii(%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	.LC16(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z21kernel_init_referencePiS_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
	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
.LFE2066:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	blosum62
	.data
	.align 32
	.type	blosum62, @object
	.size	blosum62, 2304
blosum62:
	.long	4
	.long	-1
	.long	-2
	.long	-2
	.long	0
	.long	-1
	.long	-1
	.long	0
	.long	-2
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-2
	.long	-1
	.long	1
	.long	0
	.long	-3
	.long	-2
	.long	0
	.long	-2
	.long	-1
	.long	0
	.long	-4
	.long	-1
	.long	5
	.long	0
	.long	-2
	.long	-3
	.long	1
	.long	0
	.long	-2
	.long	0
	.long	-3
	.long	-2
	.long	2
	.long	-1
	.long	-3
	.long	-2
	.long	-1
	.long	-1
	.long	-3
	.long	-2
	.long	-3
	.long	-1
	.long	0
	.long	-1
	.long	-4
	.long	-2
	.long	0
	.long	6
	.long	1
	.long	-3
	.long	0
	.long	0
	.long	0
	.long	1
	.long	-3
	.long	-3
	.long	0
	.long	-2
	.long	-3
	.long	-2
	.long	1
	.long	0
	.long	-4
	.long	-2
	.long	-3
	.long	3
	.long	0
	.long	-1
	.long	-4
	.long	-2
	.long	-2
	.long	1
	.long	6
	.long	-3
	.long	0
	.long	2
	.long	-1
	.long	-1
	.long	-3
	.long	-4
	.long	-1
	.long	-3
	.long	-3
	.long	-1
	.long	0
	.long	-1
	.long	-4
	.long	-3
	.long	-3
	.long	4
	.long	1
	.long	-1
	.long	-4
	.long	0
	.long	-3
	.long	-3
	.long	-3
	.long	9
	.long	-3
	.long	-4
	.long	-3
	.long	-3
	.long	-1
	.long	-1
	.long	-3
	.long	-1
	.long	-2
	.long	-3
	.long	-1
	.long	-1
	.long	-2
	.long	-2
	.long	-1
	.long	-3
	.long	-3
	.long	-2
	.long	-4
	.long	-1
	.long	1
	.long	0
	.long	0
	.long	-3
	.long	5
	.long	2
	.long	-2
	.long	0
	.long	-3
	.long	-2
	.long	1
	.long	0
	.long	-3
	.long	-1
	.long	0
	.long	-1
	.long	-2
	.long	-1
	.long	-2
	.long	0
	.long	3
	.long	-1
	.long	-4
	.long	-1
	.long	0
	.long	0
	.long	2
	.long	-4
	.long	2
	.long	5
	.long	-2
	.long	0
	.long	-3
	.long	-3
	.long	1
	.long	-2
	.long	-3
	.long	-1
	.long	0
	.long	-1
	.long	-3
	.long	-2
	.long	-2
	.long	1
	.long	4
	.long	-1
	.long	-4
	.long	0
	.long	-2
	.long	0
	.long	-1
	.long	-3
	.long	-2
	.long	-2
	.long	6
	.long	-2
	.long	-4
	.long	-4
	.long	-2
	.long	-3
	.long	-3
	.long	-2
	.long	0
	.long	-2
	.long	-2
	.long	-3
	.long	-3
	.long	-1
	.long	-2
	.long	-1
	.long	-4
	.long	-2
	.long	0
	.long	1
	.long	-1
	.long	-3
	.long	0
	.long	0
	.long	-2
	.long	8
	.long	-3
	.long	-3
	.long	-1
	.long	-2
	.long	-1
	.long	-2
	.long	-1
	.long	-2
	.long	-2
	.long	2
	.long	-3
	.long	0
	.long	0
	.long	-1
	.long	-4
	.long	-1
	.long	-3
	.long	-3
	.long	-3
	.long	-1
	.long	-3
	.long	-3
	.long	-4
	.long	-3
	.long	4
	.long	2
	.long	-3
	.long	1
	.long	0
	.long	-3
	.long	-2
	.long	-1
	.long	-3
	.long	-1
	.long	3
	.long	-3
	.long	-3
	.long	-1
	.long	-4
	.long	-1
	.long	-2
	.long	-3
	.long	-4
	.long	-1
	.long	-2
	.long	-3
	.long	-4
	.long	-3
	.long	2
	.long	4
	.long	-2
	.long	2
	.long	0
	.long	-3
	.long	-2
	.long	-1
	.long	-2
	.long	-1
	.long	1
	.long	-4
	.long	-3
	.long	-1
	.long	-4
	.long	-1
	.long	2
	.long	0
	.long	-1
	.long	-3
	.long	1
	.long	1
	.long	-2
	.long	-1
	.long	-3
	.long	-2
	.long	5
	.long	-1
	.long	-3
	.long	-1
	.long	0
	.long	-1
	.long	-3
	.long	-2
	.long	-2
	.long	0
	.long	1
	.long	-1
	.long	-4
	.long	-1
	.long	-1
	.long	-2
	.long	-3
	.long	-1
	.long	0
	.long	-2
	.long	-3
	.long	-2
	.long	1
	.long	2
	.long	-1
	.long	5
	.long	0
	.long	-2
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	1
	.long	-3
	.long	-1
	.long	-1
	.long	-4
	.long	-2
	.long	-3
	.long	-3
	.long	-3
	.long	-2
	.long	-3
	.long	-3
	.long	-3
	.long	-1
	.long	0
	.long	0
	.long	-3
	.long	0
	.long	6
	.long	-4
	.long	-2
	.long	-2
	.long	1
	.long	3
	.long	-1
	.long	-3
	.long	-3
	.long	-1
	.long	-4
	.long	-1
	.long	-2
	.long	-2
	.long	-1
	.long	-3
	.long	-1
	.long	-1
	.long	-2
	.long	-2
	.long	-3
	.long	-3
	.long	-1
	.long	-2
	.long	-4
	.long	7
	.long	-1
	.long	-1
	.long	-4
	.long	-3
	.long	-2
	.long	-2
	.long	-1
	.long	-2
	.long	-4
	.long	1
	.long	-1
	.long	1
	.long	0
	.long	-1
	.long	0
	.long	0
	.long	0
	.long	-1
	.long	-2
	.long	-2
	.long	0
	.long	-1
	.long	-2
	.long	-1
	.long	4
	.long	1
	.long	-3
	.long	-2
	.long	-2
	.long	0
	.long	0
	.long	0
	.long	-4
	.long	0
	.long	-1
	.long	0
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-2
	.long	-2
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-2
	.long	-1
	.long	1
	.long	5
	.long	-2
	.long	-2
	.long	0
	.long	-1
	.long	-1
	.long	0
	.long	-4
	.long	-3
	.long	-3
	.long	-4
	.long	-4
	.long	-2
	.long	-2
	.long	-3
	.long	-2
	.long	-2
	.long	-3
	.long	-2
	.long	-3
	.long	-1
	.long	1
	.long	-4
	.long	-3
	.long	-2
	.long	11
	.long	2
	.long	-3
	.long	-4
	.long	-3
	.long	-2
	.long	-4
	.long	-2
	.long	-2
	.long	-2
	.long	-3
	.long	-2
	.long	-1
	.long	-2
	.long	-3
	.long	2
	.long	-1
	.long	-1
	.long	-2
	.long	-1
	.long	3
	.long	-3
	.long	-2
	.long	-2
	.long	2
	.long	7
	.long	-1
	.long	-3
	.long	-2
	.long	-1
	.long	-4
	.long	0
	.long	-3
	.long	-3
	.long	-3
	.long	-1
	.long	-2
	.long	-2
	.long	-3
	.long	-3
	.long	3
	.long	1
	.long	-2
	.long	1
	.long	-1
	.long	-2
	.long	-2
	.long	0
	.long	-3
	.long	-1
	.long	4
	.long	-3
	.long	-2
	.long	-1
	.long	-4
	.long	-2
	.long	-1
	.long	3
	.long	4
	.long	-3
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	-3
	.long	-4
	.long	0
	.long	-3
	.long	-3
	.long	-2
	.long	0
	.long	-1
	.long	-4
	.long	-3
	.long	-3
	.long	4
	.long	1
	.long	-1
	.long	-4
	.long	-1
	.long	0
	.long	0
	.long	1
	.long	-3
	.long	3
	.long	4
	.long	-2
	.long	0
	.long	-3
	.long	-3
	.long	1
	.long	-1
	.long	-3
	.long	-1
	.long	0
	.long	-1
	.long	-3
	.long	-2
	.long	-2
	.long	1
	.long	4
	.long	-1
	.long	-4
	.long	0
	.long	-1
	.long	-1
	.long	-1
	.long	-2
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-2
	.long	0
	.long	0
	.long	-2
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.long	1
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-1598689907
	.long	1051772663
	.align 8
.LC6:
	.long	0
	.long	1062207488
	.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:

#define LIMIT -999

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

void runTest(int argc, char **argv);
int maximum(int a, int b, int c)
{
    int k;
    if (a <= b)
        k = b;
    else
        k = a;
    if (k <= c)
        return (c);
    else
        return (k);
}

__device__ int maximum_dev(int a, int b, int c)
{
    int k;
    if (a <= b)
        k = b;
    else
        k = a;
    if (k <= c)
        return (c);
    else
        return (k);
}

int blosum62[24][24] = {
    {4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3, -2, 0, -2, -1, 0, -4},
    {-1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1, -3, -2, -3, -1, 0, -1, -4},
    {-2, 0, 6, 1, -3, 0, 0, 0, 1, -3, -3, 0, -2, -3, -2, 1, 0, -4, -2, -3, 3, 0, -1, -4},
    {-2, -2, 1, 6, -3, 0, 2, -1, -1, -3, -4, -1, -3, -3, -1, 0, -1, -4, -3, -3, 4, 1, -1, -4},
    {0, -3, -3, -3, 9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1, -1, -2, -2, -1, -3, -3, -2, -4},
    {-1, 1, 0, 0, -3, 5, 2, -2, 0, -3, -2, 1, 0, -3, -1, 0, -1, -2, -1, -2, 0, 3, -1, -4},
    {-1, 0, 0, 2, -4, 2, 5, -2, 0, -3, -3, 1, -2, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4},
    {0, -2, 0, -1, -3, -2, -2, 6, -2, -4, -4, -2, -3, -3, -2, 0, -2, -2, -3, -3, -1, -2, -1, -4},
    {-2, 0, 1, -1, -3, 0, 0, -2, 8, -3, -3, -1, -2, -1, -2, -1, -2, -2, 2, -3, 0, 0, -1, -4},
    {-1, -3, -3, -3, -1, -3, -3, -4, -3, 4, 2, -3, 1, 0, -3, -2, -1, -3, -1, 3, -3, -3, -1, -4},
    {-1, -2, -3, -4, -1, -2, -3, -4, -3, 2, 4, -2, 2, 0, -3, -2, -1, -2, -1, 1, -4, -3, -1, -4},
    {-1, 2, 0, -1, -3, 1, 1, -2, -1, -3, -2, 5, -1, -3, -1, 0, -1, -3, -2, -2, 0, 1, -1, -4},
    {-1, -1, -2, -3, -1, 0, -2, -3, -2, 1, 2, -1, 5, 0, -2, -1, -1, -1, -1, 1, -3, -1, -1, -4},
    {-2, -3, -3, -3, -2, -3, -3, -3, -1, 0, 0, -3, 0, 6, -4, -2, -2, 1, 3, -1, -3, -3, -1, -4},
    {-1, -2, -2, -1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4, 7, -1, -1, -4, -3, -2, -2, -1, -2, -4},
    {1, -1, 1, 0, -1, 0, 0, 0, -1, -2, -2, 0, -1, -2, -1, 4, 1, -3, -2, -2, 0, 0, 0, -4},
    {0, -1, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1, 1, 5, -2, -2, 0, -1, -1, 0, -4},
    {-3, -3, -4, -4, -2, -2, -3, -2, -2, -3, -2, -3, -1, 1, -4, -3, -2, 11, 2, -3, -4, -3, -2, -4},
    {-2, -2, -2, -3, -2, -1, -2, -3, 2, -1, -1, -2, -1, 3, -3, -2, -2, 2, 7, -1, -3, -2, -1, -4},
    {0, -3, -3, -3, -1, -2, -2, -3, -3, 3, 1, -2, 1, -1, -2, -2, 0, -3, -1, 4, -3, -2, -1, -4},
    {-2, -1, 3, 4, -3, 0, 1, -1, 0, -3, -4, 0, -3, -3, -2, 0, -1, -4, -3, -3, 4, 1, -1, -4},
    {-1, 0, 0, 1, -3, 3, 4, -2, 0, -3, -3, 1, -1, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4},
    {0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, 0, 0, -2, -1, -1, -1, -1, -1, -4},
    {-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 1}};

double gettime()
{
    struct timeval t;
    gettimeofday(&t, NULL);
    return t.tv_sec + t.tv_usec * 1e-6;
}

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

    return EXIT_SUCCESS;
}

void usage(int argc, char **argv)
{
    fprintf(stderr, "Usage: %s <max_rows/max_cols> <penalty>\n", argv[0]);
    fprintf(stderr, "\t<dimension>      - x and y dimensions\n");
    fprintf(stderr, "\t<penalty>        - penalty(positive integer)\n");
    exit(1);
}

typedef int thread_idx_t;

__global__ void kernel_init_reference(int *reference, int *blosum62, int *input_itemsets, int num_rows, int num_cols)
{
    const thread_idx_t thread_idx_i = threadIdx.y + (thread_idx_t)blockIdx.y * blockDim.y;
    const thread_idx_t thread_idx_j = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;

    if (thread_idx_i < num_rows && thread_idx_j < num_cols)
        reference[thread_idx_i * num_cols + thread_idx_j] =
            blosum62
            [
                input_itemsets[thread_idx_i * num_cols]
            * 24 +
                input_itemsets[thread_idx_j]
            ];
}

__global__ void kernel_init_input_itemsets(int *input_itemsets, int num_cols, int penalty)
{
    const thread_idx_t thread_idx = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;

    if (thread_idx < num_cols)
    {
        input_itemsets[thread_idx * num_cols] = -thread_idx * penalty;
        input_itemsets[thread_idx] = -thread_idx * penalty;
    }
}

__global__ void kernel_top_left_processing(int *input_itemsets, int *reference, int num_cols, int i, int penalty) {
    __shared__ int s_input_itemsets_nw[1024];
    __shared__ int s_input_itemsets_w[1025];
    const thread_idx_t thread_idx = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;
    const thread_idx_t tid = threadIdx.x;

    const int index = (thread_idx + 1) * num_cols + (i + 1 - thread_idx);
    s_input_itemsets_nw[tid] = input_itemsets[index - 1 - num_cols] + reference[index];
    s_input_itemsets_w[tid + 1] = input_itemsets[index - 1];

    if (tid == 0)
        s_input_itemsets_w[0] = input_itemsets[index - num_cols];

    __syncthreads();

    if (thread_idx <= i)
    {
        input_itemsets[index] = maximum_dev(s_input_itemsets_nw[tid],
            s_input_itemsets_w[tid + 1] - penalty,
            s_input_itemsets_w[tid] - penalty);
    }
}

__global__ void kernel_bottom_right_processing(int *input_itemsets, int *reference, int num_cols, int i, int penalty) {
    __shared__ int s_input_itemsets_nw[1024];
    __shared__ int s_input_itemsets_n[1025];
    const thread_idx_t thread_idx = threadIdx.x + (thread_idx_t)blockIdx.x * blockDim.x;
    const thread_idx_t tid = threadIdx.x;
    const int index = (num_cols - thread_idx - 2) * num_cols + thread_idx + num_cols - i - 2;

    s_input_itemsets_nw[tid] = input_itemsets[index - 1 - num_cols] + reference[index];
    s_input_itemsets_n[tid + 1] = input_itemsets[index - num_cols];

    if (tid == 0)
        s_input_itemsets_n[0] = input_itemsets[index - 1];

    __syncthreads();

    if (thread_idx <= i) {
        input_itemsets[index] = maximum_dev(s_input_itemsets_nw[tid],
            s_input_itemsets_n[tid + 1] - penalty,
            s_input_itemsets_n[tid] - penalty);
    }
}

void runTest(int argc, char **argv)
{
    int max_rows, max_cols, penalty;
    int *input_itemsets, *reference;

    if (argc == 3)
    {
        max_cols = max_rows = atoi(argv[1]);
        penalty = atoi(argv[2]);
    }
    else
    {
        usage(argc, argv);
    }

    max_rows = max_rows + 1;
    max_cols = max_cols + 1;
    hipHostMalloc(&reference, max_rows * max_cols * sizeof(int), hipHostMallocDefault);
    input_itemsets = (int *)calloc(max_rows * max_cols, sizeof(int));

    if (!input_itemsets)
        fprintf(stderr, "error: can not allocate memory");

    // srand(time(NULL));
    srand(0);

    printf("Start Needleman-Wunsch\n");

    for (int i = 1; i < max_rows; i++)
    {
        input_itemsets[i * max_cols] = rand() % 10 + 1;
    }
    for (int j = 1; j < max_cols; j++)
    {
        input_itemsets[j] = rand() % 10 + 1;
    }

    int *reference_dev;
    int *input_itemsets_dev;
    int *blosum62_dev;

    hipStream_t reference_copy_stream;

    hipStreamCreateWithFlags(&reference_copy_stream, hipStreamNonBlocking);

    const size_t size = max_rows * max_cols * sizeof(int);

    hipMalloc(&reference_dev, size);
    hipMalloc(&input_itemsets_dev, size);
    hipMalloc(&blosum62_dev, sizeof(blosum62));

    hipMemcpy(input_itemsets_dev, input_itemsets, size, hipMemcpyHostToDevice);
    hipMemcpy(blosum62_dev, blosum62, sizeof(blosum62), hipMemcpyHostToDevice);

    const dim3 block_size(32, 32, 1);
    const size_t grid_cols = (max_cols + block_size.x - 1) / block_size.x;
    const size_t grid_rows = (max_rows + block_size.y - 1) / block_size.y;
    const dim3 grid_size(grid_cols, grid_rows, 1);

    kernel_init_reference<<< grid_size, block_size >>>(reference_dev, blosum62_dev, input_itemsets_dev, max_rows, max_cols);

    hipMemcpyAsync(reference, reference_dev, size, hipMemcpyDeviceToHost, reference_copy_stream);
    kernel_init_input_itemsets<<< ceil(max_cols / 1024.0), 1024 >>>(input_itemsets_dev, max_cols, penalty);

    printf("Processing top-left matrix\n");
    for (int i = 0; i < max_cols - 2; i++)
    {
        kernel_top_left_processing<<<ceil((i + 1) / 1024.0), 1024>>>(input_itemsets_dev, reference_dev, max_cols, i, penalty);
    }

    printf("Processing bottom-right matrix\n");
    for (int i = max_cols - 4; i >= 0; i--)
    {
        kernel_bottom_right_processing<<<ceil((i + 1) / 1024.0), 1024>>>(input_itemsets_dev, reference_dev, max_cols, i, penalty);
    }

    hipMemcpy(input_itemsets, input_itemsets_dev, size, hipMemcpyDeviceToHost);

    hipStreamDestroy(reference_copy_stream);

    hipFree(reference_dev);
    hipFree(input_itemsets_dev);
    hipFree(blosum62_dev);

#define TRACEBACK
#ifdef TRACEBACK

    FILE *fpo = fopen("result.txt", "w");
    fprintf(fpo, "print traceback value:\n");

    for (int i = max_rows - 2, j = max_rows - 2; i >= 0, j >= 0;)
    {
        int nw, n, w, traceback;
        if (i == max_rows - 2 && j == max_rows - 2)
            fprintf(fpo, "%d ", input_itemsets[i * max_cols + j]);
        if (i == 0 && j == 0)
            break;
        if (i > 0 && j > 0)
        {
            nw = input_itemsets[(i - 1) * max_cols + j - 1];
            w = input_itemsets[i * max_cols + j - 1];
            n = input_itemsets[(i - 1) * max_cols + j];
        }
        else if (i == 0)
        {
            nw = n = LIMIT;
            w = input_itemsets[i * max_cols + j - 1];
        }
        else if (j == 0)
        {
            nw = w = LIMIT;
            n = input_itemsets[(i - 1) * max_cols + j];
        }

        //traceback = maximum(nw, w, n);
        int new_nw, new_w, new_n;
        new_nw = nw + reference[i * max_cols + j];
        new_w = w - penalty;
        new_n = n - penalty;

        traceback = maximum(new_nw, new_w, new_n);
        if (traceback == new_nw)
            traceback = nw;
        if (traceback == new_w)
            traceback = w;
        if (traceback == new_n)
            traceback = n;

        fprintf(fpo, "%d ", traceback);

        if (traceback == nw)
        {
            i--;
            j--;
            continue;
        }

        else if (traceback == w)
        {
            j--;
            continue;
        }

        else if (traceback == n)
        {
            i--;
            continue;
        }
    }

    fclose(fpo);

#endif

    hipHostFree(reference);
    free(input_itemsets);
}

	.text
	.file	"needle_parallel.hip"
	.globl	_Z7maximumiii                   # -- Begin function _Z7maximumiii
	.type	_Z7maximumiii,@function
_Z7maximumiii:                          # @_Z7maximumiii
	.cfi_startproc
# %bb.0:
	movl	%esi, %eax
	cmpl	%esi, %edi
	cmovgl	%edi, %eax
	cmpl	%edx, %eax
	cmovlel	%edx, %eax
	retq
.Lfunc_end0:
	.size	_Z7maximumiii, .Lfunc_end0-_Z7maximumiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z7gettimev
.LCPI1_0:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z7gettimev
	.type	_Z7gettimev,@function
_Z7gettimev:                            # @_Z7gettimev
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -16
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	cvtsi2sdq	(%rbx), %xmm1
	cvtsi2sdq	8(%rbx), %xmm0
	mulsd	.LCPI1_0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z7gettimev, .Lfunc_end1-_Z7gettimev
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	_Z7runTestiPPc
	xorl	%eax, %eax
	popq	%rcx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	main, .Lfunc_end2-main
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z7runTestiPPc
.LCPI3_0:
	.quad	0x3f50000000000000              # double 9.765625E-4
	.text
	.globl	_Z7runTestiPPc
	.type	_Z7runTestiPPc,@function
_Z7runTestiPPc:                         # @_Z7runTestiPPc
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	cmpl	$3, %edi
	jne	.LBB3_44
# %bb.1:
	movq	8(%rbx), %rdi
	callq	atoi
	movl	%eax, %r15d
	movq	16(%rbx), %rdi
	callq	atoi
	movl	%eax, 4(%rsp)                   # 4-byte Spill
	leal	1(%r15), %ebp
	movl	%ebp, %r14d
	imull	%r14d, %r14d
	leaq	(,%r14,4), %rsi
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)                  # 8-byte Spill
	xorl	%edx, %edx
	callq	hipHostMalloc
	movl	$4, %esi
	movq	%r14, %rdi
	callq	calloc
	movq	%rax, %r13
	testq	%rax, %rax
	je	.LBB3_2
.LBB3_3:
	xorl	%edi, %edi
	callq	srand
	movl	$.Lstr, %edi
	callq	puts@PLT
	testl	%r15d, %r15d
	movq	%r13, 8(%rsp)                   # 8-byte Spill
	jle	.LBB3_9
# %bb.4:                                # %.lr.ph.preheader
	movl	%ebp, %ebx
	leaq	(,%rbx,4), %r14
	leaq	(,%rbx,4), %r12
	addq	%r13, %r12
	leaq	-1(%rbx), %r13
.LBB3_5:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	movl	%eax, (%r12)
	addq	%r14, %r12
	decq	%r13
	jne	.LBB3_5
# %bb.6:                                # %.preheader
	testl	%r15d, %r15d
	movq	8(%rsp), %r13                   # 8-byte Reload
	jle	.LBB3_9
# %bb.7:                                # %.lr.ph218.preheader
	movl	$1, %r14d
.LBB3_8:                                # %.lr.ph218
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	movl	%eax, (%r13,%r14,4)
	incq	%r14
	cmpq	%r14, %rbx
	jne	.LBB3_8
.LBB3_9:                                # %._crit_edge
	movabsq	$4294967296, %rbx               # imm = 0x100000000
	leaq	72(%rsp), %rdi
	movl	$1, %esi
	callq	hipStreamCreateWithFlags
	leaq	40(%rsp), %rdi
	movq	32(%rsp), %r14                  # 8-byte Reload
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	24(%rsp), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movl	$2304, %esi                     # imm = 0x900
	callq	hipMalloc
	movq	(%r12), %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	56(%rsp), %rax
	movq	(%rax), %rdi
	movl	$blosum62, %esi
	movl	$2304, %edx                     # imm = 0x900
	movl	$1, %ecx
	callq	hipMemcpy
	leal	32(%r15), %eax
	shrl	$5, %eax
	leaq	1(%rbx), %rdi
	imulq	%rax, %rdi
	movabsq	$137438953504, %rdx             # imm = 0x2000000020
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_11
# %bb.10:
	movq	40(%rsp), %rdi
	movq	56(%rsp), %rsi
	movq	24(%rsp), %rdx
	movl	%ebp, %ecx
	movl	%ebp, %r8d
	callq	_Z36__device_stub__kernel_init_referencePiS_S_ii
.LBB3_11:
	movq	64(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	72(%rsp), %r8
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpyAsync
	cvtsi2sd	%ebp, %xmm0
	mulsd	.LCPI3_0(%rip), %xmm0
	callq	ceil@PLT
	cvttsd2si	%xmm0, %rax
	movl	%eax, %edi
	orq	%rbx, %rdi
	leaq	1024(%rbx), %r13
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_13
# %bb.12:
	movq	24(%rsp), %rdi
	movl	%ebp, %esi
	movl	4(%rsp), %edx                   # 4-byte Reload
	callq	_Z41__device_stub__kernel_init_input_itemsetsPiii
.LBB3_13:
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	cmpl	$2, %r15d
	jl	.LBB3_23
# %bb.14:                               # %.lr.ph221.preheader
	movl	$1, %r14d
.LBB3_15:                               # %.lr.ph221
                                        # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14d, %xmm0
	mulsd	.LCPI3_0(%rip), %xmm0
	callq	ceil@PLT
	cvttsd2si	%xmm0, %rax
	movl	%eax, %edi
	orq	%rbx, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_17
# %bb.16:                               #   in Loop: Header=BB3_15 Depth=1
	leal	-1(%r14), %ecx
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rsi
	movl	%ebp, %edx
	movl	4(%rsp), %r8d                   # 4-byte Reload
	callq	_Z41__device_stub__kernel_top_left_processingPiS_iii
.LBB3_17:                               #   in Loop: Header=BB3_15 Depth=1
	incl	%r14d
	cmpl	%r14d, %r15d
	jne	.LBB3_15
# %bb.18:                               # %._crit_edge222
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	cmpl	$2, %r15d
	movq	32(%rsp), %r14                  # 8-byte Reload
	je	.LBB3_24
# %bb.19:                               # %.lr.ph225.preheader
	leal	-3(%r15), %r12d
.LBB3_20:                               # %.lr.ph225
                                        # =>This Inner Loop Header: Depth=1
	leal	1(%r12), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	.LCPI3_0(%rip), %xmm0
	callq	ceil@PLT
	cvttsd2si	%xmm0, %rax
	movl	%eax, %edi
	orq	%rbx, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_22
# %bb.21:                               #   in Loop: Header=BB3_20 Depth=1
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rsi
	movl	%ebp, %edx
	movl	%r12d, %ecx
	movl	4(%rsp), %r8d                   # 4-byte Reload
	callq	_Z45__device_stub__kernel_bottom_right_processingPiS_iii
.LBB3_22:                               #   in Loop: Header=BB3_20 Depth=1
	leal	-1(%r12), %eax
	testl	%r12d, %r12d
	movl	%eax, %r12d
	jg	.LBB3_20
	jmp	.LBB3_24
.LBB3_23:                               # %._crit_edge222.thread
	movl	$.Lstr.2, %edi
	callq	puts@PLT
.LBB3_24:                               # %._crit_edge226
	movl	%ebp, 20(%rsp)                  # 4-byte Spill
	movq	24(%rsp), %rsi
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	72(%rsp), %rdi
	callq	hipStreamDestroy
	movq	40(%rsp), %rdi
	callq	hipFree
	movq	24(%rsp), %rdi
	callq	hipFree
	movq	56(%rsp), %rdi
	callq	hipFree
	movl	$.L.str.7, %edi
	movl	$.L.str.8, %esi
	callq	fopen
	movl	$.L.str.9, %edi
	movl	$23, %esi
	movl	$1, %edx
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	%rax, %rcx
	callq	fwrite@PLT
	testl	%r15d, %r15d
	jle	.LBB3_43
# %bb.25:                               # %.lr.ph235.preheader
	leal	-1(%r15), %eax
	addl	$2, %r15d
	imull	%eax, %r15d
	movslq	%r15d, %rcx
	movq	%rcx, 80(%rsp)                  # 8-byte Spill
                                        # implicit-def: $r13d
                                        # implicit-def: $r12d
                                        # implicit-def: $r14d
	movl	%eax, %ebx
	movl	%eax, 32(%rsp)                  # 4-byte Spill
	movl	%eax, %ebp
.LBB3_26:                               # %.lr.ph235
                                        # =>This Inner Loop Header: Depth=1
	cmpl	32(%rsp), %ebp                  # 4-byte Folded Reload
	jne	.LBB3_29
# %bb.27:                               # %.lr.ph235
                                        #   in Loop: Header=BB3_26 Depth=1
	cmpl	32(%rsp), %ebx                  # 4-byte Folded Reload
	jne	.LBB3_29
# %bb.28:                               #   in Loop: Header=BB3_26 Depth=1
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	80(%rsp), %rcx                  # 8-byte Reload
	movl	(%rax,%rcx,4), %edx
	movl	$.L.str.10, %esi
	movq	48(%rsp), %rdi                  # 8-byte Reload
	xorl	%eax, %eax
	callq	fprintf
.LBB3_29:                               #   in Loop: Header=BB3_26 Depth=1
	movl	%ebx, %eax
	orl	%ebp, %eax
	je	.LBB3_43
# %bb.30:                               #   in Loop: Header=BB3_26 Depth=1
	testl	%ebp, %ebp
	jle	.LBB3_33
# %bb.31:                               #   in Loop: Header=BB3_26 Depth=1
	testl	%ebx, %ebx
	je	.LBB3_33
# %bb.32:                               #   in Loop: Header=BB3_26 Depth=1
	leal	-1(%rbp), %eax
	movl	20(%rsp), %edx                  # 4-byte Reload
	imull	%edx, %eax
	addl	%ebx, %eax
	cltq
	movq	8(%rsp), %rcx                   # 8-byte Reload
	movl	-4(%rcx,%rax,4), %r14d
	movl	(%rcx,%rax,4), %r12d
	movl	%ebp, %eax
	imull	%edx, %eax
	addl	%ebx, %eax
	cltq
	movl	-4(%rcx,%rax,4), %r13d
	jmp	.LBB3_37
.LBB3_33:                               #   in Loop: Header=BB3_26 Depth=1
	testl	%ebp, %ebp
	je	.LBB3_34
# %bb.35:                               #   in Loop: Header=BB3_26 Depth=1
	testl	%ebx, %ebx
	movl	20(%rsp), %edx                  # 4-byte Reload
	jne	.LBB3_37
# %bb.36:                               #   in Loop: Header=BB3_26 Depth=1
	leal	-1(%rbp), %eax
	imull	%edx, %eax
	cltq
	movq	8(%rsp), %rcx                   # 8-byte Reload
	movl	(%rcx,%rax,4), %r12d
	movl	$-999, %r14d                    # imm = 0xFC19
	movl	$-999, %r13d                    # imm = 0xFC19
	jmp	.LBB3_37
.LBB3_34:                               #   in Loop: Header=BB3_26 Depth=1
	movl	%ebx, %eax
	movq	8(%rsp), %rcx                   # 8-byte Reload
	movl	-4(%rcx,%rax,4), %r13d
	movl	$-999, %r14d                    # imm = 0xFC19
	movl	$-999, %r12d                    # imm = 0xFC19
	movl	20(%rsp), %edx                  # 4-byte Reload
.LBB3_37:                               #   in Loop: Header=BB3_26 Depth=1
	movq	64(%rsp), %rax
	movl	%ebp, %ecx
	imull	%edx, %ecx
	addl	%ebx, %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %eax
	addl	%r14d, %eax
	movl	%r13d, %ecx
	movl	4(%rsp), %esi                   # 4-byte Reload
	subl	%esi, %ecx
	movl	%r12d, %edx
	subl	%esi, %edx
	cmpl	%ecx, %eax
	movl	%ecx, %r15d
	cmovgl	%eax, %r15d
	cmpl	%edx, %r15d
	cmovlel	%edx, %r15d
	cmpl	%eax, %r15d
	cmovel	%r14d, %r15d
	cmpl	%ecx, %r15d
	cmovel	%r13d, %r15d
	cmpl	%edx, %r15d
	cmovel	%r12d, %r15d
	movl	$.L.str.10, %esi
	movq	48(%rsp), %rdi                  # 8-byte Reload
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	fprintf
	cmpl	%r14d, %r15d
	jne	.LBB3_39
# %bb.38:                               #   in Loop: Header=BB3_26 Depth=1
	decl	%ebp
	jmp	.LBB3_40
.LBB3_39:                               #   in Loop: Header=BB3_26 Depth=1
	cmpl	%r13d, %r15d
	jne	.LBB3_41
.LBB3_40:                               #   in Loop: Header=BB3_26 Depth=1
	decl	%ebx
	jmp	.LBB3_42
.LBB3_41:                               #   in Loop: Header=BB3_26 Depth=1
	xorl	%eax, %eax
	cmpl	%r12d, %r15d
	sete	%al
	subl	%eax, %ebp
.LBB3_42:                               # %select.unfold
                                        #   in Loop: Header=BB3_26 Depth=1
	testl	%ebx, %ebx
	jns	.LBB3_26
.LBB3_43:                               # %.thread
	movq	48(%rsp), %rdi                  # 8-byte Reload
	callq	fclose
	movq	64(%rsp), %rdi
	callq	hipHostFree
	movq	8(%rsp), %rdi                   # 8-byte Reload
	callq	free
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB3_2:
	.cfi_def_cfa_offset 144
	movq	stderr(%rip), %rcx
	movl	$.L.str.3, %edi
	movl	$30, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	jmp	.LBB3_3
.LBB3_44:
	movq	%rbx, %rsi
	callq	_Z5usageiPPc
.Lfunc_end3:
	.size	_Z7runTestiPPc, .Lfunc_end3-_Z7runTestiPPc
	.cfi_endproc
                                        # -- End function
	.globl	_Z5usageiPPc                    # -- Begin function _Z5usageiPPc
	.type	_Z5usageiPPc,@function
_Z5usageiPPc:                           # @_Z5usageiPPc
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	movq	(%rsi), %rdx
	movl	$.L.str, %esi
	xorl	%eax, %eax
	callq	fprintf
	movq	stderr(%rip), %rcx
	movl	$.L.str.1, %edi
	movl	$39, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movq	stderr(%rip), %rcx
	movl	$.L.str.2, %edi
	movl	$46, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movl	$1, %edi
	callq	exit
.Lfunc_end4:
	.size	_Z5usageiPPc, .Lfunc_end4-_Z5usageiPPc
	.cfi_endproc
                                        # -- End function
	.globl	_Z36__device_stub__kernel_init_referencePiS_S_ii # -- Begin function _Z36__device_stub__kernel_init_referencePiS_S_ii
	.type	_Z36__device_stub__kernel_init_referencePiS_S_ii,@function
_Z36__device_stub__kernel_init_referencePiS_S_ii: # @_Z36__device_stub__kernel_init_referencePiS_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	$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	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	4(%rsp), %rdx
	movl	%ecx, (%rdx)
	movq	%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	16(%rsp), %r12
	leaq	8(%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	$_Z21kernel_init_referencePiS_S_ii, %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_end5:
	.size	_Z36__device_stub__kernel_init_referencePiS_S_ii, .Lfunc_end5-_Z36__device_stub__kernel_init_referencePiS_S_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z41__device_stub__kernel_init_input_itemsetsPiii # -- Begin function _Z41__device_stub__kernel_init_input_itemsetsPiii
	.type	_Z41__device_stub__kernel_init_input_itemsetsPiii,@function
_Z41__device_stub__kernel_init_input_itemsetsPiii: # @_Z41__device_stub__kernel_init_input_itemsetsPiii
	.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	$96, %rsp
	.cfi_def_cfa_offset 144
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	4(%rsp), %rcx
	movl	%esi, (%rcx)
	movq	%rsp, %rsi
	movl	%edx, (%rsi)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z26kernel_init_input_itemsetsPiii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$112, %rsp
	.cfi_adjust_cfa_offset -112
	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_end6:
	.size	_Z41__device_stub__kernel_init_input_itemsetsPiii, .Lfunc_end6-_Z41__device_stub__kernel_init_input_itemsetsPiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z41__device_stub__kernel_top_left_processingPiS_iii # -- Begin function _Z41__device_stub__kernel_top_left_processingPiS_iii
	.type	_Z41__device_stub__kernel_top_left_processingPiS_iii,@function
_Z41__device_stub__kernel_top_left_processingPiS_iii: # @_Z41__device_stub__kernel_top_left_processingPiS_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	$_Z26kernel_top_left_processingPiS_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_end7:
	.size	_Z41__device_stub__kernel_top_left_processingPiS_iii, .Lfunc_end7-_Z41__device_stub__kernel_top_left_processingPiS_iii
	.cfi_endproc
                                        # -- End function
	.globl	_Z45__device_stub__kernel_bottom_right_processingPiS_iii # -- Begin function _Z45__device_stub__kernel_bottom_right_processingPiS_iii
	.type	_Z45__device_stub__kernel_bottom_right_processingPiS_iii,@function
_Z45__device_stub__kernel_bottom_right_processingPiS_iii: # @_Z45__device_stub__kernel_bottom_right_processingPiS_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	$_Z30kernel_bottom_right_processingPiS_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_end8:
	.size	_Z45__device_stub__kernel_bottom_right_processingPiS_iii, .Lfunc_end8-_Z45__device_stub__kernel_bottom_right_processingPiS_iii
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB9_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB9_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z21kernel_init_referencePiS_S_ii, %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	$_Z26kernel_init_input_itemsetsPiii, %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	$_Z26kernel_top_left_processingPiS_iii, %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	$_Z30kernel_bottom_right_processingPiS_iii, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end9:
	.size	__hip_module_ctor, .Lfunc_end9-__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	.LBB10_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
.LBB10_2:
	retq
.Lfunc_end10:
	.size	__hip_module_dtor, .Lfunc_end10-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	blosum62,@object                # @blosum62
	.data
	.globl	blosum62
	.p2align	4, 0x0
blosum62:
	.long	4                               # 0x4
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	5                               # 0x5
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	2                               # 0x2
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	6                               # 0x6
	.long	1                               # 0x1
	.long	4294967293                      # 0xfffffffd
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	3                               # 0x3
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	6                               # 0x6
	.long	4294967293                      # 0xfffffffd
	.long	0                               # 0x0
	.long	2                               # 0x2
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4                               # 0x4
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	9                               # 0x9
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	5                               # 0x5
	.long	2                               # 0x2
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	3                               # 0x3
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	2                               # 0x2
	.long	4294967292                      # 0xfffffffc
	.long	2                               # 0x2
	.long	5                               # 0x5
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	1                               # 0x1
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	4                               # 0x4
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	6                               # 0x6
	.long	4294967294                      # 0xfffffffe
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	8                               # 0x8
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	2                               # 0x2
	.long	4294967293                      # 0xfffffffd
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4                               # 0x4
	.long	2                               # 0x2
	.long	4294967293                      # 0xfffffffd
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	3                               # 0x3
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	2                               # 0x2
	.long	4                               # 0x4
	.long	4294967294                      # 0xfffffffe
	.long	2                               # 0x2
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	2                               # 0x2
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	1                               # 0x1
	.long	1                               # 0x1
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	5                               # 0x5
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	2                               # 0x2
	.long	4294967295                      # 0xffffffff
	.long	5                               # 0x5
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	0                               # 0x0
	.long	6                               # 0x6
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	3                               # 0x3
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967292                      # 0xfffffffc
	.long	7                               # 0x7
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967292                      # 0xfffffffc
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4                               # 0x4
	.long	1                               # 0x1
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	4294967292                      # 0xfffffffc
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	5                               # 0x5
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	11                              # 0xb
	.long	2                               # 0x2
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	2                               # 0x2
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	3                               # 0x3
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	2                               # 0x2
	.long	7                               # 0x7
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	3                               # 0x3
	.long	1                               # 0x1
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	4                               # 0x4
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	3                               # 0x3
	.long	4                               # 0x4
	.long	4294967293                      # 0xfffffffd
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967292                      # 0xfffffffc
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	4                               # 0x4
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	4294967293                      # 0xfffffffd
	.long	3                               # 0x3
	.long	4                               # 0x4
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	4294967293                      # 0xfffffffd
	.long	4294967293                      # 0xfffffffd
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967293                      # 0xfffffffd
	.long	4294967294                      # 0xfffffffe
	.long	4294967294                      # 0xfffffffe
	.long	1                               # 0x1
	.long	4                               # 0x4
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967295                      # 0xffffffff
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	4294967292                      # 0xfffffffc
	.long	1                               # 0x1
	.size	blosum62, 2304

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Usage: %s <max_rows/max_cols> <penalty>\n"
	.size	.L.str, 41

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"\t<dimension>      - x and y dimensions\n"
	.size	.L.str.1, 40

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"\t<penalty>        - penalty(positive integer)\n"
	.size	.L.str.2, 47

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

	.type	_Z26kernel_init_input_itemsetsPiii,@object # @_Z26kernel_init_input_itemsetsPiii
	.globl	_Z26kernel_init_input_itemsetsPiii
	.p2align	3, 0x0
_Z26kernel_init_input_itemsetsPiii:
	.quad	_Z41__device_stub__kernel_init_input_itemsetsPiii
	.size	_Z26kernel_init_input_itemsetsPiii, 8

	.type	_Z26kernel_top_left_processingPiS_iii,@object # @_Z26kernel_top_left_processingPiS_iii
	.globl	_Z26kernel_top_left_processingPiS_iii
	.p2align	3, 0x0
_Z26kernel_top_left_processingPiS_iii:
	.quad	_Z41__device_stub__kernel_top_left_processingPiS_iii
	.size	_Z26kernel_top_left_processingPiS_iii, 8

	.type	_Z30kernel_bottom_right_processingPiS_iii,@object # @_Z30kernel_bottom_right_processingPiS_iii
	.globl	_Z30kernel_bottom_right_processingPiS_iii
	.p2align	3, 0x0
_Z30kernel_bottom_right_processingPiS_iii:
	.quad	_Z45__device_stub__kernel_bottom_right_processingPiS_iii
	.size	_Z30kernel_bottom_right_processingPiS_iii, 8

	.type	.L.str.3,@object                # @.str.3
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.3:
	.asciz	"error: can not allocate memory"
	.size	.L.str.3, 31

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

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

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"print traceback value:\n"
	.size	.L.str.9, 24

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"%d "
	.size	.L.str.10, 4

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z21kernel_init_referencePiS_S_ii"
	.size	.L__unnamed_1, 34

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z26kernel_init_input_itemsetsPiii"
	.size	.L__unnamed_2, 35

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z26kernel_top_left_processingPiS_iii"
	.size	.L__unnamed_3, 38

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z30kernel_bottom_right_processingPiS_iii"
	.size	.L__unnamed_4, 42

	.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	"Start Needleman-Wunsch"
	.size	.Lstr, 23

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"Processing top-left matrix"
	.size	.Lstr.1, 27

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"Processing bottom-right matrix"
	.size	.Lstr.2, 31

	.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 _Z36__device_stub__kernel_init_referencePiS_S_ii
	.addrsig_sym _Z41__device_stub__kernel_init_input_itemsetsPiii
	.addrsig_sym _Z41__device_stub__kernel_top_left_processingPiS_iii
	.addrsig_sym _Z45__device_stub__kernel_bottom_right_processingPiS_iii
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym blosum62
	.addrsig_sym _Z21kernel_init_referencePiS_S_ii
	.addrsig_sym _Z26kernel_init_input_itemsetsPiii
	.addrsig_sym _Z26kernel_top_left_processingPiS_iii
	.addrsig_sym _Z30kernel_bottom_right_processingPiS_iii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z21kernel_init_referencePiS_S_ii ; -- Begin function _Z21kernel_init_referencePiS_S_ii
	.globl	_Z21kernel_init_referencePiS_S_ii
	.p2align	8
	.type	_Z21kernel_init_referencePiS_S_ii,@function
_Z21kernel_init_referencePiS_S_ii:      ; @_Z21kernel_init_referencePiS_S_ii
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x2c
	s_load_b64 s[2:3], s[0:1], 0x18
	v_bfe_u32 v1, v0, 10, 10
	v_and_b32_e32 v4, 0x3ff, v0
	s_waitcnt lgkmcnt(0)
	s_lshr_b32 s5, s4, 16
	s_and_b32 s4, s4, 0xffff
	v_mad_u64_u32 v[2:3], null, s15, s5, v[1:2]
	v_mad_u64_u32 v[0:1], null, s14, s4, v[4:5]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_gt_i32_e32 vcc_lo, s2, v2
	v_cmp_gt_i32_e64 s2, s3, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, vcc_lo, s2
	s_and_saveexec_b32 s4, s2
	s_cbranch_execz .LBB0_2
; %bb.1:
	s_load_b64 s[4:5], s[0:1], 0x10
	v_mul_lo_u32 v2, v2, s3
	v_ashrrev_i32_e32 v1, 31, v0
	s_load_b128 s[0:3], s[0:1], 0x0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[5:6], 2, v[0:1]
	v_ashrrev_i32_e32 v3, 31, v2
	v_add_nc_u32_e32 v0, v2, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[3:4], 2, v[2:3]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v3, vcc_lo, s4, v3
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v4, vcc_lo
	v_add_co_u32 v5, vcc_lo, s4, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s5, v6, vcc_lo
	s_clause 0x1
	global_load_b32 v7, v[3:4], off
	global_load_b32 v1, v[5:6], off
	s_waitcnt vmcnt(0)
	v_mad_u64_u32 v[3:4], null, v7, 24, v[1:2]
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_ashrrev_i32_e32 v4, 31, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	v_add_co_u32 v3, vcc_lo, s2, v3
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s3, v4, vcc_lo
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	global_load_b32 v3, v[3:4], off
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v3, off
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z21kernel_init_referencePiS_S_ii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 8
		.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	_Z21kernel_init_referencePiS_S_ii, .Lfunc_end0-_Z21kernel_init_referencePiS_S_ii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 316
; NumSgprs: 18
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z26kernel_init_input_itemsetsPiii ; -- Begin function _Z26kernel_init_input_itemsetsPiii
	.globl	_Z26kernel_init_input_itemsetsPiii
	.p2align	8
	.type	_Z26kernel_init_input_itemsetsPiii,@function
_Z26kernel_init_input_itemsetsPiii:     ; @_Z26kernel_init_input_itemsetsPiii
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x1c
	s_load_b64 s[2:3], s[0:1], 0x8
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	s_mov_b32 s4, exec_lo
	v_cmpx_gt_i32_e64 s2, v1
	s_cbranch_execz .LBB1_2
; %bb.1:
	s_load_b64 s[0:1], s[0:1], 0x0
	v_mul_lo_u32 v3, v1, s2
	v_ashrrev_i32_e32 v2, 31, v1
	v_mul_lo_u32 v5, v1, s3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	v_ashrrev_i32_e32 v4, 31, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v5, 0, v5
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s0, v3
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v4, vcc_lo
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	s_clause 0x1
	global_store_b32 v[2:3], v5, off
	global_store_b32 v[0:1], v5, off
.LBB1_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z26kernel_init_input_itemsetsPiii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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_end1:
	.size	_Z26kernel_init_input_itemsetsPiii, .Lfunc_end1-_Z26kernel_init_input_itemsetsPiii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 184
; 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	_Z26kernel_top_left_processingPiS_iii ; -- Begin function _Z26kernel_top_left_processingPiS_iii
	.globl	_Z26kernel_top_left_processingPiS_iii
	.p2align	8
	.type	_Z26kernel_top_left_processingPiS_iii,@function
_Z26kernel_top_left_processingPiS_iii:  ; @_Z26kernel_top_left_processingPiS_iii
; %bb.0:
	s_clause 0x1
	s_load_b32 s8, s[0:1], 0x2c
	s_load_b256 s[0:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s7, s8, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s7, v[0:1]
	s_ashr_i32 s7, s4, 31
	v_mad_u64_u32 v[2:3], null, s4, v1, s[4:5]
	v_sub_nc_u32_e32 v3, s5, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v4, v3, v2, 1
	v_ashrrev_i32_e32 v5, 31, v4
	v_sub_co_u32 v2, vcc_lo, v4, s4
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_co_ci_u32_e32 v3, vcc_lo, s7, v5, vcc_lo
	v_lshlrev_b64 v[5:6], 2, v[4:5]
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v7, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v8, vcc_lo, s3, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v2, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v3, vcc_lo
	s_mov_b32 s2, exec_lo
	global_load_b32 v7, v[7:8], off
	global_load_b32 v8, v[2:3], off offset:-4
	v_add_co_u32 v2, vcc_lo, s0, v5
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v6, vcc_lo
	v_lshlrev_b32_e32 v5, 2, v0
	global_load_b32 v6, v[2:3], off offset:-4
	s_waitcnt vmcnt(1)
	v_add_nc_u32_e32 v7, v7, v8
	ds_store_b32 v5, v7 offset:4112
	s_waitcnt vmcnt(0)
	ds_store_b32 v5, v6 offset:4
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB2_2
; %bb.1:
	v_subrev_nc_u32_e32 v6, s4, v4
	v_mov_b32_e32 v4, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v7, 31, v6
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v6, vcc_lo, s0, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s1, v7, vcc_lo
	global_load_b32 v0, v[6:7], off
	s_waitcnt vmcnt(0)
	ds_store_b32 v4, v0
.LBB2_2:
	s_or_b32 exec_lo, exec_lo, s2
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_mov_b32 s0, exec_lo
	v_cmpx_ge_i32_e64 s5, v1
	s_cbranch_execz .LBB2_4
; %bb.3:
	ds_load_2addr_b32 v[0:1], v5 offset1:1
	v_add_nc_u32_e32 v4, 0x1010, v5
	ds_load_b32 v4, v4
	s_waitcnt lgkmcnt(1)
	v_subrev_nc_u32_e32 v1, s6, v1
	v_subrev_nc_u32_e32 v0, s6, v0
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_max3_i32 v0, v4, v1, v0
	global_store_b32 v[2:3], v0, off
.LBB2_4:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z26kernel_top_left_processingPiS_iii
		.amdhsa_group_segment_fixed_size 8208
		.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 9
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z26kernel_top_left_processingPiS_iii, .Lfunc_end2-_Z26kernel_top_left_processingPiS_iii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 388
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 8208 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z30kernel_bottom_right_processingPiS_iii ; -- Begin function _Z30kernel_bottom_right_processingPiS_iii
	.globl	_Z30kernel_bottom_right_processingPiS_iii
	.p2align	8
	.type	_Z30kernel_bottom_right_processingPiS_iii,@function
_Z30kernel_bottom_right_processingPiS_iii: ; @_Z30kernel_bottom_right_processingPiS_iii
; %bb.0:
	s_clause 0x1
	s_load_b32 s8, s[0:1], 0x2c
	s_load_b256 s[0:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s7, s8, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s7, v[0:1]
	s_sub_i32 s7, s4, s5
	v_sub_nc_u32_e32 v2, s4, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v2, -2, v2
	v_mul_lo_u32 v2, v2, s4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add3_u32 v2, s7, v1, v2
	s_ashr_i32 s7, s4, 31
	v_ashrrev_i32_e32 v3, 31, v2
	v_sub_co_u32 v4, vcc_lo, v2, s4
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_co_ci_u32_e32 v5, vcc_lo, s7, v3, vcc_lo
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_lshlrev_b64 v[4:5], 2, v[4:5]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v6, vcc_lo, s2, v2
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v3, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v4, vcc_lo, s0, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s1, v5, vcc_lo
	s_mov_b32 s2, exec_lo
	global_load_b32 v7, v[6:7], off offset:-8
	global_load_b64 v[5:6], v[4:5], off offset:-12
	v_lshlrev_b32_e32 v4, 2, v0
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v5, v7, v5
	ds_store_b32 v4, v5 offset:4112
	ds_store_b32 v4, v6 offset:4
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB3_2
; %bb.1:
	v_add_co_u32 v5, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v6, vcc_lo, s1, v3, vcc_lo
	global_load_b32 v0, v[5:6], off offset:-12
	v_mov_b32_e32 v5, 0
	s_waitcnt vmcnt(0)
	ds_store_b32 v5, v0
.LBB3_2:
	s_or_b32 exec_lo, exec_lo, s2
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_mov_b32 s2, exec_lo
	v_cmpx_ge_i32_e64 s5, v1
	s_cbranch_execz .LBB3_4
; %bb.3:
	ds_load_2addr_b32 v[0:1], v4 offset1:1
	v_add_nc_u32_e32 v4, 0x1010, v4
	ds_load_b32 v4, v4
	s_waitcnt lgkmcnt(1)
	v_subrev_nc_u32_e32 v1, s6, v1
	v_subrev_nc_u32_e32 v0, s6, v0
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_max3_i32 v4, v4, v1, v0
	v_add_co_u32 v0, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v3, vcc_lo
	global_store_b32 v[0:1], v4, off offset:-8
.LBB3_4:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z30kernel_bottom_right_processingPiS_iii
		.amdhsa_group_segment_fixed_size 8208
		.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 8
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end3:
	.size	_Z30kernel_bottom_right_processingPiS_iii, .Lfunc_end3-_Z30kernel_bottom_right_processingPiS_iii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 364
; NumSgprs: 18
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 8208 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     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:           _Z21kernel_init_referencePiS_S_ii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z21kernel_init_referencePiS_S_ii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     8
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z26kernel_init_input_itemsetsPiii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z26kernel_init_input_itemsetsPiii.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
      - .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: 8208
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z26kernel_top_left_processingPiS_iii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z26kernel_top_left_processingPiS_iii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .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: 8208
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z30kernel_bottom_right_processingPiS_iii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z30kernel_bottom_right_processingPiS_iii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     8
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
