#define REORDER 1

#define GOOD_WEATHER 0
#define BAD_WEATHER 1

#define TAG_Car 0
#define TAG_Pedestrian 1

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//#include <random>
//#include <array> 
#include <algorithm> 

#define NUM_CARS 4096
#define NUM_PEDS 16384
#define NUM_STREETS 500
#define MAX_CONNECTIONS 10
#define MAX_LEN 25

using namespace std;

// Define this to turn on error checking
#define CUDA_ERROR_CHECK

#define CudaSafeCall( err ) __cudaSafeCall( err, __FILE__, __LINE__ )
#define CudaCheckError()    __cudaCheckError( __FILE__, __LINE__ )

inline void __cudaSafeCall( cudaError err, const char *file, const int line )
{
#ifdef CUDA_ERROR_CHECK
    if ( cudaSuccess != err )
    {
        fprintf( stderr, "cudaSafeCall() failed at %s:%i : %s\n",
                 file, line, cudaGetErrorString( err ) );
        exit( -1 );
    }
#endif

    return;
}

inline void __cudaCheckError( const char *file, const int line )
{
#ifdef CUDA_ERROR_CHECK
    cudaError err = cudaGetLastError();
    if ( cudaSuccess != err )
    {
        fprintf( stderr, "cudaCheckError() failed at %s:%i : %s\n",
                 file, line, cudaGetErrorString( err ) );
        exit( -1 );
    }

    // More careful checking. However, this will affect performance.
    // Comment away if needed.
    err = cudaDeviceSynchronize();
    if( cudaSuccess != err )
    {
        fprintf( stderr, "cudaCheckError() with sync failed at %s:%i : %s\n",
                 file, line, cudaGetErrorString( err ) );
        exit( -1 );
    }
#endif

    return;
}

__device__ float *d_Actor_progress;
__device__ int *d_Actor_street;
__device__ float *d_Car_max_velocity;
__device__ float *d_Street_length;
__device__ float *d_Street_max_velocity;
__device__ int *d_Street_neighbors;
__device__ int *d_Array_Street_size;
__device__ int *d_Array_Street_offset;
__device__ int *d_Array_Street_arrays;
__device__ int *d_input_actor_tag;
__device__ int *d_input_actor_id;
__device__ int *d_jobs;
__device__ int *d_randomn;

__device__ void method_Car_move(int actor_id, int weather)
{
	float weather_multiplier;
	if (weather == GOOD_WEATHER) 
	{
		weather_multiplier = 1.0;
	}
	else if (weather == BAD_WEATHER)
	{
		weather_multiplier = 0.75;
	}

	float speed = min(d_Car_max_velocity[actor_id], d_Street_max_velocity[d_Actor_street[actor_id]]) * weather_multiplier;
	d_Actor_progress[actor_id] = d_Actor_progress[actor_id] + (speed / 60.0); /* 1 tick = 1 minute */

	if (d_Actor_progress[actor_id] >= d_Street_length[d_Actor_street[actor_id]])
	{
		// move to different street
		int array_id = d_Street_neighbors[d_Actor_street[actor_id]];
		int neighbor_index = d_randomn[d_Actor_street[actor_id]] % d_Array_Street_size[array_id];
		d_Actor_street[actor_id] = d_Array_Street_arrays[d_Array_Street_offset[array_id] + neighbor_index];
		d_Actor_progress[actor_id] = 0.0f;
	}
}

__device__ void method_Pedestrian_move(int actor_id, int weather)
{
	float speed = d_randomn[((int) (d_Actor_progress[actor_id]*d_Actor_progress[actor_id])) % NUM_STREETS] % 7 - 2;
	d_Actor_progress[actor_id] = d_Actor_progress[actor_id] + (speed / 60.0);

	if (d_Actor_progress[actor_id] >= d_Street_length[d_Actor_street[actor_id]])
	{
		// move to different street
		int array_id = d_Street_neighbors[d_Actor_street[actor_id]];
		int neighbor_index = d_randomn[d_Actor_street[actor_id]] % d_Array_Street_size[array_id];
		d_Actor_street[actor_id] = d_Array_Street_arrays[d_Array_Street_offset[array_id] + neighbor_index];
		d_Actor_progress[actor_id] = 0.0f;
	}
}

__device__ void block(int actor_tag, int actor_id, int weather, int ticks)
{
	for (int i = 0; i < ticks; i++)
	{
		switch (actor_tag)
		{
			case TAG_Car:
				method_Car_move(actor_id, weather);
				break;
			case TAG_Pedestrian:
				method_Pedestrian_move(actor_id, weather);
				break;
		}
	}
}

__global__ void kernel(int weather,	int ticks,
	float *v_d_Actor_progress, int *v_d_Actor_street, float *v_d_Car_max_velocity,
	float *v_d_Street_length, float *v_d_Street_max_velocity, int *v_d_Street_neighbors,
	int *v_d_Array_Street_size, int *v_d_Array_Street_offset, int *v_d_Array_Street_arrays,
	int *v_d_input_actor_tag, int *v_d_input_actor_id, int *v_d_jobs, int *v_d_randomn)
{
	d_Actor_progress = v_d_Actor_progress;
	d_Actor_street = v_d_Actor_street;
	d_Car_max_velocity = v_d_Car_max_velocity;
	d_Street_length = v_d_Street_length;
	d_Street_max_velocity = v_d_Street_max_velocity;
	d_Street_neighbors = v_d_Street_neighbors;
	d_Array_Street_size = v_d_Array_Street_size;
	d_Array_Street_offset = v_d_Array_Street_offset;
	d_Array_Street_arrays = v_d_Array_Street_arrays;
	d_input_actor_tag = v_d_input_actor_tag;
	d_input_actor_id = v_d_input_actor_id;
	d_jobs = v_d_jobs;
	d_randomn = v_d_randomn;

	int tid = blockIdx.x * blockDim.x + threadIdx.x;

	__syncthreads();

#if (REORDER)
	block(d_input_actor_tag[d_jobs[tid]], d_input_actor_id[d_jobs[tid]], weather, ticks);
#else
	block(d_input_actor_tag[tid], d_input_actor_id[tid], weather, ticks);
#endif
}

