#include <iostream>
#include <cuda_runtime.h>
#include <curand_kernel.h>

#define NUM_PARTICLES 512
#define BLOCK_SIZE 256

// Structure to represent a particle
struct Particle {
    float4 pos;  // Position (x, y, z, w)
    float4 vel;  // Velocity (vx, vy, vz, w)
};

// Kernel to perform Verlet integration
__global__ void verletIntegration(Particle* particles, float dt, float* forces, float4 box) {
    int idx = blockIdx.x * blockDim.x + threadIdx.x;
    if (idx >= NUM_PARTICLES) return;

    // Load position and velocity
    float4 pos = particles[idx].pos;
    float4 vel = particles[idx].vel;

    // Verlet integration
    float4 force = make_float4(forces[4 * idx], forces[4 * idx + 1], forces[4 * idx + 2], 0.0f);
    float mass = 1.0f; // Assuming unit mass for simplicity

    // Update position
    pos.x += vel.x * dt + 0.5f * force.x / mass * dt * dt;
    pos.y += vel.y * dt + 0.5f * force.y / mass * dt * dt;
    pos.z += vel.z * dt + 0.5f * force.z / mass * dt * dt;

    // Periodic boundary conditions
    pos.x = fmodf(pos.x - box.x, box.z) + box.x;
    pos.y = fmodf(pos.y - box.y, box.w) + box.y;
    pos.z = fmodf(pos.z - box.y, box.w) + box.y;

    // Store updated position
    particles[idx].pos = pos;

    // Update velocity for next step
    vel.x += force.x / mass * dt;
    vel.y += force.y / mass * dt;
    vel.z += force.z / mass * dt;

    // Store updated velocity
    particles[idx].vel = vel;
}

// Kernel to compute forces (simple Lennard-Jones potential for demonstration)
__global__ void computeForces(Particle* particles, float* forces, float4 box, float epsilon, float sigma) {
    int idx = blockIdx.x * blockDim.x + threadIdx.x;
    if (idx >= NUM_PARTICLES) return;

    // Initialize force to zero
    float4 force = make_float4(0.0f, 0.0f, 0.0f, 0.0f);

    // Compute force from all other particles
    for (int j = 0; j < NUM_PARTICLES; ++j) {
        if (j == idx) continue;

        float4 posJ = particles[j].pos;
        float4 posI = particles[idx].pos;

        // Calculate distance vector
        float dx = posJ.x - posI.x;
        float dy = posJ.y - posI.y;
        float dz = posJ.z - posI.z;

        // Apply periodic boundary conditions
        dx -= box.z * rintf(dx / box.z);
        dy -= box.w * rintf(dy / box.w);
        dz -= box.w * rintf(dz / box.w);

        float rsq = dx * dx + dy * dy + dz * dz;
        if (rsq < 1e-6f) continue; // Avoid self-interaction and very close particles

        float r6 = rsq * rsq * rsq;
        float r12 = r6 * r6;

        // Lennard-Jones potential
        float fmag = 24.0f * epsilon * (2.0f * sigma * sigma * sigma * sigma * sigma * sigma / r12 - 1.0f / r6) / rsq;

        force.x += fmag * dx;
        force.y += fmag * dy;
        force.z += fmag * dz;
    }

    // Store computed force
    forces[4 * idx] = force.x;
    forces[4 * idx + 1] = force.y;
    forces[4 * idx + 2] = force.z;
    forces[4 * idx + 3] = 0.0f;
}

int main() {
    // Allocate host memory
    Particle* h_particles = new Particle[NUM_PARTICLES];
    float* h_forces = new float[4 * NUM_PARTICLES];

    // Initialize random number generator
    curandState* d_states;
    cudaMalloc(&d_states, NUM_PARTICLES * sizeof(curandState));
    curandState* h_states = new curandState[NUM_PARTICLES];

    // Initialize particles with random positions and zero velocities
    for (int i = 0; i < NUM_PARTICLES; ++i) {
        h_particles[i].pos = make_float4((float)rand() / RAND_MAX, (float)rand() / RAND_MAX, (float)rand() / RAND_MAX, 0.0f);
        h_particles[i].vel = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
    }

    // Allocate device memory
    Particle* d_particles;
    float* d_forces;
    cudaMalloc(&d_particles, NUM_PARTICLES * sizeof(Particle));
    cudaMalloc(&d_forces, 4 * NUM_PARTICLES * sizeof(float));

    // Copy data to device
    cudaMemcpy(d_particles, h_particles, NUM_PARTICLES * sizeof(Particle), cudaMemcpyHostToDevice);

    // Simulation parameters
    float dt = 0.005f;
    float4 box = make_float4(0.0f, 0.0f, 1.0f, 1.0f); // Box dimensions (x, y, width, height)
    float epsilon = 1.0f; // Lennard-Jones parameters
    float sigma = 1.0f;

    // Perform a few time steps of simulation
    for (int step = 0; step < 100; ++step) {
        // Compute forces
        computeForces<<<(NUM_PARTICLES + BLOCK_SIZE - 1) / BLOCK_SIZE, BLOCK_SIZE>>>(d_particles, d_forces, box, epsilon, sigma);
        cudaDeviceSynchronize();

        // Perform Verlet integration
        verletIntegration<<<(NUM_PARTICLES + BLOCK_SIZE - 1) / BLOCK_SIZE, BLOCK_SIZE>>>(d_particles, dt, d_forces, box);
        cudaDeviceSynchronize();
    }

    // Copy results back to host
    cudaMemcpy(h_particles, d_particles, NUM_PARTICLES * sizeof(Particle), cudaMemcpyDeviceToHost);

    // Free device memory
    cudaFree(d_particles);
    cudaFree(d_forces);
    cudaFree(d_states);

    // Free host memory
    delete[] h_particles;
    delete[] h_forces;
    delete[] h_states;

    // Check for any errors launching the kernel
    cudaError_t err = cudaGetLastError();
    if (err != cudaSuccess) {
        std::cerr << "CUDA error: " << cudaGetErrorString(err) << std::endl;
        return -1;
    }

    std::cout << "Simulation completed successfully." << std::endl;
    return 0;
}
	.file	"tmpxft_001d0063_00000000-6_cuda_code_024660.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3852:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3852:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z55__device_stub__Z17verletIntegrationP8ParticlefPf6float4P8ParticlefPfR6float4
	.type	_Z55__device_stub__Z17verletIntegrationP8ParticlefPf6float4P8ParticlefPfR6float4, @function
