#include <algorithm>
#include <cassert>
#include <iostream>
#include <vector>
#include <chrono>
#include <random>

using namespace std;

//===========================       prototypes des fonctions     ===================================================
__global__ void vectorAddBaseLine(const int *__restrict a, const int *__restrict b,int *__restrict c, int N) ;
void verify_result( vector<int> &a,  vector<int> &b,  vector<int> &c);
auto get_time() { return chrono::high_resolution_clock::now(); }





//===========================       fuction main      ===================================================
int main() {
  constexpr int N = 1000 << 16;       // size 2^16*1 éléments
  constexpr size_t bytes = sizeof(int) * N;
  int NUM_THREADS = 1<< 10;        // 2^10*1 threads/bloc
  int NUM_BLOCKS = (N + NUM_THREADS - 1) / NUM_THREADS;

  //CPU
  vector<int> a;a.reserve(N);
  vector<int> b;b.reserve(N);
  vector<int> c;c.reserve(N);

 

  for (int i = 0; i < N; i++) // initialisation les vacteurs a ,b
  {
    a.push_back(rand() % 100);
    b.push_back(rand() % 100);
  }
  
  
  //GPU
  
  int *d_a, *d_b, *d_c;
  cudaMalloc(&d_a, bytes);
  cudaMalloc(&d_b, bytes);
  cudaMalloc(&d_c, bytes);

  // CPU -----> GPU
  cudaMemcpy(d_a, a.data(), bytes, cudaMemcpyHostToDevice);
  cudaMemcpy(d_b, b.data(), bytes, cudaMemcpyHostToDevice);

  auto start = get_time();
  vectorAddBaseLine<<<NUM_BLOCKS, NUM_THREADS >>>(d_a, d_b, d_c, N);  //kernel

  // GPU ---> CPU
  cudaMemcpy(c.data(), d_c, bytes, cudaMemcpyDeviceToHost);

  auto finish = get_time();
  auto duration =
      chrono::duration_cast<std::chrono::milliseconds>(finish - start);
  
  cout << "temps écoulé en kernel = " << duration.count() << " ms\n";

  // vérification 
  verify_result(a, b, c);

  // libérer la mémoire GPU
  cudaFree(d_a);
  cudaFree(d_b);
  cudaFree(d_c);

  cout << "terminé avec succès"<<endl;

  
  
  return 0; // Free memory on device


}

// =======================          kernel          ==================================
__global__ void vectorAddBaseLine(const int *__restrict a, const int *__restrict b,int *__restrict c, int N) 
{
  int i = blockIdx.x*blockDim.x + threadIdx.x; 
	int j = blockIdx.y*blockDim.y + threadIdx.y; 
	int k = j*gridDim.x * blockDim.x + i;  

	if (k < N) c[k] = a[k] + b[k]; 
}

//=========================        vérification       ==========================================
void verify_result( vector<int> &a,  vector<int> &b,  vector<int> &c)
{
  for (int i = 0; i < a.size(); i++) 
    assert(c[i] == a[i] + b[i]);
}

	.file	"tmpxft_00250204_00000000-6_vectorAdd.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB5053:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE5053:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0, @function
_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0:
.LFB5873:
	.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
.LFE5873:
	.size	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0, .-_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"vector::_M_realloc_insert"
	.text
	.align 2
	.type	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0, @function
_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0:
.LFB5876:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	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
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 64
	movq	8(%rdi), %rdx
	cmpq	16(%rdi), %rdx
	je	.L11
	movl	(%rsi), %eax
	addq	$4, %rdx
	movl	%eax, -4(%rdx)
	movq	%rdx, 8(%rdi)
	jmp	.L10
