#include <fstream>
#include "native_kernel.h"
int main(int argc, char **argv)
{
  std::ifstream values;
  values.open("./values.txt");
  int D,N;
  int niter = atoi(argv[1]);
  float learn = atof(argv[2]);
  float *xvalues,*y_actual,*real_weights,*weights;
  values>>D>>N;
  printf("N = %d    D  = %d",N,D);
  xvalues = new float [D*N];
  for(int i = 0 ; i<N;i++)
  {
    for (int j = 0; j<D;j++)
    {
      values>>xvalues[j*N + i];
    }
  }
  y_actual = new float[N];
  for(int i = 0; i<N;i++)
  {
    values>>y_actual[i];
  }
  real_weights = new float[D];
  for(int i = 0; i<D;i++)
  {
    values>>real_weights[i];
  }
  weights = new float[D];
  for(int i = 0; i<D;i++)
  {
    values>>weights[i];
  }
  // printf("Done Reading Data\n");
  float *d_xval, *d_yval,* d_weights, *d_error,*h_error,*tempa,*d_gradient;
  cudaMalloc((void**)&d_xval,sizeof(float)*D*N);
  cudaMalloc((void**)&tempa,sizeof(float)*D*N);
  cudaMalloc((void**)&d_weights,sizeof(float)*D);
  cudaMalloc((void**)&d_gradient,sizeof(float)*D);
  cudaMalloc((void**)&d_yval,sizeof(float)*N);
  cudaMalloc((void**)&d_error,sizeof(float)*N);
  cudaMemcpy(d_xval,xvalues,sizeof(float)*D*N,cudaMemcpyHostToDevice);
  cudaMemcpy(d_yval,(void *)y_actual,sizeof(float)*N,cudaMemcpyHostToDevice);
  cudaMemcpy(d_weights,(void *)weights,sizeof(float)*D,cudaMemcpyHostToDevice);
  int count = 0;
  // cudaEvent_t start, stop;
  // cudaEventCreate(&start);
  // cudaEventCreate(&stop);
  // cudaEventRecord(start);
  // printf("Loop Start\n");
  while(count<niter)
  {
    cudaMemcpyToSymbol(c_weights,weights,sizeof(float)*D,0,cudaMemcpyHostToDevice);
    getdotError<<<iDivUp(N,1024),1024>>>(N,D,d_xval,d_yval,d_error);
    // multiply<<<iDivUp(N*D,1024),1024>>>(N,D,d_xval,d_error,tempa);
    for(int i = 0; i<D;i++)
      better_reduce_kernel<256><<<20,256,256*sizeof(float)>>>(d_xval + i*N,d_error,d_gradient+i,N,D);
    // cudaMemcpy(gradient,d_weights,sizeof(float)*D,cudaMemcpyDeviceToHost);
    update_weights<<<iDivUp(D,128),128>>> (d_weights,d_gradient,learn);
    printf("Error = \n");
    count++;
  }
  // cudaEventRecord(stop);
  // cudaEventSynchronize(stop);
  // float time_in_ms;
  // cudaEventElapsedTime(&time_in_ms,start,stop);
  h_error = new float[N];
  cudaMemcpy(h_error,d_error,sizeof(float)*N,cudaMemcpyDeviceToHost);
  // for(int i = 0; i<100;i++)
  // {
  //   printf("%f ",h_error[i]);
  //   if(i%10==0)
  //     printf("\n");
  // }
  // printf("Compute Time = %f\n",time_in_ms);
  // sdiff = sqrt(sdiff/D);
  // printf("Final Error = %f\n",sdiff);

}

	.file	"tmpxft_00242df8_00000000-6_native.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3772:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3772:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.type	_ZL57__device_stub__Z20better_reduce_kernelILj256EEvPfS0_S0_jjPfS_S_jj, @function
_ZL57__device_stub__Z20better_reduce_kernelILj256EEvPfS0_S0_jjPfS_S_jj:
.LFB3800:
	.cfi_startproc
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	40(%rsp), %rcx
	movl	%r8d, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 176
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L2:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3800:
	.size	_ZL57__device_stub__Z20better_reduce_kernelILj256EEvPfS0_S0_jjPfS_S_jj, .-_ZL57__device_stub__Z20better_reduce_kernelILj256EEvPfS0_S0_jjPfS_S_jj
	.section	.text._Z20better_reduce_kernelILj256EEvPfS0_S0_jj,"axG",@progbits,_Z20better_reduce_kernelILj256EEvPfS0_S0_jj,comdat
	.weak	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj
	.type	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj, @function
_Z20better_reduce_kernelILj256EEvPfS0_S0_jj:
.LFB4129:
	.cfi_startproc
	endbr64
	jmp	_ZL57__device_stub__Z20better_reduce_kernelILj256EEvPfS0_S0_jjPfS_S_jj
	.cfi_endproc
.LFE4129:
	.size	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj, .-_Z20better_reduce_kernelILj256EEvPfS0_S0_jj
	.text
	.globl	_Z6iDivUpii
	.type	_Z6iDivUpii, @function
_Z6iDivUpii:
.LFB3766:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	cltd
	idivl	%esi
	cmpl	$1, %edx
	sbbl	$-1, %eax
	ret
	.cfi_endproc
.LFE3766:
	.size	_Z6iDivUpii, .-_Z6iDivUpii
	.globl	_Z37__device_stub__Z11getdotErroriiPfS_S_iiPfS_S_
	.type	_Z37__device_stub__Z11getdotErroriiPfS_S_iiPfS_S_, @function