int main()
{
	printf("Setting up scenario...\n");
	srand(42);

	// streets
	float *Street_length = new float[NUM_STREETS];
	float *Street_max_velocity = new float[NUM_STREETS];
	int *Street_neighbors = new int[NUM_STREETS];

	for (int i = 0; i < NUM_STREETS; i++)
	{
		Street_length[i] = rand() % MAX_LEN + 1;
		Street_max_velocity[i] = rand() % 40 + 45;	/* speed between 45 and 105 */
		Street_neighbors[i] = i;
	}

	// neighbors
	int *Array_Street_offset = new int[NUM_STREETS];
	int *Array_Street_size = new int[NUM_STREETS];
	int num_connections = 0;

	for (int i = 0; i < NUM_STREETS; i++)
	{
		Array_Street_offset[i] = num_connections;
		int connections = rand() % MAX_CONNECTIONS + 1;
		Array_Street_size[i] = connections;
		num_connections += connections;
	}

	int *Array_Street_arrays = new int[num_connections];
	for (int i = 0; i < num_connections; i++)
	{
		Array_Street_arrays[i] = rand() % NUM_STREETS;
	}

	// actors
	int *Actor_street = new int[NUM_PEDS + NUM_CARS];
	float *Actor_progress = new float[NUM_PEDS + NUM_CARS];
	float *Car_max_velocity = new float[NUM_CARS + NUM_PEDS];
	int *Actor_tag = new int[NUM_PEDS + NUM_CARS];
	int *Actor_id = new int[NUM_PEDS + NUM_CARS];

	for (int i = 0; i < NUM_PEDS + NUM_CARS; i++)
	{
		Actor_street[i] = rand() % NUM_STREETS;
		Actor_progress[i] = rand() % 10;
		Car_max_velocity[i] = rand() % 20 + 65;
	}

	for (int i = 0; i < NUM_PEDS; i++)
	{
		Actor_tag[i] = TAG_Pedestrian;
		Actor_id[i] = i;
	}

	for (int i = NUM_PEDS; i < NUM_PEDS + NUM_CARS; i++)
	{
		Actor_tag[i] = TAG_Car;
		Actor_id[i] = i;
	}

	std::srand(42);
#if !(REORDER)
	random_shuffle(Actor_tag, Actor_tag + NUM_CARS + NUM_PEDS);
#endif

	// jobs (dummy)
	int *jobs = new int[NUM_PEDS + NUM_CARS];

	for (int i = 0; i < NUM_CARS + NUM_PEDS; i++)
	{
		jobs[i] = i;
	}

	// random numbers
	int *randomn = new int[NUM_STREETS];
	for (int i = 0; i < NUM_STREETS; i++)
	{
		randomn[i] = rand() % NUM_STREETS; 
	}

	printf("Scenario set up.\n");

	printf("Copying data to GPU...\n");
	float *v_d_Actor_progress;
	int *v_d_Actor_street;
	float *v_d_Car_max_velocity;
	float *v_d_Street_length;
	float *v_d_Street_max_velocity;
	int *v_d_Street_neighbors;
	int *v_d_Array_Street_size;
	int *v_d_Array_Street_offset;
	int *v_d_Array_Street_arrays;
	int *v_d_input_actor_tag;
	int *v_d_input_actor_id;
	int *v_d_jobs;
	int *v_d_randomn;

	CudaSafeCall(cudaMalloc((void**) &v_d_Actor_progress, sizeof(float) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(cudaMalloc((void**) &v_d_Actor_street, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(cudaMalloc((void**) &v_d_Car_max_velocity, sizeof(float) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(cudaMalloc((void**) &v_d_Street_length, sizeof(float) * NUM_STREETS));
	CudaSafeCall(cudaMalloc((void**) &v_d_Street_max_velocity, sizeof(float) * NUM_STREETS));
	CudaSafeCall(cudaMalloc((void**) &v_d_Street_neighbors, sizeof(int) * NUM_STREETS));
	CudaSafeCall(cudaMalloc((void**) &v_d_Array_Street_size, sizeof(int) * NUM_STREETS));
	CudaSafeCall(cudaMalloc((void**) &v_d_Array_Street_offset, sizeof(int) * NUM_STREETS));
	CudaSafeCall(cudaMalloc((void**) &v_d_Array_Street_arrays, sizeof(int) * num_connections));
	CudaSafeCall(cudaMalloc((void**) &v_d_input_actor_tag, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(cudaMalloc((void**) &v_d_input_actor_id, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(cudaMalloc((void**) &v_d_jobs, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(cudaMalloc((void**) &v_d_randomn, sizeof(int) * NUM_STREETS));

	CudaSafeCall(cudaMemcpy(v_d_Actor_progress, &Actor_progress[0], sizeof(float) * (NUM_PEDS + NUM_CARS), cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Actor_street, &Actor_street[0], sizeof(int) * (NUM_PEDS + NUM_CARS), cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Car_max_velocity, &Car_max_velocity[0], sizeof(float) * (NUM_PEDS + NUM_CARS), cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Street_length, &Street_length[0], sizeof(float) * NUM_STREETS, cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Street_max_velocity, &Street_max_velocity[0], sizeof(float) * NUM_STREETS, cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Street_neighbors, &Street_neighbors[0], sizeof(int) * NUM_STREETS, cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Array_Street_size, &Array_Street_size[0], sizeof(int) * NUM_STREETS, cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Array_Street_offset, &Array_Street_offset[0], sizeof(int) * NUM_STREETS, cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_Array_Street_arrays, &Array_Street_arrays[0], sizeof(int) * num_connections, cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_input_actor_tag, &Actor_tag[0], sizeof(int) * (NUM_PEDS + NUM_CARS), cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_input_actor_id, &Actor_id[0], sizeof(int) * (NUM_PEDS + NUM_CARS), cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_jobs, &jobs[0], sizeof(int) * (NUM_PEDS + NUM_CARS), cudaMemcpyHostToDevice));
	CudaSafeCall(cudaMemcpy(v_d_randomn, &randomn[0], sizeof(int) * NUM_STREETS, cudaMemcpyHostToDevice));

	printf("Finished copying data.\n");

	cudaEvent_t start, stop;
	cudaEventCreate(&start);
	cudaEventCreate(&stop);

	printf("Launching kernel...\n");
	cudaEventRecord(start);
	kernel<<<dim3(32), dim3((NUM_PEDS + NUM_CARS) / 32)>>>(GOOD_WEATHER, 1000000, 
		v_d_Actor_progress, v_d_Actor_street, v_d_Car_max_velocity, v_d_Street_length, v_d_Street_max_velocity,
		v_d_Street_neighbors, v_d_Array_Street_size, v_d_Array_Street_offset, v_d_Array_Street_arrays, v_d_input_actor_tag,
		v_d_input_actor_id, v_d_jobs, v_d_randomn);
	CudaCheckError();
	cudaEventRecord(stop);
	cudaEventSynchronize(stop);

	float milliseconds = 0;
	cudaEventElapsedTime(&milliseconds, start, stop);

	CudaCheckError();
	printf("Kernel finished.\n");

	cudaMemcpy(Actor_progress, v_d_Actor_progress, sizeof(float) * (NUM_PEDS + NUM_CARS), cudaMemcpyDeviceToHost);
	for (int i = 0; i < NUM_PEDS + NUM_CARS; i++)
	{
//		printf(" %f ", Actor_progress[i]);
	}

	cudaMemcpy(Actor_street, v_d_Actor_street, sizeof(int) * (NUM_PEDS + NUM_CARS), cudaMemcpyDeviceToHost);
	for (int i = 0; i < NUM_PEDS + NUM_CARS; i++)
	{
//		printf(" %i ", Actor_street[i]);
	}

	printf("\n\n\nElapsed time millis: %f\n", milliseconds);
}

	.file	"tmpxft_0029b98d_00000000-6_benchmark_column_reorder.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2315:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2315:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata._Z14__cudaSafeCall9cudaErrorPKci.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cudaSafeCall() failed at %s:%i : %s\n"
	.section	.text._Z14__cudaSafeCall9cudaErrorPKci,"axG",@progbits,_Z14__cudaSafeCall9cudaErrorPKci,comdat
	.weak	_Z14__cudaSafeCall9cudaErrorPKci
	.type	_Z14__cudaSafeCall9cudaErrorPKci, @function
_Z14__cudaSafeCall9cudaErrorPKci:
.LFB2307:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L2
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movl	%edx, 12(%rsp)
	call	cudaGetErrorString@PLT
	movq	stderr(%rip), %rdi
	movq	%rbx, %rcx
	movl	12(%rsp), %r8d
	movq	%rax, %r9
	leaq	.LC0(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	orl	$-1, %edi
	call	exit@PLT
.L2:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	ret
	.cfi_endproc
.LFE2307:
	.size	_Z14__cudaSafeCall9cudaErrorPKci, .-_Z14__cudaSafeCall9cudaErrorPKci
	.section	.rodata._Z16__cudaCheckErrorPKci.str1.1,"aMS",@progbits,1
.LC1:
	.string	"cudaCheckError() failed at %s:%i : %s\n"
.LC2:
	.string	"cudaCheckError() with sync failed at %s:%i : %s\n"
	.section	.text._Z16__cudaCheckErrorPKci,"axG",@progbits,_Z16__cudaCheckErrorPKci,comdat
	.weak	_Z16__cudaCheckErrorPKci
	.type	_Z16__cudaCheckErrorPKci, @function
_Z16__cudaCheckErrorPKci:
.LFB2308:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 32
	call	cudaGetLastError@PLT
	testl	%eax, %eax
	je	.L9
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movl	%ebp, %r8d
	movq	%rbx, %rcx
	leaq	.LC1(%rip), %rdx
	movq	%rax, %r9
	jmp	.L12
.L9:
	call	cudaDeviceSynchronize@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L8
	call	cudaGetErrorString@PLT
	movl	%ebp, %r8d
	movq	%rbx, %rcx
	leaq	.LC2(%rip), %rdx
	movq	%rax, %r9
.L12:
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	orl	$-1, %edi
	call	exit@PLT
.L8:
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2308:
	.size	_Z16__cudaCheckErrorPKci, .-_Z16__cudaCheckErrorPKci
	.text
	.globl	_Z15method_Car_moveii
	.type	_Z15method_Car_moveii, @function
_Z15method_Car_moveii:
.LFB2309:
	.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
.LFE2309:
	.size	_Z15method_Car_moveii, .-_Z15method_Car_moveii
	.globl	_Z22method_Pedestrian_moveii
	.type	_Z22method_Pedestrian_moveii, @function
_Z22method_Pedestrian_moveii:
.LFB2458:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z15method_Car_moveii
	.cfi_endproc
.LFE2458:
	.size	_Z22method_Pedestrian_moveii, .-_Z22method_Pedestrian_moveii
	.globl	_Z5blockiiii
	.type	_Z5blockiiii, @function
_Z5blockiiii:
.LFB2311:
	.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
.LFE2311:
	.size	_Z5blockiiii, .-_Z5blockiiii
	.globl	_Z59__device_stub__Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_iiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.type	_Z59__device_stub__Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_iiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, @function
_Z59__device_stub__Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_iiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_:
.LFB2337:
	.cfi_startproc
	endbr64
	subq	$312, %rsp
	.cfi_def_cfa_offset 320
	movq	320(%rsp), %rax
	movl	%edi, 108(%rsp)
	leaq	128(%rsp), %rdi
	movl	%esi, 104(%rsp)
	leaq	140(%rsp), %rsi
	movq	%rax, 64(%rsp)
	movq	328(%rsp), %rax
	movq	%rdx, 96(%rsp)
	leaq	112(%rsp), %rdx
	movq	%rax, 56(%rsp)
	movq	336(%rsp), %rax
	movq	%rcx, 88(%rsp)
	leaq	120(%rsp), %rcx
	movq	%rax, 48(%rsp)
	movq	344(%rsp), %rax
	movq	%r8, 80(%rsp)
	movq	%rax, 40(%rsp)
	movq	352(%rsp), %rax
	movq	%r9, 72(%rsp)
	movq	%rax, 32(%rsp)
	movq	360(%rsp), %rax
	movq	%rax, 24(%rsp)
	movq	368(%rsp), %rax
	movq	%rax, 16(%rsp)
	movq	376(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	384(%rsp), %rax
	movq	%rax, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 296(%rsp)
	xorl	%eax, %eax
	leaq	108(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	96(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	88(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 208(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 224(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 232(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 240(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 248(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 256(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 264(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 272(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 280(%rsp)
	movq	%rsp, %rax
	movq	%rax, 288(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 128(%rsp)
	movl	$1, 136(%rsp)
	movq	%rax, 140(%rsp)
	movl	$1, 148(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L19
	pushq	120(%rsp)
	.cfi_def_cfa_offset 328
	leaq	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_(%rip), %rdi
	pushq	120(%rsp)
	.cfi_def_cfa_offset 336
	movq	156(%rsp), %rcx
	movl	164(%rsp), %r8d
	movq	144(%rsp), %rsi
	movl	152(%rsp), %edx
	leaq	192(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 328
	popq	%rdx
	.cfi_def_cfa_offset 320
.L19:
	movq	296(%rsp), %rax
	subq	%fs:40, %rax
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$312, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2337:
	.size	_Z59__device_stub__Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_iiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, .-_Z59__device_stub__Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_iiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.globl	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.type	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, @function
_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_:
.LFB2338:
	.cfi_startproc
	endbr64
	jmp	_Z59__device_stub__Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_iiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.cfi_endproc
.LFE2338:
	.size	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, .-_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"Setting up scenario...\n"
.LC4:
	.string	"Scenario set up.\n"
.LC5:
	.string	"Copying data to GPU...\n"
.LC6:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/prg-titech/array2016-paper/master/benchmarks/benchmark_column_reorder.cu"
.LC7:
	.string	"Finished copying data.\n"
.LC8:
	.string	"Launching kernel...\n"
.LC10:
	.string	"Kernel finished.\n"
.LC11:
	.string	"\n\n\nElapsed time millis: %f\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2312:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%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
	movl	$25, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$248, %rsp
	.cfi_def_cfa_offset 304
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$42, %edi
	call	srand@PLT
	movl	$2000, %edi
	call	_Znam@PLT
	movl	$2000, %edi
	movq	%rax, %r13
	call	_Znam@PLT
	movl	$2000, %edi
	movq	%rax, 32(%rsp)
	call	_Znam@PLT
	movq	%rax, 40(%rsp)
.L25:
	call	rand@PLT
	cltd
	idivl	%ebp
	incl	%edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, 0(%r13,%rbx,4)
	call	rand@PLT
	movl	$40, %ecx
	cltd
	idivl	%ecx
	movq	32(%rsp), %rax
	addl	$45, %edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, (%rax,%rbx,4)
	movq	40(%rsp), %rax
	movl	%ebx, (%rax,%rbx,4)
	incq	%rbx
	cmpq	$500, %rbx
	jne	.L25
	movl	$2000, %edi
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movl	$10, %ebp
	call	_Znam@PLT
	movl	$2000, %edi
	movq	%rax, 48(%rsp)
	call	_Znam@PLT
	movq	%rax, 56(%rsp)
.L26:
	movq	48(%rsp), %rax
	movl	%ebx, (%rax,%r12)
	call	rand@PLT
	cltd
	idivl	%ebp
	movq	56(%rsp), %rax
	incl	%edx
	movl	%edx, (%rax,%r12)
	addq	$4, %r12
	addl	%edx, %ebx
	cmpq	$2000, %r12
	jne	.L26
	movabsq	$2305843009213693950, %rdx
	movslq	%ebx, %rax
	cmpq	%rax, %rdx
	jb	.L27
	salq	$2, %rax
	xorl	%r12d, %r12d
	movl	$500, %ebp
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_Znam@PLT
	movq	%rax, 64(%rsp)
	jmp	.L28
.L27:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	call	__cxa_throw_bad_array_new_length@PLT
.L28:
	cmpl	%r12d, %ebx
	jle	.L47
	call	rand@PLT
	cltd
	idivl	%ebp
	movq	64(%rsp), %rax
	movl	%edx, (%rax,%r12,4)
	incq	%r12
	jmp	.L28
.L47:
	movl	$81920, %edi
	xorl	%ebx, %ebx
	movl	$500, %r15d
	call	_Znam@PLT
	movl	$81920, %edi
	movq	%rax, 16(%rsp)
	call	_Znam@PLT
	movl	$81920, %edi
	movq	%rax, 24(%rsp)
	call	_Znam@PLT
	movl	$81920, %edi
	movq	%rax, %r14
	call	_Znam@PLT
	movl	$81920, %edi
	movq	%rax, %r12
	call	_Znam@PLT
	movq	%rax, %rbp
.L31:
	call	rand@PLT
	cltd
	idivl	%r15d
	movq	16(%rsp), %rax
	movl	%edx, (%rax,%rbx)
	call	rand@PLT
	movl	$10, %ecx
	cltd
	idivl	%ecx
	movq	24(%rsp), %rax
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, (%rax,%rbx)
	call	rand@PLT
	movl	$20, %ecx
	cltd
	idivl	%ecx
	addl	$65, %edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, (%r14,%rbx)
	addq	$4, %rbx
	cmpq	$81920, %rbx
	jne	.L31
	xorl	%edx, %edx
.L32:
	movl	$1, (%r12,%rdx,4)
	movl	%edx, 0(%rbp,%rdx,4)
	incq	%rdx
	cmpq	$16384, %rdx
	jne	.L32
	leaq	65536(%r12), %rsi
	movl	$4096, %ecx
	xorl	%eax, %eax
	movq	%rsi, %rdi
	rep stosl
.L33:
	movl	%edx, 0(%rbp,%rdx,4)
	incq	%rdx
	cmpq	$20480, %rdx
	jne	.L33
	movl	$42, %edi
	call	srand@PLT
	movl	$81920, %edi
	call	_Znam@PLT
	movq	%rax, %r15
	xorl	%eax, %eax
.L34:
	movl	%eax, (%r15,%rax,4)
	incq	%rax
	cmpq	$20480, %rax
	jne	.L34
	movl	$2000, %edi
	xorl	%ebx, %ebx
	call	_Znam@PLT
	movq	%rax, 72(%rsp)
.L35:
	call	rand@PLT
	movl	$500, %ecx
	cltd
	idivl	%ecx
	movq	72(%rsp), %rax
	movl	%edx, (%rax,%rbx,4)
	incq	%rbx
	cmpq	$500, %rbx
	jne	.L35
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	88(%rsp), %rdi
	movl	$81920, %esi
	leaq	.LC6(%rip), %rbx
	call	cudaMalloc@PLT
	movl	$269, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	96(%rsp), %rdi
	movl	$81920, %esi
	call	cudaMalloc@PLT
	movl	$270, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	104(%rsp), %rdi
	movl	$81920, %esi
	call	cudaMalloc@PLT
	movl	$271, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	112(%rsp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	movl	$272, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	120(%rsp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	movl	$273, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	128(%rsp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	movl	$274, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	136(%rsp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	movl	$275, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	144(%rsp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	movl	$276, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	8(%rsp), %rsi
	leaq	152(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	$277, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	160(%rsp), %rdi
	movl	$81920, %esi
	call	cudaMalloc@PLT
	movl	$278, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	168(%rsp), %rdi
	movl	$81920, %esi
	call	cudaMalloc@PLT
	movl	$279, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	176(%rsp), %rdi
	movl	$81920, %esi
	call	cudaMalloc@PLT
	movl	$280, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	184(%rsp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	movl	$281, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	24(%rsp), %rsi
	movq	88(%rsp), %rdi
	movl	$1, %ecx
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	movl	$283, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	16(%rsp), %rsi
	movq	96(%rsp), %rdi
	movl	$1, %ecx
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	movl	$284, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	104(%rsp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	movl	$285, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	112(%rsp), %rdi
	movl	$1, %ecx
	movq	%r13, %rsi
	movl	$2000, %edx
	call	cudaMemcpy@PLT
	movl	$286, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	32(%rsp), %rsi
	movq	120(%rsp), %rdi
	movl	$1, %ecx
	movl	$2000, %edx
	call	cudaMemcpy@PLT
	movl	$287, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	40(%rsp), %rsi
	movl	$1, %ecx
	movq	128(%rsp), %rdi
	movl	$2000, %edx
	call	cudaMemcpy@PLT
	movl	$288, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	56(%rsp), %rsi
	movl	$1, %ecx
	movq	136(%rsp), %rdi
	movl	$2000, %edx
	call	cudaMemcpy@PLT
	movl	$289, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	48(%rsp), %rsi
	movl	$1, %ecx
	movq	144(%rsp), %rdi
	movl	$2000, %edx
	call	cudaMemcpy@PLT
	movl	$290, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	8(%rsp), %rdx
	movq	64(%rsp), %rsi
	movl	$1, %ecx
	movq	152(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$291, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	160(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	movl	$292, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	168(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	movl	$293, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	176(%rsp), %rdi
	movl	$1, %ecx
	movq	%r15, %rsi
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	movl	$294, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	movq	72(%rsp), %rsi
	movl	$1, %ecx
	movq	184(%rsp), %rdi
	movl	$2000, %edx
	call	cudaMemcpy@PLT
	movl	$295, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14__cudaSafeCall9cudaErrorPKci
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	192(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	200(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	192(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$33554437, %edx
	movl	$134217729, %edi
	movl	$1, %ecx
	salq	$7, %rdx
	movl	$1, %esi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$5, %rdi
	movq	%rdx, 220(%rsp)
	movl	$1, 228(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L36
	pushq	%rax
	.cfi_def_cfa_offset 312
	movl	$1000000, %esi
	xorl	%edi, %edi
	pushq	192(%rsp)
	.cfi_def_cfa_offset 320
	pushq	192(%rsp)
	.cfi_def_cfa_offset 328
	pushq	192(%rsp)
	.cfi_def_cfa_offset 336
	pushq	192(%rsp)
	.cfi_def_cfa_offset 344
	pushq	192(%rsp)
	.cfi_def_cfa_offset 352
	pushq	192(%rsp)
	.cfi_def_cfa_offset 360
	pushq	192(%rsp)
	.cfi_def_cfa_offset 368
	pushq	192(%rsp)
	.cfi_def_cfa_offset 376
	pushq	192(%rsp)
	.cfi_def_cfa_offset 384
	movq	192(%rsp), %r9
	movq	184(%rsp), %r8
	movq	176(%rsp), %rcx
	movq	168(%rsp), %rdx
	call	_Z59__device_stub__Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_iiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	addq	$80, %rsp
	.cfi_def_cfa_offset 304
.L36:
	movl	$309, %esi
	movq	%rbx, %rdi
	call	_Z16__cudaCheckErrorPKci
	movq	200(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	200(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	200(%rsp), %rdx
	movq	192(%rsp), %rsi
	leaq	220(%rsp), %rdi
	movl	$0x00000000, 220(%rsp)
	call	cudaEventElapsedTime@PLT
	movl	$316, %esi
	movq	%rbx, %rdi
	call	_Z16__cudaCheckErrorPKci
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	88(%rsp), %rsi
	movq	24(%rsp), %rdi
	movl	$2, %ecx
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	movq	96(%rsp), %rsi
	movq	16(%rsp), %rdi
	movl	$2, %ecx
	movl	$81920, %edx
	call	cudaMemcpy@PLT
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	220(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	je	.L37
.L46:
	call	__stack_chk_fail@PLT
.L37:
	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
.LFE2312:
	.size	main, .-main
	.section	.rodata.str1.1
.LC12:
	.string	"_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_"
.LC13:
	.string	"d_Actor_progress"
.LC14:
	.string	"d_Actor_street"
.LC15:
	.string	"d_Car_max_velocity"
.LC16:
	.string	"d_Street_length"
.LC17:
	.string	"d_Street_max_velocity"
.LC18:
	.string	"d_Street_neighbors"
.LC19:
	.string	"d_Array_Street_size"
.LC20:
	.string	"d_Array_Street_offset"
.LC21:
	.string	"d_Array_Street_arrays"
.LC22:
	.string	"d_input_actor_tag"
.LC23:
	.string	"d_input_actor_id"
.LC24:
	.string	"d_jobs"
.LC25:
	.string	"d_randomn"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2340:
	.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	.LC12(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_(%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	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC13(%rip), %rdx
	movl	$8, %r9d
	leaq	_ZL16d_Actor_progress(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	call	__cudaRegisterVar@PLT
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC14(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL14d_Actor_street(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rsi
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC15(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL18d_Car_max_velocity(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rdi
	.cfi_def_cfa_offset 24
	popq	%r8
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC16(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL15d_Street_length(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r9
	.cfi_def_cfa_offset 24
	popq	%r10
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC17(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL21d_Street_max_velocity(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r11
	.cfi_def_cfa_offset 24
	popq	%rax
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC18(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL18d_Street_neighbors(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC19(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL19d_Array_Street_size(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rsi
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC20(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL21d_Array_Street_offset(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rdi
	.cfi_def_cfa_offset 24
	popq	%r8
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC21(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL21d_Array_Street_arrays(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r9
	.cfi_def_cfa_offset 24
	popq	%r10
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC22(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL17d_input_actor_tag(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r11
	.cfi_def_cfa_offset 24
	popq	%rax
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC23(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL16d_input_actor_id(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC24(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$8, %r9d
	leaq	_ZL6d_jobs(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rsi
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC25(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movl	$8, %r9d
	movq	%rdx, %rcx
	leaq	_ZL9d_randomn(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rdi
	.cfi_def_cfa_offset 24
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%r8
	.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
.LFE2340:
	.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
	.local	_ZL9d_randomn
	.comm	_ZL9d_randomn,8,8
	.local	_ZL6d_jobs
	.comm	_ZL6d_jobs,8,8
	.local	_ZL16d_input_actor_id
	.comm	_ZL16d_input_actor_id,8,8
	.local	_ZL17d_input_actor_tag
	.comm	_ZL17d_input_actor_tag,8,8
	.local	_ZL21d_Array_Street_arrays
	.comm	_ZL21d_Array_Street_arrays,8,8
	.local	_ZL21d_Array_Street_offset
	.comm	_ZL21d_Array_Street_offset,8,8
	.local	_ZL19d_Array_Street_size
	.comm	_ZL19d_Array_Street_size,8,8
	.local	_ZL18d_Street_neighbors
	.comm	_ZL18d_Street_neighbors,8,8
	.local	_ZL21d_Street_max_velocity
	.comm	_ZL21d_Street_max_velocity,8,8
	.local	_ZL15d_Street_length
	.comm	_ZL15d_Street_length,8,8
	.local	_ZL18d_Car_max_velocity
	.comm	_ZL18d_Car_max_velocity,8,8
	.local	_ZL14d_Actor_street
	.comm	_ZL14d_Actor_street,8,8
	.local	_ZL16d_Actor_progress
	.comm	_ZL16d_Actor_progress,8,8
	.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 REORDER 1

#define GOOD_WEATHER 0
#define BAD_WEATHER 1

#define TAG_Car 0
#define TAG_Pedestrian 1


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//#include <random>
//#include <array> 
#include <algorithm> 

#define NUM_CARS 4096
#define NUM_PEDS 16384
#define NUM_STREETS 500
#define MAX_CONNECTIONS 10
#define MAX_LEN 25

using namespace std;

// Define this to turn on error checking
#define CUDA_ERROR_CHECK

#define CudaSafeCall( err ) __cudaSafeCall( err, __FILE__, __LINE__ )
#define CudaCheckError()    __cudaCheckError( __FILE__, __LINE__ )

inline void __cudaSafeCall( hipError_t err, const char *file, const int line )
{
#ifdef CUDA_ERROR_CHECK
    if ( hipSuccess != err )
    {
        fprintf( stderr, "cudaSafeCall() failed at %s:%i : %s\n",
                 file, line, hipGetErrorString( err ) );
        exit( -1 );
    }
#endif

    return;
}

inline void __cudaCheckError( const char *file, const int line )
{
#ifdef CUDA_ERROR_CHECK
    hipError_t err = hipGetLastError();
    if ( hipSuccess != err )
    {
        fprintf( stderr, "cudaCheckError() failed at %s:%i : %s\n",
                 file, line, hipGetErrorString( err ) );
        exit( -1 );
    }

    // More careful checking. However, this will affect performance.
    // Comment away if needed.
    err = hipDeviceSynchronize();
    if( hipSuccess != err )
    {
        fprintf( stderr, "cudaCheckError() with sync failed at %s:%i : %s\n",
                 file, line, hipGetErrorString( err ) );
        exit( -1 );
    }
#endif

    return;
}

__device__ float *d_Actor_progress;
__device__ int *d_Actor_street;
__device__ float *d_Car_max_velocity;
__device__ float *d_Street_length;
__device__ float *d_Street_max_velocity;
__device__ int *d_Street_neighbors;
__device__ int *d_Array_Street_size;
__device__ int *d_Array_Street_offset;
__device__ int *d_Array_Street_arrays;
__device__ int *d_input_actor_tag;
__device__ int *d_input_actor_id;
__device__ int *d_jobs;
__device__ int *d_randomn;

__device__ void method_Car_move(int actor_id, int weather)
{
	float weather_multiplier;
	if (weather == GOOD_WEATHER) 
	{
		weather_multiplier = 1.0;
	}
	else if (weather == BAD_WEATHER)
	{
		weather_multiplier = 0.75;
	}

	float speed = min(d_Car_max_velocity[actor_id], d_Street_max_velocity[d_Actor_street[actor_id]]) * weather_multiplier;
	d_Actor_progress[actor_id] = d_Actor_progress[actor_id] + (speed / 60.0); /* 1 tick = 1 minute */

	if (d_Actor_progress[actor_id] >= d_Street_length[d_Actor_street[actor_id]])
	{
		// move to different street
		int array_id = d_Street_neighbors[d_Actor_street[actor_id]];
		int neighbor_index = d_randomn[d_Actor_street[actor_id]] % d_Array_Street_size[array_id];
		d_Actor_street[actor_id] = d_Array_Street_arrays[d_Array_Street_offset[array_id] + neighbor_index];
		d_Actor_progress[actor_id] = 0.0f;
	}
}

__device__ void method_Pedestrian_move(int actor_id, int weather)
{
	float speed = d_randomn[((int) (d_Actor_progress[actor_id]*d_Actor_progress[actor_id])) % NUM_STREETS] % 7 - 2;
	d_Actor_progress[actor_id] = d_Actor_progress[actor_id] + (speed / 60.0);

	if (d_Actor_progress[actor_id] >= d_Street_length[d_Actor_street[actor_id]])
	{
		// move to different street
		int array_id = d_Street_neighbors[d_Actor_street[actor_id]];
		int neighbor_index = d_randomn[d_Actor_street[actor_id]] % d_Array_Street_size[array_id];
		d_Actor_street[actor_id] = d_Array_Street_arrays[d_Array_Street_offset[array_id] + neighbor_index];
		d_Actor_progress[actor_id] = 0.0f;
	}
}

__device__ void block(int actor_tag, int actor_id, int weather, int ticks)
{
	for (int i = 0; i < ticks; i++)
	{
		switch (actor_tag)
		{
			case TAG_Car:
				method_Car_move(actor_id, weather);
				break;
			case TAG_Pedestrian:
				method_Pedestrian_move(actor_id, weather);
				break;
		}
	}
}

__global__ void kernel(int weather,	int ticks,
	float *v_d_Actor_progress, int *v_d_Actor_street, float *v_d_Car_max_velocity,
	float *v_d_Street_length, float *v_d_Street_max_velocity, int *v_d_Street_neighbors,
	int *v_d_Array_Street_size, int *v_d_Array_Street_offset, int *v_d_Array_Street_arrays,
	int *v_d_input_actor_tag, int *v_d_input_actor_id, int *v_d_jobs, int *v_d_randomn)
{
	d_Actor_progress = v_d_Actor_progress;
	d_Actor_street = v_d_Actor_street;
	d_Car_max_velocity = v_d_Car_max_velocity;
	d_Street_length = v_d_Street_length;
	d_Street_max_velocity = v_d_Street_max_velocity;
	d_Street_neighbors = v_d_Street_neighbors;
	d_Array_Street_size = v_d_Array_Street_size;
	d_Array_Street_offset = v_d_Array_Street_offset;
	d_Array_Street_arrays = v_d_Array_Street_arrays;
	d_input_actor_tag = v_d_input_actor_tag;
	d_input_actor_id = v_d_input_actor_id;
	d_jobs = v_d_jobs;
	d_randomn = v_d_randomn;

	int tid = blockIdx.x * blockDim.x + threadIdx.x;

	__syncthreads();

#if (REORDER)
	block(d_input_actor_tag[d_jobs[tid]], d_input_actor_id[d_jobs[tid]], weather, ticks);
#else
	block(d_input_actor_tag[tid], d_input_actor_id[tid], weather, ticks);
#endif
}

int main()
{
	printf("Setting up scenario...\n");
	srand(42);

	// streets
	float *Street_length = new float[NUM_STREETS];
	float *Street_max_velocity = new float[NUM_STREETS];
	int *Street_neighbors = new int[NUM_STREETS];

	for (int i = 0; i < NUM_STREETS; i++)
	{
		Street_length[i] = rand() % MAX_LEN + 1;
		Street_max_velocity[i] = rand() % 40 + 45;	/* speed between 45 and 105 */
		Street_neighbors[i] = i;
	}

	// neighbors
	int *Array_Street_offset = new int[NUM_STREETS];
	int *Array_Street_size = new int[NUM_STREETS];
	int num_connections = 0;

	for (int i = 0; i < NUM_STREETS; i++)
	{
		Array_Street_offset[i] = num_connections;
		int connections = rand() % MAX_CONNECTIONS + 1;
		Array_Street_size[i] = connections;
		num_connections += connections;
	}

	int *Array_Street_arrays = new int[num_connections];
	for (int i = 0; i < num_connections; i++)
	{
		Array_Street_arrays[i] = rand() % NUM_STREETS;
	}

	// actors
	int *Actor_street = new int[NUM_PEDS + NUM_CARS];
	float *Actor_progress = new float[NUM_PEDS + NUM_CARS];
	float *Car_max_velocity = new float[NUM_CARS + NUM_PEDS];
	int *Actor_tag = new int[NUM_PEDS + NUM_CARS];
	int *Actor_id = new int[NUM_PEDS + NUM_CARS];

	for (int i = 0; i < NUM_PEDS + NUM_CARS; i++)
	{
		Actor_street[i] = rand() % NUM_STREETS;
		Actor_progress[i] = rand() % 10;
		Car_max_velocity[i] = rand() % 20 + 65;
	}

	for (int i = 0; i < NUM_PEDS; i++)
	{
		Actor_tag[i] = TAG_Pedestrian;
		Actor_id[i] = i;
	}

	for (int i = NUM_PEDS; i < NUM_PEDS + NUM_CARS; i++)
	{
		Actor_tag[i] = TAG_Car;
		Actor_id[i] = i;
	}

	std::srand(42);
#if !(REORDER)
	random_shuffle(Actor_tag, Actor_tag + NUM_CARS + NUM_PEDS);
#endif

	// jobs (dummy)
	int *jobs = new int[NUM_PEDS + NUM_CARS];

	for (int i = 0; i < NUM_CARS + NUM_PEDS; i++)
	{
		jobs[i] = i;
	}

	// random numbers
	int *randomn = new int[NUM_STREETS];
	for (int i = 0; i < NUM_STREETS; i++)
	{
		randomn[i] = rand() % NUM_STREETS; 
	}

	printf("Scenario set up.\n");

	printf("Copying data to GPU...\n");
	float *v_d_Actor_progress;
	int *v_d_Actor_street;
	float *v_d_Car_max_velocity;
	float *v_d_Street_length;
	float *v_d_Street_max_velocity;
	int *v_d_Street_neighbors;
	int *v_d_Array_Street_size;
	int *v_d_Array_Street_offset;
	int *v_d_Array_Street_arrays;
	int *v_d_input_actor_tag;
	int *v_d_input_actor_id;
	int *v_d_jobs;
	int *v_d_randomn;

	CudaSafeCall(hipMalloc((void**) &v_d_Actor_progress, sizeof(float) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(hipMalloc((void**) &v_d_Actor_street, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(hipMalloc((void**) &v_d_Car_max_velocity, sizeof(float) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(hipMalloc((void**) &v_d_Street_length, sizeof(float) * NUM_STREETS));
	CudaSafeCall(hipMalloc((void**) &v_d_Street_max_velocity, sizeof(float) * NUM_STREETS));
	CudaSafeCall(hipMalloc((void**) &v_d_Street_neighbors, sizeof(int) * NUM_STREETS));
	CudaSafeCall(hipMalloc((void**) &v_d_Array_Street_size, sizeof(int) * NUM_STREETS));
	CudaSafeCall(hipMalloc((void**) &v_d_Array_Street_offset, sizeof(int) * NUM_STREETS));
	CudaSafeCall(hipMalloc((void**) &v_d_Array_Street_arrays, sizeof(int) * num_connections));
	CudaSafeCall(hipMalloc((void**) &v_d_input_actor_tag, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(hipMalloc((void**) &v_d_input_actor_id, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(hipMalloc((void**) &v_d_jobs, sizeof(int) * (NUM_PEDS + NUM_CARS)));
	CudaSafeCall(hipMalloc((void**) &v_d_randomn, sizeof(int) * NUM_STREETS));

	CudaSafeCall(hipMemcpy(v_d_Actor_progress, &Actor_progress[0], sizeof(float) * (NUM_PEDS + NUM_CARS), hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Actor_street, &Actor_street[0], sizeof(int) * (NUM_PEDS + NUM_CARS), hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Car_max_velocity, &Car_max_velocity[0], sizeof(float) * (NUM_PEDS + NUM_CARS), hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Street_length, &Street_length[0], sizeof(float) * NUM_STREETS, hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Street_max_velocity, &Street_max_velocity[0], sizeof(float) * NUM_STREETS, hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Street_neighbors, &Street_neighbors[0], sizeof(int) * NUM_STREETS, hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Array_Street_size, &Array_Street_size[0], sizeof(int) * NUM_STREETS, hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Array_Street_offset, &Array_Street_offset[0], sizeof(int) * NUM_STREETS, hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_Array_Street_arrays, &Array_Street_arrays[0], sizeof(int) * num_connections, hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_input_actor_tag, &Actor_tag[0], sizeof(int) * (NUM_PEDS + NUM_CARS), hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_input_actor_id, &Actor_id[0], sizeof(int) * (NUM_PEDS + NUM_CARS), hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_jobs, &jobs[0], sizeof(int) * (NUM_PEDS + NUM_CARS), hipMemcpyHostToDevice));
	CudaSafeCall(hipMemcpy(v_d_randomn, &randomn[0], sizeof(int) * NUM_STREETS, hipMemcpyHostToDevice));

	printf("Finished copying data.\n");

	hipEvent_t start, stop;
	hipEventCreate(&start);
	hipEventCreate(&stop);

	printf("Launching kernel...\n");
	hipEventRecord(start);
	kernel<<<dim3(32), dim3((NUM_PEDS + NUM_CARS) / 32)>>>(GOOD_WEATHER, 1000000, 
		v_d_Actor_progress, v_d_Actor_street, v_d_Car_max_velocity, v_d_Street_length, v_d_Street_max_velocity,
		v_d_Street_neighbors, v_d_Array_Street_size, v_d_Array_Street_offset, v_d_Array_Street_arrays, v_d_input_actor_tag,
		v_d_input_actor_id, v_d_jobs, v_d_randomn);
	CudaCheckError();
	hipEventRecord(stop);
	hipEventSynchronize(stop);

	float milliseconds = 0;
	hipEventElapsedTime(&milliseconds, start, stop);

	CudaCheckError();
	printf("Kernel finished.\n");

	hipMemcpy(Actor_progress, v_d_Actor_progress, sizeof(float) * (NUM_PEDS + NUM_CARS), hipMemcpyDeviceToHost);
	for (int i = 0; i < NUM_PEDS + NUM_CARS; i++)
	{
//		printf(" %f ", Actor_progress[i]);
	}

	hipMemcpy(Actor_street, v_d_Actor_street, sizeof(int) * (NUM_PEDS + NUM_CARS), hipMemcpyDeviceToHost);
	for (int i = 0; i < NUM_PEDS + NUM_CARS; i++)
	{
//		printf(" %i ", Actor_street[i]);
	}

	printf("\n\n\nElapsed time millis: %f\n", milliseconds);
}

	.text
	.file	"benchmark_column_reorder.hip"
	.globl	_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_ # -- Begin function _Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.type	_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_,@function
_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_: # @_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.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	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	56(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	48(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%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	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	$_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, %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	_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, .Lfunc_end0-_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function 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	$42, %edi
	callq	srand
	movl	$2000, %edi                     # imm = 0x7D0
	callq	_Znam
	movq	%rax, %r12
	movl	$2000, %edi                     # imm = 0x7D0
	callq	_Znam
	movq	%rax, %r15
	movl	$2000, %edi                     # imm = 0x7D0
	callq	_Znam
	movq	%rax, %r14
	xorl	%ebx, %ebx
.LBB1_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$1374389535, %rax, %rcx         # imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$35, %rcx
	addl	%edx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	leal	(%rcx,%rcx,4), %ecx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%r12,%rbx,4)
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$36, %rcx
	addl	%edx, %ecx
	shll	$3, %ecx
	leal	(%rcx,%rcx,4), %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$45, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%r15,%rbx,4)
	movl	%ebx, (%r14,%rbx,4)
	incq	%rbx
	cmpq	$500, %rbx                      # imm = 0x1F4
	jne	.LBB1_1
# %bb.2:
	movq	%r15, 176(%rsp)                 # 8-byte Spill
	movq	%r14, 168(%rsp)                 # 8-byte Spill
	movl	$2000, %edi                     # imm = 0x7D0
	callq	_Znam
	movq	%rax, %rbx
	movl	$2000, %edi                     # imm = 0x7D0
	callq	_Znam
	movq	%rax, %r13
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
.LBB1_3:                                # =>This Inner Loop Header: Depth=1
	movl	%r14d, (%rbx,%r15,4)
	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
	movl	%eax, %edx
	subl	%ecx, %edx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	movl	%eax, (%r13,%r15,4)
	addl	%edx, %r14d
	incl	%r14d
	incq	%r15
	cmpq	$500, %r15                      # imm = 0x1F4
	jne	.LBB1_3
# %bb.4:
	movq	%r13, 160(%rsp)                 # 8-byte Spill
	movq	%rbx, 152(%rsp)                 # 8-byte Spill
	movq	%r12, 184(%rsp)                 # 8-byte Spill
	movslq	%r14d, %rbx
	leaq	(,%rbx,4), %rax
	testl	%ebx, %ebx
	movq	$-1, %rdi
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	cmovnsq	%rax, %rdi
	callq	_Znam
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.LBB1_7
# %bb.5:                                # %.lr.ph.preheader
	movl	%r14d, %r14d
	xorl	%ebx, %ebx
.LBB1_6:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$500, %ecx, %ecx                # imm = 0x1F4
	subl	%ecx, %eax
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	.LBB1_6
.LBB1_7:                                # %._crit_edge
	movq	%r15, 144(%rsp)                 # 8-byte Spill
	movl	$81920, %edi                    # imm = 0x14000
	callq	_Znam
	movq	%rax, %rbp
	movl	$81920, %edi                    # imm = 0x14000
	callq	_Znam
	movq	%rax, %rbx
	movl	$81920, %edi                    # imm = 0x14000
	callq	_Znam
	movq	%rax, %r12
	movl	$81920, %edi                    # imm = 0x14000
	callq	_Znam
	movq	%rax, %r15
	movl	$81920, %edi                    # imm = 0x14000
	callq	_Znam
	movq	%rax, %r14
	xorl	%r13d, %r13d
.LBB1_8:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$500, %ecx, %ecx                # imm = 0x1F4
	subl	%ecx, %eax
	movl	%eax, (%rbp,%r13,4)
	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
	subl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%rbx,%r13,4)
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$35, %rcx
	addl	%edx, %ecx
	shll	$2, %ecx
	leal	(%rcx,%rcx,4), %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$65, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%r12,%r13,4)
	incq	%r13
	cmpq	$20480, %r13                    # imm = 0x5000
	jne	.LBB1_8
# %bb.9:                                # %.preheader151.preheader
	movq	%rbx, 40(%rsp)                  # 8-byte Spill
	xorl	%eax, %eax
.LBB1_10:                               # %.preheader151
                                        # =>This Inner Loop Header: Depth=1
	movl	$1, (%r15,%rax,4)
	movl	%eax, (%r14,%rax,4)
	incq	%rax
	cmpq	$16384, %rax                    # imm = 0x4000
	jne	.LBB1_10
# %bb.11:                               # %.preheader.preheader
	movq	%r15, %rdi
	addq	$65536, %rdi                    # imm = 0x10000
	movl	$16384, %ebx                    # imm = 0x4000
	movl	$16384, %edx                    # imm = 0x4000
	xorl	%esi, %esi
	callq	memset@PLT
.LBB1_12:                               # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, (%r14,%rbx,4)
	incq	%rbx
	cmpq	$20480, %rbx                    # imm = 0x5000
	jne	.LBB1_12
# %bb.13:
	movq	%rbp, 32(%rsp)                  # 8-byte Spill
	movl	$42, %edi
	callq	srand
	movl	$81920, %edi                    # imm = 0x14000
	callq	_Znam
	movq	%rax, %r13
	xorl	%eax, %eax
.LBB1_14:                               # =>This Inner Loop Header: Depth=1
	movl	%eax, (%r13,%rax,4)
	incq	%rax
	cmpq	$20480, %rax                    # imm = 0x5000
	jne	.LBB1_14
# %bb.15:
	movl	$2000, %edi                     # imm = 0x7D0
	callq	_Znam
	movq	%rax, %rbp
	xorl	%ebx, %ebx
.LBB1_16:                               # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$500, %ecx, %ecx                # imm = 0x1F4
	subl	%ecx, %eax
	movl	%eax, (%rbp,%rbx,4)
	incq	%rbx
	cmpq	$500, %rbx                      # imm = 0x1F4
	jne	.LBB1_16
# %bb.17:
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	leaq	16(%rsp), %rdi
	movl	$81920, %esi                    # imm = 0x14000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_18
# %bb.19:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit
	leaq	8(%rsp), %rdi
	movl	$81920, %esi                    # imm = 0x14000
	callq	hipMalloc
	testl	%eax, %eax
	movq	40(%rsp), %rbx                  # 8-byte Reload
	jne	.LBB1_20
# %bb.21:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit95
	leaq	136(%rsp), %rdi
	movl	$81920, %esi                    # imm = 0x14000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_22
# %bb.23:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit97
	leaq	128(%rsp), %rdi
	movl	$2000, %esi                     # imm = 0x7D0
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_24
# %bb.25:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit99
	leaq	120(%rsp), %rdi
	movl	$2000, %esi                     # imm = 0x7D0
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_26
# %bb.27:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit101
	leaq	112(%rsp), %rdi
	movl	$2000, %esi                     # imm = 0x7D0
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_28
# %bb.29:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit103
	leaq	104(%rsp), %rdi
	movl	$2000, %esi                     # imm = 0x7D0
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_30
# %bb.31:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit105
	leaq	96(%rsp), %rdi
	movl	$2000, %esi                     # imm = 0x7D0
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_32
# %bb.33:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit107
	leaq	88(%rsp), %rdi
	movq	48(%rsp), %rsi                  # 8-byte Reload
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_34
# %bb.35:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit109
	leaq	80(%rsp), %rdi
	movl	$81920, %esi                    # imm = 0x14000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_36
# %bb.37:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit111
	leaq	72(%rsp), %rdi
	movl	$81920, %esi                    # imm = 0x14000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_38
# %bb.39:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit113
	leaq	64(%rsp), %rdi
	movl	$81920, %esi                    # imm = 0x14000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_40
# %bb.41:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit115
	leaq	56(%rsp), %rdi
	movl	$2000, %esi                     # imm = 0x7D0
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_42
# %bb.43:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit117
	movq	16(%rsp), %rdi
	movl	$81920, %edx                    # imm = 0x14000
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_44
# %bb.45:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit119
	movq	8(%rsp), %rdi
	movl	$81920, %edx                    # imm = 0x14000
	movq	32(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_46
# %bb.47:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit121
	movq	136(%rsp), %rdi
	movl	$81920, %edx                    # imm = 0x14000
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_48
# %bb.49:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit123
	movq	128(%rsp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	184(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_50
# %bb.51:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit125
	movq	120(%rsp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	176(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_52
# %bb.53:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit127
	movq	112(%rsp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	168(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_54
# %bb.55:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit129
	movq	104(%rsp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	160(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_56
# %bb.57:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit131
	movq	96(%rsp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	152(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_58
# %bb.59:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit133
	movq	88(%rsp), %rdi
	movq	144(%rsp), %rsi                 # 8-byte Reload
	movq	48(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_60
# %bb.61:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit135
	movq	80(%rsp), %rdi
	movl	$81920, %edx                    # imm = 0x14000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_62
# %bb.63:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit137
	movq	72(%rsp), %rdi
	movl	$81920, %edx                    # imm = 0x14000
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_64
# %bb.65:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit139
	movq	64(%rsp), %rdi
	movl	$81920, %edx                    # imm = 0x14000
	movq	%r13, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_66
# %bb.67:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit141
	movq	56(%rsp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%rbp, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_68
# %bb.69:                               # %_Z14__cudaSafeCall10hipError_tPKci.exit143
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	leaq	192(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventCreate
	movq	%rsp, %rdi
	callq	hipEventCreate
	movl	$.Lstr.4, %edi
	callq	puts@PLT
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movabsq	$4294967328, %rdi               # imm = 0x100000020
	leaq	608(%rdi), %rdx
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	movq	32(%rsp), %rbx                  # 8-byte Reload
	jne	.LBB1_71
# %bb.70:
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rcx
	movq	136(%rsp), %r8
	movq	128(%rsp), %r9
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	xorl	%edi, %edi
	movl	$1000000, %esi                  # imm = 0xF4240
	pushq	64(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	80(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	96(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	112(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	128(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	144(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	160(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	192(%rsp)
	.cfi_adjust_cfa_offset 8
	callq	_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	addq	$80, %rsp
	.cfi_adjust_cfa_offset -80
.LBB1_71:
	callq	hipGetLastError
	testl	%eax, %eax
	jne	.LBB1_72
# %bb.75:
	callq	hipDeviceSynchronize
	testl	%eax, %eax
	jne	.LBB1_76
# %bb.77:                               # %_Z16__cudaCheckErrorPKci.exit
	movq	(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rsp), %rdi
	callq	hipEventSynchronize
	leaq	28(%rsp), %rdi
	movl	$0, (%rdi)
	movq	192(%rsp), %rsi
	movq	(%rsp), %rdx
	callq	hipEventElapsedTime
	callq	hipGetLastError
	testl	%eax, %eax
	jne	.LBB1_78
# %bb.80:
	callq	hipDeviceSynchronize
	testl	%eax, %eax
	jne	.LBB1_81
# %bb.82:                               # %_Z16__cudaCheckErrorPKci.exit147
	movl	$.Lstr.5, %edi
	callq	puts@PLT
	movq	16(%rsp), %rsi
	movl	$81920, %edx                    # imm = 0x14000
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	movq	8(%rsp), %rsi
	movl	$81920, %edx                    # imm = 0x14000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	cvtss2sd	28(%rsp), %xmm0
	movl	$.L.str.7, %edi
	movb	$1, %al
	callq	printf
	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
.LBB1_18:
	.cfi_def_cfa_offset 256
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$271, %ecx                      # imm = 0x10F
	jmp	.LBB1_74
.LBB1_20:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$272, %ecx                      # imm = 0x110
	jmp	.LBB1_74
.LBB1_22:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$273, %ecx                      # imm = 0x111
	jmp	.LBB1_74
.LBB1_24:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$274, %ecx                      # imm = 0x112
	jmp	.LBB1_74
.LBB1_26:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$275, %ecx                      # imm = 0x113
	jmp	.LBB1_74
.LBB1_28:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$276, %ecx                      # imm = 0x114
	jmp	.LBB1_74
.LBB1_30:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$277, %ecx                      # imm = 0x115
	jmp	.LBB1_74
.LBB1_32:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$278, %ecx                      # imm = 0x116
	jmp	.LBB1_74
.LBB1_34:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$279, %ecx                      # imm = 0x117
	jmp	.LBB1_74
.LBB1_36:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$280, %ecx                      # imm = 0x118
	jmp	.LBB1_74
.LBB1_38:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$281, %ecx                      # imm = 0x119
	jmp	.LBB1_74
.LBB1_40:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$282, %ecx                      # imm = 0x11A
	jmp	.LBB1_74
.LBB1_42:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$283, %ecx                      # imm = 0x11B
	jmp	.LBB1_74
.LBB1_44:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$285, %ecx                      # imm = 0x11D
	jmp	.LBB1_74
.LBB1_46:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$286, %ecx                      # imm = 0x11E
	jmp	.LBB1_74
.LBB1_48:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$287, %ecx                      # imm = 0x11F
	jmp	.LBB1_74
.LBB1_50:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$288, %ecx                      # imm = 0x120
	jmp	.LBB1_74
.LBB1_52:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$289, %ecx                      # imm = 0x121
	jmp	.LBB1_74
.LBB1_54:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$290, %ecx                      # imm = 0x122
	jmp	.LBB1_74
.LBB1_56:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$291, %ecx                      # imm = 0x123
	jmp	.LBB1_74
.LBB1_58:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$292, %ecx                      # imm = 0x124
	jmp	.LBB1_74
.LBB1_60:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$293, %ecx                      # imm = 0x125
	jmp	.LBB1_74
.LBB1_62:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$294, %ecx                      # imm = 0x126
	jmp	.LBB1_74
.LBB1_64:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$295, %ecx                      # imm = 0x127
	jmp	.LBB1_74
.LBB1_66:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$296, %ecx                      # imm = 0x128
	jmp	.LBB1_74
.LBB1_68:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.8, %esi
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$297, %ecx                      # imm = 0x129
	jmp	.LBB1_74
.LBB1_72:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.9, %esi
	jmp	.LBB1_73
.LBB1_76:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
.LBB1_73:
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$311, %ecx                      # imm = 0x137
	jmp	.LBB1_74
.LBB1_78:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.9, %esi
	jmp	.LBB1_79
.LBB1_81:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
.LBB1_79:
	movl	$.L.str.3, %edx
	movq	%rbx, %rdi
	movl	$318, %ecx                      # imm = 0x13E
.LBB1_74:
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	fprintf
	movl	$-1, %edi
	callq	exit
.Lfunc_end1:
	.size	main, .Lfunc_end1-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:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB2_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB2_2:
	subq	$32, %rsp
	.cfi_adjust_cfa_offset 32
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
	movl	$d_Actor_progress, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Actor_street, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Car_max_velocity, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Street_length, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Street_max_velocity, %esi
	movl	$.L__unnamed_6, %edx
	movl	$.L__unnamed_6, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Street_neighbors, %esi
	movl	$.L__unnamed_7, %edx
	movl	$.L__unnamed_7, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Array_Street_size, %esi
	movl	$.L__unnamed_8, %edx
	movl	$.L__unnamed_8, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Array_Street_offset, %esi
	movl	$.L__unnamed_9, %edx
	movl	$.L__unnamed_9, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_Array_Street_arrays, %esi
	movl	$.L__unnamed_10, %edx
	movl	$.L__unnamed_10, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_input_actor_tag, %esi
	movl	$.L__unnamed_11, %edx
	movl	$.L__unnamed_11, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_input_actor_id, %esi
	movl	$.L__unnamed_12, %edx
	movl	$.L__unnamed_12, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_jobs, %esi
	movl	$.L__unnamed_13, %edx
	movl	$.L__unnamed_13, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$d_randomn, %esi
	movl	$.L__unnamed_14, %edx
	movl	$.L__unnamed_14, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_adjust_cfa_offset 8
	pushq	$0
	.cfi_adjust_cfa_offset 8
	callq	__hipRegisterVar
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$__hip_module_dtor, %edi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end2:
	.size	__hip_module_ctor, .Lfunc_end2-__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	.LBB3_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
.LBB3_2:
	retq
.Lfunc_end3:
	.size	__hip_module_dtor, .Lfunc_end3-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	d_Actor_progress,@object        # @d_Actor_progress
	.local	d_Actor_progress
	.comm	d_Actor_progress,8,8
	.type	d_Actor_street,@object          # @d_Actor_street
	.local	d_Actor_street
	.comm	d_Actor_street,8,8
	.type	d_Car_max_velocity,@object      # @d_Car_max_velocity
	.local	d_Car_max_velocity
	.comm	d_Car_max_velocity,8,8
	.type	d_Street_length,@object         # @d_Street_length
	.local	d_Street_length
	.comm	d_Street_length,8,8
	.type	d_Street_max_velocity,@object   # @d_Street_max_velocity
	.local	d_Street_max_velocity
	.comm	d_Street_max_velocity,8,8
	.type	d_Street_neighbors,@object      # @d_Street_neighbors
	.local	d_Street_neighbors
	.comm	d_Street_neighbors,8,8
	.type	d_Array_Street_size,@object     # @d_Array_Street_size
	.local	d_Array_Street_size
	.comm	d_Array_Street_size,8,8
	.type	d_Array_Street_offset,@object   # @d_Array_Street_offset
	.local	d_Array_Street_offset
	.comm	d_Array_Street_offset,8,8
	.type	d_Array_Street_arrays,@object   # @d_Array_Street_arrays
	.local	d_Array_Street_arrays
	.comm	d_Array_Street_arrays,8,8
	.type	d_input_actor_tag,@object       # @d_input_actor_tag
	.local	d_input_actor_tag
	.comm	d_input_actor_tag,8,8
	.type	d_input_actor_id,@object        # @d_input_actor_id
	.local	d_input_actor_id
	.comm	d_input_actor_id,8,8
	.type	d_jobs,@object                  # @d_jobs
	.local	d_jobs
	.comm	d_jobs,8,8
	.type	d_randomn,@object               # @d_randomn
	.local	d_randomn
	.comm	d_randomn,8,8
	.type	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_,@object # @_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.section	.rodata,"a",@progbits
	.globl	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.p2align	3, 0x0
_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_:
	.quad	_Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.size	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, 8

	.type	.L.str.3,@object                # @.str.3
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.3:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/prg-titech/array2016-paper/master/benchmarks/benchmark_column_reorder.hip"
	.size	.L.str.3, 136

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"\n\n\nElapsed time millis: %f\n"
	.size	.L.str.7, 28

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"cudaSafeCall() failed at %s:%i : %s\n"
	.size	.L.str.8, 37

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"cudaCheckError() failed at %s:%i : %s\n"
	.size	.L.str.9, 39

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"cudaCheckError() with sync failed at %s:%i : %s\n"
	.size	.L.str.10, 49

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_"
	.size	.L__unnamed_1, 46

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"d_Actor_progress"
	.size	.L__unnamed_2, 17

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"d_Actor_street"
	.size	.L__unnamed_3, 15

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"d_Car_max_velocity"
	.size	.L__unnamed_4, 19

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"d_Street_length"
	.size	.L__unnamed_5, 16

	.type	.L__unnamed_6,@object           # @5
.L__unnamed_6:
	.asciz	"d_Street_max_velocity"
	.size	.L__unnamed_6, 22

	.type	.L__unnamed_7,@object           # @6
.L__unnamed_7:
	.asciz	"d_Street_neighbors"
	.size	.L__unnamed_7, 19

	.type	.L__unnamed_8,@object           # @7
.L__unnamed_8:
	.asciz	"d_Array_Street_size"
	.size	.L__unnamed_8, 20

	.type	.L__unnamed_9,@object           # @8
.L__unnamed_9:
	.asciz	"d_Array_Street_offset"
	.size	.L__unnamed_9, 22

	.type	.L__unnamed_10,@object          # @9
.L__unnamed_10:
	.asciz	"d_Array_Street_arrays"
	.size	.L__unnamed_10, 22

	.type	.L__unnamed_11,@object          # @10
.L__unnamed_11:
	.asciz	"d_input_actor_tag"
	.size	.L__unnamed_11, 18

	.type	.L__unnamed_12,@object          # @11
.L__unnamed_12:
	.asciz	"d_input_actor_id"
	.size	.L__unnamed_12, 17

	.type	.L__unnamed_13,@object          # @12
.L__unnamed_13:
	.asciz	"d_jobs"
	.size	.L__unnamed_13, 7

	.type	.L__unnamed_14,@object          # @13
.L__unnamed_14:
	.asciz	"d_randomn"
	.size	.L__unnamed_14, 10

	.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	"Setting up scenario..."
	.size	.Lstr, 23

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"Scenario set up."
	.size	.Lstr.1, 17

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"Copying data to GPU..."
	.size	.Lstr.2, 23

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"Finished copying data."
	.size	.Lstr.3, 23

	.type	.Lstr.4,@object                 # @str.4
.Lstr.4:
	.asciz	"Launching kernel..."
	.size	.Lstr.4, 20

	.type	.Lstr.5,@object                 # @str.5
.Lstr.5:
	.asciz	"Kernel finished."
	.size	.Lstr.5, 17

	.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 _Z21__device_stub__kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym d_Actor_progress
	.addrsig_sym d_Actor_street
	.addrsig_sym d_Car_max_velocity
	.addrsig_sym d_Street_length
	.addrsig_sym d_Street_max_velocity
	.addrsig_sym d_Street_neighbors
	.addrsig_sym d_Array_Street_size
	.addrsig_sym d_Array_Street_offset
	.addrsig_sym d_Array_Street_arrays
	.addrsig_sym d_input_actor_tag
	.addrsig_sym d_input_actor_id
	.addrsig_sym d_jobs
	.addrsig_sym d_randomn
	.addrsig_sym _Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_ ; -- Begin function _Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.globl	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
	.p2align	8
	.type	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_,@function
_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_: ; @_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
; %bb.0:
	s_clause 0x3
	s_load_b512 s[16:31], s[0:1], 0x8
	s_load_b256 s[4:11], s[0:1], 0x48
	s_load_b64 s[2:3], s[0:1], 0x0
	s_load_b64 s[12:13], s[0:1], 0x68
	s_waitcnt lgkmcnt(0)
	v_dual_mov_b32 v22, 0 :: v_dual_mov_b32 v5, s20
	v_mov_b32_e32 v6, s21
	s_getpc_b64 s[20:21]
	s_add_u32 s20, s20, d_Actor_progress@rel32@lo+4
	s_addc_u32 s21, s21, d_Actor_progress@rel32@hi+12
	v_dual_mov_b32 v3, s18 :: v_dual_mov_b32 v4, s19
	s_getpc_b64 s[18:19]
	s_add_u32 s18, s18, d_Actor_street@rel32@lo+4
	s_addc_u32 s19, s19, d_Actor_street@rel32@hi+12
	v_dual_mov_b32 v19, s6 :: v_dual_mov_b32 v20, s7
	s_getpc_b64 s[6:7]
	s_add_u32 s6, s6, d_Car_max_velocity@rel32@lo+4
	s_addc_u32 s7, s7, d_Car_max_velocity@rel32@hi+12
	v_dual_mov_b32 v1, s16 :: v_dual_mov_b32 v2, s17
	s_getpc_b64 s[16:17]
	s_add_u32 s16, s16, d_Street_length@rel32@lo+4
	s_addc_u32 s17, s17, d_Street_length@rel32@hi+12
	v_dual_mov_b32 v17, s4 :: v_dual_mov_b32 v18, s5
	s_getpc_b64 s[4:5]
	s_add_u32 s4, s4, d_Street_max_velocity@rel32@lo+4
	s_addc_u32 s5, s5, d_Street_max_velocity@rel32@hi+12
	v_dual_mov_b32 v23, s8 :: v_dual_mov_b32 v24, s9
	s_getpc_b64 s[8:9]
	s_add_u32 s8, s8, d_Street_neighbors@rel32@lo+4
	s_addc_u32 s9, s9, d_Street_neighbors@rel32@hi+12
	v_dual_mov_b32 v25, s10 :: v_dual_mov_b32 v26, s11
	s_getpc_b64 s[10:11]
	s_add_u32 s10, s10, d_Array_Street_size@rel32@lo+4
	s_addc_u32 s11, s11, d_Array_Street_size@rel32@hi+12
	v_dual_mov_b32 v27, s12 :: v_dual_mov_b32 v28, s13
	s_getpc_b64 s[12:13]
	s_add_u32 s12, s12, d_Array_Street_offset@rel32@lo+4
	s_addc_u32 s13, s13, d_Array_Street_offset@rel32@hi+12
	v_dual_mov_b32 v7, s22 :: v_dual_mov_b32 v8, s23
	s_getpc_b64 s[22:23]
	s_add_u32 s22, s22, d_Array_Street_arrays@rel32@lo+4
	s_addc_u32 s23, s23, d_Array_Street_arrays@rel32@hi+12
	v_dual_mov_b32 v11, s26 :: v_dual_mov_b32 v12, s27
	s_getpc_b64 s[26:27]
	s_add_u32 s26, s26, d_input_actor_tag@rel32@lo+4
	s_addc_u32 s27, s27, d_input_actor_tag@rel32@hi+12
	v_dual_mov_b32 v13, s28 :: v_dual_mov_b32 v14, s29
	s_getpc_b64 s[28:29]
	s_add_u32 s28, s28, d_input_actor_id@rel32@lo+4
	s_addc_u32 s29, s29, d_input_actor_id@rel32@hi+12
	v_dual_mov_b32 v15, s30 :: v_dual_mov_b32 v16, s31
	s_getpc_b64 s[30:31]
	s_add_u32 s30, s30, d_jobs@rel32@lo+4
	s_addc_u32 s31, s31, d_jobs@rel32@hi+12
	v_dual_mov_b32 v9, s24 :: v_dual_mov_b32 v10, s25
	s_getpc_b64 s[24:25]
	s_add_u32 s24, s24, d_randomn@rel32@lo+4
	s_addc_u32 s25, s25, d_randomn@rel32@hi+12
	s_add_u32 s0, s0, 0x70
	s_addc_u32 s1, s1, 0
	s_cmp_lt_i32 s3, 1
	s_clause 0xc
	global_store_b64 v22, v[1:2], s[20:21]
	global_store_b64 v22, v[3:4], s[18:19]
	global_store_b64 v22, v[5:6], s[6:7]
	global_store_b64 v22, v[7:8], s[16:17]
	global_store_b64 v22, v[9:10], s[4:5]
	global_store_b64 v22, v[11:12], s[8:9]
	global_store_b64 v22, v[13:14], s[10:11]
	global_store_b64 v22, v[15:16], s[12:13]
	global_store_b64 v22, v[17:18], s[22:23]
	global_store_b64 v22, v[19:20], s[26:27]
	global_store_b64 v22, v[23:24], s[28:29]
	global_store_b64 v22, v[25:26], s[30:31]
	global_store_b64 v22, v[27:28], s[24:25]
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB0_13
; %bb.1:                                ; %.lr.ph.i
	s_clause 0x1
	global_load_b64 v[1:2], v22, s[30:31]
	global_load_b64 v[5:6], v22, s[28:29]
	s_load_b32 s0, s[0:1], 0xc
	s_waitcnt lgkmcnt(0)
	s_and_b32 s0, s0, 0xffff
	s_cmp_eq_u32 s2, 1
	s_waitcnt vmcnt(1)
	v_mad_u64_u32 v[3:4], null, s15, s0, v[0:1]
	s_cselect_b32 s0, -1, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v1, v3
	v_add_co_ci_u32_e32 v1, vcc_lo, v2, v4, vcc_lo
	flat_load_b32 v0, v[0:1]
	global_load_b64 v[7:8], v22, s[26:27]
	s_waitcnt vmcnt(1) lgkmcnt(0)
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[9:10], 2, v[0:1]
	v_add_co_u32 v0, vcc_lo, v5, v9
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, v6, v10, vcc_lo
	s_waitcnt vmcnt(0)
	v_add_co_u32 v23, vcc_lo, v7, v9
	v_add_co_ci_u32_e32 v24, vcc_lo, v8, v10, vcc_lo
	flat_load_b32 v14, v[0:1]
	s_clause 0x9
	global_load_b64 v[16:17], v22, s[20:21]
	global_load_b64 v[0:1], v22, s[24:25]
	global_load_b64 v[18:19], v22, s[18:19]
	global_load_b64 v[2:3], v22, s[22:23]
	global_load_b64 v[4:5], v22, s[16:17]
	global_load_b64 v[20:21], v22, s[6:7]
	global_load_b64 v[6:7], v22, s[10:11]
	global_load_b64 v[8:9], v22, s[12:13]
	global_load_b64 v[10:11], v22, s[8:9]
	global_load_b64 v[12:13], v22, s[4:5]
	flat_load_b32 v23, v[23:24]
	v_cndmask_b32_e64 v24, 1.0, 0x3f400000, s0
	s_waitcnt vmcnt(11) lgkmcnt(1)
	v_ashrrev_i32_e32 v15, 31, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[25:26], 2, v[14:15]
	s_waitcnt vmcnt(10)
	v_add_co_u32 v14, vcc_lo, v16, v25
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v15, vcc_lo, v17, v26, vcc_lo
	s_waitcnt vmcnt(8)
	v_add_co_u32 v16, vcc_lo, v18, v25
	v_add_co_ci_u32_e32 v17, vcc_lo, v19, v26, vcc_lo
	s_waitcnt vmcnt(5)
	v_add_co_u32 v18, vcc_lo, v20, v25
	v_add_co_ci_u32_e32 v19, vcc_lo, v21, v26, vcc_lo
.LBB0_2:                                ; %NodeBlock
                                        ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s1, 0
	s_mov_b32 s0, exec_lo
                                        ; implicit-def: $vgpr20_vgpr21
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_cmpx_lt_i32_e32 0, v23
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB0_6
; %bb.3:                                ; %LeafBlock73
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_mov_b32 s2, 0
	s_mov_b32 s1, exec_lo
                                        ; implicit-def: $vgpr20_vgpr21
	v_cmpx_eq_u32_e32 1, v23
	s_cbranch_execz .LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	flat_load_b32 v35, v[14:15]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_mul_f32_e32 v20, v35, v35
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_i32_f32_e32 v20, v20
	v_mul_hi_i32 v21, 0x10624dd3, v20
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v25, 31, v21
	v_ashrrev_i32_e32 v21, 5, v21
	v_add_nc_u32_e32 v21, v21, v25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v21, 0x1f4, v21
	v_sub_nc_u32_e32 v20, v20, v21
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v21, 31, v20
	v_lshlrev_b64 v[20:21], 2, v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v20, vcc_lo, v0, v20
	v_add_co_ci_u32_e32 v21, vcc_lo, v1, v21, vcc_lo
	flat_load_b32 v20, v[20:21]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_mul_hi_i32 v21, 0x92492493, v20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v21, v21, v20
	v_lshrrev_b32_e32 v25, 31, v21
	v_ashrrev_i32_e32 v21, 2, v21
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v21, v21, v25
	v_mul_lo_u32 v21, v21, 7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v20, v20, v21
	v_add_nc_u32_e32 v20, -2, v20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f32_i32_e32 v20, v20
	v_cvt_f64_f32_e32 v[25:26], v20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f64 v[27:28], null, 0x404e0000, 0x404e0000, v[25:26]
	v_rcp_f64_e32 v[20:21], v[27:28]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[29:30], -v[27:28], v[20:21], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_fma_f64 v[29:30], v[20:21], v[29:30], v[20:21]
	flat_load_b32 v20, v[16:17]
	v_fma_f64 v[31:32], -v[27:28], v[29:30], 1.0
	v_fma_f64 v[29:30], v[29:30], v[31:32], v[29:30]
	v_div_scale_f64 v[31:32], vcc_lo, v[25:26], 0x404e0000, v[25:26]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[33:34], v[31:32], v[29:30]
	v_fma_f64 v[27:28], -v[27:28], v[33:34], v[31:32]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[27:28], v[27:28], v[29:30], v[33:34]
	v_cvt_f64_f32_e32 v[29:30], v35
	v_div_fixup_f64 v[25:26], v[27:28], 0x404e0000, v[25:26]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[25:26], v[25:26], v[29:30]
	v_cvt_f32_f64_e32 v27, v[25:26]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_ashrrev_i32_e32 v21, 31, v20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[25:26], 2, v[20:21]
	v_add_co_u32 v25, vcc_lo, v4, v25
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v26, vcc_lo, v5, v26, vcc_lo
	flat_store_b32 v[14:15], v27
	flat_load_b32 v25, v[25:26]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_cmp_le_f32_e32 vcc_lo, v25, v27
	s_and_b32 s2, vcc_lo, exec_lo
.LBB0_5:                                ; %Flow76
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 s1, s2, exec_lo
.LBB0_6:                                ; %Flow
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_and_not1_saveexec_b32 s0, s0
	s_cbranch_execz .LBB0_10
; %bb.7:                                ; %LeafBlock
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_mov_b32 s4, s1
	s_mov_b32 s2, exec_lo
                                        ; implicit-def: $vgpr20_vgpr21
	v_cmpx_eq_u32_e32 0, v23
	s_cbranch_execz .LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	flat_load_b32 v20, v[16:17]
	s_and_not1_b32 s4, s1, exec_lo
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_ashrrev_i32_e32 v21, 31, v20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[25:26], 2, v[20:21]
	v_add_co_u32 v27, vcc_lo, v12, v25
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v28, vcc_lo, v13, v26, vcc_lo
	flat_load_b32 v29, v[18:19]
	flat_load_b32 v27, v[27:28]
	flat_load_b32 v37, v[14:15]
	s_waitcnt vmcnt(1) lgkmcnt(1)
	v_dual_max_f32 v28, v29, v29 :: v_dual_max_f32 v27, v27, v27
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_min_f32_e32 v27, v28, v27
	v_mul_f32_e32 v27, v24, v27
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[27:28], v27
	v_div_scale_f64 v[29:30], null, 0x404e0000, 0x404e0000, v[27:28]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[31:32], v[29:30]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[33:34], -v[29:30], v[31:32], 1.0
	v_fma_f64 v[31:32], v[31:32], v[33:34], v[31:32]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], -v[29:30], v[31:32], 1.0
	v_fma_f64 v[31:32], v[31:32], v[33:34], v[31:32]
	v_div_scale_f64 v[33:34], vcc_lo, v[27:28], 0x404e0000, v[27:28]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[35:36], v[33:34], v[31:32]
	v_fma_f64 v[29:30], -v[29:30], v[35:36], v[33:34]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(VALU_DEP_4)
	v_div_fmas_f64 v[29:30], v[29:30], v[31:32], v[35:36]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_cvt_f64_f32_e32 v[31:32], v37
	v_add_co_u32 v25, vcc_lo, v4, v25
	v_add_co_ci_u32_e32 v26, vcc_lo, v5, v26, vcc_lo
	v_div_fixup_f64 v[27:28], v[29:30], 0x404e0000, v[27:28]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[27:28], v[27:28], v[31:32]
	v_cvt_f32_f64_e32 v27, v[27:28]
	flat_store_b32 v[14:15], v27
	flat_load_b32 v25, v[25:26]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_cmp_le_f32_e32 vcc_lo, v25, v27
	s_and_b32 s5, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s4, s4, s5
.LBB0_9:                                ; %Flow78
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	s_and_not1_b32 s1, s1, exec_lo
	s_and_b32 s2, s4, exec_lo
	s_or_b32 s1, s1, s2
.LBB0_10:                               ; %Flow77
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	s_and_saveexec_b32 s0, s1
	s_cbranch_execz .LBB0_12
; %bb.11:                               ; %_Z15method_Car_moveii.exit.sink.split.i
                                        ;   in Loop: Header=BB0_2 Depth=1
	v_lshlrev_b64 v[20:21], 2, v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v25, vcc_lo, v10, v20
	v_add_co_ci_u32_e32 v26, vcc_lo, v11, v21, vcc_lo
	flat_load_b32 v25, v[25:26]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_ashrrev_i32_e32 v26, 31, v25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[25:26], 2, v[25:26]
	v_add_co_u32 v27, vcc_lo, v6, v25
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v28, vcc_lo, v7, v26, vcc_lo
	v_add_co_u32 v20, vcc_lo, v0, v20
	v_add_co_ci_u32_e32 v21, vcc_lo, v1, v21, vcc_lo
	flat_load_b32 v27, v[27:28]
	flat_load_b32 v28, v[20:21]
	v_add_co_u32 v20, vcc_lo, v8, v25
	v_add_co_ci_u32_e32 v21, vcc_lo, v9, v26, vcc_lo
	flat_load_b32 v20, v[20:21]
	s_waitcnt vmcnt(2) lgkmcnt(2)
	v_ashrrev_i32_e32 v21, 31, v27
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v25, v27, v21
	s_waitcnt vmcnt(1) lgkmcnt(1)
	v_ashrrev_i32_e32 v27, 31, v28
	v_xor_b32_e32 v21, v25, v21
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v28, v28, v27
	v_cvt_f32_u32_e32 v25, v21
	v_sub_nc_u32_e32 v26, 0, v21
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_xor_b32_e32 v28, v28, v27
	v_rcp_iflag_f32_e32 v25, v25
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v25, 0x4f7ffffe, v25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v25, v25
	v_mul_lo_u32 v26, v26, v25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v26, v25, v26
	v_add_nc_u32_e32 v25, v25, v26
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v25, v28, v25
	v_mul_lo_u32 v25, v25, v21
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v25, v28, v25
	v_sub_nc_u32_e32 v26, v25, v21
	v_cmp_ge_u32_e32 vcc_lo, v25, v21
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v25, v25, v26, vcc_lo
	v_sub_nc_u32_e32 v26, v25, v21
	v_cmp_ge_u32_e32 vcc_lo, v25, v21
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v21, v25, v26, vcc_lo
	v_xor_b32_e32 v21, v21, v27
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v21, v21, v27
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_add_nc_u32_e32 v20, v20, v21
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v21, 31, v20
	v_lshlrev_b64 v[20:21], 2, v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v20, vcc_lo, v2, v20
	v_add_co_ci_u32_e32 v21, vcc_lo, v3, v21, vcc_lo
	flat_load_b32 v20, v[20:21]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	flat_store_b32 v[16:17], v20
	flat_store_b32 v[14:15], v22
.LBB0_12:                               ; %_Z15method_Car_moveii.exit.i
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	s_add_i32 s3, s3, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s3, 0
	s_cbranch_scc1 .LBB0_2
.LBB0_13:                               ; %_Z5blockiiii.exit
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 368
		.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 38
		.amdhsa_next_free_sgpr 32
		.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	_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_, .Lfunc_end0-_Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 2068
; NumSgprs: 34
; NumVgprs: 38
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 4
; VGPRBlocks: 4
; NumSGPRsForWavesPerEU: 34
; NumVGPRsForWavesPerEU: 38
; Occupancy: 16
; WaveLimiterHint : 1
; 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
	.protected	d_Actor_progress        ; @d_Actor_progress
	.type	d_Actor_progress,@object
	.section	.bss,"aw",@nobits
	.globl	d_Actor_progress
	.p2align	3, 0x0
d_Actor_progress:
	.quad	0
	.size	d_Actor_progress, 8

	.protected	d_Actor_street          ; @d_Actor_street
	.type	d_Actor_street,@object
	.globl	d_Actor_street
	.p2align	3, 0x0
d_Actor_street:
	.quad	0
	.size	d_Actor_street, 8

	.protected	d_Car_max_velocity      ; @d_Car_max_velocity
	.type	d_Car_max_velocity,@object
	.globl	d_Car_max_velocity
	.p2align	3, 0x0
d_Car_max_velocity:
	.quad	0
	.size	d_Car_max_velocity, 8

	.protected	d_Street_length         ; @d_Street_length
	.type	d_Street_length,@object
	.globl	d_Street_length
	.p2align	3, 0x0
d_Street_length:
	.quad	0
	.size	d_Street_length, 8

	.protected	d_Street_max_velocity   ; @d_Street_max_velocity
	.type	d_Street_max_velocity,@object
	.globl	d_Street_max_velocity
	.p2align	3, 0x0
d_Street_max_velocity:
	.quad	0
	.size	d_Street_max_velocity, 8

	.protected	d_Street_neighbors      ; @d_Street_neighbors
	.type	d_Street_neighbors,@object
	.globl	d_Street_neighbors
	.p2align	3, 0x0
d_Street_neighbors:
	.quad	0
	.size	d_Street_neighbors, 8

	.protected	d_Array_Street_size     ; @d_Array_Street_size
	.type	d_Array_Street_size,@object
	.globl	d_Array_Street_size
	.p2align	3, 0x0
d_Array_Street_size:
	.quad	0
	.size	d_Array_Street_size, 8

	.protected	d_Array_Street_offset   ; @d_Array_Street_offset
	.type	d_Array_Street_offset,@object
	.globl	d_Array_Street_offset
	.p2align	3, 0x0
d_Array_Street_offset:
	.quad	0
	.size	d_Array_Street_offset, 8

	.protected	d_Array_Street_arrays   ; @d_Array_Street_arrays
	.type	d_Array_Street_arrays,@object
	.globl	d_Array_Street_arrays
	.p2align	3, 0x0
d_Array_Street_arrays:
	.quad	0
	.size	d_Array_Street_arrays, 8

	.protected	d_input_actor_tag       ; @d_input_actor_tag
	.type	d_input_actor_tag,@object
	.globl	d_input_actor_tag
	.p2align	3, 0x0
d_input_actor_tag:
	.quad	0
	.size	d_input_actor_tag, 8

	.protected	d_input_actor_id        ; @d_input_actor_id
	.type	d_input_actor_id,@object
	.globl	d_input_actor_id
	.p2align	3, 0x0
d_input_actor_id:
	.quad	0
	.size	d_input_actor_id, 8

	.protected	d_jobs                  ; @d_jobs
	.type	d_jobs,@object
	.globl	d_jobs
	.p2align	3, 0x0
d_jobs:
	.quad	0
	.size	d_jobs, 8

	.protected	d_randomn               ; @d_randomn
	.type	d_randomn,@object
	.globl	d_randomn
	.p2align	3, 0x0
d_randomn:
	.quad	0
	.size	d_randomn, 8

	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.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 d_Actor_progress
	.addrsig_sym d_Actor_street
	.addrsig_sym d_Car_max_velocity
	.addrsig_sym d_Street_length
	.addrsig_sym d_Street_max_velocity
	.addrsig_sym d_Street_neighbors
	.addrsig_sym d_Array_Street_size
	.addrsig_sym d_Array_Street_offset
	.addrsig_sym d_Array_Street_arrays
	.addrsig_sym d_input_actor_tag
	.addrsig_sym d_input_actor_id
	.addrsig_sym d_jobs
	.addrsig_sym d_randomn
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .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
      - .offset:         112
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         116
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         120
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         124
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         126
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         128
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         130
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         132
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         134
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         152
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         160
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         168
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         176
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 368
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_
    .private_segment_fixed_size: 0
    .sgpr_count:     34
    .sgpr_spill_count: 0
    .symbol:         _Z6kerneliiPfPiS_S_S_S0_S0_S0_S0_S0_S0_S0_S0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     38
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
