#include <iostream>
#include <math.h>
#include <unistd.h>
#include <memory>
#include <array>
#include <algorithm>
#include <vector>


const std::size_t NUMBER_STREAMS = 80;
const std::size_t N = 1 << 20;


struct test_struct
{
    cudaStream_t stream;

    std::unique_ptr<std::array<float, N>> h_a;
    std::unique_ptr<std::array<float, N>> h_b;
    std::unique_ptr<std::array<float, N>> h_c;

    float* d_a;
    float* d_b;
    float* d_c;

    std::size_t error_count;
};


typedef struct test_struct test_struct_t;


int make_test_struct(test_struct_t& t)
{
    t.h_a.reset(new std::array<float, N>);
    t.h_b.reset(new std::array<float, N>);
    t.h_c.reset(new std::array<float, N>);

    if (nullptr == t.h_a)
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (nullptr == t.h_a)
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (nullptr == t.h_a)
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (cudaSuccess != cudaStreamCreate(&t.stream))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (cudaSuccess != cudaMallocHost(&t.d_a, N * sizeof(t.d_a[0])))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (cudaSuccess != cudaMallocHost(&t.d_b, N * sizeof(t.d_b[0])))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (cudaSuccess != cudaMallocHost(&t.d_c, N * sizeof(t.d_c[0])))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    std::fill(t.h_a->begin(), t.h_a->end(), 1.0);
    std::fill(t.h_b->begin(), t.h_b->end(), 2.0);

    t.error_count = 0;

    return 0;
}


int destroy_test_struct(test_struct_t& t)
{
    if (cudaSuccess != cudaFreeHost(t.d_a))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (cudaSuccess != cudaFreeHost(t.d_b))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (cudaSuccess != cudaFreeHost(t.d_c))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (cudaSuccess != cudaStreamDestroy(t.stream))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    return 0;
}


__global__
void vec_add(float* const c, const float* const a, const float* const b, const std::size_t n)
{
    for (std::size_t i = threadIdx.x + (blockIdx.x * blockDim.x); i < n; i += (blockDim.x * gridDim.x))
    {
        c[i] = a[i] + b[i] + 1;
    }
}


