#include<stdio.h>
#include<iostream>

#define WARP_SIZE 32

#define GROUPSET 16
#define NUMFACES 3

#define fouralpha 1.82
#define fouralpha4 5.82


#define Connect(a,b,c) Connect[ a + 3 * ( b + mC * c ) ]

extern "C" {


__global__ void GPU_sweep(
          int  size_maxCorner,
          int  size_maxcf,
          int  nAngle,
          int  nzones,
          int  ncornr,
          int  Groups,
          int  nbelem,
          int* AngleOrder,
       double* soa_omega,
          int* nextZ,
          int* next,
          int* soa_nCorner,
          int* soa_nCFaces,
          int* soa_c0,
       double* soa_STotal,
       double* STimeBatch,
       double* soa_SigtInv,
       double* soa_Volume,
       double* soa_Sigt,
       double* soa_A_fp,
       double* soa_A_ez,
          int* soa_Connect,
       double* psic,
       double* psib,
       double* omega_A_fp,
       double* omega_A_ez,
	  int* Connect_ro,
          int* passZ,
	  bool calcSTime,
	  double tau
 );

__global__ void GPU_fp_ez_hplane(
          int  size_maxCorner,
          int  size_maxcf,
          int  nzones,
          int  ncornr,
          int  Groups,
          int  nbelem,
          int* AngleOrder,
       double* soa_omega,
          int* nextZ,
          int* next,
          int* soa_nCorner,
          int* soa_nCFaces,
          int* soa_c0,
       double* soa_A_fp,
       double* soa_A_ez,
       double* omega_A_fp,
       double* omega_A_ez,
          int* soa_Connect,
          int* soa_Connect_reorder,
	  int* passZ
 );


  void fp_ez_c (
		  int *anglebatch,
		  int *numzones, 
		  int *numgroups,
		  int *ncornr,
		  int *numAngles,
		  int *d_AngleOrder,
		  int *maxcorners, 
		  int *maxfaces, 
		  int *NangBin, 
		  int *nbelem,
		  double *d_omega,
		  int    *d_nCorner,
		  int    *d_nCFaces,
		  int    *d_c0,
		  double *d_A_fp,
		  double *d_omega_A_fp,
		  double *d_A_ez, 
		  double* d_omega_A_ez,
		  int    *d_Connect,
		  int* d_Connect_reorder,
		  int *d_next, 
		  int *d_nextZ,
		  int *d_passZ,
		  cudaStream_t streamid
		  ) 
  {

    int nZ = *numzones;
    int nA = *numAngles;
    // will need this for large problems
    int nAbatch = *anglebatch;
    int mC = *maxcorners;
    int mF = *maxfaces;
    int nG = *numgroups;
    int nC = *ncornr;
    int nBe = *nbelem;


	GPU_fp_ez_hplane<<<dim3(nAbatch,1,1),128,0,streamid>>>(
				mC,                 
				mF,       //                 
				nZ,                   
				nC,                          
				nG,                  
				nBe,                         
				d_AngleOrder,                
				d_omega,                     
				d_nextZ,                     
				d_next,                      
				d_nCorner,                   
				d_nCFaces,                   
				d_c0,                        
				d_A_fp,                      
				d_A_ez,                      
				d_omega_A_fp,
				d_omega_A_ez,
				d_Connect,
				d_Connect_reorder,
				d_passZ
				);
  }



  void snswp3d_c (
		  int *anglebatch,
		  int *numzones, 
		  int *numgroups,
		  int *ncornr,
		  int *numAngles,
		  int *d_AngleOrder,
		  int *maxcorners, 
		  int *maxfaces, 
		  int *octant,  //=binRecv
		  int *NangBin, 
		  int *nbelem,
		  double *d_omega,
		  int    *d_nCorner,
		  int    *d_nCFaces,
		  int    *d_c0,
		  double *d_A_fp,
		  double *d_omega_A_fp,
		  double *d_A_ez, 
		  double* d_omega_A_ez,
		  int    *d_Connect,
		  int* d_Connect_reorder,
		  double *d_STotal,
		  double *d_STimeBatch,
		  double *d_Volume,
		  double *d_psic,
		  double *d_psib,
		  int *d_next, 
		  int *d_nextZ,
		  double *d_Sigt,
		  double *d_SigtInv,
		  int *d_passZ,
		  bool *calcSTime,
		  double *tau,
		  cudaStream_t streamid
		  ) 
  {
	  static int dump_cnt=0;
    //int zone,ic;
    //static double* d_omega_A_fp;
    //static double* d_omega_A_ez;
    //static    int* d_Connect_reorder;

    int nZ = *numzones;
    int nA = *numAngles;
    // will need this for large problems
    int nAbatch = *anglebatch;
    int mC = *maxcorners;
    int mF = *maxfaces;
    int nG = *numgroups;
    int nC = *ncornr;
    int nBe = *nbelem;

    {


      int groupsize=32;

      int nGG = ceil(nG / groupsize);
      //printf("nGG=%d\n",nGG);
      if (nG%groupsize != 0) {printf("current version must use groups of multiple of %d!!! sorry \n",groupsize); exit(0);}

      // shared memory needs are (8+3+3*blockDim.x+3)*blockDim.y;

      //GPU_sweep<<<dim3(*anglebatch,nGG,2),dim3(32,16,1),(8+3+3*32+3)*16*sizeof(double),streamid>>>(
      GPU_sweep<<<dim3(*anglebatch,nGG,1),dim3(groupsize,32,1),(8+3+3*groupsize+3)*32*sizeof(double),streamid>>>(
                       mC,                 
                       mF,       //                 
                       nA,                  
                       nZ,                   
                       nC,                          
                       nG,                  
                       nBe,                         
                       d_AngleOrder,                
                       d_omega,                     
                       d_nextZ,                     
                       d_next,                      
                       d_nCorner,                   
                       d_nCFaces,                   
                       d_c0,                        
                       d_STotal,                    
		       d_STimeBatch,
                       d_SigtInv,                   
                       d_Volume,                    
                       d_Sigt,                      
                       d_A_fp,                      
                       d_A_ez,                      
                       d_Connect,                   
                       d_psic,                  
                       d_psib,
                       d_omega_A_fp,
                       d_omega_A_ez,
                       d_Connect_reorder,
                       d_passZ,
		       *calcSTime,
		       *tau
                          );

      //printf("Completed a batch sweep\n");


      dump_cnt++;
      //std::cout<<"dump_cnt="<<dump_cnt<<std::endl;
    }
  } 


} // extern "C"

	.file	"tmpxft_002a5e17_00000000-6_cu_snswp3d.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3639:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3639:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	fp_ez_c
	.type	fp_ez_c, @function
