#include <iostream>
#include <algorithm>

__managed__ unsigned int messagenum = 0;

using namespace std;

// kernal function takes in arguments cipher c, modulus n, messagelist(Which is shared betweeen host
// and device in Unified memory).

__global__
void breakingrsa(unsigned long long ciphertext,unsigned long long int n,unsigned long long *messagelist, int ciphermessagescount){
    unsigned long long int thread_pos = blockIdx.x * blockDim.x +threadIdx.x;
    int total_threads = blockDim.x * gridDim.x;
    for (unsigned long long i = thread_pos; i < n; i+=total_threads) {
        unsigned long long val =1 ;
        for(int j =0;j<3;j++) {
            val = ((val * i) % n);
        }
        if(val==ciphertext && messagenum < ciphermessagescount){
            messagelist[atomicAdd(&messagenum, 1)] = i; // Here atomicAdd is used to perform the addition of the RSA messages which are decoded.
            // This  is done by performing atomic addition i,e either it increases the values in the
            // mentioned address or it doesnt and prevents the value from interleaving.
        }
    }
}


// This is the main function takes in aruments the ciphertext c and the modulus n.

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

    if (argc < 3) {
        // When the input arguments are wrong.
        std::cerr << "USAGE: " << argv[0] << " ciphertext" << " " <<argv[1]<< " modulus" << argv[2] << std::endl;
        return 1;
    }

    unsigned long long modulus = stoull(argv[2]);
    unsigned long long cipher = stoull(argv[1]);
    unsigned long long int *messagelist;

    int ciphermessagescount = 100;
    cudaMallocManaged(&messagelist,ciphermessagescount*sizeof(unsigned long long));

    int threadsperblock = 256;
    int totalblocks = (modulus+threadsperblock-1) / threadsperblock;
    breakingrsa<<< totalblocks,threadsperblock >>>(cipher,modulus,messagelist,100);

    cudaDeviceSynchronize();

    if (messagenum == 0){
        cout << "No cube roots of " << cipher << " (mod " << argv[2] << ")";
    }else{
        sort(messagelist,messagelist+messagenum);
        for(int i = 0; i <messagenum;i++){
            cout << messagelist[i] <<"^3 = " << cipher << " (mod " << argv[2] << ")" << endl;
        }
    }

    cudaFree(messagelist);
    return 0;
}


	.file	"tmpxft_002d3bc0_00000000-6_RSA_CUDA_PARALLEL.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL20__nv_init_managed_rtv, @function
_ZL20__nv_init_managed_rtv:
.LFB1:
	.cfi_startproc
	movb	_ZL22__nv_inited_managed_rt(%rip), %al
	testb	%al, %al
	jne	.L4
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	_ZL32__nv_fatbinhandle_for_managed_rt(%rip), %rdi
	call	__cudaInitModule@PLT
	movb	%al, _ZL22__nv_inited_managed_rt(%rip)
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
.L4:
	movb	%al, _ZL22__nv_inited_managed_rt(%rip)
	ret
	.cfi_endproc
.LFE1:
	.size	_ZL20__nv_init_managed_rtv, .-_ZL20__nv_init_managed_rtv
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3892:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3892:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.text._ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_.isra.0,"axG",@progbits,_ZSt4sortIPyEvT_S1_,comdat
	.type	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_.isra.0, @function
_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_.isra.0:
.LFB4592:
	.cfi_startproc
	leaq	-1(%rdx), %rax
	movq	%rsi, %r8
	movq	%rcx, %r9
	movq	%rdx, %rsi
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%r8, %rcx
.L10:
	cmpq	%rax, %rcx
	jge	.L17
	leaq	1(%rcx), %rdx
	addq	%rdx, %rdx
	movq	-8(%rdi,%rdx,8), %r11
	cmpq	%r11, (%rdi,%rdx,8)
	jnb	.L11
	decq	%rdx
.L11:
	movq	(%rdi,%rdx,8), %r10
	movq	%r10, (%rdi,%rcx,8)
	movq	%rdx, %rcx
	jmp	.L10
.L17:
	testl	$1, %esi
	jne	.L13
	leaq	-2(%rsi), %rax
	movl	$2, %esi
	cqto
	idivq	%rsi
	cmpq	%rax, %rcx
	jne	.L13
	leaq	1(%rcx), %rax
	addq	%rax, %rax
	movq	-8(%rdi,%rax,8), %rdx
	movq	%rdx, (%rdi,%rcx,8)
	leaq	-1(%rax), %rcx
.L13:
	leaq	-1(%rcx), %rax
	movl	$2, %esi
.L16:
	cqto
	idivq	%rsi
	leaq	(%rdi,%rcx,8), %rdx
	cmpq	%rcx, %r8
	jge	.L14
	movq	(%rdi,%rax,8), %rcx
	cmpq	%r9, %rcx
	jnb	.L14
	movq	%rcx, (%rdx)
	leaq	-1(%rax), %rdx
	movq	%rax, %rcx
	movq	%rdx, %rax
	jmp	.L16
.L14:
	movq	%r9, (%rdx)
	ret
	.cfi_endproc
.LFE4592:
	.size	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_.isra.0, .-_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_.isra.0
	.section	.text._ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.isra.0,"axG",@progbits,_ZSt4sortIPyEvT_S1_,comdat
	.type	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.isra.0, @function
_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.isra.0:
.LFB4594:
	.cfi_startproc
	cmpq	%rsi, %rdi
	jne	.L30
	ret
.L30:
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$8, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	8(%rdi), %rbx
.L20:
	cmpq	%rbx, %r12
	je	.L34
	movq	(%rbx), %r13
	movq	0(%rbp), %rax
	cmpq	%rax, %r13
	jnb	.L28
	movq	%rbx, %rdx
	subq	%rbp, %rdx
	cmpq	$8, %rdx
	jle	.L22
	movq	%r14, %rdi
	movq	%rbp, %rsi
	subq	%rdx, %rdi
	addq	%rbx, %rdi
	call	memmove@PLT
	jmp	.L23
.L22:
	jne	.L23
	movq	%rax, (%rbx)
.L23:
	movq	%r13, 0(%rbp)
	jmp	.L24
.L28:
	movq	%rbx, %rax
.L21:
	movq	-8(%rax), %rdx
	cmpq	%rdx, %r13
	jnb	.L35
	movq	%rdx, (%rax)
	subq	$8, %rax
	jmp	.L21
.L35:
	movq	%r13, (%rax)
.L24:
	addq	$8, %rbx
	jmp	.L20
.L34:
	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
.LFE4594:
	.size	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.isra.0, .-_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.isra.0
	.section	.text._ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_.isra.0,"axG",@progbits,_ZSt4sortIPyEvT_S1_,comdat
	.type	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_.isra.0, @function
_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_.isra.0:
.LFB4598:
	.cfi_startproc
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rdx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdi, %rbx
.L37:
	movq	%rbp, %rax
	subq	%rbx, %rax
	cmpq	$128, %rax
	jle	.L36
	movq	%rax, %r14
	sarq	$3, %r14
	testq	%r13, %r13
	jne	.L38
	leaq	-2(%r14), %r12
	sarq	%r12
