#include <stdio.h>
#include <stdint.h>
#include <arpa/inet.h>

#define BUFFER_LEN         64 
#define BUFFER_SIZE_OFFSET 56
//#define THREADS            4096 
#define THREADS            64 
#define LEFTROTATE(x, c)  (((x) << (c)) | ((x) >> (32 - (c))))


size_t pad(const char * message, uint32_t buffer[]) {
   size_t buffer_size = strnlen(message,BUFFER_LEN);
   uint8_t * buffer_8 = (uint8_t *) buffer;
   memset(buffer_8,0,BUFFER_LEN );
   memcpy(buffer_8,message,buffer_size);
   buffer_8[buffer_size] = 0x80;
   size_t newLen = buffer_size * 8;
   uint8_t * offset = &buffer_8[BUFFER_SIZE_OFFSET];
   memcpy(offset, &newLen, 4);
   return buffer_size;
}

void loadHash(char* argv, uint32_t* a, uint32_t* b, uint32_t* c, uint32_t* d) {
   char tmp[8];

   strncpy(tmp,&argv[0],8);
   *a = htonl(strtoul(tmp,0,16));

   strncpy(tmp,&argv[8],8);
   *b = htonl(strtoul(tmp,0,16));

   strncpy(tmp,&argv[16],8);
   *c = htonl(strtoul(tmp,0,16));

   strncpy(tmp,&argv[24],8);
   *d = htonl(strtoul(tmp,0,16));
}

__global__ void find( uint32_t hostA, uint32_t hostB, uint32_t hostC, uint32_t hostD, uint32_t * outM, char * msg ) {
    
   int tid = blockIdx.x;
   char init = ';' + (tid / 64);
   char stop = ';' + (tid % 64);

   //printf("I am thread %d and I will explore from %c%c;;;; to %c%czzzz a hash \n", tid, init, stop, init,stop);

   uint32_t targetA = hostA;
   uint32_t targetB = hostB;
   uint32_t targetC = hostC;
   uint32_t targetD = hostD;

   uint32_t M[BUFFER_LEN];
   for (int i=0; i<BUFFER_LEN; ++i) {
     M[i] = outM[i];
   } 


   char char0,char1,char2,char3,char4; 

   char0 = stop;
   for (char1 = ';'; char1 <= 'z' ; ++char1) {
 
   for (char2 = ';'; char2 <= 'z' ; ++char2) {
   for (char3 = ';'; char3 <= 'z' ; ++char3) {
   for (char4 = ';'; char4 <= 'z' ; ++char4) {

      ((char *)M)[0] = char0;
      ((char *)M)[1] = char1;
      ((char *)M)[2] = char2;
      ((char *)M)[3] = char3;
      ((char *)M)[4] = char4;

      //Initialize variables:
      uint32_t a0 = 0x67452301; 
      uint32_t b0 = 0xefcdab89;
      uint32_t c0 = 0x98badcfe;
      uint32_t d0 = 0x10325476;


       //Initialize hash value for this chunk:
       uint32_t A = a0;
       uint32_t B = b0;
       uint32_t C = c0;
       uint32_t D = d0;

       //Main loop:                                                 
       uint32_t F; 

       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xd76aa478 + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);

       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xe8c7b756 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);

       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x242070db + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xc1bdceee + M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xf57c0faf + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x4787c62a + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xa8304613 + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xfd469501 + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x698098d8 + M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x8b44f7af + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xffff5bb1  + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x895cd7be + M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x6b901122 + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xfd987193 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xa679438e + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x49b40821 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
// ********************************************************************************************

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xf61e2562 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xc040b340+ M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x265e5a51 + M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A +0xe9b6c7aa  + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xd62f105d + M[5];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x2441453 + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xd8a1e681 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xe7d3fbc8 + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x21e1cde6 + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xc33707d6 + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xf4d50d87 + M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x455a14ed + M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xa9e3e905 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xfcefa3f8 + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x676f02d9 + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x8d2a4c8a + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
// ***************************************************************************************************

       F = B ^ C ^ D;
       F = F + A + 0xfffa3942 + M[5];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0x8771f681+ M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A +  0x6d9d6122+ M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0xfde5380c + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);
 
       F = B ^ C ^ D;
       F = F + A + 0xa4beea44 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0x4bdecfa9 + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A +0xf6bb4b60  + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0xbebfbc70 + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);
 
       F = B ^ C ^ D;
       F = F + A + 0x289b7ec6 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0xeaa127fa + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A +  0xd4ef3085+ M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0x4881d05 + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);
 
       F = B ^ C ^ D;
       F = F + A + 0xd9d4d039 + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0xe6db99e5 + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A + 0x1fa27cf8 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0xc4ac5665 + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);

// **********************************************************************************************

       F = C ^ (B | (~  D));
       F = F + A + 0xf4292244 + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x432aff97 + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xab9423a7 + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xfc93a039 + M[5];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);
 
       F = C ^ (B | (~  D));
       F = F + A + 0x655b59c3 + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x8f0ccc92 + M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xffeff47d + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x85845dd1 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);
 

       F = C ^ (B | (~  D));
       F = F + A + 0x6fa87e4f + M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xfe2ce6e0 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xa3014314 + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x4e0811a1 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);
 

       F = C ^ (B | (~  D));
       F = F + A + 0xf7537e82 + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xbd3af235 + M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x2ad7d2bb + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xeb86d391 + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);

       //Add this chunk's hash to result so far:
       a0 = a0 + A;
       b0 = b0 + B;
       c0 = c0 + C;
       d0 = d0 + D;
  
       if ( targetA == a0
         && targetB == b0
         && targetC == c0
         && targetD == d0) {
            msg[0] = char0;
            msg[1] = char1;
            msg[2] = char2;
            msg[3] = char3;
            msg[4] = char4;
//            printf("hashcount : %lu\n", hashcount);
            return ;
         }
   } 
   }
   }
   }
   

}

int main( int argc, char * argv[] ) {

    // check arguments
    if (argc != 2) return 1;

    // allocate and prepare hash
    char hash[]=  "00000000000000000000000000000000";
    memcpy(hash,argv[1],32);
    uint32_t hostA;
    uint32_t hostB;
    uint32_t hostC;
    uint32_t hostD;

    loadHash(hash, &hostA, &hostB, &hostC, &hostD);


    char msg[9] = {0,0,0,0,0,0,0,0,0};

    char *dev_msg;


    uint32_t M[BUFFER_LEN];
    uint32_t * dev_M;
    pad("01234", M);


    cudaMalloc( (void**)&dev_M , BUFFER_LEN ) ;
    cudaMalloc( (void**)&dev_msg , 9 ) ;

    cudaMemcpy( (void*) dev_M, (void*) M, BUFFER_LEN ,cudaMemcpyHostToDevice ) ;

    find<<<THREADS,1>>>( hostA, hostB, hostC, hostD, dev_M, dev_msg );

    cudaMemcpy( msg, dev_msg, 8,cudaMemcpyDeviceToHost ) ;
    if (msg[0] == 0) {
         printf("key not found \n");
    } else {
      printf("<<< FOUND KEY : %s >>>\n", msg);
    }

    cudaFree( dev_msg ) ;
    return 0;
}

	.file	"tmpxft_00362efd_00000000-6_find5.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2034:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2034:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z3padPKcPj
	.type	_Z3padPKcPj, @function