fp_ez_c:
.LFB3635:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%r8d, %r8d
	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	%r9, %rbx
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	232(%rsp), %rax
	movq	296(%rsp), %r10
	movq	224(%rsp), %rbp
	movq	264(%rsp), %r13
	movq	%rax, 32(%rsp)
	movq	240(%rsp), %rax
	movq	%r10, 88(%rsp)
	movq	280(%rsp), %r14
	movq	%rax, 40(%rsp)
	movq	248(%rsp), %rax
	movq	288(%rsp), %r15
	movq	%rax, 48(%rsp)
	movq	256(%rsp), %rax
	movq	%rax, 56(%rsp)
	movq	272(%rsp), %rax
	movq	%rax, 64(%rsp)
	movq	304(%rsp), %rax
	movq	%rax, 72(%rsp)
	movq	312(%rsp), %r12
	movl	(%rsi), %eax
	movq	192(%rsp), %rsi
	movl	(%rdx), %edx
	movl	(%rcx), %ecx
	movl	%eax, 8(%rsp)
	movl	(%rdi), %eax
	movl	(%rsi), %edi
	movq	200(%rsp), %rsi
	movl	%edx, 20(%rsp)
	movq	216(%rsp), %rdx
	movl	%eax, 104(%rsp)
	movabsq	$4294967297, %rax
	movl	%edi, 12(%rsp)
	movl	(%rsi), %edi
	movl	%ecx, 24(%rsp)
	movl	(%rdx), %ecx
	movl	$33554433, %edx
	movq	320(%rsp), %r11
	movl	%edi, 16(%rsp)
	salq	$7, %rdx
	movq	%rax, 108(%rsp)
	movq	328(%rsp), %r9
	movq	104(%rsp), %rdi
	movl	112(%rsp), %esi
	movl	%ecx, 28(%rsp)
	movl	$1, %ecx
	movq	%r11, 80(%rsp)
	call	__cudaPushCallConfiguration@PLT
	movq	80(%rsp), %r11
	movq	88(%rsp), %r10
	testl	%eax, %eax
	jne	.L2
	movq	64(%rsp), %rax
	movq	%r15, 280(%rsp)
	movq	%r14, 272(%rsp)
	movl	28(%rsp), %r9d
	movq	%rax, 256(%rsp)
	movq	56(%rsp), %rax
	movq	%r13, 264(%rsp)
	movl	20(%rsp), %r8d
	movq	%rax, 248(%rsp)
	movq	48(%rsp), %rax
	movq	%rbp, 200(%rsp)
	movl	24(%rsp), %ecx
	movq	%rax, 240(%rsp)
	movq	40(%rsp), %rax
	movq	%rbx, 192(%rsp)
	movl	8(%rsp), %edx
	movq	%rax, 232(%rsp)
	movq	32(%rsp), %rax
	movl	16(%rsp), %esi
	movl	12(%rsp), %edi
	movq	%r11, 296(%rsp)
	movq	%rax, 224(%rsp)
	movq	72(%rsp), %rax
	movq	%r10, 288(%rsp)
	movq	%rax, 216(%rsp)
	movq	%r12, 208(%rsp)
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	GPU_fp_ez_hplane@PLT
.L2:
	.cfi_restore_state
	addq	$136, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3635:
	.size	fp_ez_c, .-fp_ez_c
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"current version must use groups of multiple of %d!!! sorry \n"
	.text
	.globl	snswp3d_c
	.type	snswp3d_c, @function