.L40:
	movq	(%rbx,%r12,8), %rcx
	movq	%r14, %rdx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_.isra.0
	testq	%r12, %r12
	je	.L39
	decq	%r12
	jmp	.L40
.L39:
	movq	%rbp, %rax
	subq	%rbx, %rax
	cmpq	$8, %rax
	jle	.L36
	movq	(%rbx), %rax
	subq	$8, %rbp
	movq	0(%rbp), %rcx
	xorl	%esi, %esi
	movq	%rbp, %rdx
	movq	%rbx, %rdi
	movq	%rax, 0(%rbp)
	subq	%rbx, %rdx
	sarq	$3, %rdx
	call	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_.isra.0
	jmp	.L39
.L38:
	sarq	$4, %rax
	movq	8(%rbx), %rsi
	movq	-8(%rbp), %rdx
	leaq	8(%rbx), %r12
	leaq	(%rbx,%rax,8), %rdi
	movq	(%rbx), %rax
	movq	(%rdi), %rcx
	cmpq	%rcx, %rsi
	jnb	.L42
	cmpq	%rdx, %rcx
	jnb	.L43
.L60:
	movq	%rcx, (%rbx)
	movq	%rax, (%rdi)
.L46:
	movq	%rbp, %rax
	jmp	.L44
.L43:
	cmpq	%rdx, %rsi
	jnb	.L61
	jmp	.L59
.L42:
	cmpq	%rdx, %rsi
	jnb	.L47
.L61:
	movq	%rsi, (%rbx)
	movq	%rax, 8(%rbx)
	jmp	.L46
.L47:
	cmpq	%rdx, %rcx
	jnb	.L60
.L59:
	movq	%rdx, (%rbx)
	movq	%rax, -8(%rbp)
	jmp	.L46
.L53:
	movq	%rcx, (%r12)
	addq	$8, %r12
	movq	%rdx, (%rax)
.L44:
	movq	(%rbx), %rsi
.L49:
	movq	(%r12), %rdx
	cmpq	%rsi, %rdx
	jnb	.L52
	addq	$8, %r12
	jmp	.L49
.L52:
	movq	-8(%rax), %rcx
	subq	$8, %rax
	cmpq	%rcx, %rsi
	jb	.L52
	cmpq	%rax, %r12
	jb	.L53
	decq	%r13
	movq	%rbp, %rsi
	movq	%r12, %rdi
	movq	%r12, %rbp
	movq	%r13, %rdx
	call	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_.isra.0
	jmp	.L37
.L36:
	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
.LFE4598:
	.size	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_.isra.0, .-_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_.isra.0
	.text
	.globl	_Z34__device_stub__Z11breakingrsayyPyiyyPyi
	.type	_Z34__device_stub__Z11breakingrsayyPyiyyPyi, @function