_Z3padPKcPj:
.LFB2029:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	movl	$64, %esi
	pushq	%rax
	.cfi_def_cfa_offset 32
	call	strnlen@PLT
	movq	%rbx, %rdi
	movl	$16, %ecx
	movq	%rbp, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	rep stosl
	movq	%rbx, %rdi
	movq	%rdx, %rcx
	leaq	0(,%rdx,8), %rax
	rep movsb
	movb	$-128, (%rbx,%rdx)
	movl	%eax, 56(%rbx)
	movq	%rdx, %rax
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z3padPKcPj, .-_Z3padPKcPj
	.globl	_Z8loadHashPcPjS0_S0_S0_
	.type	_Z8loadHashPcPjS0_S0_S0_, @function
_Z8loadHashPcPjS0_S0_S0_:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	movq	%rdi, %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	movl	$8, %edx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rcx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r8, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	call	strncpy@PLT
	movl	$16, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	__isoc23_strtoul@PLT
	leaq	8(%rbp), %rsi
	movl	$8, %edx
	movq	%rbx, %rdi
	bswap	%eax
	movl	%eax, (%r15)
	call	strncpy@PLT
	movl	$16, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	__isoc23_strtoul@PLT
	leaq	16(%rbp), %rsi
	movl	$8, %edx
	movq	%rbx, %rdi
	bswap	%eax
	movl	%eax, (%r14)
	call	strncpy@PLT
	movl	$16, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	__isoc23_strtoul@PLT
	leaq	24(%rbp), %rsi
	movl	$8, %edx
	movq	%rbx, %rdi
	bswap	%eax
	movl	%eax, 0(%r13)
	call	strncpy@PLT
	movl	$16, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	__isoc23_strtoul@PLT
	bswap	%eax
	movl	%eax, (%r12)
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	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
.LFE2030:
	.size	_Z8loadHashPcPjS0_S0_S0_, .-_Z8loadHashPcPjS0_S0_S0_
	.globl	_Z29__device_stub__Z4findjjjjPjPcjjjjPjPc
	.type	_Z29__device_stub__Z4findjjjjPjPcjjjjPjPc, @function
