#include <iostream>
#include <cuda_runtime.h>
#include <vector>
#include <string>

// Constants
#define BLOCK_SIZE 256
#define MAX_PASSWORD_LENGTH 16
#define MAX_RULES 10
#define MAX_HASHES 1024

// Kernel to perform password cracking using rule-based approach
__global__ void crackPasswords(char* d_passwords, int* d_rules, unsigned int* d_hashes, int num_hashes, int num_rules, int* d_found) {
    extern __shared__ unsigned int s_hashes[];

    // Load hashes into shared memory
    int idx = threadIdx.x + blockIdx.x * blockDim.x;
    if (idx < num_hashes) {
        s_hashes[threadIdx.x] = d_hashes[idx];
    }
    __syncthreads();

    // Each thread tries to crack a password using a rule
    for (int rule = 0; rule < num_rules; ++rule) {
        if (threadIdx.x < num_hashes) {
            // Simulate password transformation based on rule
            char transformed_password[MAX_PASSWORD_LENGTH];
            for (int i = 0; i < MAX_PASSWORD_LENGTH; ++i) {
                transformed_password[i] = d_passwords[threadIdx.x * MAX_PASSWORD_LENGTH + i] + d_rules[rule];
            }

            // Simulate hash calculation (placeholder)
            unsigned int hash = 0;
            for (int i = 0; i < MAX_PASSWORD_LENGTH; ++i) {
                hash = hash * 31 + transformed_password[i];
            }

            // Compare with hashes in shared memory
            for (int i = 0; i < blockDim.x && threadIdx.x < num_hashes; ++i) {
                if (hash == s_hashes[i]) {
                    atomicAdd(d_found, 1);
                }
            }
        }
        __syncthreads();
    }
}

int main() {
    // Example data
    const int num_hashes = 1024;
    const int num_rules = 10;
    const int num_passwords = num_hashes;

    // Host memory allocation
    std::vector<unsigned int> h_hashes(num_hashes);
    std::vector<int> h_rules(num_rules);
    std::vector<char> h_passwords(num_passwords * MAX_PASSWORD_LENGTH);
    int h_found = 0;

    // Initialize example data
    for (int i = 0; i < num_hashes; ++i) {
        h_hashes[i] = i * 12345; // Example hash values
    }
    for (int i = 0; i < num_rules; ++i) {
        h_rules[i] = i + 1; // Example rules
    }
    for (int i = 0; i < num_passwords * MAX_PASSWORD_LENGTH; ++i) {
        h_passwords[i] = 'a' + (i % 26); // Example passwords
    }

    // Device memory allocation
    char* d_passwords;
    int* d_rules;
    unsigned int* d_hashes;
    int* d_found;

    cudaError_t err = cudaMalloc((void**)&d_passwords, num_passwords * MAX_PASSWORD_LENGTH * sizeof(char));
    if (err != cudaSuccess) { std::cerr << "Error allocating d_passwords: " << cudaGetErrorString(err) << std::endl; return -1; }
    err = cudaMalloc((void**)&d_rules, num_rules * sizeof(int));
    if (err != cudaSuccess) { std::cerr << "Error allocating d_rules: " << cudaGetErrorString(err) << std::endl; return -1; }
    err = cudaMalloc((void**)&d_hashes, num_hashes * sizeof(unsigned int));
    if (err != cudaSuccess) { std::cerr << "Error allocating d_hashes: " << cudaGetErrorString(err) << std::endl; return -1; }
    err = cudaMalloc((void**)&d_found, sizeof(int));
    if (err != cudaSuccess) { std::cerr << "Error allocating d_found: " << cudaGetErrorString(err) << std::endl; return -1; }

    // Copy data to device
    err = cudaMemcpy(d_passwords, h_passwords.data(), num_passwords * MAX_PASSWORD_LENGTH * sizeof(char), cudaMemcpyHostToDevice);
    if (err != cudaSuccess) { std::cerr << "Error copying to d_passwords: " << cudaGetErrorString(err) << std::endl; return -1; }
    err = cudaMemcpy(d_rules, h_rules.data(), num_rules * sizeof(int), cudaMemcpyHostToDevice);
    if (err != cudaSuccess) { std::cerr << "Error copying to d_rules: " << cudaGetErrorString(err) << std::endl; return -1; }
    err = cudaMemcpy(d_hashes, h_hashes.data(), num_hashes * sizeof(unsigned int), cudaMemcpyHostToDevice);
    if (err != cudaSuccess) { std::cerr << "Error copying to d_hashes: " << cudaGetErrorString(err) << std::endl; return -1; }
    err = cudaMemcpy(d_found, &h_found, sizeof(int), cudaMemcpyHostToDevice);
    if (err != cudaSuccess) { std::cerr << "Error copying to d_found: " << cudaGetErrorString(err) << std::endl; return -1; }

    // Launch kernel
    int numBlocks = (num_hashes + BLOCK_SIZE - 1) / BLOCK_SIZE;
    crackPasswords<<<numBlocks, BLOCK_SIZE, BLOCK_SIZE * sizeof(unsigned int)>>>(d_passwords, d_rules, d_hashes, num_hashes, num_rules, d_found);
    err = cudaGetLastError();
    if (err != cudaSuccess) { std::cerr << "Error launching kernel: " << cudaGetErrorString(err) << std::endl; return -1; }

    // Copy result back to host
    err = cudaMemcpy(&h_found, d_found, sizeof(int), cudaMemcpyDeviceToHost);
    if (err != cudaSuccess) { std::cerr << "Error copying from d_found: " << cudaGetErrorString(err) << std::endl; return -1; }

    // Free device memory
    cudaFree(d_passwords);
    cudaFree(d_rules);
    cudaFree(d_hashes);
    cudaFree(d_found);

    // Output result
    std::cout << "Number of passwords found: " << h_found << std::endl;

    return 0;
}
	.file	"tmpxft_000d346f_00000000-6_cuda_code_043088.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4001:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4001:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB4854:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE4854:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.globl	_Z43__device_stub__Z14crackPasswordsPcPiPjiiS0_PcPiPjiiS0_
	.type	_Z43__device_stub__Z14crackPasswordsPcPiPjiiS0_PcPiPjiiS0_, @function