_Z37__device_stub__Z11getdotErroriiPfS_S_iiPfS_S_:
.LFB3794:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movl	%edi, 28(%rsp)
	leaq	48(%rsp), %rdi
	movl	%esi, 24(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 16(%rsp)
	leaq	32(%rsp), %rdx
	movq	%rcx, 8(%rsp)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	24(%rsp), %rax
	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, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L12
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z11getdotErroriiPfS_S_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 176
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L12:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3794:
	.size	_Z37__device_stub__Z11getdotErroriiPfS_S_iiPfS_S_, .-_Z37__device_stub__Z11getdotErroriiPfS_S_iiPfS_S_
	.globl	_Z11getdotErroriiPfS_S_
	.type	_Z11getdotErroriiPfS_S_, @function
_Z11getdotErroriiPfS_S_:
.LFB3795:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z11getdotErroriiPfS_S_iiPfS_S_
	.cfi_endproc
.LFE3795:
	.size	_Z11getdotErroriiPfS_S_, .-_Z11getdotErroriiPfS_S_
	.globl	_Z37__device_stub__Z14update_weightsPfS_fPfS_f
	.type	_Z37__device_stub__Z14update_weightsPfS_fPfS_f, @function
_Z37__device_stub__Z14update_weightsPfS_fPfS_f:
.LFB3796:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	32(%rsp), %rdx
	movq	%rsi, 16(%rsp)
	leaq	48(%rsp), %rdi
	leaq	60(%rsp), %rsi
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L17
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z14update_weightsPfS_f(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L17:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3796:
	.size	_Z37__device_stub__Z14update_weightsPfS_fPfS_f, .-_Z37__device_stub__Z14update_weightsPfS_fPfS_f
	.globl	_Z14update_weightsPfS_f
	.type	_Z14update_weightsPfS_f, @function
_Z14update_weightsPfS_f:
.LFB3797:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z14update_weightsPfS_fPfS_f
	.cfi_endproc
.LFE3797:
	.size	_Z14update_weightsPfS_f, .-_Z14update_weightsPfS_f
	.globl	_Z39__device_stub__Z12updateWeightiifPfS_S_iifPfS_S_
	.type	_Z39__device_stub__Z12updateWeightiifPfS_S_iifPfS_S_, @function
_Z39__device_stub__Z12updateWeightiifPfS_S_iifPfS_S_:
.LFB3798:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 44(%rsp)
	leaq	72(%rsp), %rdi
	movl	%esi, 40(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movss	%xmm0, 36(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L22
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z12updateWeightiifPfS_S_(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L22:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3798:
	.size	_Z39__device_stub__Z12updateWeightiifPfS_S_iifPfS_S_, .-_Z39__device_stub__Z12updateWeightiifPfS_S_iifPfS_S_
	.globl	_Z12updateWeightiifPfS_S_
	.type	_Z12updateWeightiifPfS_S_, @function
_Z12updateWeightiifPfS_S_:
.LFB3799:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z12updateWeightiifPfS_S_iifPfS_S_
	.cfi_endproc
.LFE3799:
	.size	_Z12updateWeightiifPfS_S_, .-_Z12updateWeightiifPfS_S_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z20better_reduce_kernelILj256EEvPfS0_S0_jj"
.LC1:
	.string	"_Z12updateWeightiifPfS_S_"
.LC2:
	.string	"_Z14update_weightsPfS_f"
.LC3:
	.string	"_Z11getdotErroriiPfS_S_"
.LC4:
	.string	"c_weights"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3803:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z12updateWeightiifPfS_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC2(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z14update_weightsPfS_f(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC3(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z11getdotErroriiPfS_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC4(%rip), %rdx
	movl	$40000, %r9d
	leaq	_ZL9c_weights(%rip), %rsi
	pushq	$1
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	call	__cudaRegisterVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3803:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata.str1.1
.LC5:
	.string	"./values.txt"
.LC6:
	.string	"N = %d    D  = %d"
.LC7:
	.string	"Error = \n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3769:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3769
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$632, %rsp
	.cfi_def_cfa_offset 688
	movq	%fs:40, %rax
	movq	%rax, 616(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
.LEHB0:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE0:
	movq	(%rsp), %rdi
	movl	$8, %edx
	leaq	.LC5(%rip), %rsi
.LEHB1:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	movq	8(%rbx), %rdi
	call	atoi@PLT
	movq	16(%rbx), %rdi
	movl	%eax, %r12d
	call	atof@PLT
	movq	(%rsp), %rdi
	leaq	16(%rsp), %rsi
	cvtsd2ss	%xmm0, %xmm1
	movss	%xmm1, 12(%rsp)
	call	_ZNSirsERi@PLT
	movq	%rax, %rdi
	leaq	20(%rsp), %rsi
	call	_ZNSirsERi@PLT
	movl	16(%rsp), %ecx
	movl	20(%rsp), %edx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC6(%rip), %rsi
	call	__printf_chk@PLT
	movabsq	$2305843009213693950, %rax
	movl	16(%rsp), %edi
	imull	20(%rsp), %edi
	movslq	%edi, %rdi
	cmpq	%rdi, %rax
	jb	.L30
	salq	$2, %rdi
	call	_Znam@PLT
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	jmp	.L31
.L30:
	movq	616(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L66
	call	__cxa_throw_bad_array_new_length@PLT
.L33:
	imull	%r13d, %eax
	movq	(%rsp), %rdi
	addl	%ebx, %eax
	cltq
	leaq	0(%rbp,%rax,4), %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	incl	%r13d
.L34:
	movl	20(%rsp), %eax
	cmpl	%r13d, 16(%rsp)
	jg	.L33
	incl	%ebx
.L31:
	movslq	20(%rsp), %rdi
	cmpl	%ebx, %edi
	jle	.L69
	xorl	%r13d, %r13d
	jmp	.L34
.L69:
	movabsq	$2305843009213693950, %rax
	cmpq	%rdi, %rax
	jb	.L35
	salq	$2, %rdi
	call	_Znam@PLT
	movq	%rax, %rbx
	movq	%rax, %r14
	xorl	%r13d, %r13d
	jmp	.L36
.L35:
	movq	616(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L66
	call	__cxa_throw_bad_array_new_length@PLT
.L38:
	movq	(%rsp), %rdi
	movq	%r14, %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	incl	%r13d
	addq	$4, %r14
.L36:
	cmpl	%r13d, 20(%rsp)
	jg	.L38
	movabsq	$2305843009213693950, %rax
	movslq	16(%rsp), %rdi
	cmpq	%rdi, %rax
	jb	.L39
	salq	$2, %rdi
	call	_Znam@PLT
	movq	%rax, %r13
	xorl	%r14d, %r14d
	jmp	.L40
.L39:
	movq	616(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L66
	call	__cxa_throw_bad_array_new_length@PLT
.L42:
	movq	(%rsp), %rdi
	movq	%r13, %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	incl	%r14d
	addq	$4, %r13
.L40:
	movslq	16(%rsp), %rdi
	cmpl	%r14d, %edi
	jg	.L42
	movabsq	$2305843009213693950, %rax
	cmpq	%rdi, %rax
	jb	.L43
	salq	$2, %rdi
	call	_Znam@PLT
	movq	%rax, %r15
	movq	%rax, %r14
	xorl	%r13d, %r13d
	jmp	.L44
.L43:
	movq	616(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L66
	call	__cxa_throw_bad_array_new_length@PLT
.L46:
	movq	(%rsp), %rdi
	movq	%r14, %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	incl	%r13d
	addq	$4, %r14
.L44:
	movslq	16(%rsp), %rax
	cmpl	%r13d, %eax
	jg	.L46
	movslq	20(%rsp), %rsi
	leaq	24(%rsp), %rdi
	imulq	%rax, %rsi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	16(%rsp), %rsi
	movslq	20(%rsp), %rax
	leaq	56(%rsp), %rdi
	imulq	%rax, %rsi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	16(%rsp), %rsi
	leaq	40(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	16(%rsp), %rsi
	leaq	64(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	20(%rsp), %rsi
	leaq	32(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	20(%rsp), %rsi
	leaq	48(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	16(%rsp), %rdx
	movslq	20(%rsp), %rax
	movl	$1, %ecx
	movq	%rbp, %rsi
	movq	24(%rsp), %rdi
	imulq	%rax, %rdx
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movslq	20(%rsp), %rdx
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movslq	16(%rsp), %rdx
	movq	40(%rsp), %rdi
	movl	$1, %ecx
	movq	%r15, %rsi
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	xorl	%ebp, %ebp
	leaq	_ZL9c_weights(%rip), %r14
.L47:
	cmpl	%r12d, %ebp
	jge	.L70
	movslq	16(%rsp), %rdx
	movl	$1, %r8d
	xorl	%ecx, %ecx
	movq	%r15, %rsi
	movq	%r14, %rdi
	salq	$2, %rdx
	call	cudaMemcpyToSymbol@PLT
	movl	20(%rsp), %edi
	movl	$4194305, %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$10, %rcx
	movl	$1024, %esi
	movl	$1, 92(%rsp)
	movq	%rcx, 84(%rsp)
	call	_Z6iDivUpii
	movq	%rcx, %rdx
	movl	$1, %ecx
	movl	%eax, 72(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 76(%rsp)
	movq	72(%rsp), %rdi
	movl	80(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	movl	16(%rsp), %esi
	testl	%eax, %eax
	jne	.L48
	movq	48(%rsp), %r8
	movq	32(%rsp), %rcx
	movq	24(%rsp), %rdx
	movl	20(%rsp), %edi
	call	_Z37__device_stub__Z11getdotErroriiPfS_S_iiPfS_S_
.L48:
	movabsq	$4294967552, %r13
	xorl	%ebx, %ebx
.L49:
	movl	16(%rsp), %edi
	cmpl	%ebx, %edi
	jle	.L71
	movl	$1073741829, %edi
	xorl	%r9d, %r9d
	movq	%r13, %rdx
	movl	$1, %ecx
	salq	$2, %rdi
	movl	$1024, %r8d
	movl	$1, %esi
	movq	%r13, 84(%rsp)
	movl	$1, 92(%rsp)
	movq	%rdi, 72(%rsp)
	movl	$1, 80(%rsp)
	call	__cudaPushCallConfiguration@PLT
	movl	16(%rsp), %r8d
	testl	%eax, %eax
	jne	.L50
	movq	64(%rsp), %rax
	movl	20(%rsp), %ecx
	movq	24(%rsp), %rsi
	leaq	(%rax,%rbx,4), %rdx
	movl	%ecx, %eax
	imull	%ebx, %eax
	cltq
	leaq	(%rsi,%rax,4), %rdi
	movq	48(%rsp), %rsi
	call	_ZL57__device_stub__Z20better_reduce_kernelILj256EEvPfS0_S0_jjPfS_S_jj
.L50:
	incq	%rbx
	jmp	.L49
.L71:
	movl	$33554433, %ecx
	movl	$128, %esi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$7, %rcx
	movl	$1, 92(%rsp)
	movq	%rcx, 84(%rsp)
	call	_Z6iDivUpii
	movq	%rcx, %rdx
	movl	$1, %ecx
	movl	%eax, 72(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 76(%rsp)
	movq	72(%rsp), %rdi
	movl	80(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L52
	movss	12(%rsp), %xmm0
	movq	64(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z37__device_stub__Z14update_weightsPfS_fPfS_f
.L52:
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	incl	%ebp
	jmp	.L47
.L70:
	movabsq	$2305843009213693950, %rax
	movslq	20(%rsp), %rdi
	cmpq	%rdi, %rax
	jb	.L54
	salq	$2, %rdi
	call	_Znam@PLT
	movslq	20(%rsp), %rdx
	movq	48(%rsp), %rsi
	movq	%rax, %rdi
	movl	$2, %ecx
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	jmp	.L72
.L54:
	movq	616(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L66
	call	__cxa_throw_bad_array_new_length@PLT
.LEHE1:
.L72:
	leaq	96(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	616(%rsp), %rax
	subq	%fs:40, %rax
	je	.L59
	jmp	.L66
.L63:
	endbr64
	movq	%rax, %rbx
.L57:
	movq	(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	616(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L66
	movq	%rbx, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L66:
	call	__stack_chk_fail@PLT
.L59:
	addq	$632, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.LFE3769:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3769:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3769-.LLSDACSB3769
.LLSDACSB3769:
	.uleb128 .LEHB0-.LFB3769
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3769
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L63-.LFB3769
	.uleb128 0
	.uleb128 .LEHB2-.LFB3769
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE3769:
	.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
	.local	_ZL9c_weights
	.comm	_ZL9c_weights,40000,32
	.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 <fstream>
#include "native_kernel.h"
int main(int argc, char **argv)
{
  std::ifstream values;
  values.open("./values.txt");
  int D,N;
  int niter = atoi(argv[1]);
  float learn = atof(argv[2]);
  float *xvalues,*y_actual,*real_weights,*weights;
  values>>D>>N;
  printf("N = %d    D  = %d",N,D);
  xvalues = new float [D*N];
  for(int i = 0 ; i<N;i++)
  {
    for (int j = 0; j<D;j++)
    {
      values>>xvalues[j*N + i];
    }
  }
  y_actual = new float[N];
  for(int i = 0; i<N;i++)
  {
    values>>y_actual[i];
  }
  real_weights = new float[D];
  for(int i = 0; i<D;i++)
  {
    values>>real_weights[i];
  }
  weights = new float[D];
  for(int i = 0; i<D;i++)
  {
    values>>weights[i];
  }
  // printf("Done Reading Data\n");
  float *d_xval, *d_yval,* d_weights, *d_error,*h_error,*tempa,*d_gradient;
  hipMalloc((void**)&d_xval,sizeof(float)*D*N);
  hipMalloc((void**)&tempa,sizeof(float)*D*N);
  hipMalloc((void**)&d_weights,sizeof(float)*D);
  hipMalloc((void**)&d_gradient,sizeof(float)*D);
  hipMalloc((void**)&d_yval,sizeof(float)*N);
  hipMalloc((void**)&d_error,sizeof(float)*N);
  hipMemcpy(d_xval,xvalues,sizeof(float)*D*N,hipMemcpyHostToDevice);
  hipMemcpy(d_yval,(void *)y_actual,sizeof(float)*N,hipMemcpyHostToDevice);
  hipMemcpy(d_weights,(void *)weights,sizeof(float)*D,hipMemcpyHostToDevice);
  int count = 0;
  // cudaEvent_t start, stop;
  // cudaEventCreate(&start);
  // cudaEventCreate(&stop);
  // cudaEventRecord(start);
  // printf("Loop Start\n");
  while(count<niter)
  {
    hipMemcpyToSymbol(HIP_SYMBOL(c_weights),weights,sizeof(float)*D,0,hipMemcpyHostToDevice);
    getdotError<<<iDivUp(N,1024),1024>>>(N,D,d_xval,d_yval,d_error);
    // multiply<<<iDivUp(N*D,1024),1024>>>(N,D,d_xval,d_error,tempa);
    for(int i = 0; i<D;i++)
      better_reduce_kernel<256><<<20,256,256*sizeof(float)>>>(d_xval + i*N,d_error,d_gradient+i,N,D);
    // cudaMemcpy(gradient,d_weights,sizeof(float)*D,cudaMemcpyDeviceToHost);
    update_weights<<<iDivUp(D,128),128>>> (d_weights,d_gradient,learn);
    printf("Error = \n");
    count++;
  }
  // cudaEventRecord(stop);
  // cudaEventSynchronize(stop);
  // float time_in_ms;
  // cudaEventElapsedTime(&time_in_ms,start,stop);
  h_error = new float[N];
  hipMemcpy(h_error,d_error,sizeof(float)*N,hipMemcpyDeviceToHost);
  // for(int i = 0; i<100;i++)
  // {
  //   printf("%f ",h_error[i]);
  //   if(i%10==0)
  //     printf("\n");
  // }
  // printf("Compute Time = %f\n",time_in_ms);
  // sdiff = sqrt(sdiff/D);
  // printf("Final Error = %f\n",sdiff);

}

	.text
	.file	"native.hip"
	.globl	_Z6iDivUpii                     # -- Begin function _Z6iDivUpii
	.type	_Z6iDivUpii,@function
_Z6iDivUpii:                            # @_Z6iDivUpii
	.cfi_startproc
# %bb.0:
	movl	%edi, %eax
	cltd
	idivl	%esi
	cmpl	$1, %edx
	sbbl	$-1, %eax
	retq
.Lfunc_end0:
	.size	_Z6iDivUpii, .Lfunc_end0-_Z6iDivUpii
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__getdotErroriiPfS_S_ # -- Begin function _Z26__device_stub__getdotErroriiPfS_S_
	.type	_Z26__device_stub__getdotErroriiPfS_S_,@function
_Z26__device_stub__getdotErroriiPfS_S_: # @_Z26__device_stub__getdotErroriiPfS_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$128, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	4(%rsp), %rax
	movl	%edi, (%rax)
	movq	%rsp, %rdi
	movl	%esi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%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	$_Z11getdotErroriiPfS_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z26__device_stub__getdotErroriiPfS_S_, .Lfunc_end1-_Z26__device_stub__getdotErroriiPfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z29__device_stub__update_weightsPfS_f # -- Begin function _Z29__device_stub__update_weightsPfS_f
	.type	_Z29__device_stub__update_weightsPfS_f,@function
_Z29__device_stub__update_weightsPfS_f: # @_Z29__device_stub__update_weightsPfS_f
	.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), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rdx
	movss	%xmm0, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rdx, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z14update_weightsPfS_f, %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	_Z29__device_stub__update_weightsPfS_f, .Lfunc_end2-_Z29__device_stub__update_weightsPfS_f
	.cfi_endproc
                                        # -- End function
	.globl	_Z27__device_stub__updateWeightiifPfS_S_ # -- Begin function _Z27__device_stub__updateWeightiifPfS_S_
	.type	_Z27__device_stub__updateWeightiifPfS_S_,@function
_Z27__device_stub__updateWeightiifPfS_S_: # @_Z27__device_stub__updateWeightiifPfS_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	20(%rsp), %rax
	movl	%edi, (%rax)
	leaq	16(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	12(%rsp), %rsi
	movss	%xmm0, (%rsi)
	leaq	56(%rsp), %r9
	movq	%rdx, (%r9)
	leaq	48(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%r9, 24(%rbx)
	movq	%rdx, 32(%rbx)
	movq	%rcx, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z12updateWeightiifPfS_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z27__device_stub__updateWeightiifPfS_S_, .Lfunc_end3-_Z27__device_stub__updateWeightiifPfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function 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	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$616, %rsp                      # imm = 0x268
	.cfi_def_cfa_offset 672
	.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	%rsi, %r14
	leaq	96(%rsp), %rbx
	movq	%rbx, %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev
.Ltmp0:
	movl	$.L.str, %esi
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.1:
	movq	8(%r14), %rdi
	callq	atoi
	movl	%eax, 20(%rsp)                  # 4-byte Spill
	movq	16(%r14), %rdi
	callq	atof
	movsd	%xmm0, 80(%rsp)                 # 8-byte Spill
.Ltmp3:
	leaq	96(%rsp), %rdi
	leaq	12(%rsp), %rsi
	callq	_ZNSirsERi
.Ltmp4:
# %bb.2:
.Ltmp5:
	leaq	16(%rsp), %rsi
	movq	%rax, %rdi
	callq	_ZNSirsERi
.Ltmp6:
# %bb.3:
	movl	16(%rsp), %esi
	movl	12(%rsp), %edx
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	movl	12(%rsp), %ebx
	movl	16(%rsp), %ebp
	movl	%ebp, %eax
	imull	%ebx, %eax
	cltq
	leaq	(,%rax,4), %rcx
	testl	%eax, %eax
	movq	$-1, %rdi
	cmovnsq	%rcx, %rdi
.Ltmp7:
	callq	_Znam
.Ltmp8:
# %bb.4:                                # %.preheader90
	movq	%rax, %r15
	testl	%ebp, %ebp
	jle	.LBB4_12
# %bb.5:                                # %.preheader89.preheader
	xorl	%r12d, %r12d
	leaq	96(%rsp), %r14
.LBB4_6:                                # %.preheader89
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_8 Depth 2
	testl	%ebx, %ebx
	jle	.LBB4_11
# %bb.7:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB4_6 Depth=1
	xorl	%ebp, %ebp
.LBB4_8:                                # %.lr.ph
                                        #   Parent Loop BB4_6 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	16(%rsp), %eax
	imull	%ebp, %eax
	addl	%r12d, %eax
	cltq
	leaq	(%r15,%rax,4), %rsi
.Ltmp9:
	movq	%r14, %rdi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp10:
# %bb.9:                                # %_ZNSirsERf.exit
                                        #   in Loop: Header=BB4_8 Depth=2
	incl	%ebp
	movl	12(%rsp), %ebx
	cmpl	%ebx, %ebp
	jl	.LBB4_8
# %bb.10:                               # %._crit_edge.loopexit
                                        #   in Loop: Header=BB4_6 Depth=1
	movl	16(%rsp), %ebp
.LBB4_11:                               # %._crit_edge
                                        #   in Loop: Header=BB4_6 Depth=1
	incl	%r12d
	cmpl	%ebp, %r12d
	jl	.LBB4_6
.LBB4_12:                               # %._crit_edge100
	movslq	%ebp, %rax
	leaq	(,%rax,4), %rcx
	testl	%eax, %eax
	movq	$-1, %rdi
	cmovnsq	%rcx, %rdi
.Ltmp12:
	callq	_Znam
	movq	%rax, 24(%rsp)                  # 8-byte Spill
.Ltmp13:
# %bb.13:                               # %.preheader88
	testl	%ebp, %ebp
	jle	.LBB4_18
# %bb.14:                               # %.lr.ph102.preheader
	xorl	%ebx, %ebx
	leaq	96(%rsp), %r14
	movq	24(%rsp), %r13                  # 8-byte Reload
.LBB4_15:                               # %.lr.ph102
                                        # =>This Inner Loop Header: Depth=1
.Ltmp14:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp15:
# %bb.16:                               # %_ZNSirsERf.exit67
                                        #   in Loop: Header=BB4_15 Depth=1
	incq	%rbx
	movslq	16(%rsp), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	.LBB4_15
# %bb.17:                               # %._crit_edge103.loopexit
	movl	12(%rsp), %ebx
.LBB4_18:                               # %._crit_edge103
	movslq	%ebx, %rax
	leaq	(,%rax,4), %r12
	testl	%eax, %eax
	movq	$-1, %rdi
	cmovnsq	%r12, %rdi
.Ltmp17:
	callq	_Znam
.Ltmp18:
# %bb.19:                               # %.preheader87
	testl	%ebx, %ebx
	jle	.LBB4_24
# %bb.20:                               # %.lr.ph105.preheader
	movq	%rax, %r14
	xorl	%ebp, %ebp
	leaq	96(%rsp), %r13
.LBB4_21:                               # %.lr.ph105
                                        # =>This Inner Loop Header: Depth=1
.Ltmp19:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp20:
# %bb.22:                               # %_ZNSirsERf.exit68
                                        #   in Loop: Header=BB4_21 Depth=1
	incq	%rbp
	movl	12(%rsp), %ebx
	movslq	%ebx, %r12
	addq	$4, %r14
	cmpq	%r12, %rbp
	jl	.LBB4_21
# %bb.23:                               # %._crit_edge106.loopexit
	shlq	$2, %r12
.LBB4_24:                               # %._crit_edge106
	testl	%ebx, %ebx
	movq	$-1, %rdi
	cmovnsq	%r12, %rdi
.Ltmp22:
	callq	_Znam
	movq	%rax, 32(%rsp)                  # 8-byte Spill
.Ltmp23:
# %bb.25:                               # %.preheader86
	testl	%ebx, %ebx
	jle	.LBB4_30
# %bb.26:                               # %.lr.ph109.preheader
	xorl	%ebx, %ebx
	leaq	96(%rsp), %r13
	movq	32(%rsp), %rbp                  # 8-byte Reload
.LBB4_27:                               # %.lr.ph109
                                        # =>This Inner Loop Header: Depth=1
.Ltmp25:
	movq	%r13, %rdi
	movq	%rbp, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp26:
# %bb.28:                               # %_ZNSirsERf.exit69
                                        #   in Loop: Header=BB4_27 Depth=1
	incq	%rbx
	movslq	12(%rsp), %r12
	addq	$4, %rbp
	cmpq	%r12, %rbx
	jl	.LBB4_27
# %bb.29:                               # %._crit_edge110.loopexit
	shlq	$2, %r12
.LBB4_30:                               # %._crit_edge110
	movslq	16(%rsp), %rsi
	imulq	%r12, %rsi
.Ltmp28:
	leaq	48(%rsp), %rdi
	callq	hipMalloc
.Ltmp29:
# %bb.31:
	movslq	12(%rsp), %rax
	movslq	16(%rsp), %rsi
	imulq	%rax, %rsi
	shlq	$2, %rsi
.Ltmp30:
	leaq	88(%rsp), %rdi
	callq	hipMalloc
.Ltmp31:
# %bb.32:
	movslq	12(%rsp), %rsi
	shlq	$2, %rsi
.Ltmp32:
	leaq	64(%rsp), %rdi
	callq	hipMalloc
.Ltmp33:
# %bb.33:
	movslq	12(%rsp), %rsi
	shlq	$2, %rsi
.Ltmp34:
	leaq	56(%rsp), %rdi
	callq	hipMalloc
.Ltmp35:
# %bb.34:
	movslq	16(%rsp), %rsi
	shlq	$2, %rsi
.Ltmp36:
	leaq	72(%rsp), %rdi
	callq	hipMalloc
.Ltmp37:
# %bb.35:
	movslq	16(%rsp), %rsi
	shlq	$2, %rsi
.Ltmp38:
	leaq	40(%rsp), %rdi
	callq	hipMalloc
.Ltmp39:
# %bb.36:
	movq	48(%rsp), %rdi
	movslq	12(%rsp), %rax
	movslq	16(%rsp), %rdx
	imulq	%rax, %rdx
	shlq	$2, %rdx
.Ltmp40:
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp41:
# %bb.37:
	movq	72(%rsp), %rdi
	movslq	16(%rsp), %rdx
	shlq	$2, %rdx
.Ltmp42:
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp43:
# %bb.38:
	movq	64(%rsp), %rdi
	movslq	12(%rsp), %rdx
	shlq	$2, %rdx
.Ltmp44:
	movq	32(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp45:
# %bb.39:                               # %.preheader
	cmpl	$0, 20(%rsp)                    # 4-byte Folded Reload
	jle	.LBB4_55
# %bb.40:                               # %.lr.ph118.preheader
	cvtsd2ss	80(%rsp), %xmm0                 # 8-byte Folded Reload
	movss	%xmm0, 24(%rsp)                 # 4-byte Spill
	xorl	%ebx, %ebx
	movabsq	$4294967296, %rbp               # imm = 0x100000000
	movabsq	$4294967316, %r12               # imm = 0x100000014
	movabsq	$4294967552, %r13               # imm = 0x100000100
.LBB4_41:                               # %.lr.ph118
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_47 Depth 2
	movslq	12(%rsp), %rdx
	shlq	$2, %rdx
.Ltmp47:
	movl	$c_weights, %edi
	movq	32(%rsp), %rsi                  # 8-byte Reload
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	hipMemcpyToSymbol
.Ltmp48:
# %bb.42:                               # %_Z17hipMemcpyToSymbolIA10000_fE10hipError_tRKT_PKvmm13hipMemcpyKind.exit
                                        #   in Loop: Header=BB4_41 Depth=1
	movl	16(%rsp), %eax
	movl	%eax, %ecx
	movl	$1023, %edx                     # imm = 0x3FF
	andl	%edx, %ecx
	leal	(%rax,%rdx), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$10, %edi
	cmpl	$1, %ecx
	sbbl	$-1, %edi
	orq	%rbp, %rdi
.Ltmp49:
	movl	$1, %esi
	movabsq	$4294968320, %rdx               # imm = 0x100000400
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp50:
# %bb.43:                               #   in Loop: Header=BB4_41 Depth=1
	testl	%eax, %eax
	jne	.LBB4_45
# %bb.44:                               #   in Loop: Header=BB4_41 Depth=1
	movl	16(%rsp), %edi
	movl	12(%rsp), %esi
	movq	48(%rsp), %rdx
	movq	72(%rsp), %rcx
	movq	40(%rsp), %r8
.Ltmp51:
	callq	_Z26__device_stub__getdotErroriiPfS_S_
.Ltmp52:
.LBB4_45:                               #   in Loop: Header=BB4_41 Depth=1
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.LBB4_51
# %bb.46:                               # %.lr.ph114.preheader
                                        #   in Loop: Header=BB4_41 Depth=1
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
.LBB4_47:                               # %.lr.ph114
                                        #   Parent Loop BB4_41 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
.Ltmp53:
	movl	$1024, %r8d                     # imm = 0x400
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp54:
# %bb.48:                               #   in Loop: Header=BB4_47 Depth=2
	testl	%eax, %eax
	jne	.LBB4_50
# %bb.49:                               #   in Loop: Header=BB4_47 Depth=2
	movl	16(%rsp), %ecx
	movl	%r15d, %eax
	imull	%ecx, %eax
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	48(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	56(%rsp), %rdx
	addq	%r14, %rdx
	movl	12(%rsp), %r8d
.Ltmp55:
	callq	_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj
.Ltmp56:
.LBB4_50:                               #   in Loop: Header=BB4_47 Depth=2
	incq	%r15
	movslq	12(%rsp), %rax
	addq	$4, %r14
	cmpq	%rax, %r15
	jl	.LBB4_47
.LBB4_51:                               # %._crit_edge115
                                        #   in Loop: Header=BB4_41 Depth=1
	movl	%eax, %ecx
	andl	$127, %ecx
	leal	127(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$7, %edi
	cmpl	$1, %ecx
	sbbl	$-1, %edi
	orq	%rbp, %rdi
.Ltmp58:
	movl	$1, %esi
	movabsq	$4294967424, %rdx               # imm = 0x100000080
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp59:
# %bb.52:                               #   in Loop: Header=BB4_41 Depth=1
	testl	%eax, %eax
	jne	.LBB4_54
# %bb.53:                               #   in Loop: Header=BB4_41 Depth=1
	movq	64(%rsp), %rdi
	movq	56(%rsp), %rsi
.Ltmp60:
	movss	24(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z29__device_stub__update_weightsPfS_f
.Ltmp61:
.LBB4_54:                               #   in Loop: Header=BB4_41 Depth=1
	movl	$.Lstr, %edi
	callq	puts@PLT
	incl	%ebx
	cmpl	20(%rsp), %ebx                  # 4-byte Folded Reload
	jne	.LBB4_41
.LBB4_55:                               # %._crit_edge119
	movslq	16(%rsp), %rax
	leaq	(,%rax,4), %rbx
	testq	%rax, %rax
	movq	$-1, %rdi
	cmovnsq	%rbx, %rdi
.Ltmp63:
	callq	_Znam
.Ltmp64:
# %bb.56:
	movq	40(%rsp), %rsi
.Ltmp65:
	movq	%rax, %rdi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp66:
# %bb.57:
	leaq	96(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	xorl	%eax, %eax
	addq	$616, %rsp                      # imm = 0x268
	.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
.LBB4_58:
	.cfi_def_cfa_offset 672
.Ltmp2:
	jmp	.LBB4_67
.LBB4_64:                               # %.loopexit.split-lp
.Ltmp67:
	jmp	.LBB4_67
.LBB4_59:
.Ltmp24:
	jmp	.LBB4_67
.LBB4_66:
.Ltmp46:
	jmp	.LBB4_67
.LBB4_68:
.Ltmp27:
	jmp	.LBB4_67
.LBB4_62:
.Ltmp21:
	jmp	.LBB4_67
.LBB4_61:
.Ltmp16:
	jmp	.LBB4_67
.LBB4_63:                               # %.loopexit
.Ltmp62:
	jmp	.LBB4_67
.LBB4_60:
.Ltmp11:
	jmp	.LBB4_67
.LBB4_65:
.Ltmp57:
.LBB4_67:
	movq	%rax, %rbx
	leaq	96(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end4:
	.size	main, .Lfunc_end4-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table4:
.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 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.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 3 <<
	.uleb128 .Ltmp8-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp8
	.uleb128 .Ltmp24-.Lfunc_begin0          #     jumps to .Ltmp24
	.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 .Ltmp24-.Lfunc_begin0          #     jumps to .Ltmp24
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp15-.Ltmp14                #   Call between .Ltmp14 and .Ltmp15
	.uleb128 .Ltmp16-.Lfunc_begin0          #     jumps to .Ltmp16
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp18-.Ltmp17                #   Call between .Ltmp17 and .Ltmp18
	.uleb128 .Ltmp24-.Lfunc_begin0          #     jumps to .Ltmp24
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp19-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp20-.Ltmp19                #   Call between .Ltmp19 and .Ltmp20
	.uleb128 .Ltmp21-.Lfunc_begin0          #     jumps to .Ltmp21
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp23-.Ltmp22                #   Call between .Ltmp22 and .Ltmp23
	.uleb128 .Ltmp24-.Lfunc_begin0          #     jumps to .Ltmp24
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp25-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp26-.Ltmp25                #   Call between .Ltmp25 and .Ltmp26
	.uleb128 .Ltmp27-.Lfunc_begin0          #     jumps to .Ltmp27
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp28-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp45-.Ltmp28                #   Call between .Ltmp28 and .Ltmp45
	.uleb128 .Ltmp46-.Lfunc_begin0          #     jumps to .Ltmp46
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp47-.Lfunc_begin0          # >> Call Site 12 <<
	.uleb128 .Ltmp52-.Ltmp47                #   Call between .Ltmp47 and .Ltmp52
	.uleb128 .Ltmp62-.Lfunc_begin0          #     jumps to .Ltmp62
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp53-.Lfunc_begin0          # >> Call Site 13 <<
	.uleb128 .Ltmp56-.Ltmp53                #   Call between .Ltmp53 and .Ltmp56
	.uleb128 .Ltmp57-.Lfunc_begin0          #     jumps to .Ltmp57
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp58-.Lfunc_begin0          # >> Call Site 14 <<
	.uleb128 .Ltmp61-.Ltmp58                #   Call between .Ltmp58 and .Ltmp61
	.uleb128 .Ltmp62-.Lfunc_begin0          #     jumps to .Ltmp62
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp63-.Lfunc_begin0          # >> Call Site 15 <<
	.uleb128 .Ltmp66-.Ltmp63                #   Call between .Ltmp63 and .Ltmp66
	.uleb128 .Ltmp67-.Lfunc_begin0          #     jumps to .Ltmp67
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp66-.Lfunc_begin0          # >> Call Site 16 <<
	.uleb128 .Lfunc_end4-.Ltmp66            #   Call between .Ltmp66 and .Lfunc_end4
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj,"axG",@progbits,_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj,comdat
	.weak	_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj # -- Begin function _Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj
	.type	_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj,@function
_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj: # @_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$128, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	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)
	movq	%rsp, %rcx
	movl	%r8d, (%rcx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%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	$_Z20better_reduce_kernelILj256EEvPfS0_S0_jj, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj, .Lfunc_end5-_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj
	.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:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB6_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB6_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11getdotErroriiPfS_S_, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z14update_weightsPfS_f, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12updateWeightiifPfS_S_, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z20better_reduce_kernelILj256EEvPfS0_S0_jj, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$0, 8(%rsp)
	movl	$1, (%rsp)
	movl	$c_weights, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %ecx
	movl	$40000, %r9d                    # imm = 0x9C40
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	callq	__hipRegisterVar
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end6:
	.size	__hip_module_ctor, .Lfunc_end6-__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	.LBB7_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
.LBB7_2:
	retq
.Lfunc_end7:
	.size	__hip_module_dtor, .Lfunc_end7-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	c_weights,@object               # @c_weights
	.local	c_weights
	.comm	c_weights,40000,16
	.type	_Z11getdotErroriiPfS_S_,@object # @_Z11getdotErroriiPfS_S_
	.section	.rodata,"a",@progbits
	.globl	_Z11getdotErroriiPfS_S_
	.p2align	3, 0x0
_Z11getdotErroriiPfS_S_:
	.quad	_Z26__device_stub__getdotErroriiPfS_S_
	.size	_Z11getdotErroriiPfS_S_, 8

	.type	_Z14update_weightsPfS_f,@object # @_Z14update_weightsPfS_f
	.globl	_Z14update_weightsPfS_f
	.p2align	3, 0x0
_Z14update_weightsPfS_f:
	.quad	_Z29__device_stub__update_weightsPfS_f
	.size	_Z14update_weightsPfS_f, 8

	.type	_Z12updateWeightiifPfS_S_,@object # @_Z12updateWeightiifPfS_S_
	.globl	_Z12updateWeightiifPfS_S_
	.p2align	3, 0x0
_Z12updateWeightiifPfS_S_:
	.quad	_Z27__device_stub__updateWeightiifPfS_S_
	.size	_Z12updateWeightiifPfS_S_, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"./values.txt"
	.size	.L.str, 13

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"N = %d    D  = %d"
	.size	.L.str.1, 18

	.type	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj,@object # @_Z20better_reduce_kernelILj256EEvPfS0_S0_jj
	.section	.rodata._Z20better_reduce_kernelILj256EEvPfS0_S0_jj,"aG",@progbits,_Z20better_reduce_kernelILj256EEvPfS0_S0_jj,comdat
	.weak	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj
	.p2align	3, 0x0
_Z20better_reduce_kernelILj256EEvPfS0_S0_jj:
	.quad	_Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj
	.size	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj, 8

	.type	.L__unnamed_1,@object           # @0
	.section	.rodata.str1.1,"aMS",@progbits,1
.L__unnamed_1:
	.asciz	"_Z11getdotErroriiPfS_S_"
	.size	.L__unnamed_1, 24

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z14update_weightsPfS_f"
	.size	.L__unnamed_2, 24

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z12updateWeightiifPfS_S_"
	.size	.L__unnamed_3, 26

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z20better_reduce_kernelILj256EEvPfS0_S0_jj"
	.size	.L__unnamed_4, 44

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"c_weights"
	.size	.L__unnamed_5, 10

	.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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"Error = "
	.size	.Lstr, 9

	.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 _Z26__device_stub__getdotErroriiPfS_S_
	.addrsig_sym _Z29__device_stub__update_weightsPfS_f
	.addrsig_sym _Z27__device_stub__updateWeightiifPfS_S_
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _Z35__device_stub__better_reduce_kernelILj256EEvPfS0_S0_jj
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym c_weights
	.addrsig_sym _Z11getdotErroriiPfS_S_
	.addrsig_sym _Z14update_weightsPfS_f
	.addrsig_sym _Z12updateWeightiifPfS_S_
	.addrsig_sym _Z20better_reduce_kernelILj256EEvPfS0_S0_jj
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z11getdotErroriiPfS_S_ ; -- Begin function _Z11getdotErroriiPfS_S_
	.globl	_Z11getdotErroriiPfS_S_
	.p2align	8
	.type	_Z11getdotErroriiPfS_S_,@function
_Z11getdotErroriiPfS_S_:                ; @_Z11getdotErroriiPfS_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x2c
	s_load_b64 s[2:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	s_mov_b32 s4, exec_lo
	v_cmpx_gt_i32_e64 s2, v1
	s_cbranch_execz .LBB0_5
; %bb.1:                                ; %.preheader
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x8
	s_load_b64 s[0:1], s[0:1], 0x18
	v_mov_b32_e32 v0, 0
	s_cmp_lt_i32 s3, 1
	s_cbranch_scc1 .LBB0_4
; %bb.2:                                ; %.lr.ph.preheader
	v_mov_b32_e32 v2, v1
.LBB0_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_ashrrev_i32_e32 v3, 31, v2
	s_add_i32 s3, s3, -1
	s_cmp_eq_u32 s3, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[3:4], 2, v[2:3]
	v_add_nc_u32_e32 v2, s2, v2
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v3, vcc_lo, s4, v3
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v4, vcc_lo
	global_load_b32 v3, v[3:4], off
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v0, v0, v3
	s_cbranch_scc0 .LBB0_3
.LBB0_4:                                ; %Flow38
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v3, vcc_lo, s6, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s7, v2, vcc_lo
	global_load_b32 v3, v[3:4], off
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v3, v3, v0
	v_add_co_u32 v0, vcc_lo, s0, v1
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v2, vcc_lo
	global_store_b32 v[0:1], v3, off
.LBB0_5:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11getdotErroriiPfS_S_
		.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 5
		.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	_Z11getdotErroriiPfS_S_, .Lfunc_end0-_Z11getdotErroriiPfS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 252
; NumSgprs: 18
; NumVgprs: 5
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 5
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z14update_weightsPfS_f ; -- Begin function _Z14update_weightsPfS_f
	.globl	_Z14update_weightsPfS_f
	.p2align	8
	.type	_Z14update_weightsPfS_f,@function
_Z14update_weightsPfS_f:                ; @_Z14update_weightsPfS_f
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b32 s0, s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	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 v0, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	global_load_b32 v4, v[2:3], off
	global_load_b32 v0, v[0:1], off
	s_waitcnt vmcnt(0)
	v_fma_f32 v0, -v0, s0, v4
	global_store_b32 v[2:3], v0, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z14update_weightsPfS_f
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.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 5
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z14update_weightsPfS_f, .Lfunc_end1-_Z14update_weightsPfS_f
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 144
; NumSgprs: 18
; NumVgprs: 5
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 5
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z12updateWeightiifPfS_S_ ; -- Begin function _Z12updateWeightiifPfS_S_
	.globl	_Z12updateWeightiifPfS_S_
	.p2align	8
	.type	_Z12updateWeightiifPfS_S_,@function
_Z12updateWeightiifPfS_S_:              ; @_Z12updateWeightiifPfS_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b128 s[4:7], s[0:1], 0x0
	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]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s5, v1
	s_cbranch_execz .LBB2_6
; %bb.1:                                ; %.preheader
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x10
	s_load_b64 s[0:1], s[0:1], 0x20
	s_cmp_lt_i32 s4, 1
	s_cbranch_scc1 .LBB2_4
; %bb.2:                                ; %.lr.ph
	v_mul_lo_u32 v2, v1, s4
	v_mov_b32_e32 v0, 0
	s_mov_b32 s2, s4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s8, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s9, v3, vcc_lo
.LBB2_3:                                ; =>This Inner Loop Header: Depth=1
	global_load_b32 v4, v[2:3], off
	s_load_b32 s3, s[10:11], 0x0
	v_add_co_u32 v2, vcc_lo, v2, 4
	s_add_i32 s2, s2, -1
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	s_add_u32 s10, s10, 4
	s_addc_u32 s11, s11, 0
	s_cmp_eq_u32 s2, 0
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_fmac_f32_e32 v0, s3, v4
	s_cbranch_scc0 .LBB2_3
	s_branch .LBB2_5
.LBB2_4:
	v_mov_b32_e32 v0, 0
.LBB2_5:                                ; %Flow45
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_f32_e32 v0, s6, v0
	v_cvt_f32_i32_e32 v4, s4
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f32 v5, null, v4, v4, v0
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v1, vcc_lo, s0, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v2, vcc_lo, s1, v2, vcc_lo
	v_rcp_f32_e32 v6, v5
	global_load_b32 v3, v[1:2], off
	v_fma_f32 v7, -v5, v6, 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, v7, v6
	v_div_scale_f32 v7, vcc_lo, v0, v4, v0
	v_mul_f32_e32 v8, v7, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v9, -v5, v8, v7
	v_fmac_f32_e32 v8, v9, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v5, -v5, v8, v7
	v_div_fmas_f32 v5, v5, v6, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_div_fixup_f32 v0, v5, v4, v0
	s_waitcnt vmcnt(0)
	v_sub_f32_e32 v0, v3, v0
	global_store_b32 v[1:2], v0, off
.LBB2_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12updateWeightiifPfS_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 10
		.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_end2:
	.size	_Z12updateWeightiifPfS_S_, .Lfunc_end2-_Z12updateWeightiifPfS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 376
; NumSgprs: 18
; NumVgprs: 10
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 10
; 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
	.section	.text._Z20better_reduce_kernelILj256EEvPfS0_S0_jj,"axG",@progbits,_Z20better_reduce_kernelILj256EEvPfS0_S0_jj,comdat
	.protected	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj ; -- Begin function _Z20better_reduce_kernelILj256EEvPfS0_S0_jj
	.globl	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj
	.p2align	8
	.type	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj,@function
_Z20better_reduce_kernelILj256EEvPfS0_S0_jj: ; @_Z20better_reduce_kernelILj256EEvPfS0_S0_jj
; %bb.0:
	s_clause 0x3
	s_load_b32 s3, s[0:1], 0x2c
	s_load_b32 s8, s[0:1], 0x18
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	v_lshl_add_u32 v5, v0, 2, 0
	s_mov_b64 s[10:11], src_shared_base
	s_mov_b32 s2, s15
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v5
	v_dual_mov_b32 v6, 0 :: v_dual_cndmask_b32 v1, 0, v5
	v_cndmask_b32_e64 v2, 0, s11, vcc_lo
	flat_store_b32 v[1:2], v6 dlc
	s_waitcnt_vscnt null, 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_i32 s3, s15, s3
	v_lshl_add_u32 v3, s3, 1, v0
	s_mov_b32 s3, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_u32_e64 s8, v3
	s_cbranch_execz .LBB3_3
; %bb.1:
	v_ashrrev_i32_e32 v4, 31, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[7:8], 2, v[3:4]
	v_mov_b32_e32 v4, v6
	v_lshlrev_b64 v[9:10], 2, v[3:4]
	v_add_nc_u32_e32 v3, 0x100, v3
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_add_co_u32 v6, vcc_lo, s4, v7
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v8, vcc_lo
	v_add_co_u32 v8, vcc_lo, s6, v9
	v_add_co_ci_u32_e32 v9, vcc_lo, s7, v10, vcc_lo
	v_cmp_gt_u32_e32 vcc_lo, s8, v3
	global_load_b32 v4, v[6:7], off
	global_load_b32 v6, v[8:9], off
	flat_load_b32 v7, v[1:2] glc dlc
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_fmac_f32_e32 v7, v4, v6
	flat_store_b32 v[1:2], v7 dlc
	s_waitcnt_vscnt null, 0x0
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB3_3
; %bb.2:
	v_mov_b32_e32 v4, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	v_add_co_u32 v6, vcc_lo, s4, v3
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v4, vcc_lo
	v_add_co_u32 v3, vcc_lo, s6, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s7, v4, vcc_lo
	global_load_b32 v6, v[6:7], off
	global_load_b32 v3, v[3:4], off
	flat_load_b32 v4, v[1:2] glc dlc
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_fmac_f32_e32 v4, v6, v3
	flat_store_b32 v[1:2], v4 dlc
	s_waitcnt_vscnt null, 0x0
.LBB3_3:
	s_or_b32 exec_lo, exec_lo, s3
	v_lshlrev_b32_e32 v3, 2, v0
	s_mov_b32 s3, exec_lo
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	v_cmpx_gt_u32_e32 0x80, v0
	s_cbranch_execz .LBB3_5
; %bb.4:
	v_add3_u32 v4, 0, v3, 0x200
	s_mov_b64 s[4:5], src_shared_base
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v4
	v_cndmask_b32_e32 v6, 0, v4, vcc_lo
	v_cndmask_b32_e64 v7, 0, s5, vcc_lo
	flat_load_b32 v4, v[6:7] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v6, v[1:2] glc dlc
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_add_f32_e32 v4, v4, v6
	flat_store_b32 v[1:2], v4 dlc
	s_waitcnt_vscnt null, 0x0
.LBB3_5:
	s_or_b32 exec_lo, exec_lo, s3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 s3, exec_lo
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	v_cmpx_gt_u32_e32 64, v0
	s_cbranch_execz .LBB3_7
; %bb.6:
	v_add3_u32 v4, 0, v3, 0x100
	s_mov_b64 s[4:5], src_shared_base
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v4
	v_cndmask_b32_e32 v6, 0, v4, vcc_lo
	v_cndmask_b32_e64 v7, 0, s5, vcc_lo
	flat_load_b32 v4, v[6:7] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v6, v[1:2] glc dlc
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_add_f32_e32 v4, v4, v6
	flat_store_b32 v[1:2], v4 dlc
	s_waitcnt_vscnt null, 0x0
.LBB3_7:
	s_or_b32 exec_lo, exec_lo, s3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 s3, exec_lo
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	v_cmpx_gt_u32_e32 32, v0
	s_cbranch_execz .LBB3_9
; %bb.8:
	v_add3_u32 v3, 0, v3, 0x80
	s_mov_b64 s[4:5], src_shared_base
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v3
	v_cndmask_b32_e32 v3, 0, v3, vcc_lo
	v_cndmask_b32_e64 v4, 0, s5, vcc_lo
	flat_load_b32 v4, v[3:4] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v6, v[1:2] glc dlc
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v3, 64, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v3
	s_waitcnt lgkmcnt(0)
	v_dual_cndmask_b32 v3, 0, v3 :: v_dual_add_f32 v6, v4, v6
	v_cndmask_b32_e64 v4, 0, s5, vcc_lo
	flat_store_b32 v[1:2], v6 dlc
	s_waitcnt_vscnt null, 0x0
	flat_load_b32 v4, v[3:4] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v6, v[1:2] glc dlc
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v3, 32, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v3
	s_waitcnt lgkmcnt(0)
	v_dual_cndmask_b32 v3, 0, v3 :: v_dual_add_f32 v6, v4, v6
	v_cndmask_b32_e64 v4, 0, s5, vcc_lo
	flat_store_b32 v[1:2], v6 dlc
	s_waitcnt_vscnt null, 0x0
	flat_load_b32 v4, v[3:4] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v6, v[1:2] glc dlc
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v3, 16, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v3
	s_waitcnt lgkmcnt(0)
	v_dual_cndmask_b32 v3, 0, v3 :: v_dual_add_f32 v6, v4, v6
	v_cndmask_b32_e64 v4, 0, s5, vcc_lo
	flat_store_b32 v[1:2], v6 dlc
	s_waitcnt_vscnt null, 0x0
	flat_load_b32 v4, v[3:4] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v6, v[1:2] glc dlc
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v3, 8, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v3
	s_waitcnt lgkmcnt(0)
	v_dual_cndmask_b32 v3, 0, v3 :: v_dual_add_f32 v6, v4, v6
	v_cndmask_b32_e64 v4, 0, s5, vcc_lo
	flat_store_b32 v[1:2], v6 dlc
	s_waitcnt_vscnt null, 0x0
	flat_load_b32 v4, v[3:4] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v6, v[1:2] glc dlc
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v3, 4, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e32 vcc_lo, -1, v3
	v_cndmask_b32_e32 v3, 0, v3, vcc_lo
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v5, v4, v6
	v_cndmask_b32_e64 v4, 0, s5, vcc_lo
	flat_store_b32 v[1:2], v5 dlc
	s_waitcnt_vscnt null, 0x0
	flat_load_b32 v3, v[3:4] glc dlc
	s_waitcnt vmcnt(0)
	flat_load_b32 v4, v[1:2] glc dlc
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_add_f32_e32 v3, v3, v4
	flat_store_b32 v[1:2], v3 dlc
	s_waitcnt_vscnt null, 0x0
.LBB3_9:
	s_or_b32 exec_lo, exec_lo, s3
	s_mov_b32 s3, 0
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_mov_b32 s4, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB3_11
; %bb.10:
	s_mov_b64 s[4:5], src_shared_base
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s5
	v_cvt_f32_u32_e32 v2, s8
	s_lshl_b64 s[2:3], s[2:3], 2
	s_add_u32 s0, s0, s2
	flat_load_b32 v1, v[0:1] glc dlc
	s_waitcnt vmcnt(0)
	s_addc_u32 s1, s1, s3
	s_waitcnt lgkmcnt(0)
	v_div_scale_f32 v3, null, v2, v2, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f32_e32 v4, v3
	s_waitcnt_depctr 0xfff
	v_fma_f32 v5, -v3, v4, 1.0
	v_fmac_f32_e32 v4, v5, v4
	v_div_scale_f32 v5, vcc_lo, v1, v2, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v6, v5, v4
	v_fma_f32 v7, -v3, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, v7, v4
	v_fma_f32 v3, -v3, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f32 v3, v3, v4, v6
	v_div_fixup_f32 v1, v3, v2, v1
	global_store_b32 v0, v1, s[0:1]
.LBB3_11:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z20better_reduce_kernelILj256EEvPfS0_S0_jj
		.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 11
		.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
	.section	.text._Z20better_reduce_kernelILj256EEvPfS0_S0_jj,"axG",@progbits,_Z20better_reduce_kernelILj256EEvPfS0_S0_jj,comdat
.Lfunc_end3:
	.size	_Z20better_reduce_kernelILj256EEvPfS0_S0_jj, .Lfunc_end3-_Z20better_reduce_kernelILj256EEvPfS0_S0_jj
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1236
; NumSgprs: 18
; NumVgprs: 11
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 11
; 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
	.protected	c_weights               ; @c_weights
	.type	c_weights,@object
	.section	.bss,"aw",@nobits
	.globl	c_weights
	.p2align	4, 0x0
c_weights:
	.zero	40000
	.size	c_weights, 40000

	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.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 c_weights
	.addrsig_sym sdata
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .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:           _Z11getdotErroriiPfS_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11getdotErroriiPfS_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     5
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z14update_weightsPfS_f
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z14update_weightsPfS_f.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     5
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12updateWeightiifPfS_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12updateWeightiifPfS_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     10
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .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
      - .offset:         152
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .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:           _Z20better_reduce_kernelILj256EEvPfS0_S0_jj
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z20better_reduce_kernelILj256EEvPfS0_S0_jj.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     11
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