int main(void)
{
    const dim3 grid_size (1, 1, 1);
    const dim3 block_size (1024, 1, 1);

    std::array<test_struct_t, NUMBER_STREAMS> streams;

    std::for_each(streams.begin(), streams.end(), make_test_struct);

    for (test_struct_t& t: streams)
    {
        if (cudaSuccess != cudaMemcpyAsync(t.d_a, t.h_a->data(), N * sizeof(t.d_a[0]), cudaMemcpyHostToDevice, t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }

        if (cudaSuccess != cudaMemcpyAsync(t.d_b, t.h_b->data(), N * sizeof(t.d_b[0]), cudaMemcpyHostToDevice, t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }

        vec_add<<<grid_size, block_size, 0, t.stream>>>(t.d_c, t.d_a, t.d_b, N);

        if (cudaSuccess != cudaMemcpyAsync(t.h_c->data(), t.d_c, N * sizeof(t.d_c[0]), cudaMemcpyDeviceToHost, t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }
    }

    for (test_struct_t& t: streams)
    {
        if (cudaSuccess != cudaStreamSynchronize(t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }
    }

    for (test_struct_t& t: streams)
    {
        for (std::size_t i = 0; i < N; ++ i)
        {
            if (4 != t.h_c->at(i))
            {
                ++ t.error_count;
            }
        }


        if (0 != t.error_count)
        {
            std::cout << t.error_count << std::endl << std::flush;
        }
    }

    std::for_each(streams.begin(), streams.end(), destroy_test_struct);

    return 0;
}


	.file	"tmpxft_003484ea_00000000-6_multiple_streams.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"destroy_test_struct"
.LC1:
	.string	" "
#NO_APP
	.text
	.globl	_Z19destroy_test_structR11test_struct
	.type	_Z19destroy_test_structR11test_struct, @function
_Z19destroy_test_structR11test_struct:
.LFB4877:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	32(%rdi), %rdi
	call	cudaFreeHost@PLT
	testl	%eax, %eax
	je	.L2
	leaq	.LC0(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$94, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-95, %eax
	jmp	.L1
.L2:
	movq	40(%rbx), %rdi
	call	cudaFreeHost@PLT
	testl	%eax, %eax
	je	.L4
	leaq	.LC0(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$100, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-101, %eax
	jmp	.L1
.L4:
	movq	48(%rbx), %rdi
	call	cudaFreeHost@PLT
	testl	%eax, %eax
	je	.L5
	leaq	.LC0(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$106, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-107, %eax
	jmp	.L1
.L5:
	movq	(%rbx), %rdi
	call	cudaStreamDestroy@PLT
	movl	%eax, %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	je	.L1
	leaq	.LC0(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$112, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-113, %eax
.L1:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4877:
	.size	_Z19destroy_test_structR11test_struct, .-_Z19destroy_test_structR11test_struct
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4896:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4896:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z33__device_stub__Z7vec_addPfPKfS1_mPfPKfS1_m
	.type	_Z33__device_stub__Z7vec_addPfPKfS1_mPfPKfS1_m, @function
_Z33__device_stub__Z7vec_addPfPKfS1_mPfPKfS1_m:
.LFB4918:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L11
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z7vec_addPfPKfS1_m(%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
.L11:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4918:
	.size	_Z33__device_stub__Z7vec_addPfPKfS1_mPfPKfS1_m, .-_Z33__device_stub__Z7vec_addPfPKfS1_mPfPKfS1_m
	.globl	_Z7vec_addPfPKfS1_m
	.type	_Z7vec_addPfPKfS1_m, @function
_Z7vec_addPfPKfS1_m:
.LFB4919:
	.cfi_startproc
	endbr64
	jmp	_Z33__device_stub__Z7vec_addPfPKfS1_mPfPKfS1_m
	.cfi_endproc
.LFE4919:
	.size	_Z7vec_addPfPKfS1_m, .-_Z7vec_addPfPKfS1_m
	.section	.rodata.str1.1
.LC2:
	.string	"_Z7vec_addPfPKfS1_m"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4921:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC2(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z7vec_addPfPKfS1_m(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4921:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev,"axG",@progbits,_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED5Ev,comdat
	.align 2
	.weak	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev
	.type	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev, @function
_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev:
.LFB5247:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	.L18
	movl	$4194304, %esi
	jmp	_ZdlPvm@PLT
.L18:
	ret
	.cfi_endproc
.LFE5247:
	.size	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev, .-_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev
	.weak	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED1Ev
	.set	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED1Ev,_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev
	.section	.text._ZNSt5arrayI11test_structLm80EED2Ev,"axG",@progbits,_ZNSt5arrayI11test_structLm80EED5Ev,comdat
	.align 2
	.weak	_ZNSt5arrayI11test_structLm80EED2Ev
	.type	_ZNSt5arrayI11test_structLm80EED2Ev, @function
_ZNSt5arrayI11test_structLm80EED2Ev:
.LFB4889:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	5120(%rdi), %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 32
.L22:
	cmpq	%rbp, %rbx
	je	.L20
	subq	$64, %rbx
	leaq	24(%rbx), %rdi
	call	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED1Ev
	leaq	16(%rbx), %rdi
	call	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED1Ev
	leaq	8(%rbx), %rdi
	call	_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED1Ev
	jmp	.L22
.L20:
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4889:
	.size	_ZNSt5arrayI11test_structLm80EED2Ev, .-_ZNSt5arrayI11test_structLm80EED2Ev
	.weak	_ZNSt5arrayI11test_structLm80EED1Ev
	.set	_ZNSt5arrayI11test_structLm80EED1Ev,_ZNSt5arrayI11test_structLm80EED2Ev
	.section	.text._ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_,"axG",@progbits,_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_,comdat
	.align 2
	.weak	_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_
	.type	_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_, @function
_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_:
.LFB5405:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	%rsi, (%rdi)
	testq	%rax, %rax
	je	.L24
	movl	$4194304, %esi
	movq	%rax, %rdi
	jmp	_ZdlPvm@PLT
.L24:
	ret
	.cfi_endproc
.LFE5405:
	.size	_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_, .-_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_
	.section	.rodata.str1.1
.LC3:
	.string	"make_test_struct"
	.text
	.globl	_Z16make_test_structR11test_struct
	.type	_Z16make_test_structR11test_struct, @function
_Z16make_test_structR11test_struct:
.LFB4876:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movl	$4194304, %edi
	call	_Znwm@PLT
	leaq	8(%rbx), %rdi
	movq	%rax, %rsi
	call	_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_
	movl	$4194304, %edi
	call	_Znwm@PLT
	leaq	16(%rbx), %rdi
	movq	%rax, %rsi
	call	_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_
	movl	$4194304, %edi
	call	_Znwm@PLT
	leaq	24(%rbx), %rdi
	movq	%rax, %rsi
	call	_ZNSt15__uniq_ptr_implISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_
	cmpq	$0, 8(%rbx)
	jne	.L27
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$41, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-42, %eax
	jmp	.L26
.L27:
	movq	%rbx, %rdi
	call	cudaStreamCreate@PLT
	testl	%eax, %eax
	je	.L29
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$59, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-60, %eax
	jmp	.L26
.L29:
	xorl	%edx, %edx
	leaq	32(%rbx), %rdi
	movl	$4194304, %esi
	call	cudaHostAlloc@PLT
	testl	%eax, %eax
	je	.L30
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$65, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-66, %eax
	jmp	.L26
.L30:
	xorl	%edx, %edx
	leaq	40(%rbx), %rdi
	movl	$4194304, %esi
	call	cudaHostAlloc@PLT
	testl	%eax, %eax
	je	.L31
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$71, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-72, %eax
	jmp	.L26
.L31:
	xorl	%edx, %edx
	leaq	48(%rbx), %rdi
	movl	$4194304, %esi
	call	cudaHostAlloc@PLT
	testl	%eax, %eax
	je	.L32
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$77, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-78, %eax
	jmp	.L26
.L32:
	movq	8(%rbx), %rdx
	movss	.LC4(%rip), %xmm0
	xorl	%eax, %eax
.L33:
	movss	%xmm0, (%rdx,%rax)
	addq	$4, %rax
	cmpq	$4194304, %rax
	jne	.L33
	movq	16(%rbx), %rdx
	movss	.LC5(%rip), %xmm0
	xorl	%eax, %eax
.L34:
	movss	%xmm0, (%rdx,%rax)
	addq	$4, %rax
	cmpq	$4194304, %rax
	jne	.L34
	xorl	%eax, %eax
	movq	%rax, 56(%rbx)
	xorl	%eax, %eax
.L26:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4876:
	.size	_Z16make_test_structR11test_struct, .-_Z16make_test_structR11test_struct
	.section	.rodata.str1.1
.LC6:
	.string	"main"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4878:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4878
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$1064, %rsp
	.cfi_def_cfa_offset 5200
	movq	%fs:40, %rax
	movq	%rax, 5144(%rsp)
	movabsq	$4294967297, %rax
	movl	$1, 8(%rsp)
	leaq	5144(%rsp), %r12
	movl	$1, 20(%rsp)
	movq	%rax, (%rsp)
	addq	$1023, %rax
	movq	%rax, 12(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, %rbp
.L39:
	xorl	%edx, %edx
	addq	$64, %rax
	movq	%rdx, -56(%rax)
	movq	%rdx, -48(%rax)
	movq	%rdx, -40(%rax)
	cmpq	%r12, %rax
	jne	.L39
	movq	%rbp, %rbx
.L40:
	movq	%rbx, %rdi
.LEHB0:
	call	_Z16make_test_structR11test_struct
	addq	$64, %rbx
	cmpq	%r12, %rbx
	jne	.L40
	movq	%rbp, %rbx
.L46:
	movq	8(%rbx), %rsi
	movq	32(%rbx), %rdi
	movl	$1, %ecx
	movl	$4194304, %edx
	movq	(%rbx), %r8
	call	cudaMemcpyAsync@PLT
	testl	%eax, %eax
	je	.L41
	leaq	.LC6(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC1(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$143, %esi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-144, %ebx
	jmp	.L42
.L41:
	movq	16(%rbx), %rsi
	movq	40(%rbx), %rdi
	movl	$1, %ecx
	movl	$4194304, %edx
	movq	(%rbx), %r8
	call	cudaMemcpyAsync@PLT
	testl	%eax, %eax
	je	.L43
	leaq	.LC6(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC1(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$149, %esi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-150, %ebx
	jmp	.L42
.L43:
	movl	20(%rsp), %ecx
	movq	(%rbx), %r9
	xorl	%r8d, %r8d
	movq	12(%rsp), %rdx
	movq	(%rsp), %rdi
	movl	8(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	movq	48(%rbx), %rdi
	testl	%eax, %eax
	jne	.L44
	movq	40(%rbx), %rdx
	movq	32(%rbx), %rsi
	movl	$1048576, %ecx
	call	_Z33__device_stub__Z7vec_addPfPKfS1_mPfPKfS1_m
.L44:
	movq	48(%rbx), %rsi
	movq	24(%rbx), %rdi
	movl	$2, %ecx
	movl	$4194304, %edx
	movq	(%rbx), %r8
	call	cudaMemcpyAsync@PLT
	testl	%eax, %eax
	je	.L45
	leaq	.LC6(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC1(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$157, %esi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-158, %ebx
	jmp	.L42
.L45:
	addq	$64, %rbx
	cmpq	%r12, %rbx
	jne	.L46
	xorl	%ebx, %ebx
.L48:
	movq	0(%rbp,%rbx), %rdi
	call	cudaStreamSynchronize@PLT
	addq	$64, %rbx
	testl	%eax, %eax
	je	.L47
	leaq	.LC6(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC1(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$166, %esi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movl	$-167, %ebx
	jmp	.L42
.L47:
	cmpq	$5120, %rbx
	jne	.L48
	movq	%rbp, %rbx
	leaq	_ZSt4cout(%rip), %r13
.L53:
	movq	24(%rbx), %rdx
	xorl	%eax, %eax
.L51:
	movss	(%rdx,%rax,4), %xmm0
	ucomiss	.LC7(%rip), %xmm0
	jp	.L63
	je	.L49
.L63:
	incq	56(%rbx)
.L49:
	incq	%rax
	cmpq	$1048576, %rax
	jne	.L51
	movq	56(%rbx), %rsi
	testq	%rsi, %rsi
	je	.L52
	movq	%r13, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	_ZSt5flushIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L52:
	addq	$64, %rbx
	cmpq	%r12, %rbx
	jne	.L53
	movq	%rbp, %rbx
.L54:
	movq	%rbx, %rdi
	call	_Z19destroy_test_structR11test_struct
.LEHE0:
	addq	$64, %rbx
	cmpq	%r12, %rbx
	jne	.L54
	xorl	%ebx, %ebx
.L42:
	movq	%rbp, %rdi
	call	_ZNSt5arrayI11test_structLm80EED1Ev
	movq	5144(%rsp), %rax
	subq	%fs:40, %rax
	je	.L57
	jmp	.L78
.L62:
	endbr64
	movq	%rax, %rbx
.L55:
	movq	%rbp, %rdi
	call	_ZNSt5arrayI11test_structLm80EED1Ev
	movq	5144(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L78
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L78:
	call	__stack_chk_fail@PLT
.L57:
	addq	$5160, %rsp
	.cfi_def_cfa_offset 40
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4878:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4878:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4878-.LLSDACSB4878
.LLSDACSB4878:
	.uleb128 .LEHB0-.LFB4878
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L62-.LFB4878
	.uleb128 0
	.uleb128 .LEHB1-.LFB4878
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE4878:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC4:
	.long	1065353216
	.align 4
.LC5:
	.long	1073741824
	.align 4
.LC7:
	.long	1082130432
	.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
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <iostream>
#include <math.h>
#include <unistd.h>
#include <memory>
#include <array>
#include <algorithm>
#include <vector>


const std::size_t NUMBER_STREAMS = 80;
const std::size_t N = 1 << 20;


struct test_struct
{
    hipStream_t stream;

    std::unique_ptr<std::array<float, N>> h_a;
    std::unique_ptr<std::array<float, N>> h_b;
    std::unique_ptr<std::array<float, N>> h_c;

    float* d_a;
    float* d_b;
    float* d_c;

    std::size_t error_count;
};


typedef struct test_struct test_struct_t;


int make_test_struct(test_struct_t& t)
{
    t.h_a.reset(new std::array<float, N>);
    t.h_b.reset(new std::array<float, N>);
    t.h_c.reset(new std::array<float, N>);

    if (nullptr == t.h_a)
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (nullptr == t.h_a)
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (nullptr == t.h_a)
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (hipSuccess != hipStreamCreate(&t.stream))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (hipSuccess != hipHostMalloc(&t.d_a, N * sizeof(t.d_a[0]), hipHostMallocDefault))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (hipSuccess != hipHostMalloc(&t.d_b, N * sizeof(t.d_b[0]), hipHostMallocDefault))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (hipSuccess != hipHostMalloc(&t.d_c, N * sizeof(t.d_c[0]), hipHostMallocDefault))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    std::fill(t.h_a->begin(), t.h_a->end(), 1.0);
    std::fill(t.h_b->begin(), t.h_b->end(), 2.0);

    t.error_count = 0;

    return 0;
}


int destroy_test_struct(test_struct_t& t)
{
    if (hipSuccess != hipHostFree(t.d_a))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (hipSuccess != hipHostFree(t.d_b))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (hipSuccess != hipHostFree(t.d_c))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    if (hipSuccess != hipStreamDestroy(t.stream))
    {
        std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
        return -__LINE__;
    }

    return 0;
}


__global__
void vec_add(float* const c, const float* const a, const float* const b, const std::size_t n)
{
    for (std::size_t i = threadIdx.x + (blockIdx.x * blockDim.x); i < n; i += (blockDim.x * gridDim.x))
    {
        c[i] = a[i] + b[i] + 1;
    }
}


int main(void)
{
    const dim3 grid_size (1, 1, 1);
    const dim3 block_size (1024, 1, 1);

    std::array<test_struct_t, NUMBER_STREAMS> streams;

    std::for_each(streams.begin(), streams.end(), make_test_struct);

    for (test_struct_t& t: streams)
    {
        if (hipSuccess != hipMemcpyAsync(t.d_a, t.h_a->data(), N * sizeof(t.d_a[0]), hipMemcpyHostToDevice, t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }

        if (hipSuccess != hipMemcpyAsync(t.d_b, t.h_b->data(), N * sizeof(t.d_b[0]), hipMemcpyHostToDevice, t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }

        vec_add<<<grid_size, block_size, 0, t.stream>>>(t.d_c, t.d_a, t.d_b, N);

        if (hipSuccess != hipMemcpyAsync(t.h_c->data(), t.d_c, N * sizeof(t.d_c[0]), hipMemcpyDeviceToHost, t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }
    }

    for (test_struct_t& t: streams)
    {
        if (hipSuccess != hipStreamSynchronize(t.stream))
        {
            std::cout << __FUNCTION__ << " " << __LINE__ << std::endl;
            return -__LINE__;
        }
    }

    for (test_struct_t& t: streams)
    {
        for (std::size_t i = 0; i < N; ++ i)
        {
            if (4 != t.h_c->at(i))
            {
                ++ t.error_count;
            }
        }


        if (0 != t.error_count)
        {
            std::cout << t.error_count << std::endl << std::flush;
        }
    }

    std::for_each(streams.begin(), streams.end(), destroy_test_struct);

    return 0;
}


	.text
	.file	"multiple_streams.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z16make_test_structR11test_struct # -- Begin function _Z16make_test_structR11test_struct
	.type	_Z16make_test_structR11test_struct,@function
_Z16make_test_structR11test_struct:     # @_Z16make_test_structR11test_struct
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movl	$4194304, %edi                  # imm = 0x400000
	callq	_Znwm
	movq	8(%rbx), %rdi
	movq	%rax, 8(%rbx)
	testq	%rdi, %rdi
	je	.LBB0_2
# %bb.1:                                # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i.i
	callq	_ZdlPv
.LBB0_2:                                # %_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_.exit
	movl	$4194304, %edi                  # imm = 0x400000
	callq	_Znwm
	movq	16(%rbx), %rdi
	movq	%rax, 16(%rbx)
	testq	%rdi, %rdi
	je	.LBB0_4
# %bb.3:                                # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i.i19
	callq	_ZdlPv
.LBB0_4:                                # %_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_.exit20
	movl	$4194304, %edi                  # imm = 0x400000
	callq	_Znwm
	movq	24(%rbx), %rdi
	movq	%rax, 24(%rbx)
	testq	%rdi, %rdi
	je	.LBB0_6
# %bb.5:                                # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i.i22
	callq	_ZdlPv
.LBB0_6:                                # %_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EE5resetEPS1_.exit23
	cmpq	$0, 8(%rbx)
	je	.LBB0_7
# %bb.8:
	movq	%rbx, %rdi
	callq	hipStreamCreate
	testl	%eax, %eax
	je	.LBB0_10
# %bb.9:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__._Z16make_test_structR11test_struct, %esi
	movl	$16, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$61, %esi
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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	$-62, %eax
	jmp	.LBB0_21
.LBB0_7:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__._Z16make_test_structR11test_struct, %esi
	movl	$16, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$43, %esi
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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	$-44, %eax
	jmp	.LBB0_21
.LBB0_10:
	leaq	32(%rbx), %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	xorl	%edx, %edx
	callq	hipHostMalloc
	testl	%eax, %eax
	je	.LBB0_12
# %bb.11:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__._Z16make_test_structR11test_struct, %esi
	movl	$16, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$67, %esi
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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	$-68, %eax
	jmp	.LBB0_21
.LBB0_12:
	leaq	40(%rbx), %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	xorl	%edx, %edx
	callq	hipHostMalloc
	testl	%eax, %eax
	je	.LBB0_14
# %bb.13:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__._Z16make_test_structR11test_struct, %esi
	movl	$16, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$73, %esi
	callq	_ZNSolsEi
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	movl	$-74, %eax
	jmp	.LBB0_21
.LBB0_14:
	leaq	48(%rbx), %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	xorl	%edx, %edx
	callq	hipHostMalloc
	testl	%eax, %eax
	je	.LBB0_16
# %bb.15:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__._Z16make_test_structR11test_struct, %esi
	movl	$16, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$79, %esi
	callq	_ZNSolsEi
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	movl	$-80, %eax
	jmp	.LBB0_21
.LBB0_16:                               # %.lr.ph.i.i.i
	movq	8(%rbx), %rax
	xorl	%ecx, %ecx
.LBB0_17:                               # =>This Inner Loop Header: Depth=1
	movl	$1065353216, (%rax,%rcx)        # imm = 0x3F800000
	addq	$4, %rcx
	cmpq	$4194304, %rcx                  # imm = 0x400000
	jne	.LBB0_17
# %bb.18:                               # %.lr.ph.i.i.i27
	movq	16(%rbx), %rax
	xorl	%ecx, %ecx
.LBB0_19:                               # =>This Inner Loop Header: Depth=1
	movl	$1073741824, (%rax,%rcx)        # imm = 0x40000000
	addq	$4, %rcx
	cmpq	$4194304, %rcx                  # imm = 0x400000
	jne	.LBB0_19
# %bb.20:                               # %_ZSt4fillIPfdEvT_S1_RKT0_.exit30
	movq	$0, 56(%rbx)
	xorl	%eax, %eax
.LBB0_21:
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z16make_test_structR11test_struct, .Lfunc_end0-_Z16make_test_structR11test_struct
	.cfi_endproc
                                        # -- End function
	.globl	_Z19destroy_test_structR11test_struct # -- Begin function _Z19destroy_test_structR11test_struct
	.type	_Z19destroy_test_structR11test_struct,@function
_Z19destroy_test_structR11test_struct:  # @_Z19destroy_test_structR11test_struct
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.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 %rbp, -16
	movq	%rdi, %rbx
	movq	32(%rdi), %rdi
	callq	hipHostFree
	testl	%eax, %eax
	je	.LBB1_2
# %bb.1:
	movl	$-97, %ebx
	movl	$96, %ebp
	jmp	.LBB1_8
.LBB1_2:
	movq	40(%rbx), %rdi
	callq	hipHostFree
	testl	%eax, %eax
	je	.LBB1_4
# %bb.3:
	movl	$-103, %ebx
	movl	$102, %ebp
	jmp	.LBB1_8
.LBB1_4:
	movq	48(%rbx), %rdi
	callq	hipHostFree
	testl	%eax, %eax
	je	.LBB1_6
# %bb.5:
	movl	$-109, %ebx
	movl	$108, %ebp
	jmp	.LBB1_8
.LBB1_6:
	movq	(%rbx), %rdi
	callq	hipStreamDestroy
	testl	%eax, %eax
	je	.LBB1_10
# %bb.7:
	movl	$-115, %ebx
	movl	$114, %ebp
.LBB1_8:                                # %.sink.split
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__._Z19destroy_test_structR11test_struct, %esi
	movl	$19, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	%ebp, %esi
	callq	_ZNSolsEi
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB1_9:
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB1_10:
	.cfi_def_cfa_offset 32
	xorl	%ebx, %ebx
	jmp	.LBB1_9
.Lfunc_end1:
	.size	_Z19destroy_test_structR11test_struct, .Lfunc_end1-_Z19destroy_test_structR11test_struct
	.cfi_endproc
                                        # -- End function
	.globl	_Z22__device_stub__vec_addPfPKfS1_m # -- Begin function _Z22__device_stub__vec_addPfPKfS1_m
	.type	_Z22__device_stub__vec_addPfPKfS1_m,@function
_Z22__device_stub__vec_addPfPKfS1_m:    # @_Z22__device_stub__vec_addPfPKfS1_m
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	16(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z7vec_addPfPKfS1_m, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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_end2:
	.size	_Z22__device_stub__vec_addPfPKfS1_m, .Lfunc_end2-_Z22__device_stub__vec_addPfPKfS1_m
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI3_0:
	.long	0x40800000                      # float 4
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$5120, %rsp                     # imm = 0x1400
	.cfi_def_cfa_offset 5152
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	$8, %eax
	xorps	%xmm0, %xmm0
.LBB3_1:                                # =>This Inner Loop Header: Depth=1
	movups	%xmm0, (%rsp,%rax)
	movq	$0, 16(%rsp,%rax)
	addq	$64, %rax
	cmpq	$5128, %rax                     # imm = 0x1408
	jne	.LBB3_1
# %bb.2:                                # %_ZNSt5arrayI11test_structLm80EEC2Ev.exit
	xorl	%ebx, %ebx
.LBB3_3:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	leaq	(%rsp,%rbx), %rdi
.Ltmp0:
	callq	_Z16make_test_structR11test_struct
.Ltmp1:
# %bb.4:                                # %.noexc
                                        #   in Loop: Header=BB3_3 Depth=1
	addq	$64, %rbx
	cmpq	$5120, %rbx                     # imm = 0x1400
	jne	.LBB3_3
# %bb.5:                                # %_ZSt8for_eachIP11test_structPFiRS0_EET0_T_S6_S5_.exit.preheader.preheader
	xorl	%r15d, %r15d
	movabsq	$4294967297, %rbx               # imm = 0x100000001
	movabsq	$4294968320, %r14               # imm = 0x100000400
.LBB3_6:                                # %_ZSt8for_eachIP11test_structPFiRS0_EET0_T_S6_S5_.exit.preheader
                                        # =>This Inner Loop Header: Depth=1
	movq	32(%rsp,%r15), %rdi
	movq	(%rsp,%r15), %r8
	movq	8(%rsp,%r15), %rsi
.Ltmp3:
	movl	$4194304, %edx                  # imm = 0x400000
	movl	$1, %ecx
	callq	hipMemcpyAsync
.Ltmp4:
# %bb.7:                                #   in Loop: Header=BB3_6 Depth=1
	testl	%eax, %eax
	jne	.LBB3_8
# %bb.36:                               #   in Loop: Header=BB3_6 Depth=1
	movq	40(%rsp,%r15), %rdi
	movq	(%rsp,%r15), %r8
	movq	16(%rsp,%r15), %rsi
.Ltmp17:
	movl	$4194304, %edx                  # imm = 0x400000
	movl	$1, %ecx
	callq	hipMemcpyAsync
.Ltmp18:
# %bb.37:                               #   in Loop: Header=BB3_6 Depth=1
	testl	%eax, %eax
	jne	.LBB3_38
# %bb.44:                               #   in Loop: Header=BB3_6 Depth=1
	movq	(%rsp,%r15), %r9
.Ltmp31:
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	__hipPushCallConfiguration
.Ltmp32:
# %bb.45:                               #   in Loop: Header=BB3_6 Depth=1
	testl	%eax, %eax
	jne	.LBB3_47
# %bb.46:                               #   in Loop: Header=BB3_6 Depth=1
	movq	48(%rsp,%r15), %rdi
	movq	32(%rsp,%r15), %rsi
	movq	40(%rsp,%r15), %rdx
.Ltmp33:
	movl	$1048576, %ecx                  # imm = 0x100000
	callq	_Z22__device_stub__vec_addPfPKfS1_m
.Ltmp34:
.LBB3_47:                               #   in Loop: Header=BB3_6 Depth=1
	movq	(%rsp,%r15), %r8
	movq	24(%rsp,%r15), %rdi
	movq	48(%rsp,%r15), %rsi
.Ltmp35:
	movl	$4194304, %edx                  # imm = 0x400000
	movl	$2, %ecx
	callq	hipMemcpyAsync
.Ltmp36:
# %bb.48:                               # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB3_6 Depth=1
	testl	%eax, %eax
	jne	.LBB3_49
# %bb.23:                               # %_ZSt8for_eachIP11test_structPFiRS0_EET0_T_S6_S5_.exit
                                        #   in Loop: Header=BB3_6 Depth=1
	addq	$64, %r15
	cmpq	$5120, %r15                     # imm = 0x1400
	jne	.LBB3_6
# %bb.24:                               # %.preheader140.preheader
	xorl	%ebx, %ebx
.LBB3_25:                               # %.preheader140
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rsp,%rbx), %rdi
.Ltmp51:
	callq	hipStreamSynchronize
.Ltmp52:
# %bb.26:                               #   in Loop: Header=BB3_25 Depth=1
	testl	%eax, %eax
	jne	.LBB3_27
# %bb.55:                               #   in Loop: Header=BB3_25 Depth=1
	addq	$64, %rbx
	cmpq	$5120, %rbx                     # imm = 0x1400
	jne	.LBB3_25
# %bb.56:                               # %.preheader.preheader
	movq	%rsp, %rax
	xorl	%r14d, %r14d
.LBB3_57:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_58 Depth 2
	movq	24(%rax), %rcx
	xorl	%edx, %edx
.LBB3_58:                               #   Parent Loop BB3_57 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rdx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	ucomiss	.LCPI3_0(%rip), %xmm0
	jne	.LBB3_59
	jnp	.LBB3_60
.LBB3_59:                               #   in Loop: Header=BB3_58 Depth=2
	incq	56(%rax)
.LBB3_60:                               #   in Loop: Header=BB3_58 Depth=2
	incq	%rdx
	cmpq	$1048576, %rdx                  # imm = 0x100000
	jne	.LBB3_58
# %bb.61:                               #   in Loop: Header=BB3_57 Depth=1
	movq	56(%rax), %rsi
	testq	%rsi, %rsi
	je	.LBB3_67
# %bb.62:                               #   in Loop: Header=BB3_57 Depth=1
.Ltmp67:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
.Ltmp68:
# %bb.63:                               # %_ZNSolsEm.exit
                                        #   in Loop: Header=BB3_57 Depth=1
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp69:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp70:
# %bb.64:                               # %.noexc126
                                        #   in Loop: Header=BB3_57 Depth=1
.Ltmp71:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp72:
# %bb.65:                               # %.noexc127
                                        #   in Loop: Header=BB3_57 Depth=1
.Ltmp73:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp74:
# %bb.66:                               # %_ZNSolsEPFRSoS_E.exit108
                                        #   in Loop: Header=BB3_57 Depth=1
.Ltmp75:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp76:
.LBB3_67:                               # %_ZNSolsEPFRSoS_E.exit110
                                        #   in Loop: Header=BB3_57 Depth=1
	leaq	(%rsp,%r14), %rax
	addq	$64, %rax
	addq	$64, %r14
	cmpq	$5120, %r14                     # imm = 0x1400
	jne	.LBB3_57
# %bb.68:                               # %.lr.ph.i100.preheader
	xorl	%ebx, %ebx
.LBB3_69:                               # %.lr.ph.i100
                                        # =>This Inner Loop Header: Depth=1
	leaq	(%rsp,%rbx), %rdi
.Ltmp78:
	callq	_Z19destroy_test_structR11test_struct
.Ltmp79:
# %bb.70:                               # %.noexc103
                                        #   in Loop: Header=BB3_69 Depth=1
	addq	$64, %rbx
	cmpq	$5120, %rbx                     # imm = 0x1400
	jne	.LBB3_69
# %bb.71:
	xorl	%ebx, %ebx
	jmp	.LBB3_14
.LBB3_8:
.Ltmp5:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__.main, %esi
	movl	$4, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp6:
# %bb.9:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
.Ltmp7:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp8:
# %bb.10:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit80
.Ltmp9:
	movl	$_ZSt4cout, %edi
	movl	$145, %esi
	callq	_ZNSolsEi
.Ltmp10:
# %bb.11:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp11:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp12:
# %bb.12:                               # %.noexc111
.Ltmp13:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp14:
# %bb.13:                               # %.noexc112
	movl	$-146, %ebx
.Ltmp15:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp16:
	jmp	.LBB3_14
.LBB3_38:
.Ltmp19:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__.main, %esi
	movl	$4, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp20:
# %bb.39:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit83
.Ltmp21:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp22:
# %bb.40:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit85
.Ltmp23:
	movl	$_ZSt4cout, %edi
	movl	$151, %esi
	callq	_ZNSolsEi
.Ltmp24:
# %bb.41:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp25:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp26:
# %bb.42:                               # %.noexc114
.Ltmp27:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp28:
# %bb.43:                               # %.noexc115
	movl	$-152, %ebx
.Ltmp29:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp30:
	jmp	.LBB3_14
.LBB3_49:
.Ltmp38:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__.main, %esi
	movl	$4, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp39:
# %bb.50:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit89
.Ltmp40:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp41:
# %bb.51:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit91
.Ltmp42:
	movl	$_ZSt4cout, %edi
	movl	$159, %esi
	callq	_ZNSolsEi
.Ltmp43:
# %bb.52:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp44:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp45:
# %bb.53:                               # %.noexc118
.Ltmp46:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp47:
# %bb.54:                               # %.noexc119
	movl	$-160, %ebx
.Ltmp48:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp49:
	jmp	.LBB3_14
.LBB3_27:
.Ltmp54:
	movl	$_ZSt4cout, %edi
	movl	$.L__FUNCTION__.main, %esi
	movl	$4, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp55:
# %bb.28:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit95
.Ltmp56:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp57:
# %bb.29:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit97
.Ltmp58:
	movl	$_ZSt4cout, %edi
	movl	$168, %esi
	callq	_ZNSolsEi
.Ltmp59:
# %bb.30:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp60:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp61:
# %bb.31:                               # %.noexc122
.Ltmp62:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp63:
# %bb.32:                               # %.noexc123
	movl	$-169, %ebx
.Ltmp64:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp65:
.LBB3_14:                               # %_ZSt8for_eachIP11test_structPFiRS0_EET0_T_S6_S5_.exit104
	movl	$5064, %r14d                    # imm = 0x13C8
.LBB3_15:                               # =>This Inner Loop Header: Depth=1
	movq	16(%rsp,%r14), %rdi
	testq	%rdi, %rdi
	je	.LBB3_17
# %bb.16:                               # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i.i.i
                                        #   in Loop: Header=BB3_15 Depth=1
	callq	_ZdlPv
.LBB3_17:                               # %_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev.exit.i.i
                                        #   in Loop: Header=BB3_15 Depth=1
	movq	$0, 16(%rsp,%r14)
	movq	8(%rsp,%r14), %rdi
	testq	%rdi, %rdi
	je	.LBB3_19
# %bb.18:                               # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i2.i.i
                                        #   in Loop: Header=BB3_15 Depth=1
	callq	_ZdlPv
.LBB3_19:                               # %_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev.exit3.i.i
                                        #   in Loop: Header=BB3_15 Depth=1
	movq	$0, 8(%rsp,%r14)
	movq	(%rsp,%r14), %rdi
	testq	%rdi, %rdi
	je	.LBB3_21
# %bb.20:                               # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i5.i.i
                                        #   in Loop: Header=BB3_15 Depth=1
	callq	_ZdlPv
.LBB3_21:                               # %_ZN11test_structD2Ev.exit.i
                                        #   in Loop: Header=BB3_15 Depth=1
	movq	$0, (%rsp,%r14)
	addq	$-64, %r14
	cmpq	$-56, %r14
	jne	.LBB3_15
# %bb.22:                               # %_ZNSt5arrayI11test_structLm80EED2Ev.exit
	movl	%ebx, %eax
	addq	$5120, %rsp                     # imm = 0x1400
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB3_73:                               # %.loopexit.split-lp142
	.cfi_def_cfa_offset 5152
.Ltmp66:
	jmp	.LBB3_75
.LBB3_74:                               # %.loopexit
.Ltmp80:
	jmp	.LBB3_75
.LBB3_72:                               # %.loopexit141
.Ltmp53:
	jmp	.LBB3_75
.LBB3_35:                               # %.loopexit.split-lp147
.Ltmp50:
	jmp	.LBB3_75
.LBB3_76:
.Ltmp77:
	jmp	.LBB3_75
.LBB3_33:                               # %.loopexit.split-lp
.Ltmp2:
	jmp	.LBB3_75
.LBB3_34:                               # %.loopexit146
.Ltmp37:
.LBB3_75:
	movq	%rax, %rbx
	movq	%rsp, %rdi
	callq	_ZNSt5arrayI11test_structLm80EED2Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end3:
	.size	main, .Lfunc_end3-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table3:
.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 .Ltmp3-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp36-.Ltmp3                 #   Call between .Ltmp3 and .Ltmp36
	.uleb128 .Ltmp37-.Lfunc_begin0          #     jumps to .Ltmp37
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp51-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp52-.Ltmp51                #   Call between .Ltmp51 and .Ltmp52
	.uleb128 .Ltmp53-.Lfunc_begin0          #     jumps to .Ltmp53
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp67-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp76-.Ltmp67                #   Call between .Ltmp67 and .Ltmp76
	.uleb128 .Ltmp77-.Lfunc_begin0          #     jumps to .Ltmp77
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp78-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp79-.Ltmp78                #   Call between .Ltmp78 and .Ltmp79
	.uleb128 .Ltmp80-.Lfunc_begin0          #     jumps to .Ltmp80
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp5-.Lfunc_begin0           # >> Call Site 6 <<
	.uleb128 .Ltmp49-.Ltmp5                 #   Call between .Ltmp5 and .Ltmp49
	.uleb128 .Ltmp50-.Lfunc_begin0          #     jumps to .Ltmp50
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp54-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp65-.Ltmp54                #   Call between .Ltmp54 and .Ltmp65
	.uleb128 .Ltmp66-.Lfunc_begin0          #     jumps to .Ltmp66
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp65-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Lfunc_end3-.Ltmp65            #   Call between .Ltmp65 and .Lfunc_end3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt5arrayI11test_structLm80EED2Ev,"axG",@progbits,_ZNSt5arrayI11test_structLm80EED2Ev,comdat
	.weak	_ZNSt5arrayI11test_structLm80EED2Ev # -- Begin function _ZNSt5arrayI11test_structLm80EED2Ev
	.p2align	1, 0x90
	.type	_ZNSt5arrayI11test_structLm80EED2Ev,@function
_ZNSt5arrayI11test_structLm80EED2Ev:    # @_ZNSt5arrayI11test_structLm80EED2Ev
	.cfi_startproc
# %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
	movl	$5064, %r14d                    # imm = 0x13C8
.LBB4_1:                                # =>This Inner Loop Header: Depth=1
	movq	16(%rbx,%r14), %rdi
	testq	%rdi, %rdi
	je	.LBB4_3
# %bb.2:                                # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i.i
                                        #   in Loop: Header=BB4_1 Depth=1
	callq	_ZdlPv
.LBB4_3:                                # %_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev.exit.i
                                        #   in Loop: Header=BB4_1 Depth=1
	movq	$0, 16(%rbx,%r14)
	movq	8(%rbx,%r14), %rdi
	testq	%rdi, %rdi
	je	.LBB4_5
# %bb.4:                                # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i2.i
                                        #   in Loop: Header=BB4_1 Depth=1
	callq	_ZdlPv
.LBB4_5:                                # %_ZNSt10unique_ptrISt5arrayIfLm1048576EESt14default_deleteIS1_EED2Ev.exit3.i
                                        #   in Loop: Header=BB4_1 Depth=1
	movq	$0, 8(%rbx,%r14)
	movq	(%rbx,%r14), %rdi
	testq	%rdi, %rdi
	je	.LBB4_7
# %bb.6:                                # %_ZNKSt14default_deleteISt5arrayIfLm1048576EEEclEPS1_.exit.i5.i
                                        #   in Loop: Header=BB4_1 Depth=1
	callq	_ZdlPv
.LBB4_7:                                # %_ZN11test_structD2Ev.exit
                                        #   in Loop: Header=BB4_1 Depth=1
	movq	$0, (%rbx,%r14)
	addq	$-64, %r14
	cmpq	$-56, %r14
	jne	.LBB4_1
# %bb.8:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_ZNSt5arrayI11test_structLm80EED2Ev, .Lfunc_end4-_ZNSt5arrayI11test_structLm80EED2Ev
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB5_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB5_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z7vec_addPfPKfS1_m, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end5:
	.size	__hip_module_ctor, .Lfunc_end5-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB6_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB6_2:
	retq
.Lfunc_end6:
	.size	__hip_module_dtor, .Lfunc_end6-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	.L__FUNCTION__._Z16make_test_structR11test_struct,@object # @__FUNCTION__._Z16make_test_structR11test_struct
	.section	.rodata.str1.1,"aMS",@progbits,1
.L__FUNCTION__._Z16make_test_structR11test_struct:
	.asciz	"make_test_struct"
	.size	.L__FUNCTION__._Z16make_test_structR11test_struct, 17

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

	.type	.L__FUNCTION__._Z19destroy_test_structR11test_struct,@object # @__FUNCTION__._Z19destroy_test_structR11test_struct
.L__FUNCTION__._Z19destroy_test_structR11test_struct:
	.asciz	"destroy_test_struct"
	.size	.L__FUNCTION__._Z19destroy_test_structR11test_struct, 20

	.type	_Z7vec_addPfPKfS1_m,@object     # @_Z7vec_addPfPKfS1_m
	.section	.rodata,"a",@progbits
	.globl	_Z7vec_addPfPKfS1_m
	.p2align	3, 0x0
_Z7vec_addPfPKfS1_m:
	.quad	_Z22__device_stub__vec_addPfPKfS1_m
	.size	_Z7vec_addPfPKfS1_m, 8

	.type	.L__FUNCTION__.main,@object     # @__FUNCTION__.main
	.section	.rodata.str1.1,"aMS",@progbits,1
.L__FUNCTION__.main:
	.asciz	"main"
	.size	.L__FUNCTION__.main, 5

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z7vec_addPfPKfS1_m"
	.size	.L__unnamed_1, 20

	.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 _Z22__device_stub__vec_addPfPKfS1_m
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZSt4cout
	.addrsig_sym _Z7vec_addPfPKfS1_m
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z7vec_addPfPKfS1_m     ; -- Begin function _Z7vec_addPfPKfS1_m
	.globl	_Z7vec_addPfPKfS1_m
	.p2align	8
	.type	_Z7vec_addPfPKfS1_m,@function
_Z7vec_addPfPKfS1_m:                    ; @_Z7vec_addPfPKfS1_m
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x2c
	s_load_b256 s[4:11], s[0:1], 0x0
	s_add_u32 s0, s0, 32
	s_addc_u32 s1, s1, 0
	s_mov_b32 s3, exec_lo
	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[1:2], null, s15, s2, v[0:1]
	v_mov_b32_e32 v2, 0
	v_cmpx_gt_u64_e64 s[10:11], v[1:2]
	s_cbranch_execz .LBB0_3
; %bb.1:                                ; %.lr.ph
	s_load_b32 s0, s[0:1], 0x0
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	s_mov_b32 s3, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s2, s0, s2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b64 s[12:13], s[2:3], 2
.LBB0_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_u32 v5, vcc_lo, s6, v3
	v_add_co_ci_u32_e32 v6, vcc_lo, s7, v4, vcc_lo
	v_add_co_u32 v7, vcc_lo, s8, v3
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v4, vcc_lo
	v_add_co_u32 v1, vcc_lo, v1, s2
	global_load_b32 v0, v[5:6], off
	global_load_b32 v7, v[7:8], off
	v_add_co_ci_u32_e32 v2, vcc_lo, 0, v2, vcc_lo
	v_add_co_u32 v5, vcc_lo, s4, v3
	v_add_co_ci_u32_e32 v6, vcc_lo, s5, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_le_u64_e32 vcc_lo, s[10:11], v[1:2]
	v_add_co_u32 v3, s0, v3, s12
	v_add_co_ci_u32_e64 v4, s0, s13, v4, s0
	s_or_b32 s3, vcc_lo, s3
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v0, v0, v7
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v0, 1.0, v0
	global_store_b32 v[5:6], v0, off
	s_and_not1_b32 exec_lo, exec_lo, s3
	s_cbranch_execnz .LBB0_2
.LBB0_3:                                ; %Flow25
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z7vec_addPfPKfS1_m
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.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 9
		.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	_Z7vec_addPfPKfS1_m, .Lfunc_end0-_Z7vec_addPfPKfS1_m
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 248
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
