__device__ inline double sq(double x) { return x*x;}

__device__ double optimsquare_eps_2d_descent(double u[4], double xi[4], double epsilon, double w, int steps) {
  double no, nxi[4], r;
  r = 1./(1+epsilon/4.);

  u[0] -= xi[0]-xi[3];
  for (int i=1;i<=3;i++) {
    u[i] -= xi[i]-xi[i-1];
  }

  for (int it=0; it<steps; it++) {
    if ((no = sq(nxi[0]=r*(.5*xi[0]+.25*(xi[3]+xi[1]+ u[1]-u[0])))
         + sq(nxi[1]=r*(.5*xi[1]+.25*(xi[0]+xi[2]+ u[2]-u[1])))
         + sq(nxi[2]=r*(.5*xi[2]+.25*(xi[1]+xi[3]+ u[3]-u[2])))
         + sq(nxi[3]=r*(.5*xi[3]+.25*(xi[2]+xi[0]+ u[0]-u[3])))) > w) {
      no = sqrt(w/no);
    } else {
      no = 1;
    }
    xi[0]= nxi[0]*no;
    xi[1]= nxi[1]*no;
    xi[2]= nxi[2]*no;
    xi[3]= nxi[3]*no;
  }

  u[0] += xi[0]-xi[3];
  for (int i=1;i<=3;i++) {
    u[i] += xi[i]-xi[i-1];
  }

  return 0.0;
}


__device__ double optimsquare_eps_2d(double u[4], double xi[4], double epsilon, double w, int steps)
{
  double z0, z1, z2;
  double t0, t1, t2;
  double a, b;
  double dno, no, noa, nob; // Derivative of the objective
  double tm, tp;
  double tmu;

  u[0] -= xi[0]-xi[3];
  for (int i=1;i<=3;i++) {
    u[i] -= xi[i]-xi[i-1];
  }

  z0 = u[3]-u[1];
  z1 = u[2]-u[0];
  z2 = (u[0]+u[2])-(u[3]+u[1]);

  a = z0*z0 + z1*z1;
  b = z2*z2;

  // If the current no is bigger than w, we do a Newton descent
  // for solving f_{a,b} = w. Otherwise, we keep mu = 0.
  tmu = epsilon;
  no = a/((2+tmu)*(2+tmu))+b/((4+tmu)*(4+tmu));
  if (no > w) {
    for (int i=0; i < steps; i++) {
      noa = a/((2+tmu)*(2+tmu));
      nob = b/((4+tmu)*(4+tmu));
      dno = noa/(2+tmu)+nob/(4+tmu);
      tmu += .5*(noa+nob-w)/dno;
      tmu = max(epsilon, tmu);
    }
  }

  // Recover the values of xi and u after finding mu.
  t0 = .5*z0/(2.+tmu);
  t1 = .5*z1/(2.+tmu);
  t2 = .5*z2/(4.+tmu);

  tm = t0-t1;
  tp = t0+t1;

  xi[1] = tp+t2;
  xi[2] = tm-t2;
  xi[3] = t2-tp;
  xi[0] = -tm-t2;

  double s = sq(xi[0]) + sq(xi[1]) + sq(xi[2]) + sq(xi[3]);
  if (s > w) {
    double factor = sqrt(w/s);
    for (int i=0; i<4; i++) {
      xi[i] *= factor;
    }
  }

  u[0] += xi[0]-xi[3];
  for (int i=1;i<=3;i++) {
    u[i] += xi[i]-xi[i-1];
  }

  return tmu;
}

__global__ void opt_eps_split(int sx, double *xi, double *u, double epsilon, double w, double ws, double we2, int L, int K, int steps, int use_newton, int is_even_step) {
  int i,kk;
  int l = blockIdx.y * blockDim.y + threadIdx.y;
  int k = blockIdx.x * blockDim.x + threadIdx.x;
  if ((l < L) && (k < K)) {

    if (is_even_step) {
      i = l * 2 * sx + 2 * k;
      kk = l * K + k;
    } else {
      i = (1 + l * 2) * sx + 1 + 2 * k;
      kk = l * K + k;
    }

    double aru[4];
    aru[0]=u[i];
    aru[1]=u[i+1];
    aru[2]=u[i+1+sx];
    aru[3]=u[i+sx];

    double axi[4];
    axi[0] = xi[kk*4];
    axi[1] = xi[kk*4 + 1];
    axi[2] = xi[kk*4 + 2];
    axi[3] = xi[kk*4 + 3];

    if (use_newton) {
      optimsquare_eps_2d(aru, axi, epsilon, w, steps);
    } else {
      optimsquare_eps_2d_descent(aru, axi, epsilon, w, steps);
    }

    u[i]=aru[0];
    u[i+1]=aru[1];
    u[i+1+sx]=aru[2];
    u[i+sx]=aru[3];

    xi[kk*4] = axi[0];
    xi[kk*4 + 1] = axi[1];
    xi[kk*4 + 2] = axi[2];
    xi[kk*4 + 3] = axi[3];
  }
}

