#include <stdio.h>
#include <cuda_runtime.h>
#include <time.h>
#include <vector>

using namespace std;

const int GPUs[] = {0,1,2,3,4}; // If left blank all available GPUs will be used.

vector<int> g(GPUs, GPUs + sizeof(GPUs)/sizeof(int));

void configure(size_t size, vector<int*> &buffer_s, vector<int*> &buffer_d,
               vector<cudaEvent_t> &start, vector<cudaEvent_t> &stop,
               cudaStream_t stream[])
{
    for (int i=0; i<g.size(); i++)
    {
        cudaSetDevice(g[i]);
        cudaMalloc(&buffer_s[i], size);
        cudaMalloc(&buffer_d[i], size);
        cudaEventCreate(&start[i]);
        cudaEventCreate(&stop[i]);
        for (int j=0; j<g.size(); j++)
        {
            int access;
            if (i!=j)
            {
                cudaDeviceCanAccessPeer(&access, g[i], g[j]);
                if (access)
                {
                    cudaSetDevice(g[i]);
                    cudaDeviceEnablePeerAccess(g[j], 0);
                    cudaStreamCreate(&stream[i*g.size()+j]);
                    cudaDeviceSynchronize();
                    cudaSetDevice(g[j]);
                    cudaDeviceEnablePeerAccess(g[i], 0);
                    cudaStreamCreate(&stream[i*g.size()+j]);
                    cudaDeviceSynchronize();
                }
            }
        }
    }
}

void reset(size_t size, vector<int*> &buffer_s, vector<int*> &buffer_d,
               vector<cudaEvent_t> &start, vector<cudaEvent_t> &stop,
               cudaStream_t stream[])
{
    for (int i=0; i<g.size(); i++)
    {
        cudaSetDevice(g[i]);
        cudaFree(buffer_s[i]);
        cudaFree(buffer_d[i]);
        cudaEventDestroy(start[i]);
        cudaEventDestroy(stop[i]);
        cudaStreamDestroy(stream[i]);
        for (int j=0; j<g.size(); j++)
        {
            int access;
            if (i!=j)
            {
                cudaDeviceCanAccessPeer(&access, g[i], g[j]);
                if (access)
                {
                    cudaSetDevice(g[i]);
                    cudaDeviceDisablePeerAccess(g[j]);
                    cudaDeviceSynchronize();
                    cudaSetDevice(g[j]);
                    cudaDeviceDisablePeerAccess(g[i]);
                    cudaDeviceSynchronize();
                }
            }
        }
    }
}

void burst_copy(size_t size, vector<int*> &buffer_s, vector<int*> &buffer_d,
                vector<cudaEvent_t> &start, vector<cudaEvent_t> &stop,
                cudaStream_t stream[])
{
    float bw[g.size()], time_taken[g.size()];
    printf("\nBurst copy: Every GPU is memcpy-ing to every other GPU\n");
    printf("%4d%8d%12s\n%4s%8s%12s\n%4s%8s%12s\n",
            1, 2,"n","^","^", "^","|","|","|");
    printf("3<-0->2 4<-1->3 ... %s<-%s->%s\n","q", "m", "p");
    printf("%4s%8s%12s\n%4s%8s%12s\n%4d%8d%12s\n\n",
            "|","|","|","v","v", "v",4,0,"r");
    configure(size, buffer_s, buffer_d, start, stop, stream);
    
    for (int i=0; i<g.size(); i++)
    {
        cudaEventRecord(start[i]);
        for (int j=0; j<g.size(); j++)
            if (i!=j)
                cudaMemcpyPeerAsync(buffer_s[i],g[i],buffer_d[j],g[j], size,
                                    stream[i*g.size()+j]);
        cudaEventRecord(stop[i]);
    }

    for (int i=0; i<g.size(); i++)
    {
        cudaEventSynchronize(stop[i]);
        float time_ms;
        cudaEventElapsedTime(&time_ms,start[i],stop[i]);
        time_taken[i] = time_ms*1e3;
        bw[i] = (float)size*1000/time_ms/(1<<30);
    }
    printf("\t\tTime(ms)\tBandwidth(Gbps)\n");
    for (int i=0; i<g.size(); i++)
        printf("GPU%d\t\t%6.2f\t\t%6.2f\n",g[i], time_taken[i], bw[i]);
}

void perf_analyze(size_t size)
{
    vector<int*> buffer_s(g.size());
    vector<int*> buffer_d(g.size());
    vector<cudaEvent_t> start(g.size());
    vector<cudaEvent_t> stop(g.size());
    cudaStream_t stream[g.size() * g.size()];

    configure(size, buffer_s, buffer_d, start, stop, stream);

    // Cyclic
    burst_copy(size, buffer_s, buffer_d, start, stop, stream);

    reset(size, buffer_s, buffer_d, start, stop, stream);
}

int main(int argc, char** argv)
{
    // NVLink D<->D performance
    size_t size = (1<<30);
    if (!g.size())
    {
        int n;
        printf("Using all 8 GPUs\n");
        cudaGetDeviceCount(&n);
        for (int i=0; i<n; i++)
            g.push_back(i);
    }
    //define size
    perf_analyze(size);

    return 0;
}

	.file	"tmpxft_002f3cc6_00000000-6_nvlink_burst.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2903:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2903:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0, @function
_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0:
.LFB3293:
	.cfi_startproc
	testq	%rdi, %rdi
	je	.L3
	movabsq	$2305843009213693951, %rax
	cmpq	%rdi, %rax
	jnb	.L4
	pushq	%rax
	.cfi_def_cfa_offset 16
	movabsq	$4611686018427387903, %rax
	cmpq	%rdi, %rax
	jnb	.L5
	call	_ZSt28__throw_bad_array_new_lengthv@PLT
.L5:
	call	_ZSt17__throw_bad_allocv@PLT
.L4:
	.cfi_def_cfa_offset 8
	salq	$2, %rdi
	jmp	_Znwm@PLT
.L3:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE3293:
	.size	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0, .-_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	.globl	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	.type	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st, @function
