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

#define NUMBER_OF_THREADS 100
#define NUMBER_OF_QUERY_IPS 100
#define NUMBER_OF_DATABASE_IPS 1000000

/**
 * This macro checks return value of the CUDA runtime call and exits
 * the application if the call failed.
 */
#define CUDA_CHECK_RETURN(value) {											\
	cudaError_t _m_cudaStat = value;										\
	if (_m_cudaStat != cudaSuccess) {										\
		fprintf(stderr, "Error %s at line %d in file %s\n",					\
				cudaGetErrorString(_m_cudaStat), __LINE__, __FILE__);		\
		exit(1);															\
	} }

__global__ void bruteForceMatcher(float *x1, float *y1, float *strength1, float *trace1, bool *sign1, float *scale1, float *descriptors1,
		float *x2, float *y2, float *strength2, float *trace2, bool *sign2, float *scale2, float *descriptors2, int *anzahlMatches) {

    float distance, delta;

    int blockSizeQuery = NUMBER_OF_QUERY_IPS / NUMBER_OF_THREADS;
    int blockSizeDB = NUMBER_OF_DATABASE_IPS / NUMBER_OF_THREADS;

    int startIndexQuery = blockIdx.x * blockSizeQuery;
    int endIndexQuery = blockIdx.x * blockSizeQuery + blockSizeQuery;

    int startIndexDB = blockIdx.x * blockSizeDB;
    int endIndexDB =  blockIdx.x * blockSizeDB + blockSizeDB;

	for(int i = startIndexQuery; i < endIndexQuery; i++) {
	    float bestDistance = 999999999.0f;
	    float secondBestDistance = 999999999.0f;
	    for (int a = startIndexDB; a < endIndexDB; a++) {
	        if (sign1[i] == sign2[a]){
	            distance = 0;
	            for (int b = 0; b < 64; b++) {
	                delta = descriptors1[b + (i * 64)] - descriptors2[b + (a * 64)];
	                distance += (delta * delta);
	            }
	            if(distance < bestDistance){
	                secondBestDistance = bestDistance;
	                bestDistance = distance;
	            }
	        }
	    }

	    // Ermittle die beste und die 2. beste distanz
	    if (bestDistance < 0.6f * secondBestDistance) {
	    	anzahlMatches[blockIdx.x]++;
	    }
	}
}

//__global__ void add(int *a, int *b, int *c, int **d) {
//	c[blockIdx.x] = a[blockIdx.x] + b[blockIdx.x];
//}

void random_ints(int* a, int anzahl){
   int i;
   for (i = 0; i < anzahl; ++i){
	  //a[i] = rand();
	  a[i] = 0;
   }
}

void random_floats(float* a, int anzahl){
   int i;
   for (i = 0; i < anzahl; ++i){
	  //a[i] = rand();
	  a[i] = 0.0005f;
   }
}

void random_bools(bool* a, int anzahl){
   int i;
   for (i = 0; i < anzahl; ++i){
	  a[i] = true;
   }
}

/**
 * Host function that prepares data array and passes it to the CUDA kernel.
 */
int main(void) {

	printf("Start ...\n");

	// Host variables
	float *x1, *y1, *strength1, *trace1, *scale1, *descriptors1, *x2, *y2, *strength2, *trace2, *scale2, *descriptors2;
	bool *sign1, *sign2;
	int *anzahlMatches;

	// Device variables
	float *d_x1, *d_y1, *d_strength1, *d_trace1, *d_scale1, *d_descriptors1, *d_x2, *d_y2, *d_strength2, *d_trace2, *d_scale2, *d_descriptors2;
	bool *d_sign1, *d_sign2;
	int *d_anzahlMatches;

	// Allocate cuda space
	printf("Start allocating space for cuda...\n");
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_x1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_y1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_strength1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_trace1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_scale1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_descriptors1, NUMBER_OF_QUERY_IPS * sizeof(float) * 64));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_sign1, NUMBER_OF_QUERY_IPS * sizeof(bool)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_x2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_y2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_strength2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_trace2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_scale2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_descriptors2, NUMBER_OF_DATABASE_IPS * sizeof(float) * 64));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_sign2, NUMBER_OF_DATABASE_IPS * sizeof(bool)));
	CUDA_CHECK_RETURN(cudaMalloc((void** ) &d_anzahlMatches, NUMBER_OF_THREADS * sizeof(int)));
	printf("Allocating space for cuda finished!\n");

	// Create space for the query-data
	printf("Start allocating space for host...\n");
	x1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(x1, NUMBER_OF_QUERY_IPS);
	y1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(y1, NUMBER_OF_QUERY_IPS);
	strength1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(strength1, NUMBER_OF_QUERY_IPS);
	trace1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(trace1, NUMBER_OF_QUERY_IPS);
	scale1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(scale1, NUMBER_OF_QUERY_IPS);
	descriptors1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float) * 64); random_floats(descriptors1, NUMBER_OF_QUERY_IPS * 64);
	sign1 = (bool *)malloc(NUMBER_OF_QUERY_IPS * sizeof(bool)); random_bools(sign1, NUMBER_OF_QUERY_IPS);

	x2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(x2, NUMBER_OF_DATABASE_IPS);
	y2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(y2, NUMBER_OF_DATABASE_IPS);
	strength2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(strength2, NUMBER_OF_DATABASE_IPS);
	trace2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(trace2, NUMBER_OF_DATABASE_IPS);
	scale2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(scale2, NUMBER_OF_DATABASE_IPS);
	descriptors2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float) * 64); random_floats(descriptors2, NUMBER_OF_DATABASE_IPS * 64);
	sign2 = (bool *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(bool)); random_bools(sign2, NUMBER_OF_DATABASE_IPS);
	anzahlMatches = (int *)malloc(NUMBER_OF_THREADS * sizeof(int));

	// Zero-fill the current match count
	for(int i = 0; i < NUMBER_OF_THREADS; i++){
		anzahlMatches[i] = 0;
	}

	printf("Start allocating space for host finished!\n");

	// Copy data to device
	printf("Start copying stuff to the gpu...\n");
	CUDA_CHECK_RETURN(cudaMemcpy(d_x1, x1, NUMBER_OF_QUERY_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_y1, y1, NUMBER_OF_QUERY_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_strength1, strength1, NUMBER_OF_QUERY_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_trace1, trace1, NUMBER_OF_QUERY_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_scale1, scale1, NUMBER_OF_QUERY_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_descriptors1, descriptors1, NUMBER_OF_QUERY_IPS * sizeof(float) * 64, cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_sign1, sign1, NUMBER_OF_QUERY_IPS * sizeof(bool), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_x2, x2, NUMBER_OF_DATABASE_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_y2, y2, NUMBER_OF_DATABASE_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_strength2, strength2, NUMBER_OF_DATABASE_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_trace2, trace2, NUMBER_OF_DATABASE_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_scale2, scale2, NUMBER_OF_DATABASE_IPS * sizeof(float), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_descriptors2, descriptors2, NUMBER_OF_DATABASE_IPS * sizeof(float) * 64, cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_sign2, sign2, NUMBER_OF_DATABASE_IPS * sizeof(bool), cudaMemcpyHostToDevice));
	CUDA_CHECK_RETURN(cudaMemcpy(d_anzahlMatches, anzahlMatches, NUMBER_OF_THREADS * sizeof(int), cudaMemcpyHostToDevice));
	printf("Copying stuff to the gpu finished!\n");

	printf("Start image-recognition ...\n");

	bruteForceMatcher<<<NUMBER_OF_THREADS, 1>>>(d_x1, d_y1, d_strength1, d_trace1, d_sign1, d_scale1, d_descriptors1,
								d_x2, d_y2, d_strength2, d_trace2, d_sign2, d_scale2, d_descriptors2, d_anzahlMatches);

	printf("Image-recognition ready!");

	CUDA_CHECK_RETURN(cudaThreadSynchronize());	// Wait for the GPU launched work to complete
	CUDA_CHECK_RETURN(cudaGetLastError());

	CUDA_CHECK_RETURN(cudaMemcpy(anzahlMatches, d_anzahlMatches, NUMBER_OF_THREADS * sizeof(int), cudaMemcpyDeviceToHost));

	for(int i = 0; i < NUMBER_OF_THREADS; i++){
		printf("Ergebnis: %d\n", anzahlMatches[i]);
	}

	CUDA_CHECK_RETURN(cudaFree(d_x1));
	CUDA_CHECK_RETURN(cudaFree(d_y1));
	CUDA_CHECK_RETURN(cudaFree(d_strength1));
	CUDA_CHECK_RETURN(cudaFree(d_trace1));
	CUDA_CHECK_RETURN(cudaFree(d_scale1));
	CUDA_CHECK_RETURN(cudaFree(d_descriptors1));
	CUDA_CHECK_RETURN(cudaFree(d_sign1));
	CUDA_CHECK_RETURN(cudaFree(d_x2));
	CUDA_CHECK_RETURN(cudaFree(d_y2));
	CUDA_CHECK_RETURN(cudaFree(d_strength2));
	CUDA_CHECK_RETURN(cudaFree(d_trace2));
	CUDA_CHECK_RETURN(cudaFree(d_scale2));
	CUDA_CHECK_RETURN(cudaFree(d_descriptors2));
	CUDA_CHECK_RETURN(cudaFree(d_sign2));

	CUDA_CHECK_RETURN(cudaDeviceReset());
	printf("End!\n");
	return 0;
}



	.file	"tmpxft_002ff073_00000000-6_bilderkennung.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2033:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2033:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z11random_intsPii
	.type	_Z11random_intsPii, @function
