/**
 *
 * bash版対称解除法のC言語版のGPU/CUDA移植版
 *
 詳しい説明はこちらをどうぞ
 https://suzukiiichiro.github.io/search/?keyword=Ｎクイーン問題
 *
*/
#include <iostream>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#define THREAD_NUM		96
#define MAX 27
// システムによって以下のマクロが必要であればコメントを外してください。
//#define UINT64_C(c) c ## ULL
//
// グローバル変数
unsigned long TOTAL=0;
unsigned long UNIQUE=0;
//GPU で使うローカル構造体
typedef struct
{
  unsigned int BOUND1,BOUND2,TOPBIT,ENDBIT,SIDEMASK,LASTMASK;
  unsigned long board[MAX];
  unsigned long COUNT2,COUNT4,COUNT8,TOTAL,UNIQUE;
}local;
// GPU 再帰 非再帰 対称解除法
__host__ __device__
void symmetryOps(unsigned int size,local* l)
{
  /**
  ２．クイーンが右上角以外にある場合、
  (1) 90度回転させてオリジナルと同型になる場合、さらに90度回転(オリジナルか
  ら180度回転)させても、さらに90度回転(オリジナルから270度回転)させてもオリ
  ジナルと同型になる。
  こちらに該当するユニーク解が属するグループの要素数は、左右反転させたパター
  ンを加えて２個しかありません。
  */
  if(l->board[l->BOUND2]==1){
    unsigned int ptn;
    unsigned int own;
    for(ptn=2,own=1;own<size;++own,ptn<<=1){
      unsigned int bit;
      unsigned int you;
      for(bit=1,you=size-1;(l->board[you]!=ptn)&&l->board[own]>=bit;--you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    // ９０度回転して同型なら１８０度回転しても２７０度回転しても同型である
    if(own>size-1){
      l->COUNT2++;
      return ;
    }//end if
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (2) 90度回転させてオリジナルと異なる場合は、270度回転させても必ずオリジナル
    とは異なる。ただし、180度回転させた場合はオリジナルと同型になることも有り得
    る。こちらに該当するユニーク解が属するグループの要素数は、180度回転させて同
    型になる場合は４個(左右反転×縦横回転)
   */
  //１８０度回転
  if(l->board[size-1]==l->ENDBIT){
    unsigned int you;
    unsigned int own;
    for(you=size-1-1,own=1;own<=size-1;++own,--you){
      unsigned int bit;
      unsigned int ptn;
      for(bit=1,ptn=l->TOPBIT;(ptn!=l->board[you])&&(l->board[own]>=bit);ptn>>=1){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    //９０度回転が同型でなくても１８０度回転が同型であることもある
    if(own>size-1){
      l->COUNT4++;
      return ;
    }
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (3)180度回転させてもオリジナルと異なる場合は、８個(左右反転×縦横回転×上下反転)
  */
  //２７０度回転
  if(l->board[l->BOUND1]==l->TOPBIT){
    unsigned int ptn;
    unsigned int own;
    unsigned int you;
    unsigned int bit;
    for(ptn=l->TOPBIT>>1,own=1;own<=size-1;++own,ptn>>=1){
      for(bit=1,you=0;(l->board[you]!=ptn)&&(l->board[own]>=bit);++you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
  }//end if
  l->COUNT8++;
}
// 非再帰 角にQがないときのバックトラック
void symmetry_backTrack_NR(unsigned int size,unsigned int row,unsigned int _left,unsigned int _down,unsigned int _right,local *l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int down[size];
  unsigned int left[size];
  unsigned int right[size];
  unsigned int bitmap[size];
  left[row]=_left;
  down[row]=_down;
  right[row]=_right;
  bitmap[row]=mask&~(left[row]|down[row]|right[row]);
  while(row>0){
    if(bitmap[row]>0){
      if(row<l->BOUND1){ //上部サイド枝刈り
        bitmap[row]|=l->SIDEMASK;
        bitmap[row]^=l->SIDEMASK;
      }else if(row==l->BOUND2){ //下部サイド枝刈り
        if((down[row]&l->SIDEMASK)==0){
          row--; 
        }
        if((down[row]&l->SIDEMASK)!=l->SIDEMASK){
          bitmap[row]&=l->SIDEMASK;
        }
      }
      unsigned int save_bitmap=bitmap[row];
      unsigned int bit=-bitmap[row]&bitmap[row];
      bitmap[row]^=bit;
      l->board[row]=bit; //Qを配置
      if((bit&mask)!=0){
        if(row==(size-1)){
          if( (save_bitmap&l->LASTMASK)==0){
            symmetryOps(size,l);  //対称解除法
          }
          row--;
        }else{
          unsigned int n=row++;
          left[row]=(left[n]|bit)<<1;
          down[row]=(down[n]|bit);
          right[row]=(right[n]|bit)>>1;
          bitmap[row]=mask&~(left[row]|down[row]|right[row]);
        }
      }else{
        row--;
      }
    }else{
      row--;
    }
  }//end while
}
// 非再帰 角にQがあるときのバックトラック
void symmetry_backTrack_corner_NR(unsigned int size,unsigned int row,unsigned int _left,unsigned int _down, unsigned int _right,local *l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bit=0;
  unsigned int down[size];
  unsigned int left[size];
  unsigned int right[size];
  unsigned int bitmap[size];
  left[row]=_left;
  down[row]=_down;
  right[row]=_right;
  bitmap[row]=mask&~(left[row]|down[row]|right[row]);
  while(row>=2){
    if(row<l->BOUND1){
      // bitmap[row]=bitmap[row]|2;
      // bitmap[row]=bitmap[row]^2;
      bitmap[row]&=~2;
    }
    if(bitmap[row]>0){
      bit=-bitmap[row]&bitmap[row];
      bitmap[row]^=bit;
      if(row==(size-1)){
        l->COUNT8++;
        row--;
      }else{
        unsigned int n=row++;
        left[row]=(left[n]|bit)<<1;
        down[row]=(down[n]|bit);
        right[row]=(right[n]|bit)>>1;
        l->board[row]=bit; //Qを配置
        //クイーンが配置可能な位置を表す
        bitmap[row]=mask&~(left[row]|down[row]|right[row]);
      }
    }else{
      row--;
    }
  }//end while
}
// 非再帰 対称解除法
void symmetry_NR(unsigned int size,local* l)
{
  l->TOTAL=l->UNIQUE=l->COUNT2=l->COUNT4=l->COUNT8=0;
  unsigned int bit=0;
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->SIDEMASK=l->LASTMASK=0;
  l->BOUND1=2;
  l->BOUND2=0;
  l->board[0]=1;
  while(l->BOUND1>1&&l->BOUND1<size-1){
    if(l->BOUND1<size-1){
      bit=1<<l->BOUND1;
      l->board[1]=bit;   //２行目にQを配置
      //角にQがあるときのバックトラック
      symmetry_backTrack_corner_NR(size,2,(2|bit)<<1,1|bit,(2|bit)>>1,l);
    }
    l->BOUND1++;
  }
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->TOPBIT>>1;
  l->SIDEMASK=l->TOPBIT|1;
  l->LASTMASK=l->TOPBIT|1;
  l->BOUND1=1;
  l->BOUND2=size-2;
  while(l->BOUND1>0 && l->BOUND2<size-1 && l->BOUND1<l->BOUND2){
    if(l->BOUND1<l->BOUND2){
      bit=1<<l->BOUND1;
      l->board[0]=bit;   //Qを配置
      //角にQがないときのバックトラック
      symmetry_backTrack_NR(size,1,bit<<1,bit,bit>>1,l);
    }
    l->BOUND1++;
    l->BOUND2--;
    l->ENDBIT=l->ENDBIT>>1;
    l->LASTMASK=l->LASTMASK<<1|l->LASTMASK|l->LASTMASK>>1;
  }//ene while
  UNIQUE=l->COUNT2+l->COUNT4+l->COUNT8;
  TOTAL=l->COUNT2*2+l->COUNT4*4+l->COUNT8*8;
}
// 再帰 角にQがないときのバックトラック
void symmetry_backTrack(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  if(row==(size-1)){
    if(bitmap){
      if( (bitmap&l->LASTMASK)==0){
        l->board[row]=bitmap;  //Qを配置
        symmetryOps(size,l);    //対称解除
      }
    }
  }else{
    if(row<l->BOUND1){
      bitmap=bitmap|l->SIDEMASK;
      bitmap=bitmap^l->SIDEMASK;
    }else{
      if(row==l->BOUND2){
        if((down&l->SIDEMASK)==0){
          return;
        }
        if( (down&l->SIDEMASK)!=l->SIDEMASK){
          bitmap=bitmap&l->SIDEMASK;
        }
      }
    }
    while(bitmap){
      unsigned int bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;
      symmetry_backTrack(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }//end while
  }//end if
}
// 再帰 角にQがあるときのバックトラック
void symmetry_backTrack_corner(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  unsigned int bit=0;
  if(row==(size-1)){
    if(bitmap){
      l->board[row]=bitmap;
      l->COUNT8++;
    }
  }else{
    if(row<l->BOUND1){   //枝刈り
      bitmap=bitmap|2;
      bitmap=bitmap^2;
    }
    while(bitmap){
      bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;   //Qを配置
      symmetry_backTrack_corner(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }
  }
}
// 再帰 対称解除法
void symmetry_R(unsigned int size,local* l)
{
  l->TOTAL=l->UNIQUE=l->COUNT2=l->COUNT4=l->COUNT8=0;
  unsigned int bit=0;
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->LASTMASK=l->SIDEMASK=0;
  l->BOUND1=2;
  l->BOUND2=0;
  l->board[0]=1;
  while(l->BOUND1>1 && l->BOUND1<size-1){
    if(l->BOUND1<size-1){
      bit=1<<l->BOUND1;
      l->board[1]=bit;   //２行目にQを配置
      //角にQがあるときのバックトラック
      symmetry_backTrack_corner(size,2,(2|bit)<<1,1|bit,(2|bit)>>1,l);
    }
    l->BOUND1++;
  }//end while
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->TOPBIT>>1;
  l->SIDEMASK=l->TOPBIT|1;
  l->LASTMASK=l->TOPBIT|1;
  l->BOUND1=1;
  l->BOUND2=size-2;
  while(l->BOUND1>0 && l->BOUND2<size-1 && l->BOUND1<l->BOUND2){
    if(l->BOUND1<l->BOUND2){
      bit=1<<l->BOUND1;
      l->board[0]=bit;   //Qを配置
      //角にQがないときのバックトラック
      symmetry_backTrack(size,1,bit<<1,bit,bit>>1,l);
    }
    l->BOUND1++;
    l->BOUND2--;
    l->ENDBIT=l->ENDBIT>>1;
    l->LASTMASK=l->LASTMASK<<1|l->LASTMASK|l->LASTMASK>>1;
  }//ene while
  UNIQUE=l->COUNT2+l->COUNT4+l->COUNT8;
  TOTAL=l->COUNT2*2+l->COUNT4*4+l->COUNT8*8;
}
// GPU 対称解除法
__host__ __device__
void GPU_symmetryOps(unsigned int size,local* l)
{
  /**
  ２．クイーンが右上角以外にある場合、
  (1) 90度回転させてオリジナルと同型になる場合、さらに90度回転(オリジナルか
  ら180度回転)させても、さらに90度回転(オリジナルから270度回転)させてもオリ
  ジナルと同型になる。
  こちらに該当するユニーク解が属するグループの要素数は、左右反転させたパター
  ンを加えて２個しかありません。
  */
  if(l->board[l->BOUND2]==1){
    unsigned int ptn;
    unsigned int own;
    for(ptn=2,own=1;own<size;++own,ptn<<=1){
      unsigned int bit;
      unsigned int you;
      for(bit=1,you=size-1;(l->board[you]!=ptn)&& l->board[own]>=bit;--you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    // ９０度回転して同型なら１８０度回転しても２７０度回転しても同型である
    if(own>size-1){
      l->COUNT2++;
      return ;
    }//end if
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (2) 90度回転させてオリジナルと異なる場合は、270度回転させても必ずオリジナル
    とは異なる。ただし、180度回転させた場合はオリジナルと同型になることも有り得
    る。こちらに該当するユニーク解が属するグループの要素数は、180度回転させて同
    型になる場合は４個(左右反転×縦横回転)
   */
  //１８０度回転
  if(l->board[size-1]==l->ENDBIT){
    unsigned int you;
    unsigned int own;
    for(you=size-1-1,own=1;own<=size-1;++own,--you){
      unsigned int bit;
      unsigned int ptn;
      for(bit=1,ptn=l->TOPBIT;(ptn!=l->board[you])&&(l->board[own]>=bit);ptn>>=1){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    //９０度回転が同型でなくても１８０度回転が同型であることもある
    if(own>size-1){
      l->COUNT4++;
      return ;
    }
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (3)180度回転させてもオリジナルと異なる場合は、８個(左右反転×縦横回転×上下反転)
  */
  //２７０度回転
  if(l->board[l->BOUND1]==l->TOPBIT){
    unsigned int ptn;
    unsigned int own;
    unsigned int you;
    unsigned int bit;
    for(ptn=l->TOPBIT>>1,own=1;own<=size-1;++own,ptn>>=1){
      for(bit=1,you=0;(l->board[you]!=ptn)&&(l->board[own]>=bit);++you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
  }//end if
  l->COUNT8++;
}
// GPU 角にQがないときのバックトラック
__host__ __device__
void GPU_symmetry_backTrack(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  if(row==(size-1)){
    if(bitmap){
      if( (bitmap& l->LASTMASK)==0){
        l->board[row]=bitmap;  //Qを配置
        GPU_symmetryOps(size,l);    //対称解除
      }
    }
  }else{
    if(row<l->BOUND1){
      bitmap=bitmap|l->SIDEMASK;
      bitmap=bitmap^l->SIDEMASK;
    }else{
      if(row==l->BOUND2){
        if((down&l->SIDEMASK)==0){
          return;
        }
        if( (down&l->SIDEMASK)!=l->SIDEMASK){
          bitmap=bitmap&l->SIDEMASK;
        }
      }
    }
    while(bitmap){
      unsigned int bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;
      GPU_symmetry_backTrack(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }//end while
  }//end if
}
// GPU 角にQがあるときのバックトラック
__host__ __device__
void GPU_symmetry_backTrack_corner(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  unsigned int bit=0;
  if(row==(size-1)){
    if(bitmap){
      l->board[row]=bitmap;
      l->COUNT8++;
    }
  }else{
    if(row<l->BOUND1){   //枝刈り
      bitmap=bitmap|2;
      bitmap=bitmap^2;
    }
    while(bitmap){
      bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;   //Qを配置
      GPU_symmetry_backTrack_corner(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }
  }
}
// GPU クイーンの効きを判定して解を返す
__host__ __device__ 
long symmetry_solve_nodeLayer(unsigned int size,unsigned long left,unsigned long down,unsigned long right)
{
  long mask=(1<<size)-1;
  long counter = 0;
  if (down==mask) { // downがすべて専有され解が見つかる
    return 1;
  }
  long bit=0;
  for(long bitmap=mask&~(left|down|right);bitmap;bitmap^=bit){
    bit=-bitmap&bitmap;
    counter += symmetry_solve_nodeLayer(size,(left|bit)>>1,(down|bit),(right|bit)<< 1); 
  }
  return counter;
}
// ノードレイヤー i 番目のメンバを i 番目の部分木の解で埋める
__global__ 
void dim_nodeLayer(unsigned int size,long* nodes,long* solutions,unsigned int numElements)
{
  int i=blockDim.x * blockIdx.x + threadIdx.x;
  if(i<numElements){
    solutions[i]=symmetry_solve_nodeLayer(size,nodes[3 * i],nodes[3 * i + 1],nodes[3 * i + 2]);
  }
}
// ノードレイヤー 0以外のbitをカウント
int countBits_nodeLayer(long n)
{
  int counter = 0;
  while (n){
    n &= (n - 1); // 右端のゼロ以外の数字を削除
    counter++;
  }
  return counter;
}
// ノードレイヤー ノードをk番目のレイヤーのノードで埋める
long kLayer_nodeLayer(int size,std::vector<long>& nodes, int k, long left, long down, long right,local* l)
{
  unsigned int bit=0;
  l->TOTAL=0;
  l->UNIQUE=0;
  l->COUNT2=0;
  l->COUNT4=0;
  l->COUNT8=0;
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=0;
  l->LASTMASK=0;
  l->SIDEMASK=0;
  l->BOUND1=2;
  l->BOUND2=0;
  l->board[0]=1;
  while(l->BOUND1>1 && l->BOUND1<size-1){
    if(l->BOUND1<size-1){
      bit=1<<l->BOUND1;
      l->board[1]=bit;   //２行目にQを配置
      //角にQがあるときのバックトラック
      GPU_symmetry_backTrack_corner(size,2,(2|bit)<<1,1|bit,(2|bit)>>1,l);
    }
    l->BOUND1++;
  }//end while
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->TOPBIT>>1;
  l->SIDEMASK=l->TOPBIT|1;
  l->LASTMASK=l->TOPBIT|1;
  l->BOUND1=1;
  l->BOUND2=size-2;
  while(l->BOUND1>0 && l->BOUND2<size-1 && l->BOUND1<l->BOUND2){
    if(l->BOUND1<l->BOUND2){
      bit=1<<l->BOUND1;
      l->board[0]=bit;   //Qを配置
      //角にQがないときのバックトラック
      GPU_symmetry_backTrack(size,1,bit<<1,bit,bit>>1,l);
    }
    l->BOUND1++;
    l->BOUND2--;
    l->ENDBIT=l->ENDBIT>>1;
    l->LASTMASK=l->LASTMASK<<1|l->LASTMASK|l->LASTMASK>>1;
  }//ene while
  UNIQUE=l->COUNT2+l->COUNT4+l->COUNT8;
  TOTAL=l->COUNT2*2+l->COUNT4*4+l->COUNT8*8;
   
  /**
  long counter=0;
  long mask=(1<<size)-1;
  // すべてのdownが埋まったら、解決策を見つけたことになる。
  if (countBits_nodeLayer(down) == k) {
    nodes.push_back(left);
    nodes.push_back(down);
    nodes.push_back(right);
    return 1;
  }
  long bit=0;
  for(long bitmap=mask&~(left|down|right);bitmap;bitmap^=bit){
    bit=-bitmap&bitmap;
    // 解を加えて対角線をずらす
    counter+=kLayer_nodeLayer(size,nodes,k,(left|bit)>>1,(down|bit),(right|bit)<<1); 
  }
  return counter;
  */
}
// ノードレイヤー k 番目のレイヤのすべてのノードを含むベクトルを返す。
std::vector<long> kLayer_nodeLayer(int size,int k,local* l)
{
  std::vector<long> nodes{};
  kLayer_nodeLayer(size,nodes, k, 0, 0, 0,l);
  return nodes;
}
// ノードレイヤーの作成
void symmetry_build_nodeLayer(int size)
{
  // ツリーの3番目のレイヤーにあるノード
  //（それぞれ連続する3つの数字でエンコードされる）のベクトル。
  // レイヤー2以降はノードの数が均等なので、対称性を利用できる。
  // レイヤ4には十分なノードがある（N16の場合、9844）。
  local l[MAX]; // ローカル構造体
  std::vector<long> nodes = kLayer_nodeLayer(size,4,&l[0]); 
  // デバイスにはクラスがないので、
  // 最初の要素を指定してからデバイスにコピーする。
  size_t nodeSize = nodes.size() * sizeof(long);
  long* hostNodes = (long*)malloc(nodeSize);
  hostNodes = &nodes[0];
  long* deviceNodes = NULL;
  cudaMalloc((void**)&deviceNodes, nodeSize);
  cudaMemcpy(deviceNodes, hostNodes, nodeSize, cudaMemcpyHostToDevice);
  // デバイス出力の割り当て
  long* deviceSolutions = NULL;
  // 必要なのはノードの半分だけで、各ノードは3つの整数で符号化される。
  int numSolutions = nodes.size() / 6; 
  size_t solutionSize = numSolutions * sizeof(long);
  cudaMalloc((void**)&deviceSolutions, solutionSize);
  // CUDAカーネルを起動する。
  int threadsPerBlock = 256;
  int blocksPerGrid = (numSolutions + threadsPerBlock - 1) / threadsPerBlock;
  dim_nodeLayer <<<blocksPerGrid, threadsPerBlock >>> (size,deviceNodes, deviceSolutions, numSolutions);
  // 結果をホストにコピー
  long* hostSolutions = (long*)malloc(solutionSize);
  cudaMemcpy(hostSolutions, deviceSolutions, solutionSize, cudaMemcpyDeviceToHost);
  // 部分解を加算し、結果を表示する。
  long solutions = 0;
  for(long i=0;i<numSolutions;i++){
      solutions += 2*hostSolutions[i]; // Symmetry
  }
  // 出力
  TOTAL=solutions;
}
// CUDA 初期化
bool InitCUDA()
{
  int count;
  cudaGetDeviceCount(&count);
  if(count==0){fprintf(stderr,"There is no device.\n");return false;}
  int i;
  for(i=0;i<count;i++){
    struct cudaDeviceProp prop;
    if(cudaGetDeviceProperties(&prop,i)==cudaSuccess){if(prop.major>=1){break;} }
  }
  if(i==count){fprintf(stderr,"There is no device supporting CUDA 1.x.\n");return false;}
  cudaSetDevice(i);
  return true;
}
//メイン
int main(int argc,char** argv)
{
  bool cpu=false,cpur=false,gpu=false,gpuNodeLayer=false;
  int argstart=2;
  if(argc>=2&&argv[1][0]=='-'){
    if(argv[1][1]=='c'||argv[1][1]=='C'){cpu=true;}
    else if(argv[1][1]=='r'||argv[1][1]=='R'){cpur=true;}
    else if(argv[1][1]=='c'||argv[1][1]=='C'){cpu=true;}
    else if(argv[1][1]=='g'||argv[1][1]=='G'){gpu=true;}
    else if(argv[1][1]=='n'||argv[1][1]=='N'){gpuNodeLayer=true;}
    else{ gpuNodeLayer=true; } //デフォルトをgpuとする
    argstart=2;
  }
  if(argc<argstart){
    printf("Usage: %s [-c|-g|-r|-s] n steps\n",argv[0]);
    printf("  -r: CPU 再帰\n");
    printf("  -c: CPU 非再帰\n");
    printf("  -g: GPU 再帰\n");
    printf("  -n: GPU ノードレイヤー\n");
  }
  if(cpur){ printf("\n\n対称解除法 再帰 \n"); }
  else if(cpu){ printf("\n\n対称解除法 非再帰 \n"); }
  else if(gpu){ printf("\n\n対称解除法 GPU\n"); }
  else if(gpuNodeLayer){ printf("\n\n対称解除法 GPUノードレイヤー \n"); }
  if(cpu||cpur){
    int min=4; 
    int targetN=17;
    struct timeval t0;
    struct timeval t1;
    printf("%s\n"," N:           Total           Unique          dd:hh:mm:ss.ms");
    for(int size=min;size<=targetN;size++){
      local l;
      gettimeofday(&t0, NULL);//計測開始
      if(cpur){ //再帰
        symmetry_R(size,&l);
      }
      if(cpu){ //非再帰
        symmetry_NR(size,&l);
      }
      //
      gettimeofday(&t1, NULL);//計測終了
      int ss;int ms;int dd;
      if(t1.tv_usec<t0.tv_usec) {
        dd=(t1.tv_sec-t0.tv_sec-1)/86400;
        ss=(t1.tv_sec-t0.tv_sec-1)%86400;
        ms=(1000000+t1.tv_usec-t0.tv_usec+500)/10000;
      }else {
        dd=(t1.tv_sec-t0.tv_sec)/86400;
        ss=(t1.tv_sec-t0.tv_sec)%86400;
        ms=(t1.tv_usec-t0.tv_usec+500)/10000;
      }//end if
      int hh=ss/3600;
      int mm=(ss-hh*3600)/60;
      ss%=60;
      printf("%2d:%16ld%17ld%12.2d:%02d:%02d:%02d.%02d\n",
          size,TOTAL,UNIQUE,dd,hh,mm,ss,ms);
    } //end for
  }//end if
  if(gpu||gpuNodeLayer){
    if(!InitCUDA()){return 0;}
    /* int steps=24576; */
    int min=4;
    int targetN=21;
    struct timeval t0;
    struct timeval t1;
    printf("%s\n"," N:        Total      Unique      dd:hh:mm:ss.ms");
    for(int size=min;size<=targetN;size++){
      gettimeofday(&t0,NULL);   // 計測開始
      if(gpu){
        TOTAL=UNIQUE=0;
        TOTAL=symmetry_solve_nodeLayer(size,0,0,0); //対称解除法
      }else if(gpuNodeLayer){
        TOTAL=UNIQUE=0;
        symmetry_build_nodeLayer(size); // 対称解除法
      }
      gettimeofday(&t1,NULL);   // 計測終了
      int ss;int ms;int dd;
      if (t1.tv_usec<t0.tv_usec) {
        dd=(int)(t1.tv_sec-t0.tv_sec-1)/86400;
        ss=(t1.tv_sec-t0.tv_sec-1)%86400;
        ms=(1000000+t1.tv_usec-t0.tv_usec+500)/10000;
      } else {
        dd=(int)(t1.tv_sec-t0.tv_sec)/86400;
        ss=(t1.tv_sec-t0.tv_sec)%86400;
        ms=(t1.tv_usec-t0.tv_usec+500)/10000;
      }//end if
      int hh=ss/3600;
      int mm=(ss-hh*3600)/60;
      ss%=60;
      printf("%2d:%13ld%16ld%4.2d:%02d:%02d:%02d.%02d\n",
          size,TOTAL,UNIQUE,dd,hh,mm,ss,ms);
    }//end for
  }//end if
  return 0;
}

	.file	"tmpxft_00292853_00000000-6_03CUDA_Symmetry_0710_suzuki.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4033:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4033:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z11symmetryOpsjP5local
	.type	_Z11symmetryOpsjP5local, @function
_Z11symmetryOpsjP5local:
.LFB3998:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %rax
	leal	-1(%rdi), %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	4(%rsi), %edx
	movq	24(%rsi,%rdx,8), %rdx
	cmpq	$1, %rdx
	jne	.L4
	movl	$2, %esi
.L3:
	movl	%edx, %ebx
	cmpl	%edi, %edx
	jnb	.L7
	movq	24(%rax,%rdx,8), %r10
	movl	%ecx, %r9d
	movl	$1, %r8d
	movl	%esi, %ebp
.L9:
	movl	%r9d, %r12d
	movl	%r8d, %r11d
	cmpq	%rbp, 24(%rax,%r12,8)
	je	.L5
	cmpq	%r11, %r10
	jb	.L7
	addl	%r8d, %r8d
	decl	%r9d
	jmp	.L9
.L5:
	cmpq	%r10, %r11
	jb	.L2
	incq	%rdx
	cmpq	%r11, %r10
	jb	.L7
	addl	%esi, %esi
	jmp	.L3
.L7:
	cmpl	%ebx, %ecx
	jnb	.L4
	incq	240(%rax)
	jmp	.L2
.L4:
	movl	%ecx, %edx
	movl	12(%rax), %esi
	cmpq	%rsi, 24(%rax,%rdx,8)
	jne	.L11
	movl	$1, %edx
.L10:
	movl	%ecx, %esi
	subl	%edx, %esi
	cmpl	%edx, %ecx
	jb	.L25
	movl	8(%rax), %r9d
	movq	24(%rax,%rsi,8), %r10
	movl	$1, %r8d
	movq	24(%rax,%rdx,8), %rdi
.L12:
	movl	%r9d, %r11d
	movl	%r8d, %esi
	cmpq	%r10, %r11
	je	.L13
	cmpq	%rsi, %rdi
	jb	.L11
	addl	%r8d, %r8d
	shrl	%r9d
	jmp	.L12
.L13:
	cmpq	%rdi, %rsi
	jb	.L2
	incq	%rdx
	cmpq	%rsi, %rdi
	jnb	.L10
	jmp	.L11
.L25:
	incq	248(%rax)
	jmp	.L2
.L11:
	movl	8(%rax), %esi
	movl	(%rax), %edi
	movq	%rsi, %rdx
	cmpq	%rsi, 24(%rax,%rdi,8)
	jne	.L16
	shrl	%edx
	movl	$1, %esi
.L17:
	cmpl	%esi, %ecx
	jb	.L16
	movq	24(%rax,%rsi,8), %r8
	leaq	24(%rax), %r9
	movl	$1, %edi
	movl	%edx, %r11d
.L20:
	movl	%edi, %r10d
	cmpq	%r11, (%r9)
	je	.L18
	addq	$8, %r9
	cmpq	%r10, %r8
	jb	.L16
	addl	%edi, %edi
	jmp	.L20
.L18:
	cmpq	%r8, %r10
	jb	.L2
	incq	%rsi
	cmpq	%r10, %r8
	jb	.L16
	shrl	%edx
	jmp	.L17
.L16:
	incq	256(%rax)
.L2:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3998:
	.size	_Z11symmetryOpsjP5local, .-_Z11symmetryOpsjP5local
	.globl	_Z21symmetry_backTrack_NRjjjjjP5local
	.type	_Z21symmetry_backTrack_NRjjjjjP5local, @function
_Z21symmetry_backTrack_NRjjjjjP5local:
.LFB3999:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	movl	%edi, %r14d
	pushq	%r13
	.cfi_offset 13, -40
	movl	$1, %r13d
	pushq	%r12
	.cfi_offset 12, -48
	movq	%r9, %r12
	pushq	%rbx
	.cfi_offset 3, -56
	movl	%esi, %ebx
	movl	%edx, %esi
	movl	%ecx, %edx
	movl	%edi, %ecx
	sall	%cl, %r13d
	subq	$56, %rsp
	decl	%r13d
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movl	%edi, %eax
	movq	%rsp, %rdi
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	shrq	$4, %rcx
	salq	$4, %rcx
	movq	%rcx, %r9
	andq	$-4096, %r9
	subq	%r9, %rdi
.L27:
	cmpq	%rdi, %rsp
	je	.L28
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L27
.L28:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	je	.L29
	orq	$0, -8(%rsp,%rcx)
.L29:
	movq	%rax, %rdi
	movq	%rsp, %r9
	movq	%rsp, %r15
	shrq	$4, %rdi
	salq	$4, %rdi
	movq	%rdi, %r10
	andq	$-4096, %r10
	subq	%r10, %r9
.L30:
	cmpq	%r9, %rsp
	je	.L31
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L30
.L31:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	je	.L32
	orq	$0, -8(%rsp,%rdi)
.L32:
	movq	%rax, %rdi
	movq	%rsp, %r10
	movq	%rsp, %r9
	shrq	$4, %rdi
	salq	$4, %rdi
	movq	%rdi, %r11
	andq	$-4096, %r11
	subq	%r11, %r10
.L33:
	cmpq	%r10, %rsp
	je	.L34
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L33
.L34:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	je	.L35
	orq	$0, -8(%rsp,%rdi)
.L35:
	shrq	$4, %rax
	movq	%rsp, %rdi
	movq	%rsp, %r10
	salq	$4, %rax
	movq	%rax, %r11
	andq	$-4096, %r11
	subq	%r11, %rdi
.L36:
	cmpq	%rdi, %rsp
	je	.L37
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L36
.L37:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L38
	orq	$0, -8(%rsp,%rax)
.L38:
	movl	%ebx, %edi
	movq	%rsp, %rax
	leal	-1(%r14), %ecx
	movl	%edx, (%r15,%rdi,4)
	orl	%r8d, %edx
	orl	%esi, %edx
	movl	%esi, (%r9,%rdi,4)
	notl	%edx
	movl	%r8d, (%r10,%rdi,4)
	andl	%r13d, %edx
	movl	%ecx, -68(%rbp)
	movl	%edx, (%rax,%rdi,4)
.L39:
	testl	%ebx, %ebx
	je	.L69
	movl	%ebx, %esi
	leal	-1(%rbx), %r8d
	movl	(%rax,%rsi,4), %edi
	testl	%edi, %edi
	je	.L51
	cmpl	(%r12), %ebx
	jnb	.L41
	movl	16(%r12), %edx
	notl	%edx
	andl	%edi, %edx
	movl	%edx, (%rax,%rsi,4)
	jmp	.L44
.L41:
	cmpl	%ebx, 4(%r12)
	jne	.L44
	movl	16(%r12), %edx
	movl	(%r15,%rsi,4), %ecx
	andl	%edx, %ecx
	cmpl	$1, %ecx
	sbbl	$0, %ebx
	movl	%ebx, %esi
	movl	(%r15,%rsi,4), %edi
	andl	%edx, %edi
	cmpl	%edi, %edx
	je	.L44
	andl	%edx, (%rax,%rsi,4)
.L44:
	movl	%ebx, %edi
	movl	(%rax,%rdi,4), %esi
	movl	%esi, %edx
	movl	%esi, %r8d
	negl	%edx
	andl	%esi, %edx
	xorl	%edx, %r8d
	movl	%edx, %ecx
	movl	%r8d, (%rax,%rdi,4)
	leal	-1(%rbx), %r8d
	movq	%rcx, 24(%r12,%rdi,8)
	testl	%edx, %r13d
	je	.L51
	cmpl	%ebx, -68(%rbp)
	jne	.L49
	andl	20(%r12), %esi
	jne	.L50
	movq	%r12, %rsi
	movl	%r14d, %edi
	movq	%rax, -96(%rbp)
	movq	%r10, -88(%rbp)
	movq	%r9, -80(%rbp)
	call	_Z11symmetryOpsjP5local
	movq	-96(%rbp), %rax
	movq	-88(%rbp), %r10
	movq	-80(%rbp), %r9
.L50:
	leal	-1(%rbx), %r8d
	jmp	.L51
.L49:
	leal	1(%rbx), %r11d
	movl	(%r9,%rdi,4), %esi
	movl	(%r15,%rdi,4), %ebx
	movq	%r11, %r8
	orl	%edx, %ebx
	orl	%edx, %esi
	orl	(%r10,%rdi,4), %edx
	addl	%esi, %esi
	shrl	%edx
	movl	%ebx, (%r15,%r11,4)
	movl	%esi, (%r9,%r11,4)
	orl	%edx, %esi
	orl	%ebx, %esi
	movl	%edx, (%r10,%r11,4)
	notl	%esi
	andl	%r13d, %esi
	movl	%esi, (%rax,%r11,4)
.L51:
	movl	%r8d, %ebx
	jmp	.L39
.L69:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3999:
	.size	_Z21symmetry_backTrack_NRjjjjjP5local, .-_Z21symmetry_backTrack_NRjjjjjP5local
	.globl	_Z28symmetry_backTrack_corner_NRjjjjjP5local
	.type	_Z28symmetry_backTrack_corner_NRjjjjjP5local, @function
_Z28symmetry_backTrack_corner_NRjjjjjP5local:
.LFB4000:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%edx, %r10d
	movl	%ecx, %edx
	movl	%edi, %ecx
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	movl	$1, %eax
	movq	%rsp, %rbx
	sall	%cl, %eax
	leal	-1(%rax), %ecx
	movl	%edi, %eax
	leaq	15(,%rax,4), %rax
	movq	%rax, %r11
	shrq	$4, %r11
	salq	$4, %r11
	movq	%r11, %r12
	andq	$-4096, %r12
	subq	%r12, %rbx
.L71:
	cmpq	%rbx, %rsp
	je	.L72
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L71
.L72:
	andl	$4095, %r11d
	subq	%r11, %rsp
	testq	%r11, %r11
	je	.L73
	orq	$0, -8(%rsp,%r11)
.L73:
	movq	%rax, %rbx
	movq	%rsp, %r12
	movq	%rsp, %r11
	shrq	$4, %rbx
	salq	$4, %rbx
	movq	%rbx, %r13
	andq	$-4096, %r13
	subq	%r13, %r12
.L74:
	cmpq	%r12, %rsp
	je	.L75
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L74
.L75:
	andl	$4095, %ebx
	subq	%rbx, %rsp
	testq	%rbx, %rbx
	je	.L76
	orq	$0, -8(%rsp,%rbx)
.L76:
	movq	%rax, %r12
	movq	%rsp, %r13
	movq	%rsp, %rbx
	shrq	$4, %r12
	salq	$4, %r12
	movq	%r12, %r14
	andq	$-4096, %r14
	subq	%r14, %r13
.L77:
	cmpq	%r13, %rsp
	je	.L78
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L77
.L78:
	andl	$4095, %r12d
	subq	%r12, %rsp
	testq	%r12, %r12
	je	.L79
	orq	$0, -8(%rsp,%r12)
.L79:
	shrq	$4, %rax
	movq	%rsp, %r13
	movq	%rsp, %r12
	salq	$4, %rax
	movq	%rax, %r14
	andq	$-4096, %r14
	subq	%r14, %r13
.L80:
	cmpq	%r13, %rsp
	je	.L81
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L80
.L81:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L82
	orq	$0, -8(%rsp,%rax)
.L82:
	movl	%esi, %eax
	movq	%rsp, %r13
	movl	%edx, (%r11,%rax,4)
	orl	%r8d, %edx
	orl	%r10d, %edx
	movl	%r8d, (%r12,%rax,4)
	leal	-1(%rdi), %r8d
	notl	%edx
	movl	%r10d, (%rbx,%rax,4)
	andl	%ecx, %edx
	movl	%edx, 0(%r13,%rax,4)
	leal	-2(%rdi), %eax
	movl	%eax, -68(%rbp)
.L83:
	cmpl	$1, %esi
	jbe	.L104
	cmpl	(%r9), %esi
	movl	%esi, %r14d
	jnb	.L84
	andl	$-3, 0(%r13,%r14,4)
.L84:
	movl	0(%r13,%r14,4), %eax
	leal	-1(%rsi), %edx
	testl	%eax, %eax
	je	.L87
	movl	%eax, %r10d
	negl	%r10d
	andl	%eax, %r10d
	xorl	%r10d, %eax
	movl	%eax, 0(%r13,%r14,4)
	cmpl	%esi, %r8d
	jne	.L86
	incq	256(%r9)
	movl	-68(%rbp), %edx
	jmp	.L87
.L86:
	movl	(%r12,%r14,4), %edi
	movl	(%rbx,%r14,4), %eax
	incl	%esi
	movl	(%r11,%r14,4), %r15d
	movq	%rsi, %rdx
	orl	%r10d, %edi
	orl	%r10d, %eax
	movl	%edi, %r14d
	addl	%eax, %eax
	orl	%r10d, %r15d
	movl	%r10d, %edi
	shrl	%r14d
	movl	%eax, (%rbx,%rsi,4)
	orl	%r14d, %eax
	movl	%r15d, (%r11,%rsi,4)
	orl	%r15d, %eax
	movl	%r14d, (%r12,%rsi,4)
	notl	%eax
	movq	%rdi, 24(%r9,%rsi,8)
	andl	%ecx, %eax
	movl	%eax, 0(%r13,%rsi,4)
.L87:
	movl	%edx, %esi
	jmp	.L83
.L104:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L89
	call	__stack_chk_fail@PLT
.L89:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4000:
	.size	_Z28symmetry_backTrack_corner_NRjjjjjP5local, .-_Z28symmetry_backTrack_corner_NRjjjjjP5local
	.globl	_Z11symmetry_NRjP5local
	.type	_Z11symmetry_NRjP5local, @function
_Z11symmetry_NRjP5local:
.LFB4001:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%ecx, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leal	-1(%rdi), %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edi, %r12d
	xorl	%edi, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$1, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 64
	movq	%rcx, 256(%rsi)
	movq	%rcx, 248(%rsi)
	movq	%rcx, 240(%rsi)
	movq	%rcx, 272(%rsi)
	movq	%rcx, 264(%rsi)
	movl	%r13d, %ecx
	sall	%cl, %ebp
	movq	$2, (%rsi)
	movl	%ebp, 8(%rsi)
	movq	%rdi, 16(%rsi)
	movq	$1, 24(%rsi)
.L106:
	movl	(%rbx), %r15d
	cmpl	$1, %r15d
	jbe	.L114
	cmpl	%r13d, %r15d
	jnb	.L114
	movl	%r15d, %ecx
	movl	%r14d, %edx
	movq	%rbx, %r9
	movl	$2, %esi
	sall	%cl, %edx
	movl	%r12d, %edi
	incl	%r15d
	movl	%edx, %eax
	movl	%edx, %r8d
	movl	%edx, %ecx
	addl	%edx, %edx
	movq	%rax, 32(%rbx)
	shrl	%r8d
	orl	$1, %ecx
	orl	$4, %edx
	orl	$1, %r8d
	call	_Z28symmetry_backTrack_corner_NRjjjjjP5local
	movl	%r15d, (%rbx)
	jmp	.L106
.L114:
	movl	%ebp, %eax
	orl	$1, %ebp
	movl	$1, (%rbx)
	movl	$1, %r14d
	shrl	%eax
	movl	%ebp, 16(%rbx)
	movl	%eax, 12(%rbx)
	leal	-2(%r12), %eax
	movl	%ebp, 20(%rbx)
	movl	%eax, 4(%rbx)
.L109:
	movl	(%rbx), %ebp
	testl	%ebp, %ebp
	jne	.L110
.L113:
	movq	240(%rbx), %rcx
	movq	248(%rbx), %rsi
	movq	256(%rbx), %rax
	leaq	(%rcx,%rsi), %rdx
	addq	%rax, %rdx
	addq	%rax, %rax
	addq	%rsi, %rax
	movq	%rdx, UNIQUE(%rip)
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	movq	%rax, TOTAL(%rip)
	popq	%rax
	.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
	ret
.L110:
	.cfi_restore_state
	movl	4(%rbx), %r15d
	cmpl	%r15d, %ebp
	jnb	.L113
	cmpl	%r13d, %r15d
	jnb	.L113
	movl	%ebp, %ecx
	movl	%r14d, %eax
	movq	%rbx, %r9
	movl	$1, %esi
	sall	%cl, %eax
	movl	%r12d, %edi
	incl	%ebp
	decl	%r15d
	movq	%rax, 24(%rbx)
	movl	%eax, %r8d
	movl	%eax, %ecx
	leal	(%rax,%rax), %edx
	shrl	%r8d
	call	_Z21symmetry_backTrack_NRjjjjjP5local
	movd	20(%rbx), %xmm1
	movd	12(%rbx), %xmm0
	movl	%ebp, (%rbx)
	movaps	%xmm1, %xmm3
	psrld	$1, %xmm0
	movaps	%xmm1, %xmm4
	movl	%r15d, 4(%rbx)
	pslld	$1, %xmm3
	movd	%xmm0, 12(%rbx)
	psrld	$1, %xmm4
	movaps	%xmm3, %xmm0
	orps	%xmm4, %xmm0
	orps	%xmm1, %xmm0
	movd	%xmm0, 20(%rbx)
	jmp	.L109
	.cfi_endproc
.LFE4001:
	.size	_Z11symmetry_NRjP5local, .-_Z11symmetry_NRjP5local
	.globl	_Z18symmetry_backTrackjjjjjP5local
	.type	_Z18symmetry_backTrackjjjjjP5local, @function
_Z18symmetry_backTrackjjjjjP5local:
.LFB4002:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	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
	movq	%r9, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%ecx, %ebx
	movl	%edi, %ecx
	orl	%r8d, %ebx
	orl	%edx, %ebx
	movl	$1, %edx
	sall	%cl, %edx
	notl	%ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	decl	%edx
	andl	%edx, %ebx
	leal	-1(%rdi), %edx
	cmpl	%esi, %edx
	jne	.L124
	testl	%ebx, %ebx
	je	.L123
	movl	%ebx, %eax
	andl	20(%r9), %eax
	jne	.L123
	movl	%ebx, %eax
	movq	%r9, %rsi
	movq	%rax, 24(%r9,%rdx,8)
	addq	$24, %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	_Z11symmetryOpsjP5local
.L124:
	.cfi_restore_state
	movl	%esi, %r12d
	movl	%r8d, %r13d
	cmpl	(%r9), %esi
	jnb	.L128
	movl	16(%r9), %edx
	notl	%edx
	jmp	.L136
.L128:
	cmpl	%esi, 4(%r9)
	jne	.L129
	movl	16(%r9), %edx
	movl	%edx, %ecx
	andl	%r14d, %ecx
	je	.L123
	cmpl	%ecx, %edx
	je	.L129
.L136:
	andl	%edx, %ebx
.L129:
	leal	1(%r12), %eax
	movl	%eax, 8(%rsp)
.L130:
	testl	%ebx, %ebx
	je	.L123
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	8(%rsp), %esi
	negl	%edx
	movq	%rbp, %r9
	movl	%edi, 12(%rsp)
	andl	%ebx, %edx
	movl	%edx, %eax
	orl	%edx, %r8d
	xorl	%edx, %ebx
	movq	%rax, 24(%rbp,%rcx,8)
	movl	%r14d, %ecx
	shrl	%r8d
	orl	%edx, %ecx
	orl	%r15d, %edx
	addl	%edx, %edx
	call	_Z18symmetry_backTrackjjjjjP5local
	movl	12(%rsp), %edi
	jmp	.L130
.L123:
	addq	$24, %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
.LFE4002:
	.size	_Z18symmetry_backTrackjjjjjP5local, .-_Z18symmetry_backTrackjjjjjP5local
	.globl	_Z25symmetry_backTrack_cornerjjjjjP5local
	.type	_Z25symmetry_backTrack_cornerjjjjjP5local, @function
_Z25symmetry_backTrack_cornerjjjjjP5local:
.LFB4003:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%ecx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%edx, %r14d
	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
	movq	%r9, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%ecx, %ebx
	movl	%edi, %ecx
	orl	%r8d, %ebx
	orl	%edx, %ebx
	movl	$1, %edx
	sall	%cl, %edx
	notl	%ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	decl	%edx
	andl	%edx, %ebx
	leal	-1(%rdi), %edx
	cmpl	%esi, %edx
	jne	.L138
	testl	%ebx, %ebx
	je	.L137
	movl	%ebx, %eax
	movq	%rax, 24(%r9,%rdx,8)
	incq	256(%r9)
	jmp	.L137
.L138:
	movl	%esi, %r12d
	movl	%r8d, %r13d
	cmpl	(%r9), %esi
	jnb	.L141
	andl	$-3, %ebx
.L141:
	leal	1(%r12), %eax
	movl	%eax, 8(%rsp)
.L142:
	testl	%ebx, %ebx
	je	.L137
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	8(%rsp), %esi
	negl	%edx
	movq	%rbp, %r9
	movl	%edi, 12(%rsp)
	andl	%ebx, %edx
	movl	%edx, %eax
	orl	%edx, %r8d
	xorl	%edx, %ebx
	movq	%rax, 24(%rbp,%rcx,8)
	movl	%r15d, %ecx
	shrl	%r8d
	orl	%edx, %ecx
	orl	%r14d, %edx
	addl	%edx, %edx
	call	_Z25symmetry_backTrack_cornerjjjjjP5local
	movl	12(%rsp), %edi
	jmp	.L142
.L137:
	addq	$24, %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
.LFE4003:
	.size	_Z25symmetry_backTrack_cornerjjjjjP5local, .-_Z25symmetry_backTrack_cornerjjjjjP5local
	.globl	_Z10symmetry_RjP5local
	.type	_Z10symmetry_RjP5local, @function
_Z10symmetry_RjP5local:
.LFB4004:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%ecx, %ecx
	movl	$1, %r10d
	movl	$1, %r11d
	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
	leal	-1(%rdi), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edi, %ebp
	xorl	%edi, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 64
	movq	%rcx, 256(%rsi)
	movq	%rcx, 248(%rsi)
	movq	%rcx, 240(%rsi)
	movq	%rcx, 272(%rsi)
	movq	%rcx, 264(%rsi)
	movl	%r12d, %ecx
	sall	%cl, %r10d
	movq	$2, (%rsi)
	movl	%r10d, 8(%rsi)
	movq	%rdi, 16(%rsi)
	movq	$1, 24(%rsi)
.L147:
	movl	(%rbx), %r13d
	cmpl	$1, %r13d
	jbe	.L155
	cmpl	%r12d, %r13d
	jnb	.L155
	movl	%r13d, %ecx
	movl	%r11d, %edx
	movq	%rbx, %r9
	movl	$2, %esi
	sall	%cl, %edx
	movl	%ebp, %edi
	incl	%r13d
	movl	%edx, %eax
	movl	%edx, %r8d
	movl	%edx, %ecx
	addl	%edx, %edx
	movq	%rax, 32(%rbx)
	shrl	%r8d
	orl	$1, %ecx
	orl	$4, %edx
	orl	$1, %r8d
	call	_Z25symmetry_backTrack_cornerjjjjjP5local
	movl	%r13d, (%rbx)
	jmp	.L147
.L155:
	movl	%r10d, %eax
	orl	$1, %r10d
	movl	$1, (%rbx)
	movl	$1, %r14d
	shrl	%eax
	movl	%r10d, 16(%rbx)
	movl	%eax, 12(%rbx)
	leal	-2(%rbp), %eax
	movl	%r10d, 20(%rbx)
	movl	%eax, 4(%rbx)
.L150:
	movl	(%rbx), %r13d
	testl	%r13d, %r13d
	jne	.L151
.L154:
	movq	240(%rbx), %rcx
	movq	248(%rbx), %rsi
	movq	256(%rbx), %rax
	leaq	(%rcx,%rsi), %rdx
	addq	%rax, %rdx
	addq	%rax, %rax
	addq	%rsi, %rax
	movq	%rdx, UNIQUE(%rip)
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	movq	%rax, TOTAL(%rip)
	popq	%rax
	.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
	ret
.L151:
	.cfi_restore_state
	movl	4(%rbx), %r15d
	cmpl	%r15d, %r13d
	jnb	.L154
	cmpl	%r12d, %r15d
	jnb	.L154
	movl	%r13d, %ecx
	movl	%r14d, %eax
	movq	%rbx, %r9
	movl	$1, %esi
	sall	%cl, %eax
	movl	%ebp, %edi
	incl	%r13d
	decl	%r15d
	movq	%rax, 24(%rbx)
	movl	%eax, %r8d
	movl	%eax, %ecx
	leal	(%rax,%rax), %edx
	shrl	%r8d
	call	_Z18symmetry_backTrackjjjjjP5local
	movd	20(%rbx), %xmm1
	movd	12(%rbx), %xmm0
	movl	%r13d, (%rbx)
	movaps	%xmm1, %xmm3
	psrld	$1, %xmm0
	movaps	%xmm1, %xmm4
	movl	%r15d, 4(%rbx)
	pslld	$1, %xmm3
	movd	%xmm0, 12(%rbx)
	psrld	$1, %xmm4
	movaps	%xmm3, %xmm0
	orps	%xmm4, %xmm0
	orps	%xmm1, %xmm0
	movd	%xmm0, 20(%rbx)
	jmp	.L150
	.cfi_endproc
.LFE4004:
	.size	_Z10symmetry_RjP5local, .-_Z10symmetry_RjP5local
	.globl	_Z15GPU_symmetryOpsjP5local
	.type	_Z15GPU_symmetryOpsjP5local, @function
_Z15GPU_symmetryOpsjP5local:
.LFB4724:
	.cfi_startproc
	endbr64
	jmp	_Z11symmetryOpsjP5local
	.cfi_endproc
.LFE4724:
	.size	_Z15GPU_symmetryOpsjP5local, .-_Z15GPU_symmetryOpsjP5local
	.globl	_Z22GPU_symmetry_backTrackjjjjjP5local
	.type	_Z22GPU_symmetry_backTrackjjjjjP5local, @function
_Z22GPU_symmetry_backTrackjjjjjP5local:
.LFB4726:
	.cfi_startproc
	endbr64
	jmp	_Z18symmetry_backTrackjjjjjP5local
	.cfi_endproc
.LFE4726:
	.size	_Z22GPU_symmetry_backTrackjjjjjP5local, .-_Z22GPU_symmetry_backTrackjjjjjP5local
	.globl	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local
	.type	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local, @function
_Z29GPU_symmetry_backTrack_cornerjjjjjP5local:
.LFB4728:
	.cfi_startproc
	endbr64
	jmp	_Z25symmetry_backTrack_cornerjjjjjP5local
	.cfi_endproc
.LFE4728:
	.size	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local, .-_Z29GPU_symmetry_backTrack_cornerjjjjjP5local
	.globl	_Z24symmetry_solve_nodeLayerjmmm
	.type	_Z24symmetry_solve_nodeLayerjmmm, @function
_Z24symmetry_solve_nodeLayerjmmm:
.LFB4008:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rcx, %r15
	movl	$1, %eax
	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
	movl	$1, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	movb	12(%rsp), %cl
	sall	%cl, %eax
	decl	%eax
	cltq
	cmpq	%rdx, %rax
	je	.L167
	movq	%rsi, %rbx
	movq	%rsi, %r14
	movq	%rdx, %r13
	xorl	%ebp, %ebp
	orq	%r15, %rbx
	orq	%rdx, %rbx
	notq	%rbx
	andq	%rax, %rbx
.L169:
	testq	%rbx, %rbx
	je	.L167
	movq	%rbx, %r12
	movl	12(%rsp), %edi
	negq	%r12
	andq	%rbx, %r12
	movq	%r12, %rcx
	movq	%r12, %rsi
	movq	%r12, %rdx
	xorq	%r12, %rbx
	orq	%r15, %rcx
	orq	%r14, %rsi
	orq	%r13, %rdx
	addq	%rcx, %rcx
	shrq	%rsi
	call	_Z24symmetry_solve_nodeLayerjmmm
	addq	%rax, %rbp
	jmp	.L169
.L167:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbp, %rax
	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
.LFE4008:
	.size	_Z24symmetry_solve_nodeLayerjmmm, .-_Z24symmetry_solve_nodeLayerjmmm
	.globl	_Z19countBits_nodeLayerl
	.type	_Z19countBits_nodeLayerl, @function
_Z19countBits_nodeLayerl:
.LFB4009:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L175:
	testq	%rdi, %rdi
	je	.L177
	leaq	-1(%rdi), %rdx
	incl	%eax
	andq	%rdx, %rdi
	jmp	.L175
.L177:
	ret
	.cfi_endproc
.LFE4009:
	.size	_Z19countBits_nodeLayerl, .-_Z19countBits_nodeLayerl
	.globl	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
	.type	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local, @function
_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local:
.LFB4010:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %r10d
	xorl	%edx, %edx
	movl	$1, %r11d
	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
	leal	-1(%rdi), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r12d, %ecx
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sall	%cl, %r10d
	xorl	%ecx, %ecx
	pushq	%rax
	.cfi_def_cfa_offset 64
	movq	64(%rsp), %rbx
	movq	%rdx, 264(%rbx)
	movq	%rdx, 272(%rbx)
	movq	%rdx, 240(%rbx)
	movq	%rdx, 248(%rbx)
	movq	%rdx, 256(%rbx)
	movl	%r10d, 8(%rbx)
	movq	$2, (%rbx)
	movq	%rcx, 16(%rbx)
	movq	$1, 24(%rbx)
.L179:
	movl	(%rbx), %r13d
	cmpl	$1, %r13d
	ja	.L180
.L183:
	movl	%r10d, %eax
	orl	$1, %r10d
	movl	$1, (%rbx)
	movl	$1, %r14d
	shrl	%eax
	movl	%r10d, 16(%rbx)
	movl	%eax, 12(%rbx)
	leal	-2(%rbp), %eax
	movl	%r10d, 20(%rbx)
	movl	%eax, 4(%rbx)
	jmp	.L181
.L180:
	cmpl	%r12d, %r13d
	jnb	.L183
	movl	%r13d, %ecx
	movl	%r11d, %edx
	movq	%rbx, %r9
	movl	$2, %esi
	sall	%cl, %edx
	movl	%ebp, %edi
	incl	%r13d
	movl	%edx, %eax
	movl	%edx, %r8d
	movl	%edx, %ecx
	addl	%edx, %edx
	movq	%rax, 32(%rbx)
	shrl	%r8d
	orl	$1, %ecx
	orl	$4, %edx
	orl	$1, %r8d
	call	_Z25symmetry_backTrack_cornerjjjjjP5local
	movl	%r13d, (%rbx)
	jmp	.L179
.L184:
	movl	4(%rbx), %r15d
	cmpl	%r12d, %r15d
	jnb	.L187
	cmpl	%r15d, %r13d
	jnb	.L187
	movl	%r13d, %ecx
	movl	%r14d, %eax
	movq	%rbx, %r9
	movl	$1, %esi
	sall	%cl, %eax
	movl	%ebp, %edi
	incl	%r13d
	decl	%r15d
	movq	%rax, 24(%rbx)
	movl	%eax, %r8d
	movl	%eax, %ecx
	leal	(%rax,%rax), %edx
	shrl	%r8d
	call	_Z18symmetry_backTrackjjjjjP5local
	movd	20(%rbx), %xmm1
	movd	12(%rbx), %xmm0
	movl	%r13d, (%rbx)
	movaps	%xmm1, %xmm3
	psrld	$1, %xmm0
	movaps	%xmm1, %xmm4
	movl	%r15d, 4(%rbx)
	pslld	$1, %xmm3
	movd	%xmm0, 12(%rbx)
	psrld	$1, %xmm4
	movaps	%xmm3, %xmm0
	orps	%xmm4, %xmm0
	orps	%xmm1, %xmm0
	movd	%xmm0, 20(%rbx)
.L181:
	movl	(%rbx), %r13d
	testl	%r13d, %r13d
	jne	.L184
.L187:
	movq	240(%rbx), %rcx
	movq	248(%rbx), %rsi
	movq	256(%rbx), %rax
	leaq	(%rcx,%rsi), %rdx
	addq	%rax, %rdx
	addq	%rax, %rax
	addq	%rsi, %rax
	movq	%rdx, UNIQUE(%rip)
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	movq	%rax, TOTAL(%rip)
	.cfi_endproc
.LFE4010:
	.size	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local, .-_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
	.globl	_Z16kLayer_nodeLayeriiP5local
	.type	_Z16kLayer_nodeLayeriiP5local, @function
_Z16kLayer_nodeLayeriiP5local:
.LFB4011:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	xorl	%eax, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	%esi, %r11d
	movq	%rcx, %rsi
	movl	$6, %ecx
	subq	$16, %rsp
	.cfi_def_cfa_offset 24
	movq	%rdi, %r10
	rep stosl
	pushq	%rsi
	.cfi_def_cfa_offset 32
	movl	%r11d, %edi
	movq	%r10, %rsi
	call	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
	.cfi_endproc
.LFE4011:
	.size	_Z16kLayer_nodeLayeriiP5local, .-_Z16kLayer_nodeLayeriiP5local
	.globl	_Z24symmetry_build_nodeLayeri
	.type	_Z24symmetry_build_nodeLayeri, @function
_Z24symmetry_build_nodeLayeri:
.LFB4028:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4104
	orq	$0, (%rsp)
	subq	$3512, %rsp
	.cfi_def_cfa_offset 7616
	movl	$4, %edx
	movq	%fs:40, %rax
	movq	%rax, 7592(%rsp)
	xorl	%eax, %eax
	movl	%edi, %esi
	leaq	32(%rsp), %rcx
	leaq	8(%rsp), %rdi
	call	_Z16kLayer_nodeLayeriiP5local
	.cfi_endproc
.LFE4028:
	.size	_Z24symmetry_build_nodeLayeri, .-_Z24symmetry_build_nodeLayeri
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"There is no device.\n"
.LC1:
	.string	"There is no device supporting CUDA 1.x.\n"
	.text
	.globl	_Z8InitCUDAv
	.type	_Z8InitCUDAv, @function
_Z8InitCUDAv:
.LFB4029:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1064, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdi
	call	cudaGetDeviceCount@PLT
	cmpl	$0, 12(%rsp)
	leaq	.LC0(%rip), %rdx
	je	.L211
	xorl	%ebx, %ebx
	leaq	16(%rsp), %rbp
.L198:
	cmpl	%ebx, 12(%rsp)
	jle	.L202
	movl	%ebx, %esi
	movq	%rbp, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	testl	%eax, %eax
	jne	.L200
	cmpl	$0, 376(%rsp)
	jg	.L202
.L200:
	incl	%ebx
	jmp	.L198
.L202:
	cmpl	%ebx, 12(%rsp)
	jne	.L204
	leaq	.LC1(%rip), %rdx
.L211:
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	jmp	.L197
.L204:
	movl	%ebx, %edi
	call	cudaSetDevice@PLT
	movb	$1, %al
.L197:
	movq	1048(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L206
	call	__stack_chk_fail@PLT
.L206:
	addq	$1064, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4029:
	.size	_Z8InitCUDAv, .-_Z8InitCUDAv
	.section	.rodata.str1.1
.LC2:
	.string	"Usage: %s [-c|-g|-r|-s] n steps\n"
.LC3:
	.string	"  -r: CPU \345\206\215\345\270\260\n"
.LC4:
	.string	"  -c: CPU \351\235\236\345\206\215\345\270\260\n"
.LC5:
	.string	"  -g: GPU \345\206\215\345\270\260\n"
.LC6:
	.string	"  -n: GPU \343\203\216\343\203\274\343\203\211\343\203\254\343\202\244\343\203\244\343\203\274\n"
.LC7:
	.string	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 \345\206\215\345\270\260 \n"
.LC8:
	.string	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 \351\235\236\345\206\215\345\270\260 \n"
.LC9:
	.string	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 GPU\n"
.LC10:
	.string	" N:           Total           Unique          dd:hh:mm:ss.ms"
.LC11:
	.string	"%s\n"
.LC12:
	.string	"%2d:%16ld%17ld%12.2d:%02d:%02d:%02d.%02d\n"
.LC13:
	.string	" N:        Total      Unique      dd:hh:mm:ss.ms"
.LC14:
	.string	"%2d:%13ld%16ld%4.2d:%02d:%02d:%02d.%02d\n"
.LC15:
	.string	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 GPU\343\203\216\343\203\274\343\203\211\343\203\254\343\202\244\343\203\244\343\203\274 \n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB4030:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$328, %rsp
	.cfi_def_cfa_offset 368
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	decl	%edi
	jle	.L213
	movq	8(%rsi), %rax
	cmpb	$45, (%rax)
	jne	.L220
	movb	1(%rax), %cl
	subl	$67, %ecx
	cmpb	$47, %cl
	ja	.L215
	movabsq	$4294967297, %rdx
	movl	$1, %eax
	salq	%cl, %rax
	testq	%rdx, %rax
	jne	.L238
	movabsq	$140737488388096, %rdx
	testq	%rdx, %rax
	jne	.L239
	movabsq	$68719476752, %rdx
	testq	%rdx, %rax
	je	.L215
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movb	$1, %bpl
	call	__printf_chk@PLT
	jmp	.L235
.L213:
	movq	(%rsi), %rdx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L220
.L238:
	xorl	%r12d, %r12d
	movb	$1, %bpl
	leaq	.LC8(%rip), %rsi
.L254:
	movl	$2, %edi
	xorl	%eax, %eax
	movl	$4, %ebx
	call	__printf_chk@PLT
	leaq	.LC10(%rip), %rdx
	leaq	.LC11(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	leaq	.LC12(%rip), %r13
	call	__printf_chk@PLT
.L225:
	xorl	%esi, %esi
	movq	%rsp, %rdi
	call	gettimeofday@PLT
	testb	%r12b, %r12b
	je	.L221
	leaq	32(%rsp), %rsi
	movl	%ebx, %edi
	call	_Z10symmetry_RjP5local
.L221:
	testb	%bpl, %bpl
	je	.L222
	leaq	32(%rsp), %rsi
	movl	%ebx, %edi
	call	_Z11symmetry_NRjP5local
.L222:
	leaq	16(%rsp), %rdi
	xorl	%esi, %esi
	call	gettimeofday@PLT
	movq	24(%rsp), %rcx
	movq	8(%rsp), %rdi
	movq	16(%rsp), %rax
	cmpq	%rdi, %rcx
	jge	.L223
	subq	(%rsp), %rax
	movl	$86400, %r8d
	subq	%rdi, %rcx
	decq	%rax
	addq	$1000500, %rcx
	cqto
	idivq	%r8
	movq	%rax, %r9
	movl	%edx, %esi
.L255:
	movq	%rcx, %rax
	movl	$10000, %edi
	movq	UNIQUE(%rip), %r8
	cqto
	idivq	%rdi
	movl	$3600, %edi
	movq	%rax, %rcx
	movl	%esi, %eax
	cltd
	pushq	%rcx
	.cfi_def_cfa_offset 376
	movl	$60, %ecx
	idivl	%edi
	movl	%eax, %edi
	movl	%esi, %eax
	cltd
	idivl	%ecx
	imull	$-3600, %edi, %eax
	addl	%esi, %eax
	movq	%r13, %rsi
	pushq	%rdx
	.cfi_def_cfa_offset 384
	cltd
	idivl	%ecx
	movq	TOTAL(%rip), %rcx
	movl	%ebx, %edx
	incl	%ebx
	pushq	%rax
	.cfi_def_cfa_offset 392
	xorl	%eax, %eax
	pushq	%rdi
	.cfi_def_cfa_offset 400
	movl	$2, %edi
	call	__printf_chk@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 368
	cmpl	$18, %ebx
	jne	.L225
.L220:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	je	.L236
	call	__stack_chk_fail@PLT
.L215:
	leaq	.LC15(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	call	__printf_chk@PLT
.L235:
	call	_Z8InitCUDAv
	testb	%al, %al
	je	.L220
	leaq	.LC13(%rip), %rdx
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$4, %ebx
	leaq	.LC14(%rip), %r12
.L230:
	movq	%rsp, %rdi
	xorl	%esi, %esi
	call	gettimeofday@PLT
	xorl	%edx, %edx
	movq	%rdx, UNIQUE(%rip)
	testb	%bpl, %bpl
	je	.L226
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	xorl	%esi, %esi
	movl	%ebx, %edi
	call	_Z24symmetry_solve_nodeLayerjmmm
	xorl	%esi, %esi
	leaq	16(%rsp), %rdi
	movq	%rax, TOTAL(%rip)
	call	gettimeofday@PLT
	movq	24(%rsp), %rcx
	movq	8(%rsp), %rdi
	movq	16(%rsp), %rsi
	movq	(%rsp), %r8
	cmpq	%rdi, %rcx
	jge	.L257
	leal	-1(%rsi), %eax
	movl	$86400, %r9d
	subq	%r8, %rsi
	subq	%rdi, %rcx
	subl	%r8d, %eax
	movl	$86400, %r8d
	addq	$1000500, %rcx
	cltd
	idivl	%r9d
	movl	%eax, %r9d
	leaq	-1(%rsi), %rax
	cqto
	idivq	%r8
	movl	%edx, %esi
	jmp	.L256
.L226:
	xorl	%eax, %eax
	movl	%ebx, %edi
	movq	%rax, TOTAL(%rip)
	call	_Z24symmetry_build_nodeLayeri
.L257:
	movl	%esi, %eax
	movl	$86400, %r10d
	subq	%rdi, %rcx
	subl	%r8d, %eax
	addq	$500, %rcx
	cltd
	idivl	%r10d
	movl	%eax, %r9d
	movq	%rsi, %rax
	subq	%r8, %rax
	movl	$86400, %r8d
	cqto
	idivq	%r8
	movl	%edx, %esi
.L256:
	movq	%rcx, %rax
	movl	$10000, %edi
	movq	UNIQUE(%rip), %r8
	cqto
	idivq	%rdi
	movl	$3600, %edi
	movq	%rax, %rcx
	movl	%esi, %eax
	cltd
	pushq	%rcx
	.cfi_def_cfa_offset 376
	movl	$60, %ecx
	idivl	%edi
	movl	%eax, %edi
	movl	%esi, %eax
	cltd
	idivl	%ecx
	imull	$-3600, %edi, %eax
	addl	%esi, %eax
	movq	%r12, %rsi
	pushq	%rdx
	.cfi_def_cfa_offset 384
	cltd
	idivl	%ecx
	movq	TOTAL(%rip), %rcx
	movl	%ebx, %edx
	incl	%ebx
	pushq	%rax
	.cfi_def_cfa_offset 392
	xorl	%eax, %eax
	pushq	%rdi
	.cfi_def_cfa_offset 400
	movl	$2, %edi
	call	__printf_chk@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 368
	cmpl	$22, %ebx
	jne	.L230
	jmp	.L220
.L239:
	movb	$1, %r12b
	xorl	%ebp, %ebp
	leaq	.LC7(%rip), %rsi
	jmp	.L254
.L223:
	subq	(%rsp), %rax
	movl	$86400, %r8d
	subq	%rdi, %rcx
	cqto
	addq	$500, %rcx
	idivq	%r8
	movq	%rax, %r9
	movl	%edx, %esi
	jmp	.L255
.L236:
	addq	$328, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4030:
	.size	main, .-main
	.text
	.globl	_Z37__device_stub__Z13dim_nodeLayerjPlS_jjPlS_j
	.type	_Z37__device_stub__Z13dim_nodeLayerjPlS_jjPlS_j, @function
_Z37__device_stub__Z13dim_nodeLayerjPlS_jjPlS_j:
.LFB4055:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movl	%edi, 28(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 24(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L258
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z13dim_nodeLayerjPlS_j(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L258:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L260
	call	__stack_chk_fail@PLT
.L260:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4055:
	.size	_Z37__device_stub__Z13dim_nodeLayerjPlS_jjPlS_j, .-_Z37__device_stub__Z13dim_nodeLayerjPlS_jjPlS_j
	.globl	_Z13dim_nodeLayerjPlS_j
	.type	_Z13dim_nodeLayerjPlS_j, @function
_Z13dim_nodeLayerjPlS_j:
.LFB4056:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z13dim_nodeLayerjPlS_jjPlS_j
	.cfi_endproc
.LFE4056:
	.size	_Z13dim_nodeLayerjPlS_j, .-_Z13dim_nodeLayerjPlS_j
	.section	.rodata.str1.1
.LC16:
	.string	"_Z13dim_nodeLayerjPlS_j"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4058:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC16(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z13dim_nodeLayerjPlS_j(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4058:
	.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
	.globl	UNIQUE
	.bss
	.align 8
	.type	UNIQUE, @object
	.size	UNIQUE, 8
UNIQUE:
	.zero	8
	.globl	TOTAL
	.align 8
	.type	TOTAL, @object
	.size	TOTAL, 8
TOTAL:
	.zero	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:

/**
 *
 * bash版対称解除法のC言語版のGPU/CUDA移植版
 *
 詳しい説明はこちらをどうぞ
 https://suzukiiichiro.github.io/search/?keyword=Ｎクイーン問題
 *
*/
#include <iostream>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <hip/hip_runtime.h>


#define THREAD_NUM		96
#define MAX 27
// システムによって以下のマクロが必要であればコメントを外してください。
//#define UINT64_C(c) c ## ULL
//
// グローバル変数
unsigned long TOTAL=0;
unsigned long UNIQUE=0;
//GPU で使うローカル構造体
typedef struct
{
  unsigned int BOUND1,BOUND2,TOPBIT,ENDBIT,SIDEMASK,LASTMASK;
  unsigned long board[MAX];
  unsigned long COUNT2,COUNT4,COUNT8,TOTAL,UNIQUE;
}local;
// GPU 再帰 非再帰 対称解除法
__host__ __device__
void symmetryOps(unsigned int size,local* l)
{
  /**
  ２．クイーンが右上角以外にある場合、
  (1) 90度回転させてオリジナルと同型になる場合、さらに90度回転(オリジナルか
  ら180度回転)させても、さらに90度回転(オリジナルから270度回転)させてもオリ
  ジナルと同型になる。
  こちらに該当するユニーク解が属するグループの要素数は、左右反転させたパター
  ンを加えて２個しかありません。
  */
  if(l->board[l->BOUND2]==1){
    unsigned int ptn;
    unsigned int own;
    for(ptn=2,own=1;own<size;++own,ptn<<=1){
      unsigned int bit;
      unsigned int you;
      for(bit=1,you=size-1;(l->board[you]!=ptn)&&l->board[own]>=bit;--you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    // ９０度回転して同型なら１８０度回転しても２７０度回転しても同型である
    if(own>size-1){
      l->COUNT2++;
      return ;
    }//end if
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (2) 90度回転させてオリジナルと異なる場合は、270度回転させても必ずオリジナル
    とは異なる。ただし、180度回転させた場合はオリジナルと同型になることも有り得
    る。こちらに該当するユニーク解が属するグループの要素数は、180度回転させて同
    型になる場合は４個(左右反転×縦横回転)
   */
  //１８０度回転
  if(l->board[size-1]==l->ENDBIT){
    unsigned int you;
    unsigned int own;
    for(you=size-1-1,own=1;own<=size-1;++own,--you){
      unsigned int bit;
      unsigned int ptn;
      for(bit=1,ptn=l->TOPBIT;(ptn!=l->board[you])&&(l->board[own]>=bit);ptn>>=1){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    //９０度回転が同型でなくても１８０度回転が同型であることもある
    if(own>size-1){
      l->COUNT4++;
      return ;
    }
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (3)180度回転させてもオリジナルと異なる場合は、８個(左右反転×縦横回転×上下反転)
  */
  //２７０度回転
  if(l->board[l->BOUND1]==l->TOPBIT){
    unsigned int ptn;
    unsigned int own;
    unsigned int you;
    unsigned int bit;
    for(ptn=l->TOPBIT>>1,own=1;own<=size-1;++own,ptn>>=1){
      for(bit=1,you=0;(l->board[you]!=ptn)&&(l->board[own]>=bit);++you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
  }//end if
  l->COUNT8++;
}
// 非再帰 角にQがないときのバックトラック
void symmetry_backTrack_NR(unsigned int size,unsigned int row,unsigned int _left,unsigned int _down,unsigned int _right,local *l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int down[size];
  unsigned int left[size];
  unsigned int right[size];
  unsigned int bitmap[size];
  left[row]=_left;
  down[row]=_down;
  right[row]=_right;
  bitmap[row]=mask&~(left[row]|down[row]|right[row]);
  while(row>0){
    if(bitmap[row]>0){
      if(row<l->BOUND1){ //上部サイド枝刈り
        bitmap[row]|=l->SIDEMASK;
        bitmap[row]^=l->SIDEMASK;
      }else if(row==l->BOUND2){ //下部サイド枝刈り
        if((down[row]&l->SIDEMASK)==0){
          row--; 
        }
        if((down[row]&l->SIDEMASK)!=l->SIDEMASK){
          bitmap[row]&=l->SIDEMASK;
        }
      }
      unsigned int save_bitmap=bitmap[row];
      unsigned int bit=-bitmap[row]&bitmap[row];
      bitmap[row]^=bit;
      l->board[row]=bit; //Qを配置
      if((bit&mask)!=0){
        if(row==(size-1)){
          if( (save_bitmap&l->LASTMASK)==0){
            symmetryOps(size,l);  //対称解除法
          }
          row--;
        }else{
          unsigned int n=row++;
          left[row]=(left[n]|bit)<<1;
          down[row]=(down[n]|bit);
          right[row]=(right[n]|bit)>>1;
          bitmap[row]=mask&~(left[row]|down[row]|right[row]);
        }
      }else{
        row--;
      }
    }else{
      row--;
    }
  }//end while
}
// 非再帰 角にQがあるときのバックトラック
void symmetry_backTrack_corner_NR(unsigned int size,unsigned int row,unsigned int _left,unsigned int _down, unsigned int _right,local *l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bit=0;
  unsigned int down[size];
  unsigned int left[size];
  unsigned int right[size];
  unsigned int bitmap[size];
  left[row]=_left;
  down[row]=_down;
  right[row]=_right;
  bitmap[row]=mask&~(left[row]|down[row]|right[row]);
  while(row>=2){
    if(row<l->BOUND1){
      // bitmap[row]=bitmap[row]|2;
      // bitmap[row]=bitmap[row]^2;
      bitmap[row]&=~2;
    }
    if(bitmap[row]>0){
      bit=-bitmap[row]&bitmap[row];
      bitmap[row]^=bit;
      if(row==(size-1)){
        l->COUNT8++;
        row--;
      }else{
        unsigned int n=row++;
        left[row]=(left[n]|bit)<<1;
        down[row]=(down[n]|bit);
        right[row]=(right[n]|bit)>>1;
        l->board[row]=bit; //Qを配置
        //クイーンが配置可能な位置を表す
        bitmap[row]=mask&~(left[row]|down[row]|right[row]);
      }
    }else{
      row--;
    }
  }//end while
}
// 非再帰 対称解除法
void symmetry_NR(unsigned int size,local* l)
{
  l->TOTAL=l->UNIQUE=l->COUNT2=l->COUNT4=l->COUNT8=0;
  unsigned int bit=0;
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->SIDEMASK=l->LASTMASK=0;
  l->BOUND1=2;
  l->BOUND2=0;
  l->board[0]=1;
  while(l->BOUND1>1&&l->BOUND1<size-1){
    if(l->BOUND1<size-1){
      bit=1<<l->BOUND1;
      l->board[1]=bit;   //２行目にQを配置
      //角にQがあるときのバックトラック
      symmetry_backTrack_corner_NR(size,2,(2|bit)<<1,1|bit,(2|bit)>>1,l);
    }
    l->BOUND1++;
  }
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->TOPBIT>>1;
  l->SIDEMASK=l->TOPBIT|1;
  l->LASTMASK=l->TOPBIT|1;
  l->BOUND1=1;
  l->BOUND2=size-2;
  while(l->BOUND1>0 && l->BOUND2<size-1 && l->BOUND1<l->BOUND2){
    if(l->BOUND1<l->BOUND2){
      bit=1<<l->BOUND1;
      l->board[0]=bit;   //Qを配置
      //角にQがないときのバックトラック
      symmetry_backTrack_NR(size,1,bit<<1,bit,bit>>1,l);
    }
    l->BOUND1++;
    l->BOUND2--;
    l->ENDBIT=l->ENDBIT>>1;
    l->LASTMASK=l->LASTMASK<<1|l->LASTMASK|l->LASTMASK>>1;
  }//ene while
  UNIQUE=l->COUNT2+l->COUNT4+l->COUNT8;
  TOTAL=l->COUNT2*2+l->COUNT4*4+l->COUNT8*8;
}
// 再帰 角にQがないときのバックトラック
void symmetry_backTrack(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  if(row==(size-1)){
    if(bitmap){
      if( (bitmap&l->LASTMASK)==0){
        l->board[row]=bitmap;  //Qを配置
        symmetryOps(size,l);    //対称解除
      }
    }
  }else{
    if(row<l->BOUND1){
      bitmap=bitmap|l->SIDEMASK;
      bitmap=bitmap^l->SIDEMASK;
    }else{
      if(row==l->BOUND2){
        if((down&l->SIDEMASK)==0){
          return;
        }
        if( (down&l->SIDEMASK)!=l->SIDEMASK){
          bitmap=bitmap&l->SIDEMASK;
        }
      }
    }
    while(bitmap){
      unsigned int bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;
      symmetry_backTrack(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }//end while
  }//end if
}
// 再帰 角にQがあるときのバックトラック
void symmetry_backTrack_corner(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  unsigned int bit=0;
  if(row==(size-1)){
    if(bitmap){
      l->board[row]=bitmap;
      l->COUNT8++;
    }
  }else{
    if(row<l->BOUND1){   //枝刈り
      bitmap=bitmap|2;
      bitmap=bitmap^2;
    }
    while(bitmap){
      bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;   //Qを配置
      symmetry_backTrack_corner(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }
  }
}
// 再帰 対称解除法
void symmetry_R(unsigned int size,local* l)
{
  l->TOTAL=l->UNIQUE=l->COUNT2=l->COUNT4=l->COUNT8=0;
  unsigned int bit=0;
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->LASTMASK=l->SIDEMASK=0;
  l->BOUND1=2;
  l->BOUND2=0;
  l->board[0]=1;
  while(l->BOUND1>1 && l->BOUND1<size-1){
    if(l->BOUND1<size-1){
      bit=1<<l->BOUND1;
      l->board[1]=bit;   //２行目にQを配置
      //角にQがあるときのバックトラック
      symmetry_backTrack_corner(size,2,(2|bit)<<1,1|bit,(2|bit)>>1,l);
    }
    l->BOUND1++;
  }//end while
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->TOPBIT>>1;
  l->SIDEMASK=l->TOPBIT|1;
  l->LASTMASK=l->TOPBIT|1;
  l->BOUND1=1;
  l->BOUND2=size-2;
  while(l->BOUND1>0 && l->BOUND2<size-1 && l->BOUND1<l->BOUND2){
    if(l->BOUND1<l->BOUND2){
      bit=1<<l->BOUND1;
      l->board[0]=bit;   //Qを配置
      //角にQがないときのバックトラック
      symmetry_backTrack(size,1,bit<<1,bit,bit>>1,l);
    }
    l->BOUND1++;
    l->BOUND2--;
    l->ENDBIT=l->ENDBIT>>1;
    l->LASTMASK=l->LASTMASK<<1|l->LASTMASK|l->LASTMASK>>1;
  }//ene while
  UNIQUE=l->COUNT2+l->COUNT4+l->COUNT8;
  TOTAL=l->COUNT2*2+l->COUNT4*4+l->COUNT8*8;
}
// GPU 対称解除法
__host__ __device__
void GPU_symmetryOps(unsigned int size,local* l)
{
  /**
  ２．クイーンが右上角以外にある場合、
  (1) 90度回転させてオリジナルと同型になる場合、さらに90度回転(オリジナルか
  ら180度回転)させても、さらに90度回転(オリジナルから270度回転)させてもオリ
  ジナルと同型になる。
  こちらに該当するユニーク解が属するグループの要素数は、左右反転させたパター
  ンを加えて２個しかありません。
  */
  if(l->board[l->BOUND2]==1){
    unsigned int ptn;
    unsigned int own;
    for(ptn=2,own=1;own<size;++own,ptn<<=1){
      unsigned int bit;
      unsigned int you;
      for(bit=1,you=size-1;(l->board[you]!=ptn)&& l->board[own]>=bit;--you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    // ９０度回転して同型なら１８０度回転しても２７０度回転しても同型である
    if(own>size-1){
      l->COUNT2++;
      return ;
    }//end if
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (2) 90度回転させてオリジナルと異なる場合は、270度回転させても必ずオリジナル
    とは異なる。ただし、180度回転させた場合はオリジナルと同型になることも有り得
    る。こちらに該当するユニーク解が属するグループの要素数は、180度回転させて同
    型になる場合は４個(左右反転×縦横回転)
   */
  //１８０度回転
  if(l->board[size-1]==l->ENDBIT){
    unsigned int you;
    unsigned int own;
    for(you=size-1-1,own=1;own<=size-1;++own,--you){
      unsigned int bit;
      unsigned int ptn;
      for(bit=1,ptn=l->TOPBIT;(ptn!=l->board[you])&&(l->board[own]>=bit);ptn>>=1){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
    //９０度回転が同型でなくても１８０度回転が同型であることもある
    if(own>size-1){
      l->COUNT4++;
      return ;
    }
  }//end if
  /**
  ２．クイーンが右上角以外にある場合、
    (3)180度回転させてもオリジナルと異なる場合は、８個(左右反転×縦横回転×上下反転)
  */
  //２７０度回転
  if(l->board[l->BOUND1]==l->TOPBIT){
    unsigned int ptn;
    unsigned int own;
    unsigned int you;
    unsigned int bit;
    for(ptn=l->TOPBIT>>1,own=1;own<=size-1;++own,ptn>>=1){
      for(bit=1,you=0;(l->board[you]!=ptn)&&(l->board[own]>=bit);++you){
        bit<<=1;
      }
      if(l->board[own]>bit){
        return ;
      }
      if(l->board[own]<bit){
        break;
      }
    }//end for
  }//end if
  l->COUNT8++;
}
// GPU 角にQがないときのバックトラック
__host__ __device__
void GPU_symmetry_backTrack(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  if(row==(size-1)){
    if(bitmap){
      if( (bitmap& l->LASTMASK)==0){
        l->board[row]=bitmap;  //Qを配置
        GPU_symmetryOps(size,l);    //対称解除
      }
    }
  }else{
    if(row<l->BOUND1){
      bitmap=bitmap|l->SIDEMASK;
      bitmap=bitmap^l->SIDEMASK;
    }else{
      if(row==l->BOUND2){
        if((down&l->SIDEMASK)==0){
          return;
        }
        if( (down&l->SIDEMASK)!=l->SIDEMASK){
          bitmap=bitmap&l->SIDEMASK;
        }
      }
    }
    while(bitmap){
      unsigned int bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;
      GPU_symmetry_backTrack(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }//end while
  }//end if
}
// GPU 角にQがあるときのバックトラック
__host__ __device__
void GPU_symmetry_backTrack_corner(unsigned int size,unsigned int row,unsigned int left,unsigned int down,unsigned int right,local* l)
{
  unsigned int mask=(1<<size)-1;
  unsigned int bitmap=mask&~(left|down|right);
  unsigned int bit=0;
  if(row==(size-1)){
    if(bitmap){
      l->board[row]=bitmap;
      l->COUNT8++;
    }
  }else{
    if(row<l->BOUND1){   //枝刈り
      bitmap=bitmap|2;
      bitmap=bitmap^2;
    }
    while(bitmap){
      bit=-bitmap&bitmap;
      bitmap=bitmap^bit;
      l->board[row]=bit;   //Qを配置
      GPU_symmetry_backTrack_corner(size,row+1,(left|bit)<<1,down|bit,(right|bit)>>1,l);
    }
  }
}
// GPU クイーンの効きを判定して解を返す
__host__ __device__ 
long symmetry_solve_nodeLayer(unsigned int size,unsigned long left,unsigned long down,unsigned long right)
{
  long mask=(1<<size)-1;
  long counter = 0;
  if (down==mask) { // downがすべて専有され解が見つかる
    return 1;
  }
  long bit=0;
  for(long bitmap=mask&~(left|down|right);bitmap;bitmap^=bit){
    bit=-bitmap&bitmap;
    counter += symmetry_solve_nodeLayer(size,(left|bit)>>1,(down|bit),(right|bit)<< 1); 
  }
  return counter;
}
// ノードレイヤー i 番目のメンバを i 番目の部分木の解で埋める
__global__ 
void dim_nodeLayer(unsigned int size,long* nodes,long* solutions,unsigned int numElements)
{
  int i=blockDim.x * blockIdx.x + threadIdx.x;
  if(i<numElements){
    solutions[i]=symmetry_solve_nodeLayer(size,nodes[3 * i],nodes[3 * i + 1],nodes[3 * i + 2]);
  }
}
// ノードレイヤー 0以外のbitをカウント
int countBits_nodeLayer(long n)
{
  int counter = 0;
  while (n){
    n &= (n - 1); // 右端のゼロ以外の数字を削除
    counter++;
  }
  return counter;
}
// ノードレイヤー ノードをk番目のレイヤーのノードで埋める
long kLayer_nodeLayer(int size,std::vector<long>& nodes, int k, long left, long down, long right,local* l)
{
  unsigned int bit=0;
  l->TOTAL=0;
  l->UNIQUE=0;
  l->COUNT2=0;
  l->COUNT4=0;
  l->COUNT8=0;
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=0;
  l->LASTMASK=0;
  l->SIDEMASK=0;
  l->BOUND1=2;
  l->BOUND2=0;
  l->board[0]=1;
  while(l->BOUND1>1 && l->BOUND1<size-1){
    if(l->BOUND1<size-1){
      bit=1<<l->BOUND1;
      l->board[1]=bit;   //２行目にQを配置
      //角にQがあるときのバックトラック
      GPU_symmetry_backTrack_corner(size,2,(2|bit)<<1,1|bit,(2|bit)>>1,l);
    }
    l->BOUND1++;
  }//end while
  l->TOPBIT=1<<(size-1);
  l->ENDBIT=l->TOPBIT>>1;
  l->SIDEMASK=l->TOPBIT|1;
  l->LASTMASK=l->TOPBIT|1;
  l->BOUND1=1;
  l->BOUND2=size-2;
  while(l->BOUND1>0 && l->BOUND2<size-1 && l->BOUND1<l->BOUND2){
    if(l->BOUND1<l->BOUND2){
      bit=1<<l->BOUND1;
      l->board[0]=bit;   //Qを配置
      //角にQがないときのバックトラック
      GPU_symmetry_backTrack(size,1,bit<<1,bit,bit>>1,l);
    }
    l->BOUND1++;
    l->BOUND2--;
    l->ENDBIT=l->ENDBIT>>1;
    l->LASTMASK=l->LASTMASK<<1|l->LASTMASK|l->LASTMASK>>1;
  }//ene while
  UNIQUE=l->COUNT2+l->COUNT4+l->COUNT8;
  TOTAL=l->COUNT2*2+l->COUNT4*4+l->COUNT8*8;
   
  /**
  long counter=0;
  long mask=(1<<size)-1;
  // すべてのdownが埋まったら、解決策を見つけたことになる。
  if (countBits_nodeLayer(down) == k) {
    nodes.push_back(left);
    nodes.push_back(down);
    nodes.push_back(right);
    return 1;
  }
  long bit=0;
  for(long bitmap=mask&~(left|down|right);bitmap;bitmap^=bit){
    bit=-bitmap&bitmap;
    // 解を加えて対角線をずらす
    counter+=kLayer_nodeLayer(size,nodes,k,(left|bit)>>1,(down|bit),(right|bit)<<1); 
  }
  return counter;
  */
}
// ノードレイヤー k 番目のレイヤのすべてのノードを含むベクトルを返す。
std::vector<long> kLayer_nodeLayer(int size,int k,local* l)
{
  std::vector<long> nodes{};
  kLayer_nodeLayer(size,nodes, k, 0, 0, 0,l);
  return nodes;
}
// ノードレイヤーの作成
void symmetry_build_nodeLayer(int size)
{
  // ツリーの3番目のレイヤーにあるノード
  //（それぞれ連続する3つの数字でエンコードされる）のベクトル。
  // レイヤー2以降はノードの数が均等なので、対称性を利用できる。
  // レイヤ4には十分なノードがある（N16の場合、9844）。
  local l[MAX]; // ローカル構造体
  std::vector<long> nodes = kLayer_nodeLayer(size,4,&l[0]); 
  // デバイスにはクラスがないので、
  // 最初の要素を指定してからデバイスにコピーする。
  size_t nodeSize = nodes.size() * sizeof(long);
  long* hostNodes = (long*)malloc(nodeSize);
  hostNodes = &nodes[0];
  long* deviceNodes = NULL;
  hipMalloc((void**)&deviceNodes, nodeSize);
  hipMemcpy(deviceNodes, hostNodes, nodeSize, hipMemcpyHostToDevice);
  // デバイス出力の割り当て
  long* deviceSolutions = NULL;
  // 必要なのはノードの半分だけで、各ノードは3つの整数で符号化される。
  int numSolutions = nodes.size() / 6; 
  size_t solutionSize = numSolutions * sizeof(long);
  hipMalloc((void**)&deviceSolutions, solutionSize);
  // CUDAカーネルを起動する。
  int threadsPerBlock = 256;
  int blocksPerGrid = (numSolutions + threadsPerBlock - 1) / threadsPerBlock;
  dim_nodeLayer <<<blocksPerGrid, threadsPerBlock >>> (size,deviceNodes, deviceSolutions, numSolutions);
  // 結果をホストにコピー
  long* hostSolutions = (long*)malloc(solutionSize);
  hipMemcpy(hostSolutions, deviceSolutions, solutionSize, hipMemcpyDeviceToHost);
  // 部分解を加算し、結果を表示する。
  long solutions = 0;
  for(long i=0;i<numSolutions;i++){
      solutions += 2*hostSolutions[i]; // Symmetry
  }
  // 出力
  TOTAL=solutions;
}
// CUDA 初期化
bool InitCUDA()
{
  int count;
  hipGetDeviceCount(&count);
  if(count==0){fprintf(stderr,"There is no device.\n");return false;}
  int i;
  for(i=0;i<count;i++){
    struct hipDeviceProp_t prop;
    if(hipGetDeviceProperties(&prop,i)==hipSuccess){if(prop.major>=1){break;} }
  }
  if(i==count){fprintf(stderr,"There is no device supporting CUDA 1.x.\n");return false;}
  hipSetDevice(i);
  return true;
}
//メイン
int main(int argc,char** argv)
{
  bool cpu=false,cpur=false,gpu=false,gpuNodeLayer=false;
  int argstart=2;
  if(argc>=2&&argv[1][0]=='-'){
    if(argv[1][1]=='c'||argv[1][1]=='C'){cpu=true;}
    else if(argv[1][1]=='r'||argv[1][1]=='R'){cpur=true;}
    else if(argv[1][1]=='c'||argv[1][1]=='C'){cpu=true;}
    else if(argv[1][1]=='g'||argv[1][1]=='G'){gpu=true;}
    else if(argv[1][1]=='n'||argv[1][1]=='N'){gpuNodeLayer=true;}
    else{ gpuNodeLayer=true; } //デフォルトをgpuとする
    argstart=2;
  }
  if(argc<argstart){
    printf("Usage: %s [-c|-g|-r|-s] n steps\n",argv[0]);
    printf("  -r: CPU 再帰\n");
    printf("  -c: CPU 非再帰\n");
    printf("  -g: GPU 再帰\n");
    printf("  -n: GPU ノードレイヤー\n");
  }
  if(cpur){ printf("\n\n対称解除法 再帰 \n"); }
  else if(cpu){ printf("\n\n対称解除法 非再帰 \n"); }
  else if(gpu){ printf("\n\n対称解除法 GPU\n"); }
  else if(gpuNodeLayer){ printf("\n\n対称解除法 GPUノードレイヤー \n"); }
  if(cpu||cpur){
    int min=4; 
    int targetN=17;
    struct timeval t0;
    struct timeval t1;
    printf("%s\n"," N:           Total           Unique          dd:hh:mm:ss.ms");
    for(int size=min;size<=targetN;size++){
      local l;
      gettimeofday(&t0, NULL);//計測開始
      if(cpur){ //再帰
        symmetry_R(size,&l);
      }
      if(cpu){ //非再帰
        symmetry_NR(size,&l);
      }
      //
      gettimeofday(&t1, NULL);//計測終了
      int ss;int ms;int dd;
      if(t1.tv_usec<t0.tv_usec) {
        dd=(t1.tv_sec-t0.tv_sec-1)/86400;
        ss=(t1.tv_sec-t0.tv_sec-1)%86400;
        ms=(1000000+t1.tv_usec-t0.tv_usec+500)/10000;
      }else {
        dd=(t1.tv_sec-t0.tv_sec)/86400;
        ss=(t1.tv_sec-t0.tv_sec)%86400;
        ms=(t1.tv_usec-t0.tv_usec+500)/10000;
      }//end if
      int hh=ss/3600;
      int mm=(ss-hh*3600)/60;
      ss%=60;
      printf("%2d:%16ld%17ld%12.2d:%02d:%02d:%02d.%02d\n",
          size,TOTAL,UNIQUE,dd,hh,mm,ss,ms);
    } //end for
  }//end if
  if(gpu||gpuNodeLayer){
    if(!InitCUDA()){return 0;}
    /* int steps=24576; */
    int min=4;
    int targetN=21;
    struct timeval t0;
    struct timeval t1;
    printf("%s\n"," N:        Total      Unique      dd:hh:mm:ss.ms");
    for(int size=min;size<=targetN;size++){
      gettimeofday(&t0,NULL);   // 計測開始
      if(gpu){
        TOTAL=UNIQUE=0;
        TOTAL=symmetry_solve_nodeLayer(size,0,0,0); //対称解除法
      }else if(gpuNodeLayer){
        TOTAL=UNIQUE=0;
        symmetry_build_nodeLayer(size); // 対称解除法
      }
      gettimeofday(&t1,NULL);   // 計測終了
      int ss;int ms;int dd;
      if (t1.tv_usec<t0.tv_usec) {
        dd=(int)(t1.tv_sec-t0.tv_sec-1)/86400;
        ss=(t1.tv_sec-t0.tv_sec-1)%86400;
        ms=(1000000+t1.tv_usec-t0.tv_usec+500)/10000;
      } else {
        dd=(int)(t1.tv_sec-t0.tv_sec)/86400;
        ss=(t1.tv_sec-t0.tv_sec)%86400;
        ms=(t1.tv_usec-t0.tv_usec+500)/10000;
      }//end if
      int hh=ss/3600;
      int mm=(ss-hh*3600)/60;
      ss%=60;
      printf("%2d:%13ld%16ld%4.2d:%02d:%02d:%02d.%02d\n",
          size,TOTAL,UNIQUE,dd,hh,mm,ss,ms);
    }//end for
  }//end if
  return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_Z11symmetryOpsjP5local         # -- Begin function _Z11symmetryOpsjP5local
	.type	_Z11symmetryOpsjP5local,@function
_Z11symmetryOpsjP5local:                # @_Z11symmetryOpsjP5local
	.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	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
                                        # kill: def $edi killed $edi def $rdi
	movl	4(%rsi), %eax
	cmpq	$1, 24(%rsi,%rax,8)
	jne	.LBB0_1
# %bb.15:                               # %.preheader130
	leal	-1(%rdi), %eax
	movl	$1, %ecx
	cmpl	$2, %edi
	jb	.LBB0_25
# %bb.16:                               # %.preheader129.lr.ph
	movl	%eax, %ecx
	movq	24(%rsi,%rcx,8), %rdx
	movl	%edi, %r8d
	leal	-2(%rdi), %r9d
	movl	$2, %r10d
	movl	$1, %ecx
	movl	$1, %r11d
.LBB0_17:                               # %.preheader129
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_19 Depth 2
	movl	%r10d, %r10d
	movq	24(%rsi,%rcx,8), %rbx
	movl	$1, %ebp
	cmpq	%r10, %rdx
	je	.LBB0_21
# %bb.18:                               # %.lr.ph.preheader
                                        #   in Loop: Header=BB0_17 Depth=1
	movl	%r9d, %r14d
.LBB0_19:                               # %.lr.ph
                                        #   Parent Loop BB0_17 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%ebp, %r15d
	cmpq	%r15, %rbx
	jb	.LBB0_21
# %bb.20:                               #   in Loop: Header=BB0_19 Depth=2
	addl	%ebp, %ebp
	movl	%r14d, %r15d
	decl	%r14d
	cmpq	%r10, 24(%rsi,%r15,8)
	jne	.LBB0_19
.LBB0_21:                               # %.critedge
                                        #   in Loop: Header=BB0_17 Depth=1
	movl	%ebp, %r14d
	xorl	%ebp, %ebp
	cmpq	%r14, %rbx
	setb	%bpl
	addl	%ebp, %ebp
	cmpq	%r14, %rbx
	cmoval	%r11d, %ebp
	testl	%ebp, %ebp
	jne	.LBB0_22
# %bb.23:                               #   in Loop: Header=BB0_17 Depth=1
	incq	%rcx
	addl	%r10d, %r10d
	cmpq	%r8, %rcx
	jne	.LBB0_17
# %bb.24:
	movl	%edi, %ecx
	jmp	.LBB0_25
.LBB0_1:                                # %..thread_crit_edge
	leal	-1(%rdi), %eax
	jmp	.LBB0_2
.LBB0_22:                               # %.critedge
	cmpl	$2, %ebp
	jne	.LBB0_38
.LBB0_25:                               # %.critedge._crit_edge
	cmpl	%eax, %ecx
	jbe	.LBB0_2
# %bb.26:                               # %.thread114
	addq	$240, %rsi
	jmp	.LBB0_37
.LBB0_2:                                # %.thread
	movl	%eax, %ecx
	movl	12(%rsi), %edx
	cmpq	%rdx, 24(%rsi,%rcx,8)
	jne	.LBB0_3
# %bb.27:
	testl	%eax, %eax
	je	.LBB0_36
# %bb.28:                               # %.lr.ph158
	addl	$-2, %edi
	movl	8(%rsi), %ecx
	movl	$1, %edx
	movl	$1, %r8d
.LBB0_29:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_31 Depth 2
	movl	%edi, %r9d
	movq	24(%rsi,%r9,8), %r10
	movl	%r8d, %r9d
	movq	24(%rsi,%r9,8), %r9
	movl	$1, %r11d
	cmpq	%rcx, %r10
	je	.LBB0_33
# %bb.30:                               # %.lr.ph149.preheader
                                        #   in Loop: Header=BB0_29 Depth=1
	movl	%ecx, %ebx
.LBB0_31:                               # %.lr.ph149
                                        #   Parent Loop BB0_29 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%r11d, %r14d
	cmpq	%r14, %r9
	jb	.LBB0_33
# %bb.32:                               #   in Loop: Header=BB0_31 Depth=2
	addl	%r11d, %r11d
	shrl	%ebx
	cmpq	%rbx, %r10
	jne	.LBB0_31
.LBB0_33:                               # %.critedge2
                                        #   in Loop: Header=BB0_29 Depth=1
	movl	%r11d, %r11d
	xorl	%r10d, %r10d
	cmpq	%r11, %r9
	setb	%r10b
	shll	$3, %r10d
	cmpq	%r11, %r9
	cmoval	%edx, %r10d
	testl	%r10d, %r10d
	jne	.LBB0_34
# %bb.35:                               #   in Loop: Header=BB0_29 Depth=1
	incl	%r8d
	decl	%edi
	cmpl	%eax, %r8d
	jbe	.LBB0_29
.LBB0_36:                               # %.thread121
	addq	$248, %rsi
	jmp	.LBB0_37
.LBB0_3:                                # %.thread..thread118_crit_edge
	movl	8(%rsi), %ecx
.LBB0_4:                                # %.thread118
	movl	(%rsi), %edx
	cmpq	%rcx, 24(%rsi,%rdx,8)
	jne	.LBB0_14
# %bb.5:                                # %.thread118
	testl	%eax, %eax
	je	.LBB0_14
# %bb.6:                                # %.preheader.lr.ph
	movq	24(%rsi), %rdx
	movl	$1, %edi
.LBB0_7:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_9 Depth 2
	shrl	%ecx
	movl	%edi, %r8d
	movq	24(%rsi,%r8,8), %r8
	movl	$1, %r9d
	cmpq	%rcx, %rdx
	je	.LBB0_11
# %bb.8:                                # %.lr.ph162.preheader
                                        #   in Loop: Header=BB0_7 Depth=1
	movl	$1, %r10d
.LBB0_9:                                # %.lr.ph162
                                        #   Parent Loop BB0_7 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%r9d, %r11d
	cmpq	%r11, %r8
	jb	.LBB0_11
# %bb.10:                               #   in Loop: Header=BB0_9 Depth=2
	addl	%r9d, %r9d
	movl	%r10d, %r11d
	incl	%r10d
	cmpq	%rcx, 24(%rsi,%r11,8)
	jne	.LBB0_9
.LBB0_11:                               # %.critedge4
                                        #   in Loop: Header=BB0_7 Depth=1
	movl	%r9d, %r9d
	cmpq	%r9, %r8
	ja	.LBB0_38
# %bb.12:                               #   in Loop: Header=BB0_7 Depth=1
	jb	.LBB0_14
# %bb.13:                               #   in Loop: Header=BB0_7 Depth=1
	incl	%edi
	cmpl	%eax, %edi
	jbe	.LBB0_7
.LBB0_14:                               # %.thread124
	addq	$256, %rsi                      # imm = 0x100
.LBB0_37:                               # %.loopexit.sink.split
	incq	(%rsi)
.LBB0_38:                               # %.loopexit
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_34:                               # %.critedge2
	.cfi_def_cfa_offset 40
	cmpl	$8, %r10d
	je	.LBB0_4
	jmp	.LBB0_38
.Lfunc_end0:
	.size	_Z11symmetryOpsjP5local, .Lfunc_end0-_Z11symmetryOpsjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z21symmetry_backTrack_NRjjjjjP5local # -- Begin function _Z21symmetry_backTrack_NRjjjjjP5local
	.type	_Z21symmetry_backTrack_NRjjjjjP5local,@function
_Z21symmetry_backTrack_NRjjjjjP5local:  # @_Z21symmetry_backTrack_NRjjjjjP5local
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movl	%ecx, %eax
                                        # kill: def $edi killed $edi def $rdi
	movl	$-1, %r11d
	movl	%edi, %ecx
	shll	%cl, %r11d
                                        # kill: def $esi killed $esi def $rsi
	notl	%r11d
	movl	%edi, %ecx
	movq	%rsp, %r10
	leaq	15(,%rcx,4), %rcx
	andq	$-16, %rcx
	subq	%rcx, %r10
	movq	%r10, %rsp
	movq	%rsp, %r9
	subq	%rcx, %r9
	movq	%r9, %rsp
	movq	%rsp, %r14
	subq	%rcx, %r14
	movq	%r14, %rsp
	movq	%rsp, %r13
	subq	%rcx, %r13
	movq	%r13, %rsp
	movl	%esi, %ecx
	movl	%edx, (%r9,%rcx,4)
	movl	%eax, (%r10,%rcx,4)
	movl	%r8d, (%r14,%rcx,4)
	orl	%edx, %eax
	orl	%r8d, %eax
	notl	%eax
	andl	%r11d, %eax
	movl	%eax, (%r13,%rcx,4)
	testl	%esi, %esi
	je	.LBB1_16
# %bb.1:                                # %.lr.ph
	leal	-1(%rdi), %r15d
	leal	-2(%rdi), %r12d
	movq	%rdi, -64(%rbp)                 # 8-byte Spill
	movq	%r14, -56(%rbp)                 # 8-byte Spill
	movl	%r15d, -48(%rbp)                # 4-byte Spill
	movl	%r12d, -44(%rbp)                # 4-byte Spill
.LBB1_2:                                # =>This Inner Loop Header: Depth=1
	movl	%esi, %eax
	movl	(%r13,%rax,4), %ecx
	testl	%ecx, %ecx
	je	.LBB1_14
# %bb.3:                                #   in Loop: Header=BB1_2 Depth=1
	cmpl	(%rbx), %esi
	jae	.LBB1_5
# %bb.4:                                #   in Loop: Header=BB1_2 Depth=1
	movl	16(%rbx), %edx
	notl	%edx
	andl	%edx, %ecx
	movl	%ecx, (%r13,%rax,4)
	jmp	.LBB1_9
.LBB1_5:                                #   in Loop: Header=BB1_2 Depth=1
	cmpl	4(%rbx), %esi
	jne	.LBB1_9
# %bb.6:                                #   in Loop: Header=BB1_2 Depth=1
	movl	16(%rbx), %edx
	movl	(%r10,%rax,4), %eax
	andl	%edx, %eax
	cmpl	$1, %eax
	sbbl	$0, %esi
	movl	(%r10,%rsi,4), %eax
	notl	%eax
	movl	(%r13,%rsi,4), %ecx
	testl	%eax, %edx
	je	.LBB1_8
# %bb.7:                                #   in Loop: Header=BB1_2 Depth=1
	andl	%edx, %ecx
	movl	%ecx, (%r13,%rsi,4)
.LBB1_8:                                # %._crit_edge75
                                        #   in Loop: Header=BB1_2 Depth=1
	movq	%rsi, %rax
.LBB1_9:                                # %._crit_edge75
                                        #   in Loop: Header=BB1_2 Depth=1
	movl	%ecx, %edx
	negl	%edx
	andl	%ecx, %edx
	movl	%edx, %r8d
	xorl	%ecx, %r8d
	movl	%r8d, (%r13,%rax,4)
	movq	%rdx, 24(%rbx,%rax,8)
	testl	%r11d, %edx
	je	.LBB1_14
# %bb.10:                               #   in Loop: Header=BB1_2 Depth=1
	cmpl	%r15d, %esi
	jne	.LBB1_13
# %bb.11:                               #   in Loop: Header=BB1_2 Depth=1
	movl	%r12d, %esi
	testl	%ecx, 20(%rbx)
	jne	.LBB1_15
# %bb.12:                               #   in Loop: Header=BB1_2 Depth=1
                                        # kill: def $edi killed $edi killed $rdi
	movq	%rbx, %rsi
	movq	%r9, %r12
	movq	%r10, %r15
	movl	%r11d, %r14d
	callq	_Z11symmetryOpsjP5local
	movl	%r14d, %r11d
	movq	-56(%rbp), %r14                 # 8-byte Reload
	movq	%r15, %r10
	movl	-48(%rbp), %r15d                # 4-byte Reload
	movq	%r12, %r9
	movl	-44(%rbp), %r12d                # 4-byte Reload
	movq	-64(%rbp), %rdi                 # 8-byte Reload
	movl	%r12d, %esi
	jmp	.LBB1_15
.LBB1_14:                               #   in Loop: Header=BB1_2 Depth=1
	decl	%esi
	jmp	.LBB1_15
.LBB1_13:                               #   in Loop: Header=BB1_2 Depth=1
	incl	%esi
	movl	(%r9,%rax,4), %ecx
	orl	%edx, %ecx
	addl	%ecx, %ecx
	movl	%ecx, (%r9,%rsi,4)
	movl	(%r10,%rax,4), %r8d
	orl	%edx, %r8d
	orl	(%r14,%rax,4), %edx
	movl	%r8d, (%r10,%rsi,4)
	shrl	%edx
	movl	%edx, (%r14,%rsi,4)
	orl	%ecx, %r8d
	orl	%edx, %r8d
	notl	%r8d
	andl	%r11d, %r8d
	movl	%r8d, (%r13,%rsi,4)
.LBB1_15:                               #   in Loop: Header=BB1_2 Depth=1
	testl	%esi, %esi
	jne	.LBB1_2
.LBB1_16:                               # %._crit_edge
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.Lfunc_end1:
	.size	_Z21symmetry_backTrack_NRjjjjjP5local, .Lfunc_end1-_Z21symmetry_backTrack_NRjjjjjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z28symmetry_backTrack_corner_NRjjjjjP5local # -- Begin function _Z28symmetry_backTrack_corner_NRjjjjjP5local
	.type	_Z28symmetry_backTrack_corner_NRjjjjjP5local,@function
_Z28symmetry_backTrack_corner_NRjjjjjP5local: # @_Z28symmetry_backTrack_corner_NRjjjjjP5local
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %eax
	movl	%edi, %ecx
	movl	$-1, %edi
	shll	%cl, %edi
                                        # kill: def $esi killed $esi def $rsi
	notl	%edi
	movl	%ecx, %r11d
	movq	%rsp, %r10
	leaq	15(,%r11,4), %r15
	andq	$-16, %r15
	subq	%r15, %r10
	movq	%r10, %rsp
	movq	%rsp, %r11
	subq	%r15, %r11
	movq	%r11, %rsp
	movq	%rsp, %rbx
	subq	%r15, %rbx
	movq	%rbx, %rsp
	movq	%rsp, %r14
	subq	%r15, %r14
	movq	%r14, %rsp
	movl	%esi, %r15d
	movl	%edx, (%r11,%r15,4)
	movl	%eax, (%r10,%r15,4)
	movl	%r8d, (%rbx,%r15,4)
	orl	%edx, %eax
	orl	%r8d, %eax
	notl	%eax
	movl	%edi, -44(%rbp)                 # 4-byte Spill
	andl	%edi, %eax
	movl	%eax, (%r14,%r15,4)
	cmpl	$2, %esi
	jb	.LBB2_10
# %bb.1:                                # %.lr.ph
	movl	(%r9), %eax
	leal	-1(%rcx), %edx
	addl	$-2, %ecx
.LBB2_2:                                # =>This Inner Loop Header: Depth=1
	movl	%esi, %r8d
	movl	(%r14,%r8,4), %r12d
	cmpl	%eax, %esi
	jae	.LBB2_4
# %bb.3:                                #   in Loop: Header=BB2_2 Depth=1
	andl	$-3, %r12d
	movl	%r12d, (%r14,%r8,4)
.LBB2_4:                                # %._crit_edge50
                                        #   in Loop: Header=BB2_2 Depth=1
	testl	%r12d, %r12d
	je	.LBB2_8
# %bb.5:                                #   in Loop: Header=BB2_2 Depth=1
	movl	%r12d, %r15d
	negl	%r15d
	andl	%r12d, %r15d
	xorl	%r15d, %r12d
	movl	%r12d, (%r14,%r8,4)
	cmpl	%edx, %r8d
	jne	.LBB2_7
# %bb.6:                                #   in Loop: Header=BB2_2 Depth=1
	incq	256(%r9)
	movl	%ecx, %esi
	jmp	.LBB2_9
.LBB2_8:                                #   in Loop: Header=BB2_2 Depth=1
	decl	%r8d
	movl	%r8d, %esi
	jmp	.LBB2_9
.LBB2_7:                                #   in Loop: Header=BB2_2 Depth=1
	leal	1(%r8), %esi
	movl	(%r11,%r8,4), %r12d
	orl	%r15d, %r12d
	addl	%r12d, %r12d
	movl	%r12d, (%r11,%rsi,4)
	movl	(%r10,%r8,4), %r13d
	orl	%r15d, %r13d
	movl	%r13d, (%r10,%rsi,4)
	movl	%r15d, %edi
	orl	(%rbx,%r8,4), %r15d
	shrl	%r15d
	movl	%r15d, (%rbx,%rsi,4)
	movq	%rdi, 24(%r9,%rsi,8)
	orl	%r12d, %r13d
	orl	%r15d, %r13d
	notl	%r13d
	andl	-44(%rbp), %r13d                # 4-byte Folded Reload
	movl	%r13d, (%r14,%rsi,4)
.LBB2_9:                                #   in Loop: Header=BB2_2 Depth=1
	cmpl	$1, %esi
	ja	.LBB2_2
.LBB2_10:                               # %._crit_edge
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.Lfunc_end2:
	.size	_Z28symmetry_backTrack_corner_NRjjjjjP5local, .Lfunc_end2-_Z28symmetry_backTrack_corner_NRjjjjjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z11symmetry_NRjP5local         # -- Begin function _Z11symmetry_NRjP5local
	.type	_Z11symmetry_NRjP5local,@function
_Z11symmetry_NRjP5local:                # @_Z11symmetry_NRjP5local
	.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	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movl	%edi, %r14d
	leal	-1(%r14), %ebp
	movl	$1, %r12d
	movl	%ebp, %ecx
	shll	%cl, %r12d
	movl	$1, %r15d
	xorps	%xmm0, %xmm0
	movups	%xmm0, 256(%rsi)
	movups	%xmm0, 240(%rsi)
	xorl	%eax, %eax
	movq	%rax, 272(%rsi)
	movl	%r12d, 8(%rsi)
	movl	$0, 20(%rsi)
	movq	%rax, 12(%rsi)
	movq	$2, (%rsi)
	movq	$1, 24(%rsi)
	cmpl	$3, %ebp
	jb	.LBB3_4
# %bb.1:                                # %.lr.ph
	movl	$2, %ecx
.LBB3_2:                                # =>This Inner Loop Header: Depth=1
	movl	$1, %eax
	shll	%cl, %eax
	movq	%rax, 32(%rbx)
	movl	$2, %r8d
	btsl	%ecx, %r8d
	leal	(%r8,%r8), %edx
	movl	$1, %eax
	btsl	%ecx, %eax
	shrl	%r8d
	movl	%r14d, %edi
	movl	$2, %esi
	movl	%eax, %ecx
                                        # kill: def $r8d killed $r8d killed $r8
	movq	%rbx, %r9
	callq	_Z28symmetry_backTrack_corner_NRjjjjjP5local
	movl	(%rbx), %ecx
	incl	%ecx
	movl	%ecx, (%rbx)
	cmpl	$2, %ecx
	jb	.LBB3_4
# %bb.3:                                #   in Loop: Header=BB3_2 Depth=1
	cmpl	%ebp, %ecx
	jb	.LBB3_2
.LBB3_4:                                # %.critedge
	movl	%r12d, 8(%rbx)
	movl	%r12d, %eax
	shrl	%eax
	movl	%eax, 12(%rbx)
	orl	$1, %r12d
	movl	%r12d, 16(%rbx)
	movl	%r12d, 20(%rbx)
	movl	$1, (%rbx)
	leal	-2(%r14), %eax
	movl	%eax, 4(%rbx)
.LBB3_5:                                # =>This Inner Loop Header: Depth=1
	cmpl	%ebp, %eax
	jae	.LBB3_8
# %bb.6:                                #   in Loop: Header=BB3_5 Depth=1
	cmpl	%eax, %r15d
	jae	.LBB3_8
# %bb.7:                                #   in Loop: Header=BB3_5 Depth=1
	movl	$1, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	movl	$2, %edx
	shll	%cl, %edx
	movq	%rax, 24(%rbx)
	movl	%eax, %r8d
	shrl	%r8d
	movl	%r14d, %edi
	movl	$1, %esi
	movl	%eax, %ecx
	movq	%rbx, %r9
	callq	_Z21symmetry_backTrack_NRjjjjjP5local
	movl	(%rbx), %r15d
	movl	4(%rbx), %eax
	shrl	12(%rbx)
	decl	%eax
	movl	20(%rbx), %ecx
	leal	(%rcx,%rcx), %edx
	movl	%ecx, %esi
	shrl	%esi
	orl	%edx, %esi
	orl	%ecx, %esi
	incl	%r15d
	movl	%r15d, (%rbx)
	movl	%eax, 4(%rbx)
	movl	%esi, 20(%rbx)
	jne	.LBB3_5
.LBB3_8:                                # %.critedge2
	movq	240(%rbx), %rax
	movq	248(%rbx), %rcx
	leaq	(%rcx,%rax), %rdx
	movq	256(%rbx), %rsi
	addq	%rsi, %rdx
	movq	%rdx, UNIQUE(%rip)
	addq	%rax, %rax
	leaq	(%rax,%rcx,4), %rax
	leaq	(%rax,%rsi,8), %rax
	movq	%rax, TOTAL(%rip)
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.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_end3:
	.size	_Z11symmetry_NRjP5local, .Lfunc_end3-_Z11symmetry_NRjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z18symmetry_backTrackjjjjjP5local # -- Begin function _Z18symmetry_backTrackjjjjjP5local
	.type	_Z18symmetry_backTrackjjjjjP5local,@function
_Z18symmetry_backTrackjjjjjP5local:     # @_Z18symmetry_backTrackjjjjjP5local
	.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, %rbx
	movl	%r8d, %ebp
	movl	%ecx, %r8d
	movl	%edx, %r15d
	movl	%esi, %r13d
	movl	%edi, %r12d
	movl	$-1, %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	movl	%r15d, %eax
	orl	%r8d, %eax
	orl	%ebp, %eax
	orl	%edx, %eax
	movl	%eax, %edx
	notl	%edx
	leal	-1(%r12), %ecx
	cmpl	%esi, %ecx
	jne	.LBB4_4
# %bb.1:
	cmpl	$-1, %eax
	je	.LBB4_12
# %bb.2:
	testl	%edx, 20(%rbx)
	jne	.LBB4_12
# %bb.3:
	movl	%edx, %eax
	movl	%r13d, %ecx
	movq	%rax, 24(%rbx,%rcx,8)
	movl	%r12d, %edi
	movq	%rbx, %rsi
	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
	jmp	_Z11symmetryOpsjP5local         # TAILCALL
.LBB4_4:
	.cfi_def_cfa_offset 80
	cmpl	%r13d, (%rbx)
	jbe	.LBB4_6
# %bb.5:
	movl	16(%rbx), %eax
	notl	%eax
	andl	%eax, %edx
	jmp	.LBB4_9
.LBB4_6:
	cmpl	%r13d, 4(%rbx)
	jne	.LBB4_9
# %bb.7:
	movl	16(%rbx), %eax
	movl	%eax, %ecx
	andl	%r8d, %ecx
	je	.LBB4_12
# %bb.8:
	cmpl	%eax, %ecx
	movl	$2147483647, %ecx               # imm = 0x7FFFFFFF
	cmovnel	%eax, %ecx
	andl	%ecx, %edx
.LBB4_9:
	testl	%edx, %edx
	je	.LBB4_12
# %bb.10:                               # %.lr.ph
	movl	%r13d, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	incl	%r13d
	movl	%r8d, 8(%rsp)                   # 4-byte Spill
.LBB4_11:                               # =>This Inner Loop Header: Depth=1
	movl	%edx, 12(%rsp)                  # 4-byte Spill
	movl	%edx, %r14d
	negl	%r14d
	andl	%edx, %r14d
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	%r14, 24(%rbx,%rax,8)
	movl	%r14d, %edx
	orl	%r15d, %edx
	addl	%edx, %edx
	movl	%r14d, %ecx
	orl	%r8d, %ecx
	movl	%r14d, %r8d
	orl	%ebp, %r8d
	shrl	%r8d
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%rbx, %r9
	callq	_Z18symmetry_backTrackjjjjjP5local
	movl	8(%rsp), %r8d                   # 4-byte Reload
	xorl	12(%rsp), %r14d                 # 4-byte Folded Reload
	movl	%r14d, %edx
	jne	.LBB4_11
.LBB4_12:                               # %.loopexit
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z18symmetry_backTrackjjjjjP5local, .Lfunc_end4-_Z18symmetry_backTrackjjjjjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z25symmetry_backTrack_cornerjjjjjP5local # -- Begin function _Z25symmetry_backTrack_cornerjjjjjP5local
	.type	_Z25symmetry_backTrack_cornerjjjjjP5local,@function
_Z25symmetry_backTrack_cornerjjjjjP5local: # @_Z25symmetry_backTrack_cornerjjjjjP5local
	.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, %r15
	movl	%r8d, %r11d
	movl	%ecx, %r8d
	movl	%edx, %ebp
	movl	%esi, %r13d
	movl	%edi, %ebx
	movl	$-1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	movl	%edx, %ecx
	orl	%r8d, %ecx
	orl	%r11d, %ecx
	orl	%eax, %ecx
	movl	%ecx, %eax
	notl	%eax
	leal	-1(%rbx), %edx
	cmpl	%esi, %edx
	jne	.LBB5_3
# %bb.1:
	cmpl	$-1, %ecx
	je	.LBB5_6
# %bb.2:
	movl	%eax, %eax
	movl	%r13d, %ecx
	movq	%rax, 24(%r15,%rcx,8)
	incq	256(%r15)
	jmp	.LBB5_6
.LBB5_3:
	movl	%eax, %r14d
	andl	$-3, %r14d
	cmpl	%r13d, (%r15)
	cmovbel	%eax, %r14d
	testl	%r14d, %r14d
	je	.LBB5_6
# %bb.4:                                # %.lr.ph
	movl	%r13d, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	incl	%r13d
	movl	%r8d, 12(%rsp)                  # 4-byte Spill
	movl	%r11d, 8(%rsp)                  # 4-byte Spill
.LBB5_5:                                # =>This Inner Loop Header: Depth=1
	movl	%r14d, %r12d
	negl	%r12d
	andl	%r14d, %r12d
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	%r12, 24(%r15,%rax,8)
	movl	%r12d, %edx
	orl	%ebp, %edx
	addl	%edx, %edx
	movl	%r12d, %ecx
	orl	%r8d, %ecx
	movl	%r12d, %r8d
	orl	%r11d, %r8d
	shrl	%r8d
	movl	%ebx, %edi
	movl	%r13d, %esi
	movq	%r15, %r9
	callq	_Z25symmetry_backTrack_cornerjjjjjP5local
	movl	12(%rsp), %r8d                  # 4-byte Reload
	movl	8(%rsp), %r11d                  # 4-byte Reload
	xorl	%r14d, %r12d
	movl	%r12d, %r14d
	jne	.LBB5_5
.LBB5_6:                                # %.loopexit
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z25symmetry_backTrack_cornerjjjjjP5local, .Lfunc_end5-_Z25symmetry_backTrack_cornerjjjjjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z10symmetry_RjP5local          # -- Begin function _Z10symmetry_RjP5local
	.type	_Z10symmetry_RjP5local,@function
_Z10symmetry_RjP5local:                 # @_Z10symmetry_RjP5local
	.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	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movl	%edi, %r14d
	leal	-1(%r14), %ebp
	movl	$1, %r12d
	movl	%ebp, %ecx
	shll	%cl, %r12d
	movl	$1, %r15d
	xorps	%xmm0, %xmm0
	movups	%xmm0, 256(%rsi)
	movups	%xmm0, 240(%rsi)
	xorl	%eax, %eax
	movq	%rax, 272(%rsi)
	movl	%r12d, 8(%rsi)
	movl	$0, 20(%rsi)
	movq	%rax, 12(%rsi)
	movq	$2, (%rsi)
	movq	$1, 24(%rsi)
	cmpl	$3, %ebp
	jb	.LBB6_4
# %bb.1:                                # %.lr.ph
	movl	$2, %ecx
.LBB6_2:                                # =>This Inner Loop Header: Depth=1
	movl	$1, %eax
	shll	%cl, %eax
	movq	%rax, 32(%rbx)
	movl	$2, %r8d
	btsl	%ecx, %r8d
	leal	(%r8,%r8), %edx
	movl	$1, %eax
	btsl	%ecx, %eax
	shrl	%r8d
	movl	%r14d, %edi
	movl	$2, %esi
	movl	%eax, %ecx
                                        # kill: def $r8d killed $r8d killed $r8
	movq	%rbx, %r9
	callq	_Z25symmetry_backTrack_cornerjjjjjP5local
	movl	(%rbx), %ecx
	incl	%ecx
	movl	%ecx, (%rbx)
	cmpl	$2, %ecx
	jb	.LBB6_4
# %bb.3:                                #   in Loop: Header=BB6_2 Depth=1
	cmpl	%ebp, %ecx
	jb	.LBB6_2
.LBB6_4:                                # %.critedge
	movl	%r12d, 8(%rbx)
	movl	%r12d, %eax
	shrl	%eax
	movl	%eax, 12(%rbx)
	orl	$1, %r12d
	movl	%r12d, 16(%rbx)
	movl	%r12d, 20(%rbx)
	movl	$1, (%rbx)
	leal	-2(%r14), %eax
	movl	%eax, 4(%rbx)
.LBB6_5:                                # =>This Inner Loop Header: Depth=1
	cmpl	%ebp, %eax
	jae	.LBB6_8
# %bb.6:                                #   in Loop: Header=BB6_5 Depth=1
	cmpl	%eax, %r15d
	jae	.LBB6_8
# %bb.7:                                #   in Loop: Header=BB6_5 Depth=1
	movl	$1, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	movl	$2, %edx
	shll	%cl, %edx
	movq	%rax, 24(%rbx)
	movl	%eax, %r8d
	shrl	%r8d
	movl	%r14d, %edi
	movl	$1, %esi
	movl	%eax, %ecx
	movq	%rbx, %r9
	callq	_Z18symmetry_backTrackjjjjjP5local
	movl	(%rbx), %r15d
	movl	4(%rbx), %eax
	shrl	12(%rbx)
	decl	%eax
	movl	20(%rbx), %ecx
	leal	(%rcx,%rcx), %edx
	movl	%ecx, %esi
	shrl	%esi
	orl	%edx, %esi
	orl	%ecx, %esi
	incl	%r15d
	movl	%r15d, (%rbx)
	movl	%eax, 4(%rbx)
	movl	%esi, 20(%rbx)
	jne	.LBB6_5
.LBB6_8:                                # %.critedge2
	movq	240(%rbx), %rax
	movq	248(%rbx), %rcx
	leaq	(%rcx,%rax), %rdx
	movq	256(%rbx), %rsi
	addq	%rsi, %rdx
	movq	%rdx, UNIQUE(%rip)
	addq	%rax, %rax
	leaq	(%rax,%rcx,4), %rax
	leaq	(%rax,%rsi,8), %rax
	movq	%rax, TOTAL(%rip)
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z10symmetry_RjP5local, .Lfunc_end6-_Z10symmetry_RjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z15GPU_symmetryOpsjP5local     # -- Begin function _Z15GPU_symmetryOpsjP5local
	.type	_Z15GPU_symmetryOpsjP5local,@function
_Z15GPU_symmetryOpsjP5local:            # @_Z15GPU_symmetryOpsjP5local
	.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	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
                                        # kill: def $edi killed $edi def $rdi
	movl	4(%rsi), %eax
	cmpq	$1, 24(%rsi,%rax,8)
	jne	.LBB7_1
# %bb.15:                               # %.preheader130
	leal	-1(%rdi), %eax
	movl	$1, %ecx
	cmpl	$2, %edi
	jb	.LBB7_25
# %bb.16:                               # %.preheader129.lr.ph
	movl	%eax, %ecx
	movq	24(%rsi,%rcx,8), %rdx
	movl	%edi, %r8d
	leal	-2(%rdi), %r9d
	movl	$2, %r10d
	movl	$1, %ecx
	movl	$1, %r11d
.LBB7_17:                               # %.preheader129
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_19 Depth 2
	movl	%r10d, %r10d
	movq	24(%rsi,%rcx,8), %rbx
	movl	$1, %ebp
	cmpq	%r10, %rdx
	je	.LBB7_21
# %bb.18:                               # %.lr.ph.preheader
                                        #   in Loop: Header=BB7_17 Depth=1
	movl	%r9d, %r14d
.LBB7_19:                               # %.lr.ph
                                        #   Parent Loop BB7_17 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%ebp, %r15d
	cmpq	%r15, %rbx
	jb	.LBB7_21
# %bb.20:                               #   in Loop: Header=BB7_19 Depth=2
	addl	%ebp, %ebp
	movl	%r14d, %r15d
	decl	%r14d
	cmpq	%r10, 24(%rsi,%r15,8)
	jne	.LBB7_19
.LBB7_21:                               # %.critedge
                                        #   in Loop: Header=BB7_17 Depth=1
	movl	%ebp, %r14d
	xorl	%ebp, %ebp
	cmpq	%r14, %rbx
	setb	%bpl
	addl	%ebp, %ebp
	cmpq	%r14, %rbx
	cmoval	%r11d, %ebp
	testl	%ebp, %ebp
	jne	.LBB7_22
# %bb.23:                               #   in Loop: Header=BB7_17 Depth=1
	incq	%rcx
	addl	%r10d, %r10d
	cmpq	%r8, %rcx
	jne	.LBB7_17
# %bb.24:
	movl	%edi, %ecx
	jmp	.LBB7_25
.LBB7_1:                                # %..thread_crit_edge
	leal	-1(%rdi), %eax
	jmp	.LBB7_2
.LBB7_22:                               # %.critedge
	cmpl	$2, %ebp
	jne	.LBB7_38
.LBB7_25:                               # %.critedge._crit_edge
	cmpl	%eax, %ecx
	jbe	.LBB7_2
# %bb.26:                               # %.thread114
	addq	$240, %rsi
	jmp	.LBB7_37
.LBB7_2:                                # %.thread
	movl	%eax, %ecx
	movl	12(%rsi), %edx
	cmpq	%rdx, 24(%rsi,%rcx,8)
	jne	.LBB7_3
# %bb.27:
	testl	%eax, %eax
	je	.LBB7_36
# %bb.28:                               # %.lr.ph158
	addl	$-2, %edi
	movl	8(%rsi), %ecx
	movl	$1, %edx
	movl	$1, %r8d
.LBB7_29:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_31 Depth 2
	movl	%edi, %r9d
	movq	24(%rsi,%r9,8), %r10
	movl	%r8d, %r9d
	movq	24(%rsi,%r9,8), %r9
	movl	$1, %r11d
	cmpq	%rcx, %r10
	je	.LBB7_33
# %bb.30:                               # %.lr.ph149.preheader
                                        #   in Loop: Header=BB7_29 Depth=1
	movl	%ecx, %ebx
.LBB7_31:                               # %.lr.ph149
                                        #   Parent Loop BB7_29 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%r11d, %r14d
	cmpq	%r14, %r9
	jb	.LBB7_33
# %bb.32:                               #   in Loop: Header=BB7_31 Depth=2
	addl	%r11d, %r11d
	shrl	%ebx
	cmpq	%rbx, %r10
	jne	.LBB7_31
.LBB7_33:                               # %.critedge2
                                        #   in Loop: Header=BB7_29 Depth=1
	movl	%r11d, %r11d
	xorl	%r10d, %r10d
	cmpq	%r11, %r9
	setb	%r10b
	shll	$3, %r10d
	cmpq	%r11, %r9
	cmoval	%edx, %r10d
	testl	%r10d, %r10d
	jne	.LBB7_34
# %bb.35:                               #   in Loop: Header=BB7_29 Depth=1
	incl	%r8d
	decl	%edi
	cmpl	%eax, %r8d
	jbe	.LBB7_29
.LBB7_36:                               # %.thread121
	addq	$248, %rsi
	jmp	.LBB7_37
.LBB7_3:                                # %.thread..thread118_crit_edge
	movl	8(%rsi), %ecx
.LBB7_4:                                # %.thread118
	movl	(%rsi), %edx
	cmpq	%rcx, 24(%rsi,%rdx,8)
	jne	.LBB7_14
# %bb.5:                                # %.thread118
	testl	%eax, %eax
	je	.LBB7_14
# %bb.6:                                # %.preheader.lr.ph
	movq	24(%rsi), %rdx
	movl	$1, %edi
.LBB7_7:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_9 Depth 2
	shrl	%ecx
	movl	%edi, %r8d
	movq	24(%rsi,%r8,8), %r8
	movl	$1, %r9d
	cmpq	%rcx, %rdx
	je	.LBB7_11
# %bb.8:                                # %.lr.ph162.preheader
                                        #   in Loop: Header=BB7_7 Depth=1
	movl	$1, %r10d
.LBB7_9:                                # %.lr.ph162
                                        #   Parent Loop BB7_7 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%r9d, %r11d
	cmpq	%r11, %r8
	jb	.LBB7_11
# %bb.10:                               #   in Loop: Header=BB7_9 Depth=2
	addl	%r9d, %r9d
	movl	%r10d, %r11d
	incl	%r10d
	cmpq	%rcx, 24(%rsi,%r11,8)
	jne	.LBB7_9
.LBB7_11:                               # %.critedge4
                                        #   in Loop: Header=BB7_7 Depth=1
	movl	%r9d, %r9d
	cmpq	%r9, %r8
	ja	.LBB7_38
# %bb.12:                               #   in Loop: Header=BB7_7 Depth=1
	jb	.LBB7_14
# %bb.13:                               #   in Loop: Header=BB7_7 Depth=1
	incl	%edi
	cmpl	%eax, %edi
	jbe	.LBB7_7
.LBB7_14:                               # %.thread124
	addq	$256, %rsi                      # imm = 0x100
.LBB7_37:                               # %.loopexit.sink.split
	incq	(%rsi)
.LBB7_38:                               # %.loopexit
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB7_34:                               # %.critedge2
	.cfi_def_cfa_offset 40
	cmpl	$8, %r10d
	je	.LBB7_4
	jmp	.LBB7_38
.Lfunc_end7:
	.size	_Z15GPU_symmetryOpsjP5local, .Lfunc_end7-_Z15GPU_symmetryOpsjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z22GPU_symmetry_backTrackjjjjjP5local # -- Begin function _Z22GPU_symmetry_backTrackjjjjjP5local
	.type	_Z22GPU_symmetry_backTrackjjjjjP5local,@function
_Z22GPU_symmetry_backTrackjjjjjP5local: # @_Z22GPU_symmetry_backTrackjjjjjP5local
	.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, %rbx
	movl	%r8d, %ebp
	movl	%ecx, %r8d
	movl	%edx, %r15d
	movl	%esi, %r13d
	movl	%edi, %r12d
	movl	$-1, %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	movl	%r15d, %eax
	orl	%r8d, %eax
	orl	%ebp, %eax
	orl	%edx, %eax
	movl	%eax, %edx
	notl	%edx
	leal	-1(%r12), %ecx
	cmpl	%esi, %ecx
	jne	.LBB8_4
# %bb.1:
	cmpl	$-1, %eax
	je	.LBB8_12
# %bb.2:
	testl	%edx, 20(%rbx)
	jne	.LBB8_12
# %bb.3:
	movl	%edx, %eax
	movl	%r13d, %ecx
	movq	%rax, 24(%rbx,%rcx,8)
	movl	%r12d, %edi
	movq	%rbx, %rsi
	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
	jmp	_Z15GPU_symmetryOpsjP5local     # TAILCALL
.LBB8_4:
	.cfi_def_cfa_offset 80
	cmpl	%r13d, (%rbx)
	jbe	.LBB8_6
# %bb.5:
	movl	16(%rbx), %eax
	notl	%eax
	andl	%eax, %edx
	jmp	.LBB8_9
.LBB8_6:
	cmpl	%r13d, 4(%rbx)
	jne	.LBB8_9
# %bb.7:
	movl	16(%rbx), %eax
	movl	%eax, %ecx
	andl	%r8d, %ecx
	je	.LBB8_12
# %bb.8:
	cmpl	%eax, %ecx
	movl	$2147483647, %ecx               # imm = 0x7FFFFFFF
	cmovnel	%eax, %ecx
	andl	%ecx, %edx
.LBB8_9:
	testl	%edx, %edx
	je	.LBB8_12
# %bb.10:                               # %.lr.ph
	movl	%r13d, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	incl	%r13d
	movl	%r8d, 8(%rsp)                   # 4-byte Spill
.LBB8_11:                               # =>This Inner Loop Header: Depth=1
	movl	%edx, 12(%rsp)                  # 4-byte Spill
	movl	%edx, %r14d
	negl	%r14d
	andl	%edx, %r14d
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	%r14, 24(%rbx,%rax,8)
	movl	%r14d, %edx
	orl	%r15d, %edx
	addl	%edx, %edx
	movl	%r14d, %ecx
	orl	%r8d, %ecx
	movl	%r14d, %r8d
	orl	%ebp, %r8d
	shrl	%r8d
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%rbx, %r9
	callq	_Z22GPU_symmetry_backTrackjjjjjP5local
	movl	8(%rsp), %r8d                   # 4-byte Reload
	xorl	12(%rsp), %r14d                 # 4-byte Folded Reload
	movl	%r14d, %edx
	jne	.LBB8_11
.LBB8_12:                               # %.loopexit
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_Z22GPU_symmetry_backTrackjjjjjP5local, .Lfunc_end8-_Z22GPU_symmetry_backTrackjjjjjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local # -- Begin function _Z29GPU_symmetry_backTrack_cornerjjjjjP5local
	.type	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local,@function
_Z29GPU_symmetry_backTrack_cornerjjjjjP5local: # @_Z29GPU_symmetry_backTrack_cornerjjjjjP5local
	.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, %r15
	movl	%r8d, %r11d
	movl	%ecx, %r8d
	movl	%edx, %ebp
	movl	%esi, %r13d
	movl	%edi, %ebx
	movl	$-1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	movl	%edx, %ecx
	orl	%r8d, %ecx
	orl	%r11d, %ecx
	orl	%eax, %ecx
	movl	%ecx, %eax
	notl	%eax
	leal	-1(%rbx), %edx
	cmpl	%esi, %edx
	jne	.LBB9_3
# %bb.1:
	cmpl	$-1, %ecx
	je	.LBB9_6
# %bb.2:
	movl	%eax, %eax
	movl	%r13d, %ecx
	movq	%rax, 24(%r15,%rcx,8)
	incq	256(%r15)
	jmp	.LBB9_6
.LBB9_3:
	movl	%eax, %r14d
	andl	$-3, %r14d
	cmpl	%r13d, (%r15)
	cmovbel	%eax, %r14d
	testl	%r14d, %r14d
	je	.LBB9_6
# %bb.4:                                # %.lr.ph
	movl	%r13d, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	incl	%r13d
	movl	%r8d, 12(%rsp)                  # 4-byte Spill
	movl	%r11d, 8(%rsp)                  # 4-byte Spill
.LBB9_5:                                # =>This Inner Loop Header: Depth=1
	movl	%r14d, %r12d
	negl	%r12d
	andl	%r14d, %r12d
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	%r12, 24(%r15,%rax,8)
	movl	%r12d, %edx
	orl	%ebp, %edx
	addl	%edx, %edx
	movl	%r12d, %ecx
	orl	%r8d, %ecx
	movl	%r12d, %r8d
	orl	%r11d, %r8d
	shrl	%r8d
	movl	%ebx, %edi
	movl	%r13d, %esi
	movq	%r15, %r9
	callq	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local
	movl	12(%rsp), %r8d                  # 4-byte Reload
	movl	8(%rsp), %r11d                  # 4-byte Reload
	xorl	%r14d, %r12d
	movl	%r12d, %r14d
	jne	.LBB9_5
.LBB9_6:                                # %.loopexit
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local, .Lfunc_end9-_Z29GPU_symmetry_backTrack_cornerjjjjjP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z24symmetry_solve_nodeLayerjmmm # -- Begin function _Z24symmetry_solve_nodeLayerjmmm
	.type	_Z24symmetry_solve_nodeLayerjmmm,@function
_Z24symmetry_solve_nodeLayerjmmm:       # @_Z24symmetry_solve_nodeLayerjmmm
	.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	%rcx, %rbp
	movq	%rdx, %r15
	movl	%edi, %r14d
	movl	$-1, %ebx
	movl	%r14d, %ecx
	shll	%cl, %ebx
	notl	%ebx
	movl	$1, %r12d
	cmpq	%rdx, %rbx
	je	.LBB10_4
# %bb.1:
	movq	%rsi, %rdx
	movl	%r15d, %eax
	orl	%edx, %eax
	movl	%ebp, %ecx
	orl	%eax, %ecx
	notl	%ecx
	xorl	%r12d, %r12d
	andl	%ecx, %ebx
	je	.LBB10_4
# %bb.2:                                # %.lr.ph.preheader
	movq	%rdx, (%rsp)                    # 8-byte Spill
.LBB10_3:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbx, %r13
	negq	%r13
	andq	%rbx, %r13
	movq	%r13, %rsi
	orq	%rdx, %rsi
	shrq	%rsi
	movq	%r13, %rdx
	orq	%r15, %rdx
	movq	%r13, %rcx
	orq	%rbp, %rcx
	addq	%rcx, %rcx
	movl	%r14d, %edi
	callq	_Z24symmetry_solve_nodeLayerjmmm
	movq	(%rsp), %rdx                    # 8-byte Reload
	addq	%rax, %r12
	xorq	%r13, %rbx
	jne	.LBB10_3
.LBB10_4:                               # %.loopexit
	movq	%r12, %rax
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_Z24symmetry_solve_nodeLayerjmmm, .Lfunc_end10-_Z24symmetry_solve_nodeLayerjmmm
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__dim_nodeLayerjPlS_j # -- Begin function _Z28__device_stub__dim_nodeLayerjPlS_j
	.type	_Z28__device_stub__dim_nodeLayerjPlS_j,@function
_Z28__device_stub__dim_nodeLayerjPlS_j: # @_Z28__device_stub__dim_nodeLayerjPlS_j
	.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	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	40(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	32(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	8(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	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	$_Z13dim_nodeLayerjPlS_j, %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_end11:
	.size	_Z28__device_stub__dim_nodeLayerjPlS_j, .Lfunc_end11-_Z28__device_stub__dim_nodeLayerjPlS_j
	.cfi_endproc
                                        # -- End function
	.globl	_Z19countBits_nodeLayerl        # -- Begin function _Z19countBits_nodeLayerl
	.type	_Z19countBits_nodeLayerl,@function
_Z19countBits_nodeLayerl:               # @_Z19countBits_nodeLayerl
	.cfi_startproc
# %bb.0:
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	.LBB12_2
.LBB12_1:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	leaq	-1(%rdi), %rcx
	incl	%eax
	andq	%rcx, %rdi
	jne	.LBB12_1
.LBB12_2:                               # %._crit_edge
	retq
.Lfunc_end12:
	.size	_Z19countBits_nodeLayerl, .Lfunc_end12-_Z19countBits_nodeLayerl
	.cfi_endproc
                                        # -- End function
	.globl	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local # -- Begin function _Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
	.type	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local,@function
_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local: # @_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
	.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	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edi, %ebx
	movq	48(%rsp), %r14
	leal	-1(%rbx), %r15d
	movl	$1, %r12d
	movl	%r15d, %ecx
	shll	%cl, %r12d
	movl	$1, %ebp
	xorps	%xmm0, %xmm0
	movups	%xmm0, 256(%r14)
	movups	%xmm0, 240(%r14)
	xorl	%eax, %eax
	movq	%rax, 272(%r14)
	movl	%r12d, 8(%r14)
	movq	%rax, 12(%r14)
	movl	$0, 20(%r14)
	movq	$2, (%r14)
	movq	$1, 24(%r14)
	cmpl	$3, %r15d
	jb	.LBB13_4
# %bb.1:                                # %.lr.ph
	movl	$2, %ecx
.LBB13_2:                               # =>This Inner Loop Header: Depth=1
	movl	$1, %eax
	shll	%cl, %eax
	movq	%rax, 32(%r14)
	movl	$2, %r8d
	btsl	%ecx, %r8d
	leal	(%r8,%r8), %edx
	movl	$1, %eax
	btsl	%ecx, %eax
	shrl	%r8d
	movl	%ebx, %edi
	movl	$2, %esi
	movl	%eax, %ecx
                                        # kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_Z29GPU_symmetry_backTrack_cornerjjjjjP5local
	movl	(%r14), %ecx
	incl	%ecx
	movl	%ecx, (%r14)
	cmpl	$2, %ecx
	jb	.LBB13_4
# %bb.3:                                #   in Loop: Header=BB13_2 Depth=1
	cmpl	%r15d, %ecx
	jb	.LBB13_2
.LBB13_4:                               # %.critedge
	movl	%r12d, 8(%r14)
	movl	%r12d, %eax
	shrl	%eax
	movl	%eax, 12(%r14)
	orl	$1, %r12d
	movl	%r12d, 16(%r14)
	movl	%r12d, 20(%r14)
	movl	$1, (%r14)
	leal	-2(%rbx), %eax
	movl	%eax, 4(%r14)
.LBB13_5:                               # =>This Inner Loop Header: Depth=1
	movl	$1, %eax
	movl	%ebp, %ecx
	shll	%cl, %eax
	movl	$2, %edx
	shll	%cl, %edx
	movq	%rax, 24(%r14)
	movl	%eax, %r8d
	shrl	%r8d
	movl	%ebx, %edi
	movl	$1, %esi
	movl	%eax, %ecx
	movq	%r14, %r9
	callq	_Z22GPU_symmetry_backTrackjjjjjP5local
	movl	(%r14), %ebp
	movl	20(%r14), %eax
	incl	%ebp
	movl	%ebp, (%r14)
	decl	4(%r14)
	shrl	12(%r14)
	leal	(%rax,%rax), %ecx
	movl	%eax, %edx
	shrl	%edx
	orl	%ecx, %edx
	orl	%eax, %edx
	movl	%edx, 20(%r14)
	jmp	.LBB13_5
.Lfunc_end13:
	.size	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local, .Lfunc_end13-_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z16kLayer_nodeLayeriiP5local   # -- Begin function _Z16kLayer_nodeLayeriiP5local
	.type	_Z16kLayer_nodeLayeriiP5local,@function
_Z16kLayer_nodeLayeriiP5local:          # @_Z16kLayer_nodeLayeriiP5local
	.cfi_startproc
# %bb.0:                                # %.unreachable
	pushq	%rax
	.cfi_def_cfa_offset 16
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	movq	%rcx, (%rsp)
	movl	%esi, %edi
	callq	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
.Lfunc_end14:
	.size	_Z16kLayer_nodeLayeriiP5local, .Lfunc_end14-_Z16kLayer_nodeLayeriiP5local
	.cfi_endproc
                                        # -- End function
	.globl	_Z24symmetry_build_nodeLayeri   # -- Begin function _Z24symmetry_build_nodeLayeri
	.type	_Z24symmetry_build_nodeLayeri,@function
_Z24symmetry_build_nodeLayeri:          # @_Z24symmetry_build_nodeLayeri
	.cfi_startproc
# %bb.0:
	subq	$7576, %rsp                     # imm = 0x1D98
	.cfi_def_cfa_offset 7584
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	callq	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
.Lfunc_end15:
	.size	_Z24symmetry_build_nodeLayeri, .Lfunc_end15-_Z24symmetry_build_nodeLayeri
	.cfi_endproc
                                        # -- End function
	.globl	_Z8InitCUDAv                    # -- Begin function _Z8InitCUDAv
	.type	_Z8InitCUDAv,@function
_Z8InitCUDAv:                           # @_Z8InitCUDAv
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	subq	$1480, %rsp                     # imm = 0x5C8
	.cfi_def_cfa_offset 1504
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	leaq	4(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipGetDeviceCount
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	.LBB16_3
# %bb.1:                                # %.preheader
	jle	.LBB16_2
# %bb.5:                                # %.lr.ph
	xorl	%ebx, %ebx
	leaq	8(%rsp), %r14
.LBB16_6:                               # =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	hipGetDevicePropertiesR0600
	movl	4(%rsp), %ecx
	testl	%eax, %eax
	jne	.LBB16_8
# %bb.7:                                #   in Loop: Header=BB16_6 Depth=1
	cmpl	$0, 368(%rsp)
	jg	.LBB16_9
.LBB16_8:                               #   in Loop: Header=BB16_6 Depth=1
	incl	%ebx
	cmpl	%ecx, %ebx
	jl	.LBB16_6
	jmp	.LBB16_9
.LBB16_2:
	xorl	%ebx, %ebx
.LBB16_9:                               # %._crit_edge
	cmpl	%ecx, %ebx
	je	.LBB16_10
# %bb.11:
	movl	%ebx, %edi
	callq	hipSetDevice
	movb	$1, %al
.LBB16_12:
                                        # kill: def $al killed $al killed $eax
	addq	$1480, %rsp                     # imm = 0x5C8
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB16_3:
	.cfi_def_cfa_offset 1504
	movq	stderr(%rip), %rcx
	movl	$.L.str, %edi
	movl	$20, %esi
	jmp	.LBB16_4
.LBB16_10:
	movq	stderr(%rip), %rcx
	movl	$.L.str.1, %edi
	movl	$40, %esi
.LBB16_4:
	movl	$1, %edx
	callq	fwrite@PLT
	xorl	%eax, %eax
	jmp	.LBB16_12
.Lfunc_end16:
	.size	_Z8InitCUDAv, .Lfunc_end16-_Z8InitCUDAv
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.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	$7592, %rsp                     # imm = 0x1DA8
	.cfi_def_cfa_offset 7648
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	cmpl	$2, %edi
	jl	.LBB17_20
# %bb.1:
	movq	8(%rsi), %rax
	cmpb	$45, (%rax)
	jne	.LBB17_21
# %bb.2:
	movzbl	1(%rax), %eax
	addl	$-67, %eax
	cmpl	$47, %eax
	ja	.LBB17_13
# %bb.3:
	movabsq	$4294967297, %rcx               # imm = 0x100000001
	btq	%rax, %rcx
	jb	.LBB17_6
# %bb.4:
	movb	$1, %bpl
	movabsq	$68719476752, %rcx              # imm = 0x1000000010
	btq	%rax, %rcx
	jb	.LBB17_5
# %bb.7:
	movl	$.Lstr.7, %edi
	movabsq	$140737488388096, %rcx          # imm = 0x800000008000
	btq	%rax, %rcx
	jb	.LBB17_8
.LBB17_13:
	movb	$1, %r12b
	movl	$.Lstr.4, %edi
	xorl	%ebp, %ebp
	jmp	.LBB17_14
.LBB17_20:                              # %.thread170
	movq	(%rsi), %rsi
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	jmp	.LBB17_21
.LBB17_5:
	movl	$.Lstr.5, %edi
	xorl	%r12d, %r12d
.LBB17_14:
	callq	puts@PLT
	callq	_Z8InitCUDAv
	testb	%al, %al
	je	.LBB17_21
# %bb.15:
	movl	$.L.str.14, %edi
	callq	puts@PLT
	movl	$4, %ebx
	movq	%rsp, %r15
	movabsq	$1749024623285053783, %r14      # imm = 0x1845C8A0CE512957
.LBB17_16:                              # =>This Inner Loop Header: Depth=1
	leaq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	testb	%r12b, %r12b
	je	.LBB17_17
# %bb.18:                               #   in Loop: Header=BB17_16 Depth=1
	testb	%bpl, %bpl
	jne	.LBB17_19
	jmp	.LBB17_22
.LBB17_17:                              #   in Loop: Header=BB17_16 Depth=1
	movq	$0, UNIQUE(%rip)
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_Z24symmetry_solve_nodeLayerjmmm
	movq	%rax, TOTAL(%rip)
.LBB17_19:                              #   in Loop: Header=BB17_16 Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	8(%rsp), %rdx
	movq	16(%rsp), %rcx
	movq	24(%rsp), %rsi
	leaq	1000000(%rdx), %rax
	movq	%rcx, %rdi
	negq	%rdi
	cmpq	%rsi, %rdx
	notq	%rcx
	cmovgeq	%rdi, %rcx
	cmovgeq	%rdx, %rax
	addq	(%rsp), %rcx
	movslq	%ecx, %r8
	imulq	$-1037155065, %r8, %rdx         # imm = 0xC22E4507
	shrq	$32, %rdx
	addl	%edx, %r8d
	movl	%r8d, %edx
	shrl	$31, %edx
	sarl	$16, %r8d
	addl	%edx, %r8d
	subq	%rsi, %rax
	addq	$500, %rax                      # imm = 0x1F4
	movabsq	$3777893186295716171, %rdx      # imm = 0x346DC5D63886594B
	imulq	%rdx
	movq	%rdx, %r10
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$11, %r10
	addl	%eax, %r10d
	movq	%rcx, %rax
	imulq	%r14
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$13, %rdx
	addq	%rax, %rdx
	imulq	$86400, %rdx, %rax              # imm = 0x15180
	subq	%rax, %rcx
	movslq	%ecx, %r11
	imulq	$-1851608123, %r11, %r9         # imm = 0x91A2B3C5
	shrq	$32, %r9
	addl	%r11d, %r9d
	movl	%r9d, %eax
	shrl	$31, %eax
	sarl	$11, %r9d
	addl	%eax, %r9d
	imull	$-3600, %r9d, %eax              # imm = 0xF1F0
	addl	%r11d, %eax
	movslq	%eax, %r13
	imulq	$-2004318071, %r13, %rax        # imm = 0x88888889
	shrq	$32, %rax
	addl	%eax, %r13d
	movl	%r13d, %eax
	shrl	$31, %eax
	sarl	$5, %r13d
	addl	%eax, %r13d
	imulq	$-2004318071, %r11, %rax        # imm = 0x88888889
	shrq	$32, %rax
	addl	%r11d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$5, %eax
	addl	%ecx, %eax
	imull	$60, %eax, %eax
	subl	%eax, %r11d
	movq	TOTAL(%rip), %rdx
	movq	UNIQUE(%rip), %rcx
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	$.L.str.15, %edi
	movl	%ebx, %esi
                                        # kill: def $r8d killed $r8d killed $r8
                                        # kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	pushq	%r11
	.cfi_adjust_cfa_offset 8
	pushq	%r13
	.cfi_adjust_cfa_offset 8
	callq	printf
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
	incl	%ebx
	cmpl	$22, %ebx
	jne	.LBB17_16
	jmp	.LBB17_21
.LBB17_6:
	movl	$.Lstr.6, %edi
	xorl	%ebp, %ebp
.LBB17_8:                               # %.thread182
	callq	puts@PLT
	movl	$.L.str.12, %edi
	callq	puts@PLT
	movl	$4, %ebx
	movq	%rsp, %r12
	movabsq	$1749024623285053783, %r13      # imm = 0x1845C8A0CE512957
	movabsq	$3777893186295716171, %r14      # imm = 0x346DC5D63886594B
.LBB17_9:                               # =>This Inner Loop Header: Depth=1
	leaq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	%ebx, %edi
	leaq	32(%rsp), %rsi
	testb	%bpl, %bpl
	je	.LBB17_11
# %bb.10:                               #   in Loop: Header=BB17_9 Depth=1
	callq	_Z10symmetry_RjP5local
	jmp	.LBB17_12
.LBB17_11:                              # %.critedge
                                        #   in Loop: Header=BB17_9 Depth=1
	callq	_Z11symmetry_NRjP5local
.LBB17_12:                              #   in Loop: Header=BB17_9 Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	8(%rsp), %rax
	movq	16(%rsp), %rcx
	movq	24(%rsp), %rdi
	leaq	1000000(%rax), %rsi
	movq	%rcx, %rdx
	negq	%rdx
	cmpq	%rdi, %rax
	notq	%rcx
	cmovgeq	%rdx, %rcx
	cmovgeq	%rax, %rsi
	addq	(%rsp), %rcx
	movq	%rcx, %rax
	imulq	%r13
	movq	%rdx, %r8
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$13, %r8
	addq	%rax, %r8
	subq	%rdi, %rsi
	addq	$500, %rsi                      # imm = 0x1F4
	movq	%rsi, %rax
	imulq	%r14
	movq	%rdx, %r10
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$11, %r10
	addl	%eax, %r10d
	imulq	$86400, %r8, %rax               # imm = 0x15180
	subq	%rax, %rcx
	movslq	%ecx, %r11
	imulq	$-1851608123, %r11, %r9         # imm = 0x91A2B3C5
	shrq	$32, %r9
	addl	%r11d, %r9d
	movl	%r9d, %eax
	shrl	$31, %eax
	sarl	$11, %r9d
	addl	%eax, %r9d
	imull	$-3600, %r9d, %eax              # imm = 0xF1F0
	addl	%r11d, %eax
	movslq	%eax, %r15
	imulq	$-2004318071, %r15, %rax        # imm = 0x88888889
	shrq	$32, %rax
	addl	%eax, %r15d
	movl	%r15d, %eax
	shrl	$31, %eax
	sarl	$5, %r15d
	addl	%eax, %r15d
	imulq	$-2004318071, %r11, %rax        # imm = 0x88888889
	shrq	$32, %rax
	addl	%r11d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$5, %eax
	addl	%ecx, %eax
	imull	$60, %eax, %eax
	subl	%eax, %r11d
	movq	TOTAL(%rip), %rdx
	movq	UNIQUE(%rip), %rcx
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	$.L.str.13, %edi
	movl	%ebx, %esi
                                        # kill: def $r8d killed $r8d killed $r8
                                        # kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	pushq	%r11
	.cfi_adjust_cfa_offset 8
	pushq	%r15
	.cfi_adjust_cfa_offset 8
	callq	printf
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
	incl	%ebx
	cmpl	$18, %ebx
	jne	.LBB17_9
.LBB17_21:                              # %.thread
	xorl	%eax, %eax
	addq	$7592, %rsp                     # imm = 0x1DA8
	.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
.LBB17_22:
	.cfi_def_cfa_offset 7648
	xorl	%eax, %eax
	movq	%rax, UNIQUE(%rip)
	movq	%rax, TOTAL(%rip)
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	leaq	40(%rsp), %rax
	movl	%ebx, %edi
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	callq	_Z16kLayer_nodeLayeriRSt6vectorIlSaIlEEilllP5local
.Lfunc_end17:
	.size	main, .Lfunc_end17-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB18_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB18_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13dim_nodeLayerjPlS_j, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end18:
	.size	__hip_module_ctor, .Lfunc_end18-__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	.LBB19_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
.LBB19_2:
	retq
.Lfunc_end19:
	.size	__hip_module_dtor, .Lfunc_end19-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	TOTAL,@object                   # @TOTAL
	.bss
	.globl	TOTAL
	.p2align	3, 0x0
TOTAL:
	.quad	0                               # 0x0
	.size	TOTAL, 8

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

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

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"There is no device.\n"
	.size	.L.str, 21

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"There is no device supporting CUDA 1.x.\n"
	.size	.L.str.1, 41

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Usage: %s [-c|-g|-r|-s] n steps\n"
	.size	.L.str.2, 33

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	" N:           Total           Unique          dd:hh:mm:ss.ms"
	.size	.L.str.12, 61

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"%2d:%16ld%17ld%12.2d:%02d:%02d:%02d.%02d\n"
	.size	.L.str.13, 42

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	" N:        Total      Unique      dd:hh:mm:ss.ms"
	.size	.L.str.14, 49

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"%2d:%13ld%16ld%4.2d:%02d:%02d:%02d.%02d\n"
	.size	.L.str.15, 41

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z13dim_nodeLayerjPlS_j"
	.size	.L__unnamed_1, 24

	.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	"  -r: CPU \345\206\215\345\270\260"
	.size	.Lstr, 17

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"  -c: CPU \351\235\236\345\206\215\345\270\260"
	.size	.Lstr.1, 20

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"  -g: GPU \345\206\215\345\270\260"
	.size	.Lstr.2, 17

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"  -n: GPU \343\203\216\343\203\274\343\203\211\343\203\254\343\202\244\343\203\244\343\203\274"
	.size	.Lstr.3, 32

	.type	.Lstr.4,@object                 # @str.4
.Lstr.4:
	.asciz	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 GPU\343\203\216\343\203\274\343\203\211\343\203\254\343\202\244\343\203\244\343\203\274 "
	.size	.Lstr.4, 44

	.type	.Lstr.5,@object                 # @str.5
.Lstr.5:
	.asciz	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 GPU"
	.size	.Lstr.5, 22

	.type	.Lstr.6,@object                 # @str.6
.Lstr.6:
	.asciz	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 \351\235\236\345\206\215\345\270\260 "
	.size	.Lstr.6, 29

	.type	.Lstr.7,@object                 # @str.7
.Lstr.7:
	.asciz	"\n\n\345\257\276\347\247\260\350\247\243\351\231\244\346\263\225 \345\206\215\345\270\260 "
	.size	.Lstr.7, 26

	.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 _Z28__device_stub__dim_nodeLayerjPlS_j
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z13dim_nodeLayerjPlS_j
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.p2align	2                               ; -- Begin function _Z24symmetry_solve_nodeLayerjmmm
	.type	_Z24symmetry_solve_nodeLayerjmmm,@function
_Z24symmetry_solve_nodeLayerjmmm:       ; @_Z24symmetry_solve_nodeLayerjmmm
; %bb.0:
	s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
	s_mov_b32 s0, s33
	s_mov_b32 s33, s32
	s_or_saveexec_b32 s1, -1
	scratch_store_b32 off, v61, s33 offset:52 ; 4-byte Folded Spill
	s_mov_b32 exec_lo, s1
	v_writelane_b32 v61, s0, 5
	s_add_i32 s32, s32, 64
	s_clause 0xc
	scratch_store_b32 off, v40, s33 offset:48
	; meta instruction
	scratch_store_b32 off, v41, s33 offset:44
	; meta instruction
	scratch_store_b32 off, v42, s33 offset:40
	; meta instruction
	scratch_store_b32 off, v43, s33 offset:36
	; meta instruction
	scratch_store_b32 off, v44, s33 offset:32
	; meta instruction
	scratch_store_b32 off, v45, s33 offset:28
	; meta instruction
	scratch_store_b32 off, v46, s33 offset:24
	; meta instruction
	scratch_store_b32 off, v47, s33 offset:20
	; meta instruction
	scratch_store_b32 off, v56, s33 offset:16
	; meta instruction
	scratch_store_b32 off, v57, s33 offset:12
	; meta instruction
	scratch_store_b32 off, v58, s33 offset:8
	; meta instruction
	scratch_store_b32 off, v59, s33 offset:4
	; meta instruction
	scratch_store_b32 off, v60, s33
	v_writelane_b32 v61, s34, 0
	v_writelane_b32 v61, s35, 1
	v_writelane_b32 v61, s36, 2
	v_writelane_b32 v61, s30, 3
	v_writelane_b32 v61, s31, 4
	v_dual_mov_b32 v44, v6 :: v_dual_mov_b32 v45, v0
	v_dual_mov_b32 v42, 1 :: v_dual_mov_b32 v41, v4
	v_mov_b32_e32 v40, v3
	v_dual_mov_b32 v46, v5 :: v_dual_mov_b32 v47, v2
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_lshlrev_b32_e64 v0, v45, -1
	v_dual_mov_b32 v56, v1 :: v_dual_mov_b32 v1, 0
	v_mov_b32_e32 v43, 0
	s_mov_b32 s34, exec_lo
	v_not_b32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ne_u64_e64 v[0:1], v[40:41]
	s_cbranch_execz .LBB0_6
; %bb.1:
	v_or3_b32 v1, v40, v56, v46
	v_and_b32_e64 v58, s0, 0
	s_mov_b32 s35, exec_lo
	v_mov_b32_e32 v42, 0
	v_mov_b32_e32 v43, 0
	v_not_b32_e32 v1, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_and_b32_e32 v57, v1, v0
	v_cmpx_ne_u64_e32 0, v[57:58]
	s_cbranch_execz .LBB0_5
; %bb.2:                                ; %.lr.ph.preheader
	v_mov_b32_e32 v42, 0
	v_mov_b32_e32 v43, 0
	s_mov_b32 s36, 0
.LBB0_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	v_sub_co_u32 v0, vcc_lo, 0, v57
	v_sub_co_ci_u32_e32 v1, vcc_lo, 0, v58, vcc_lo
	s_getpc_b64 s[0:1]
	s_add_u32 s0, s0, _Z24symmetry_solve_nodeLayerjmmm@rel32@lo+4
	s_addc_u32 s1, s1, _Z24symmetry_solve_nodeLayerjmmm@rel32@hi+12
	v_and_b32_e32 v60, v57, v0
	v_and_b32_e32 v59, v58, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_or_b32_e32 v1, v60, v56
	v_or_b32_e32 v7, v60, v46
	v_or_b32_e32 v0, v59, v47
	v_or_b32_e32 v3, v60, v40
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_4) | instid1(VALU_DEP_2)
	v_alignbit_b32 v1, v0, v1, 1
	v_lshrrev_b32_e32 v2, 1, v0
	v_mov_b32_e32 v0, v45
	v_or_b32_e32 v8, v59, v44
	v_or_b32_e32 v4, v59, v41
	v_lshlrev_b64 v[5:6], 1, v[7:8]
	v_alignbit_b32 v6, v8, v7, 31
	s_swappc_b64 s[30:31], s[0:1]
	v_xor_b32_e32 v58, v59, v58
	v_xor_b32_e32 v57, v60, v57
	v_add_co_u32 v42, s0, v0, v42
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e64 v43, s0, v1, v43, s0
	v_cmp_eq_u64_e32 vcc_lo, 0, v[57:58]
	s_or_b32 s36, vcc_lo, s36
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s36
	s_cbranch_execnz .LBB0_3
; %bb.4:                                ; %Flow
	s_or_b32 exec_lo, exec_lo, s36
.LBB0_5:                                ; %Flow29
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s35
.LBB0_6:                                ; %.loopexit
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s34
	v_dual_mov_b32 v0, v42 :: v_dual_mov_b32 v1, v43
	s_clause 0xc
	scratch_load_b32 v60, off, s33
	scratch_load_b32 v59, off, s33 offset:4
	scratch_load_b32 v58, off, s33 offset:8
	scratch_load_b32 v57, off, s33 offset:12
	scratch_load_b32 v56, off, s33 offset:16
	scratch_load_b32 v47, off, s33 offset:20
	scratch_load_b32 v46, off, s33 offset:24
	scratch_load_b32 v45, off, s33 offset:28
	scratch_load_b32 v44, off, s33 offset:32
	scratch_load_b32 v43, off, s33 offset:36
	scratch_load_b32 v42, off, s33 offset:40
	scratch_load_b32 v41, off, s33 offset:44
	scratch_load_b32 v40, off, s33 offset:48
	v_readlane_b32 s30, v61, 3
	v_readlane_b32 s31, v61, 4
	v_readlane_b32 s36, v61, 2
	v_readlane_b32 s35, v61, 1
	v_readlane_b32 s34, v61, 0
	v_readlane_b32 s0, v61, 5
	s_or_saveexec_b32 s1, -1
	scratch_load_b32 v61, off, s33 offset:52 ; 4-byte Folded Reload
	s_mov_b32 exec_lo, s1
	s_addk_i32 s32, 0xffc0
	s_mov_b32 s33, s0
	s_waitcnt vmcnt(0)
	s_setpc_b64 s[30:31]
.Lfunc_end0:
	.size	_Z24symmetry_solve_nodeLayerjmmm, .Lfunc_end0-_Z24symmetry_solve_nodeLayerjmmm
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Function info:
; codeLenInByte = 696
; NumSgprs: 39
; NumVgprs: 62
; ScratchSize: 64
; MemoryBound: 0
	.text
	.protected	_Z13dim_nodeLayerjPlS_j ; -- Begin function _Z13dim_nodeLayerjPlS_j
	.globl	_Z13dim_nodeLayerjPlS_j
	.p2align	8
	.type	_Z13dim_nodeLayerjPlS_j,@function
_Z13dim_nodeLayerjPlS_j:                ; @_Z13dim_nodeLayerjPlS_j
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x2c
	s_load_b32 s3, s[0:1], 0x18
	s_mov_b32 s32, 0
	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[40:41], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_u32_e64 s3, v40
	s_cbranch_execz .LBB1_2
; %bb.1:
	s_clause 0x1
	s_load_b128 s[40:43], s[0:1], 0x8
	s_load_b32 s2, s[0:1], 0x0
	v_lshl_add_u32 v0, v40, 1, v40
	s_getpc_b64 s[0:1]
	s_add_u32 s0, s0, _Z24symmetry_solve_nodeLayerjmmm@rel32@lo+4
	s_addc_u32 s1, s1, _Z24symmetry_solve_nodeLayerjmmm@rel32@hi+12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[0:1], 3, v[0:1]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, s40, v0
	v_add_co_ci_u32_e32 v6, vcc_lo, s41, v1, vcc_lo
	v_mov_b32_e32 v0, s2
	s_clause 0x1
	global_load_b128 v[1:4], v[5:6], off
	global_load_b64 v[5:6], v[5:6], off offset:16
	s_swappc_b64 s[30:31], s[0:1]
	v_ashrrev_i32_e32 v41, 31, v40
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 3, v[40:41]
	v_add_co_u32 v2, vcc_lo, s42, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s43, v3, vcc_lo
	global_store_b64 v[2:3], v[0:1], off
.LBB1_2:
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13dim_nodeLayerjPlS_j
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 64
		.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 1
		.amdhsa_enable_private_segment 1
		.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 62
		.amdhsa_next_free_sgpr 44
		.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	_Z13dim_nodeLayerjPlS_j, .Lfunc_end1-_Z13dim_nodeLayerjPlS_j
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 220
; NumSgprs: 46
; NumVgprs: 62
; ScratchSize: 64
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 5
; VGPRBlocks: 7
; NumSGPRsForWavesPerEU: 46
; NumVGPRsForWavesPerEU: 62
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 1
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