_Z55__device_stub__Z17verletIntegrationP8ParticlefPf6float4P8ParticlefPfR6float4:
.LFB3874:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rcx
	leaq	56(%rsp), %rdi
	movq	%rsi, 8(%rsp)
	leaq	68(%rsp), %rsi
	movss	%xmm0, 20(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rdx, 128(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rax, 104(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movl	$1, 64(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z17verletIntegrationP8ParticlefPf6float4(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L2:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3874:
	.size	_Z55__device_stub__Z17verletIntegrationP8ParticlefPf6float4P8ParticlefPfR6float4, .-_Z55__device_stub__Z17verletIntegrationP8ParticlefPf6float4P8ParticlefPfR6float4
	.globl	_Z17verletIntegrationP8ParticlefPf6float4
	.type	_Z17verletIntegrationP8ParticlefPf6float4, @function
_Z17verletIntegrationP8ParticlefPf6float4:
.LFB3875:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	%rsp, %rdx
	movq	%xmm1, (%rsp)
	movq	%xmm2, 8(%rsp)
	call	_Z55__device_stub__Z17verletIntegrationP8ParticlefPf6float4P8ParticlefPfR6float4
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3875:
	.size	_Z17verletIntegrationP8ParticlefPf6float4, .-_Z17verletIntegrationP8ParticlefPf6float4
	.globl	_Z52__device_stub__Z13computeForcesP8ParticlePf6float4ffP8ParticlePfR6float4ff
	.type	_Z52__device_stub__Z13computeForcesP8ParticlePf6float4ffP8ParticlePfR6float4ff, @function
_Z52__device_stub__Z13computeForcesP8ParticlePf6float4ffP8ParticlePfR6float4ff:
.LFB3876:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movss	%xmm0, 12(%rsp)
	movss	%xmm1, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rdx, 112(%rsp)
	leaq	32(%rsp), %rdx
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movl	$1, 56(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L9
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z13computeForcesP8ParticlePf6float4ff(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 176
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L9:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3876:
	.size	_Z52__device_stub__Z13computeForcesP8ParticlePf6float4ffP8ParticlePfR6float4ff, .-_Z52__device_stub__Z13computeForcesP8ParticlePf6float4ffP8ParticlePfR6float4ff
	.globl	_Z13computeForcesP8ParticlePf6float4ff
	.type	_Z13computeForcesP8ParticlePf6float4ff, @function
_Z13computeForcesP8ParticlePf6float4ff:
.LFB3877:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	%xmm0, (%rsp)
	movq	%rsp, %rdx
	movaps	%xmm2, %xmm0
	movq	%xmm1, 8(%rsp)
	movaps	%xmm3, %xmm1
	call	_Z52__device_stub__Z13computeForcesP8ParticlePf6float4ffP8ParticlePfR6float4ff
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3877:
	.size	_Z13computeForcesP8ParticlePf6float4ff, .-_Z13computeForcesP8ParticlePf6float4ff
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"CUDA error: "
.LC5:
	.string	"Simulation completed successfully."
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3849:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$16384, %edi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	call	_Znam@PLT
	movq	%rsp, %rdi
	movl	$24576, %esi
	movq	%rax, %rbp
	call	cudaMalloc@PLT
	movq	%rbp, %rbx
	leaq	16384(%rbp), %r14
.L16:
	call	rand@PLT
	addq	$32, %rbx
	cvtsi2ssl	%eax, %xmm0
	mulss	.LC0(%rip), %xmm0
	movd	%xmm0, %r12d
	call	rand@PLT
	cvtsi2ssl	%eax, %xmm0
	mulss	.LC0(%rip), %xmm0
	movd	%xmm0, %r13d
	call	rand@PLT
	movl	%r13d, -28(%rbx)
	cvtsi2ssl	%eax, %xmm0
	mulss	.LC0(%rip), %xmm0
	movl	%r12d, -24(%rbx)
	movl	$0x00000000, -20(%rbx)
	movl	$0x00000000, -16(%rbx)
	movl	$0x00000000, -12(%rbx)
	movl	$0x00000000, -8(%rbx)
	movss	%xmm0, -32(%rbx)
	movl	$0x00000000, -4(%rbx)
	cmpq	%r14, %rbx
	jne	.L16
	leaq	8(%rsp), %rdi
	movl	$16384, %esi
	movl	$16777217, %ebx
	movl	$100, %r13d
	call	cudaMalloc@PLT
	leaq	16(%rsp), %rdi
	movl	$8192, %esi
	salq	$8, %rbx
	call	cudaMalloc@PLT
	movq	8(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	movabsq	$4294967298, %r12
	movl	$16384, %edx
	movabsq	$4575657222473777152, %r14
	call	cudaMemcpy@PLT
.L19:
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%rbx, %rdx
	movl	$1, %ecx
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%rbx, 36(%rsp)
	movl	$1, 44(%rsp)
	movq	%r12, 24(%rsp)
	movl	$1, 32(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L17
	movss	.LC2(%rip), %xmm1
	xorl	%edx, %edx
	movq	16(%rsp), %rsi
	movq	%r14, 56(%rsp)
	movq	8(%rsp), %rdi
	movq	%rdx, 48(%rsp)
	leaq	48(%rsp), %rdx
	movaps	%xmm1, %xmm0
	call	_Z52__device_stub__Z13computeForcesP8ParticlePf6float4ffP8ParticlePfR6float4ff
.L17:
	call	cudaDeviceSynchronize@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%rbx, %rdx
	movl	$1, %ecx
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%rbx, 36(%rsp)
	movl	$1, 44(%rsp)
	movq	%r12, 24(%rsp)
	movl	$1, 32(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L18
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdi
	xorl	%eax, %eax
	leaq	48(%rsp), %rdx
	movss	.LC3(%rip), %xmm0
	movq	%rax, 48(%rsp)
	movq	%r14, 56(%rsp)
	call	_Z55__device_stub__Z17verletIntegrationP8ParticlefPf6float4P8ParticlefPfR6float4
.L18:
	call	cudaDeviceSynchronize@PLT
	decl	%r13d
	jne	.L19
	movq	8(%rsp), %rsi
	movl	$2, %ecx
	movl	$16384, %edx
	movq	%rbp, %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	(%rsp), %rdi
	call	cudaFree@PLT
	movq	%rbp, %rdi
	call	_ZdaPv@PLT
	call	cudaGetLastError@PLT
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.L20
	leaq	.LC4(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %edi
	movq	%rax, %rbp
	call	cudaGetErrorString@PLT
	movq	%rbp, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	orl	$-1, %eax
	jmp	.L15
.L20:
	leaq	.LC5(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	xorl	%eax, %eax
.L15:
	movq	72(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	addq	$80, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3849:
	.size	main, .-main
	.section	.rodata.str1.1
.LC6:
	.string	"_Z13computeForcesP8ParticlePf6float4ff"
.LC7:
	.string	"_Z17verletIntegrationP8ParticlefPf6float4"
.LC8:
	.string	"precalc_xorwow_matrix"
.LC9:
	.string	"precalc_xorwow_offset_matrix"
.LC10:
	.string	"mrg32k3aM1"
.LC11:
	.string	"mrg32k3aM2"
.LC12:
	.string	"mrg32k3aM1SubSeq"
.LC13:
	.string	"mrg32k3aM2SubSeq"
.LC14:
	.string	"mrg32k3aM1Seq"
.LC15:
	.string	"mrg32k3aM2Seq"
.LC16:
	.string	"__cr_lgamma_table"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3879:
	.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	.LC6(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z13computeForcesP8ParticlePf6float4ff(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC7(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z17verletIntegrationP8ParticlefPf6float4(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC8(%rip), %rdx
	movl	$102400, %r9d
	leaq	_ZL21precalc_xorwow_matrix(%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	.LC9(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$102400, %r9d
	leaq	_ZL28precalc_xorwow_offset_matrix(%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	.LC10(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL10mrg32k3aM1(%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	.LC11(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL10mrg32k3aM2(%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	.LC12(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2016, %r9d
	leaq	_ZL16mrg32k3aM1SubSeq(%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	.LC13(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2016, %r9d
	leaq	_ZL16mrg32k3aM2SubSeq(%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	.LC14(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL13mrg32k3aM1Seq(%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	$2304, %r9d
	leaq	_ZL13mrg32k3aM2Seq(%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	$1
	.cfi_def_cfa_offset 32
	leaq	.LC16(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movl	$72, %r9d
	movq	%rdx, %rcx
	leaq	_ZL17__cr_lgamma_table(%rip), %rsi
	call	__cudaRegisterVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%r9
	.cfi_def_cfa_offset 24
	popq	%r10
	.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
.LFE3879:
	.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	_ZL17__cr_lgamma_table
	.comm	_ZL17__cr_lgamma_table,72,32
	.local	_ZL13mrg32k3aM2Seq
	.comm	_ZL13mrg32k3aM2Seq,2304,32
	.local	_ZL13mrg32k3aM1Seq
	.comm	_ZL13mrg32k3aM1Seq,2304,32
	.local	_ZL16mrg32k3aM2SubSeq
	.comm	_ZL16mrg32k3aM2SubSeq,2016,32
	.local	_ZL16mrg32k3aM1SubSeq
	.comm	_ZL16mrg32k3aM1SubSeq,2016,32
	.local	_ZL10mrg32k3aM2
	.comm	_ZL10mrg32k3aM2,2304,32
	.local	_ZL10mrg32k3aM1
	.comm	_ZL10mrg32k3aM1,2304,32
	.local	_ZL28precalc_xorwow_offset_matrix
	.comm	_ZL28precalc_xorwow_offset_matrix,102400,32
	.local	_ZL21precalc_xorwow_matrix
	.comm	_ZL21precalc_xorwow_matrix,102400,32
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	805306368
	.align 4
.LC2:
	.long	1065353216
	.align 4
.LC3:
	.long	1000593162
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <iostream>
#include <hip/hip_runtime.h>
#include <hiprand/hiprand_kernel.h>

#define NUM_PARTICLES 512
#define BLOCK_SIZE 256

// Structure to represent a particle
struct Particle {
    float4 pos;  // Position (x, y, z, w)
    float4 vel;  // Velocity (vx, vy, vz, w)
};

// Kernel to perform Verlet integration
__global__ void verletIntegration(Particle* particles, float dt, float* forces, float4 box) {
    int idx = blockIdx.x * blockDim.x + threadIdx.x;
    if (idx >= NUM_PARTICLES) return;

    // Load position and velocity
    float4 pos = particles[idx].pos;
    float4 vel = particles[idx].vel;

    // Verlet integration
    float4 force = make_float4(forces[4 * idx], forces[4 * idx + 1], forces[4 * idx + 2], 0.0f);
    float mass = 1.0f; // Assuming unit mass for simplicity

    // Update position
    pos.x += vel.x * dt + 0.5f * force.x / mass * dt * dt;
    pos.y += vel.y * dt + 0.5f * force.y / mass * dt * dt;
    pos.z += vel.z * dt + 0.5f * force.z / mass * dt * dt;

    // Periodic boundary conditions
    pos.x = fmodf(pos.x - box.x, box.z) + box.x;
    pos.y = fmodf(pos.y - box.y, box.w) + box.y;
    pos.z = fmodf(pos.z - box.y, box.w) + box.y;

    // Store updated position
    particles[idx].pos = pos;

    // Update velocity for next step
    vel.x += force.x / mass * dt;
    vel.y += force.y / mass * dt;
    vel.z += force.z / mass * dt;

    // Store updated velocity
    particles[idx].vel = vel;
}

// Kernel to compute forces (simple Lennard-Jones potential for demonstration)
__global__ void computeForces(Particle* particles, float* forces, float4 box, float epsilon, float sigma) {
    int idx = blockIdx.x * blockDim.x + threadIdx.x;
    if (idx >= NUM_PARTICLES) return;

    // Initialize force to zero
    float4 force = make_float4(0.0f, 0.0f, 0.0f, 0.0f);

    // Compute force from all other particles
    for (int j = 0; j < NUM_PARTICLES; ++j) {
        if (j == idx) continue;

        float4 posJ = particles[j].pos;
        float4 posI = particles[idx].pos;

        // Calculate distance vector
        float dx = posJ.x - posI.x;
        float dy = posJ.y - posI.y;
        float dz = posJ.z - posI.z;

        // Apply periodic boundary conditions
        dx -= box.z * rintf(dx / box.z);
        dy -= box.w * rintf(dy / box.w);
        dz -= box.w * rintf(dz / box.w);

        float rsq = dx * dx + dy * dy + dz * dz;
        if (rsq < 1e-6f) continue; // Avoid self-interaction and very close particles

        float r6 = rsq * rsq * rsq;
        float r12 = r6 * r6;

        // Lennard-Jones potential
        float fmag = 24.0f * epsilon * (2.0f * sigma * sigma * sigma * sigma * sigma * sigma / r12 - 1.0f / r6) / rsq;

        force.x += fmag * dx;
        force.y += fmag * dy;
        force.z += fmag * dz;
    }

    // Store computed force
    forces[4 * idx] = force.x;
    forces[4 * idx + 1] = force.y;
    forces[4 * idx + 2] = force.z;
    forces[4 * idx + 3] = 0.0f;
}

int main() {
    // Allocate host memory
    Particle* h_particles = new Particle[NUM_PARTICLES];
    float* h_forces = new float[4 * NUM_PARTICLES];

    // Initialize random number generator
    hiprandState* d_states;
    hipMalloc(&d_states, NUM_PARTICLES * sizeof(hiprandState));
    hiprandState* h_states = new hiprandState[NUM_PARTICLES];

    // Initialize particles with random positions and zero velocities
    for (int i = 0; i < NUM_PARTICLES; ++i) {
        h_particles[i].pos = make_float4((float)rand() / RAND_MAX, (float)rand() / RAND_MAX, (float)rand() / RAND_MAX, 0.0f);
        h_particles[i].vel = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
    }

    // Allocate device memory
    Particle* d_particles;
    float* d_forces;
    hipMalloc(&d_particles, NUM_PARTICLES * sizeof(Particle));
    hipMalloc(&d_forces, 4 * NUM_PARTICLES * sizeof(float));

    // Copy data to device
    hipMemcpy(d_particles, h_particles, NUM_PARTICLES * sizeof(Particle), hipMemcpyHostToDevice);

    // Simulation parameters
    float dt = 0.005f;
    float4 box = make_float4(0.0f, 0.0f, 1.0f, 1.0f); // Box dimensions (x, y, width, height)
    float epsilon = 1.0f; // Lennard-Jones parameters
    float sigma = 1.0f;

    // Perform a few time steps of simulation
    for (int step = 0; step < 100; ++step) {
        // Compute forces
        computeForces<<<(NUM_PARTICLES + BLOCK_SIZE - 1) / BLOCK_SIZE, BLOCK_SIZE>>>(d_particles, d_forces, box, epsilon, sigma);
        hipDeviceSynchronize();

        // Perform Verlet integration
        verletIntegration<<<(NUM_PARTICLES + BLOCK_SIZE - 1) / BLOCK_SIZE, BLOCK_SIZE>>>(d_particles, dt, d_forces, box);
        hipDeviceSynchronize();
    }

    // Copy results back to host
    hipMemcpy(h_particles, d_particles, NUM_PARTICLES * sizeof(Particle), hipMemcpyDeviceToHost);

    // Free device memory
    hipFree(d_particles);
    hipFree(d_forces);
    hipFree(d_states);

    // Free host memory
    delete[] h_particles;
    delete[] h_forces;
    delete[] h_states;

    // Check for any errors launching the kernel
    hipError_t err = hipGetLastError();
    if (err != hipSuccess) {
        std::cerr << "CUDA error: " << hipGetErrorString(err) << std::endl;
        return -1;
    }

    std::cout << "Simulation completed successfully." << std::endl;
    return 0;
}
	.text
	.file	"cuda_code_024660.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE # -- Begin function _Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.type	_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE,@function
_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE: # @_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$128, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	80(%rsp), %rax
	movsd	%xmm1, (%rax)
	movsd	%xmm2, 8(%rax)
	leaq	40(%rsp), %rcx
	movq	%rdi, (%rcx)
	leaq	12(%rsp), %rdx
	movss	%xmm0, (%rdx)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	96(%rsp), %rbx
	movq	%rcx, (%rbx)
	movq	%rdx, 8(%rbx)
	movq	%rdi, 16(%rbx)
	movq	%rax, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE, .Lfunc_end0-_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff # -- Begin function _Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.type	_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff,@function
_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff: # @_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	80(%rsp), %rax
	movsd	%xmm0, (%rax)
	movsd	%xmm1, 8(%rax)
	leaq	40(%rsp), %rcx
	movq	%rdi, (%rcx)
	leaq	32(%rsp), %rdx
	movq	%rsi, (%rdx)
	leaq	12(%rsp), %rsi
	movss	%xmm2, (%rsi)
	leaq	8(%rsp), %rdi
	movss	%xmm3, (%rdi)
	leaq	96(%rsp), %rbx
	movq	%rcx, (%rbx)
	movq	%rdx, 8(%rbx)
	movq	%rax, 16(%rbx)
	movq	%rsi, 24(%rbx)
	movq	%rdi, 32(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff, .Lfunc_end1-_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI2_0:
	.long	0x30000000                      # float 4.65661287E-10
.LCPI2_2:
	.long	0x3f800000                      # float 1
.LCPI2_3:
	.long	0x3ba3d70a                      # float 0.00499999989
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI2_1:
	.quad	0x3f8000003f800000              # double 0.007812501848093234
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI2_4:
	.zero	16
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:                                # %.preheader.preheader
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$16384, %edi                    # imm = 0x4000
	callq	_Znam
	movq	%rax, %rbx
	leaq	32(%rsp), %rdi
	movl	$24576, %esi                    # imm = 0x6000
	callq	hipMalloc
	movl	$16, %r14d
.LBB2_1:                                # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	movss	.LCPI2_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movaps	%xmm1, 16(%rsp)                 # 16-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI2_0(%rip), %xmm0
	movaps	16(%rsp), %xmm1                 # 16-byte Reload
	unpcklps	%xmm0, %xmm1                    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
	movaps	%xmm1, 16(%rsp)                 # 16-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI2_0(%rip), %xmm0
	xorps	%xmm1, %xmm1
	movss	%xmm0, %xmm1                    # xmm1 = xmm0[0],xmm1[1,2,3]
	movaps	16(%rsp), %xmm0                 # 16-byte Reload
	movlhps	%xmm1, %xmm0                    # xmm0 = xmm0[0],xmm1[0]
	movaps	%xmm0, -16(%rbx,%r14)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, (%rbx,%r14)
	addq	$32, %r14
	cmpq	$16400, %r14                    # imm = 0x4010
	jne	.LBB2_1
# %bb.2:
	movabsq	$4294967298, %r14               # imm = 0x100000002
	movq	%rsp, %r15
	movl	$16384, %esi                    # imm = 0x4000
	movq	%r15, %rdi
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$8192, %esi                     # imm = 0x2000
	callq	hipMalloc
	movq	(%r15), %rdi
	movl	$16384, %edx                    # imm = 0x4000
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$100, %ebp
	leaq	254(%r14), %r15
.LBB2_3:                                # =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_5
# %bb.4:                                #   in Loop: Header=BB2_3 Depth=1
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	xorps	%xmm0, %xmm0
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
	movss	.LCPI2_2(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	movaps	%xmm2, %xmm3
	callq	_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
.LBB2_5:                                #   in Loop: Header=BB2_3 Depth=1
	callq	hipDeviceSynchronize
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_7
# %bb.6:                                #   in Loop: Header=BB2_3 Depth=1
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	xorps	%xmm1, %xmm1
	movss	.LCPI2_3(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movsd	.LCPI2_1(%rip), %xmm2           # xmm2 = mem[0],zero
	callq	_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
.LBB2_7:                                #   in Loop: Header=BB2_3 Depth=1
	callq	hipDeviceSynchronize
	decl	%ebp
	jne	.LBB2_3
# %bb.8:
	movq	(%rsp), %rsi
	movl	$16384, %edx                    # imm = 0x4000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	%rbx, %rdi
	callq	_ZdaPv
	callq	hipGetLastError
	testl	%eax, %eax
	je	.LBB2_11
# %bb.9:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %ebx
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	%ebp, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB2_12
# %bb.10:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB2_13
.LBB2_11:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.1, %esi
	movl	$34, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	xorl	%ebp, %ebp
	jmp	.LBB2_14
.LBB2_12:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB2_13:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movl	$-1, %ebp
.LBB2_14:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	%ebp, %eax
	addq	$40, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	main, .Lfunc_end2-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
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB3_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB3_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end3:
	.size	__hip_module_ctor, .Lfunc_end3-__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	.LBB4_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
.LBB4_2:
	retq
.Lfunc_end4:
	.size	__hip_module_dtor, .Lfunc_end4-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE,@object # @_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.section	.rodata,"a",@progbits
	.globl	_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.p2align	3, 0x0
_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE:
	.quad	_Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.size	_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE, 8

	.type	_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff,@object # @_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.globl	_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.p2align	3, 0x0
_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff:
	.quad	_Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.size	_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"CUDA error: "
	.size	.L.str, 13

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Simulation completed successfully."
	.size	.L.str.1, 35

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE"
	.size	.L__unnamed_1, 59

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff"
	.size	.L__unnamed_2, 56

	.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

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z32__device_stub__verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.addrsig_sym _Z28__device_stub__computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.addrsig_sym _Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.addrsig_sym _ZSt4cerr
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE ; -- Begin function _Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.globl	_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
	.p2align	8
	.type	_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE,@function
_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE: ; @_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
; %bb.0:
	s_load_b32 s2, s[0:1], 0x3c
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[3:4], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e32 0x200, v3
	s_cbranch_execz .LBB0_26
; %bb.1:
	s_clause 0x1
	s_load_b64 s[2:3], s[0:1], 0x10
	s_load_b32 s4, s[0:1], 0x8
	v_lshlrev_b32_e32 v0, 2, v3
	s_load_b64 s[6:7], s[0:1], 0x0
	v_ashrrev_i32_e32 v4, 31, v3
                                        ; implicit-def: $vgpr13
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[3:4], 5, v[3:4]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v0, vcc_lo, s2, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	v_add_co_u32 v9, vcc_lo, s6, v3
	v_add_co_ci_u32_e32 v10, vcc_lo, s7, v4, vcc_lo
	global_load_b96 v[0:2], v[0:1], off
	s_load_b128 s[0:3], s[0:1], 0x20
	s_clause 0x1
	global_load_b96 v[3:5], v[9:10], off offset:16
	global_load_b96 v[6:8], v[9:10], off
	s_waitcnt vmcnt(2)
	v_mul_f32_e32 v11, 0.5, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v11, s4, v11
	v_mul_f32_e32 v11, s4, v11
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v11, s4, v3
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v6, v6, v11
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_subrev_f32_e32 v6, s0, v6
	v_cmp_ngt_f32_e64 s5, |v6|, |s2|
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_saveexec_b32 s6, s5
	s_xor_b32 s5, exec_lo, s6
; %bb.2:
	v_bfi_b32 v11, 0x7fffffff, 0, v6
	v_cmp_eq_f32_e64 vcc_lo, |v6|, |s2|
	s_delay_alu instid0(VALU_DEP_2)
	v_cndmask_b32_e32 v13, v6, v11, vcc_lo
; %bb.3:                                ; %Flow138
	s_or_saveexec_b32 s5, s5
	v_add_co_u32 v11, vcc_lo, v9, 16
	v_add_co_ci_u32_e32 v12, vcc_lo, 0, v10, vcc_lo
	s_xor_b32 exec_lo, exec_lo, s5
	s_cbranch_execz .LBB0_9
; %bb.4:
	v_frexp_mant_f32_e64 v14, |s2|
	v_frexp_exp_i32_f32_e32 v15, v6
	v_frexp_exp_i32_f32_e32 v13, s2
	v_frexp_mant_f32_e64 v17, |v6|
	s_mov_b32 s6, exec_lo
	v_ldexp_f32 v14, v14, 1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_sub_nc_u32_e32 v16, v15, v13
	v_ldexp_f32 v17, v17, 12
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_rcp_f32_e32 v15, v14
	v_cmpx_lt_i32_e32 12, v16
	s_cbranch_execz .LBB0_8
; %bb.5:                                ; %.preheader.i.i.preheader
	s_mov_b32 s7, 0
.LBB0_6:                                ; %.preheader.i.i
                                        ; =>This Inner Loop Header: Depth=1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v18, v15, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rndne_f32_e32 v18, v18
	v_fma_f32 v17, -v18, v14, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_cmp_gt_f32_e32 vcc_lo, 0, v17
	v_cndmask_b32_e32 v18, 0x80000000, v14, vcc_lo
	v_cmp_gt_u32_e32 vcc_lo, 25, v16
	v_dual_add_f32 v17, v17, v18 :: v_dual_add_nc_u32 v16, -12, v16
	s_or_b32 s7, vcc_lo, s7
	s_delay_alu instid0(VALU_DEP_1)
	v_ldexp_f32 v17, v17, 12
	s_and_not1_b32 exec_lo, exec_lo, s7
	s_cbranch_execnz .LBB0_6
; %bb.7:                                ; %Flow136
	s_or_b32 exec_lo, exec_lo, s7
.LBB0_8:                                ; %Flow137
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	s_or_b32 exec_lo, exec_lo, s6
	v_add_nc_u32_e32 v16, -11, v16
	v_ldexp_f32 v16, v17, v16
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v15, v15, v16
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rndne_f32_e32 v15, v15
	v_fma_f32 v15, -v15, v14, v16
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_gt_f32_e32 vcc_lo, 0, v15
	v_dual_cndmask_b32 v14, 0x80000000, v14 :: v_dual_add_nc_u32 v13, -1, v13
	v_add_f32_e32 v14, v15, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ldexp_f32 v13, v14, v13
	v_and_b32_e32 v14, 0x80000000, v6
	v_xor_b32_e32 v13, v14, v13
.LBB0_9:                                ; %Flow139
	s_or_b32 exec_lo, exec_lo, s5
	v_mul_f32_e32 v14, 0.5, v1
                                        ; implicit-def: $vgpr16
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v14, s4, v14
	v_mul_f32_e32 v14, s4, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v14, s4, v4
	v_add_f32_e32 v7, v7, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_subrev_f32_e32 v7, s1, v7
	v_cmp_ngt_f32_e64 s5, |v7|, |s3|
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_saveexec_b32 s6, s5
	s_xor_b32 s5, exec_lo, s6
; %bb.10:
	v_bfi_b32 v14, 0x7fffffff, 0, v7
	v_cmp_eq_f32_e64 vcc_lo, |v7|, |s3|
	s_delay_alu instid0(VALU_DEP_2)
	v_cndmask_b32_e32 v16, v7, v14, vcc_lo
; %bb.11:                               ; %Flow134
	s_or_saveexec_b32 s5, s5
	v_frexp_mant_f32_e64 v15, |s3|
	v_frexp_exp_i32_f32_e32 v14, s3
	s_delay_alu instid0(VALU_DEP_2)
	v_ldexp_f32 v15, v15, 1
	s_xor_b32 exec_lo, exec_lo, s5
	s_cbranch_execz .LBB0_17
; %bb.12:
	v_frexp_exp_i32_f32_e32 v16, v7
	v_frexp_mant_f32_e64 v18, |v7|
	s_mov_b32 s6, exec_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v17, v16, v14
	v_rcp_f32_e32 v16, v15
	v_ldexp_f32 v18, v18, 12
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_lt_i32_e32 12, v17
	s_cbranch_execz .LBB0_16
; %bb.13:                               ; %.preheader.i.i71.preheader
	s_mov_b32 s7, 0
.LBB0_14:                               ; %.preheader.i.i71
                                        ; =>This Inner Loop Header: Depth=1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v19, v16, v18
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rndne_f32_e32 v19, v19
	v_fma_f32 v18, -v19, v15, v18
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_cmp_gt_f32_e32 vcc_lo, 0, v18
	v_cndmask_b32_e32 v19, 0x80000000, v15, vcc_lo
	v_cmp_gt_u32_e32 vcc_lo, 25, v17
	v_dual_add_f32 v18, v18, v19 :: v_dual_add_nc_u32 v17, -12, v17
	s_or_b32 s7, vcc_lo, s7
	s_delay_alu instid0(VALU_DEP_1)
	v_ldexp_f32 v18, v18, 12
	s_and_not1_b32 exec_lo, exec_lo, s7
	s_cbranch_execnz .LBB0_14
; %bb.15:                               ; %Flow132
	s_or_b32 exec_lo, exec_lo, s7
.LBB0_16:                               ; %Flow133
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	s_or_b32 exec_lo, exec_lo, s6
	v_add_nc_u32_e32 v17, -11, v17
	v_ldexp_f32 v17, v18, v17
	v_add_nc_u32_e32 v18, -1, v14
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v16, v16, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rndne_f32_e32 v16, v16
	v_fma_f32 v16, -v16, v15, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_gt_f32_e32 vcc_lo, 0, v16
	v_cndmask_b32_e32 v17, 0x80000000, v15, vcc_lo
	v_dual_add_f32 v16, v16, v17 :: v_dual_and_b32 v17, 0x80000000, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f32 v16, v16, v18
	v_xor_b32_e32 v16, v17, v16
.LBB0_17:                               ; %Flow135
	s_or_b32 exec_lo, exec_lo, s5
	v_mul_f32_e32 v17, 0.5, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v17, s4, v17
	v_mul_f32_e32 v17, s4, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v17, s4, v5
	v_add_f32_e32 v8, v8, v17
                                        ; implicit-def: $vgpr17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_subrev_f32_e32 v8, s1, v8
	v_cmp_ngt_f32_e64 s5, |v8|, |s3|
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_saveexec_b32 s6, s5
	s_xor_b32 s5, exec_lo, s6
; %bb.18:
	v_bfi_b32 v14, 0x7fffffff, 0, v8
	v_cmp_eq_f32_e64 vcc_lo, |v8|, |s3|
                                        ; implicit-def: $vgpr15
	s_delay_alu instid0(VALU_DEP_2)
	v_cndmask_b32_e32 v17, v8, v14, vcc_lo
                                        ; implicit-def: $vgpr14
; %bb.19:                               ; %Flow130
	s_and_not1_saveexec_b32 s5, s5
	s_cbranch_execz .LBB0_25
; %bb.20:
	v_frexp_exp_i32_f32_e32 v17, v8
	v_frexp_mant_f32_e64 v19, |v8|
	s_mov_b32 s6, exec_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v18, v17, v14
	v_rcp_f32_e32 v17, v15
	v_ldexp_f32 v19, v19, 12
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_lt_i32_e32 12, v18
	s_cbranch_execz .LBB0_24
; %bb.21:                               ; %.preheader.i.i74.preheader
	s_mov_b32 s7, 0
.LBB0_22:                               ; %.preheader.i.i74
                                        ; =>This Inner Loop Header: Depth=1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v20, v17, v19
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rndne_f32_e32 v20, v20
	v_fma_f32 v19, -v20, v15, v19
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_cmp_gt_f32_e32 vcc_lo, 0, v19
	v_cndmask_b32_e32 v20, 0x80000000, v15, vcc_lo
	v_cmp_gt_u32_e32 vcc_lo, 25, v18
	v_dual_add_f32 v19, v19, v20 :: v_dual_add_nc_u32 v18, -12, v18
	s_or_b32 s7, vcc_lo, s7
	s_delay_alu instid0(VALU_DEP_1)
	v_ldexp_f32 v19, v19, 12
	s_and_not1_b32 exec_lo, exec_lo, s7
	s_cbranch_execnz .LBB0_22
; %bb.23:                               ; %Flow
	s_or_b32 exec_lo, exec_lo, s7
.LBB0_24:                               ; %Flow129
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	s_or_b32 exec_lo, exec_lo, s6
	v_add_nc_u32_e32 v18, -11, v18
	v_ldexp_f32 v18, v19, v18
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v17, v17, v18
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rndne_f32_e32 v17, v17
	v_fma_f32 v17, -v17, v15, v18
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_gt_f32_e32 vcc_lo, 0, v17
	v_dual_cndmask_b32 v15, 0x80000000, v15 :: v_dual_add_nc_u32 v14, -1, v14
	v_add_f32_e32 v15, v17, v15
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ldexp_f32 v14, v15, v14
	v_and_b32_e32 v15, 0x80000000, v8
	v_xor_b32_e32 v17, v15, v14
.LBB0_25:                               ; %Flow131
	s_or_b32 exec_lo, exec_lo, s5
	v_cmp_eq_f32_e64 s7, s3, 0
	v_cmp_o_f32_e64 s5, s2, s2
	v_cmp_class_f32_e64 s6, v6, 0x1f8
	v_cmp_o_f32_e64 s3, s3, s3
	v_cmp_class_f32_e64 s8, v7, 0x1f8
	v_cndmask_b32_e64 v6, v16, 0x7fc00000, s7
	v_cmp_neq_f32_e64 s2, s2, 0
	s_and_b32 s5, s5, s6
	v_cmp_class_f32_e64 s6, v8, 0x1f8
	s_and_b32 vcc_lo, s3, s8
	v_cndmask_b32_e64 v7, v17, 0x7fc00000, s7
	v_cndmask_b32_e32 v6, 0x7fc00000, v6, vcc_lo
	s_and_b32 vcc_lo, s5, s2
	v_fma_f32 v3, s4, v0, v3
	v_cndmask_b32_e32 v8, 0x7fc00000, v13, vcc_lo
	s_and_b32 vcc_lo, s3, s6
	v_fma_f32 v4, s4, v1, v4
	v_cndmask_b32_e32 v13, 0x7fc00000, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_dual_add_f32 v7, s1, v6 :: v_dual_add_f32 v6, s0, v8
	v_dual_fmac_f32 v5, s4, v2 :: v_dual_add_f32 v8, s1, v13
	s_clause 0x1
	global_store_b96 v[9:10], v[6:8], off
	global_store_b96 v[11:12], v[3:5], off
.LBB0_26:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 21
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE, .Lfunc_end0-_Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1420
; NumSgprs: 18
; NumVgprs: 21
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 21
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff ; -- Begin function _Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.globl	_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
	.p2align	8
	.type	_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff,@function
_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff: ; @_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
; %bb.0:
	s_load_b32 s2, s[0:1], 0x34
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[4:5], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e32 0x200, v4
	s_cbranch_execz .LBB1_8
; %bb.1:                                ; %.preheader
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x18
	s_load_b128 s[0:3], s[0:1], 0x0
	s_mov_b32 s8, 0
	v_ashrrev_i32_e32 v5, 31, v4
	s_mov_b32 s9, s8
	s_mov_b32 s10, s8
	s_mov_b32 s11, s8
	s_waitcnt lgkmcnt(0)
	v_add_f32_e64 v0, s7, s7
	v_mul_f32_e64 v7, 0x41c00000, s6
	s_add_u32 s6, s0, 4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v0, s7, v0
	v_mul_f32_e32 v0, s7, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_f32_e32 v2, s7, v0
	v_lshlrev_b64 v[0:1], 5, v[4:5]
	v_mul_f32_e32 v2, s7, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v5, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v6, vcc_lo, s1, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_3)
	v_mul_f32_e32 v8, s7, v2
	v_dual_mov_b32 v0, s8 :: v_dual_mov_b32 v3, s11
	v_dual_mov_b32 v1, s9 :: v_dual_mov_b32 v2, s10
	s_addc_u32 s7, s1, 0
.LBB1_2:                                ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s9, exec_lo
	v_cmpx_ne_u32_e64 s8, v4
	s_cbranch_execz .LBB1_6
; %bb.3:                                ;   in Loop: Header=BB1_2 Depth=1
	global_load_b96 v[9:11], v[5:6], off
	s_add_u32 s0, s6, -4
	s_addc_u32 s1, s7, -1
	s_load_b128 s[12:15], s[0:1], 0x0
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_dual_sub_f32 v9, s12, v9 :: v_dual_sub_f32 v12, s14, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_scale_f32 v18, vcc_lo, v9, s4, v9
	v_div_scale_f32 v14, null, s5, s5, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f32_e32 v16, v14
	v_sub_f32_e32 v3, s13, v10
	v_div_scale_f32 v10, null, s4, s4, v9
	v_rcp_f32_e32 v13, v10
	s_waitcnt_depctr 0xfff
	v_fma_f32 v17, -v10, v13, 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v13, v17, v13
	v_fma_f32 v17, -v14, v16, 1.0
	v_dual_mul_f32 v21, v18, v13 :: v_dual_fmac_f32 v16, v17, v16
	v_div_scale_f32 v11, null, s5, s5, v3
	v_div_scale_f32 v20, s0, v3, s5, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f32 v22, -v10, v21, v18
	v_rcp_f32_e32 v15, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v21, v22, v13
	v_fma_f32 v10, -v10, v21, v18
	s_waitcnt_depctr 0xfff
	v_fma_f32 v19, -v11, v15, 1.0
	v_div_fmas_f32 v10, v10, v13, v21
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_fmac_f32_e32 v15, v19, v15
	v_div_scale_f32 v19, s1, v12, s5, v12
	s_mov_b32 vcc_lo, s0
	v_div_fixup_f32 v10, v10, s4, v9
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f32_e32 v17, v20, v15
	v_mul_f32_e32 v23, v19, v16
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_rndne_f32_e32 v10, v10
	v_fma_f32 v24, -v11, v17, v20
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f32 v22, -v14, v23, v19
	v_fma_f32 v10, -s4, v10, v9
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fmac_f32_e32 v17, v24, v15
	v_fmac_f32_e32 v23, v22, v16
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v11, -v11, v17, v20
	v_fma_f32 v13, -v14, v23, v19
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_div_fmas_f32 v11, v11, v15, v17
	s_mov_b32 vcc_lo, s1
	s_mov_b32 s1, exec_lo
	v_div_fmas_f32 v13, v13, v16, v23
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_fixup_f32 v11, v11, s5, v3
	v_div_fixup_f32 v13, v13, s5, v12
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_rndne_f32_e32 v11, v11
	v_rndne_f32_e32 v9, v13
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v3, -s5, v11, v3
	v_fma_f32 v9, -s5, v9, v12
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v11, v3, v3
	v_fmac_f32_e32 v11, v10, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v11, v9, v9
	v_cmpx_ngt_f32_e32 0x358637bd, v11
	s_cbranch_execz .LBB1_5
; %bb.4:                                ;   in Loop: Header=BB1_2 Depth=1
	v_mul_f32_e32 v12, v11, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v12, v11, v12
	v_mul_f32_e32 v13, v12, v12
	v_div_scale_f32 v15, null, v12, v12, -1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_scale_f32 v14, null, v13, v13, v8
	v_rcp_f32_e32 v17, v15
	v_div_scale_f32 v20, vcc_lo, v8, v13, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_rcp_f32_e32 v16, v14
	s_waitcnt_depctr 0xfff
	v_fma_f32 v19, -v15, v17, 1.0
	v_fma_f32 v18, -v14, v16, 1.0
	v_dual_fmac_f32 v17, v19, v17 :: v_dual_fmac_f32 v16, v18, v16
	v_div_scale_f32 v18, s0, -1.0, v12, -1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f32_e32 v19, v20, v16
	v_mul_f32_e32 v21, v18, v17
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v22, -v14, v19, v20
	v_fma_f32 v23, -v15, v21, v18
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v19, v22, v16
	v_fma_f32 v14, -v14, v19, v20
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_div_fmas_f32 v14, v14, v16, v19
	s_mov_b32 vcc_lo, s0
	v_div_fixup_f32 v13, v14, v13, v8
	v_fmac_f32_e32 v21, v23, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v15, -v15, v21, v18
	v_div_fmas_f32 v15, v15, v17, v21
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f32 v12, v15, v12, -1.0
	v_add_f32_e32 v12, v13, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v12, v7, v12
	v_div_scale_f32 v13, null, v11, v11, v12
	v_div_scale_f32 v16, vcc_lo, v12, v11, v12
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f32_e32 v14, v13
	s_waitcnt_depctr 0xfff
	v_fma_f32 v15, -v13, v14, 1.0
	v_fmac_f32_e32 v14, v15, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v15, v16, v14
	v_fma_f32 v17, -v13, v15, v16
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v15, v17, v14
	v_fma_f32 v13, -v13, v15, v16
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f32 v13, v13, v14, v15
	v_div_fixup_f32 v11, v13, v11, v12
	s_delay_alu instid0(VALU_DEP_1)
	v_fma_f32 v0, v10, v11, v0
	v_fma_f32 v1, v3, v11, v1
	v_fmac_f32_e32 v2, v9, v11
.LBB1_5:                                ; %Flow
                                        ;   in Loop: Header=BB1_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
.LBB1_6:                                ;   in Loop: Header=BB1_2 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s9
	s_add_i32 s8, s8, 1
	s_add_u32 s6, s6, 32
	s_addc_u32 s7, s7, 0
	s_cmpk_eq_i32 s8, 0x200
	s_cbranch_scc0 .LBB1_2
; %bb.7:
	v_lshlrev_b32_e32 v3, 2, v4
	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 v5, vcc_lo, s2, v3
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v4, vcc_lo
	v_mov_b32_e32 v3, 0
	global_store_b128 v[5:6], v[0:3], off
.LBB1_8:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 25
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff, .Lfunc_end1-_Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1032
; NumSgprs: 18
; NumVgprs: 25
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 3
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 25
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         32
        .size:           16
        .value_kind:     by_value
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         52
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         56
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         60
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         62
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         64
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         66
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         68
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         70
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         112
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 16
    .kernarg_segment_size: 304
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z17verletIntegrationP8ParticlefPf15HIP_vector_typeIfLj4EE.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     21
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           16
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         36
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 16
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13computeForcesP8ParticlePf15HIP_vector_typeIfLj4EEff.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     25
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