__global__ void over_relax_eps_2d(int sx, double *xio, double *xiobar, double *u, double theta, int Lo, int Ko, int is_even_step) {
  int l = blockIdx.y * blockDim.y + threadIdx.y;
  int k = blockIdx.x * blockDim.x + threadIdx.x;
  if ((l < Lo) && (k < Ko)) {
    int i, kk;
    if (is_even_step) {
      i = l * 2 * sx + 2 * k;
      kk = l * Ko + k;
    } else {
      i = (1 + l * 2) * sx + 1 + 2 * k;
      kk = l * Ko + k;
    }
    double dx[4];
    int m;
    int kx = kk * 4;

    for (m=0; m < 4; m++)
      dx[m] = theta * (xiobar[kx+m] - xio[kx+m]);
    u[i] += dx[0]-dx[3];
    u[i+1] += dx[1]-dx[0];
    u[i+1+sx] += dx[2]-dx[1];
    u[i+sx] += dx[3]-dx[2];
    for (m=0; m<4; m++) 
      xio[kx+m] = xiobar[kx+m] + dx[m];
  }
}

__global__ void gap_arr_eps_2d(int sx, double* gl, double *xie, double *u, double epsilon, double w, double ws, double we2, int Le, int Ke, int is_even_step) {
  int l = blockIdx.y * blockDim.y + threadIdx.y;
  int k = blockIdx.x * blockDim.x + threadIdx.x;
  if ((l < Le) && (k < Ke)) {
    int i;
    if (is_even_step) {
      i = 2 * l * sx + 2 * k;
    } else {
      i = (2 * l + 1) * sx + 1 + 2 * k;
    }
    int kx = 4*(l*Ke + k);
    double aru[4], a[4], b, c, d, gap = 0;
    double *xi = xie + kx;
    aru[0]=u[i];
    aru[1]=u[i+1];
    aru[2]=u[i+1+sx];
    aru[3]=u[i+sx];
    // TV_e(Du) - <xi,Du> + e*xi^2/2
    a[3] = aru[0]-aru[3];
    b = a[3]*a[3];
    c = xi[3]*a[3];
    d = xi[3]*xi[3];
    for (int m=0;m<3;m++) {
      a[m] = aru[m+1]-aru[m];
      b += a[m]*a[m];
      c += xi[m]*a[m];
      d += xi[m]*xi[m];
    }

    gap += epsilon*.5*d-c;
    if (b < we2) {
      gap += .5*b/epsilon; // here epsilon>0
    } else {
      gap += ws*sqrt(b)-.5*epsilon*w; // TV_eps
    }
    gl[l*Ke + k] = gap;
  }
}

	.file	"tmpxft_0028469a_00000000-6_kernels-2d.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2013:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2013:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z26optimsquare_eps_2d_descentPdS_ddi
	.type	_Z26optimsquare_eps_2d_descentPdS_ddi, @function
_Z26optimsquare_eps_2d_descentPdS_ddi:
.LFB2009:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE2009:
	.size	_Z26optimsquare_eps_2d_descentPdS_ddi, .-_Z26optimsquare_eps_2d_descentPdS_ddi
	.globl	_Z18optimsquare_eps_2dPdS_ddi
	.type	_Z18optimsquare_eps_2dPdS_ddi, @function
_Z18optimsquare_eps_2dPdS_ddi:
.LFB2159:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE2159:
	.size	_Z18optimsquare_eps_2dPdS_ddi, .-_Z18optimsquare_eps_2dPdS_ddi
	.globl	_Z45__device_stub__Z13opt_eps_splitiPdS_ddddiiiiiiPdS_ddddiiiii
	.type	_Z45__device_stub__Z13opt_eps_splitiPdS_ddddiiiiiiPdS_ddddiiiii, @function