_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st:
.LFB2896:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r8, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r9, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	g(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	movq	%rsi, 16(%rsp)
	movq	%rdx, 24(%rsp)
	movq	%rcx, 32(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
.L11:
	movq	(%r12), %rdx
	movq	8+g(%rip), %rax
	subq	%rdx, %rax
	sarq	$2, %rax
	cmpq	%rax, %rbx
	jnb	.L20
	movl	(%rdx,%rbx,4), %edi
	leaq	0(,%rbx,8), %rbp
	leaq	0(,%rbx,4), %r15
	call	cudaSetDevice@PLT
	movq	16(%rsp), %rax
	movq	8(%rsp), %rsi
	movq	(%rax), %rdi
	addq	%rbp, %rdi
	call	cudaMalloc@PLT
	movq	24(%rsp), %rax
	movq	8(%rsp), %rsi
	movq	(%rax), %rdi
	addq	%rbp, %rdi
	call	cudaMalloc@PLT
	movq	32(%rsp), %rax
	movq	(%rax), %rdi
	addq	%rbp, %rdi
	call	cudaEventCreate@PLT
	movq	(%r14), %rdi
	addq	%rbp, %rdi
	xorl	%ebp, %ebp
	call	cudaEventCreate@PLT
	leaq	52(%rsp), %rax
	movq	%rax, 40(%rsp)
.L12:
	movq	(%r12), %rdx
	movq	8+g(%rip), %rax
	subq	%rdx, %rax
	sarq	$2, %rax
	cmpq	%rax, %rbp
	jnb	.L21
	cmpl	%ebp, %ebx
	je	.L14
	movl	(%rdx,%rbp,4), %eax
	movl	(%rdx,%r15), %esi
	movq	40(%rsp), %rdi
	movl	%eax, %edx
	call	cudaDeviceCanAccessPeer@PLT
	cmpl	$0, 52(%rsp)
	je	.L14
	movq	(%r12), %rax
	movl	(%rax,%r15), %edi
	call	cudaSetDevice@PLT
	movq	(%r12), %rax
	xorl	%esi, %esi
	movl	(%rax,%rbp,4), %edi
	call	cudaDeviceEnablePeerAccess@PLT
	movq	8+g(%rip), %rax
	subq	(%r12), %rax
	sarq	$2, %rax
	imulq	%rbx, %rax
	addq	%rbp, %rax
	leaq	0(%r13,%rax,8), %rdi
	call	cudaStreamCreate@PLT
	call	cudaDeviceSynchronize@PLT
	movq	(%r12), %rax
	movl	(%rax,%rbp,4), %edi
	call	cudaSetDevice@PLT
	movq	(%r12), %rax
	xorl	%esi, %esi
	movl	(%rax,%r15), %edi
	call	cudaDeviceEnablePeerAccess@PLT
	movq	8+g(%rip), %rax
	subq	(%r12), %rax
	sarq	$2, %rax
	imulq	%rbx, %rax
	addq	%rbp, %rax
	leaq	0(%r13,%rax,8), %rdi
	call	cudaStreamCreate@PLT
	call	cudaDeviceSynchronize@PLT
.L14:
	incq	%rbp
	jmp	.L12
.L21:
	incq	%rbx
	jmp	.L11
.L20:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE2896:
	.size	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st, .-_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	.globl	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	.type	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st, @function
_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st:
.LFB2897:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r9, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	g(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%rsi, (%rsp)
	movq	%rdx, 8(%rsp)
	movq	%rcx, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
.L23:
	movq	(%r12), %rdx
	movq	8+g(%rip), %rax
	subq	%rdx, %rax
	sarq	$2, %rax
	cmpq	%rax, %rbx
	jnb	.L32
	movl	(%rdx,%rbx,4), %edi
	leaq	0(,%rbx,4), %r15
	xorl	%ebp, %ebp
	call	cudaSetDevice@PLT
	movq	(%rsp), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rdi
	call	cudaFree@PLT
	movq	8(%rsp), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rdi
	call	cudaFree@PLT
	movq	16(%rsp), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rdi
	call	cudaEventDestroy@PLT
	movq	0(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	call	cudaEventDestroy@PLT
	movq	(%r14,%rbx,8), %rdi
	call	cudaStreamDestroy@PLT
	leaq	36(%rsp), %rax
	movq	%rax, 24(%rsp)
.L24:
	movq	(%r12), %rdx
	movq	8+g(%rip), %rax
	subq	%rdx, %rax
	sarq	$2, %rax
	cmpq	%rax, %rbp
	jnb	.L33
	cmpl	%ebp, %ebx
	je	.L26
	movl	(%rdx,%rbp,4), %eax
	movl	(%rdx,%r15), %esi
	movq	24(%rsp), %rdi
	movl	%eax, %edx
	call	cudaDeviceCanAccessPeer@PLT
	cmpl	$0, 36(%rsp)
	je	.L26
	movq	(%r12), %rax
	movl	(%rax,%r15), %edi
	call	cudaSetDevice@PLT
	movq	(%r12), %rax
	movl	(%rax,%rbp,4), %edi
	call	cudaDeviceDisablePeerAccess@PLT
	call	cudaDeviceSynchronize@PLT
	movq	(%r12), %rax
	movl	(%rax,%rbp,4), %edi
	call	cudaSetDevice@PLT
	movq	(%r12), %rax
	movl	(%rax,%r15), %edi
	call	cudaDeviceDisablePeerAccess@PLT
	call	cudaDeviceSynchronize@PLT
.L26:
	incq	%rbp
	jmp	.L24
.L33:
	incq	%rbx
	jmp	.L23
.L32:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE2897:
	.size	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st, .-_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\nBurst copy: Every GPU is memcpy-ing to every other GPU\n"
.LC1:
	.string	"^"
.LC2:
	.string	"n"
.LC3:
	.string	"%4d%8d%12s\n%4s%8s%12s\n%4s%8s%12s\n"
.LC4:
	.string	"|"
.LC5:
	.string	"p"
.LC6:
	.string	"m"
.LC7:
	.string	"q"
.LC8:
	.string	"3<-0->2 4<-1->3 ... %s<-%s->%s\n"
.LC9:
	.string	"v"
.LC10:
	.string	"%4s%8s%12s\n%4s%8s%12s\n%4d%8d%12s\n\n"
.LC11:
	.string	"r"
.LC14:
	.string	"\t\tTime(ms)\tBandwidth(Gbps)\n"
.LC15:
	.string	"GPU%d\t\t%6.2f\t\t%6.2f\n"
	.text
	.globl	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	.type	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st, @function
_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st:
.LFB2898:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	movq	%rcx, %r13
	pushq	%r12
	.cfi_offset 12, -48
	movq	%r8, %r12
	pushq	%rbx
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$88, %rsp
	movq	%rsi, -80(%rbp)
	movq	%rdx, -88(%rbp)
	movq	%rsp, %rcx
	movq	%r9, -96(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	movq	8+g(%rip), %rax
	subq	g(%rip), %rax
	addq	$15, %rax
	movq	%rax, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
.L35:
	cmpq	%rcx, %rsp
	je	.L36
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L35
.L36:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L37
	orq	$0, -8(%rsp,%rdx)
.L37:
	movq	%rsp, -104(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L38:
	cmpq	%rcx, %rsp
	je	.L39
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L38
.L39:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L40
	orq	$0, -8(%rsp,%rax)
.L40:
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	movq	%rsp, -112(%rbp)
	xorl	%r15d, %r15d
	movl	$2, %edi
	leaq	.LC4(%rip), %r14
	call	__printf_chk@PLT
	movl	$2, %ecx
	movl	$1, %edx
	leaq	.LC1(%rip), %r9
	pushq	%rax
	leaq	.LC2(%rip), %r8
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	movl	$2, %edi
	pushq	%r14
	pushq	%r14
	pushq	%r9
	pushq	%r9
	call	__printf_chk@PLT
	addq	$48, %rsp
	xorl	%eax, %eax
	leaq	.LC7(%rip), %rdx
	leaq	.LC5(%rip), %r8
	leaq	.LC6(%rip), %rcx
	movl	$2, %edi
	leaq	.LC8(%rip), %rsi
	call	__printf_chk@PLT
	movq	%r14, %r8
	movq	%r14, %rcx
	movl	$2, %edi
	leaq	.LC9(%rip), %r9
	leaq	.LC11(%rip), %rax
	pushq	%rdx
	movq	%r14, %rdx
	pushq	%rax
	leaq	.LC10(%rip), %rsi
	xorl	%eax, %eax
	leaq	g(%rip), %r14
	pushq	$0
	pushq	$4
	pushq	%r9
	pushq	%r9
	call	__printf_chk@PLT
	movq	-96(%rbp), %r9
	movq	-88(%rbp), %rdx
	movq	%r12, %r8
	movq	-80(%rbp), %rsi
	addq	$48, %rsp
	movq	%r13, %rcx
	movq	%rbx, %rdi
	call	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
.L41:
	movq	8+g(%rip), %rax
	subq	(%r14), %rax
	sarq	$2, %rax
	cmpq	%rax, %r15
	jnb	.L60
	leaq	0(,%r15,8), %rax
	xorl	%esi, %esi
	movq	%rax, -72(%rbp)
	movq	0(%r13), %rax
	movq	(%rax,%r15,8), %rdi
	call	cudaEventRecord@PLT
	leaq	0(,%r15,4), %rax
	xorl	%r11d, %r11d
	movq	%rax, -120(%rbp)
.L42:
	movq	(%r14), %rsi
	movq	8+g(%rip), %rax
	subq	%rsi, %rax
	sarq	$2, %rax
	cmpq	%rax, %r11
	jnb	.L61
	cmpl	%r11d, %r15d
	je	.L43
	movq	-88(%rbp), %rdi
	movl	(%rsi,%r11,4), %ecx
	imulq	%r15, %rax
	movq	%rbx, %r8
	movq	-72(%rbp), %r10
	movq	%r11, -128(%rbp)
	movq	(%rdi), %rdx
	movq	-120(%rbp), %rdi
	addq	%r11, %rax
	movl	(%rsi,%rdi), %esi
	movq	-80(%rbp), %rdi
	movq	(%rdx,%r11,8), %rdx
	movq	(%rdi), %rdi
	movq	(%rdi,%r10), %rdi
	movq	-96(%rbp), %r10
	movq	(%r10,%rax,8), %r9
	call	cudaMemcpyPeerAsync@PLT
	movq	-128(%rbp), %r11
.L43:
	incq	%r11
	jmp	.L42
.L61:
	movq	(%r12), %rax
	movq	-72(%rbp), %rcx
	xorl	%esi, %esi
	incq	%r15
	movq	(%rax,%rcx), %rdi
	call	cudaEventRecord@PLT
	jmp	.L41
.L60:
	xorl	%r15d, %r15d
.L46:
	movq	8+g(%rip), %rax
	subq	(%r14), %rax
	sarq	$2, %rax
	cmpq	%rax, %r15
	jnb	.L62
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	call	cudaEventSynchronize@PLT
	movq	(%r12), %rax
	leaq	-60(%rbp), %rdi
	movq	(%rax,%r15,8), %rdx
	movq	0(%r13), %rax
	movq	(%rax,%r15,8), %rsi
	call	cudaEventElapsedTime@PLT
	movss	-60(%rbp), %xmm1
	movq	-112(%rbp), %rax
	movss	.LC12(%rip), %xmm0
	mulss	%xmm1, %xmm0
	movss	%xmm0, (%rax,%r15,4)
	testq	%rbx, %rbx
	js	.L47
	cvtsi2ssq	%rbx, %xmm0
	jmp	.L48
.L47:
	movq	%rbx, %rax
	movq	%rbx, %rdx
	shrq	%rax
	andl	$1, %edx
	orq	%rdx, %rax
	cvtsi2ssq	%rax, %xmm0
	addss	%xmm0, %xmm0
.L48:
	mulss	.LC12(%rip), %xmm0
	movq	-104(%rbp), %rax
	divss	%xmm1, %xmm0
	mulss	.LC13(%rip), %xmm0
	movss	%xmm0, (%rax,%r15,4)
	incq	%r15
	jmp	.L46
.L62:
	leaq	.LC14(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__printf_chk@PLT
	leaq	.LC15(%rip), %r12
.L50:
	movq	(%r14), %rdx
	movq	8+g(%rip), %rax
	subq	%rdx, %rax
	sarq	$2, %rax
	cmpq	%rax, %rbx
	jnb	.L63
	movq	-112(%rbp), %rax
	movl	(%rdx,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$2, %edi
	cvtss2sd	(%rax,%rbx,4), %xmm0
	movq	-104(%rbp), %rax
	cvtss2sd	(%rax,%rbx,4), %xmm1
	movb	$2, %al
	incq	%rbx
	call	__printf_chk@PLT
	jmp	.L50
.L63:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L52
	call	__stack_chk_fail@PLT
.L52:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2898:
	.size	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st, .-_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2926:
	.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
.LFE2926:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt6vectorIPiSaIS0_EEC2EmRKS1_.str1.1,"aMS",@progbits,1
.LC16:
	.string	"cannot create std::vector larger than max_size()"
	.section	.text._ZNSt6vectorIPiSaIS0_EEC2EmRKS1_,"axG",@progbits,_ZNSt6vectorIPiSaIS0_EEC5EmRKS1_,comdat
	.align 2
	.weak	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
	.type	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_, @function
_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_:
.LFB2996:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmpq	%rsi, %rax
	jnb	.L67
	leaq	.LC16(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L67:
	movq	%rsi, %rbp
	xorl	%esi, %esi
	movq	%rdi, %rbx
	xorl	%eax, %eax
	movq	%rsi, (%rdi)
	leaq	0(,%rbp,8), %r12
	movq	%rsi, 8(%rdi)
	movq	%rsi, 16(%rdi)
	testq	%rbp, %rbp
	je	.L68
	movq	%r12, %rdi
	call	_Znwm@PLT
.L68:
	addq	%rax, %r12
	movq	%rax, (%rbx)
	movq	%rax, 8(%rbx)
	movq	%r12, 16(%rbx)
	testq	%rbp, %rbp
	je	.L69
	xorl	%ecx, %ecx
	addq	$8, %rax
	movq	%rcx, -8(%rax)
	decq	%rbp
	je	.L69
.L70:
	cmpq	%rax, %r12
	je	.L69
	xorl	%edx, %edx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	jmp	.L70
.L69:
	movq	%rax, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2996:
	.size	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_, .-_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
	.weak	_ZNSt6vectorIPiSaIS0_EEC1EmRKS1_
	.set	_ZNSt6vectorIPiSaIS0_EEC1EmRKS1_,_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
	.section	.text._ZNSt6vectorIPiSaIS0_EED2Ev,"axG",@progbits,_ZNSt6vectorIPiSaIS0_EED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIPiSaIS0_EED2Ev
	.type	_ZNSt6vectorIPiSaIS0_EED2Ev, @function
_ZNSt6vectorIPiSaIS0_EED2Ev:
.LFB2999:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L81
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L81:
	ret
	.cfi_endproc
.LFE2999:
	.size	_ZNSt6vectorIPiSaIS0_EED2Ev, .-_ZNSt6vectorIPiSaIS0_EED2Ev
	.weak	_ZNSt6vectorIPiSaIS0_EED1Ev
	.set	_ZNSt6vectorIPiSaIS0_EED1Ev,_ZNSt6vectorIPiSaIS0_EED2Ev
	.section	.text._ZNSt6vectorIP10CUevent_stSaIS1_EEC2EmRKS2_,"axG",@progbits,_ZNSt6vectorIP10CUevent_stSaIS1_EEC5EmRKS2_,comdat
	.align 2
	.weak	_ZNSt6vectorIP10CUevent_stSaIS1_EEC2EmRKS2_
	.type	_ZNSt6vectorIP10CUevent_stSaIS1_EEC2EmRKS2_, @function
_ZNSt6vectorIP10CUevent_stSaIS1_EEC2EmRKS2_:
.LFB3008:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmpq	%rsi, %rax
	jnb	.L84
	leaq	.LC16(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L84:
	movq	%rsi, %rbp
	xorl	%esi, %esi
	movq	%rdi, %rbx
	xorl	%eax, %eax
	movq	%rsi, (%rdi)
	leaq	0(,%rbp,8), %r12
	movq	%rsi, 8(%rdi)
	movq	%rsi, 16(%rdi)
	testq	%rbp, %rbp
	je	.L85
	movq	%r12, %rdi
	call	_Znwm@PLT
.L85:
	addq	%rax, %r12
	movq	%rax, (%rbx)
	movq	%rax, 8(%rbx)
	movq	%r12, 16(%rbx)
	testq	%rbp, %rbp
	je	.L86
	xorl	%ecx, %ecx
	addq	$8, %rax
	movq	%rcx, -8(%rax)
	decq	%rbp
	je	.L86
.L87:
	cmpq	%rax, %r12
	je	.L86
	xorl	%edx, %edx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	jmp	.L87
.L86:
	movq	%rax, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3008:
	.size	_ZNSt6vectorIP10CUevent_stSaIS1_EEC2EmRKS2_, .-_ZNSt6vectorIP10CUevent_stSaIS1_EEC2EmRKS2_
	.weak	_ZNSt6vectorIP10CUevent_stSaIS1_EEC1EmRKS2_
	.set	_ZNSt6vectorIP10CUevent_stSaIS1_EEC1EmRKS2_,_ZNSt6vectorIP10CUevent_stSaIS1_EEC2EmRKS2_
	.section	.text._ZNSt6vectorIP10CUevent_stSaIS1_EED2Ev,"axG",@progbits,_ZNSt6vectorIP10CUevent_stSaIS1_EED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIP10CUevent_stSaIS1_EED2Ev
	.type	_ZNSt6vectorIP10CUevent_stSaIS1_EED2Ev, @function
_ZNSt6vectorIP10CUevent_stSaIS1_EED2Ev:
.LFB3011:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L98
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L98:
	ret
	.cfi_endproc
.LFE3011:
	.size	_ZNSt6vectorIP10CUevent_stSaIS1_EED2Ev, .-_ZNSt6vectorIP10CUevent_stSaIS1_EED2Ev
	.weak	_ZNSt6vectorIP10CUevent_stSaIS1_EED1Ev
	.set	_ZNSt6vectorIP10CUevent_stSaIS1_EED1Ev,_ZNSt6vectorIP10CUevent_stSaIS1_EED2Ev
	.text
	.globl	_Z12perf_analyzem
	.type	_Z12perf_analyzem, @function
_Z12perf_analyzem:
.LFB2899:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA2899
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	-152(%rbp), %r15
	movq	%rdi, %r14
	pushq	%r13
	movq	%r15, %rdi
	pushq	%r12
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	-128(%rbp), %r12
	pushq	%rbx
	.cfi_offset 3, -56
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdx
	subq	$136, %rsp
	movq	8+g(%rip), %rsi
	subq	g(%rip), %rsi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	sarq	$2, %rsi
.LEHB0:
	call	_ZNSt6vectorIPiSaIS0_EEC1EmRKS1_
.LEHE0:
	movq	8+g(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r12, %rdi
	subq	g(%rip), %rsi
	sarq	$2, %rsi
.LEHB1:
	call	_ZNSt6vectorIPiSaIS0_EEC1EmRKS1_
.LEHE1:
	movq	8+g(%rip), %rsi
	leaq	-104(%rbp), %r13
	movq	%rbx, %rdx
	subq	g(%rip), %rsi
	sarq	$2, %rsi
	movq	%r13, %rdi
.LEHB2:
	call	_ZNSt6vectorIP10CUevent_stSaIS1_EEC1EmRKS2_
.LEHE2:
	movq	8+g(%rip), %rsi
	subq	g(%rip), %rsi
	leaq	-153(%rbp), %rdx
	movq	%rbx, %rdi
	sarq	$2, %rsi
.LEHB3:
	call	_ZNSt6vectorIP10CUevent_stSaIS1_EEC1EmRKS2_
.LEHE3:
	movq	8+g(%rip), %rax
	subq	g(%rip), %rax
	movq	%rsp, %rcx
	sarq	$2, %rax
	imulq	%rax, %rax
	leaq	15(,%rax,8), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L101:
	cmpq	%rcx, %rsp
	je	.L102
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L101
.L102:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L103
	orq	$0, -8(%rsp,%rax)
.L103:
	movq	%rsp, %r9
	movq	%rbx, %r8
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%r15, %rsi
	movq	%r14, %rdi
	movq	%rsp, -168(%rbp)
.LEHB4:
	call	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	movq	-168(%rbp), %r9
	movq	%rbx, %r8
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
	movq	-168(%rbp), %r9
	movq	%rbx, %r8
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP10CUevent_stSaIS5_EES8_PP11CUstream_st
.LEHE4:
	movq	%rbx, %rdi
	call	_ZNSt6vectorIP10CUevent_stSaIS1_EED1Ev
	movq	%r13, %rdi
	call	_ZNSt6vectorIP10CUevent_stSaIS1_EED1Ev
	movq	%r12, %rdi
	call	_ZNSt6vectorIPiSaIS0_EED1Ev
	movq	%r15, %rdi
	call	_ZNSt6vectorIPiSaIS0_EED1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L109
	jmp	.L117
.L113:
	endbr64
	movq	%rax, %r14
.L104:
	movq	%rbx, %rdi
	movq	%r14, %rbx
	call	_ZNSt6vectorIP10CUevent_stSaIS1_EED1Ev
	jmp	.L105
.L112:
	endbr64
	movq	%rax, %rbx
.L105:
	movq	%r13, %rdi
	call	_ZNSt6vectorIP10CUevent_stSaIS1_EED1Ev
	jmp	.L106
.L111:
	endbr64
	movq	%rax, %rbx
.L106:
	movq	%r12, %rdi
	call	_ZNSt6vectorIPiSaIS0_EED1Ev
	jmp	.L107
.L110:
	endbr64
	movq	%rax, %rbx
.L107:
	movq	%r15, %rdi
	call	_ZNSt6vectorIPiSaIS0_EED1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L117
	movq	%rbx, %rdi
.LEHB5:
	call	_Unwind_Resume@PLT
.LEHE5:
.L117:
	call	__stack_chk_fail@PLT
.L109:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2899:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA2899:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE2899-.LLSDACSB2899
.LLSDACSB2899:
	.uleb128 .LEHB0-.LFB2899
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB2899
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L110-.LFB2899
	.uleb128 0
	.uleb128 .LEHB2-.LFB2899
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L111-.LFB2899
	.uleb128 0
	.uleb128 .LEHB3-.LFB2899
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L112-.LFB2899
	.uleb128 0
	.uleb128 .LEHB4-.LFB2899
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L113-.LFB2899
	.uleb128 0
	.uleb128 .LEHB5-.LFB2899
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE2899:
	.text
	.size	_Z12perf_analyzem, .-_Z12perf_analyzem
	.section	.text._ZNSt12_Vector_baseIiSaIiEED2Ev,"axG",@progbits,_ZNSt12_Vector_baseIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt12_Vector_baseIiSaIiEED2Ev
	.type	_ZNSt12_Vector_baseIiSaIiEED2Ev, @function
_ZNSt12_Vector_baseIiSaIiEED2Ev:
.LFB3067:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L119
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L119:
	ret
	.cfi_endproc
.LFE3067:
	.size	_ZNSt12_Vector_baseIiSaIiEED2Ev, .-_ZNSt12_Vector_baseIiSaIiEED2Ev
	.weak	_ZNSt12_Vector_baseIiSaIiEED1Ev
	.set	_ZNSt12_Vector_baseIiSaIiEED1Ev,_ZNSt12_Vector_baseIiSaIiEED2Ev
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEED2Ev
	.type	_ZNSt6vectorIiSaIiEED2Ev, @function
_ZNSt6vectorIiSaIiEED2Ev:
.LFB3280:
	.cfi_startproc
	endbr64
	jmp	_ZNSt12_Vector_baseIiSaIiEED2Ev
	.cfi_endproc
.LFE3280:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .-_ZNSt6vectorIiSaIiEED2Ev
	.weak	_ZNSt6vectorIiSaIiEED1Ev
	.set	_ZNSt6vectorIiSaIiEED1Ev,_ZNSt6vectorIiSaIiEED2Ev
	.section	.rodata._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_.str1.1,"aMS",@progbits,1
.LC17:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, @function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_:
.LFB3111:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movabsq	$2305843009213693951, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, (%rsp)
	subq	%r14, %rax
	sarq	$2, %rax
	cmpq	%rbx, %rax
	jne	.L123
	leaq	.LC17(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L123:
	movq	%rdx, %rcx
	cmpq	%r14, (%rsp)
	movl	$1, %edx
	movq	%rdi, %r13
	cmovne	%rax, %rdx
	movq	%rsi, %rbp
	addq	%rdx, %rax
	jc	.L127
	movabsq	$2305843009213693951, %rbx
	cmpq	%rbx, %rax
	cmovbe	%rax, %rbx
.L127:
	movq	%rbx, %rdi
	movq	%rcx, 8(%rsp)
	movq	%rbp, %r15
	call	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	movq	8(%rsp), %rcx
	subq	%r14, %r15
	movq	%rax, %r12
	movl	(%rcx), %eax
	movl	%eax, (%r12,%r15)
	testq	%r15, %r15
	jle	.L128
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L128:
	movq	(%rsp), %rax
	leaq	4(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L129
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L129:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L130
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L130:
	leaq	(%r12,%rbx,4), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE3111:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.section	.rodata.str1.1
.LC18:
	.string	"Using all 8 GPUs\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB2900:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	movq	g(%rip), %rax
	cmpq	%rax, 8+g(%rip)
	jne	.L138
	leaq	.LC18(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__printf_chk@PLT
	movq	%rsp, %rdi
	leaq	g(%rip), %rbp
	call	cudaGetDeviceCount@PLT
.L139:
	movl	%ebx, 4(%rsp)
	cmpl	%ebx, (%rsp)
	jle	.L138
	movq	8+g(%rip), %rsi
	cmpq	16+g(%rip), %rsi
	je	.L140
	movl	%ebx, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8+g(%rip)
	jmp	.L141
.L140:
	leaq	4(%rsp), %rdx
	movq	%rbp, %rdi
	call	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.L141:
	incl	%ebx
	jmp	.L139
.L138:
	movl	$1073741824, %edi
	call	_Z12perf_analyzem
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L143
	call	__stack_chk_fail@PLT
.L143:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2900:
	.size	main, .-main
	.type	_GLOBAL__sub_I_g, @function
_GLOBAL__sub_I_g:
.LFB3282:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3282
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%ecx, %ecx
	movl	$5, %edi
	leaq	g(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pushq	%rdx
	.cfi_def_cfa_offset 32
	movq	%rcx, g(%rip)
	movq	%rcx, 8+g(%rip)
	movq	%rcx, 16+g(%rip)
.LEHB6:
	call	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
.LEHE6:
	movl	$1, %ecx
	movl	$4, 16(%rax)
	leaq	20(%rax), %rdx
	movq	%rbp, %rsi
	movabsq	$12884901890, %rbx
	salq	$32, %rcx
	movq	%rdx, 16+g(%rip)
	leaq	_ZNSt6vectorIiSaIiEED1Ev(%rip), %rdi
	movq	%rcx, (%rax)
	movq	%rbx, 8(%rax)
	movq	%rdx, 8+g(%rip)
	leaq	__dso_handle(%rip), %rdx
	movq	%rax, g(%rip)
	popq	%rax
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	__cxa_atexit@PLT
.L147:
	.cfi_restore_state
	endbr64
	movq	%rax, %rbx
.L146:
	movq	%rbp, %rdi
	call	_ZNSt12_Vector_baseIiSaIiEED2Ev
	movq	%rbx, %rdi
.LEHB7:
	call	_Unwind_Resume@PLT
.LEHE7:
	.cfi_endproc
.LFE3282:
	.section	.gcc_except_table
.LLSDA3282:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3282-.LLSDACSB3282
.LLSDACSB3282:
	.uleb128 .LEHB6-.LFB3282
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L147-.LFB3282
	.uleb128 0
	.uleb128 .LEHB7-.LFB3282
	.uleb128 .LEHE7-.LEHB7
	.uleb128 0
	.uleb128 0
.LLSDACSE3282:
	.section	.text.startup
	.size	_GLOBAL__sub_I_g, .-_GLOBAL__sub_I_g
	.section	.init_array
	.align 8
	.quad	_GLOBAL__sub_I_g
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	g
	.bss
	.align 16
	.type	g, @object
	.size	g, 24
g:
	.zero	24
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC12:
	.long	1148846080
	.align 4
.LC13:
	.long	813694976
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.hidden	__dso_handle
	.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 <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
#include <vector>

using namespace std;

const int GPUs[] = {0,1,2,3,4}; // If left blank all available GPUs will be used.

vector<int> g(GPUs, GPUs + sizeof(GPUs)/sizeof(int));

void configure(size_t size, vector<int*> &buffer_s, vector<int*> &buffer_d,
               vector<hipEvent_t> &start, vector<hipEvent_t> &stop,
               hipStream_t stream[])
{
    for (int i=0; i<g.size(); i++)
    {
        hipSetDevice(g[i]);
        hipMalloc(&buffer_s[i], size);
        hipMalloc(&buffer_d[i], size);
        hipEventCreate(&start[i]);
        hipEventCreate(&stop[i]);
        for (int j=0; j<g.size(); j++)
        {
            int access;
            if (i!=j)
            {
                hipDeviceCanAccessPeer(&access, g[i], g[j]);
                if (access)
                {
                    hipSetDevice(g[i]);
                    hipDeviceEnablePeerAccess(g[j], 0);
                    hipStreamCreate(&stream[i*g.size()+j]);
                    hipDeviceSynchronize();
                    hipSetDevice(g[j]);
                    hipDeviceEnablePeerAccess(g[i], 0);
                    hipStreamCreate(&stream[i*g.size()+j]);
                    hipDeviceSynchronize();
                }
            }
        }
    }
}

void reset(size_t size, vector<int*> &buffer_s, vector<int*> &buffer_d,
               vector<hipEvent_t> &start, vector<hipEvent_t> &stop,
               hipStream_t stream[])
{
    for (int i=0; i<g.size(); i++)
    {
        hipSetDevice(g[i]);
        hipFree(buffer_s[i]);
        hipFree(buffer_d[i]);
        hipEventDestroy(start[i]);
        hipEventDestroy(stop[i]);
        hipStreamDestroy(stream[i]);
        for (int j=0; j<g.size(); j++)
        {
            int access;
            if (i!=j)
            {
                hipDeviceCanAccessPeer(&access, g[i], g[j]);
                if (access)
                {
                    hipSetDevice(g[i]);
                    hipDeviceDisablePeerAccess(g[j]);
                    hipDeviceSynchronize();
                    hipSetDevice(g[j]);
                    hipDeviceDisablePeerAccess(g[i]);
                    hipDeviceSynchronize();
                }
            }
        }
    }
}

void burst_copy(size_t size, vector<int*> &buffer_s, vector<int*> &buffer_d,
                vector<hipEvent_t> &start, vector<hipEvent_t> &stop,
                hipStream_t stream[])
{
    float bw[g.size()], time_taken[g.size()];
    printf("\nBurst copy: Every GPU is memcpy-ing to every other GPU\n");
    printf("%4d%8d%12s\n%4s%8s%12s\n%4s%8s%12s\n",
            1, 2,"n","^","^", "^","|","|","|");
    printf("3<-0->2 4<-1->3 ... %s<-%s->%s\n","q", "m", "p");
    printf("%4s%8s%12s\n%4s%8s%12s\n%4d%8d%12s\n\n",
            "|","|","|","v","v", "v",4,0,"r");
    configure(size, buffer_s, buffer_d, start, stop, stream);
    
    for (int i=0; i<g.size(); i++)
    {
        hipEventRecord(start[i]);
        for (int j=0; j<g.size(); j++)
            if (i!=j)
                hipMemcpyPeerAsync(buffer_s[i],g[i],buffer_d[j],g[j], size,
                                    stream[i*g.size()+j]);
        hipEventRecord(stop[i]);
    }

    for (int i=0; i<g.size(); i++)
    {
        hipEventSynchronize(stop[i]);
        float time_ms;
        hipEventElapsedTime(&time_ms,start[i],stop[i]);
        time_taken[i] = time_ms*1e3;
        bw[i] = (float)size*1000/time_ms/(1<<30);
    }
    printf("\t\tTime(ms)\tBandwidth(Gbps)\n");
    for (int i=0; i<g.size(); i++)
        printf("GPU%d\t\t%6.2f\t\t%6.2f\n",g[i], time_taken[i], bw[i]);
}

void perf_analyze(size_t size)
{
    vector<int*> buffer_s(g.size());
    vector<int*> buffer_d(g.size());
    vector<hipEvent_t> start(g.size());
    vector<hipEvent_t> stop(g.size());
    hipStream_t stream[g.size() * g.size()];

    configure(size, buffer_s, buffer_d, start, stop, stream);

    // Cyclic
    burst_copy(size, buffer_s, buffer_d, start, stop, stream);

    reset(size, buffer_s, buffer_d, start, stop, stream);
}

int main(int argc, char** argv)
{
    // NVLink D<->D performance
    size_t size = (1<<30);
    if (!g.size())
    {
        int n;
        printf("Using all 8 GPUs\n");
        hipGetDeviceCount(&n);
        for (int i=0; i<n; i++)
            g.push_back(i);
    }
    //define size
    perf_analyze(size);

    return 0;
}

	.text
	.file	"nvlink_burst.hip"
	.section	.text._ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_,"axG",@progbits,_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_,comdat
	.weak	_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_ # -- Begin function _ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_,@function
_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_: # @_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
.Ltmp0:
	callq	_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag
.Ltmp1:
# %bb.1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB0_2:
	.cfi_def_cfa_offset 32
.Ltmp2:
	movq	%rax, %r14
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB0_4
# %bb.3:
	callq	_ZdlPv
.LBB0_4:                                # %_ZNSt12_Vector_baseIiSaIiEED2Ev.exit
	movq	%r14, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_, .Lfunc_end0-_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_
	.cfi_endproc
	.section	.gcc_except_table._ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_,"aG",@progbits,_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_,comdat
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 1 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp1-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Lfunc_end0-.Ltmp1             #   Call between .Ltmp1 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED2Ev,comdat
	.weak	_ZNSt6vectorIiSaIiEED2Ev        # -- Begin function _ZNSt6vectorIiSaIiEED2Ev
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEED2Ev,@function
_ZNSt6vectorIiSaIiEED2Ev:               # @_ZNSt6vectorIiSaIiEED2Ev
	.cfi_startproc
# %bb.0:
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jne	_ZdlPv                          # TAILCALL
# %bb.1:                                # %_ZNSt12_Vector_baseIiSaIiEED2Ev.exit
	retq
.Lfunc_end1:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .Lfunc_end1-_ZNSt6vectorIiSaIiEED2Ev
	.cfi_endproc
                                        # -- End function
	.text
	.globl	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t # -- Begin function _Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.type	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t,@function
_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t: # @_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, 16(%rsp)                   # 8-byte Spill
	movq	%r8, 48(%rsp)                   # 8-byte Spill
	movq	%rcx, 40(%rsp)                  # 8-byte Spill
	movq	%rdx, 32(%rsp)                  # 8-byte Spill
	movq	%rsi, 24(%rsp)                  # 8-byte Spill
	movq	g(%rip), %rax
	cmpq	%rax, g+8(%rip)
	je	.LBB2_9
# %bb.1:                                # %.lr.ph35.preheader
	movq	%rdi, %rbp
	xorl	%r15d, %r15d
	leaq	12(%rsp), %rbx
	xorl	%r12d, %r12d
.LBB2_2:                                # %.lr.ph35
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_4 Depth 2
	movl	(%rax,%r12,4), %edi
	callq	hipSetDevice
	leaq	(,%r12,8), %r14
	movq	24(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rdi
	addq	%r14, %rdi
	movq	%rbp, %rsi
	callq	hipMalloc
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rdi
	addq	%r14, %rdi
	movq	%rbp, %rsi
	callq	hipMalloc
	movq	40(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rdi
	addq	%r14, %rdi
	callq	hipEventCreate
	movq	48(%rsp), %rax                  # 8-byte Reload
	addq	(%rax), %r14
	movq	%r14, %rdi
	callq	hipEventCreate
	movq	g(%rip), %rax
	cmpq	%rax, g+8(%rip)
	je	.LBB2_9
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	16(%rsp), %r14                  # 8-byte Reload
	xorl	%r13d, %r13d
.LBB2_4:                                # %.lr.ph
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	%r13, %r12
	je	.LBB2_7
# %bb.5:                                #   in Loop: Header=BB2_4 Depth=2
	movl	(%rax,%r12,4), %esi
	movl	(%rax,%r13,4), %edx
	movq	%rbx, %rdi
	callq	hipDeviceCanAccessPeer
	cmpl	$0, 12(%rsp)
	movq	g(%rip), %rax
	je	.LBB2_7
# %bb.6:                                #   in Loop: Header=BB2_4 Depth=2
	movl	(%rax,%r12,4), %edi
	callq	hipSetDevice
	movq	g(%rip), %rax
	movl	(%rax,%r13,4), %edi
	xorl	%esi, %esi
	callq	hipDeviceEnablePeerAccess
	movq	g+8(%rip), %rdi
	subq	g(%rip), %rdi
	sarq	$2, %rdi
	imulq	%r15, %rdi
	addq	%r14, %rdi
	callq	hipStreamCreate
	callq	hipDeviceSynchronize
	movq	g(%rip), %rax
	movl	(%rax,%r13,4), %edi
	callq	hipSetDevice
	movq	g(%rip), %rax
	movl	(%rax,%r12,4), %edi
	xorl	%esi, %esi
	callq	hipDeviceEnablePeerAccess
	movq	g+8(%rip), %rdi
	subq	g(%rip), %rdi
	sarq	$2, %rdi
	imulq	%r15, %rdi
	addq	%r14, %rdi
	callq	hipStreamCreate
	callq	hipDeviceSynchronize
	movq	g(%rip), %rax
.LBB2_7:                                #   in Loop: Header=BB2_4 Depth=2
	incq	%r13
	movq	g+8(%rip), %rcx
	subq	%rax, %rcx
	sarq	$2, %rcx
	addq	$8, %r14
	cmpq	%r13, %rcx
	ja	.LBB2_4
# %bb.8:                                # %._crit_edge
                                        #   in Loop: Header=BB2_2 Depth=1
	incq	%r12
	addq	$8, %r15
	cmpq	%r12, %rcx
	ja	.LBB2_2
.LBB2_9:                                # %._crit_edge36
	addq	$56, %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
.Lfunc_end2:
	.size	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t, .Lfunc_end2-_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.cfi_endproc
                                        # -- End function
	.globl	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t # -- Begin function _Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.type	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t,@function
_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t: # @_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.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	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, 16(%rsp)                   # 8-byte Spill
	movq	%r8, 8(%rsp)                    # 8-byte Spill
	movq	g(%rip), %rax
	cmpq	%rax, g+8(%rip)
	je	.LBB3_9
# %bb.1:                                # %.lr.ph29.preheader
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	xorl	%ebx, %ebx
	leaq	4(%rsp), %rbp
.LBB3_2:                                # %.lr.ph29
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_4 Depth 2
	movl	(%rax,%rbx,4), %edi
	callq	hipSetDevice
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	hipFree
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	hipFree
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	hipEventDestroy
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	hipEventDestroy
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	(%rax,%rbx,8), %rdi
	callq	hipStreamDestroy
	movq	g(%rip), %rax
	cmpq	%rax, g+8(%rip)
	je	.LBB3_9
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB3_2 Depth=1
	xorl	%r14d, %r14d
.LBB3_4:                                # %.lr.ph
                                        #   Parent Loop BB3_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	%r14, %rbx
	je	.LBB3_7
# %bb.5:                                #   in Loop: Header=BB3_4 Depth=2
	movl	(%rax,%rbx,4), %esi
	movl	(%rax,%r14,4), %edx
	movq	%rbp, %rdi
	callq	hipDeviceCanAccessPeer
	cmpl	$0, 4(%rsp)
	movq	g(%rip), %rax
	je	.LBB3_7
# %bb.6:                                #   in Loop: Header=BB3_4 Depth=2
	movl	(%rax,%rbx,4), %edi
	callq	hipSetDevice
	movq	g(%rip), %rax
	movl	(%rax,%r14,4), %edi
	callq	hipDeviceDisablePeerAccess
	callq	hipDeviceSynchronize
	movq	g(%rip), %rax
	movl	(%rax,%r14,4), %edi
	callq	hipSetDevice
	movq	g(%rip), %rax
	movl	(%rax,%rbx,4), %edi
	callq	hipDeviceDisablePeerAccess
	callq	hipDeviceSynchronize
	movq	g(%rip), %rax
.LBB3_7:                                #   in Loop: Header=BB3_4 Depth=2
	incq	%r14
	movq	g+8(%rip), %rcx
	subq	%rax, %rcx
	sarq	$2, %rcx
	cmpq	%r14, %rcx
	ja	.LBB3_4
# %bb.8:                                # %._crit_edge
                                        #   in Loop: Header=BB3_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	ja	.LBB3_2
.LBB3_9:                                # %._crit_edge30
	addq	$24, %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
.Lfunc_end3:
	.size	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t, .Lfunc_end3-_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
.LCPI4_0:
	.long	0x447a0000                      # float 1000
.LCPI4_1:
	.long	0x30800000                      # float 9.31322574E-10
	.text
	.globl	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.type	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t,@function
_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t: # @_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -96(%rbp)                  # 8-byte Spill
	movq	%r8, -56(%rbp)                  # 8-byte Spill
	movq	%rcx, -64(%rbp)                 # 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	g+8(%rip), %rax
	subq	g(%rip), %rax
	movq	%rsp, %r15
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %r15
	movq	%r15, %rsp
	movq	%rsp, %r12
	subq	%rax, %r12
	movq	%r12, %rsp
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.L.str.1, %edi
	movl	$.L.str.2, %ecx
	movl	$.L.str.3, %r8d
	movl	$.L.str.3, %r9d
	movl	$1, %esi
	movl	$2, %edx
	xorl	%eax, %eax
	pushq	$.L.str.4
	pushq	$.L.str.4
	pushq	$.L.str.4
	pushq	$.L.str.3
	callq	printf
	addq	$32, %rsp
	movl	$.L.str.5, %edi
	movl	$.L.str.6, %esi
	movl	$.L.str.7, %edx
	movl	$.L.str.8, %ecx
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.9, %edi
	movl	$.L.str.4, %esi
	movl	$.L.str.4, %edx
	movl	$.L.str.4, %ecx
	movl	$.L.str.10, %r8d
	movl	$.L.str.10, %r9d
	xorl	%eax, %eax
	pushq	$.L.str.11
	pushq	$0
	pushq	$4
	pushq	$.L.str.10
	callq	printf
	addq	$32, %rsp
	movq	%rbx, -48(%rbp)                 # 8-byte Spill
	movq	%rbx, %rdi
	movq	-56(%rbp), %r8                  # 8-byte Reload
	movq	%r14, -104(%rbp)                # 8-byte Spill
	movq	%r14, %rsi
	movq	%r13, %r14
	movq	%r13, %rdx
	movq	-64(%rbp), %rcx                 # 8-byte Reload
	movq	-96(%rbp), %r9                  # 8-byte Reload
	movq	%r9, %r13
	callq	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	movq	g+8(%rip), %rax
	cmpq	g(%rip), %rax
	je	.LBB4_14
# %bb.1:                                # %.lr.ph53.preheader
	movq	%r12, -80(%rbp)                 # 8-byte Spill
	movq	%r15, -88(%rbp)                 # 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
.LBB4_2:                                # %.lr.ph53
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_4 Depth 2
	movq	-64(%rbp), %rax                 # 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	g+8(%rip), %rcx
	movq	g(%rip), %rax
	movq	%rcx, %r8
	subq	%rax, %r8
	movq	-56(%rbp), %rdx                 # 8-byte Reload
	je	.LBB4_7
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB4_2 Depth=1
	sarq	$2, %r8
	xorl	%r12d, %r12d
.LBB4_4:                                # %.lr.ph
                                        #   Parent Loop BB4_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	%r12, %r15
	je	.LBB4_6
# %bb.5:                                #   in Loop: Header=BB4_4 Depth=2
	movq	-104(%rbp), %rcx                # 8-byte Reload
	movq	(%rcx), %rcx
	movq	(%rcx,%r15,8), %rdi
	movl	(%rax,%r15,4), %esi
	movq	(%r14), %rcx
	movq	(%rcx,%r12,8), %rdx
	movl	(%rax,%r12,4), %ecx
	imulq	%rbx, %r8
	addq	%r13, %r8
	movq	(%r8,%r12,8), %r9
	movq	-48(%rbp), %r8                  # 8-byte Reload
	callq	hipMemcpyPeerAsync
	movq	-56(%rbp), %rdx                 # 8-byte Reload
	movq	g+8(%rip), %rcx
	movq	g(%rip), %rax
.LBB4_6:                                #   in Loop: Header=BB4_4 Depth=2
	incq	%r12
	movq	%rcx, %r8
	subq	%rax, %r8
	sarq	$2, %r8
	cmpq	%r12, %r8
	ja	.LBB4_4
.LBB4_7:                                # %._crit_edge
                                        #   in Loop: Header=BB4_2 Depth=1
	movq	(%rdx), %rax
	movq	(%rax,%r15,8), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	incq	%r15
	movq	g+8(%rip), %rax
	movq	g(%rip), %rcx
	movq	%rax, %rdx
	subq	%rcx, %rdx
	sarq	$2, %rdx
	addq	$8, %rbx
	cmpq	%r15, %rdx
	ja	.LBB4_2
# %bb.8:                                # %.preheader
	cmpq	%rcx, %rax
	movq	-88(%rbp), %r15                 # 8-byte Reload
	movq	-80(%rbp), %r12                 # 8-byte Reload
	je	.LBB4_14
# %bb.9:                                # %.lr.ph55
	movq	-48(%rbp), %r14                 # 8-byte Reload
	testq	%r14, %r14
	js	.LBB4_10
# %bb.11:                               # %.lr.ph55
	cvtsi2ss	%r14, %xmm0
	jmp	.LBB4_12
.LBB4_10:
	movq	%r14, %rax
	shrq	%rax
	andl	$1, %r14d
	orq	%rax, %r14
	cvtsi2ss	%r14, %xmm0
	addss	%xmm0, %xmm0
.LBB4_12:                               # %.lr.ph55
	movss	%xmm0, -48(%rbp)                # 4-byte Spill
	movss	-48(%rbp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	mulss	.LCPI4_0(%rip), %xmm0
	movss	%xmm0, -48(%rbp)                # 4-byte Spill
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r13                 # 8-byte Reload
	movq	-64(%rbp), %r14                 # 8-byte Reload
.LBB4_13:                               # =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	hipEventSynchronize
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rdx
	leaq	-68(%rbp), %rdi
	callq	hipEventElapsedTime
	movss	-68(%rbp), %xmm0                # xmm0 = mem[0],zero,zero,zero
	movss	-48(%rbp), %xmm1                # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	mulss	.LCPI4_0(%rip), %xmm0
	movss	%xmm0, (%r12,%rbx,4)
	mulss	.LCPI4_1(%rip), %xmm1
	movss	%xmm1, (%r15,%rbx,4)
	incq	%rbx
	movq	g+8(%rip), %rax
	subq	g(%rip), %rax
	sarq	$2, %rax
	cmpq	%rbx, %rax
	ja	.LBB4_13
.LBB4_14:                               # %._crit_edge56
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movq	g(%rip), %rax
	cmpq	%rax, g+8(%rip)
	je	.LBB4_17
# %bb.15:                               # %.lr.ph59.preheader
	xorl	%ebx, %ebx
.LBB4_16:                               # %.lr.ph59
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rax,%rbx,4), %esi
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%rbx,4), %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	(%r15,%rbx,4), %xmm1
	movl	$.L.str.13, %edi
	movb	$2, %al
	callq	printf
	incq	%rbx
	movq	g+8(%rip), %rcx
	movq	g(%rip), %rax
	subq	%rax, %rcx
	sarq	$2, %rcx
	cmpq	%rbx, %rcx
	ja	.LBB4_16
.LBB4_17:                               # %._crit_edge60
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.Lfunc_end4:
	.size	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t, .Lfunc_end4-_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
	.cfi_endproc
                                        # -- End function
	.globl	_Z12perf_analyzem               # -- Begin function _Z12perf_analyzem
	.type	_Z12perf_analyzem,@function
_Z12perf_analyzem:                      # @_Z12perf_analyzem
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	g+8(%rip), %rsi
	subq	g(%rip), %rsi
	sarq	$2, %rsi
	leaq	-128(%rbp), %rdi
	leaq	-104(%rbp), %rdx
	callq	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
	movq	g+8(%rip), %rsi
	subq	g(%rip), %rsi
	sarq	$2, %rsi
.Ltmp3:
	leaq	-104(%rbp), %rdi
	leaq	-80(%rbp), %rdx
	callq	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
.Ltmp4:
# %bb.1:
	movq	g+8(%rip), %rsi
	subq	g(%rip), %rsi
	sarq	$2, %rsi
.Ltmp6:
	leaq	-80(%rbp), %rdi
	leaq	-56(%rbp), %rdx
	callq	_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_
.Ltmp7:
# %bb.2:
	movq	g+8(%rip), %rsi
	subq	g(%rip), %rsi
	sarq	$2, %rsi
.Ltmp9:
	leaq	-56(%rbp), %rdi
	leaq	-25(%rbp), %rdx
	callq	_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_
.Ltmp10:
# %bb.3:
	movq	%rsp, %r15
	movq	g+8(%rip), %rax
	subq	g(%rip), %rax
	sarq	$2, %rax
	imulq	%rax, %rax
	movq	%rsp, %r14
	leaq	15(,%rax,8), %rax
	andq	$-16, %rax
	subq	%rax, %r14
	movq	%r14, %rsp
.Ltmp12:
	leaq	-128(%rbp), %rsi
	leaq	-104(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r14, %r9
	callq	_Z9configuremRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
.Ltmp13:
# %bb.4:
.Ltmp14:
	leaq	-128(%rbp), %rsi
	leaq	-104(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r14, %r9
	callq	_Z10burst_copymRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
.Ltmp15:
# %bb.5:
.Ltmp16:
	leaq	-128(%rbp), %rsi
	leaq	-104(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r14, %r9
	callq	_Z5resetmRSt6vectorIPiSaIS0_EES3_RS_IP11ihipEvent_tSaIS5_EES8_PP12ihipStream_t
.Ltmp17:
# %bb.6:
	movq	%r15, %rsp
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_8
# %bb.7:
	callq	_ZdlPv
.LBB5_8:                                # %_ZNSt6vectorIP11ihipEvent_tSaIS1_EED2Ev.exit
	movq	-80(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_10
# %bb.9:
	callq	_ZdlPv
.LBB5_10:                               # %_ZNSt6vectorIP11ihipEvent_tSaIS1_EED2Ev.exit14
	movq	-104(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_12
# %bb.11:
	callq	_ZdlPv
.LBB5_12:                               # %_ZNSt6vectorIPiSaIS0_EED2Ev.exit
	movq	-128(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_14
# %bb.13:
	callq	_ZdlPv
.LBB5_14:                               # %_ZNSt6vectorIPiSaIS0_EED2Ev.exit17
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.LBB5_17:
	.cfi_def_cfa %rbp, 16
.Ltmp11:
	movq	%rax, %rbx
	jmp	.LBB5_20
.LBB5_16:
.Ltmp8:
	movq	%rax, %rbx
	jmp	.LBB5_22
.LBB5_15:
.Ltmp5:
	movq	%rax, %rbx
	jmp	.LBB5_24
.LBB5_18:
.Ltmp18:
	movq	%rax, %rbx
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_20
# %bb.19:
	callq	_ZdlPv
.LBB5_20:                               # %_ZNSt6vectorIP11ihipEvent_tSaIS1_EED2Ev.exit19
	movq	-80(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_22
# %bb.21:
	callq	_ZdlPv
.LBB5_22:                               # %_ZNSt6vectorIP11ihipEvent_tSaIS1_EED2Ev.exit21
	movq	-104(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_24
# %bb.23:
	callq	_ZdlPv
.LBB5_24:                               # %_ZNSt6vectorIPiSaIS0_EED2Ev.exit23
	movq	-128(%rbp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_26
# %bb.25:
	callq	_ZdlPv
.LBB5_26:                               # %_ZNSt6vectorIPiSaIS0_EED2Ev.exit25
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end5:
	.size	_Z12perf_analyzem, .Lfunc_end5-_Z12perf_analyzem
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table5:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp3-.Lfunc_begin1           #   Call between .Lfunc_begin1 and .Ltmp3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin1           # >> Call Site 2 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin1           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin1           # >> Call Site 3 <<
	.uleb128 .Ltmp7-.Ltmp6                  #   Call between .Ltmp6 and .Ltmp7
	.uleb128 .Ltmp8-.Lfunc_begin1           #     jumps to .Ltmp8
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin1           # >> Call Site 4 <<
	.uleb128 .Ltmp10-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp10
	.uleb128 .Ltmp11-.Lfunc_begin1          #     jumps to .Ltmp11
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp12-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp17-.Ltmp12                #   Call between .Ltmp12 and .Ltmp17
	.uleb128 .Ltmp18-.Lfunc_begin1          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin1          # >> Call Site 6 <<
	.uleb128 .Lfunc_end5-.Ltmp17            #   Call between .Ltmp17 and .Lfunc_end5
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIPiSaIS0_EEC2EmRKS1_,"axG",@progbits,_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_,comdat
	.weak	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_ # -- Begin function _ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_,@function
_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_:       # @_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB6_7
# %bb.1:                                # %_ZNSt6vectorIPiSaIS0_EE17_S_check_init_lenEmRKS1_.exit
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	testq	%rsi, %rsi
	je	.LBB6_2
# %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIPiE8allocateEmPKv
	movq	%rax, (%rbx)
	leaq	(%rax,%r14,8), %r15
	movq	%r15, 16(%rbx)
	movq	$0, (%rax)
	addq	$8, %rax
	cmpq	$1, %r14
	jne	.LBB6_5
# %bb.4:
	movq	%rax, %r15
	jmp	.LBB6_6
.LBB6_2:                                # %_ZNSt12_Vector_baseIPiSaIS0_EEC2EmRKS1_.exit.thread
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	xorl	%r15d, %r15d
	jmp	.LBB6_6
.LBB6_5:                                # %_ZSt6fill_nIPPimS0_ET_S2_T0_RKT1_.exit.loopexit.i.i.i.i
	leaq	-8(,%r14,8), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
.LBB6_6:
	movq	%r15, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB6_7:
	.cfi_def_cfa_offset 32
	movl	$.L.str.15, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end6:
	.size	_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_, .Lfunc_end6-_ZNSt6vectorIPiSaIS0_EEC2EmRKS1_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_,"axG",@progbits,_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_,comdat
	.weak	_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_ # -- Begin function _ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_,@function
_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_: # @_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB7_7
# %bb.1:                                # %_ZNSt6vectorIP11ihipEvent_tSaIS1_EE17_S_check_init_lenEmRKS2_.exit
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	testq	%rsi, %rsi
	je	.LBB7_2
# %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv
	movq	%rax, (%rbx)
	leaq	(%rax,%r14,8), %r15
	movq	%r15, 16(%rbx)
	movq	$0, (%rax)
	addq	$8, %rax
	cmpq	$1, %r14
	jne	.LBB7_5
# %bb.4:
	movq	%rax, %r15
	jmp	.LBB7_6
.LBB7_2:                                # %_ZNSt12_Vector_baseIP11ihipEvent_tSaIS1_EEC2EmRKS2_.exit.thread
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	xorl	%r15d, %r15d
	jmp	.LBB7_6
.LBB7_5:                                # %_ZSt6fill_nIPP11ihipEvent_tmS1_ET_S3_T0_RKT1_.exit.loopexit.i.i.i.i
	leaq	-8(,%r14,8), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
.LBB7_6:
	movq	%r15, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB7_7:
	.cfi_def_cfa_offset 32
	movl	$.L.str.15, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end7:
	.size	_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_, .Lfunc_end7-_ZNSt6vectorIP11ihipEvent_tSaIS1_EEC2EmRKS2_
	.cfi_endproc
                                        # -- End function
	.text
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -16
	movq	g+8(%rip), %rax
	cmpq	g(%rip), %rax
	jne	.LBB8_7
# %bb.1:
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	leaq	12(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipGetDeviceCount
	movl	$0, 8(%rsp)
	cmpl	$0, (%rbx)
	jle	.LBB8_7
# %bb.2:                                # %.lr.ph.preheader
	movq	g+8(%rip), %rax
	xorl	%ecx, %ecx
	movq	g+16(%rip), %rsi
	leaq	8(%rsp), %rbx
.LBB8_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	cmpq	%rsi, %rax
	je	.LBB8_5
# %bb.4:                                #   in Loop: Header=BB8_3 Depth=1
	movl	%ecx, (%rax)
	addq	$4, %rax
	movq	%rax, g+8(%rip)
	jmp	.LBB8_6
.LBB8_5:                                #   in Loop: Header=BB8_3 Depth=1
	movl	$g, %edi
	movq	%rbx, %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	movq	g+8(%rip), %rax
	movq	g+16(%rip), %rsi
.LBB8_6:                                # %_ZNSt6vectorIiSaIiEE9push_backERKi.exit
                                        #   in Loop: Header=BB8_3 Depth=1
	movl	8(%rsp), %ecx
	incl	%ecx
	movl	%ecx, 8(%rsp)
	cmpl	12(%rsp), %ecx
	jl	.LBB8_3
.LBB8_7:
	movl	$1073741824, %edi               # imm = 0x40000000
	callq	_Z12perf_analyzem
	xorl	%eax, %eax
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	main, .Lfunc_end8-main
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag,"axG",@progbits,_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag,comdat
	.weak	_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag # -- Begin function _ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag,@function
_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag: # @_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	subq	%rsi, %r14
	movq	%r14, %r13
	sarq	$2, %r13
	movq	%r13, %rax
	shrq	$61, %rax
	jne	.LBB9_9
# %bb.1:                                # %_ZNSt6vectorIiSaIiEE17_S_check_init_lenEmRKS0_.exit
	movq	%rsi, %r15
	movq	%rdi, %rbx
	cmpq	%rsi, %rdx
	je	.LBB9_2
# %bb.3:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %r12
	jmp	.LBB9_4
.LBB9_2:
	xorl	%r12d, %r12d
.LBB9_4:                                # %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit
	movq	%r12, (%rbx)
	leaq	(%r12,%r13,4), %rax
	movq	%rax, 16(%rbx)
	cmpq	$5, %r14
	jl	.LBB9_6
# %bb.5:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memmove@PLT
.LBB9_8:                                # %_ZSt22__uninitialized_copy_aIPKiPiiET0_T_S4_S3_RSaIT1_E.exit
	addq	%r14, %r12
	movq	%r12, 8(%rbx)
	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
.LBB9_6:
	.cfi_def_cfa_offset 48
	cmpq	$4, %r14
	jne	.LBB9_8
# %bb.7:
	movl	(%r15), %eax
	movl	%eax, (%r12)
	jmp	.LBB9_8
.LBB9_9:
	movl	$.L.str.15, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end9:
	.size	_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag, .Lfunc_end9-_ZNSt6vectorIiSaIiEE19_M_range_initializeIPKiEEvT_S5_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIiE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIiE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIiE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIiE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIiE8allocateEmPKv,@function
_ZNSt15__new_allocatorIiE8allocateEmPKv: # @_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$61, %rax
	jne	.LBB10_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB10_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB10_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB10_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end10:
	.size	_ZNSt15__new_allocatorIiE8allocateEmPKv, .Lfunc_end10-_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIPiE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIPiE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIPiE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIPiE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIPiE8allocateEmPKv,@function
_ZNSt15__new_allocatorIPiE8allocateEmPKv: # @_ZNSt15__new_allocatorIPiE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB11_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB11_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB11_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB11_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end11:
	.size	_ZNSt15__new_allocatorIPiE8allocateEmPKv, .Lfunc_end11-_ZNSt15__new_allocatorIPiE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv,@function
_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv: # @_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB12_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB12_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB12_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB12_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end12:
	.size	_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv, .Lfunc_end12-_ZNSt15__new_allocatorIP11ihipEvent_tE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ # -- Begin function _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,@function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_: # @_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.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	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.16, %edx
	callq	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$2, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB13_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB13_3
.LBB13_1:
	xorl	%ebp, %ebp
.LBB13_3:                               # %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, (%rbp,%r14,4)
	testq	%r12, %r12
	jle	.LBB13_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB13_5:                               # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$4, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB13_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB13_7:                               # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB13_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB13_9:                               # %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %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
.Lfunc_end13:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .Lfunc_end13-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$2305843009213693951, %rcx      # imm = 0x1FFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$2, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB14_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB14_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end14:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .Lfunc_end14-_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text.startup,"ax",@progbits
	.type	_GLOBAL__sub_I_nvlink_burst.hip,@function # -- Begin function _GLOBAL__sub_I_nvlink_burst.hip
_GLOBAL__sub_I_nvlink_burst.hip:        # @_GLOBAL__sub_I_nvlink_burst.hip
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	7(%rsp), %rcx
	movl	$g, %edi
	movl	$_ZL4GPUs, %esi
	movl	$_ZL4GPUs+20, %edx
	callq	_ZNSt6vectorIiSaIiEEC2IPKivEET_S5_RKS0_
	movl	$_ZNSt6vectorIiSaIiEED2Ev, %edi
	movl	$g, %esi
	movl	$__dso_handle, %edx
	callq	__cxa_atexit
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end15:
	.size	_GLOBAL__sub_I_nvlink_burst.hip, .Lfunc_end15-_GLOBAL__sub_I_nvlink_burst.hip
	.cfi_endproc
                                        # -- End function
	.type	g,@object                       # @g
	.bss
	.globl	g
	.p2align	3, 0x0
g:
	.zero	24
	.size	g, 24

	.type	_ZL4GPUs,@object                # @_ZL4GPUs
	.section	.rodata,"a",@progbits
	.p2align	4, 0x0
_ZL4GPUs:
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	2                               # 0x2
	.long	3                               # 0x3
	.long	4                               # 0x4
	.size	_ZL4GPUs, 20

	.hidden	__dso_handle
	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"%4d%8d%12s\n%4s%8s%12s\n%4s%8s%12s\n"
	.size	.L.str.1, 34

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

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"^"
	.size	.L.str.3, 2

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"|"
	.size	.L.str.4, 2

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"3<-0->2 4<-1->3 ... %s<-%s->%s\n"
	.size	.L.str.5, 32

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"q"
	.size	.L.str.6, 2

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"m"
	.size	.L.str.7, 2

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

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"%4s%8s%12s\n%4s%8s%12s\n%4d%8d%12s\n\n"
	.size	.L.str.9, 35

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"v"
	.size	.L.str.10, 2

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"r"
	.size	.L.str.11, 2

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"GPU%d\t\t%6.2f\t\t%6.2f\n"
	.size	.L.str.13, 21

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"cannot create std::vector larger than max_size()"
	.size	.L.str.15, 49

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"vector::_M_realloc_insert"
	.size	.L.str.16, 26

	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	_GLOBAL__sub_I_nvlink_burst.hip
	.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	"\nBurst copy: Every GPU is memcpy-ing to every other GPU"
	.size	.Lstr, 56

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"\t\tTime(ms)\tBandwidth(Gbps)"
	.size	.Lstr.1, 27

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"Using all 8 GPUs"
	.size	.Lstr.2, 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 __gxx_personality_v0
	.addrsig_sym _GLOBAL__sub_I_nvlink_burst.hip
	.addrsig_sym _Unwind_Resume
	.addrsig_sym g
	.addrsig_sym _ZL4GPUs
	.addrsig_sym __dso_handle
	.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