_Z11random_intsPii:
.LFB2027:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L3:
	cmpl	%eax, %esi
	jle	.L6
	xorl	%edx, %edx
	movl	%edx, (%rdi,%rax,4)
	incq	%rax
	jmp	.L3
.L6:
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z11random_intsPii, .-_Z11random_intsPii
	.globl	_Z13random_floatsPfi
	.type	_Z13random_floatsPfi, @function
_Z13random_floatsPfi:
.LFB2028:
	.cfi_startproc
	endbr64
	movss	.LC0(%rip), %xmm0
	xorl	%eax, %eax
.L8:
	cmpl	%eax, %esi
	jle	.L10
	movss	%xmm0, (%rdi,%rax,4)
	incq	%rax
	jmp	.L8
.L10:
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z13random_floatsPfi, .-_Z13random_floatsPfi
	.globl	_Z12random_boolsPbi
	.type	_Z12random_boolsPbi, @function
_Z12random_boolsPbi:
.LFB2029:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L12:
	cmpl	%eax, %esi
	jle	.L14
	movb	$1, (%rdi,%rax)
	incq	%rax
	jmp	.L12
.L14:
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z12random_boolsPbi, .-_Z12random_boolsPbi
	.globl	_Z66__device_stub__Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_PiPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.type	_Z66__device_stub__Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_PiPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, @function