_Z43__device_stub__Z14crackPasswordsPcPiPjiiS0_PcPiPjiiS0_:
.LFB4023:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movq	%r9, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L3
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z14crackPasswordsPcPiPjiiS0_(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L3:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4023:
	.size	_Z43__device_stub__Z14crackPasswordsPcPiPjiiS0_PcPiPjiiS0_, .-_Z43__device_stub__Z14crackPasswordsPcPiPjiiS0_PcPiPjiiS0_
	.globl	_Z14crackPasswordsPcPiPjiiS0_
	.type	_Z14crackPasswordsPcPiPjiiS0_, @function
_Z14crackPasswordsPcPiPjiiS0_:
.LFB4024:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z14crackPasswordsPcPiPjiiS0_PcPiPjiiS0_
	.cfi_endproc
.LFE4024:
	.size	_Z14crackPasswordsPcPiPjiiS0_, .-_Z14crackPasswordsPcPiPjiiS0_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z14crackPasswordsPcPiPjiiS0_"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4026:
	.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	.LC0(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z14crackPasswordsPcPiPjiiS0_(%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
.LFE4026:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt6vectorIjSaIjEED2Ev,"axG",@progbits,_ZNSt6vectorIjSaIjEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIjSaIjEED2Ev
	.type	_ZNSt6vectorIjSaIjEED2Ev, @function
_ZNSt6vectorIjSaIjEED2Ev:
.LFB4336:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L11
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L11:
	ret
	.cfi_endproc
.LFE4336:
	.size	_ZNSt6vectorIjSaIjEED2Ev, .-_ZNSt6vectorIjSaIjEED2Ev
	.weak	_ZNSt6vectorIjSaIjEED1Ev
	.set	_ZNSt6vectorIjSaIjEED1Ev,_ZNSt6vectorIjSaIjEED2Ev
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEED2Ev
	.type	_ZNSt6vectorIiSaIiEED2Ev, @function
_ZNSt6vectorIiSaIiEED2Ev:
.LFB4348:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L13
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L13:
	ret
	.cfi_endproc
.LFE4348:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .-_ZNSt6vectorIiSaIiEED2Ev
	.weak	_ZNSt6vectorIiSaIiEED1Ev
	.set	_ZNSt6vectorIiSaIiEED1Ev,_ZNSt6vectorIiSaIiEED2Ev
	.section	.text._ZNSt6vectorIcSaIcEED2Ev,"axG",@progbits,_ZNSt6vectorIcSaIcEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIcSaIcEED2Ev
	.type	_ZNSt6vectorIcSaIcEED2Ev, @function
_ZNSt6vectorIcSaIcEED2Ev:
.LFB4354:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L15
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L15:
	ret
	.cfi_endproc
.LFE4354:
	.size	_ZNSt6vectorIcSaIcEED2Ev, .-_ZNSt6vectorIcSaIcEED2Ev
	.weak	_ZNSt6vectorIcSaIcEED1Ev
	.set	_ZNSt6vectorIcSaIcEED1Ev,_ZNSt6vectorIcSaIcEED2Ev
	.section	.rodata.str1.1
.LC1:
	.string	"Error allocating d_passwords: "
.LC2:
	.string	"Error allocating d_rules: "
.LC3:
	.string	"Error allocating d_hashes: "
.LC4:
	.string	"Error allocating d_found: "
.LC5:
	.string	"Error copying to d_passwords: "
.LC6:
	.string	"Error copying to d_rules: "
.LC7:
	.string	"Error copying to d_hashes: "
.LC8:
	.string	"Error copying to d_found: "
.LC9:
	.string	"Error launching kernel: "
.LC10:
	.string	"Error copying from d_found: "
.LC11:
	.string	"Number of passwords found: "
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3998:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3998
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$4096, %edi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
.LEHB0:
	call	_Znwm@PLT
.LEHE0:
	xorl	%r9d, %r9d
	leaq	4096(%rax), %rdx
	movq	%rax, 64(%rsp)
	movq	%rax, %rbx
	movq	%rdx, 80(%rsp)
	movl	%r9d, (%rax)
	xorl	%eax, %eax
.L18:
	addq	$4, %rax
	cmpq	$4096, %rax
	je	.L102
	xorl	%r8d, %r8d
	movl	%r8d, (%rbx,%rax)
	jmp	.L18
.L102:
	xorl	%edi, %edi
	movq	%rdx, 72(%rsp)
	movq	%rdi, 96(%rsp)
	movq	%rdi, 104(%rsp)
	movl	$40, %edi
.LEHB1:
	call	_Znwm@PLT
.LEHE1:
	leaq	40(%rax), %rdx
	xorl	%esi, %esi
	movq	%rax, 88(%rsp)
	movq	%rax, %rbp
	movq	%rdx, 104(%rsp)
	movl	%esi, (%rax)
	xorl	%eax, %eax
.L20:
	addq	$4, %rax
	cmpq	$40, %rax
	je	.L103
	xorl	%ecx, %ecx
	movl	%ecx, 0(%rbp,%rax)
	jmp	.L20
.L103:
	movq	%rdx, 96(%rsp)
	movl	$16384, %edi
	xorl	%edx, %edx
	movq	%rdx, 120(%rsp)
	movq	%rdx, 128(%rsp)
.LEHB2:
	call	_Znwm@PLT
.LEHE2:
	leaq	1(%rax), %rsi
	movb	$0, (%rax)
	movq	%rax, %r12
	movl	$16383, %ecx
	leaq	16384(%rax), %rdx
	movq	%rax, 112(%rsp)
	movq	%rsi, %rdi
	xorl	%eax, %eax
	rep stosb
	movq	%rdx, 128(%rsp)
	xorl	%eax, %eax
	movq	%rdx, 120(%rsp)
	movl	%eax, 4(%rsp)
	xorl	%eax, %eax
.L22:
	imull	$12345, %eax, %edx
	movl	%edx, (%rbx,%rax,4)
	incq	%rax
	cmpq	$1024, %rax
	jne	.L22
	movl	$1, %eax
.L23:
	movl	%eax, -4(%rbp,%rax,4)
	incq	%rax
	cmpq	$11, %rax
	jne	.L23
	xorl	%ecx, %ecx
	movl	$26, %esi
.L24:
	movl	%ecx, %eax
	cltd
	idivl	%esi
	addl	$97, %edx
	movb	%dl, (%r12,%rcx)
	incq	%rcx
	cmpq	$16384, %rcx
	jne	.L24
	leaq	8(%rsp), %rdi
	movl	$16384, %esi
	leaq	112(%rsp), %r13
.LEHB3:
	call	cudaMalloc@PLT
	movl	%eax, %r14d
	leaq	.LC1(%rip), %rsi
	testl	%eax, %eax
	jne	.L99
	leaq	16(%rsp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	movl	%eax, %r14d
	leaq	.LC2(%rip), %rsi
	testl	%eax, %eax
	jne	.L99
	leaq	24(%rsp), %rdi
	movl	$4096, %esi
	call	cudaMalloc@PLT
	movl	%eax, %r14d
	leaq	.LC3(%rip), %rsi
	testl	%eax, %eax
	jne	.L99
	leaq	32(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movl	%eax, %r14d
	testl	%eax, %eax
	je	.L29
	leaq	.LC4(%rip), %rsi
.L99:
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rbx
	movl	%r14d, %edi
	jmp	.L88
.L29:
	movq	8(%rsp), %rdi
	movl	$1, %ecx
	movl	$16384, %edx
	movq	%r12, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %r12d
	testl	%eax, %eax
	je	.L30
	leaq	.LC5(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rbx
	movl	%r12d, %edi
	jmp	.L88
.L30:
	movq	16(%rsp), %rdi
	movl	$1, %ecx
	movl	$40, %edx
	movq	%rbp, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.L31
	leaq	.LC6(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rbx
	movl	%ebp, %edi
.L88:
	call	cudaGetErrorString@PLT
	movq	%rax, %rsi
	movq	%rbx, %rdi
	jmp	.L74
.L31:
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movl	$4096, %edx
	movq	%rbx, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %ebx
	leaq	.LC7(%rip), %rsi
	testl	%eax, %eax
	jne	.L94
	leaq	4(%rsp), %rbp
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movl	$4, %edx
	movq	%rbp, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %ebx
	leaq	.LC8(%rip), %rsi
	testl	%eax, %eax
	jne	.L94
	movl	$16777217, %edx
	movl	$1073741825, %edi
	xorl	%r9d, %r9d
	movl	$1024, %r8d
	salq	$8, %rdx
	movl	$1, %ecx
	salq	$2, %rdi
	movl	$1, %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L34
	movq	32(%rsp), %r9
	movq	24(%rsp), %rdx
	movl	$1024, %ecx
	movl	$10, %r8d
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdi
	call	_Z43__device_stub__Z14crackPasswordsPcPiPjiiS0_PcPiPjiiS0_
.L34:
	call	cudaGetLastError@PLT
	movl	%eax, %ebx
	leaq	.LC9(%rip), %rsi
	testl	%eax, %eax
	jne	.L94
	movq	32(%rsp), %rsi
	movl	$2, %ecx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.L36
	leaq	.LC10(%rip), %rsi
.L94:
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %edi
	movq	%rax, %rbp
	call	cudaGetErrorString@PLT
	movq	%rax, %rsi
	movq	%rbp, %rdi
.L74:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	orl	$-1, %ebx
	jmp	.L37
.L36:
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	leaq	.LC11(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	4(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.LEHE3:
	xorl	%ebx, %ebx
.L37:
	movq	%r13, %rdi
	call	_ZNSt6vectorIcSaIcEED1Ev
	leaq	88(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	leaq	64(%rsp), %rdi
	call	_ZNSt6vectorIjSaIjEED1Ev
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L42
	jmp	.L51
.L46:
	endbr64
	movq	%rax, %rbx
.L38:
	movq	%r13, %rdi
	call	_ZNSt6vectorIcSaIcEED1Ev
	jmp	.L39
.L45:
	endbr64
	movq	%rax, %rbx
.L39:
	leaq	88(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	jmp	.L40
.L44:
	endbr64
	movq	%rax, %rbx
.L40:
	leaq	64(%rsp), %rdi
	call	_ZNSt6vectorIjSaIjEED1Ev
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	movq	%rbx, %rdi
.LEHB4:
	call	_Unwind_Resume@PLT
.LEHE4:
.L51:
	call	__stack_chk_fail@PLT
.L42:
	addq	$144, %rsp
	.cfi_def_cfa_offset 48
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3998:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3998:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3998-.LLSDACSB3998
.LLSDACSB3998:
	.uleb128 .LEHB0-.LFB3998
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3998
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L44-.LFB3998
	.uleb128 0
	.uleb128 .LEHB2-.LFB3998
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L45-.LFB3998
	.uleb128 0
	.uleb128 .LEHB3-.LFB3998
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L46-.LFB3998
	.uleb128 0
	.uleb128 .LEHB4-.LFB3998
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
.LLSDACSE3998:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <iostream>
#include <hip/hip_runtime.h>
#include <vector>
#include <string>

// Constants
#define BLOCK_SIZE 256
#define MAX_PASSWORD_LENGTH 16
#define MAX_RULES 10
#define MAX_HASHES 1024

// Kernel to perform password cracking using rule-based approach
__global__ void crackPasswords(char* d_passwords, int* d_rules, unsigned int* d_hashes, int num_hashes, int num_rules, int* d_found) {
    extern __shared__ unsigned int s_hashes[];

    // Load hashes into shared memory
    int idx = threadIdx.x + blockIdx.x * blockDim.x;
    if (idx < num_hashes) {
        s_hashes[threadIdx.x] = d_hashes[idx];
    }
    __syncthreads();

    // Each thread tries to crack a password using a rule
    for (int rule = 0; rule < num_rules; ++rule) {
        if (threadIdx.x < num_hashes) {
            // Simulate password transformation based on rule
            char transformed_password[MAX_PASSWORD_LENGTH];
            for (int i = 0; i < MAX_PASSWORD_LENGTH; ++i) {
                transformed_password[i] = d_passwords[threadIdx.x * MAX_PASSWORD_LENGTH + i] + d_rules[rule];
            }

            // Simulate hash calculation (placeholder)
            unsigned int hash = 0;
            for (int i = 0; i < MAX_PASSWORD_LENGTH; ++i) {
                hash = hash * 31 + transformed_password[i];
            }

            // Compare with hashes in shared memory
            for (int i = 0; i < blockDim.x && threadIdx.x < num_hashes; ++i) {
                if (hash == s_hashes[i]) {
                    atomicAdd(d_found, 1);
                }
            }
        }
        __syncthreads();
    }
}

int main() {
    // Example data
    const int num_hashes = 1024;
    const int num_rules = 10;
    const int num_passwords = num_hashes;

    // Host memory allocation
    std::vector<unsigned int> h_hashes(num_hashes);
    std::vector<int> h_rules(num_rules);
    std::vector<char> h_passwords(num_passwords * MAX_PASSWORD_LENGTH);
    int h_found = 0;

    // Initialize example data
    for (int i = 0; i < num_hashes; ++i) {
        h_hashes[i] = i * 12345; // Example hash values
    }
    for (int i = 0; i < num_rules; ++i) {
        h_rules[i] = i + 1; // Example rules
    }
    for (int i = 0; i < num_passwords * MAX_PASSWORD_LENGTH; ++i) {
        h_passwords[i] = 'a' + (i % 26); // Example passwords
    }

    // Device memory allocation
    char* d_passwords;
    int* d_rules;
    unsigned int* d_hashes;
    int* d_found;

    hipError_t err = hipMalloc((void**)&d_passwords, num_passwords * MAX_PASSWORD_LENGTH * sizeof(char));
    if (err != hipSuccess) { std::cerr << "Error allocating d_passwords: " << hipGetErrorString(err) << std::endl; return -1; }
    err = hipMalloc((void**)&d_rules, num_rules * sizeof(int));
    if (err != hipSuccess) { std::cerr << "Error allocating d_rules: " << hipGetErrorString(err) << std::endl; return -1; }
    err = hipMalloc((void**)&d_hashes, num_hashes * sizeof(unsigned int));
    if (err != hipSuccess) { std::cerr << "Error allocating d_hashes: " << hipGetErrorString(err) << std::endl; return -1; }
    err = hipMalloc((void**)&d_found, sizeof(int));
    if (err != hipSuccess) { std::cerr << "Error allocating d_found: " << hipGetErrorString(err) << std::endl; return -1; }

    // Copy data to device
    err = hipMemcpy(d_passwords, h_passwords.data(), num_passwords * MAX_PASSWORD_LENGTH * sizeof(char), hipMemcpyHostToDevice);
    if (err != hipSuccess) { std::cerr << "Error copying to d_passwords: " << hipGetErrorString(err) << std::endl; return -1; }
    err = hipMemcpy(d_rules, h_rules.data(), num_rules * sizeof(int), hipMemcpyHostToDevice);
    if (err != hipSuccess) { std::cerr << "Error copying to d_rules: " << hipGetErrorString(err) << std::endl; return -1; }
    err = hipMemcpy(d_hashes, h_hashes.data(), num_hashes * sizeof(unsigned int), hipMemcpyHostToDevice);
    if (err != hipSuccess) { std::cerr << "Error copying to d_hashes: " << hipGetErrorString(err) << std::endl; return -1; }
    err = hipMemcpy(d_found, &h_found, sizeof(int), hipMemcpyHostToDevice);
    if (err != hipSuccess) { std::cerr << "Error copying to d_found: " << hipGetErrorString(err) << std::endl; return -1; }

    // Launch kernel
    int numBlocks = (num_hashes + BLOCK_SIZE - 1) / BLOCK_SIZE;
    crackPasswords<<<numBlocks, BLOCK_SIZE, BLOCK_SIZE * sizeof(unsigned int)>>>(d_passwords, d_rules, d_hashes, num_hashes, num_rules, d_found);
    err = hipGetLastError();
    if (err != hipSuccess) { std::cerr << "Error launching kernel: " << hipGetErrorString(err) << std::endl; return -1; }

    // Copy result back to host
    err = hipMemcpy(&h_found, d_found, sizeof(int), hipMemcpyDeviceToHost);
    if (err != hipSuccess) { std::cerr << "Error copying from d_found: " << hipGetErrorString(err) << std::endl; return -1; }

    // Free device memory
    hipFree(d_passwords);
    hipFree(d_rules);
    hipFree(d_hashes);
    hipFree(d_found);

    // Output result
    std::cout << "Number of passwords found: " << h_found << std::endl;

    return 0;
}
	.text
	.file	"cuda_code_043088.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z29__device_stub__crackPasswordsPcPiPjiiS0_ # -- Begin function _Z29__device_stub__crackPasswordsPcPiPjiiS0_
	.type	_Z29__device_stub__crackPasswordsPcPiPjiiS0_,@function
_Z29__device_stub__crackPasswordsPcPiPjiiS0_: # @_Z29__device_stub__crackPasswordsPcPiPjiiS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	12(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	8(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%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	80(%rsp), %r14
	leaq	64(%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	$_Z14crackPasswordsPcPiPjiiS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z29__device_stub__crackPasswordsPcPiPjiiS0_, .Lfunc_end0-_Z29__device_stub__crackPasswordsPcPiPjiiS0_
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$4096, %edi                     # imm = 0x1000
	callq	_Znwm
	movq	%rax, %rbx
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
.Ltmp0:
	movl	$40, %edi
	callq	_Znwm
.Ltmp1:
# %bb.1:
	movq	%rax, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	movups	%xmm0, (%rax)
	movq	$0, 32(%rax)
.Ltmp3:
	movl	$16384, %edi                    # imm = 0x4000
	callq	_Znwm
.Ltmp4:
# %bb.2:
	movq	%rax, %r15
	xorl	%r12d, %r12d
	movl	$16384, %edx                    # imm = 0x4000
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$0, 12(%rsp)
	movq	%rbx, %rax
.LBB1_3:                                # =>This Inner Loop Header: Depth=1
	movl	%r12d, (%rax)
	addq	$12345, %r12                    # imm = 0x3039
	addq	$4, %rax
	cmpq	$12641280, %r12                 # imm = 0xC0E400
	jne	.LBB1_3
# %bb.4:                                # %.preheader173.preheader
	xorl	%eax, %eax
.LBB1_5:                                # %.preheader173
                                        # =>This Inner Loop Header: Depth=1
	leaq	1(%rax), %rcx
	movl	%ecx, (%r14,%rax,4)
	movq	%rcx, %rax
	cmpq	$10, %rcx
	jne	.LBB1_5
# %bb.6:                                # %.preheader.preheader
	movb	$97, %al
	xorl	%ecx, %ecx
	xorl	%edx, %edx
.LBB1_7:                                # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movzwl	%cx, %esi
	imull	$20165, %esi, %esi              # imm = 0x4EC5
	shrl	$19, %esi
	leal	(%rsi,%rsi,4), %edi
	leal	(%rdi,%rdi,4), %edi
	addl	%esi, %edi
	movl	%eax, %esi
	subb	%dil, %sil
	movb	%sil, (%r15,%rdx)
	incq	%rdx
	incb	%al
	incl	%ecx
	cmpq	$16384, %rdx                    # imm = 0x4000
	jne	.LBB1_7
# %bb.8:
.Ltmp6:
	leaq	40(%rsp), %rdi
	movl	$16384, %esi                    # imm = 0x4000
	callq	hipMalloc
.Ltmp7:
# %bb.9:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_14
# %bb.10:
.Ltmp8:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	movl	$30, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp9:
# %bb.11:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
.Ltmp10:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp11:
	jmp	.LBB1_26
.LBB1_14:
.Ltmp12:
	leaq	32(%rsp), %rdi
	movl	$40, %esi
	callq	hipMalloc
.Ltmp13:
# %bb.15:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_18
# %bb.16:
.Ltmp14:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.1, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp15:
# %bb.17:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit74
.Ltmp16:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp17:
	jmp	.LBB1_26
.LBB1_18:
.Ltmp18:
	leaq	24(%rsp), %rdi
	movl	$4096, %esi                     # imm = 0x1000
	callq	hipMalloc
.Ltmp19:
# %bb.19:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_22
# %bb.20:
.Ltmp20:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.2, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp21:
# %bb.21:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit82
.Ltmp22:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp23:
	jmp	.LBB1_26
.LBB1_22:
.Ltmp24:
	leaq	16(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
.Ltmp25:
# %bb.23:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_32
# %bb.24:
.Ltmp26:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.3, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp27:
# %bb.25:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit90
.Ltmp28:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp29:
.LBB1_26:
	movq	%rax, %r12
	testq	%rax, %rax
	je	.LBB1_27
# %bb.28:                               # %.invoke190
	movq	%r12, %rdi
	callq	strlen
.Ltmp30:
	movl	$_ZSt4cerr, %edi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp31:
	jmp	.LBB1_29
.LBB1_27:                               # %.invoke191
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
.Ltmp32:
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.Ltmp33:
.LBB1_29:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit94.invoke
	movq	_ZSt4cerr(%rip), %rax
	movl	$_ZSt4cerr, %edi
	addq	-24(%rax), %rdi
.Ltmp34:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp35:
# %bb.30:                               # %.noexc147.invoke
.Ltmp36:
	movsbl	%al, %esi
	movl	$_ZSt4cerr, %edi
	callq	_ZNSo3putEc
.Ltmp37:
# %bb.31:                               # %.noexc148.invoke
	movl	$-1, %ebp
.Ltmp38:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp39:
.LBB1_66:                               # %_ZNSt6vectorIjSaIjEED2Ev.exit
	movq	%r15, %rdi
	callq	_ZdlPv
	movq	%r14, %rdi
	callq	_ZdlPv
	movq	%rbx, %rdi
	callq	_ZdlPv
	movl	%ebp, %eax
	addq	$48, %rsp
	.cfi_def_cfa_offset 48
	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
.LBB1_32:
	.cfi_def_cfa_offset 96
	movq	40(%rsp), %rdi
.Ltmp40:
	movl	$16384, %edx                    # imm = 0x4000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp41:
# %bb.33:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_35
# %bb.34:
.Ltmp42:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.4, %esi
	movl	$30, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp43:
	jmp	.LBB1_44
.LBB1_35:
	movq	32(%rsp), %rdi
.Ltmp44:
	movl	$40, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp45:
# %bb.36:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_38
# %bb.37:
.Ltmp46:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.5, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp47:
	jmp	.LBB1_44
.LBB1_38:
	movq	24(%rsp), %rdi
.Ltmp48:
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp49:
# %bb.39:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_41
# %bb.40:
.Ltmp50:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.6, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp51:
	jmp	.LBB1_44
.LBB1_41:
	movq	16(%rsp), %rdi
.Ltmp52:
	leaq	12(%rsp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp53:
# %bb.42:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_47
# %bb.43:
.Ltmp54:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.7, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp55:
.LBB1_44:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit110.invoke
.Ltmp56:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp57:
# %bb.45:                               # %.invoke187
.Ltmp58:
	movl	$_ZSt4cerr, %edi
	movq	%rax, %rsi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
.Ltmp59:
# %bb.46:                               # %.invoke
	movl	$-1, %ebp
.Ltmp60:
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp61:
	jmp	.LBB1_66
.LBB1_47:
.Ltmp63:
	movabsq	$4294967300, %rdi               # imm = 0x100000004
	movabsq	$4294967552, %rdx               # imm = 0x100000100
	movl	$1024, %r8d                     # imm = 0x400
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp64:
# %bb.48:
	testl	%eax, %eax
	jne	.LBB1_50
# %bb.49:
	movq	40(%rsp), %rdi
	movq	32(%rsp), %rsi
	movq	24(%rsp), %rdx
	movq	16(%rsp), %r9
.Ltmp65:
	movl	$1024, %ecx                     # imm = 0x400
	movl	$10, %r8d
	callq	_Z29__device_stub__crackPasswordsPcPiPjiiS0_
.Ltmp66:
.LBB1_50:
.Ltmp67:
	callq	hipGetLastError
.Ltmp68:
# %bb.51:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_53
# %bb.52:
.Ltmp69:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.8, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp70:
	jmp	.LBB1_56
.LBB1_53:
	movq	16(%rsp), %rsi
.Ltmp71:
	leaq	12(%rsp), %rdi
	movl	$4, %edx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp72:
# %bb.54:
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.LBB1_59
# %bb.55:
.Ltmp73:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.9, %esi
	movl	$28, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp74:
.LBB1_56:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit118.invoke
.Ltmp75:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp76:
# %bb.57:                               # %.invoke188
.Ltmp77:
	movl	$_ZSt4cerr, %edi
	movq	%rax, %rsi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
.Ltmp78:
# %bb.58:                               # %.invoke186
	movl	$-1, %ebp
.Ltmp79:
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp80:
	jmp	.LBB1_66
.LBB1_59:
	movq	40(%rsp), %rdi
.Ltmp81:
	callq	hipFree
.Ltmp82:
# %bb.60:
	movq	32(%rsp), %rdi
.Ltmp83:
	callq	hipFree
.Ltmp84:
# %bb.61:
	movq	24(%rsp), %rdi
.Ltmp85:
	callq	hipFree
.Ltmp86:
# %bb.62:
	movq	16(%rsp), %rdi
.Ltmp87:
	callq	hipFree
.Ltmp88:
# %bb.63:
.Ltmp89:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp90:
# %bb.64:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit122
	movl	12(%rsp), %esi
.Ltmp91:
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
.Ltmp92:
# %bb.65:
	xorl	%ebp, %ebp
.Ltmp93:
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp94:
	jmp	.LBB1_66
.LBB1_71:
.Ltmp95:
	jmp	.LBB1_68
.LBB1_13:
.Ltmp5:
	movq	%rax, %r12
	jmp	.LBB1_69
.LBB1_12:
.Ltmp2:
	movq	%rax, %r12
	jmp	.LBB1_70
.LBB1_67:
.Ltmp62:
.LBB1_68:                               # %_ZNSt6vectorIcSaIcEED2Ev.exit128
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_ZdlPv
.LBB1_69:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit130
	movq	%r14, %rdi
	callq	_ZdlPv
.LBB1_70:                               # %_ZNSt6vectorIjSaIjEED2Ev.exit132
	movq	%rbx, %rdi
	callq	_ZdlPv
	movq	%r12, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	main, .Lfunc_end1-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp4-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp6-.Ltmp4                  #   Call between .Ltmp4 and .Ltmp6
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp61-.Ltmp6                 #   Call between .Ltmp6 and .Ltmp61
	.uleb128 .Ltmp62-.Lfunc_begin0          #     jumps to .Ltmp62
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp63-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp94-.Ltmp63                #   Call between .Ltmp63 and .Ltmp94
	.uleb128 .Ltmp95-.Lfunc_begin0          #     jumps to .Ltmp95
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp94-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Lfunc_end1-.Ltmp94            #   Call between .Ltmp94 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB2_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB2_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z14crackPasswordsPcPiPjiiS0_, %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_end2:
	.size	__hip_module_ctor, .Lfunc_end2-__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	.LBB3_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
.LBB3_2:
	retq
.Lfunc_end3:
	.size	__hip_module_dtor, .Lfunc_end3-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z14crackPasswordsPcPiPjiiS0_,@object # @_Z14crackPasswordsPcPiPjiiS0_
	.section	.rodata,"a",@progbits
	.globl	_Z14crackPasswordsPcPiPjiiS0_
	.p2align	3, 0x0
_Z14crackPasswordsPcPiPjiiS0_:
	.quad	_Z29__device_stub__crackPasswordsPcPiPjiiS0_
	.size	_Z14crackPasswordsPcPiPjiiS0_, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Error allocating d_passwords: "
	.size	.L.str, 31

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Error allocating d_rules: "
	.size	.L.str.1, 27

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Error allocating d_hashes: "
	.size	.L.str.2, 28

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Error allocating d_found: "
	.size	.L.str.3, 27

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Error copying to d_passwords: "
	.size	.L.str.4, 31

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Error copying to d_rules: "
	.size	.L.str.5, 27

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"Error copying to d_hashes: "
	.size	.L.str.6, 28

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Error copying to d_found: "
	.size	.L.str.7, 27

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Error launching kernel: "
	.size	.L.str.8, 25

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Error copying from d_found: "
	.size	.L.str.9, 29

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Number of passwords found: "
	.size	.L.str.10, 28

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z14crackPasswordsPcPiPjiiS0_"
	.size	.L__unnamed_1, 30

	.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

	.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 _Z29__device_stub__crackPasswordsPcPiPjiiS0_
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z14crackPasswordsPcPiPjiiS0_
	.addrsig_sym _ZSt4cerr
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z14crackPasswordsPcPiPjiiS0_ ; -- Begin function _Z14crackPasswordsPcPiPjiiS0_
	.globl	_Z14crackPasswordsPcPiPjiiS0_
	.p2align	8
	.type	_Z14crackPasswordsPcPiPjiiS0_,@function
_Z14crackPasswordsPcPiPjiiS0_:          ; @_Z14crackPasswordsPcPiPjiiS0_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b256 s[4:11], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s14, s2, 0xffff
	s_mov_b32 s2, exec_lo
	v_mad_u64_u32 v[1:2], null, s15, s14, v[0:1]
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_i32_e64 s10, v1
	s_cbranch_execz .LBB0_2
; %bb.1:
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	v_add_co_u32 v1, vcc_lo, s8, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v2, vcc_lo, s9, v2, vcc_lo
	global_load_b32 v1, v[1:2], off
	v_lshl_add_u32 v2, v0, 2, 0
	s_waitcnt vmcnt(0)
	ds_store_b32 v2, v1
.LBB0_2:
	s_or_b32 exec_lo, exec_lo, s2
	s_cmp_lt_i32 s11, 1
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB0_16
; %bb.3:                                ; %.lr.ph45
	s_load_b64 s[8:9], s[0:1], 0x20
	v_dual_mov_b32 v2, 0 :: v_dual_lshlrev_b32 v1, 4, v0
	v_cmp_gt_u32_e64 s0, s10, v0
	s_cmp_lg_u32 s14, 0
                                        ; implicit-def: $vgpr5
                                        ; implicit-def: $vgpr6
                                        ; implicit-def: $vgpr7
                                        ; implicit-def: $vgpr8
                                        ; implicit-def: $vgpr9
                                        ; implicit-def: $vgpr10
                                        ; implicit-def: $vgpr11
                                        ; implicit-def: $vgpr12
                                        ; implicit-def: $vgpr13
                                        ; implicit-def: $vgpr14
                                        ; implicit-def: $vgpr15
                                        ; implicit-def: $vgpr16
                                        ; implicit-def: $vgpr17
                                        ; implicit-def: $vgpr18
                                        ; implicit-def: $vgpr19
                                        ; implicit-def: $vgpr20
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v3, s1, s4, v1
	v_add_co_ci_u32_e64 v4, null, s5, 0, s1
	s_mov_b32 s5, 0
	s_cselect_b32 s10, -1, 0
	s_mov_b32 s4, s5
.LBB0_4:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	s_and_saveexec_b32 s15, s0
	s_cbranch_execz .LBB0_15
; %bb.5:                                ; %.preheader37
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_lshl_b64 s[2:3], s[4:5], 2
	s_mov_b64 s[12:13], 0
	s_add_u32 s2, s6, s2
	s_addc_u32 s3, s7, s3
	global_load_b32 v0, v2, s[2:3]
.LBB0_6:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_add_co_u32 v21, vcc_lo, v3, s12
	v_add_co_ci_u32_e32 v22, vcc_lo, s13, v4, vcc_lo
	s_cmp_eq_u32 s12, 3
	s_cselect_b32 vcc_lo, -1, 0
	global_load_u8 v1, v[21:22], off
	s_cmp_eq_u32 s12, 2
	s_cselect_b32 s1, -1, 0
	s_cmp_eq_u32 s12, 1
	s_cselect_b32 s2, -1, 0
	s_cmp_eq_u32 s12, 0
	s_waitcnt vmcnt(0)
	v_add_nc_u16 v1, v1, v0
	s_delay_alu instid0(VALU_DEP_1)
	v_cndmask_b32_e32 v8, v8, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 4
	v_cndmask_b32_e32 v5, v5, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 5
	v_cndmask_b32_e32 v9, v9, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 6
	v_cndmask_b32_e32 v10, v10, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 7
	v_cndmask_b32_e32 v11, v11, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 8
	v_cndmask_b32_e32 v12, v12, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 9
	v_cndmask_b32_e32 v13, v13, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 10
	v_cndmask_b32_e32 v14, v14, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 11
	v_cndmask_b32_e32 v15, v15, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 12
	v_cndmask_b32_e32 v16, v16, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 13
	v_cndmask_b32_e32 v17, v17, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 14
	v_cndmask_b32_e32 v18, v18, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s12, 15
	v_cndmask_b32_e32 v19, v19, v1, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	v_cndmask_b32_e64 v7, v7, v1, s1
	v_cndmask_b32_e64 v6, v6, v1, s2
	v_cndmask_b32_e32 v20, v20, v1, vcc_lo
	s_add_u32 s12, s12, 1
	s_addc_u32 s13, s13, 0
	s_cmp_lg_u32 s12, 16
	s_cbranch_scc1 .LBB0_6
; %bb.7:                                ; %.preheader36.preheader
                                        ;   in Loop: Header=BB0_4 Depth=1
	v_mov_b32_e32 v21, 0
	s_mov_b64 s[2:3], 0
.LBB0_8:                                ; %.preheader36
                                        ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s2, 1
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 2
	v_cndmask_b32_e32 v0, v5, v6, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v7, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 4
	v_cndmask_b32_e32 v0, v0, v8, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v9, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 6
	v_cndmask_b32_e32 v0, v0, v10, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v11, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 8
	v_cndmask_b32_e32 v0, v0, v12, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 9
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v13, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 10
	v_cndmask_b32_e32 v0, v0, v14, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 11
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v15, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 12
	v_cndmask_b32_e32 v0, v0, v16, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 13
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v17, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 14
	v_cndmask_b32_e32 v0, v0, v18, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 15
	s_delay_alu instid0(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v19, vcc_lo
	s_cselect_b32 vcc_lo, -1, 0
	s_add_u32 s2, s2, 1
	s_addc_u32 s3, s3, 0
	s_cmp_eq_u32 s2, 16
	v_cndmask_b32_e32 v0, v0, v20, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_bfe_i32 v22, v0, 0, 8
	v_mad_u64_u32 v[0:1], null, v21, 31, v[22:23]
	s_delay_alu instid0(VALU_DEP_1)
	v_mov_b32_e32 v21, v0
	s_cbranch_scc0 .LBB0_8
; %bb.9:                                ; %.preheader
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_b32 vcc_lo, exec_lo, s10
	s_cbranch_vccnz .LBB0_15
; %bb.10:                               ; %.lr.ph.preheader
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_mov_b32 s1, 0
	s_mov_b32 s2, s14
.LBB0_11:                               ; %.lr.ph
                                        ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_mov_b32_e32 v1, s1
	s_mov_b32 s3, exec_lo
	ds_load_b32 v1, v1
	s_waitcnt lgkmcnt(0)
	v_cmpx_eq_u32_e64 v0, v1
	s_cbranch_execz .LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	s_mov_b32 s12, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mbcnt_lo_u32_b32 v1, s12, 0
	v_cmp_eq_u32_e32 vcc_lo, 0, v1
	s_and_b32 s13, exec_lo, vcc_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 exec_lo, s13
	s_cbranch_execz .LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	s_bcnt1_i32_b32 s12, s12
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v1, s12
	global_atomic_add_u32 v2, v1, s[8:9]
.LBB0_14:                               ;   in Loop: Header=BB0_11 Depth=2
	s_or_b32 exec_lo, exec_lo, s3
	s_add_i32 s2, s2, -1
	s_add_i32 s1, s1, 4
	s_cmp_lg_u32 s2, 0
	s_cbranch_scc1 .LBB0_11
.LBB0_15:                               ; %Flow81
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s15
	s_add_i32 s4, s4, 1
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_cmp_eq_u32 s4, s11
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc0 .LBB0_4
.LBB0_16:                               ; %._crit_edge
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z14crackPasswordsPcPiPjiiS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 24
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z14crackPasswordsPcPiPjiiS0_, .Lfunc_end0-_Z14crackPasswordsPcPiPjiiS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 920
; NumSgprs: 18
; NumVgprs: 24
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 24
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.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:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         160
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z14crackPasswordsPcPiPjiiS0_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z14crackPasswordsPcPiPjiiS0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     24
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