snswp3d_c:
.LFB3636:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	(%rsi), %r14d
	movl	(%r8), %r13d
	movq	112(%rsp), %rsi
	movl	(%rcx), %r15d
	movl	(%rsi), %ebx
	movq	120(%rsp), %rsi
	movl	%ebx, 8(%rsp)
	movl	(%rsi), %ebx
	movl	%ebx, 12(%rsp)
	movl	(%rdx), %ebx
	movq	144(%rsp), %rdx
	movl	(%rdx), %ebp
	testb	$31, %bl
	je	.L7
	movl	$2, %edi
	movl	$32, %edx
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%edi, %edi
	call	exit@PLT
.L7:
	movl	(%rdi), %eax
	movl	$32, %ecx
	movq	%r9, %r12
	movl	$28160, %r8d
	movq	328(%rsp), %r9
	movl	$1, %esi
	movl	%eax, 24(%rsp)
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movabsq	$137438953504, %rdx
	movl	$1, %ecx
	movl	%eax, 28(%rsp)
	movq	24(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	pushq	%rax
	.cfi_def_cfa_offset 120
	movq	320(%rsp), %rax
	movl	%ebx, %r9d
	movl	%r15d, %r8d
	movl	%r14d, %ecx
	movl	%r13d, %edx
	movzbl	(%rax), %eax
	pushq	%rax
	.cfi_def_cfa_offset 128
	pushq	320(%rsp)
	.cfi_def_cfa_offset 136
	pushq	248(%rsp)
	.cfi_def_cfa_offset 144
	pushq	240(%rsp)
	.cfi_def_cfa_offset 152
	pushq	232(%rsp)
	.cfi_def_cfa_offset 160
	pushq	312(%rsp)
	.cfi_def_cfa_offset 168
	pushq	312(%rsp)
	.cfi_def_cfa_offset 176
	pushq	280(%rsp)
	.cfi_def_cfa_offset 184
	pushq	272(%rsp)
	.cfi_def_cfa_offset 192
	pushq	264(%rsp)
	.cfi_def_cfa_offset 200
	pushq	376(%rsp)
	.cfi_def_cfa_offset 208
	pushq	344(%rsp)
	.cfi_def_cfa_offset 216
	pushq	400(%rsp)
	.cfi_def_cfa_offset 224
	pushq	352(%rsp)
	.cfi_def_cfa_offset 232
	pushq	352(%rsp)
	.cfi_def_cfa_offset 240
	pushq	304(%rsp)
	.cfi_def_cfa_offset 248
	pushq	304(%rsp)
	.cfi_def_cfa_offset 256
	pushq	304(%rsp)
	.cfi_def_cfa_offset 264
	pushq	424(%rsp)
	.cfi_def_cfa_offset 272
	pushq	440(%rsp)
	.cfi_def_cfa_offset 280
	pushq	320(%rsp)
	.cfi_def_cfa_offset 288
	pushq	%r12
	.cfi_def_cfa_offset 296
	pushq	%rbp
	.cfi_def_cfa_offset 304
	movq	512(%rsp), %rax
	movl	204(%rsp), %esi
	movl	200(%rsp), %edi
	movsd	(%rax), %xmm0
	call	GPU_sweep@PLT
	addq	$192, %rsp
	.cfi_def_cfa_offset 112
.L8:
	incl	_ZZ9snswp3d_cE8dump_cnt(%rip)
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3636:
	.size	snswp3d_c, .-snswp3d_c
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3662:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3662:
	.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
	.local	_ZZ9snswp3d_cE8dump_cnt
	.comm	_ZZ9snswp3d_cE8dump_cnt,4,4
	.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<stdio.h>
#include<iostream>

#define WARP_SIZE 32

#define GROUPSET 16
#define NUMFACES 3

#define fouralpha 1.82
#define fouralpha4 5.82


#define Connect(a,b,c) Connect[ a + 3 * ( b + mC * c ) ]

extern "C" {


__global__ void GPU_sweep(
          int  size_maxCorner,
          int  size_maxcf,
          int  nAngle,
          int  nzones,
          int  ncornr,
          int  Groups,
          int  nbelem,
          int* AngleOrder,
       double* soa_omega,
          int* nextZ,
          int* next,
          int* soa_nCorner,
          int* soa_nCFaces,
          int* soa_c0,
       double* soa_STotal,
       double* STimeBatch,
       double* soa_SigtInv,
       double* soa_Volume,
       double* soa_Sigt,
       double* soa_A_fp,
       double* soa_A_ez,
          int* soa_Connect,
       double* psic,
       double* psib,
       double* omega_A_fp,
       double* omega_A_ez,
	  int* Connect_ro,
          int* passZ,
	  bool calcSTime,
	  double tau
 );

__global__ void GPU_fp_ez_hplane(
          int  size_maxCorner,
          int  size_maxcf,
          int  nzones,
          int  ncornr,
          int  Groups,
          int  nbelem,
          int* AngleOrder,
       double* soa_omega,
          int* nextZ,
          int* next,
          int* soa_nCorner,
          int* soa_nCFaces,
          int* soa_c0,
       double* soa_A_fp,
       double* soa_A_ez,
       double* omega_A_fp,
       double* omega_A_ez,
          int* soa_Connect,
          int* soa_Connect_reorder,
	  int* passZ
 );


  void fp_ez_c (
		  int *anglebatch,
		  int *numzones, 
		  int *numgroups,
		  int *ncornr,
		  int *numAngles,
		  int *d_AngleOrder,
		  int *maxcorners, 
		  int *maxfaces, 
		  int *NangBin, 
		  int *nbelem,
		  double *d_omega,
		  int    *d_nCorner,
		  int    *d_nCFaces,
		  int    *d_c0,
		  double *d_A_fp,
		  double *d_omega_A_fp,
		  double *d_A_ez, 
		  double* d_omega_A_ez,
		  int    *d_Connect,
		  int* d_Connect_reorder,
		  int *d_next, 
		  int *d_nextZ,
		  int *d_passZ,
		  hipStream_t streamid
		  ) 
  {

    int nZ = *numzones;
    int nA = *numAngles;
    // will need this for large problems
    int nAbatch = *anglebatch;
    int mC = *maxcorners;
    int mF = *maxfaces;
    int nG = *numgroups;
    int nC = *ncornr;
    int nBe = *nbelem;


	GPU_fp_ez_hplane<<<dim3(nAbatch,1,1),128,0,streamid>>>(
				mC,                 
				mF,       //                 
				nZ,                   
				nC,                          
				nG,                  
				nBe,                         
				d_AngleOrder,                
				d_omega,                     
				d_nextZ,                     
				d_next,                      
				d_nCorner,                   
				d_nCFaces,                   
				d_c0,                        
				d_A_fp,                      
				d_A_ez,                      
				d_omega_A_fp,
				d_omega_A_ez,
				d_Connect,
				d_Connect_reorder,
				d_passZ
				);
  }



  void snswp3d_c (
		  int *anglebatch,
		  int *numzones, 
		  int *numgroups,
		  int *ncornr,
		  int *numAngles,
		  int *d_AngleOrder,
		  int *maxcorners, 
		  int *maxfaces, 
		  int *octant,  //=binRecv
		  int *NangBin, 
		  int *nbelem,
		  double *d_omega,
		  int    *d_nCorner,
		  int    *d_nCFaces,
		  int    *d_c0,
		  double *d_A_fp,
		  double *d_omega_A_fp,
		  double *d_A_ez, 
		  double* d_omega_A_ez,
		  int    *d_Connect,
		  int* d_Connect_reorder,
		  double *d_STotal,
		  double *d_STimeBatch,
		  double *d_Volume,
		  double *d_psic,
		  double *d_psib,
		  int *d_next, 
		  int *d_nextZ,
		  double *d_Sigt,
		  double *d_SigtInv,
		  int *d_passZ,
		  bool *calcSTime,
		  double *tau,
		  hipStream_t streamid
		  ) 
  {
	  static int dump_cnt=0;
    //int zone,ic;
    //static double* d_omega_A_fp;
    //static double* d_omega_A_ez;
    //static    int* d_Connect_reorder;

    int nZ = *numzones;
    int nA = *numAngles;
    // will need this for large problems
    int nAbatch = *anglebatch;
    int mC = *maxcorners;
    int mF = *maxfaces;
    int nG = *numgroups;
    int nC = *ncornr;
    int nBe = *nbelem;

    {


      int groupsize=32;

      int nGG = ceil(nG / groupsize);
      //printf("nGG=%d\n",nGG);
      if (nG%groupsize != 0) {printf("current version must use groups of multiple of %d!!! sorry \n",groupsize); exit(0);}

      // shared memory needs are (8+3+3*blockDim.x+3)*blockDim.y;

      //GPU_sweep<<<dim3(*anglebatch,nGG,2),dim3(32,16,1),(8+3+3*32+3)*16*sizeof(double),streamid>>>(
      GPU_sweep<<<dim3(*anglebatch,nGG,1),dim3(groupsize,32,1),(8+3+3*groupsize+3)*32*sizeof(double),streamid>>>(
                       mC,                 
                       mF,       //                 
                       nA,                  
                       nZ,                   
                       nC,                          
                       nG,                  
                       nBe,                         
                       d_AngleOrder,                
                       d_omega,                     
                       d_nextZ,                     
                       d_next,                      
                       d_nCorner,                   
                       d_nCFaces,                   
                       d_c0,                        
                       d_STotal,                    
		       d_STimeBatch,
                       d_SigtInv,                   
                       d_Volume,                    
                       d_Sigt,                      
                       d_A_fp,                      
                       d_A_ez,                      
                       d_Connect,                   
                       d_psic,                  
                       d_psib,
                       d_omega_A_fp,
                       d_omega_A_ez,
                       d_Connect_reorder,
                       d_passZ,
		       *calcSTime,
		       *tau
                          );

      //printf("Completed a batch sweep\n");


      dump_cnt++;
      //std::cout<<"dump_cnt="<<dump_cnt<<std::endl;
    }
  } 


} // extern "C"

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

                                        # End of file scope inline assembly
	.globl	fp_ez_c                         # -- Begin function fp_ez_c
	.type	fp_ez_c,@function
fp_ez_c:                                # @fp_ez_c
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, (%rsp)                     # 8-byte Spill
	movq	200(%rsp), %r9
	movq	88(%rsp), %rax
	movq	72(%rsp), %r8
	movq	64(%rsp), %r10
	movl	(%rsi), %ebp
	movl	(%rdi), %edi
	movl	(%r10), %r12d
	movl	(%r8), %r13d
	movl	(%rdx), %r14d
	movl	(%rcx), %ebx
	movl	(%rax), %r15d
	btsq	$32, %rdi
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$128, %rdx
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	je	.LBB0_1
# %bb.2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	jmp	.LBB0_3
.LBB0_1:
	.cfi_def_cfa_offset 64
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%ebp, %edx
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	movl	%r15d, %r9d
	pushq	192(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	168(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	184(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	176(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	256(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	272(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	192(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	104(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	__device_stub__GPU_fp_ez_hplane
	addq	$120, %rsp
	.cfi_adjust_cfa_offset -120
.LBB0_3:
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	fp_ez_c, .Lfunc_end0-fp_ez_c
	.cfi_endproc
                                        # -- End function
	.globl	snswp3d_c                       # -- Begin function snswp3d_c
	.type	snswp3d_c,@function
snswp3d_c:                              # @snswp3d_c
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, 16(%rsp)                   # 8-byte Spill
	movl	(%rdx), %ebp
	testb	$31, %bpl
	jne	.LBB1_4
# %bb.1:
	movq	296(%rsp), %r9
	movq	112(%rsp), %rax
	movq	88(%rsp), %rdx
	movq	80(%rsp), %r10
	movl	(%rsi), %r14d
	movl	(%r8), %r15d
	movl	(%r10), %r13d
	movl	(%rdx), %ebx
	movl	(%rcx), %r12d
	movl	(%rax), %eax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movl	%ebp, %eax
	sarl	$5, %eax
	movl	(%rdi), %ecx
	shlq	$32, %rax
	orq	%rcx, %rax
	movabsq	$137438953504, %rdx             # imm = 0x2000000020
	movl	$28160, %r8d                    # imm = 0x6E00
	movq	%rax, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB1_3
# %bb.2:
	movq	288(%rsp), %rax
	movq	280(%rsp), %rcx
	movzbl	(%rcx), %r10d
	movsd	(%rax), %xmm0                   # xmm0 = mem[0],zero
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	%r13d, %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	movl	%ebp, %r9d
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	pushq	288(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	216(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	208(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	200(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	280(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	280(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	248(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	240(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	232(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	344(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	312(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	368(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	320(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	320(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	272(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	272(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	272(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	392(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	408(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	288(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	192(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	192(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	__device_stub__GPU_sweep
	addq	$192, %rsp
	.cfi_adjust_cfa_offset -192
.LBB1_3:
	incl	_ZZ9snswp3d_cE8dump_cnt(%rip)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB1_4:
	.cfi_def_cfa_offset 80
	movl	$.L.str, %edi
	movl	$32, %esi
	xorl	%eax, %eax
	callq	printf
	xorl	%edi, %edi
	callq	exit
.Lfunc_end1:
	.size	snswp3d_c, .Lfunc_end1-snswp3d_c
	.cfi_endproc
                                        # -- End function
	.type	_ZZ9snswp3d_cE8dump_cnt,@object # @_ZZ9snswp3d_cE8dump_cnt
	.local	_ZZ9snswp3d_cE8dump_cnt
	.comm	_ZZ9snswp3d_cE8dump_cnt,4,4
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"current version must use groups of multiple of %d!!! sorry \n"
	.size	.L.str, 61

	.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