_Z34__device_stub__Z11breakingrsayyPyiyyPyi:
.LFB3914:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L62
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z11breakingrsayyPyi(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L62:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3914:
	.size	_Z34__device_stub__Z11breakingrsayyPyiyyPyi, .-_Z34__device_stub__Z11breakingrsayyPyiyyPyi
	.globl	_Z11breakingrsayyPyi
	.type	_Z11breakingrsayyPyi, @function
_Z11breakingrsayyPyi:
.LFB3915:
	.cfi_startproc
	endbr64
	jmp	_Z34__device_stub__Z11breakingrsayyPyiyyPyi
	.cfi_endproc
.LFE3915:
	.size	_Z11breakingrsayyPyi, .-_Z11breakingrsayyPyi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z11breakingrsayyPyi"
.LC1:
	.string	"messagenum"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3917:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z11breakingrsayyPyi(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	movq	%rax, _ZL32__nv_fatbinhandle_for_managed_rt(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	movl	$4, %r9d
	leaq	_ZL10messagenum(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	call	__cudaRegisterManagedVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3917:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB4032:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L69
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L69:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4032:
	.size	_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.text._ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.weak	_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.type	_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, @function
_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_:
.LFB4027:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4027
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%r8d, 12(%rsp)
	leaq	28(%rsp), %r14
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	__errno_location@PLT
	movl	12(%rsp), %edx
	leaq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rbp
	movl	(%rax), %eax
	movl	%eax, 28(%rsp)
	xorl	%eax, %eax
	movl	%eax, 0(%rbp)
.LEHB0:
	call	*%r15
	movq	%rax, %r15
	movq	32(%rsp), %rax
	cmpq	%rbx, %rax
	jne	.L73
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L85
	movq	%r13, %rdi
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L73:
	cmpl	$34, 0(%rbp)
	jne	.L75
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L85
	movq	%r13, %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE0:
.L75:
	testq	%r12, %r12
	je	.L77
	subq	%rbx, %rax
	movq	%rax, (%r12)
.L77:
	movq	%r14, %rdi
	call	_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L80
	jmp	.L85
.L81:
	endbr64
	movq	%rax, %rbx
.L78:
	movq	%r14, %rdi
	call	_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L85
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L85:
	call	__stack_chk_fail@PLT
.L80:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	movq	%r15, %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4027:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table._ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"aG",@progbits,_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
.LLSDA4027:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4027-.LLSDACSB4027
.LLSDACSB4027:
	.uleb128 .LEHB0-.LFB4027
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L81-.LFB4027
	.uleb128 0
	.uleb128 .LEHB1-.LFB4027
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE4027:
	.section	.text._ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.size	_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, .-_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC2:
	.string	"basic_string: construction from null is not valid"
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC5IS3_EEPKcRKS3_,comdat
	.align 2
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_:
.LFB4221:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	jne	.L89
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L94
	leaq	.LC2(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L89:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L91
	movq	%rsp, %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@PLT
	movq	%rax, (%rbx)
	movq	(%rsp), %rax
	movq	%rax, 16(%rbx)
.L91:
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	(%rsp), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rbx)
	movb	$0, (%rdx,%rax)
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L92
.L94:
	call	__stack_chk_fail@PLT
.L92:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4221:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.section	.text._ZSt4sortIPyEvT_S1_,"axG",@progbits,_ZSt4sortIPyEvT_S1_,comdat
	.weak	_ZSt4sortIPyEvT_S1_
	.type	_ZSt4sortIPyEvT_S1_, @function
_ZSt4sortIPyEvT_S1_:
.LFB4225:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	je	.L107
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %rbp
	subq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	movq	%rbp, %rax
	sarq	$3, %rax
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	bsrq	%rax, %rdx
	xorq	$63, %rdx
	testq	%rax, %rax
	movl	$64, %eax
	movq	%rdi, 8(%rsp)
	cmovne	%edx, %eax
	movl	$63, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rdx
	call	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_.isra.0
	cmpq	$128, %rbp
	movq	8(%rsp), %rdi
	jle	.L99
	leaq	128(%rdi), %rbp
	movq	%rbp, %rsi
	call	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.isra.0
.L100:
	cmpq	%rbp, %rbx
	je	.L110
	movq	0(%rbp), %rdx
	movq	%rbp, %rax
.L101:
	movq	-8(%rax), %rcx
	cmpq	%rcx, %rdx
	jnb	.L111
	movq	%rcx, (%rax)
	subq	$8, %rax
	jmp	.L101
.L111:
	movq	%rdx, (%rax)
	addq	$8, %rbp
	jmp	.L100
.L99:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%rbx, %rsi
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.isra.0
.L110:
	.cfi_restore_state
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L107:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE4225:
	.size	_ZSt4sortIPyEvT_S1_, .-_ZSt4sortIPyEvT_S1_
	.section	.rodata.str1.1
.LC3:
	.string	"USAGE: "
.LC4:
	.string	" ciphertext"
.LC5:
	.string	" "
.LC6:
	.string	" modulus"
.LC7:
	.string	"stoull"
.LC8:
	.string	"No cube roots of "
.LC9:
	.string	" (mod "
.LC10:
	.string	")"
.LC11:
	.string	"^3 = "
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3889:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3889
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	movq	%rsi, %rbx
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	cmpl	$2, %edi
	jg	.L113
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
.LEHB2:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC4(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC5(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	8(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC6(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	16(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	movl	$1, %eax
	jmp	.L112
.L113:
	movq	16(%rsi), %rsi
	leaq	28(%rsp), %r14
	leaq	40(%rsp), %rbp
	movq	%r14, %rdx
	movq	%rbp, %rdi
	leaq	.LC7(%rip), %r12
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE2:
	movq	40(%rsp), %rdx
	xorl	%ecx, %ecx
	movq	%r12, %rsi
	movq	__isoc23_strtoull@GOTPCREL(%rip), %rdi
	movl	$10, %r8d
.LEHB3:
	call	_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE3:
	movq	%rbp, %rdi
	movq	%rax, %r13
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rbx), %rsi
	movq	%r14, %rdx
	movq	%rbp, %rdi
.LEHB4:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE4:
	movq	40(%rsp), %rdx
	xorl	%ecx, %ecx
	movq	%r12, %rsi
	movq	__isoc23_strtoull@GOTPCREL(%rip), %rdi
	movl	$10, %r8d
.LEHB5:
	call	_ZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE5:
	movq	%rbp, %rdi
	movq	%rax, %r12
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	8(%rsp), %rdi
	movl	$1, %edx
	movl	$800, %esi
.LEHB6:
	call	cudaMallocManaged@PLT
	movl	$16777217, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leaq	255(%r13), %rax
	salq	$8, %rdx
	movl	$1, %ecx
	movl	$1, 36(%rsp)
	shrq	$8, %rax
	movq	%rdx, 28(%rsp)
	movl	%eax, 16(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 20(%rsp)
	movq	16(%rsp), %rdi
	movl	24(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L115
	movq	8(%rsp), %rdx
	movl	$100, %ecx
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	_Z34__device_stub__Z11breakingrsayyPyiyyPyi
.L115:
	call	cudaDeviceSynchronize@PLT
	cmpb	$0, _ZL22__nv_inited_managed_rt(%rip)
	jne	.L116
	call	_ZL20__nv_init_managed_rtv
.L116:
	movq	_ZL10messagenum(%rip), %rax
	cmpl	$0, (%rax)
	jne	.L117
	leaq	.LC8(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIyEERSoT_@PLT
	leaq	.LC9(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	16(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC10(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	jmp	.L118
.L117:
	cmpb	$0, _ZL22__nv_inited_managed_rt(%rip)
	movq	8(%rsp), %rbp
	jne	.L119
	call	_ZL20__nv_init_managed_rtv
.L119:
	movq	_ZL10messagenum(%rip), %rax
	movq	8(%rsp), %rdi
	leaq	_ZSt4cout(%rip), %r13
	movl	(%rax), %eax
	leaq	0(%rbp,%rax,8), %rsi
	xorl	%ebp, %ebp
	call	_ZSt4sortIPyEvT_S1_
.L120:
	cmpb	$0, _ZL22__nv_inited_managed_rt(%rip)
	jne	.L121
	call	_ZL20__nv_init_managed_rtv
.L121:
	movq	_ZL10messagenum(%rip), %rax
	movq	8(%rsp), %rdx
	cmpl	(%rax), %ebp
	jnb	.L118
	movq	(%rdx,%rbp,8), %rsi
	movq	%r13, %rdi
	incq	%rbp
	call	_ZNSo9_M_insertIyEERSoT_@PLT
	leaq	.LC11(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIyEERSoT_@PLT
	leaq	.LC9(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	16(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC10(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L120
.L118:
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	xorl	%eax, %eax
	jmp	.L112
.L128:
	endbr64
	jmp	.L133
.L129:
	endbr64
.L133:
	movq	%rax, %rbx
.L125:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L132
	movq	%rbx, %rdi
	call	_Unwind_Resume@PLT
.LEHE6:
.L112:
	movq	72(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L127
.L132:
	call	__stack_chk_fail@PLT
.L127:
	addq	$80, %rsp
	.cfi_def_cfa_offset 48
	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
.LFE3889:
	.section	.gcc_except_table,"a",@progbits
.LLSDA3889:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3889-.LLSDACSB3889
.LLSDACSB3889:
	.uleb128 .LEHB2-.LFB3889
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB3-.LFB3889
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L128-.LFB3889
	.uleb128 0
	.uleb128 .LEHB4-.LFB3889
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB3889
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L129-.LFB3889
	.uleb128 0
	.uleb128 .LEHB6-.LFB3889
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
.LLSDACSE3889:
	.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
	.section	__nv_managed_data__,"aw"
	.align 8
	.type	_ZL10messagenum, @object
	.size	_ZL10messagenum, 8
_ZL10messagenum:
	.zero	8
	.local	_ZL32__nv_fatbinhandle_for_managed_rt
	.comm	_ZL32__nv_fatbinhandle_for_managed_rt,8,8
	.local	_ZL22__nv_inited_managed_rt
	.comm	_ZL22__nv_inited_managed_rt,1,1
	.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 <hip/hip_runtime.h>
#include <iostream>
#include <algorithm>

__managed__ unsigned int messagenum = 0;

using namespace std;

// kernal function takes in arguments cipher c, modulus n, messagelist(Which is shared betweeen host
// and device in Unified memory).

__global__
void breakingrsa(unsigned long long ciphertext,unsigned long long int n,unsigned long long *messagelist, int ciphermessagescount){
    unsigned long long int thread_pos = blockIdx.x * blockDim.x +threadIdx.x;
    int total_threads = blockDim.x * gridDim.x;
    for (unsigned long long i = thread_pos; i < n; i+=total_threads) {
        unsigned long long val =1 ;
        for(int j =0;j<3;j++) {
            val = ((val * i) % n);
        }
        if(val==ciphertext && messagenum < ciphermessagescount){
            messagelist[atomicAdd(&messagenum, 1)] = i; // Here atomicAdd is used to perform the addition of the RSA messages which are decoded.
            // This  is done by performing atomic addition i,e either it increases the values in the
            // mentioned address or it doesnt and prevents the value from interleaving.
        }
    }
}


// This is the main function takes in aruments the ciphertext c and the modulus n.

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

    if (argc < 3) {
        // When the input arguments are wrong.
        std::cerr << "USAGE: " << argv[0] << " ciphertext" << " " <<argv[1]<< " modulus" << argv[2] << std::endl;
        return 1;
    }

    unsigned long long modulus = stoull(argv[2]);
    unsigned long long cipher = stoull(argv[1]);
    unsigned long long int *messagelist;

    int ciphermessagescount = 100;
    hipMallocManaged(&messagelist,ciphermessagescount*sizeof(unsigned long long));

    int threadsperblock = 256;
    int totalblocks = (modulus+threadsperblock-1) / threadsperblock;
    breakingrsa<<< totalblocks,threadsperblock >>>(cipher,modulus,messagelist,100);

    hipDeviceSynchronize();

    if (messagenum == 0){
        cout << "No cube roots of " << cipher << " (mod " << argv[2] << ")";
    }else{
        sort(messagelist,messagelist+messagenum);
        for(int i = 0; i <messagenum;i++){
            cout << messagelist[i] <<"^3 = " << cipher << " (mod " << argv[2] << ")" << endl;
        }
    }

    hipFree(messagelist);
    return 0;
}


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

                                        # End of file scope inline assembly
	.globl	_Z26__device_stub__breakingrsayyPyi # -- Begin function _Z26__device_stub__breakingrsayyPyi
	.type	_Z26__device_stub__breakingrsayyPyi,@function
_Z26__device_stub__breakingrsayyPyi:    # @_Z26__device_stub__breakingrsayyPyi
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	4(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z11breakingrsayyPyi, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z26__device_stub__breakingrsayyPyi, .Lfunc_end0-_Z26__device_stub__breakingrsayyPyi
	.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	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	.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	%rsi, %rbx
	cmpl	$2, %edi
	jg	.LBB1_11
# %bb.1:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	movl	$7, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%rbx), %r14
	testq	%r14, %r14
	je	.LBB1_2
# %bb.3:
	movq	%r14, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB1_4
.LBB1_11:
	movq	16(%rbx), %rsi
.Ltmp0:
	leaq	16(%rsp), %rdi
	leaq	11(%rsp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp1:
# %bb.12:
	movq	16(%rsp), %r14
	callq	__errno_location
	movq	%rax, %r15
	movl	(%rax), %ebp
	movl	$0, (%rax)
	leaq	48(%rsp), %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$10, %edx
	callq	__isoc23_strtoull
	cmpq	%r14, (%r13)
	je	.LBB1_13
# %bb.20:
	movq	%rax, %r12
	movl	(%r15), %eax
	testl	%eax, %eax
	je	.LBB1_24
# %bb.21:
	cmpl	$34, %eax
	jne	.LBB1_25
# %bb.22:                               # %.critedge.i.i
.Ltmp3:
	movl	$.L.str.8, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp4:
# %bb.23:
.LBB1_24:
	movl	%ebp, (%r15)
.LBB1_25:
	leaq	32(%rsp), %rax
	movq	-16(%rax), %rdi
	cmpq	%rax, %rdi
	je	.LBB1_27
# %bb.26:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB1_27:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	8(%rbx), %rsi
.Ltmp5:
	leaq	16(%rsp), %rdi
	leaq	11(%rsp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp6:
# %bb.28:
	movq	16(%rsp), %r13
	movl	(%r15), %eax
	movl	%eax, 12(%rsp)                  # 4-byte Spill
	movl	$0, (%r15)
	leaq	48(%rsp), %rbp
	movq	%r13, %rdi
	movq	%rbp, %rsi
	movl	$10, %edx
	callq	__isoc23_strtoull
	cmpq	%r13, (%rbp)
	je	.LBB1_29
# %bb.34:
	movq	%rax, %r14
	movl	(%r15), %eax
	testl	%eax, %eax
	je	.LBB1_38
# %bb.35:
	cmpl	$34, %eax
	jne	.LBB1_39
# %bb.36:                               # %.critedge.i.i39
.Ltmp8:
	movl	$.L.str.8, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp9:
# %bb.37:
.LBB1_38:
	movl	12(%rsp), %eax                  # 4-byte Reload
	movl	%eax, (%r15)
.LBB1_39:
	movq	16(%rsp), %rdi
	leaq	32(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB1_41
# %bb.40:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i44
	callq	_ZdlPv
.LBB1_41:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit46
	leaq	16(%rsp), %rdi
	movl	$800, %esi                      # imm = 0x320
	movl	$1, %edx
	callq	hipMallocManaged
	leaq	255(%r12), %rax
	shrq	$8, %rax
	movl	%eax, %edi
	btsq	$32, %rdi
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$256, %rdx                      # imm = 0x100
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB1_43
# %bb.42:
	movq	16(%rsp), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$100, %ecx
	callq	_Z26__device_stub__breakingrsayyPyi
.LBB1_43:
	callq	hipDeviceSynchronize
	movq	messagenum(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	.LBB1_44
# %bb.52:                               # %_ZSt4sortIPyEvT_S1_.exit
	movq	16(%rsp), %r15
	leaq	(%r15,%rax,8), %r12
	bsrq	%rax, %rax
	xorl	$63, %eax
	addl	%eax, %eax
	movl	$126, %edx
	subq	%rax, %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
	movq	messagenum(%rip), %rax
	cmpl	$0, (%rax)
	je	.LBB1_58
# %bb.53:                               # %.lr.ph.preheader
	xorl	%r13d, %r13d
.LBB1_54:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	16(%rsp), %rax
	movq	(%rax,%r13,8), %rsi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIyEERSoT_
	movq	%rax, %r15
	movl	$.L.str.7, %esi
	movl	$5, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ZNSo9_M_insertIyEERSoT_
	movq	%rax, %r15
	movl	$.L.str.5, %esi
	movl	$6, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	16(%rbx), %r12
	testq	%r12, %r12
	je	.LBB1_55
# %bb.56:                               #   in Loop: Header=BB1_54 Depth=1
	movq	%r12, %rdi
	callq	strlen
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB1_57
.LBB1_55:                               #   in Loop: Header=BB1_54 Depth=1
	movq	(%r15), %rax
	movq	-24(%rax), %rax
	movq	%r15, %rdi
	addq	%rax, %rdi
	movl	32(%r15,%rax), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB1_57:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit56
                                        #   in Loop: Header=BB1_54 Depth=1
	movl	$.L.str.6, %esi
	movl	$1, %edx
	movq	%r15, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r15), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	incq	%r13
	movq	messagenum(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %r13
	jb	.LBB1_54
	jmp	.LBB1_58
.LBB1_2:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB1_4:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.1, %esi
	movl	$11, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.2, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	.LBB1_5
# %bb.6:
	movq	%r14, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB1_7
.LBB1_5:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB1_7:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit36
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.3, %esi
	movl	$8, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	.LBB1_8
# %bb.9:
	movq	%rbx, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB1_10
.LBB1_8:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB1_10:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit38
	movq	_ZSt4cerr(%rip), %rax
	movl	$_ZSt4cerr, %ecx
	movq	-24(%rax), %rdi
	addq	%rcx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cerr, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$1, %eax
	jmp	.LBB1_59
.LBB1_44:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$17, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movq	%r14, %rsi
	callq	_ZNSo9_M_insertIyEERSoT_
	movq	%rax, %r14
	movl	$.L.str.5, %esi
	movl	$6, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	.LBB1_45
# %bb.50:
	movq	%rbx, %rdi
	callq	strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB1_51
.LBB1_45:
	movq	(%r14), %rax
	movq	-24(%rax), %rax
	movq	%r14, %rdi
	addq	%rax, %rdi
	movl	32(%r14,%rax), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB1_51:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit54
	movl	$.L.str.6, %esi
	movl	$1, %edx
	movq	%r14, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.LBB1_58:                               # %.loopexit
	movq	16(%rsp), %rdi
	callq	hipFree
	xorl	%eax, %eax
.LBB1_59:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB1_13:
	.cfi_def_cfa_offset 112
.Ltmp13:
	movl	$.L.str.8, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp14:
# %bb.14:
.LBB1_29:
.Ltmp10:
	movl	$.L.str.8, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp11:
# %bb.30:
.LBB1_49:
.Ltmp7:
	jmp	.LBB1_47
.LBB1_46:
.Ltmp2:
.LBB1_47:
	movq	%rax, %rbx
	jmp	.LBB1_48
.LBB1_31:
.Ltmp12:
	movq	%rax, %rbx
	cmpl	$0, (%r15)
	jne	.LBB1_33
# %bb.32:
	movl	12(%rsp), %eax                  # 4-byte Reload
	movl	%eax, (%r15)
.LBB1_33:                               # %_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev.exit.i.i40
	movq	16(%rsp), %rdi
	leaq	32(%rsp), %rax
	jmp	.LBB1_18
.LBB1_15:
.Ltmp15:
	movq	%rax, %rbx
	cmpl	$0, (%r15)
	jne	.LBB1_17
# %bb.16:
	movl	%ebp, (%r15)
.LBB1_17:                               # %_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev.exit.i.i
	leaq	32(%rsp), %rax
	movq	-16(%rax), %rdi
.LBB1_18:                               # %_ZZN9__gnu_cxx6__stoaIyycJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev.exit.i.i
	cmpq	%rax, %rdi
	je	.LBB1_48
# %bb.19:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i47
	callq	_ZdlPv
.LBB1_48:
	movq	%rbx, %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 .Ltmp15-.Lfunc_begin0          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp5-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp6-.Ltmp5                  #   Call between .Ltmp5 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp12-.Lfunc_begin0          #     jumps to .Ltmp12
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin0           # >> Call Site 6 <<
	.uleb128 .Ltmp13-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp13
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp14-.Ltmp13                #   Call between .Ltmp13 and .Ltmp14
	.uleb128 .Ltmp15-.Lfunc_begin0          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp10-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp11-.Ltmp10                #   Call between .Ltmp10 and .Ltmp11
	.uleb128 .Ltmp12-.Lfunc_begin0          #     jumps to .Ltmp12
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Lfunc_end1-.Ltmp11            #   Call between .Ltmp11 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_ # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	je	.LBB2_1
# %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	strlen
	leaq	(%rax,%rbx), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # TAILCALL
.LBB2_1:
	.cfi_def_cfa_offset 32
	movl	$.L.str.9, %edi
	callq	_ZSt19__throw_logic_errorPKc
.Lfunc_end2:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .Lfunc_end2-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB3_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB3_3
.LBB3_1:                                # %._crit_edge
	movq	(%rbx), %rax
.LBB3_3:
	testq	%r14, %r14
	je	.LBB3_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB3_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB3_7
.LBB3_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB3_7:                                # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end3-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_,"axG",@progbits,_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_,comdat
	.weak	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_ # -- Begin function _ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_
	.type	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_,@function
_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_: # @_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	subq	%rdi, %r14
	cmpq	$129, %r14
	jl	.LBB4_12
# %bb.1:                                # %.lr.ph
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	8(%rdi), %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movq	$-8, %rbp
	subq	%rdi, %rbp
.LBB4_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_5 Depth 2
                                        #       Child Loop BB4_6 Depth 3
                                        #       Child Loop BB4_8 Depth 3
	subq	$1, %r15
	jb	.LBB4_3
# %bb.4:                                #   in Loop: Header=BB4_2 Depth=1
	shrq	$4, %r14
	leaq	(%rbx,%r14,8), %rdx
	leaq	-8(%r12), %rcx
	movq	%rbx, %rdi
	movq	16(%rsp), %r14                  # 8-byte Reload
	movq	%r14, %rsi
	callq	_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_
	movq	%r12, %rax
	movq	%r14, %rcx
.LBB4_5:                                #   Parent Loop BB4_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB4_6 Depth 3
                                        #       Child Loop BB4_8 Depth 3
	movq	(%rbx), %rdx
	leaq	(%rcx,%rbp), %r14
.LBB4_6:                                #   Parent Loop BB4_2 Depth=1
                                        #     Parent Loop BB4_5 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	(%rcx), %rsi
	addq	$8, %rcx
	addq	$8, %r14
	cmpq	%rdx, %rsi
	jb	.LBB4_6
# %bb.7:                                # %.preheader.i.i.preheader
                                        #   in Loop: Header=BB4_5 Depth=2
	leaq	-8(%rcx), %r13
.LBB4_8:                                # %.preheader.i.i
                                        #   Parent Loop BB4_2 Depth=1
                                        #     Parent Loop BB4_5 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	-8(%rax), %rdi
	addq	$-8, %rax
	cmpq	%rdi, %rdx
	jb	.LBB4_8
# %bb.9:                                #   in Loop: Header=BB4_5 Depth=2
	cmpq	%rax, %r13
	jae	.LBB4_11
# %bb.10:                               #   in Loop: Header=BB4_5 Depth=2
	movq	%rdi, (%r13)
	movq	%rsi, (%rax)
	jmp	.LBB4_5
.LBB4_11:                               # %_ZSt27__unguarded_partition_pivotIPyN9__gnu_cxx5__ops15_Iter_less_iterEET_S4_S4_T0_.exit
                                        #   in Loop: Header=BB4_2 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_
	movq	%r13, %r12
	cmpq	$128, %r14
	jg	.LBB4_2
	jmp	.LBB4_12
.LBB4_3:
	leaq	15(%rsp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
	leaq	14(%rsp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
.LBB4_12:                               # %.loopexit
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_, .Lfunc_end4-_ZSt16__introsort_loopIPylN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_,"axG",@progbits,_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_,comdat
	.weak	_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_ # -- Begin function _ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
	.type	_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_,@function
_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_: # @_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rsi, %rbx
	movq	%rsi, %rax
	subq	%rdi, %rax
	cmpq	$129, %rax
	jl	.LBB5_8
# %bb.1:
	leaq	128(%rdi), %r14
	movq	%r14, %rsi
	callq	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
.LBB5_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_5 Depth 2
	cmpq	%rbx, %r14
	je	.LBB5_7
# %bb.3:                                # %.lr.ph.i
                                        #   in Loop: Header=BB5_2 Depth=1
	movq	-8(%r14), %rcx
	movq	(%r14), %rax
	movq	%r14, %rdx
	cmpq	%rcx, %rax
	jae	.LBB5_6
# %bb.4:                                # %.lr.ph.i.i.preheader
                                        #   in Loop: Header=BB5_2 Depth=1
	movq	%r14, %rdx
.LBB5_5:                                # %.lr.ph.i.i
                                        #   Parent Loop BB5_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%rcx, (%rdx)
	movq	-16(%rdx), %rcx
	addq	$-8, %rdx
	cmpq	%rcx, %rax
	jb	.LBB5_5
.LBB5_6:                                # %_ZSt25__unguarded_linear_insertIPyN9__gnu_cxx5__ops14_Val_less_iterEEvT_T0_.exit.i
                                        #   in Loop: Header=BB5_2 Depth=1
	movq	%rax, (%rdx)
	addq	$8, %r14
	jmp	.LBB5_2
.LBB5_8:
	movq	%rbx, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_ # TAILCALL
.LBB5_7:                                # %_ZSt26__unguarded_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.exit
	.cfi_def_cfa_offset 32
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_, .Lfunc_end5-_ZSt22__final_insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_,"axG",@progbits,_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_,comdat
	.weak	_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_ # -- Begin function _ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
	.type	_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_,@function
_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_: # @_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
	.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, %r15
	subq	%rdi, %r15
	cmpq	$9, %r15
	jl	.LBB6_3
# %bb.1:                                # %.lr.ph.preheader
	movq	%rsi, %rbx
	movq	%rdi, %r14
	addq	$-8, %rbx
.LBB6_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rcx
	movq	(%r14), %rax
	movq	%rax, (%rbx)
	addq	$-8, %r15
	movq	%r15, %rdx
	sarq	$3, %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_
	addq	$-8, %rbx
	cmpq	$8, %r15
	jg	.LBB6_2
.LBB6_3:                                # %._crit_edge
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_, .Lfunc_end6-_ZSt11__sort_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_,"axG",@progbits,_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_,comdat
	.weak	_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_ # -- Begin function _ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
	.type	_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_,@function
_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_: # @_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
	.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
	subq	%rdi, %rbx
	sarq	$3, %rbx
	cmpq	$2, %rbx
	jl	.LBB7_3
# %bb.1:
	movq	%rdi, %r14
	leaq	-2(%rbx), %r15
	shrq	%r15
.LBB7_2:                                # =>This Inner Loop Header: Depth=1
	movq	(%r14,%r15,8), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_
	addq	$-1, %r15
	jb	.LBB7_2
.LBB7_3:                                # %.loopexit
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_, .Lfunc_end7-_ZSt11__make_heapIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_RT0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_,"axG",@progbits,_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_,comdat
	.weak	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_ # -- Begin function _ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_
	.type	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_,@function
_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_: # @_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_
	.cfi_startproc
# %bb.0:
	leaq	-1(%rdx), %rax
	shrq	$63, %rax
	leaq	(%rdx,%rax), %r8
	decq	%r8
	sarq	%r8
	movq	%rsi, %rax
	cmpq	%rsi, %r8
	jle	.LBB8_6
# %bb.1:                                # %.lr.ph.preheader
	movq	%rsi, %r9
.LBB8_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	leaq	(%r9,%r9), %rax
	movq	16(%rdi,%rax,8), %r10
	cmpq	8(%rdi,%rax,8), %r10
	jb	.LBB8_3
# %bb.4:                                # %.lr.ph
                                        #   in Loop: Header=BB8_2 Depth=1
	leaq	2(,%r9,2), %rax
	jmp	.LBB8_5
.LBB8_3:                                #   in Loop: Header=BB8_2 Depth=1
	leaq	1(,%r9,2), %rax
.LBB8_5:                                # %.lr.ph
                                        #   in Loop: Header=BB8_2 Depth=1
	movq	(%rdi,%rax,8), %r10
	movq	%r10, (%rdi,%r9,8)
	movq	%rax, %r9
	cmpq	%r8, %rax
	jl	.LBB8_2
.LBB8_6:                                # %._crit_edge
	testb	$1, %dl
	jne	.LBB8_9
# %bb.7:
	addq	$-2, %rdx
	sarq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB8_9
# %bb.8:
	leaq	(%rax,%rax), %rdx
	movq	8(%rdi,%rdx,8), %rdx
	movq	%rdx, (%rdi,%rax,8)
	leaq	1(,%rax,2), %rax
.LBB8_9:
	cmpq	%rsi, %rax
	jle	.LBB8_10
.LBB8_11:                               # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	leaq	-1(%rax), %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	decq	%rdx
	sarq	%rdx
	movq	(%rdi,%rdx,8), %r8
	cmpq	%rcx, %r8
	jae	.LBB8_10
# %bb.12:                               #   in Loop: Header=BB8_11 Depth=1
	movq	%r8, (%rdi,%rax,8)
	movq	%rdx, %rax
	cmpq	%rsi, %rdx
	jg	.LBB8_11
	jmp	.LBB8_13
.LBB8_10:
	movq	%rax, %rdx
.LBB8_13:                               # %_ZSt11__push_heapIPylyN9__gnu_cxx5__ops14_Iter_less_valEEvT_T0_S5_T1_RT2_.exit
	movq	%rcx, (%rdi,%rdx,8)
	retq
.Lfunc_end8:
	.size	_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_, .Lfunc_end8-_ZSt13__adjust_heapIPylyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_T0_S5_T1_T2_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_,"axG",@progbits,_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_,comdat
	.weak	_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_ # -- Begin function _ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_
	.type	_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_,@function
_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_: # @_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_
	.cfi_startproc
# %bb.0:
	movq	(%rsi), %r8
	movq	(%rdx), %r9
	movq	(%rcx), %rax
	cmpq	%r9, %r8
	jae	.LBB9_6
# %bb.1:
	cmpq	%rax, %r9
	jae	.LBB9_3
# %bb.2:
	movq	(%rdi), %rax
	movq	%r9, (%rdi)
	movq	%rax, (%rdx)
	retq
.LBB9_6:
	cmpq	%rax, %r8
	jae	.LBB9_8
# %bb.7:
	movq	(%rdi), %rax
	movq	%r8, (%rdi)
	movq	%rax, (%rsi)
	retq
.LBB9_3:
	movq	(%rdi), %rdx
	cmpq	%rax, %r8
	jae	.LBB9_5
# %bb.4:
	movq	%rax, (%rdi)
	movq	%rdx, (%rcx)
	retq
.LBB9_8:
	movq	(%rdi), %rsi
	cmpq	%rax, %r9
	jae	.LBB9_10
# %bb.9:
	movq	%rax, (%rdi)
	movq	%rsi, (%rcx)
	retq
.LBB9_5:
	movq	%r8, (%rdi)
	movq	%rdx, (%rsi)
	retq
.LBB9_10:
	movq	%r9, (%rdi)
	movq	%rsi, (%rdx)
	retq
.Lfunc_end9:
	.size	_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_, .Lfunc_end9-_ZSt22__move_median_to_firstIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_S4_T0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_,"axG",@progbits,_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_,comdat
	.weak	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_ # -- Begin function _ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
	.type	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_,@function
_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_: # @_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
	.cfi_startproc
# %bb.0:
	cmpq	%rsi, %rdi
	je	.LBB10_14
# %bb.1:                                # %.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	8(%rdi), %rax
	cmpq	%rsi, %rax
	je	.LBB10_13
# %bb.2:                                # %.lr.ph
	movq	%r14, %r15
.LBB10_3:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB10_8 Depth 2
	movq	%r15, %rdi
	movq	%rax, %r15
	movq	8(%rdi), %r12
	movq	(%r14), %rcx
	cmpq	%rcx, %r12
	jae	.LBB10_6
# %bb.4:                                #   in Loop: Header=BB10_3 Depth=1
	movq	%r15, %rdx
	subq	%r14, %rdx
	movq	%rdx, %rax
	sarq	$3, %rax
	cmpq	$2, %rax
	jl	.LBB10_10
# %bb.5:                                #   in Loop: Header=BB10_3 Depth=1
	shlq	$3, %rax
	subq	%rax, %rdi
	addq	$16, %rdi
	movq	%r14, %rsi
	callq	memmove@PLT
.LBB10_12:                              # %_ZSt13move_backwardIPyS0_ET0_T_S2_S1_.exit
                                        #   in Loop: Header=BB10_3 Depth=1
	movq	%r14, %rax
	jmp	.LBB10_9
.LBB10_6:                               #   in Loop: Header=BB10_3 Depth=1
	movq	(%rdi), %rcx
	movq	%r15, %rax
	cmpq	%rcx, %r12
	jae	.LBB10_9
# %bb.7:                                # %.lr.ph.i.preheader
                                        #   in Loop: Header=BB10_3 Depth=1
	movq	%r15, %rax
.LBB10_8:                               # %.lr.ph.i
                                        #   Parent Loop BB10_3 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%rcx, (%rax)
	movq	-16(%rax), %rcx
	addq	$-8, %rax
	cmpq	%rcx, %r12
	jb	.LBB10_8
.LBB10_9:                               # %_ZSt13move_backwardIPyS0_ET0_T_S2_S1_.exit
                                        #   in Loop: Header=BB10_3 Depth=1
	movq	%r12, (%rax)
	leaq	8(%r15), %rax
	cmpq	%rbx, %rax
	jne	.LBB10_3
	jmp	.LBB10_13
.LBB10_10:                              #   in Loop: Header=BB10_3 Depth=1
	movq	%r14, %rax
	cmpq	$8, %rdx
	jne	.LBB10_9
# %bb.11:                               #   in Loop: Header=BB10_3 Depth=1
	movq	%rcx, 8(%rdi)
	jmp	.LBB10_12
.LBB10_13:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r14
	.cfi_restore %r15
.LBB10_14:                              # %.loopexit
	retq
.Lfunc_end10:
	.size	_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_, .Lfunc_end10-_ZSt16__insertion_sortIPyN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_
	.cfi_endproc
                                        # -- 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:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB11_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB11_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11breakingrsayyPyi, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$messagenum, %esi
	movl	$messagenum.managed, %edx
	movl	$.L__unnamed_2, %ecx
	movl	$4, %r8d
	movq	%rbx, %rdi
	movl	$4, %r9d
	callq	__hipRegisterManagedVar
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end11:
	.size	__hip_module_ctor, .Lfunc_end11-__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	.LBB12_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
.LBB12_2:
	retq
.Lfunc_end12:
	.size	__hip_module_dtor, .Lfunc_end12-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	messagenum.managed,@object      # @messagenum.managed
	.local	messagenum.managed
	.comm	messagenum.managed,4,4
	.type	_Z11breakingrsayyPyi,@object    # @_Z11breakingrsayyPyi
	.section	.rodata,"a",@progbits
	.globl	_Z11breakingrsayyPyi
	.p2align	3, 0x0
_Z11breakingrsayyPyi:
	.quad	_Z26__device_stub__breakingrsayyPyi
	.size	_Z11breakingrsayyPyi, 8

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

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	" ciphertext"
	.size	.L.str.1, 12

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	" "
	.size	.L.str.2, 2

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	" modulus"
	.size	.L.str.3, 9

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"No cube roots of "
	.size	.L.str.4, 18

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	" (mod "
	.size	.L.str.5, 7

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	")"
	.size	.L.str.6, 2

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"^3 = "
	.size	.L.str.7, 6

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"stoull"
	.size	.L.str.8, 7

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"basic_string: construction from null is not valid"
	.size	.L.str.9, 50

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z11breakingrsayyPyi"
	.size	.L__unnamed_1, 21

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"messagenum"
	.size	.L__unnamed_2, 11

	.type	messagenum,@object              # @messagenum
	.local	messagenum
	.comm	messagenum,8,8
	.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 _Z26__device_stub__breakingrsayyPyi
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym messagenum.managed
	.addrsig_sym _Z11breakingrsayyPyi
	.addrsig_sym _ZSt4cerr
	.addrsig_sym _ZSt4cout
	.addrsig_sym messagenum
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z11breakingrsayyPyi    ; -- Begin function _Z11breakingrsayyPyi
	.globl	_Z11breakingrsayyPyi
	.p2align	8
	.type	_Z11breakingrsayyPyi,@function
_Z11breakingrsayyPyi:                   ; @_Z11breakingrsayyPyi
; %bb.0:
	s_clause 0x1
	s_load_b32 s8, s[0:1], 0x2c
	s_load_b128 s[4:7], s[0:1], 0x0
	s_add_u32 s2, s0, 32
	s_addc_u32 s3, s1, 0
	s_mov_b32 s9, exec_lo
	s_waitcnt lgkmcnt(0)
	s_and_b32 s8, s8, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s8, v[0:1]
	v_mov_b32_e32 v2, 0
	v_cmpx_gt_u64_e64 s[6:7], v[1:2]
	s_cbranch_execz .LBB0_10
; %bb.1:                                ; %.preheader.lr.ph
	v_cvt_f32_u32_e32 v0, s6
	v_cvt_f32_u32_e32 v3, s7
	s_load_b32 s9, s[2:3], 0x0
	s_clause 0x1
	s_load_b64 s[2:3], s[0:1], 0x10
	s_load_b32 s1, s[0:1], 0x18
	s_mov_b32 s10, 0
	v_fmamk_f32 v0, v3, 0x4f800000, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(SALU_CYCLE_1)
	v_rcp_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x5f7ffffc, v0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s8, s9, s8
	s_ashr_i32 s9, s8, 31
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v3, 0x2f800000, v0
	v_trunc_f32_e32 v3, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_fmamk_f32 v0, v3, 0xcf800000, v0
	v_cvt_u32_f32_e32 v5, v3
	v_dual_mov_b32 v4, v2 :: v_dual_mov_b32 v3, v1
	v_cvt_u32_f32_e32 v6, v0
.LBB0_2:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	v_mov_b32_e32 v0, 1
	v_mov_b32_e32 v1, 0
	s_mov_b32 s11, 3
.LBB0_3:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_sub_u32 s0, 0, s6
	s_delay_alu instid0(VALU_DEP_2)
	v_mul_lo_u32 v9, v0, v4
	v_mad_u64_u32 v[7:8], null, v0, v3, 0
	v_mul_hi_u32 v0, s0, v6
	v_mul_lo_u32 v10, s0, v5
	s_subb_u32 s12, 0, s7
	v_mul_lo_u32 v1, v1, v3
	v_mul_lo_u32 v12, s12, v6
	v_mul_lo_u32 v11, s0, v6
	s_add_i32 s11, s11, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	s_cmp_eq_u32 s11, 0
	v_add_nc_u32_e32 v0, v0, v10
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add3_u32 v13, v8, v9, v1
	v_mul_hi_u32 v1, v6, v11
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_add_nc_u32_e32 v0, v0, v12
	v_mul_hi_u32 v8, v5, v11
	v_mul_lo_u32 v9, v5, v11
	v_mul_lo_u32 v10, v6, v0
	v_mul_hi_u32 v11, v6, v0
	v_mul_hi_u32 v12, v5, v0
	v_mul_lo_u32 v0, v5, v0
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v1, vcc_lo, v1, v10
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v1, vcc_lo, v1, v9
	v_add_co_ci_u32_e32 v1, vcc_lo, v10, v8, vcc_lo
	v_add_co_ci_u32_e32 v8, vcc_lo, 0, v12, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v1, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v8, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v6, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, v5, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_hi_u32 v9, s0, v0
	v_mul_lo_u32 v10, s12, v0
	v_mul_lo_u32 v11, s0, v1
	v_mul_lo_u32 v8, s0, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v9, v9, v11
	v_mul_hi_u32 v12, v1, v8
	v_mul_lo_u32 v14, v1, v8
	v_mul_hi_u32 v8, v0, v8
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v9, v9, v10
	v_mul_lo_u32 v10, v0, v9
	v_mul_hi_u32 v11, v0, v9
	v_mul_hi_u32 v15, v1, v9
	v_mul_lo_u32 v9, v1, v9
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v8, vcc_lo, v8, v10
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v8, v14
	v_add_co_ci_u32_e32 v8, vcc_lo, v10, v12, vcc_lo
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v15, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v8, v9
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v10, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v0, v8
	v_add_co_ci_u32_e32 v12, vcc_lo, v1, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_hi_u32 v14, v7, v8
	v_mad_u64_u32 v[0:1], null, v13, v8, 0
	v_mad_u64_u32 v[8:9], null, v7, v12, 0
	v_mad_u64_u32 v[10:11], null, v13, v12, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v8, vcc_lo, v14, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v8, v0
	v_add_co_ci_u32_e32 v0, vcc_lo, v9, v1, vcc_lo
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v0, v10
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_lo_u32 v10, s7, v8
	v_mad_u64_u32 v[0:1], null, s6, v8, 0
	v_mul_lo_u32 v8, s6, v9
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_co_u32 v0, vcc_lo, v7, v0
	v_add3_u32 v1, v1, v8, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v8, v13, v1
	v_subrev_co_ci_u32_e64 v7, s0, s7, v8, vcc_lo
	v_sub_co_ci_u32_e32 v1, vcc_lo, v13, v1, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s6, v0
	v_sub_co_u32 v8, s0, v0, s6
	v_cndmask_b32_e64 v9, 0, -1, vcc_lo
	v_subrev_co_ci_u32_e64 v10, vcc_lo, 0, v7, s0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_4)
	v_cmp_le_u32_e32 vcc_lo, s6, v8
	v_cndmask_b32_e64 v11, 0, -1, vcc_lo
	v_subrev_co_ci_u32_e64 v7, vcc_lo, s7, v7, s0
	v_cmp_le_u32_e64 s0, s7, v10
	v_cmp_le_u32_e32 vcc_lo, s7, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v12, 0, -1, s0
	v_cmp_eq_u32_e64 s0, s7, v10
	v_cndmask_b32_e64 v13, 0, -1, vcc_lo
	v_cmp_eq_u32_e32 vcc_lo, s7, v1
	v_cndmask_b32_e64 v11, v12, v11, s0
	v_sub_co_u32 v12, s0, v8, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_subrev_co_ci_u32_e64 v7, s0, 0, v7, s0
	v_cndmask_b32_e32 v9, v13, v9, vcc_lo
	v_cmp_ne_u32_e32 vcc_lo, 0, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cmp_ne_u32_e64 s0, 0, v9
	v_dual_cndmask_b32 v8, v8, v12 :: v_dual_cndmask_b32 v7, v10, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v0, v0, v8, s0
	v_cndmask_b32_e64 v1, v1, v7, s0
	s_cbranch_scc0 .LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_eq_u64_e64 s[4:5], v[0:1]
	s_cbranch_execz .LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	s_getpc_b64 s[12:13]
	s_add_u32 s12, s12, messagenum@rel32@lo+4
	s_addc_u32 s13, s13, messagenum@rel32@hi+12
	global_load_b64 v[0:1], v2, s[12:13]
	s_waitcnt vmcnt(0)
	global_load_b32 v7, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmp_le_u32_e32 vcc_lo, s1, v7
	s_cbranch_vccnz .LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	s_mov_b32 s12, exec_lo
	s_mov_b32 s11, exec_lo
	v_mbcnt_lo_u32_b32 v7, s12, 0
                                        ; implicit-def: $vgpr8
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_eq_u32_e32 0, v7
	s_cbranch_execz .LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	s_bcnt1_i32_b32 s12, s12
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v8, s12
	global_atomic_add_u32 v8, v[0:1], v8, off glc
.LBB0_8:                                ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s11
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s11, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v1, s11, v7
	v_lshlrev_b64 v[0:1], 3, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_store_b64 v[0:1], v[3:4], off
.LBB0_9:                                ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	v_add_co_u32 v3, vcc_lo, v3, s8
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_le_u64_e32 vcc_lo, s[6:7], v[3:4]
	s_or_b32 s10, vcc_lo, s10
	s_and_not1_b32 exec_lo, exec_lo, s10
	s_cbranch_execnz .LBB0_2
.LBB0_10:                               ; %._crit_edge
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11breakingrsayyPyi
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 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 16
		.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	_Z11breakingrsayyPyi, .Lfunc_end0-_Z11breakingrsayyPyi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1164
; NumSgprs: 18
; NumVgprs: 16
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 16
; Occupancy: 16
; WaveLimiterHint : 1
; 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
	.protected	messagenum.managed      ; @messagenum.managed
	.type	messagenum.managed,@object
	.section	.bss,"aw",@nobits
	.globl	messagenum.managed
	.p2align	2, 0x0
messagenum.managed:
	.long	0                               ; 0x0
	.size	messagenum.managed, 4

	.protected	messagenum              ; @messagenum
	.type	messagenum,@object
	.globl	messagenum
	.p2align	3, 0x0
messagenum:
	.quad	0
	.size	messagenum, 8

	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.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 messagenum.managed
	.addrsig_sym messagenum
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           8
        .value_kind:     by_value
      - .offset:         8
        .size:           8
        .value_kind:     by_value
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         36
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         44
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         46
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         48
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         50
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         52
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         54
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         96
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11breakingrsayyPyi
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11breakingrsayyPyi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     16
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