_Z29__device_stub__Z4findjjjjPjPcjjjjPjPc:
.LFB2056:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movl	%edi, 28(%rsp)
	leaq	56(%rsp), %rdi
	movl	%esi, 24(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 20(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 16(%rsp)
	leaq	48(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%r9, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 136(%rsp)
	movq	%rsp, %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z4findjjjjPjPc(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	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 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L8:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2056:
	.size	_Z29__device_stub__Z4findjjjjPjPcjjjjPjPc, .-_Z29__device_stub__Z4findjjjjPjPcjjjjPjPc
	.globl	_Z4findjjjjPjPc
	.type	_Z4findjjjjPjPc, @function
_Z4findjjjjPjPc:
.LFB2057:
	.cfi_startproc
	endbr64
	jmp	_Z29__device_stub__Z4findjjjjPjPcjjjjPjPc
	.cfi_endproc
.LFE2057:
	.size	_Z4findjjjjPjPc, .-_Z4findjjjjPjPc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"01234"
.LC1:
	.string	"key not found \n"
.LC2:
	.string	"<<< FOUND KEY : %s >>>\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2031:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	subq	$368, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 360(%rsp)
	xorl	%eax, %eax
	movl	$1, %eax
	cmpl	$2, %edi
	jne	.L13
	movabsq	$3472328296227680304, %rax
	leaq	12(%rsp), %r8
	leaq	8(%rsp), %rcx
	movb	$0, 359(%rsp)
	movq	%rax, 327(%rsp)
	leaq	4(%rsp), %rdx
	leaq	327(%rsp), %rdi
	movq	%rax, 335(%rsp)
	leaq	60(%rsp), %rbx
	movq	%rax, 343(%rsp)
	movq	%rax, 351(%rsp)
	movq	8(%rsi), %rax
	movq	%rsp, %rsi
	movups	(%rax), %xmm0
	movups	%xmm0, 327(%rsp)
	movups	16(%rax), %xmm1
	movups	%xmm1, 343(%rsp)
	call	_Z8loadHashPcPjS0_S0_S0_
	xorl	%eax, %eax
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	movq	%rax, 318(%rsp)
	movb	$0, 326(%rsp)
	call	_Z3padPKcPj
	leaq	24(%rsp), %rdi
	movl	$64, %esi
	call	cudaMalloc@PLT
	leaq	16(%rsp), %rdi
	movl	$9, %esi
	call	cudaMalloc@PLT
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$64, %edx
	call	cudaMemcpy@PLT
	movl	$67108865, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$6, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movabsq	$4294967297, %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L15
	movq	16(%rsp), %r9
	movq	24(%rsp), %r8
	movl	12(%rsp), %ecx
	movl	8(%rsp), %edx
	movl	4(%rsp), %esi
	movl	(%rsp), %edi
	call	_Z29__device_stub__Z4findjjjjPjPcjjjjPjPc
.L15:
	movq	16(%rsp), %rsi
	movl	$2, %ecx
	movl	$8, %edx
	leaq	318(%rsp), %rbx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	cmpb	$0, 318(%rsp)
	jne	.L16
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
.L16:
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L17:
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	xorl	%eax, %eax
.L13:
	movq	360(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	addq	$368, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2031:
	.size	main, .-main
	.section	.rodata.str1.1
.LC3:
	.string	"_Z4findjjjjPjPc"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2059:
	.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	.LC3(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z4findjjjjPjPc(%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
.LFE2059:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdint.h>
#include <arpa/inet.h>

#define BUFFER_LEN         64 
#define BUFFER_SIZE_OFFSET 56
//#define THREADS            4096 
#define THREADS            64 
#define LEFTROTATE(x, c)  (((x) << (c)) | ((x) >> (32 - (c))))


size_t pad(const char * message, uint32_t buffer[]) {
   size_t buffer_size = strnlen(message,BUFFER_LEN);
   uint8_t * buffer_8 = (uint8_t *) buffer;
   memset(buffer_8,0,BUFFER_LEN );
   memcpy(buffer_8,message,buffer_size);
   buffer_8[buffer_size] = 0x80;
   size_t newLen = buffer_size * 8;
   uint8_t * offset = &buffer_8[BUFFER_SIZE_OFFSET];
   memcpy(offset, &newLen, 4);
   return buffer_size;
}

void loadHash(char* argv, uint32_t* a, uint32_t* b, uint32_t* c, uint32_t* d) {
   char tmp[8];

   strncpy(tmp,&argv[0],8);
   *a = htonl(strtoul(tmp,0,16));

   strncpy(tmp,&argv[8],8);
   *b = htonl(strtoul(tmp,0,16));

   strncpy(tmp,&argv[16],8);
   *c = htonl(strtoul(tmp,0,16));

   strncpy(tmp,&argv[24],8);
   *d = htonl(strtoul(tmp,0,16));
}

__global__ void find( uint32_t hostA, uint32_t hostB, uint32_t hostC, uint32_t hostD, uint32_t * outM, char * msg ) {
    
   int tid = blockIdx.x;
   char init = ';' + (tid / 64);
   char stop = ';' + (tid % 64);

   //printf("I am thread %d and I will explore from %c%c;;;; to %c%czzzz a hash \n", tid, init, stop, init,stop);

   uint32_t targetA = hostA;
   uint32_t targetB = hostB;
   uint32_t targetC = hostC;
   uint32_t targetD = hostD;

   uint32_t M[BUFFER_LEN];
   for (int i=0; i<BUFFER_LEN; ++i) {
     M[i] = outM[i];
   } 


   char char0,char1,char2,char3,char4; 

   char0 = stop;
   for (char1 = ';'; char1 <= 'z' ; ++char1) {
 
   for (char2 = ';'; char2 <= 'z' ; ++char2) {
   for (char3 = ';'; char3 <= 'z' ; ++char3) {
   for (char4 = ';'; char4 <= 'z' ; ++char4) {

      ((char *)M)[0] = char0;
      ((char *)M)[1] = char1;
      ((char *)M)[2] = char2;
      ((char *)M)[3] = char3;
      ((char *)M)[4] = char4;

      //Initialize variables:
      uint32_t a0 = 0x67452301; 
      uint32_t b0 = 0xefcdab89;
      uint32_t c0 = 0x98badcfe;
      uint32_t d0 = 0x10325476;


       //Initialize hash value for this chunk:
       uint32_t A = a0;
       uint32_t B = b0;
       uint32_t C = c0;
       uint32_t D = d0;

       //Main loop:                                                 
       uint32_t F; 

       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xd76aa478 + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);

       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xe8c7b756 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);

       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x242070db + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xc1bdceee + M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xf57c0faf + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x4787c62a + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xa8304613 + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xfd469501 + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x698098d8 + M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x8b44f7af + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xffff5bb1  + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x895cd7be + M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x6b901122 + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 7);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xfd987193 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 12);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0xa679438e + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 17);
 
       F = (B & C) | (( ~ B) & D);
       F = F + A + 0x49b40821 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 22);
 
// ********************************************************************************************

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xf61e2562 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xc040b340+ M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x265e5a51 + M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A +0xe9b6c7aa  + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xd62f105d + M[5];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x2441453 + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xd8a1e681 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xe7d3fbc8 + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x21e1cde6 + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xc33707d6 + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xf4d50d87 + M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x455a14ed + M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xa9e3e905 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 5);
 
       F = (D & B) | (( ~ D) & C);
       F = F + A + 0xfcefa3f8 + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 9);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x676f02d9 + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 14);

       F = (D & B) | (( ~ D) & C);
       F = F + A + 0x8d2a4c8a + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 20);
 
// ***************************************************************************************************

       F = B ^ C ^ D;
       F = F + A + 0xfffa3942 + M[5];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0x8771f681+ M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A +  0x6d9d6122+ M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0xfde5380c + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);
 
       F = B ^ C ^ D;
       F = F + A + 0xa4beea44 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0x4bdecfa9 + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A +0xf6bb4b60  + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0xbebfbc70 + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);
 
       F = B ^ C ^ D;
       F = F + A + 0x289b7ec6 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0xeaa127fa + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A +  0xd4ef3085+ M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0x4881d05 + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);
 
       F = B ^ C ^ D;
       F = F + A + 0xd9d4d039 + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 4);
 
       F = B ^ C ^ D;
       F = F + A + 0xe6db99e5 + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 11);
 
       F = B ^ C ^ D;
       F = F + A + 0x1fa27cf8 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 16);
 
       F = B ^ C ^ D;
       F = F + A + 0xc4ac5665 + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 23);

// **********************************************************************************************

       F = C ^ (B | (~  D));
       F = F + A + 0xf4292244 + M[0];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x432aff97 + M[7];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xab9423a7 + M[14];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xfc93a039 + M[5];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);
 
       F = C ^ (B | (~  D));
       F = F + A + 0x655b59c3 + M[12];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x8f0ccc92 + M[3];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xffeff47d + M[10];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x85845dd1 + M[1];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);
 

       F = C ^ (B | (~  D));
       F = F + A + 0x6fa87e4f + M[8];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xfe2ce6e0 + M[15];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xa3014314 + M[6];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x4e0811a1 + M[13];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);
 

       F = C ^ (B | (~  D));
       F = F + A + 0xf7537e82 + M[4];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 6);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xbd3af235 + M[11];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 10);
    
       F = C ^ (B | (~  D));
       F = F + A + 0x2ad7d2bb + M[2];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 15);
    
       F = C ^ (B | (~  D));
       F = F + A + 0xeb86d391 + M[9];  
       A = D;
       D = C;
       C = B;
       B = B + LEFTROTATE(F, 21);

       //Add this chunk's hash to result so far:
       a0 = a0 + A;
       b0 = b0 + B;
       c0 = c0 + C;
       d0 = d0 + D;
  
       if ( targetA == a0
         && targetB == b0
         && targetC == c0
         && targetD == d0) {
            msg[0] = char0;
            msg[1] = char1;
            msg[2] = char2;
            msg[3] = char3;
            msg[4] = char4;
//            printf("hashcount : %lu\n", hashcount);
            return ;
         }
   } 
   }
   }
   }
   

}