_Z45__device_stub__Z13opt_eps_splitiPdS_ddddiiiiiiPdS_ddddiiiii:
.LFB2035:
	.cfi_startproc
	endbr64
	subq	$248, %rsp
	.cfi_def_cfa_offset 256
	movl	%edi, 60(%rsp)
	leaq	88(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	100(%rsp), %rsi
	movq	%rdx, 40(%rsp)
	leaq	72(%rsp), %rdx
	movl	%ecx, 56(%rsp)
	leaq	80(%rsp), %rcx
	movl	%r8d, 4(%rsp)
	movl	%r9d, (%rsp)
	movsd	%xmm0, 32(%rsp)
	movsd	%xmm1, 24(%rsp)
	movsd	%xmm2, 16(%rsp)
	movsd	%xmm3, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rax
	movl	$1, 96(%rsp)
	movq	%rax, 136(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 200(%rsp)
	movq	%rsp, %rax
	movq	%rax, 208(%rsp)
	leaq	256(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	264(%rsp), %rax
	movq	%rax, 224(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 88(%rsp)
	movq	%rax, 100(%rsp)
	movl	$1, 108(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L6
	pushq	80(%rsp)
	.cfi_def_cfa_offset 264
	leaq	_Z13opt_eps_splitiPdS_ddddiiiii(%rip), %rdi
	pushq	80(%rsp)
	.cfi_def_cfa_offset 272
	movq	116(%rsp), %rcx
	movl	124(%rsp), %r8d
	movq	104(%rsp), %rsi
	movl	112(%rsp), %edx
	leaq	152(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 264
	popq	%rdx
	.cfi_def_cfa_offset 256
.L6:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	addq	$248, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2035:
	.size	_Z45__device_stub__Z13opt_eps_splitiPdS_ddddiiiiiiPdS_ddddiiiii, .-_Z45__device_stub__Z13opt_eps_splitiPdS_ddddiiiiiiPdS_ddddiiiii
	.globl	_Z13opt_eps_splitiPdS_ddddiiiii
	.type	_Z13opt_eps_splitiPdS_ddddiiiii, @function
_Z13opt_eps_splitiPdS_ddddiiiii:
.LFB2036:
	.cfi_startproc
	endbr64
	jmp	_Z45__device_stub__Z13opt_eps_splitiPdS_ddddiiiiiiPdS_ddddiiiii
	.cfi_endproc
.LFE2036:
	.size	_Z13opt_eps_splitiPdS_ddddiiiii, .-_Z13opt_eps_splitiPdS_ddddiiiii
	.globl	_Z46__device_stub__Z17over_relax_eps_2diPdS_S_diiiiPdS_S_diii
	.type	_Z46__device_stub__Z17over_relax_eps_2diPdS_S_diiiiPdS_S_diii, @function
_Z46__device_stub__Z17over_relax_eps_2diPdS_S_diiiiPdS_S_diii:
.LFB2037:
	.cfi_startproc
	endbr64
	subq	$200, %rsp
	.cfi_def_cfa_offset 208
	movl	%edi, 44(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 40(%rsp)
	movl	%r9d, 4(%rsp)
	movsd	%xmm0, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	208(%rsp), %rax
	movq	%rax, 176(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L12
	pushq	64(%rsp)
	.cfi_def_cfa_offset 216
	leaq	_Z17over_relax_eps_2diPdS_S_diii(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 224
	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 216
	popq	%rdx
	.cfi_def_cfa_offset 208
.L12:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	addq	$200, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2037:
	.size	_Z46__device_stub__Z17over_relax_eps_2diPdS_S_diiiiPdS_S_diii, .-_Z46__device_stub__Z17over_relax_eps_2diPdS_S_diiiiPdS_S_diii
	.globl	_Z17over_relax_eps_2diPdS_S_diii
	.type	_Z17over_relax_eps_2diPdS_S_diii, @function
_Z17over_relax_eps_2diPdS_S_diii:
.LFB2038:
	.cfi_startproc
	endbr64
	jmp	_Z46__device_stub__Z17over_relax_eps_2diPdS_S_diiiiPdS_S_diii
	.cfi_endproc
.LFE2038:
	.size	_Z17over_relax_eps_2diPdS_S_diii, .-_Z17over_relax_eps_2diPdS_S_diii
	.globl	_Z46__device_stub__Z14gap_arr_eps_2diPdS_S_ddddiiiiPdS_S_ddddiii
	.type	_Z46__device_stub__Z14gap_arr_eps_2diPdS_S_ddddiiiiPdS_S_ddddiii, @function
_Z46__device_stub__Z14gap_arr_eps_2diPdS_S_ddddiiiiPdS_S_ddddiii:
.LFB2039:
	.cfi_startproc
	endbr64
	subq	$248, %rsp
	.cfi_def_cfa_offset 256
	movl	%edi, 76(%rsp)
	leaq	96(%rsp), %rdi
	movq	%rsi, 64(%rsp)
	leaq	108(%rsp), %rsi
	movq	%rdx, 56(%rsp)
	leaq	80(%rsp), %rdx
	movq	%rcx, 48(%rsp)
	leaq	88(%rsp), %rcx
	movl	%r8d, 72(%rsp)
	movl	%r9d, 12(%rsp)
	movsd	%xmm0, 40(%rsp)
	movsd	%xmm1, 32(%rsp)
	movsd	%xmm2, 24(%rsp)
	movsd	%xmm3, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	76(%rsp), %rax
	movl	$1, 104(%rsp)
	movq	%rax, 144(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 208(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	256(%rsp), %rax
	movq	%rax, 224(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 96(%rsp)
	movq	%rax, 108(%rsp)
	movl	$1, 116(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L17
	pushq	88(%rsp)
	.cfi_def_cfa_offset 264
	leaq	_Z14gap_arr_eps_2diPdS_S_ddddiii(%rip), %rdi
	pushq	88(%rsp)
	.cfi_def_cfa_offset 272
	movq	124(%rsp), %rcx
	movl	132(%rsp), %r8d
	movq	112(%rsp), %rsi
	movl	120(%rsp), %edx
	leaq	160(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 264
	popq	%rdx
	.cfi_def_cfa_offset 256
.L17:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	addq	$248, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2039:
	.size	_Z46__device_stub__Z14gap_arr_eps_2diPdS_S_ddddiiiiPdS_S_ddddiii, .-_Z46__device_stub__Z14gap_arr_eps_2diPdS_S_ddddiiiiPdS_S_ddddiii
	.globl	_Z14gap_arr_eps_2diPdS_S_ddddiii
	.type	_Z14gap_arr_eps_2diPdS_S_ddddiii, @function
_Z14gap_arr_eps_2diPdS_S_ddddiii:
.LFB2040:
	.cfi_startproc
	endbr64
	jmp	_Z46__device_stub__Z14gap_arr_eps_2diPdS_S_ddddiiiiPdS_S_ddddiii
	.cfi_endproc
.LFE2040:
	.size	_Z14gap_arr_eps_2diPdS_S_ddddiii, .-_Z14gap_arr_eps_2diPdS_S_ddddiii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z14gap_arr_eps_2diPdS_S_ddddiii"
.LC1:
	.string	"_Z17over_relax_eps_2diPdS_S_diii"
.LC2:
	.string	"_Z13opt_eps_splitiPdS_ddddiiiii"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2042:
	.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	_Z14gap_arr_eps_2diPdS_S_ddddiii(%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	_Z17over_relax_eps_2diPdS_S_diii(%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	_Z13opt_eps_splitiPdS_ddddiiiii(%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
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.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
.LFE2042:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#ifndef KERNELS_EPS_2D_CUH
#define KERNELS_EPS_2D_CUH

__global__ void opt_eps_split(int sx, double *xi, double *u, double epsilon, double w, double ws, double we2, int L, int K, int steps, int use_newton, int is_even_step);

__global__ void over_relax_eps_2d(int sx, double *xio, double *xiobar, double *u, double theta, int Lo, int Ko, int is_even_step);

__global__ void gap_arr_eps_2d(int sx, double* gl, double *xie, double *u, double epsilon, double w, double ws, double we2, int Le, int Ke, int is_even_step);

#endif

	.text
	.file	"kernels-2d.hip"
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