.L11:
	movabsq	$2305843009213693951, %rbp
	movq	(%rdi), %r13
	movq	%rdx, %r14
	subq	%r13, %r14
	movq	%r14, %rax
	sarq	$2, %rax
	cmpq	%rbp, %rax
	jne	.L13
	leaq	.LC0(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L13:
	cmpq	%r13, %rdx
	movl	$1, %edx
	cmovne	%rax, %rdx
	addq	%rdx, %rax
	jc	.L17
	movabsq	$2305843009213693951, %rbp
	cmpq	%rbp, %rax
	cmovbe	%rax, %rbp
.L17:
	movq	%rbp, %rdi
	call	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	movq	%rax, %r12
	movl	(%r15), %eax
	movl	%eax, (%r12,%r14)
	testq	%r14, %r14
	jle	.L18
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L18:
	leaq	4(%r12,%r14), %r14
	testq	%r13, %r13
	je	.L19
	movq	16(%rbx), %rsi
	movq	%r13, %rdi
	subq	%r13, %rsi
	call	_ZdlPvm@PLT
.L19:
	leaq	(%r12,%rbp,4), %rax
	movq	%r12, (%rbx)
	movq	%r14, 8(%rbx)
	movq	%rax, 16(%rbx)
.L10:
	popq	%rax
	.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
.LFE5876:
	.size	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0, .-_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0
	.globl	_Z8get_timev
	.type	_Z8get_timev, @function
_Z8get_timev:
.LFB5035:
	.cfi_startproc
	endbr64
	jmp	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	.cfi_endproc
.LFE5035:
	.size	_Z8get_timev, .-_Z8get_timev
	.globl	_Z13verify_resultRSt6vectorIiSaIiEES2_S2_
	.type	_Z13verify_resultRSt6vectorIiSaIiEES2_S2_, @function
_Z13verify_resultRSt6vectorIiSaIiEES2_S2_:
.LFB5050:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE5050:
	.size	_Z13verify_resultRSt6vectorIiSaIiEES2_S2_, .-_Z13verify_resultRSt6vectorIiSaIiEES2_S2_
	.globl	_Z44__device_stub__Z17vectorAddBaseLinePKiS0_PiiPKiS0_Pii
	.type	_Z44__device_stub__Z17vectorAddBaseLinePKiS0_PiiPKiS0_Pii, @function
_Z44__device_stub__Z17vectorAddBaseLinePKiS0_PiiPKiS0_Pii:
.LFB5075:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movl	%ecx, 12(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rdi, 16(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rax, 104(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	12(%rsp), %rax
	movq	%rsi, 24(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 32(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movl	$1, 64(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L28
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z17vectorAddBaseLinePKiS0_Pii(%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
.L28:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5075:
	.size	_Z44__device_stub__Z17vectorAddBaseLinePKiS0_PiiPKiS0_Pii, .-_Z44__device_stub__Z17vectorAddBaseLinePKiS0_PiiPKiS0_Pii
	.globl	_Z17vectorAddBaseLinePKiS0_Pii
	.type	_Z17vectorAddBaseLinePKiS0_Pii, @function
_Z17vectorAddBaseLinePKiS0_Pii:
.LFB5076:
	.cfi_startproc
	endbr64
	jmp	_Z44__device_stub__Z17vectorAddBaseLinePKiS0_PiiPKiS0_Pii
	.cfi_endproc
.LFE5076:
	.size	_Z17vectorAddBaseLinePKiS0_Pii, .-_Z17vectorAddBaseLinePKiS0_Pii
	.section	.rodata.str1.1
.LC1:
	.string	"_Z17vectorAddBaseLinePKiS0_Pii"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB5078:
	.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	.LC1(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z17vectorAddBaseLinePKiS0_Pii(%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
.LFE5078:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEED2Ev
	.type	_ZNSt6vectorIiSaIiEED2Ev, @function
_ZNSt6vectorIiSaIiEED2Ev:
.LFB5431:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L35
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L35:
	ret
	.cfi_endproc
.LFE5431:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .-_ZNSt6vectorIiSaIiEED2Ev
	.weak	_ZNSt6vectorIiSaIiEED1Ev
	.set	_ZNSt6vectorIiSaIiEED1Ev,_ZNSt6vectorIiSaIiEED2Ev
	.section	.rodata._ZNSt6vectorIiSaIiEE7reserveEm.str1.1,"aMS",@progbits,1
.LC2:
	.string	"vector::reserve"
	.section	.text._ZNSt6vectorIiSaIiEE7reserveEm,"axG",@progbits,_ZNSt6vectorIiSaIiEE7reserveEm,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE7reserveEm
	.type	_ZNSt6vectorIiSaIiEE7reserveEm, @function
_ZNSt6vectorIiSaIiEE7reserveEm:
.LFB5433:
	.cfi_startproc
	endbr64
	movabsq	$2305843009213693951, %rax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmpq	%rsi, %rax
	jnb	.L38
	leaq	.LC2(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L38:
	movq	(%rdi), %rdx
	movq	16(%rdi), %rax
	movq	%rdi, %rbx
	movq	%rsi, %r12
	subq	%rdx, %rax
	sarq	$2, %rax
	cmpq	%rsi, %rax
	jnb	.L37
	movq	8(%rdi), %r13
	movq	%rsi, %rdi
	subq	%rdx, %r13
	call	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	movq	(%rbx), %r14
	movq	8(%rbx), %rdx
	movq	%rax, %rbp
	subq	%r14, %rdx
	testq	%rdx, %rdx
	jle	.L40
	movq	%r14, %rsi
	movq	%rax, %rdi
	call	memmove@PLT
	jmp	.L41
.L40:
	testq	%r14, %r14
	je	.L42
.L41:
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L42:
	addq	%rbp, %r13
	leaq	0(%rbp,%r12,4), %rax
	movq	%rbp, (%rbx)
	movq	%r13, 8(%rbx)
	movq	%rax, 16(%rbx)
.L37:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5433:
	.size	_ZNSt6vectorIiSaIiEE7reserveEm, .-_ZNSt6vectorIiSaIiEE7reserveEm
	.section	.rodata.str1.1
.LC3:
	.string	"temps \303\251coul\303\251 en kernel = "
.LC4:
	.string	" ms\n"
.LC5:
	.string	"termin\303\251 avec succ\303\250s"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB5036:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5036
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%ecx, %ecx
	movl	$65536000, %esi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	addq	$-128, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rbp
	movq	%rcx, 48(%rsp)
	movq	%rbp, %rdi
	movq	%rcx, 56(%rsp)
	movq	%rcx, 64(%rsp)
.LEHB0:
	call	_ZNSt6vectorIiSaIiEE7reserveEm
.LEHE0:
	leaq	72(%rsp), %r12
	xorl	%edx, %edx
	movl	$65536000, %esi
	movq	%r12, %rdi
	movq	%rdx, 72(%rsp)
	movq	%rdx, 80(%rsp)
	movq	%rdx, 88(%rsp)
.LEHB1:
	call	_ZNSt6vectorIiSaIiEE7reserveEm
.LEHE1:
	leaq	96(%rsp), %r13
	xorl	%eax, %eax
	movl	$65536000, %esi
	movq	%r13, %rdi
	movq	%rax, 96(%rsp)
	movq	%rax, 104(%rsp)
	movq	%rax, 112(%rsp)
.LEHB2:
	call	_ZNSt6vectorIiSaIiEE7reserveEm
	movl	$65536000, %ebx
	leaq	36(%rsp), %r14
.L48:
	call	rand@PLT
	movl	$100, %ecx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	cltd
	idivl	%ecx
	movl	%edx, 36(%rsp)
	call	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0
	call	rand@PLT
	movl	$100, %ecx
	movq	%r14, %rsi
	movq	%r12, %rdi
	cltd
	idivl	%ecx
	movl	%edx, 36(%rsp)
	call	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0
	decl	%ebx
	jne	.L48
	movq	%rsp, %rdi
	movl	$262144000, %esi
	call	cudaMalloc@PLT
	leaq	8(%rsp), %rdi
	movl	$262144000, %esi
	call	cudaMalloc@PLT
	leaq	16(%rsp), %rdi
	movl	$262144000, %esi
	call	cudaMalloc@PLT
	movq	48(%rsp), %rsi
	movq	(%rsp), %rdi
	movl	$1, %ecx
	movl	$262144000, %edx
	call	cudaMemcpy@PLT
	movq	72(%rsp), %rsi
	movq	8(%rsp), %rdi
	movl	$1, %ecx
	movl	$262144000, %edx
	call	cudaMemcpy@PLT
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$8388733, %edi
	salq	$10, %rdx
	movq	%rax, %rbx
	movl	$1, %ecx
	salq	$9, %rdi
	movl	$1, %esi
	movq	%rdx, 36(%rsp)
	movl	$1, 44(%rsp)
	call	__cudaPushCallConfiguration@PLT
	movq	16(%rsp), %rdx
	testl	%eax, %eax
	jne	.L49
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	movl	$65536000, %ecx
	call	_Z44__device_stub__Z17vectorAddBaseLinePKiS0_PiiPKiS0_Pii
.L49:
	movq	16(%rsp), %rsi
	movq	96(%rsp), %rdi
	movl	$2, %ecx
	movl	$262144000, %edx
	call	cudaMemcpy@PLT
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	$1000000, %ecx
	leaq	_ZSt4cout(%rip), %r14
	leaq	.LC3(%rip), %rsi
	subq	%rbx, %rax
	movq	%r14, %rdi
	cqto
	idivq	%rcx
	movq	%rax, %rbx
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%rbx, %rsi
	call	_ZNSo9_M_insertIlEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC4(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdi
	call	cudaFree@PLT
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	leaq	.LC5(%rip), %rsi
	movq	%r14, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
.LEHE2:
	movq	%r13, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	%r12, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	%rbp, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L54
	jmp	.L59
.L57:
	endbr64
	movq	%rax, %rbx
.L50:
	movq	%r13, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	jmp	.L51
.L56:
	endbr64
	movq	%rax, %rbx
.L51:
	movq	%r12, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	jmp	.L52
.L55:
	endbr64
	movq	%rax, %rbx
.L52:
	movq	%rbp, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L59:
	call	__stack_chk_fail@PLT
.L54:
	subq	$-128, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5036:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA5036:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5036-.LLSDACSB5036
.LLSDACSB5036:
	.uleb128 .LEHB0-.LFB5036
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L55-.LFB5036
	.uleb128 0
	.uleb128 .LEHB1-.LFB5036
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L56-.LFB5036
	.uleb128 0
	.uleb128 .LEHB2-.LFB5036
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L57-.LFB5036
	.uleb128 0
	.uleb128 .LEHB3-.LFB5036
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE5036:
	.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
	.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 <algorithm>
#include <cassert>
#include <iostream>
#include <vector>
#include <chrono>
#include <random>

using namespace std;

//===========================       prototypes des fonctions     ===================================================
__global__ void vectorAddBaseLine(const int *__restrict a, const int *__restrict b,int *__restrict c, int N) ;
void verify_result( vector<int> &a,  vector<int> &b,  vector<int> &c);
auto get_time() { return chrono::high_resolution_clock::now(); }





//===========================       fuction main      ===================================================
int main() {
  constexpr int N = 1000 << 16;       // size 2^16*1 éléments
  constexpr size_t bytes = sizeof(int) * N;
  int NUM_THREADS = 1<< 10;        // 2^10*1 threads/bloc
  int NUM_BLOCKS = (N + NUM_THREADS - 1) / NUM_THREADS;

  //CPU
  vector<int> a;a.reserve(N);
  vector<int> b;b.reserve(N);
  vector<int> c;c.reserve(N);

 

  for (int i = 0; i < N; i++) // initialisation les vacteurs a ,b
  {
    a.push_back(rand() % 100);
    b.push_back(rand() % 100);
  }
  
  
  //GPU
  
  int *d_a, *d_b, *d_c;
  hipMalloc(&d_a, bytes);
  hipMalloc(&d_b, bytes);
  hipMalloc(&d_c, bytes);

  // CPU -----> GPU
  hipMemcpy(d_a, a.data(), bytes, hipMemcpyHostToDevice);
  hipMemcpy(d_b, b.data(), bytes, hipMemcpyHostToDevice);

  auto start = get_time();
  vectorAddBaseLine<<<NUM_BLOCKS, NUM_THREADS >>>(d_a, d_b, d_c, N);  //kernel

  // GPU ---> CPU
  hipMemcpy(c.data(), d_c, bytes, hipMemcpyDeviceToHost);

  auto finish = get_time();
  auto duration =
      chrono::duration_cast<std::chrono::milliseconds>(finish - start);
  
  cout << "temps écoulé en kernel = " << duration.count() << " ms\n";

  // vérification 
  verify_result(a, b, c);

  // libérer la mémoire GPU
  hipFree(d_a);
  hipFree(d_b);
  hipFree(d_c);

  cout << "terminé avec succès"<<endl;

  
  
  return 0; // Free memory on device


}

// =======================          kernel          ==================================
__global__ void vectorAddBaseLine(const int *__restrict a, const int *__restrict b,int *__restrict c, int N) 
{
  int i = blockIdx.x*blockDim.x + threadIdx.x; 
	int j = blockIdx.y*blockDim.y + threadIdx.y; 
	int k = j*gridDim.x * blockDim.x + i;  

	if (k < N) c[k] = a[k] + b[k]; 
}

//=========================        vérification       ==========================================
void verify_result( vector<int> &a,  vector<int> &b,  vector<int> &c)
{
  for (int i = 0; i < a.size(); i++) 
    assert(c[i] == a[i] + b[i]);
}

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

                                        # End of file scope inline assembly
	.globl	_Z8get_timev                    # -- Begin function _Z8get_timev
	.type	_Z8get_timev,@function
_Z8get_timev:                           # @_Z8get_timev
	.cfi_startproc
# %bb.0:
	jmp	_ZNSt6chrono3_V212system_clock3nowEv # TAILCALL
.Lfunc_end0:
	.size	_Z8get_timev, .Lfunc_end0-_Z8get_timev
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function main
.LCPI1_0:
	.zero	16
	.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	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	xorps	%xmm0, %xmm0
	leaq	64(%rsp), %rdi
	movaps	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
.Ltmp0:
	movl	$65536000, %esi                 # imm = 0x3E80000
	callq	_ZNSt6vectorIiSaIiEE7reserveEm
.Ltmp1:
# %bb.1:
	leaq	32(%rsp), %rdi
	xorps	%xmm0, %xmm0
	movaps	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
.Ltmp3:
	movl	$65536000, %esi                 # imm = 0x3E80000
	callq	_ZNSt6vectorIiSaIiEE7reserveEm
.Ltmp4:
# %bb.2:
	xorps	%xmm0, %xmm0
	leaq	96(%rsp), %rdi
	movaps	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
.Ltmp6:
	movl	$65536000, %esi                 # imm = 0x3E80000
	callq	_ZNSt6vectorIiSaIiEE7reserveEm
.Ltmp7:
# %bb.3:                                # %.preheader
	movl	$65536000, %ebp                 # imm = 0x3E80000
	leaq	64(%rsp), %rbx
	leaq	8(%rsp), %r14
	leaq	32(%rsp), %r15
.LBB1_4:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$1374389535, %rax, %rcx         # imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$100, %ecx, %ecx
	subl	%ecx, %eax
	movl	%eax, 8(%rsp)
	movq	72(%rsp), %rsi
	cmpq	80(%rsp), %rsi
	je	.LBB1_9
# %bb.5:                                #   in Loop: Header=BB1_4 Depth=1
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 72(%rsp)
	jmp	.LBB1_10
.LBB1_9:                                #   in Loop: Header=BB1_4 Depth=1
.Ltmp9:
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp10:
.LBB1_10:                               # %_ZNSt6vectorIiSaIiEE9push_backEOi.exit
                                        #   in Loop: Header=BB1_4 Depth=1
	callq	rand
	cltq
	imulq	$1374389535, %rax, %rcx         # imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$100, %ecx, %ecx
	subl	%ecx, %eax
	movl	%eax, 8(%rsp)
	movq	40(%rsp), %rsi
	cmpq	48(%rsp), %rsi
	je	.LBB1_12
# %bb.11:                               #   in Loop: Header=BB1_4 Depth=1
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 40(%rsp)
	jmp	.LBB1_13
.LBB1_12:                               #   in Loop: Header=BB1_4 Depth=1
.Ltmp12:
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp13:
.LBB1_13:                               # %_ZNSt6vectorIiSaIiEE9push_backEOi.exit28
                                        #   in Loop: Header=BB1_4 Depth=1
	decl	%ebp
	jne	.LBB1_4
# %bb.14:
.Ltmp15:
	leaq	8(%rsp), %rdi
	movl	$262144000, %esi                # imm = 0xFA00000
	callq	hipMalloc
.Ltmp16:
# %bb.15:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit
.Ltmp17:
	leaq	24(%rsp), %rdi
	movl	$262144000, %esi                # imm = 0xFA00000
	callq	hipMalloc
.Ltmp18:
# %bb.16:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit30
.Ltmp19:
	leaq	16(%rsp), %rdi
	movl	$262144000, %esi                # imm = 0xFA00000
	callq	hipMalloc
.Ltmp20:
# %bb.17:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit32
	movq	8(%rsp), %rdi
	movq	64(%rsp), %rsi
.Ltmp21:
	movl	$262144000, %edx                # imm = 0xFA00000
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp22:
# %bb.18:
	movq	24(%rsp), %rdi
	movq	32(%rsp), %rsi
.Ltmp23:
	movl	$262144000, %edx                # imm = 0xFA00000
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp24:
# %bb.19:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %rbx
.Ltmp26:
	movabsq	$4295031296, %rdi               # imm = 0x10000FA00
	movabsq	$4294968320, %rdx               # imm = 0x100000400
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp27:
# %bb.20:
	testl	%eax, %eax
	jne	.LBB1_22
# %bb.21:
	movq	8(%rsp), %rdi
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdx
.Ltmp28:
	movl	$65536000, %ecx                 # imm = 0x3E80000
	callq	_Z32__device_stub__vectorAddBaseLinePKiS0_Pii
.Ltmp29:
.LBB1_22:
	movq	96(%rsp), %rdi
	movq	16(%rsp), %rsi
.Ltmp30:
	movl	$262144000, %edx                # imm = 0xFA00000
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp31:
# %bb.23:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %r14
.Ltmp33:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp34:
# %bb.24:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	subq	%rbx, %r14
	movabsq	$4835703278458516699, %rcx      # imm = 0x431BDE82D7B634DB
	movq	%r14, %rax
	imulq	%rcx
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$18, %rdx
	addq	%rdx, %rsi
.Ltmp35:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIlEERSoT_
.Ltmp36:
# %bb.25:                               # %_ZNSolsEl.exit
.Ltmp37:
	movl	$.L.str.1, %esi
	movl	$4, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp38:
# %bb.26:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit36
	movq	8(%rsp), %rdi
.Ltmp39:
	callq	hipFree
.Ltmp40:
# %bb.27:
	movq	24(%rsp), %rdi
.Ltmp41:
	callq	hipFree
.Ltmp42:
# %bb.28:
	movq	16(%rsp), %rdi
.Ltmp43:
	callq	hipFree
.Ltmp44:
# %bb.29:
.Ltmp45:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$21, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp46:
# %bb.30:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit38
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %rbx
.Ltmp47:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp48:
# %bb.31:                               # %.noexc50
.Ltmp49:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp50:
# %bb.32:                               # %.noexc51
.Ltmp51:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp52:
# %bb.33:                               # %_ZNSolsEPFRSoS_E.exit
	movq	96(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_35
# %bb.34:
	callq	_ZdlPv
.LBB1_35:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit
	movq	32(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_37
# %bb.36:
	callq	_ZdlPv
.LBB1_37:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit41
	movq	64(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_39
# %bb.38:
	callq	_ZdlPv
.LBB1_39:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit43
	xorl	%eax, %eax
	addq	$120, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB1_8:
	.cfi_def_cfa_offset 160
.Ltmp8:
	jmp	.LBB1_45
.LBB1_7:
.Ltmp5:
	movq	%rax, %rbx
	jmp	.LBB1_47
.LBB1_6:
.Ltmp2:
	movq	%rax, %rbx
	jmp	.LBB1_49
.LBB1_43:
.Ltmp32:
	jmp	.LBB1_45
.LBB1_42:
.Ltmp25:
	jmp	.LBB1_45
.LBB1_44:
.Ltmp53:
	jmp	.LBB1_45
.LBB1_40:
.Ltmp11:
	jmp	.LBB1_45
.LBB1_41:
.Ltmp14:
.LBB1_45:
	movq	%rax, %rbx
	movq	96(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_47
# %bb.46:
	callq	_ZdlPv
.LBB1_47:
	movq	32(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_49
# %bb.48:
	callq	_ZdlPv
.LBB1_49:
	movq	64(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_51
# %bb.50:
	callq	_ZdlPv
.LBB1_51:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit49
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	main, .Lfunc_end1-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.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 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp7-.Ltmp6                  #   Call between .Ltmp6 and .Ltmp7
	.uleb128 .Ltmp8-.Lfunc_begin0           #     jumps to .Ltmp8
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp10-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp10
	.uleb128 .Ltmp11-.Lfunc_begin0          #     jumps to .Ltmp11
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp12-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp13-.Ltmp12                #   Call between .Ltmp12 and .Ltmp13
	.uleb128 .Ltmp14-.Lfunc_begin0          #     jumps to .Ltmp14
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp24-.Ltmp15                #   Call between .Ltmp15 and .Ltmp24
	.uleb128 .Ltmp25-.Lfunc_begin0          #     jumps to .Ltmp25
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp26-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp31-.Ltmp26                #   Call between .Ltmp26 and .Ltmp31
	.uleb128 .Ltmp32-.Lfunc_begin0          #     jumps to .Ltmp32
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp33-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp52-.Ltmp33                #   Call between .Ltmp33 and .Ltmp52
	.uleb128 .Ltmp53-.Lfunc_begin0          #     jumps to .Ltmp53
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp52-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Lfunc_end1-.Ltmp52            #   Call between .Ltmp52 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE7reserveEm,"axG",@progbits,_ZNSt6vectorIiSaIiEE7reserveEm,comdat
	.weak	_ZNSt6vectorIiSaIiEE7reserveEm  # -- Begin function _ZNSt6vectorIiSaIiEE7reserveEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE7reserveEm,@function
_ZNSt6vectorIiSaIiEE7reserveEm:         # @_ZNSt6vectorIiSaIiEE7reserveEm
	.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	%rsi, %rax
	shrq	$61, %rax
	jne	.LBB2_8
# %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movq	16(%rdi), %rax
	subq	%r13, %rax
	sarq	$2, %rax
	cmpq	%rsi, %rax
	jae	.LBB2_7
# %bb.2:                                # %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit
	movq	8(%rbx), %r12
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %r15
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	subq	%rsi, %rdx
	testq	%rdx, %rdx
	jle	.LBB2_4
# %bb.3:
	movq	%r15, %rdi
	callq	memmove@PLT
	movq	(%rbx), %rsi
.LBB2_4:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit
	subq	%r13, %r12
	testq	%rsi, %rsi
	je	.LBB2_6
# %bb.5:
	movq	%rsi, %rdi
	callq	_ZdlPv
.LBB2_6:                                # %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit
	movq	%r15, (%rbx)
	addq	%r15, %r12
	movq	%r12, 8(%rbx)
	leaq	(%r15,%r14,4), %rax
	movq	%rax, 16(%rbx)
.LBB2_7:
	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
.LBB2_8:
	.cfi_def_cfa_offset 48
	movl	$.L.str.3, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end2:
	.size	_ZNSt6vectorIiSaIiEE7reserveEm, .Lfunc_end2-_ZNSt6vectorIiSaIiEE7reserveEm
	.cfi_endproc
                                        # -- End function
	.text
	.globl	_Z32__device_stub__vectorAddBaseLinePKiS0_Pii # -- Begin function _Z32__device_stub__vectorAddBaseLinePKiS0_Pii
	.type	_Z32__device_stub__vectorAddBaseLinePKiS0_Pii,@function
_Z32__device_stub__vectorAddBaseLinePKiS0_Pii: # @_Z32__device_stub__vectorAddBaseLinePKiS0_Pii
	.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	4(%rsp), %rdx
	movl	%ecx, (%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	16(%rsp), %r12
	leaq	8(%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	$_Z17vectorAddBaseLinePKiS0_Pii, %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_end3:
	.size	_Z32__device_stub__vectorAddBaseLinePKiS0_Pii, .Lfunc_end3-_Z32__device_stub__vectorAddBaseLinePKiS0_Pii
	.cfi_endproc
                                        # -- End function
	.globl	_Z13verify_resultRSt6vectorIiSaIiEES2_S2_ # -- Begin function _Z13verify_resultRSt6vectorIiSaIiEES2_S2_
	.type	_Z13verify_resultRSt6vectorIiSaIiEES2_S2_,@function
_Z13verify_resultRSt6vectorIiSaIiEES2_S2_: # @_Z13verify_resultRSt6vectorIiSaIiEES2_S2_
	.cfi_startproc
# %bb.0:
	retq
.Lfunc_end4:
	.size	_Z13verify_resultRSt6vectorIiSaIiEES2_S2_, .Lfunc_end4-_Z13verify_resultRSt6vectorIiSaIiEES2_S2_
	.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	.LBB5_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB5_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB5_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB5_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end5:
	.size	_ZNSt15__new_allocatorIiE8allocateEmPKv, .Lfunc_end5-_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ # -- Begin function _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,@function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_: # @_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__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.4, %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	.LBB6_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB6_3
.LBB6_1:
	xorl	%ebp, %ebp
.LBB6_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	.LBB6_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB6_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	.LBB6_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB6_7:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB6_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB6_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_end6:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .Lfunc_end6-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__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	.LBB7_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
.LBB7_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end7:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .Lfunc_end7-_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.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	.LBB8_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB8_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z17vectorAddBaseLinePKiS0_Pii, %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_end8:
	.size	__hip_module_ctor, .Lfunc_end8-__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	.LBB9_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
.LBB9_2:
	retq
.Lfunc_end9:
	.size	__hip_module_dtor, .Lfunc_end9-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z17vectorAddBaseLinePKiS0_Pii,@object # @_Z17vectorAddBaseLinePKiS0_Pii
	.section	.rodata,"a",@progbits
	.globl	_Z17vectorAddBaseLinePKiS0_Pii
	.p2align	3, 0x0
_Z17vectorAddBaseLinePKiS0_Pii:
	.quad	_Z32__device_stub__vectorAddBaseLinePKiS0_Pii
	.size	_Z17vectorAddBaseLinePKiS0_Pii, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"temps \303\251coul\303\251 en kernel = "
	.size	.L.str, 28

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	" ms\n"
	.size	.L.str.1, 5

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"termin\303\251 avec succ\303\250s"
	.size	.L.str.2, 22

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"vector::reserve"
	.size	.L.str.3, 16

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z17vectorAddBaseLinePKiS0_Pii"
	.size	.L__unnamed_1, 31

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

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z17vectorAddBaseLinePKiS0_Pii ; -- Begin function _Z17vectorAddBaseLinePKiS0_Pii
	.globl	_Z17vectorAddBaseLinePKiS0_Pii
	.p2align	8
	.type	_Z17vectorAddBaseLinePKiS0_Pii,@function
_Z17vectorAddBaseLinePKiS0_Pii:         ; @_Z17vectorAddBaseLinePKiS0_Pii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x2c
	s_load_b32 s3, s[0:1], 0x20
	v_bfe_u32 v1, v0, 10, 10
	s_waitcnt lgkmcnt(0)
	s_lshr_b32 s4, s2, 16
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[2:3], null, s15, s4, v[1:2]
	s_load_b32 s4, s[0:1], 0x18
	v_mad_u64_u32 v[3:4], null, v2, s3, s[14:15]
	v_and_b32_e32 v2, 0x3ff, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[0:1], null, v3, s2, v[2:3]
	s_mov_b32 s2, exec_lo
	s_waitcnt lgkmcnt(0)
	v_cmpx_gt_i32_e64 s4, v0
	s_cbranch_execz .LBB0_2
; %bb.1:
	s_load_b128 s[4:7], s[0:1], 0x0
	v_ashrrev_i32_e32 v1, 31, v0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s4, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v1, vcc_lo
	v_add_co_u32 v4, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s0, v0
	global_load_b32 v2, v[2:3], off
	global_load_b32 v3, v[4:5], off
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v2, v3, v2
	global_store_b32 v[0:1], v2, off
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17vectorAddBaseLinePKiS0_Pii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 6
		.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	_Z17vectorAddBaseLinePKiS0_Pii, .Lfunc_end0-_Z17vectorAddBaseLinePKiS0_Pii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 232
; NumSgprs: 18
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 6
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.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:
      - .actual_access:  read_only
        .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .actual_access:  read_only
        .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .actual_access:  write_only
        .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .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:           _Z17vectorAddBaseLinePKiS0_Pii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z17vectorAddBaseLinePKiS0_Pii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