int main( int argc, char * argv[] ) {

    // check arguments
    if (argc != 2) return 1;

    // allocate and prepare hash
    char hash[]=  "00000000000000000000000000000000";
    memcpy(hash,argv[1],32);
    uint32_t hostA;
    uint32_t hostB;
    uint32_t hostC;
    uint32_t hostD;

    loadHash(hash, &hostA, &hostB, &hostC, &hostD);


    char msg[9] = {0,0,0,0,0,0,0,0,0};

    char *dev_msg;


    uint32_t M[BUFFER_LEN];
    uint32_t * dev_M;
    pad("01234", M);


    hipMalloc( (void**)&dev_M , BUFFER_LEN ) ;
    hipMalloc( (void**)&dev_msg , 9 ) ;

    hipMemcpy( (void*) dev_M, (void*) M, BUFFER_LEN ,hipMemcpyHostToDevice ) ;

    find<<<THREADS,1>>>( hostA, hostB, hostC, hostD, dev_M, dev_msg );

    hipMemcpy( msg, dev_msg, 8,hipMemcpyDeviceToHost ) ;
    if (msg[0] == 0) {
         printf("key not found \n");
    } else {
      printf("<<< FOUND KEY : %s >>>\n", msg);
    }

    hipFree( dev_msg ) ;
    return 0;
}

	.text
	.file	"find5.hip"
	.globl	_Z3padPKcPj                     # -- Begin function _Z3padPKcPj
	.type	_Z3padPKcPj,@function
