__device__ float dist(float x[3], float y[3])
{
    float d1=x[0]-y[0];
    float d2=x[1]-y[1];
    float d3=x[2]-y[2];

    return (d1*d1 + d2*d2 + d3*d3);
}

__device__ float dot(float a[], float b[])
{
    return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]);
}

__device__ void transform(float t[3], float u[3][3], float *x, float *x1)
{
    x1[0]=t[0]+dot(&u[0][0], x);
    x1[1]=t[1]+dot(&u[1][0], x);
    x1[2]=t[2]+dot(&u[2][0], x);
}

__device__ void do_rotation(float x[][3], float x1[][3], int len, float t[3], float u[3][3])
{
    int i=0;
    for(; i<len; i++)
    {
        transform(t,u,&x[i][0],&x1[i][0]);
    }
}

char* get50(int a,char *c)
{
    c[0]=c[1]=c[2]=c[3]=c[4]='0';
    c[5]='\0';
    if(a<10)	{
        c[4]='\0';
        return c;
    }
    if(a<100)	{
        c[3]='\0';
        return c;
    }
    if(a<1000)	{
        c[2]='\0';
        return c;
    }
    if(a<10000)	{
        c[1]='\0';
        return c;
    }
    if(a<100000) {
        c[0]='\0';
        return c;
    }

    return c;
}

	.file	"tmpxft_00223f7c_00000000-6_basic.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2015:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2015:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z4distPfS_
	.type	_Z4distPfS_, @function
_Z4distPfS_:
.LFB2008:
	.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
.LFE2008:
	.size	_Z4distPfS_, .-_Z4distPfS_
	.globl	_Z3dotPfS_
	.type	_Z3dotPfS_, @function
_Z3dotPfS_:
.LFB2154:
	.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	_Z4distPfS_
	.cfi_endproc
.LFE2154:
	.size	_Z3dotPfS_, .-_Z3dotPfS_
	.globl	_Z9transformPfPA3_fS_S_
	.type	_Z9transformPfPA3_fS_S_, @function
_Z9transformPfPA3_fS_S_:
.LFB2010:
	.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
.LFE2010:
	.size	_Z9transformPfPA3_fS_S_, .-_Z9transformPfPA3_fS_S_
	.globl	_Z11do_rotationPA3_fS0_iPfS0_
	.type	_Z11do_rotationPA3_fS0_iPfS0_, @function
_Z11do_rotationPA3_fS0_iPfS0_:
.LFB2011:
	.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
.LFE2011:
	.size	_Z11do_rotationPA3_fS0_iPfS0_, .-_Z11do_rotationPA3_fS0_iPfS0_
	.globl	_Z5get50iPc
	.type	_Z5get50iPc, @function
_Z5get50iPc:
.LFB2012:
	.cfi_startproc
	endbr64
	movl	$808464432, (%rsi)
	movq	%rsi, %rax
	movw	$48, 4(%rsi)
	cmpl	$9, %edi
	jg	.L11
	movb	$0, 4(%rsi)
	ret
.L11:
	cmpl	$99, %edi
	jg	.L13
	movb	$0, 3(%rsi)
	ret
.L13:
	cmpl	$999, %edi
	jg	.L14
	movb	$0, 2(%rsi)
	ret
.L14:
	cmpl	$9999, %edi
	jg	.L15
	movb	$0, 1(%rsi)
	ret
.L15:
	cmpl	$99999, %edi
	jg	.L12
	movb	$0, (%rsi)
.L12:
	ret
	.cfi_endproc
.LFE2012:
	.size	_Z5get50iPc, .-_Z5get50iPc
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2038:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2038:
	.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
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
__device__ float dist(float x[3], float y[3])
{
    float d1=x[0]-y[0];
    float d2=x[1]-y[1];
    float d3=x[2]-y[2];

    return (d1*d1 + d2*d2 + d3*d3);
}

__device__ float dot(float a[], float b[])
{
    return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]);
}

__device__ void transform(float t[3], float u[3][3], float *x, float *x1)
{
    x1[0]=t[0]+dot(&u[0][0], x);
    x1[1]=t[1]+dot(&u[1][0], x);
    x1[2]=t[2]+dot(&u[2][0], x);
}

__device__ void do_rotation(float x[][3], float x1[][3], int len, float t[3], float u[3][3])
{
    int i=0;
    for(; i<len; i++)
    {
        transform(t,u,&x[i][0],&x1[i][0]);
    }
}

char* get50(int a,char *c)
{
    c[0]=c[1]=c[2]=c[3]=c[4]='0';
    c[5]='\0';
    if(a<10)	{
        c[4]='\0';
        return c;
    }
    if(a<100)	{
        c[3]='\0';
        return c;
    }
    if(a<1000)	{
        c[2]='\0';
        return c;
    }
    if(a<10000)	{
        c[1]='\0';
        return c;
    }
    if(a<100000) {
        c[0]='\0';
        return c;
    }

    return c;
}

	.text
	.file	"basic.hip"
	.globl	_Z5get50iPc                     # -- Begin function _Z5get50iPc
	.type	_Z5get50iPc,@function
_Z5get50iPc:                            # @_Z5get50iPc
	.cfi_startproc
# %bb.0:
	movq	%rsi, %rax
	movl	$808464432, (%rsi)              # imm = 0x30303030
	movw	$48, 4(%rsi)
	cmpl	$10, %edi
	jge	.LBB0_2
# %bb.1:
	leaq	4(%rax), %rcx
	jmp	.LBB0_9
.LBB0_2:
	cmpl	$100, %edi
	jae	.LBB0_4
# %bb.3:
	leaq	3(%rax), %rcx
	jmp	.LBB0_9
.LBB0_4:
	cmpl	$1000, %edi                     # imm = 0x3E8
	jae	.LBB0_6
# %bb.5:
	leaq	2(%rax), %rcx
	jmp	.LBB0_9
.LBB0_6:
	cmpl	$10000, %edi                    # imm = 0x2710
	jae	.LBB0_8
# %bb.7:
	leaq	1(%rax), %rcx
	jmp	.LBB0_9
.LBB0_8:
	movq	%rax, %rcx
	cmpl	$99999, %edi                    # imm = 0x1869F
	ja	.LBB0_10
.LBB0_9:                                # %.sink.split
	movb	$0, (%rcx)
.LBB0_10:
	retq
.Lfunc_end0:
	.size	_Z5get50iPc, .Lfunc_end0-_Z5get50iPc
	.cfi_endproc
                                        # -- End function
	.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 __hip_cuid_

	.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_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