_Z66__device_stub__Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_PiPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi:
.LFB2055:
	.cfi_startproc
	endbr64
	subq	$328, %rsp
	.cfi_def_cfa_offset 336
	movq	336(%rsp), %rax
	movq	%rdi, 120(%rsp)
	leaq	144(%rsp), %rdi
	movq	%rsi, 112(%rsp)
	leaq	156(%rsp), %rsi
	movq	%rax, 72(%rsp)
	movq	344(%rsp), %rax
	movq	%rdx, 104(%rsp)
	leaq	128(%rsp), %rdx
	movq	%rax, 64(%rsp)
	movq	352(%rsp), %rax
	movq	%rcx, 96(%rsp)
	leaq	136(%rsp), %rcx
	movq	%rax, 56(%rsp)
	movq	360(%rsp), %rax
	movq	%r8, 88(%rsp)
	movq	%rax, 48(%rsp)
	movq	368(%rsp), %rax
	movq	%r9, 80(%rsp)
	movq	%rax, 40(%rsp)
	movq	376(%rsp), %rax
	movq	%rax, 32(%rsp)
	movq	384(%rsp), %rax
	movq	%rax, 24(%rsp)
	movq	392(%rsp), %rax
	movq	%rax, 16(%rsp)
	movq	400(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	120(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	112(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 208(%rsp)
	leaq	96(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	88(%rsp), %rax
	movq	%rax, 224(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 232(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 240(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 248(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 256(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 264(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 272(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 280(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 288(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 296(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 304(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 144(%rsp)
	movl	$1, 152(%rsp)
	movq	%rax, 156(%rsp)
	movl	$1, 164(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L15
	pushq	136(%rsp)
	.cfi_def_cfa_offset 344
	leaq	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi(%rip), %rdi
	pushq	136(%rsp)
	.cfi_def_cfa_offset 352
	movq	172(%rsp), %rcx
	movl	180(%rsp), %r8d
	movq	160(%rsp), %rsi
	movl	168(%rsp), %edx
	leaq	208(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 344
	popq	%rdx
	.cfi_def_cfa_offset 336
.L15:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	addq	$328, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2055:
	.size	_Z66__device_stub__Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_PiPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, .-_Z66__device_stub__Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_PiPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.globl	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.type	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, @function
_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi:
.LFB2056:
	.cfi_startproc
	endbr64
	jmp	_Z66__device_stub__Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_PiPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.cfi_endproc
.LFE2056:
	.size	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, .-_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Start ...\n"
.LC2:
	.string	"Start allocating space for cuda...\n"
.LC3:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/bogi822/rootbeer-image-recognition/master/cuda/bilderkennung.cu"
.LC4:
	.string	"Error %s at line %d in file %s\n"
.LC5:
	.string	"Allocating space for cuda finished!\n"
.LC6:
	.string	"Start allocating space for host...\n"
.LC7:
	.string	"Start allocating space for host finished!\n"
.LC8:
	.string	"Start copying stuff to the gpu...\n"
.LC9:
	.string	"Copying stuff to the gpu finished!\n"
.LC10:
	.string	"Start image-recognition ...\n"
.LC11:
	.string	"Image-recognition ready!"
.LC12:
	.string	"Ergebnis: %d\n"
.LC13:
	.string	"End!\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	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	$248, %rsp
	.cfi_def_cfa_offset 304
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	88(%rsp), %rdi
	movl	$400, %esi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L21
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$104, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L21:
	leaq	96(%rsp), %rdi
	movl	$400, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L22
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$105, %r8d
	movq	%rax, %rcx
.L75:
	movq	stderr(%rip), %rdi
	leaq	.LC4(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L22:
	leaq	104(%rsp), %rdi
	movl	$400, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L23
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$106, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L23:
	leaq	112(%rsp), %rdi
	movl	$400, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L24
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$107, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L24:
	leaq	120(%rsp), %rdi
	movl	$400, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L25
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$108, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L25:
	leaq	128(%rsp), %rdi
	movl	$25600, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L26
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$109, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L26:
	leaq	184(%rsp), %rdi
	movl	$100, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L27
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$110, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L27:
	leaq	136(%rsp), %rdi
	movl	$4000000, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L28
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$111, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L28:
	leaq	144(%rsp), %rdi
	movl	$4000000, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L29
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$112, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L29:
	leaq	152(%rsp), %rdi
	movl	$4000000, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L30
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$113, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L30:
	leaq	160(%rsp), %rdi
	movl	$4000000, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L31
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$114, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L31:
	leaq	168(%rsp), %rdi
	movl	$4000000, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L32
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$115, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L32:
	leaq	176(%rsp), %rdi
	movl	$256000000, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L33
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$116, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L33:
	leaq	192(%rsp), %rdi
	movl	$1000000, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L34
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$117, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L34:
	leaq	200(%rsp), %rdi
	movl	$400, %esi
	call	cudaMalloc@PLT
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.L35
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$118, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L35:
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$400, %edi
	call	malloc@PLT
	movl	$100, %esi
	movq	%rax, %rdi
	movq	%rax, %r15
	call	_Z13random_floatsPfi
	movl	$400, %edi
	call	malloc@PLT
	movl	$100, %esi
	movq	%rax, %rdi
	movq	%rax, %r14
	call	_Z13random_floatsPfi
	movl	$400, %edi
	call	malloc@PLT
	movl	$100, %esi
	movq	%rax, %rdi
	movq	%rax, %r13
	call	_Z13random_floatsPfi
	movl	$400, %edi
	call	malloc@PLT
	movl	$100, %esi
	movq	%rax, %rdi
	movq	%rax, %r12
	call	_Z13random_floatsPfi
	movl	$400, %edi
	call	malloc@PLT
	movl	$100, %esi
	movq	%rax, %rdi
	movq	%rax, 72(%rsp)
	call	_Z13random_floatsPfi
	movl	$25600, %edi
	call	malloc@PLT
	movl	$6400, %esi
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	_Z13random_floatsPfi
	movl	$100, %edi
	call	malloc@PLT
	movl	$100, %esi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_Z12random_boolsPbi
	movl	$4000000, %edi
	call	malloc@PLT
	movl	$1000000, %esi
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
	call	_Z13random_floatsPfi
	movl	$4000000, %edi
	call	malloc@PLT
	movl	$1000000, %esi
	movq	%rax, %rdi
	movq	%rax, 24(%rsp)
	call	_Z13random_floatsPfi
	movl	$4000000, %edi
	call	malloc@PLT
	movl	$1000000, %esi
	movq	%rax, %rdi
	movq	%rax, 32(%rsp)
	call	_Z13random_floatsPfi
	movl	$4000000, %edi
	call	malloc@PLT
	movl	$1000000, %esi
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	_Z13random_floatsPfi
	movl	$4000000, %edi
	call	malloc@PLT
	movl	$1000000, %esi
	movq	%rax, %rdi
	movq	%rax, 48(%rsp)
	call	_Z13random_floatsPfi
	movl	$256000000, %edi
	call	malloc@PLT
	movl	$64000000, %esi
	movq	%rax, %rdi
	movq	%rax, 56(%rsp)
	call	_Z13random_floatsPfi
	movl	$1000000, %edi
	call	malloc@PLT
	movl	$1000000, %esi
	movq	%rax, %rdi
	movq	%rax, 64(%rsp)
	call	_Z12random_boolsPbi
	movl	$400, %edi
	call	malloc@PLT
	movl	$100, %ecx
	leaq	.LC7(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
	movl	%ebp, %eax
	rep stosl
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	88(%rsp), %rdi
	movl	$1, %ecx
	movq	%r15, %rsi
	movl	$400, %edx
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L36
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$149, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L36:
	movq	96(%rsp), %rdi
	movl	$1, %ecx
	movl	$400, %edx
	movq	%r14, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L37
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$150, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L37:
	movq	104(%rsp), %rdi
	movl	$1, %ecx
	movl	$400, %edx
	movq	%r13, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L38
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$151, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L38:
	movq	112(%rsp), %rdi
	movl	$1, %ecx
	movl	$400, %edx
	movq	%r12, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L39
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$152, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L39:
	movq	120(%rsp), %rdi
	movq	72(%rsp), %rsi
	movl	$1, %ecx
	movl	$400, %edx
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L40
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$153, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L40:
	movq	(%rsp), %rsi
	movl	$1, %ecx
	movl	$25600, %edx
	movq	128(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L41
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$154, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L41:
	movq	8(%rsp), %rsi
	movl	$1, %ecx
	movl	$100, %edx
	movq	184(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L42
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$155, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L42:
	movq	16(%rsp), %rsi
	movl	$1, %ecx
	movl	$4000000, %edx
	movq	136(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L43
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$156, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L43:
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movl	$4000000, %edx
	movq	144(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L44
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$157, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L44:
	movq	32(%rsp), %rsi
	movl	$1, %ecx
	movl	$4000000, %edx
	movq	152(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L45
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$158, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L45:
	movq	40(%rsp), %rsi
	movl	$1, %ecx
	movl	$4000000, %edx
	movq	160(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L46
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$159, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L46:
	movq	48(%rsp), %rsi
	movl	$1, %ecx
	movl	$4000000, %edx
	movq	168(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L47
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$160, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L47:
	movq	56(%rsp), %rsi
	movl	$1, %ecx
	movl	$256000000, %edx
	movq	176(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L48
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$161, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L48:
	movq	64(%rsp), %rsi
	movl	$1, %ecx
	movl	$1000000, %edx
	movq	192(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L49
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$162, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L49:
	movq	200(%rsp), %rdi
	movl	$1, %ecx
	movl	$400, %edx
	movq	%rbx, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L50
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$163, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L50:
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1073741849, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$2, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movabsq	$4294967297, %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L51
	pushq	%rax
	.cfi_def_cfa_offset 312
	pushq	208(%rsp)
	.cfi_def_cfa_offset 320
	pushq	192(%rsp)
	.cfi_def_cfa_offset 328
	pushq	192(%rsp)
	.cfi_def_cfa_offset 336
	pushq	224(%rsp)
	.cfi_def_cfa_offset 344
	pushq	200(%rsp)
	.cfi_def_cfa_offset 352
	pushq	200(%rsp)
	.cfi_def_cfa_offset 360
	pushq	200(%rsp)
	.cfi_def_cfa_offset 368
	pushq	200(%rsp)
	.cfi_def_cfa_offset 376
	pushq	200(%rsp)
	.cfi_def_cfa_offset 384
	movq	200(%rsp), %r9
	movq	264(%rsp), %r8
	movq	192(%rsp), %rcx
	movq	184(%rsp), %rdx
	movq	176(%rsp), %rsi
	movq	168(%rsp), %rdi
	call	_Z66__device_stub__Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_PiPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	addq	$80, %rsp
	.cfi_def_cfa_offset 304
.L51:
	movl	$2, %edi
	leaq	.LC11(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	call	cudaThreadSynchronize@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L52
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$173, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L52:
	call	cudaGetLastError@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L53
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$174, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L53:
	movq	%rbx, %rdi
	movl	$2, %ecx
	movl	$400, %edx
	xorl	%ebp, %ebp
	movq	200(%rsp), %rsi
	leaq	.LC12(%rip), %r12
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L54
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$176, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L54:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incq	%rbp
	call	__printf_chk@PLT
	cmpq	$100, %rbp
	jne	.L54
	movq	88(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L55
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$182, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L55:
	movq	96(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L56
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$183, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L56:
	movq	104(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L57
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$184, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L57:
	movq	112(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L58
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$185, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L58:
	movq	120(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L59
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$186, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L59:
	movq	128(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L60
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$187, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L60:
	movq	184(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L61
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$188, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L61:
	movq	136(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L62
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$189, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L62:
	movq	144(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L63
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$190, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L63:
	movq	152(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L64
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$191, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L64:
	movq	160(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L65
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$192, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L65:
	movq	168(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L66
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$193, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L66:
	movq	176(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L67
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$194, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L67:
	movq	192(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L68
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$195, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L68:
	call	cudaDeviceReset@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L69
	call	cudaGetErrorString@PLT
	leaq	.LC3(%rip), %r9
	movl	$197, %r8d
	movq	%rax, %rcx
	jmp	.L75
.L69:
	xorl	%eax, %eax
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	je	.L70
	call	__stack_chk_fail@PLT
.L70:
	addq	$248, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	main, .-main
	.section	.rodata.str1.1
.LC14:
	.string	"_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2058:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 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	.LC14(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	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	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2058:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	973279855
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


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

#define NUMBER_OF_THREADS 100
#define NUMBER_OF_QUERY_IPS 100
#define NUMBER_OF_DATABASE_IPS 1000000

/**
 * This macro checks return value of the CUDA runtime call and exits
 * the application if the call failed.
 */
#define CUDA_CHECK_RETURN(value) {											\
	hipError_t _m_cudaStat = value;										\
	if (_m_cudaStat != hipSuccess) {										\
		fprintf(stderr, "Error %s at line %d in file %s\n",					\
				hipGetErrorString(_m_cudaStat), __LINE__, __FILE__);		\
		exit(1);															\
	} }

__global__ void bruteForceMatcher(float *x1, float *y1, float *strength1, float *trace1, bool *sign1, float *scale1, float *descriptors1,
		float *x2, float *y2, float *strength2, float *trace2, bool *sign2, float *scale2, float *descriptors2, int *anzahlMatches) {

    float distance, delta;

    int blockSizeQuery = NUMBER_OF_QUERY_IPS / NUMBER_OF_THREADS;
    int blockSizeDB = NUMBER_OF_DATABASE_IPS / NUMBER_OF_THREADS;

    int startIndexQuery = blockIdx.x * blockSizeQuery;
    int endIndexQuery = blockIdx.x * blockSizeQuery + blockSizeQuery;

    int startIndexDB = blockIdx.x * blockSizeDB;
    int endIndexDB =  blockIdx.x * blockSizeDB + blockSizeDB;

	for(int i = startIndexQuery; i < endIndexQuery; i++) {
	    float bestDistance = 999999999.0f;
	    float secondBestDistance = 999999999.0f;
	    for (int a = startIndexDB; a < endIndexDB; a++) {
	        if (sign1[i] == sign2[a]){
	            distance = 0;
	            for (int b = 0; b < 64; b++) {
	                delta = descriptors1[b + (i * 64)] - descriptors2[b + (a * 64)];
	                distance += (delta * delta);
	            }
	            if(distance < bestDistance){
	                secondBestDistance = bestDistance;
	                bestDistance = distance;
	            }
	        }
	    }

	    // Ermittle die beste und die 2. beste distanz
	    if (bestDistance < 0.6f * secondBestDistance) {
	    	anzahlMatches[blockIdx.x]++;
	    }
	}
}

//__global__ void add(int *a, int *b, int *c, int **d) {
//	c[blockIdx.x] = a[blockIdx.x] + b[blockIdx.x];
//}

void random_ints(int* a, int anzahl){
   int i;
   for (i = 0; i < anzahl; ++i){
	  //a[i] = rand();
	  a[i] = 0;
   }
}

void random_floats(float* a, int anzahl){
   int i;
   for (i = 0; i < anzahl; ++i){
	  //a[i] = rand();
	  a[i] = 0.0005f;
   }
}

void random_bools(bool* a, int anzahl){
   int i;
   for (i = 0; i < anzahl; ++i){
	  a[i] = true;
   }
}

/**
 * Host function that prepares data array and passes it to the CUDA kernel.
 */
int main(void) {

	printf("Start ...\n");

	// Host variables
	float *x1, *y1, *strength1, *trace1, *scale1, *descriptors1, *x2, *y2, *strength2, *trace2, *scale2, *descriptors2;
	bool *sign1, *sign2;
	int *anzahlMatches;

	// Device variables
	float *d_x1, *d_y1, *d_strength1, *d_trace1, *d_scale1, *d_descriptors1, *d_x2, *d_y2, *d_strength2, *d_trace2, *d_scale2, *d_descriptors2;
	bool *d_sign1, *d_sign2;
	int *d_anzahlMatches;

	// Allocate cuda space
	printf("Start allocating space for cuda...\n");
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_x1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_y1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_strength1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_trace1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_scale1, NUMBER_OF_QUERY_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_descriptors1, NUMBER_OF_QUERY_IPS * sizeof(float) * 64));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_sign1, NUMBER_OF_QUERY_IPS * sizeof(bool)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_x2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_y2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_strength2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_trace2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_scale2, NUMBER_OF_DATABASE_IPS * sizeof(float)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_descriptors2, NUMBER_OF_DATABASE_IPS * sizeof(float) * 64));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_sign2, NUMBER_OF_DATABASE_IPS * sizeof(bool)));
	CUDA_CHECK_RETURN(hipMalloc((void** ) &d_anzahlMatches, NUMBER_OF_THREADS * sizeof(int)));
	printf("Allocating space for cuda finished!\n");

	// Create space for the query-data
	printf("Start allocating space for host...\n");
	x1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(x1, NUMBER_OF_QUERY_IPS);
	y1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(y1, NUMBER_OF_QUERY_IPS);
	strength1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(strength1, NUMBER_OF_QUERY_IPS);
	trace1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(trace1, NUMBER_OF_QUERY_IPS);
	scale1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float)); random_floats(scale1, NUMBER_OF_QUERY_IPS);
	descriptors1 = (float *)malloc(NUMBER_OF_QUERY_IPS * sizeof(float) * 64); random_floats(descriptors1, NUMBER_OF_QUERY_IPS * 64);
	sign1 = (bool *)malloc(NUMBER_OF_QUERY_IPS * sizeof(bool)); random_bools(sign1, NUMBER_OF_QUERY_IPS);

	x2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(x2, NUMBER_OF_DATABASE_IPS);
	y2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(y2, NUMBER_OF_DATABASE_IPS);
	strength2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(strength2, NUMBER_OF_DATABASE_IPS);
	trace2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(trace2, NUMBER_OF_DATABASE_IPS);
	scale2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float)); random_floats(scale2, NUMBER_OF_DATABASE_IPS);
	descriptors2 = (float *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(float) * 64); random_floats(descriptors2, NUMBER_OF_DATABASE_IPS * 64);
	sign2 = (bool *)malloc(NUMBER_OF_DATABASE_IPS * sizeof(bool)); random_bools(sign2, NUMBER_OF_DATABASE_IPS);
	anzahlMatches = (int *)malloc(NUMBER_OF_THREADS * sizeof(int));

	// Zero-fill the current match count
	for(int i = 0; i < NUMBER_OF_THREADS; i++){
		anzahlMatches[i] = 0;
	}

	printf("Start allocating space for host finished!\n");

	// Copy data to device
	printf("Start copying stuff to the gpu...\n");
	CUDA_CHECK_RETURN(hipMemcpy(d_x1, x1, NUMBER_OF_QUERY_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_y1, y1, NUMBER_OF_QUERY_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_strength1, strength1, NUMBER_OF_QUERY_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_trace1, trace1, NUMBER_OF_QUERY_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_scale1, scale1, NUMBER_OF_QUERY_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_descriptors1, descriptors1, NUMBER_OF_QUERY_IPS * sizeof(float) * 64, hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_sign1, sign1, NUMBER_OF_QUERY_IPS * sizeof(bool), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_x2, x2, NUMBER_OF_DATABASE_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_y2, y2, NUMBER_OF_DATABASE_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_strength2, strength2, NUMBER_OF_DATABASE_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_trace2, trace2, NUMBER_OF_DATABASE_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_scale2, scale2, NUMBER_OF_DATABASE_IPS * sizeof(float), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_descriptors2, descriptors2, NUMBER_OF_DATABASE_IPS * sizeof(float) * 64, hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_sign2, sign2, NUMBER_OF_DATABASE_IPS * sizeof(bool), hipMemcpyHostToDevice));
	CUDA_CHECK_RETURN(hipMemcpy(d_anzahlMatches, anzahlMatches, NUMBER_OF_THREADS * sizeof(int), hipMemcpyHostToDevice));
	printf("Copying stuff to the gpu finished!\n");

	printf("Start image-recognition ...\n");

	bruteForceMatcher<<<NUMBER_OF_THREADS, 1>>>(d_x1, d_y1, d_strength1, d_trace1, d_sign1, d_scale1, d_descriptors1,
								d_x2, d_y2, d_strength2, d_trace2, d_sign2, d_scale2, d_descriptors2, d_anzahlMatches);

	printf("Image-recognition ready!");

	CUDA_CHECK_RETURN(hipDeviceSynchronize());	// Wait for the GPU launched work to complete
	CUDA_CHECK_RETURN(hipGetLastError());

	CUDA_CHECK_RETURN(hipMemcpy(anzahlMatches, d_anzahlMatches, NUMBER_OF_THREADS * sizeof(int), hipMemcpyDeviceToHost));

	for(int i = 0; i < NUMBER_OF_THREADS; i++){
		printf("Ergebnis: %d\n", anzahlMatches[i]);
	}

	CUDA_CHECK_RETURN(hipFree(d_x1));
	CUDA_CHECK_RETURN(hipFree(d_y1));
	CUDA_CHECK_RETURN(hipFree(d_strength1));
	CUDA_CHECK_RETURN(hipFree(d_trace1));
	CUDA_CHECK_RETURN(hipFree(d_scale1));
	CUDA_CHECK_RETURN(hipFree(d_descriptors1));
	CUDA_CHECK_RETURN(hipFree(d_sign1));
	CUDA_CHECK_RETURN(hipFree(d_x2));
	CUDA_CHECK_RETURN(hipFree(d_y2));
	CUDA_CHECK_RETURN(hipFree(d_strength2));
	CUDA_CHECK_RETURN(hipFree(d_trace2));
	CUDA_CHECK_RETURN(hipFree(d_scale2));
	CUDA_CHECK_RETURN(hipFree(d_descriptors2));
	CUDA_CHECK_RETURN(hipFree(d_sign2));

	CUDA_CHECK_RETURN(hipDeviceReset());
	printf("End!\n");
	return 0;
}



	.text
	.file	"bilderkennung.hip"
	.globl	_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi # -- Begin function _Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.type	_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi,@function
_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi: # @_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.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	$224, %rsp
	.cfi_def_cfa_offset 272
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	272(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	280(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	288(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	296(%rsp), %rax
	movq	%rax, 72(%rbx)
	leaq	304(%rsp), %rax
	movq	%rax, 80(%rbx)
	leaq	312(%rsp), %rax
	movq	%rax, 88(%rbx)
	leaq	320(%rsp), %rax
	movq	%rax, 96(%rbx)
	leaq	328(%rsp), %rax
	movq	%rax, 104(%rbx)
	leaq	336(%rsp), %rax
	movq	%rax, 112(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%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	$_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$240, %rsp
	.cfi_adjust_cfa_offset -240
	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_end0:
	.size	_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, .Lfunc_end0-_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.cfi_endproc
                                        # -- End function
	.globl	_Z11random_intsPii              # -- Begin function _Z11random_intsPii
	.type	_Z11random_intsPii,@function
_Z11random_intsPii:                     # @_Z11random_intsPii
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB1_1
# %bb.2:                                # %.lr.ph.preheader
	movl	%esi, %edx
	shlq	$2, %rdx
	xorl	%esi, %esi
	jmp	memset@PLT                      # TAILCALL
.LBB1_1:                                # %._crit_edge
	retq
.Lfunc_end1:
	.size	_Z11random_intsPii, .Lfunc_end1-_Z11random_intsPii
	.cfi_endproc
                                        # -- End function
	.globl	_Z13random_floatsPfi            # -- Begin function _Z13random_floatsPfi
	.type	_Z13random_floatsPfi,@function
_Z13random_floatsPfi:                   # @_Z13random_floatsPfi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB2_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%esi, %eax
	xorl	%ecx, %ecx
.LBB2_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rdi,%rcx,4)       # imm = 0x3A03126F
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB2_2
.LBB2_3:                                # %._crit_edge
	retq
.Lfunc_end2:
	.size	_Z13random_floatsPfi, .Lfunc_end2-_Z13random_floatsPfi
	.cfi_endproc
                                        # -- End function
	.globl	_Z12random_boolsPbi             # -- Begin function _Z12random_boolsPbi
	.type	_Z12random_boolsPbi,@function
_Z12random_boolsPbi:                    # @_Z12random_boolsPbi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB3_1
# %bb.2:                                # %.lr.ph.preheader
	movl	%esi, %edx
	movl	$1, %esi
	jmp	memset@PLT                      # TAILCALL
.LBB3_1:                                # %._crit_edge
	retq
.Lfunc_end3:
	.size	_Z12random_boolsPbi, .Lfunc_end3-_Z12random_boolsPbi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function main
.LCPI4_0:
	.zero	16,1
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	leaq	120(%rsp), %rdi
	movl	$400, %esi                      # imm = 0x190
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_1
# %bb.3:
	leaq	112(%rsp), %rdi
	movl	$400, %esi                      # imm = 0x190
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_4
# %bb.5:
	leaq	104(%rsp), %rdi
	movl	$400, %esi                      # imm = 0x190
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_6
# %bb.7:
	leaq	96(%rsp), %rdi
	movl	$400, %esi                      # imm = 0x190
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_8
# %bb.9:
	leaq	88(%rsp), %rdi
	movl	$400, %esi                      # imm = 0x190
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_10
# %bb.11:
	leaq	80(%rsp), %rdi
	movl	$25600, %esi                    # imm = 0x6400
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_12
# %bb.13:
	leaq	24(%rsp), %rdi
	movl	$100, %esi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_14
# %bb.15:
	leaq	72(%rsp), %rdi
	movl	$4000000, %esi                  # imm = 0x3D0900
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_16
# %bb.17:
	leaq	64(%rsp), %rdi
	movl	$4000000, %esi                  # imm = 0x3D0900
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_18
# %bb.19:
	leaq	56(%rsp), %rdi
	movl	$4000000, %esi                  # imm = 0x3D0900
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_20
# %bb.21:
	leaq	48(%rsp), %rdi
	movl	$4000000, %esi                  # imm = 0x3D0900
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_22
# %bb.23:
	leaq	40(%rsp), %rdi
	movl	$4000000, %esi                  # imm = 0x3D0900
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_24
# %bb.25:
	leaq	32(%rsp), %rdi
	movl	$256000000, %esi                # imm = 0xF424000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_26
# %bb.27:
	leaq	16(%rsp), %rdi
	movl	$1000000, %esi                  # imm = 0xF4240
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_28
# %bb.29:
	leaq	8(%rsp), %rdi
	movl	$400, %esi                      # imm = 0x190
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB4_30
# %bb.31:
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	movl	$400, %edi                      # imm = 0x190
	callq	malloc
	xorl	%ecx, %ecx
.LBB4_32:                               # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rax,%rcx,4)       # imm = 0x3A03126F
	incq	%rcx
	cmpq	$100, %rcx
	jne	.LBB4_32
# %bb.33:                               # %_Z13random_floatsPfi.exit
	movq	%rax, 192(%rsp)                 # 8-byte Spill
	movl	$400, %edi                      # imm = 0x190
	callq	malloc
	xorl	%ecx, %ecx
.LBB4_34:                               # %.lr.ph.i240
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rax,%rcx,4)       # imm = 0x3A03126F
	incq	%rcx
	cmpq	$100, %rcx
	jne	.LBB4_34
# %bb.35:                               # %_Z13random_floatsPfi.exit244
	movq	%rax, 184(%rsp)                 # 8-byte Spill
	movl	$400, %edi                      # imm = 0x190
	callq	malloc
	xorl	%ecx, %ecx
.LBB4_36:                               # %.lr.ph.i245
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rax,%rcx,4)       # imm = 0x3A03126F
	incq	%rcx
	cmpq	$100, %rcx
	jne	.LBB4_36
# %bb.37:                               # %_Z13random_floatsPfi.exit249
	movq	%rax, 176(%rsp)                 # 8-byte Spill
	movl	$400, %edi                      # imm = 0x190
	callq	malloc
	xorl	%ecx, %ecx
.LBB4_38:                               # %.lr.ph.i250
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rax,%rcx,4)       # imm = 0x3A03126F
	incq	%rcx
	cmpq	$100, %rcx
	jne	.LBB4_38
# %bb.39:                               # %_Z13random_floatsPfi.exit254
	movq	%rax, 168(%rsp)                 # 8-byte Spill
	movl	$400, %edi                      # imm = 0x190
	callq	malloc
	xorl	%ecx, %ecx
.LBB4_40:                               # %.lr.ph.i255
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rax,%rcx,4)       # imm = 0x3A03126F
	incq	%rcx
	cmpq	$100, %rcx
	jne	.LBB4_40
# %bb.41:                               # %_Z13random_floatsPfi.exit259
	movq	%rax, 160(%rsp)                 # 8-byte Spill
	movl	$25600, %edi                    # imm = 0x6400
	callq	malloc
	xorl	%ecx, %ecx
.LBB4_42:                               # %.lr.ph.i260
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rax,%rcx,4)       # imm = 0x3A03126F
	incq	%rcx
	cmpq	$6400, %rcx                     # imm = 0x1900
	jne	.LBB4_42
# %bb.43:                               # %_Z13random_floatsPfi.exit264
	movq	%rax, 152(%rsp)                 # 8-byte Spill
	movl	$100, %edi
	callq	malloc
	movaps	.LCPI4_0(%rip), %xmm0           # xmm0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	movups	%xmm0, 32(%rax)
	movups	%xmm0, 48(%rax)
	movups	%xmm0, 64(%rax)
	movups	%xmm0, 80(%rax)
	movq	%rax, 144(%rsp)                 # 8-byte Spill
	movl	$16843009, 96(%rax)             # imm = 0x1010101
	movl	$4000000, %edi                  # imm = 0x3D0900
	callq	malloc
	movq	%rax, %r14
	xorl	%eax, %eax
.LBB4_44:                               # %.lr.ph.i265
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%r14,%rax,4)       # imm = 0x3A03126F
	incq	%rax
	cmpq	$1000000, %rax                  # imm = 0xF4240
	jne	.LBB4_44
# %bb.45:                               # %_Z13random_floatsPfi.exit269
	movl	$4000000, %edi                  # imm = 0x3D0900
	callq	malloc
	movq	%rax, %r15
	xorl	%eax, %eax
.LBB4_46:                               # %.lr.ph.i270
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%r15,%rax,4)       # imm = 0x3A03126F
	incq	%rax
	cmpq	$1000000, %rax                  # imm = 0xF4240
	jne	.LBB4_46
# %bb.47:                               # %_Z13random_floatsPfi.exit274
	movl	$4000000, %edi                  # imm = 0x3D0900
	callq	malloc
	movq	%rax, %r12
	xorl	%eax, %eax
.LBB4_48:                               # %.lr.ph.i275
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%r12,%rax,4)       # imm = 0x3A03126F
	incq	%rax
	cmpq	$1000000, %rax                  # imm = 0xF4240
	jne	.LBB4_48
# %bb.49:                               # %_Z13random_floatsPfi.exit279
	movl	$4000000, %edi                  # imm = 0x3D0900
	callq	malloc
	movq	%rax, %r13
	xorl	%eax, %eax
.LBB4_50:                               # %.lr.ph.i280
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%r13,%rax,4)       # imm = 0x3A03126F
	incq	%rax
	cmpq	$1000000, %rax                  # imm = 0xF4240
	jne	.LBB4_50
# %bb.51:                               # %_Z13random_floatsPfi.exit284
	movl	$4000000, %edi                  # imm = 0x3D0900
	callq	malloc
	movq	%rax, %rbp
	xorl	%eax, %eax
.LBB4_52:                               # %.lr.ph.i285
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rbp,%rax,4)       # imm = 0x3A03126F
	incq	%rax
	cmpq	$1000000, %rax                  # imm = 0xF4240
	jne	.LBB4_52
# %bb.53:                               # %_Z13random_floatsPfi.exit289
	movl	$256000000, %edi                # imm = 0xF424000
	callq	malloc
	movq	%rax, %rbx
	xorl	%eax, %eax
.LBB4_54:                               # %.lr.ph.i290
                                        # =>This Inner Loop Header: Depth=1
	movl	$973279855, (%rbx,%rax,4)       # imm = 0x3A03126F
	incq	%rax
	cmpq	$64000000, %rax                 # imm = 0x3D09000
	jne	.LBB4_54
# %bb.55:                               # %_Z13random_floatsPfi.exit294
	movl	$1000000, %edi                  # imm = 0xF4240
	callq	malloc
	movl	$1000000, %edx                  # imm = 0xF4240
	movq	%rax, 128(%rsp)                 # 8-byte Spill
	movq	%rax, %rdi
	movl	$1, %esi
	callq	memset@PLT
	movl	$1, %edi
	movl	$400, %esi                      # imm = 0x190
	callq	calloc@PLT
	movq	%rax, 136(%rsp)                 # 8-byte Spill
	movl	$.Lstr.4, %edi
	callq	puts@PLT
	movl	$.Lstr.5, %edi
	callq	puts@PLT
	movq	120(%rsp), %rdi
	movl	$400, %edx                      # imm = 0x190
	movq	192(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_56
# %bb.57:
	movq	112(%rsp), %rdi
	movl	$400, %edx                      # imm = 0x190
	movq	184(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_58
# %bb.59:
	movq	104(%rsp), %rdi
	movl	$400, %edx                      # imm = 0x190
	movq	176(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_60
# %bb.61:
	movq	96(%rsp), %rdi
	movl	$400, %edx                      # imm = 0x190
	movq	168(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_62
# %bb.63:
	movq	88(%rsp), %rdi
	movl	$400, %edx                      # imm = 0x190
	movq	160(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_64
# %bb.65:
	movq	80(%rsp), %rdi
	movl	$25600, %edx                    # imm = 0x6400
	movq	152(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_66
# %bb.67:
	movq	24(%rsp), %rdi
	movl	$100, %edx
	movq	144(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_68
# %bb.69:
	movq	72(%rsp), %rdi
	movl	$4000000, %edx                  # imm = 0x3D0900
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_70
# %bb.71:
	movq	64(%rsp), %rdi
	movl	$4000000, %edx                  # imm = 0x3D0900
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_72
# %bb.73:
	movq	56(%rsp), %rdi
	movl	$4000000, %edx                  # imm = 0x3D0900
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_74
# %bb.75:
	movq	48(%rsp), %rdi
	movl	$4000000, %edx                  # imm = 0x3D0900
	movq	%r13, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_76
# %bb.77:
	movq	40(%rsp), %rdi
	movl	$4000000, %edx                  # imm = 0x3D0900
	movq	%rbp, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_78
# %bb.79:
	movq	32(%rsp), %rdi
	movl	$256000000, %edx                # imm = 0xF424000
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	movq	136(%rsp), %r14                 # 8-byte Reload
	jne	.LBB4_80
# %bb.81:
	movq	16(%rsp), %rdi
	movl	$1000000, %edx                  # imm = 0xF4240
	movq	128(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_82
# %bb.83:
	movq	8(%rsp), %rdi
	movl	$400, %edx                      # imm = 0x190
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_84
# %bb.85:
	movl	$.Lstr.6, %edi
	callq	puts@PLT
	movl	$.Lstr.7, %edi
	callq	puts@PLT
	movabsq	$4294967297, %rdx               # imm = 0x100000001
	leaq	99(%rdx), %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB4_87
# %bb.86:
	movq	120(%rsp), %rdi
	movq	112(%rsp), %rsi
	movq	104(%rsp), %rdx
	movq	96(%rsp), %rcx
	movq	24(%rsp), %r8
	movq	88(%rsp), %r9
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	pushq	16(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	48(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	64(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	48(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	88(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	104(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	120(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	136(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	152(%rsp)
	.cfi_adjust_cfa_offset 8
	callq	_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	addq	$80, %rsp
	.cfi_adjust_cfa_offset -80
.LBB4_87:
	movl	$.L.str.10, %edi
	xorl	%eax, %eax
	callq	printf
	callq	hipDeviceSynchronize
	testl	%eax, %eax
	jne	.LBB4_88
# %bb.89:
	callq	hipGetLastError
	testl	%eax, %eax
	jne	.LBB4_90
# %bb.91:
	movq	8(%rsp), %rsi
	movl	$400, %edx                      # imm = 0x190
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB4_125
# %bb.92:                               # %.preheader.preheader
	xorl	%ebx, %ebx
.LBB4_93:                               # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %esi
	movl	$.L.str.11, %edi
	xorl	%eax, %eax
	callq	printf
	incq	%rbx
	cmpq	$100, %rbx
	jne	.LBB4_93
# %bb.94:
	movq	120(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_95
# %bb.96:
	movq	112(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_97
# %bb.98:
	movq	104(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_99
# %bb.100:
	movq	96(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_101
# %bb.102:
	movq	88(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_103
# %bb.104:
	movq	80(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_105
# %bb.106:
	movq	24(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_107
# %bb.108:
	movq	72(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_109
# %bb.110:
	movq	64(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_111
# %bb.112:
	movq	56(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_113
# %bb.114:
	movq	48(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_115
# %bb.116:
	movq	40(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_117
# %bb.118:
	movq	32(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_119
# %bb.120:
	movq	16(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB4_121
# %bb.122:
	callq	hipDeviceReset
	testl	%eax, %eax
	jne	.LBB4_123
# %bb.124:
	movl	$.Lstr.8, %edi
	callq	puts@PLT
	xorl	%eax, %eax
	addq	$200, %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
.LBB4_1:
	.cfi_def_cfa_offset 256
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$106, %ecx
	jmp	.LBB4_2
.LBB4_4:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$107, %ecx
	jmp	.LBB4_2
.LBB4_6:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$108, %ecx
	jmp	.LBB4_2
.LBB4_8:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$109, %ecx
	jmp	.LBB4_2
.LBB4_10:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$110, %ecx
	jmp	.LBB4_2
.LBB4_12:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$111, %ecx
	jmp	.LBB4_2
.LBB4_14:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$112, %ecx
	jmp	.LBB4_2
.LBB4_16:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$113, %ecx
	jmp	.LBB4_2
.LBB4_18:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$114, %ecx
	jmp	.LBB4_2
.LBB4_20:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$115, %ecx
	jmp	.LBB4_2
.LBB4_22:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$116, %ecx
	jmp	.LBB4_2
.LBB4_24:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$117, %ecx
	jmp	.LBB4_2
.LBB4_26:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$118, %ecx
	jmp	.LBB4_2
.LBB4_28:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$119, %ecx
	jmp	.LBB4_2
.LBB4_30:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$120, %ecx
	jmp	.LBB4_2
.LBB4_56:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$151, %ecx
	jmp	.LBB4_2
.LBB4_58:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$152, %ecx
	jmp	.LBB4_2
.LBB4_60:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$153, %ecx
	jmp	.LBB4_2
.LBB4_62:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$154, %ecx
	jmp	.LBB4_2
.LBB4_64:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$155, %ecx
	jmp	.LBB4_2
.LBB4_66:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$156, %ecx
	jmp	.LBB4_2
.LBB4_68:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$157, %ecx
	jmp	.LBB4_2
.LBB4_70:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$158, %ecx
	jmp	.LBB4_2
.LBB4_72:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$159, %ecx
	jmp	.LBB4_2
.LBB4_74:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$160, %ecx
	jmp	.LBB4_2
.LBB4_76:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$161, %ecx
	jmp	.LBB4_2
.LBB4_78:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$162, %ecx
	jmp	.LBB4_2
.LBB4_80:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$163, %ecx
	jmp	.LBB4_2
.LBB4_82:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$164, %ecx
	jmp	.LBB4_2
.LBB4_84:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$165, %ecx
	jmp	.LBB4_2
.LBB4_88:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$175, %ecx
	jmp	.LBB4_2
.LBB4_90:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$176, %ecx
	jmp	.LBB4_2
.LBB4_125:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$178, %ecx
	jmp	.LBB4_2
.LBB4_95:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$184, %ecx
	jmp	.LBB4_2
.LBB4_97:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$185, %ecx
	jmp	.LBB4_2
.LBB4_99:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$186, %ecx
	jmp	.LBB4_2
.LBB4_101:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$187, %ecx
	jmp	.LBB4_2
.LBB4_103:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$188, %ecx
	jmp	.LBB4_2
.LBB4_105:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$189, %ecx
	jmp	.LBB4_2
.LBB4_107:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$190, %ecx
	jmp	.LBB4_2
.LBB4_109:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$191, %ecx
	jmp	.LBB4_2
.LBB4_111:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$192, %ecx
	jmp	.LBB4_2
.LBB4_113:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$193, %ecx
	jmp	.LBB4_2
.LBB4_115:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$194, %ecx
	jmp	.LBB4_2
.LBB4_117:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$195, %ecx
	jmp	.LBB4_2
.LBB4_119:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$196, %ecx
	jmp	.LBB4_2
.LBB4_121:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$197, %ecx
	jmp	.LBB4_2
.LBB4_123:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %r8d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$199, %ecx
.LBB4_2:
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end4:
	.size	main, .Lfunc_end4-main
	.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:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB5_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB5_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end5:
	.size	__hip_module_ctor, .Lfunc_end5-__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	.LBB6_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
.LBB6_2:
	retq
.Lfunc_end6:
	.size	__hip_module_dtor, .Lfunc_end6-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi,@object # @_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.section	.rodata,"a",@progbits
	.globl	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.p2align	3, 0x0
_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi:
	.quad	_Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.size	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, 8

	.type	.L.str.2,@object                # @.str.2
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.2:
	.asciz	"Error %s at line %d in file %s\n"
	.size	.L.str.2, 32

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/bogi822/rootbeer-image-recognition/master/cuda/bilderkennung.hip"
	.size	.L.str.3, 127

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Image-recognition ready!"
	.size	.L.str.10, 25

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Ergebnis: %d\n"
	.size	.L.str.11, 14

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi"
	.size	.L__unnamed_1, 53

	.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 ..."
	.size	.Lstr, 10

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"Start allocating space for cuda..."
	.size	.Lstr.1, 35

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"Allocating space for cuda finished!"
	.size	.Lstr.2, 36

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"Start allocating space for host..."
	.size	.Lstr.3, 35

	.type	.Lstr.4,@object                 # @str.4
.Lstr.4:
	.asciz	"Start allocating space for host finished!"
	.size	.Lstr.4, 42

	.type	.Lstr.5,@object                 # @str.5
.Lstr.5:
	.asciz	"Start copying stuff to the gpu..."
	.size	.Lstr.5, 34

	.type	.Lstr.6,@object                 # @str.6
.Lstr.6:
	.asciz	"Copying stuff to the gpu finished!"
	.size	.Lstr.6, 35

	.type	.Lstr.7,@object                 # @str.7
.Lstr.7:
	.asciz	"Start image-recognition ..."
	.size	.Lstr.7, 28

	.type	.Lstr.8,@object                 # @str.8
.Lstr.8:
	.asciz	"End!"
	.size	.Lstr.8, 5

	.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 _Z32__device_stub__bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi ; -- Begin function _Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.globl	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
	.p2align	8
	.type	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi,@function
_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi: ; @_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
; %bb.0:
	s_cmp_eq_u32 s15, 0x7fffffff
	s_cbranch_scc1 .LBB0_13
; %bb.1:                                ; %.preheader56.lr.ph
	s_load_b128 s[4:7], s[0:1], 0x68
	s_mul_i32 s3, s15, 0x2710
	s_mov_b32 s2, s15
	s_cmp_gt_i32 s3, 0x7fffd8ef
	s_cbranch_scc1 .LBB0_10
; %bb.2:                                ; %.lr.ph
	s_clause 0x2
	s_load_b64 s[8:9], s[0:1], 0x20
	s_load_b64 s[10:11], s[0:1], 0x30
	s_load_b64 s[0:1], s[0:1], 0x58
	v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v3, 0x4e6e6b28
	s_add_i32 s12, s3, 0x2710
	s_ashr_i32 s13, s2, 31
	v_mov_b32_e32 v2, 0x4e6e6b28
	s_waitcnt lgkmcnt(0)
	s_add_u32 s8, s8, s2
	s_addc_u32 s9, s9, s13
	global_load_u8 v1, v0, s[8:9]
	s_lshl_b32 s8, s2, 6
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_ashr_i32 s9, s8, 31
	s_lshl_b64 s[8:9], s[8:9], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s13, s10, s8
	s_addc_u32 s14, s11, s9
	s_mul_i32 s8, s2, 0x9c400
.LBB0_3:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	s_ashr_i32 s9, s3, 31
	s_add_u32 s10, s0, s3
	s_addc_u32 s11, s1, s9
	global_load_u8 v4, v0, s[10:11]
	s_waitcnt vmcnt(0)
	v_cmp_ne_u32_e32 vcc_lo, v1, v4
	s_cbranch_vccnz .LBB0_8
; %bb.4:                                ; %.preheader
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_ashr_i32 s9, s8, 31
	v_mov_b32_e32 v4, 0
	s_lshl_b64 s[10:11], s[8:9], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s9, s4, s10
	s_addc_u32 s15, s5, s11
	s_mov_b64 s[10:11], 0
.LBB0_5:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s16, s13, s10
	s_addc_u32 s17, s14, s11
	s_add_u32 s18, s9, s10
	s_addc_u32 s19, s15, s11
	s_load_b32 s16, s[16:17], 0x0
	s_load_b32 s17, s[18:19], 0x0
	s_add_u32 s10, s10, 4
	s_addc_u32 s11, s11, 0
	s_cmpk_eq_i32 s10, 0x100
	s_waitcnt lgkmcnt(0)
	v_sub_f32_e64 v5, s16, s17
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v4, v5, v5
	s_cbranch_scc0 .LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_f32_e32 vcc_lo, v4, v2
	s_cbranch_vccz .LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	v_dual_mov_b32 v3, v2 :: v_dual_mov_b32 v2, v4
.LBB0_8:                                ;   in Loop: Header=BB0_3 Depth=1
	s_add_i32 s3, s3, 1
	s_add_i32 s8, s8, 64
	s_cmp_ge_i32 s3, s12
	s_cbranch_scc0 .LBB0_3
; %bb.9:                                ; %._crit_edge.loopexit
	v_mul_f32_e32 v0, 0x3f19999a, v3
	s_branch .LBB0_11
.LBB0_10:
	v_mov_b32_e32 v0, 0x4e0f0d18
	v_mov_b32_e32 v2, 0x4e6e6b28
.LBB0_11:                               ; %._crit_edge
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_f32_e32 vcc_lo, v2, v0
	s_cbranch_vccz .LBB0_13
; %bb.12:
	s_mov_b32 s3, 0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b64 s[0:1], s[2:3], 2
	s_waitcnt lgkmcnt(0)
	s_add_u32 s0, s6, s0
	s_addc_u32 s1, s7, s1
	s_load_b32 s2, s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_add_i32 s2, s2, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
	global_store_b32 v0, v1, s[0:1]
.LBB0_13:                               ; %._crit_edge64
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 120
		.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 20
		.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	_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi, .Lfunc_end0-_Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 440
; NumSgprs: 22
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 22
; 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
	.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
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         40
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         48
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         56
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         64
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         72
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         80
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         88
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         96
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         104
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         112
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 120
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi
    .private_segment_fixed_size: 0
    .sgpr_count:     22
    .sgpr_spill_count: 0
    .symbol:         _Z17bruteForceMatcherPfS_S_S_PbS_S_S_S_S_S_S0_S_S_Pi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