_Z3padPKcPj:                            # @_Z3padPKcPj
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$64, %esi
	callq	strnlen
	movq	%rax, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movups	%xmm0, 16(%rbx)
	movups	%xmm0, 32(%rbx)
	movups	%xmm0, 48(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	memcpy@PLT
	movb	$-128, (%rbx,%r15)
	leal	(,%r15,8), %eax
	movl	%eax, 56(%rbx)
	movq	%r15, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z3padPKcPj, .Lfunc_end0-_Z3padPKcPj
	.cfi_endproc
                                        # -- End function
	.globl	_Z8loadHashPcPjS0_S0_S0_        # -- Begin function _Z8loadHashPcPjS0_S0_S0_
	.type	_Z8loadHashPcPjS0_S0_S0_,@function
_Z8loadHashPcPjS0_S0_S0_:               # @_Z8loadHashPcPjS0_S0_S0_
	.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	%r8, %rbx
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %rbp
	movq	%rdi, %r15
	movq	%rsp, %r14
	movl	$8, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	strncpy
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	__isoc23_strtoul
	bswapl	%eax
	movl	%eax, (%rbp)
	leaq	8(%r15), %rsi
	movl	$8, %edx
	movq	%r14, %rdi
	callq	strncpy
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	__isoc23_strtoul
	bswapl	%eax
	movl	%eax, (%r13)
	leaq	16(%r15), %rsi
	movl	$8, %edx
	movq	%r14, %rdi
	callq	strncpy
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	__isoc23_strtoul
	bswapl	%eax
	movl	%eax, (%r12)
	addq	$24, %r15
	movl	$8, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	strncpy
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	__isoc23_strtoul
	bswapl	%eax
	movl	%eax, (%rbx)
	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_end1:
	.size	_Z8loadHashPcPjS0_S0_S0_, .Lfunc_end1-_Z8loadHashPcPjS0_S0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z19__device_stub__findjjjjPjPc # -- Begin function _Z19__device_stub__findjjjjPjPc
	.type	_Z19__device_stub__findjjjjPjPc,@function
_Z19__device_stub__findjjjjPjPc:        # @_Z19__device_stub__findjjjjPjPc
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$128, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	4(%rsp), %rsi
	movl	%edx, (%rsi)
	movq	%rsp, %rdx
	movl	%ecx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%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	$_Z4findjjjjPjPc, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z19__device_stub__findjjjjPjPc, .Lfunc_end2-_Z19__device_stub__findjjjjPjPc
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	movl	$1, %eax
	cmpl	$2, %edi
	jne	.LBB3_7
# %bb.1:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	subq	$360, %rsp                      # imm = 0x168
	.cfi_def_cfa_offset 384
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	xorl	%ebx, %ebx
	leaq	48(%rsp), %rdi
	movb	%bl, 32(%rdi)
	movq	8(%rsi), %rax
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movaps	%xmm1, 16(%rdi)
	movaps	%xmm0, (%rdi)
	leaq	20(%rsp), %rsi
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %r8
	callq	_Z8loadHashPcPjS0_S0_S0_
	movb	%bl, 32(%rsp)
	movq	$0, 24(%rsp)
	xorps	%xmm0, %xmm0
	leaq	96(%rsp), %rbx
	movups	%xmm0, 48(%rbx)
	movups	%xmm0, 6(%rbx)
	movups	%xmm0, 22(%rbx)
	movups	%xmm0, 38(%rbx)
	movl	$858927408, (%rbx)              # imm = 0x33323130
	movw	$-32716, 4(%rbx)                # imm = 0x8034
	movl	$40, 56(%rbx)
	leaq	40(%rsp), %r14
	movl	$64, %esi
	movq	%r14, %rdi
	callq	hipMalloc
	movq	%rsp, %rdi
	movl	$9, %esi
	callq	hipMalloc
	movq	(%r14), %rdi
	movl	$64, %edx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$4294967297, %rdx               # imm = 0x100000001
	leaq	63(%rdx), %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_3
# %bb.2:
	movl	20(%rsp), %edi
	movl	16(%rsp), %esi
	movl	12(%rsp), %edx
	movl	8(%rsp), %ecx
	movq	40(%rsp), %r8
	movq	(%rsp), %r9
	callq	_Z19__device_stub__findjjjjPjPc
.LBB3_3:
	movq	(%rsp), %rsi
	leaq	24(%rsp), %rbx
	movl	$8, %edx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	cmpb	$0, (%rbx)
	je	.LBB3_4
# %bb.5:
	leaq	24(%rsp), %rsi
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	callq	printf
	jmp	.LBB3_6
.LBB3_4:
	movl	$.Lstr, %edi
	callq	puts@PLT
.LBB3_6:
	movq	(%rsp), %rdi
	callq	hipFree
	xorl	%eax, %eax
	addq	$360, %rsp                      # imm = 0x168
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
.LBB3_7:
	retq
.Lfunc_end3:
	.size	main, .Lfunc_end3-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	.LBB4_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB4_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z4findjjjjPjPc, %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_end4:
	.size	__hip_module_ctor, .Lfunc_end4-__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	.LBB5_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
.LBB5_2:
	retq
.Lfunc_end5:
	.size	__hip_module_dtor, .Lfunc_end5-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z4findjjjjPjPc,@object         # @_Z4findjjjjPjPc
	.section	.rodata,"a",@progbits
	.globl	_Z4findjjjjPjPc
	.p2align	3, 0x0
_Z4findjjjjPjPc:
	.quad	_Z19__device_stub__findjjjjPjPc
	.size	_Z4findjjjjPjPc, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"01234"
	.size	.L.str, 6

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"<<< FOUND KEY : %s >>>\n"
	.size	.L.str.2, 24

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z4findjjjjPjPc"
	.size	.L__unnamed_1, 16

	.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	"key not found "
	.size	.Lstr, 15

	.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 _Z19__device_stub__findjjjjPjPc
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z4findjjjjPjPc
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z4findjjjjPjPc         ; -- Begin function _Z4findjjjjPjPc
	.globl	_Z4findjjjjPjPc
	.p2align	8
	.type	_Z4findjjjjPjPc,@function
_Z4findjjjjPjPc:                        ; @_Z4findjjjjPjPc
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x10
	s_mov_b32 s2, 0
.LBB0_1:                                ; =>This Inner Loop Header: Depth=1
	s_waitcnt lgkmcnt(0)
	s_load_b32 s3, s[4:5], 0x0
	s_add_i32 s8, s2, 16
	s_add_i32 s2, s2, 4
	s_add_u32 s4, s4, 4
	s_addc_u32 s5, s5, 0
	s_cmpk_eq_i32 s2, 0x100
	s_waitcnt lgkmcnt(0)
	v_mov_b32_e32 v0, s3
	scratch_store_b32 off, v0, s8
	s_cbranch_scc0 .LBB0_1
; %bb.2:                                ; %.preheader801
	s_clause 0x3
	scratch_load_b128 v[0:3], off, off offset:24
	scratch_load_b128 v[54:57], off, off offset:40
	scratch_load_b128 v[58:61], off, off offset:56
	scratch_load_b64 v[50:51], off, off offset:72
	s_ashr_i32 s2, s15, 31
	s_load_b128 s[8:11], s[0:1], 0x0
	s_lshr_b32 s2, s2, 26
	v_mov_b32_e32 v27, 59
	s_add_i32 s2, s15, s2
                                        ; implicit-def: $sgpr3
                                        ; implicit-def: $sgpr4
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, s2, 0xc0
	s_sub_i32 s2, s15, s2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e64 v4, 0xff, s2
	s_mov_b32 s2, 0
	v_add_nc_u16 v62, v4, 59
	s_waitcnt vmcnt(3)
	v_add_nc_u32_e32 v4, 0xbcdb4dd9, v0
	v_add_nc_u32_e32 v5, 0xb18b7a77, v1
	s_waitcnt vmcnt(2)
	v_add_nc_u32_e32 v6, 0x4787c62a, v54
	v_add_nc_u32_e32 v7, 0xa8304613, v54
	v_add_nc_u32_e32 v8, 0xfd469501, v55
	v_add_nc_u32_e32 v9, 0x698098d8, v56
	v_add_nc_u32_e32 v10, 0x8b44f7af, v57
	s_waitcnt vmcnt(1)
	v_add_nc_u32_e32 v11, 0xffff5bb1, v58
	v_add_nc_u32_e32 v12, 0x895cd7be, v59
	v_add_nc_u32_e32 v13, 0x6b901122, v60
	v_add_nc_u32_e32 v14, 0xfd987193, v61
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v15, 0xa679438e, v50
	v_add_nc_u32_e32 v16, 0x49b40821, v51
	v_add_nc_u32_e32 v17, 0xc040b340, v54
	v_add_nc_u32_e32 v18, 0x265e5a51, v59
	v_add_nc_u32_e32 v19, 0xd62f105d, v3
	v_add_nc_u32_e32 v20, 0x2441453, v58
	v_add_nc_u32_e32 v21, 0xd8a1e681, v51
	v_add_nc_u32_e32 v22, 0xe7d3fbc8, v2
	v_add_nc_u32_e32 v23, 0x21e1cde6, v57
	v_add_nc_u32_e32 v24, 0xc33707d6, v50
	v_add_nc_u32_e32 v25, 0xf4d50d87, v1
	v_add_nc_u32_e32 v26, 0x455a14ed, v56
	v_add_nc_u32_e32 v28, 0xa9e3e905, v61
	v_add_nc_u32_e32 v29, 0xfcefa3f8, v0
	v_add_nc_u32_e32 v30, 0x676f02d9, v55
	v_add_nc_u32_e32 v31, 0x8d2a4c8a, v60
	v_add_nc_u32_e32 v32, 0xfffa3942, v3
	v_add_nc_u32_e32 v33, 0x8771f681, v56
	v_add_nc_u32_e32 v34, 0x6d9d6122, v59
	v_add_nc_u32_e32 v35, 0xfde5380c, v50
	v_add_nc_u32_e32 v36, 0x4bdecfa9, v2
	v_add_nc_u32_e32 v37, 0xf6bb4b60, v55
	v_add_nc_u32_e32 v38, 0xbebfbc70, v58
	v_add_nc_u32_e32 v39, 0x289b7ec6, v61
	v_add_nc_u32_e32 v40, 0xd4ef3085, v1
	v_add_nc_u32_e32 v41, 0x4881d05, v54
	v_add_nc_u32_e32 v42, 0xd9d4d039, v57
	v_add_nc_u32_e32 v43, 0xe6db99e5, v60
	v_add_nc_u32_e32 v44, 0x1fa27cf8, v51
	v_add_nc_u32_e32 v45, 0xc4ac5665, v0
	v_add_nc_u32_e32 v46, 0x432aff97, v55
	v_add_nc_u32_e32 v47, 0xab9423a7, v50
	v_add_nc_u32_e32 v3, 0xfc93a039, v3
	v_add_nc_u32_e32 v48, 0x655b59c3, v60
	v_add_nc_u32_e32 v1, 0x8f0ccc92, v1
	v_add_nc_u32_e32 v49, 0xffeff47d, v58
	v_add_nc_u32_e32 v50, 0x6fa87e4f, v56
	v_add_nc_u32_e32 v51, 0xfe2ce6e0, v51
	v_add_nc_u32_e32 v52, 0xa3014314, v54
	v_add_nc_u32_e32 v53, 0x4e0811a1, v61
	v_add_nc_u32_e32 v54, 0xf7537e82, v2
	v_add_nc_u32_e32 v55, 0xbd3af235, v59
	v_add_nc_u32_e32 v56, 0x2ad7d2bb, v0
	v_add_nc_u32_e32 v57, 0xeb86d391, v57
	v_and_b32_e32 v0, 0xff, v62
.LBB0_3:                                ; %.preheader800
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_5 Depth 3
                                        ;         Child Loop BB0_6 Depth 4
	v_lshlrev_b16 v58, 8, v27
	s_mov_b32 s12, 0
                                        ; implicit-def: $sgpr5
                                        ; implicit-def: $sgpr13
                                        ; implicit-def: $sgpr14
	v_mov_b32_e32 v59, 59
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v58, v0, v58
	v_and_b32_e32 v58, 0xffff, v58
.LBB0_4:                                ; %.preheader799
                                        ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_5 Depth 3
                                        ;         Child Loop BB0_6 Depth 4
	s_delay_alu instid0(VALU_DEP_3)
	v_dual_mov_b32 v61, 59 :: v_dual_and_b32 v60, 0xff, v59
	s_mov_b32 s17, 0
                                        ; implicit-def: $sgpr16
                                        ; implicit-def: $sgpr15
                                        ; implicit-def: $sgpr18
.LBB0_5:                                ; %.preheader
                                        ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_6 Depth 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_lshlrev_b16 v62, 8, v61
	s_mov_b32 s21, 0
                                        ; implicit-def: $sgpr19
                                        ; implicit-def: $sgpr20
	v_mov_b32_e32 v63, 59
	v_or_b32_e32 v62, v60, v62
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b32_e32 v62, 16, v62
	v_or_b32_e32 v62, v58, v62
.LBB0_6:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ;       Parent Loop BB0_5 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	s_clause 0x1
	scratch_store_b8 off, v63, off offset:20
	scratch_store_b32 off, v62, off offset:16
	scratch_load_b64 v[64:65], off, off offset:16
                                        ; implicit-def: $sgpr0
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v66, 0xd76aa477, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 25
	v_sub_nc_u32_e32 v67, 0x10325476, v66
	v_add_nc_u32_e32 v68, 0xefcdab89, v66
	v_add_nc_u32_e32 v66, v66, v2
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_and_b32_e32 v67, 0x98badcfe, v67
	v_and_or_b32 v67, 0xefcdab89, v68, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v65, v67, 0xf8fa0bcc
	v_alignbit_b32 v67, v67, v67, 20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v68
	v_bfi_b32 v69, v67, v68, 0xefcdab89
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v4, v69
	v_alignbit_b32 v69, v69, v69, 15
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v68, v69, v67, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v5, v68
	v_alignbit_b32 v68, v68, v68, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_bfi_b32 v70, v68, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v66, v70, 0xe549bb38
	v_alignbit_b32 v66, v66, v66, 25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v68
	v_bfi_b32 v70, v66, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v6, v67, v70
	v_alignbit_b32 v67, v67, v67, 20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_bfi_b32 v70, v67, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v69, v7, v69, v70
	v_alignbit_b32 v69, v69, v69, 15
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v70, v69, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v68, v8, v68, v70
	v_alignbit_b32 v68, v68, v68, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_bfi_b32 v70, v68, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v9, v66, v70
	v_alignbit_b32 v66, v66, v66, 25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v68
	v_bfi_b32 v70, v66, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v10, v67, v70
	v_alignbit_b32 v67, v67, v67, 20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_bfi_b32 v70, v67, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v69, v11, v69, v70
	v_alignbit_b32 v69, v69, v69, 15
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v70, v69, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v68, v12, v68, v70
	v_alignbit_b32 v68, v68, v68, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_bfi_b32 v70, v68, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v13, v66, v70
	v_alignbit_b32 v66, v66, v66, 25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v68
	v_bfi_b32 v70, v66, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v14, v67, v70
	v_alignbit_b32 v67, v67, v67, 20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_bfi_b32 v70, v67, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v69, v15, v69, v70
	v_alignbit_b32 v69, v69, v69, 15
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v70, v69, v67, v66
	v_add_nc_u32_e32 v66, v65, v66
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v68, v16, v68, v70
	v_alignbit_b32 v68, v68, v68, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_bfi_b32 v70, v67, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v66, v70, 0xf61e2562
	v_alignbit_b32 v66, v66, v66, 27
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v68
	v_bfi_b32 v70, v69, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v17, v67, v70
	v_alignbit_b32 v67, v67, v67, 23
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_bfi_b32 v70, v68, v67, v66
	v_add_nc_u32_e32 v68, v64, v68
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v69, v18, v69, v70
	v_alignbit_b32 v69, v69, v69, 18
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v70, v66, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v68, v68, v70, 0xe9b6c7aa
	v_alignbit_b32 v68, v68, v68, 12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_bfi_b32 v70, v67, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v19, v66, v70
	v_alignbit_b32 v66, v66, v66, 27
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v68
	v_bfi_b32 v70, v69, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v20, v67, v70
	v_alignbit_b32 v67, v67, v67, 23
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_bfi_b32 v70, v68, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v69, v21, v69, v70
	v_alignbit_b32 v69, v69, v69, 18
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v70, v66, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v68, v22, v68, v70
	v_alignbit_b32 v68, v68, v68, 12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_bfi_b32 v70, v67, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v23, v66, v70
	v_alignbit_b32 v66, v66, v66, 27
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v68
	v_bfi_b32 v70, v69, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v24, v67, v70
	v_alignbit_b32 v67, v67, v67, 23
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_bfi_b32 v70, v68, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v69, v25, v69, v70
	v_alignbit_b32 v69, v69, v69, 18
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v70, v66, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v68, v26, v68, v70
	v_alignbit_b32 v68, v68, v68, 12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_bfi_b32 v70, v67, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v28, v66, v70
	v_alignbit_b32 v66, v66, v66, 27
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v68
	v_bfi_b32 v70, v69, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v67, v29, v67, v70
	v_alignbit_b32 v67, v67, v67, 23
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_bfi_b32 v70, v68, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v69, v30, v69, v70
	v_alignbit_b32 v69, v69, v69, 18
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v69, v69, v67
	v_bfi_b32 v70, v66, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v68, v31, v68, v70
	v_alignbit_b32 v68, v68, v68, 12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v68, v69
	v_xor_b32_e32 v70, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v71, v70, v67
	v_add3_u32 v66, v32, v66, v71
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 28
	v_add_nc_u32_e32 v66, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v70, v70, v66
	v_add3_u32 v67, v33, v67, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v67, v67, v67, 21
	v_add_nc_u32_e32 v67, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v66, v68, v67
	v_add3_u32 v69, v34, v69, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v69, v69, v69, 16
	v_add_nc_u32_e32 v69, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_xor3_b32 v70, v67, v66, v69
	v_add_nc_u32_e32 v66, v65, v66
	v_add3_u32 v68, v35, v68, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v68, v68, v68, 9
	v_add_nc_u32_e32 v68, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v69, v67, v68
	v_add3_u32 v66, v66, v70, 0xa4beea44
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 28
	v_add_nc_u32_e32 v66, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v68, v69, v66
	v_add3_u32 v67, v36, v67, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v67, v67, v67, 21
	v_add_nc_u32_e32 v67, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v66, v68, v67
	v_add3_u32 v69, v37, v69, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v69, v69, v69, 16
	v_add_nc_u32_e32 v69, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v67, v66, v69
	v_add3_u32 v68, v38, v68, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v68, v68, v68, 9
	v_add_nc_u32_e32 v68, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_xor3_b32 v70, v69, v67, v68
	v_add_nc_u32_e32 v67, v64, v67
	v_add3_u32 v66, v39, v66, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 28
	v_add_nc_u32_e32 v66, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v68, v69, v66
	v_add3_u32 v67, v67, v70, 0xeaa127fa
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v67, v67, v67, 21
	v_add_nc_u32_e32 v67, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v66, v68, v67
	v_add3_u32 v69, v40, v69, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v69, v69, v69, 16
	v_add_nc_u32_e32 v69, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v67, v66, v69
	v_add3_u32 v68, v41, v68, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v68, v68, v68, 9
	v_add_nc_u32_e32 v68, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v69, v67, v68
	v_add3_u32 v66, v42, v66, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 28
	v_add_nc_u32_e32 v66, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_xor3_b32 v70, v68, v69, v66
	v_add_nc_u32_e32 v64, v64, v66
	v_add3_u32 v67, v43, v67, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v67, v67, v67, 21
	v_add_nc_u32_e32 v67, v67, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v66, v68, v67
	v_add3_u32 v69, v44, v69, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v69, v69, v69, 16
	v_add_nc_u32_e32 v69, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor3_b32 v70, v67, v66, v69
	v_add3_u32 v68, v45, v68, v70
	v_not_b32_e32 v70, v67
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v68, v68, v68, 9
	v_add_nc_u32_e32 v68, v68, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v70, v68, v70
	v_xor_b32_e32 v66, v70, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add3_u32 v64, v64, v66, 0xf4292244
	v_not_b32_e32 v66, v69
	v_alignbit_b32 v64, v64, v64, 26
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v64, v64, v68
	v_or_b32_e32 v66, v64, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v66, v66, v68
	v_add3_u32 v66, v46, v67, v66
	v_not_b32_e32 v67, v68
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 22
	v_add_nc_u32_e32 v66, v66, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v67, v66, v67
	v_xor_b32_e32 v67, v67, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add3_u32 v67, v47, v69, v67
	v_not_b32_e32 v69, v64
	v_alignbit_b32 v67, v67, v67, 17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v67, v67, v66
	v_or_b32_e32 v69, v67, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v69, v69, v66
	v_add3_u32 v68, v3, v68, v69
	v_not_b32_e32 v69, v66
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v68, v68, v68, 11
	v_add_nc_u32_e32 v68, v68, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_or_b32_e32 v69, v68, v69
	v_add_nc_u32_e32 v65, v65, v68
	v_xor_b32_e32 v69, v69, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add3_u32 v64, v48, v64, v69
	v_not_b32_e32 v69, v67
	v_alignbit_b32 v64, v64, v64, 26
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v64, v64, v68
	v_or_b32_e32 v69, v64, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v69, v69, v68
	v_add3_u32 v66, v1, v66, v69
	v_not_b32_e32 v69, v68
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 22
	v_add_nc_u32_e32 v66, v66, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v69, v66, v69
	v_xor_b32_e32 v69, v69, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add3_u32 v67, v49, v67, v69
	v_not_b32_e32 v69, v64
	v_alignbit_b32 v67, v67, v67, 17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v70, v67, v66
	v_or_b32_e32 v67, v70, v69
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v67, v67, v66
	v_add3_u32 v65, v65, v67, 0x85845dd1
	v_not_b32_e32 v67, v66
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v65, v65, v65, 11
	v_add_nc_u32_e32 v65, v65, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_or_b32_e32 v67, v65, v67
	v_not_b32_e32 v68, v65
	v_xor_b32_e32 v67, v67, v70
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add3_u32 v64, v50, v64, v67
	v_not_b32_e32 v67, v70
	v_alignbit_b32 v64, v64, v64, 26
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v64, v64, v65
	v_or_b32_e32 v67, v64, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v67, v67, v65
	v_add3_u32 v66, v51, v66, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 22
	v_add_nc_u32_e32 v67, v66, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_or_b32_e32 v66, v67, v68
	v_not_b32_e32 v68, v64
	v_xor_b32_e32 v66, v66, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v66, v52, v70, v66
	v_alignbit_b32 v66, v66, v66, 17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v66, v66, v67
	v_or_b32_e32 v68, v66, v68
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v68, v68, v67
	v_add3_u32 v65, v53, v65, v68
	v_not_b32_e32 v68, v67
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v65, v65, v65, 11
	v_add_nc_u32_e32 v65, v65, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v68, v65, v68
	v_xor_b32_e32 v68, v68, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v64, v54, v64, v68
	v_alignbit_b32 v64, v64, v64, 26
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v68, v64, v65
	v_add_nc_u32_e32 v64, 0x67452301, v68
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_ne_u32_e64 s22, s8, v64
	v_cmp_eq_u32_e32 vcc_lo, s8, v64
                                        ; implicit-def: $vgpr64
	s_and_saveexec_b32 s23, vcc_lo
	s_cbranch_execz .LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=4
	v_not_b32_e32 v64, v66
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v64, v68, v64
	v_xor_b32_e32 v64, v64, v65
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add3_u32 v64, v55, v67, v64
	v_not_b32_e32 v67, v65
	v_alignbit_b32 v64, v64, v64, 22
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v64, v64, v68
	v_or_b32_e32 v67, v64, v67
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v67, v67, v68
	v_add3_u32 v66, v56, v66, v67
	v_not_b32_e32 v67, v68
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_alignbit_b32 v66, v66, v66, 17
	v_add_nc_u32_e32 v66, v66, v64
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v67, v66, v67
	v_xor_b32_e32 v67, v67, v64
	v_add_nc_u32_e32 v64, 0x10325476, v64
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add3_u32 v65, v57, v65, v67
	v_add_nc_u32_e32 v67, 0x98badcfe, v66
	v_cmp_ne_u32_e64 s1, s11, v64
	v_mov_b32_e32 v64, v63
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_alignbit_b32 v65, v65, v65, 11
	v_cmp_ne_u32_e32 vcc_lo, s10, v67
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add3_u32 v65, v66, v65, 0xefcdab89
	v_cmp_ne_u32_e64 s0, s9, v65
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s0, vcc_lo, s0
	s_or_b32 s0, s1, s0
	s_and_not1_b32 s1, s22, exec_lo
	s_and_b32 s22, s0, exec_lo
	s_mov_b32 s0, -1
	s_or_b32 s22, s1, s22
.LBB0_8:                                ; %Flow
                                        ;   in Loop: Header=BB0_6 Depth=4
	s_or_b32 exec_lo, exec_lo, s23
	v_mov_b32_e32 v65, v64
	s_mov_b32 s23, -1
	s_mov_b32 s24, s0
                                        ; implicit-def: $vgpr66
	s_and_saveexec_b32 s1, s22
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=4
	v_and_b32_e32 v65, 0xff, v63
	s_and_not1_b32 s24, s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_u16_e32 vcc_lo, 0x79, v65
	v_add_nc_u16 v66, v65, 1
	v_mov_b32_e32 v65, v63
	s_or_not1_b32 s23, vcc_lo, exec_lo
; %bb.10:                               ; %Flow867
                                        ;   in Loop: Header=BB0_6 Depth=4
	s_or_b32 exec_lo, exec_lo, s1
	s_xor_b32 s1, s24, -1
	s_and_b32 s22, exec_lo, s23
	v_mov_b32_e32 v63, v66
	s_or_b32 s21, s22, s21
	s_and_not1_b32 s20, s20, exec_lo
	s_and_b32 s1, s1, exec_lo
	s_and_not1_b32 s19, s19, exec_lo
	s_and_b32 s0, s0, exec_lo
	s_or_b32 s20, s20, s1
	s_or_b32 s19, s19, s0
	s_and_not1_b32 exec_lo, exec_lo, s21
	s_cbranch_execnz .LBB0_6
; %bb.11:                               ; %loop.exit.guard864
                                        ;   in Loop: Header=BB0_5 Depth=3
	s_or_b32 exec_lo, exec_lo, s21
	v_mov_b32_e32 v62, v61
	s_and_not1_b32 s0, s18, exec_lo
	s_and_b32 s18, s19, exec_lo
	s_mov_b32 s1, -1
	s_or_b32 s18, s0, s18
                                        ; implicit-def: $vgpr63
	s_and_saveexec_b32 s0, s20
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s0
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=3
	v_and_b32_e32 v62, 0xff, v61
	v_mov_b32_e32 v64, v65
	s_and_not1_b32 s19, s19, exec_lo
	s_and_not1_b32 s18, s18, exec_lo
	s_delay_alu instid0(VALU_DEP_2)
	v_cmp_lt_u16_e32 vcc_lo, 0x79, v62
	v_add_nc_u16 v63, v62, 1
	v_mov_b32_e32 v62, v61
	s_or_not1_b32 s1, vcc_lo, exec_lo
; %bb.13:                               ; %Flow869
                                        ;   in Loop: Header=BB0_5 Depth=3
	s_or_b32 exec_lo, exec_lo, s0
	s_xor_b32 s0, s19, -1
	s_and_b32 s1, exec_lo, s1
	v_mov_b32_e32 v61, v63
	s_or_b32 s17, s1, s17
	s_and_not1_b32 s1, s15, exec_lo
	s_and_b32 s15, s18, exec_lo
	s_and_not1_b32 s16, s16, exec_lo
	s_and_b32 s0, s0, exec_lo
	s_or_b32 s15, s1, s15
	s_or_b32 s16, s16, s0
	s_and_not1_b32 exec_lo, exec_lo, s17
	s_cbranch_execnz .LBB0_5
; %bb.14:                               ; %loop.exit.guard861
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s17
	v_mov_b32_e32 v61, v59
	s_and_not1_b32 s1, s14, exec_lo
	s_and_b32 s14, s15, exec_lo
	s_mov_b32 s0, -1
	s_or_b32 s14, s1, s14
                                        ; implicit-def: $vgpr63
	s_and_saveexec_b32 s1, s16
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s1, exec_lo, s1
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=2
	v_cmp_lt_u16_e32 vcc_lo, 0x79, v60
	v_add_nc_u16 v63, v60, 1
	v_mov_b32_e32 v61, v59
	s_and_not1_b32 s15, s15, exec_lo
	s_and_not1_b32 s14, s14, exec_lo
	s_or_not1_b32 s0, vcc_lo, exec_lo
; %bb.16:                               ; %Flow871
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s1
	s_xor_b32 s1, s15, -1
	s_and_b32 s0, exec_lo, s0
	v_mov_b32_e32 v59, v63
	s_or_b32 s12, s0, s12
	s_and_not1_b32 s0, s13, exec_lo
	s_and_b32 s13, s14, exec_lo
	s_and_not1_b32 s5, s5, exec_lo
	s_and_b32 s1, s1, exec_lo
	s_or_b32 s13, s0, s13
	s_or_b32 s5, s5, s1
	s_and_not1_b32 exec_lo, exec_lo, s12
	s_cbranch_execnz .LBB0_4
; %bb.17:                               ; %loop.exit.guard857
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s12
	v_mov_b32_e32 v58, v27
	s_and_not1_b32 s1, s4, exec_lo
	s_and_b32 s4, s13, exec_lo
	s_mov_b32 s0, -1
	s_or_b32 s4, s1, s4
                                        ; implicit-def: $vgpr59
	s_and_saveexec_b32 s1, s5
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s1, exec_lo, s1
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
	v_and_b32_e32 v58, 0xff, v27
	s_and_not1_b32 s4, s4, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_u16_e32 vcc_lo, 0x79, v58
	v_add_nc_u16 v59, v58, 1
	v_mov_b32_e32 v58, v27
	s_or_not1_b32 s0, vcc_lo, exec_lo
; %bb.19:                               ; %Flow873
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, exec_lo, s0
	v_mov_b32_e32 v27, v59
	s_or_b32 s2, s0, s2
	s_and_not1_b32 s0, s3, exec_lo
	s_and_b32 s1, s4, exec_lo
	s_or_b32 s3, s0, s1
	s_and_not1_b32 exec_lo, exec_lo, s2
	s_cbranch_execnz .LBB0_3
; %bb.20:                               ; %loop.exit.guard
	s_or_b32 exec_lo, exec_lo, s2
	s_and_saveexec_b32 s0, s3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s0
; %bb.21:                               ; %.critedge
	v_lshlrev_b16 v1, 8, v58
	v_lshlrev_b16 v2, 8, v62
	v_and_b32_e32 v3, 0xff, v61
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_or_b32_e32 v0, v0, v1
	v_or_b32_e32 v1, v3, v2
	v_mov_b32_e32 v2, 0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_and_b32_e32 v0, 0xffff, v0
	v_lshlrev_b32_e32 v1, 16, v1
	s_delay_alu instid0(VALU_DEP_1)
	v_or_b32_e32 v0, v0, v1
	s_clause 0x1
	global_store_b8 v2, v64, s[6:7] offset:4
	global_store_b32 v2, v0, s[6:7]
; %bb.22:                               ; %.loopexit
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z4findjjjjPjPc
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 272
		.amdhsa_kernarg_size 32
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 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 72
		.amdhsa_next_free_sgpr 25
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z4findjjjjPjPc, .Lfunc_end0-_Z4findjjjjPjPc
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 3928
; NumSgprs: 27
; NumVgprs: 72
; ScratchSize: 272
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 8
; NumSGPRsForWavesPerEU: 27
; NumVGPRsForWavesPerEU: 72
; 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
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 32
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z4findjjjjPjPc
    .private_segment_fixed_size: 272
    .sgpr_count:     27
    .sgpr_spill_count: 0
    .symbol:         _Z4findjjjjPjPc.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     72
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
