#include <iostream>
#include <fstream>
#include <chrono>
#include <sstream>
#include <string>
#include <ctime>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include<algorithm>
#include <vector>
#define d 0.85
#define epsilon 0.00000001
#include <time.h>
using namespace std;
using namespace std::chrono;
time_t debut,fin;
__global__ void mul(float *matrice,float *state,int maxval)
{
    int idx=blockIdx.x * blockDim.x + threadIdx.x;
    int ty = threadIdx.x;
    int tx = blockIdx.x;
    float resultat;
    if (idx < maxval)
    {
        for (int i =0;i<maxval;i++)
        {
            resultat+=state[i]*matrice[maxval*i+ty];
        }
        state[idx]=resultat;
    }
}
int main(){
    const int n = 4;
    // On ouvre le fichier txt pour le parser
    ifstream graph;
    char chemin[500];
    int max_iter;
    cout << "Entrer le chemin entier avec des doubles backslashs"<< endl;
    cin >> chemin;
    cout << "\nCombien d iterations maximale ?";
    cin >> max_iter;
    high_resolution_clock::time_point t1 = high_resolution_clock::now();
    time(&debut);
    graph.open(chemin);
    vector<int> from;
    vector<int> to;
    string word,line;
    // On va parser en fonction du separateur nos from/To
    if (!graph.is_open())
    {
        cout<<"Ouverture impossible";
        return false;
    }
    while (getline(graph,line))
    {   

        string espace;
        std::istringstream text_stream(line);
        text_stream >> word;
        from.push_back(stoi(word));
        getline(text_stream,espace,' ');
        text_stream >> word;
        to.push_back(stoi(word));
    }
    graph.close();
    cout << "Ouverture du fichier texte reussi" << endl;
    // calcul du maximum pour construire la matrice carree
    double maxiFrom = *max_element(from.begin(), from.end());
    double maxiTo = *max_element(to.begin(), to.end());
    int maxval;
    if (maxiFrom < maxiTo){
        maxval = maxiTo+1;
    }
    else
    {
        maxval = maxiFrom+1;
    }
    float* matrice = new float[n*n];
    for (int i = 0;i<maxval*maxval;i++)
    {
        matrice[i]=0;
    }
    int idx_i,idx_j;
    for (int i =0;i<maxval*2 -1;i++)
    {
        idx_i  = from[i];
        idx_j  = to[i];
        matrice[(idx_j)*maxval+idx_i]=1;
    }
    float sum;
    // On normalise la matrice pour tenir compte du nb de pages linkantes
    for (int i = 0;i<maxval;i++)
    {
        sum = 0;
        for (int j =0;j<maxval;j++)
        {
            if (matrice[i*maxval+j]>0)
            {
                sum++;
            }
        }
        if (sum ==0)
        {
            sum = maxval;
            for(int j = 0;j<maxval;j++)
            {
                matrice[i*maxval+j]=1;
            }
        }
        for(int j = 0;j<maxval;j++)
        {
            matrice[i*maxval+j]/=sum;
        }
    }

    // Debut de l algorithme PageRank
    float maxval2 = maxval;
    float state[n];
    float old[n];
    float delta[n];
    //float temp[n];
    float alpha =((1-d)/maxval);
    float* d_matrix;
    float* d_state;

    for (int i = 0;i<maxval;i++)
    {
        state[i] = 1/maxval2;
    }
    for (int i =0;i<maxval*maxval;i++)
    {
        matrice[i]=matrice[i]*d+alpha;
    } 
    cudaMalloc((void**)&d_matrix,n*n*sizeof(float));
    cudaMalloc((void**)&d_state,n*sizeof(float));
    cudaMemcpy(d_matrix,matrice,n*n*sizeof(float),cudaMemcpyHostToDevice);
    cudaMemcpy(d_state,state,n*sizeof(float),cudaMemcpyHostToDevice);
    dim3 dimGrid(1,1);
    dim3 dimBlock(n,n);

    for (int i = 0;i<=max_iter;i++)
    {
        float check = 0;
        for (int j = 0;j<maxval;j++)
        {
            old[j] = state[j];
        }
        mul<<<4,4>>>(d_matrix,d_state,n);
        cudaDeviceSynchronize();
        cudaMemcpy(state,d_state,n*sizeof(float),cudaMemcpyDeviceToHost);
        for (int h = 0;h<maxval;h++)
        {
            delta[h] = state[h] - old[h];
        }
        for (int h = 0;h<maxval;h++)
        {
            check+=delta[h]*delta[h];
        }
        if (check < epsilon)
        {
            cout << "On quitte la boucle apres "<< i<< " iterations.\n";
            break;
        }
    }
    // output
    ofstream out;
    out.open("C:\\Users\\Prugniaud\\projects\\output.txt");
    for(int i =0;i<maxval;i++)
    {
        out << to_string(state[i]); 
        out<< '\n';
    }
    out.close();
    high_resolution_clock::time_point t2 = high_resolution_clock::now();
    duration<double, std::milli> time_span = t2 - t1;
    time(&fin);
    cudaFree(d_matrix);
    cudaFree(d_state);
    cout << "Temps d execution : "<<difftime(fin,debut)<<" secondes"<<endl;
    cout << "Temps d execution : "<<time_span.count()<<" millisecondes"<<endl;
    cout << "Fin du programme, Appuyez sur Entrer pour quitter" << endl;
    getchar();
    return 0;
}

	.file	"tmpxft_00351148_00000000-6_PageRankCuda.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4557:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4557:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB5458:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE5458:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.globl	_Z25__device_stub__Z3mulPfS_iPfS_i
	.type	_Z25__device_stub__Z3mulPfS_iPfS_i, @function
_Z25__device_stub__Z3mulPfS_iPfS_i:
.LFB4579:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L3
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z3mulPfS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L3:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4579:
	.size	_Z25__device_stub__Z3mulPfS_iPfS_i, .-_Z25__device_stub__Z3mulPfS_iPfS_i
	.globl	_Z3mulPfS_i
	.type	_Z3mulPfS_i, @function
_Z3mulPfS_i:
.LFB4580:
	.cfi_startproc
	endbr64
	jmp	_Z25__device_stub__Z3mulPfS_iPfS_i
	.cfi_endproc
.LFE4580:
	.size	_Z3mulPfS_i, .-_Z3mulPfS_i
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z3mulPfS_i"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4582:
	.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	_Z3mulPfS_i(%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
.LFE4582:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB4661:
	.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	.L11
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L11:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4661:
	.size	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.text._ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.weak	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.type	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, @function
_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_:
.LFB4656:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4656
	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
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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), %r13
	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	32(%rsp), %rdx
	cmpq	%rbx, %rdx
	jne	.L15
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	movq	%r14, %rdi
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L15:
	cmpl	$34, 0(%rbp)
	je	.L17
	movl	$2147483648, %ecx
	movl	$4294967295, %esi
	addq	%rax, %rcx
	cmpq	%rcx, %rsi
	jnb	.L18
.L17:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	movq	%r14, %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE0:
.L18:
	testq	%r12, %r12
	je	.L20
	subq	%rbx, %rdx
	movq	%rdx, (%r12)
.L20:
	movq	%r13, %rdi
	movl	%eax, 12(%rsp)
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movl	12(%rsp), %eax
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	jmp	.L28
.L24:
	endbr64
	movq	%rax, %rbx
.L21:
	movq	%r13, %rdi
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L28:
	call	__stack_chk_fail@PLT
.L23:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4656:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table._ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"aG",@progbits,_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
.LLSDA4656:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4656-.LLSDACSB4656
.LLSDACSB4656:
	.uleb128 .LEHB0-.LFB4656
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L24-.LFB4656
	.uleb128 0
	.uleb128 .LEHB1-.LFB4656
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE4656:
	.section	.text._ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.size	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, .-_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.section	.text._ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z,"axG",@progbits,_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z,comdat
	.weak	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z
	.type	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z, @function
_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z:
.LFB4754:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %r10
	movq	%rdx, %rsi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	movq	%rcx, %rdi
	subq	$232, %rsp
	movq	%r8, -176(%rbp)
	movq	%r9, -168(%rbp)
	testb	%al, %al
	je	.L32
	movaps	%xmm0, -160(%rbp)
	movaps	%xmm1, -144(%rbp)
	movaps	%xmm2, -128(%rbp)
	movaps	%xmm3, -112(%rbp)
	movaps	%xmm4, -96(%rbp)
	movaps	%xmm5, -80(%rbp)
	movaps	%xmm6, -64(%rbp)
	movaps	%xmm7, -48(%rbp)
.L32:
	movq	%fs:40, %rax
	movq	%rax, -216(%rbp)
	xorl	%eax, %eax
	leaq	23(%rsi), %rdx
	movq	%rsp, %rcx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L33:
	cmpq	%rcx, %rsp
	je	.L34
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L33
.L34:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L35
	orq	$0, -8(%rsp,%rax)
.L35:
	leaq	16(%rbp), %rax
	leaq	15(%rsp), %r12
	movq	%rdi, %rdx
	movl	$32, -240(%rbp)
	movq	%rax, -232(%rbp)
	andq	$-16, %r12
	leaq	-208(%rbp), %rax
	leaq	-240(%rbp), %rcx
	movl	$48, -236(%rbp)
	movq	%r12, %rdi
	movq	%rax, -224(%rbp)
	call	*%r10
	leaq	16(%rbx), %rdx
	cltq
	movq	%rdx, (%rbx)
	xorl	%edx, %edx
	movq	%rdx, 8(%rbx)
	leaq	(%r12,%rax), %r13
	movq	%rax, -248(%rbp)
	cmpq	$15, %rax
	jbe	.L36
	leaq	-248(%rbp), %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@PLT
	movq	%rax, (%rbx)
	movq	-248(%rbp), %rax
	movq	%rax, 16(%rbx)
.L36:
	movq	(%rbx), %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcS5_S5_@PLT
	movq	-248(%rbp), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rbx)
	movb	$0, (%rdx,%rax)
	movq	-216(%rbp), %rax
	subq	%fs:40, %rax
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leaq	-24(%rbp), %rsp
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4754:
	.size	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z, .-_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEED2Ev
	.type	_ZNSt6vectorIiSaIiEED2Ev, @function
_ZNSt6vectorIiSaIiEED2Ev:
.LFB4947:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L42
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L42:
	ret
	.cfi_endproc
.LFE4947:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .-_ZNSt6vectorIiSaIiEED2Ev
	.weak	_ZNSt6vectorIiSaIiEED1Ev
	.set	_ZNSt6vectorIiSaIiEED1Ev,_ZNSt6vectorIiSaIiEED2Ev
	.section	.text._ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_,"axG",@progbits,_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_,comdat
	.weak	_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_
	.type	_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_, @function
_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_:
.LFB4970:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	leaq	4(%rdi), %rdx
	cmpq	%rsi, %rdi
	je	.L45
.L46:
	cmpq	%rsi, %rdx
	je	.L45
	movl	(%rdx), %ecx
	cmpl	%ecx, (%rax)
	cmovl	%rdx, %rax
	addq	$4, %rdx
	jmp	.L46
.L45:
	ret
	.cfi_endproc
.LFE4970:
	.size	_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_, .-_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_
	.section	.rodata._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_.str1.1,"aMS",@progbits,1
.LC1:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, @function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_:
.LFB5312:
	.cfi_startproc
	endbr64
	movabsq	$2305843009213693951, %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$2, %rbx
	cmpq	%rcx, %rbx
	jne	.L51
	leaq	.LC1(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L51:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	%rsi, %r15
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	movq	%rsi, %rbp
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L61
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L56
	movabsq	$2305843009213693951, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L55
.L61:
	movq	%rcx, %rbx
.L55:
	leaq	0(,%rbx,4), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L56:
	movl	(%rdx), %eax
	movl	%eax, (%r12,%r15)
	testq	%r15, %r15
	jle	.L57
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L57:
	movq	(%rsp), %rax
	leaq	4(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L58
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L58:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L59
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L59:
	leaq	(%r12,%rbx,4), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5312:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.text
	.align 2
	.type	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0, @function
_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0:
.LFB5470:
	.cfi_startproc
	movq	%rsi, %rdx
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.L69
	movl	(%rdx), %eax
	addq	$4, %rsi
	movl	%eax, -4(%rsi)
	movq	%rsi, 8(%rdi)
	ret
.L69:
	jmp	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_endproc
.LFE5470:
	.size	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0, .-_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0
	.section	.rodata.str1.1
.LC3:
	.string	"Entrer le chemin entier avec des doubles backslashs"
.LC4:
	.string	"\nCombien d iterations maximale ?"
.LC5:
	.string	"Ouverture impossible"
.LC6:
	.string	"stoi"
.LC7:
	.string	"Ouverture du fichier texte reussi"
.LC13:
	.string	"On quitte la boucle apres "
.LC14:
	.string	" iterations.\n"
.LC15:
	.string	"C:\\Users\\Prugniaud\\projects\\output.txt"
.LC16:
	.string	"%f"
.LC18:
	.string	"Temps d execution : "
.LC19:
	.string	" secondes"
.LC20:
	.string	" millisecondes"
.LC21:
	.string	"Fin du programme, Appuyez sur Entrer pour quitter"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4539:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4539
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	_ZSt4cout(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1832, %rsp
	.cfi_def_cfa_offset 1888
	movq	%fs:40, %rax
	movq	%rax, 1816(%rsp)
	xorl	%eax, %eax
	leaq	792(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
.LEHB2:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE2:
	leaq	.LC3(%rip), %rsi
	movq	%rbp, %rdi
.LEHB3:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	_ZSt3cin(%rip), %rax
	leaq	_ZSt3cin(%rip), %rbx
	movl	$500, %edx
	leaq	1316(%rsp), %r13
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	-24(%rax), %rax
	movq	16(%rbx,%rax), %r12
	call	_ZSt17__istream_extractRSiPcl@PLT
	movq	_ZSt3cin(%rip), %rax
	movq	-24(%rax), %rdx
	addq	%rbx, %rdx
	cmpl	$0, 32(%rdx)
	jne	.L73
	decq	%r12
	cmpq	$499, %r12
	jbe	.L73
	movq	232(%rdx), %rdi
	call	_ZNSt15basic_streambufIcSt11char_traitsIcEE5sgetcEv@PLT
	incl	%eax
	jne	.L73
	movq	_ZSt3cin(%rip), %rax
	movl	$2, %esi
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	call	_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate@PLT
.L73:
	leaq	.LC4(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	44(%rsp), %rsi
	movq	%rbx, %rdi
	call	_ZNSirsERi@PLT
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	leaq	debut(%rip), %rdi
	movq	%rax, %r12
	call	time@PLT
	movq	16(%rsp), %rdi
	movl	$8, %edx
	movq	%r13, %rsi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
.LEHE3:
	leaq	200(%rsp), %rax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	movq	%rax, 184(%rsp)
	leaq	912(%rsp), %rdi
	leaq	232(%rsp), %rax
	movq	%rdx, 88(%rsp)
	leaq	.LC6(%rip), %r13
	movq	%rdx, 96(%rsp)
	movq	%rdx, 104(%rsp)
	movq	%rdx, 112(%rsp)
	movq	%rdx, 120(%rsp)
	movq	%rdx, 128(%rsp)
	movq	%rcx, 192(%rsp)
	movb	$0, 200(%rsp)
	movq	%rax, 216(%rsp)
	movq	%rsi, 224(%rsp)
	movb	$0, 232(%rsp)
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	leaq	216(%rsp), %rax
	movq	%rax, 24(%rsp)
	jne	.L74
	leaq	.LC5(%rip), %rsi
	movq	%rbp, %rdi
.LEHB4:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.LEHE4:
	jmp	.L75
.L146:
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L145
	leaq	264(%rsp), %rax
	movq	24(%rsp), %rsi
	leaq	280(%rsp), %rbx
	movl	$8, %edx
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	movq	%rbx, %rdi
	movq	%rax, 256(%rsp)
	leaq	248(%rsp), %rax
	movb	$0, 264(%rsp)
	movq	%rax, 8(%rsp)
.LEHB5:
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE5:
	leaq	184(%rsp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
.LEHB6:
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	184(%rsp), %rdx
	movq	__isoc23_strtol@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	movq	%r13, %rsi
	movl	$10, %r8d
	call	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	leaq	76(%rsp), %r14
	leaq	88(%rsp), %rdi
	movl	%eax, 76(%rsp)
	movq	%r14, %rsi
	call	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0
	movq	8(%rsp), %rsi
	movl	$32, %edx
	movq	%rbx, %rdi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	%r15, %rsi
	movq	%rbx, %rdi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	184(%rsp), %rdx
	movq	__isoc23_strtol@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	movq	%r13, %rsi
	movl	$10, %r8d
	call	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	leaq	112(%rsp), %rdi
	movq	%r14, %rsi
	movl	%eax, 76(%rsp)
	call	_ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_.isra.0
.LEHE6:
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L74:
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdi
.LEHB7:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	jmp	.L146
.L145:
	movq	16(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv@PLT
	leaq	.LC7(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	88(%rsp), %r14
	movq	96(%rsp), %rsi
	movq	%r14, %rdi
	call	_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_
	movq	112(%rsp), %r13
	movq	120(%rsp), %rsi
	movl	(%rax), %ebx
	movq	%r13, %rdi
	call	_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_
	movsd	.LC8(%rip), %xmm1
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jge	.L77
	cvtsi2sdl	%eax, %xmm0
	jmp	.L144
.L77:
	cvtsi2sdl	%ebx, %xmm0
.L144:
	addsd	%xmm1, %xmm0
	movl	$64, %edi
	cvttsd2sil	%xmm0, %ebx
	call	_Znam@PLT
	movl	%ebx, %edx
	movq	%rax, %rbp
	xorl	%eax, %eax
	imull	%ebx, %edx
.L79:
	cmpl	%eax, %edx
	jle	.L147
	movl	$0x00000000, 0(%rbp,%rax,4)
	incq	%rax
	jmp	.L79
.L147:
	movss	.LC9(%rip), %xmm0
	leal	-1(%rbx,%rbx), %esi
	xorl	%eax, %eax
.L81:
	cmpl	%eax, %esi
	jle	.L148
	movl	0(%r13,%rax,4), %ecx
	imull	%ebx, %ecx
	addl	(%r14,%rax,4), %ecx
	incq	%rax
	movslq	%ecx, %rcx
	movss	%xmm0, 0(%rbp,%rcx,4)
	jmp	.L81
.L148:
	movslq	%ebx, %rdi
	movss	.LC9(%rip), %xmm3
	movq	%rbp, %rax
	xorl	%esi, %esi
	salq	$2, %rdi
	xorps	%xmm2, %xmm2
.L83:
	cmpl	%esi, %ebx
	jle	.L149
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
.L86:
	movss	(%rax,%rcx,4), %xmm1
	comiss	%xmm2, %xmm1
	jbe	.L84
	addss	%xmm3, %xmm0
.L84:
	incq	%rcx
	cmpl	%ecx, %ebx
	jg	.L86
	ucomiss	%xmm2, %xmm0
	jp	.L87
	jne	.L87
	xorl	%ecx, %ecx
.L89:
	movss	%xmm3, (%rax,%rcx,4)
	incq	%rcx
	cmpl	%ecx, %ebx
	jg	.L89
	cvtsi2ssl	%ebx, %xmm0
.L87:
	movq	%rax, %rcx
	xorl	%r8d, %r8d
.L90:
	movss	(%rcx), %xmm1
	incl	%r8d
	addq	$4, %rcx
	divss	%xmm0, %xmm1
	movss	%xmm1, -4(%rcx)
	cmpl	%r8d, %ebx
	jne	.L90
	incl	%esi
	addq	%rdi, %rax
	jmp	.L83
.L149:
	cvtsi2sdl	%ebx, %xmm1
	movsd	.LC10(%rip), %xmm0
	xorl	%eax, %eax
	cvtsi2ssl	%ebx, %xmm2
	divsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm1
	movss	.LC9(%rip), %xmm0
.L91:
	cmpl	%eax, %ebx
	jle	.L150
	movaps	%xmm0, %xmm3
	divss	%xmm2, %xmm3
	movss	%xmm3, 136(%rsp,%rax,4)
	incq	%rax
	jmp	.L91
.L150:
	movsd	.LC11(%rip), %xmm2
	xorl	%eax, %eax
.L93:
	cmpl	%eax, %edx
	jle	.L151
	cvtss2sd	0(%rbp,%rax,4), %xmm0
	mulsd	%xmm2, %xmm0
	cvtss2sd	%xmm1, %xmm3
	addsd	%xmm3, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 0(%rbp,%rax,4)
	incq	%rax
	jmp	.L93
.L151:
	leaq	48(%rsp), %rdi
	movl	$64, %esi
	call	cudaMalloc@PLT
	leaq	56(%rsp), %rdi
	movl	$16, %esi
	call	cudaMalloc@PLT
	movq	48(%rsp), %rdi
	movl	$1, %ecx
	movl	$64, %edx
	movq	%rbp, %rsi
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	movl	$1, %ecx
	movl	$16, %edx
	leaq	136(%rsp), %rbp
	movq	%rbp, %rsi
	call	cudaMemcpy@PLT
	movabsq	$4294967300, %r14
	xorl	%r13d, %r13d
.L95:
	cmpl	%r13d, 44(%rsp)
	jl	.L106
	xorl	%eax, %eax
.L105:
	cmpl	%eax, %ebx
	jle	.L152
	movss	0(%rbp,%rax,4), %xmm0
	movss	%xmm0, 152(%rsp,%rax,4)
	incq	%rax
	jmp	.L105
.L152:
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r14, %rdx
	movl	$1, %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r14, 76(%rsp)
	movl	$1, 84(%rsp)
	movq	%r14, 64(%rsp)
	movl	$1, 72(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L97
	movq	56(%rsp), %rsi
	movq	48(%rsp), %rdi
	movl	$4, %edx
	call	_Z25__device_stub__Z3mulPfS_iPfS_i
.L97:
	call	cudaDeviceSynchronize@PLT
	movq	56(%rsp), %rsi
	movl	$2, %ecx
	movl	$16, %edx
	movq	%rbp, %rdi
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
	leaq	152(%rsp), %rdx
.L98:
	cmpl	%eax, %ebx
	jle	.L153
	movss	0(%rbp,%rax,4), %xmm0
	subss	(%rdx,%rax,4), %xmm0
	movss	%xmm0, 168(%rsp,%rax,4)
	incq	%rax
	jmp	.L98
.L153:
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.L100:
	cmpl	%eax, %ebx
	jle	.L154
	movss	168(%rsp,%rax,4), %xmm1
	incq	%rax
	mulss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	jmp	.L100
.L154:
	movsd	.LC12(%rip), %xmm1
	cvtss2sd	%xmm0, %xmm0
	comisd	%xmm0, %xmm1
	jbe	.L139
	leaq	.LC13(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%r13d, %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC14(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L106:
	leaq	280(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE7:
	jmp	.L155
.L139:
	incl	%r13d
	jmp	.L95
.L155:
	movq	8(%rsp), %rdi
	movl	$16, %edx
	leaq	.LC15(%rip), %rsi
.LEHB8:
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	xorl	%r13d, %r13d
	leaq	.LC16(%rip), %r15
.L107:
	cmpl	%r13d, %ebx
	jle	.L156
	leaq	248(%rsp), %r14
	movq	%r15, %rcx
	movl	$58, %edx
	movb	$1, %al
	movq	vsnprintf@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	cvtss2sd	0(%rbp,%r13,4), %xmm0
	call	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z
.LEHE8:
	movq	256(%rsp), %rdx
	movq	248(%rsp), %rsi
	movq	8(%rsp), %rdi
.LEHB9:
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
.LEHE9:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	280(%rsp), %rax
	movb	$10, 76(%rsp)
	movq	-24(%rax), %rax
	cmpq	$0, 296(%rsp,%rax)
	je	.L108
	movq	8(%rsp), %rdi
	leaq	76(%rsp), %rsi
	movl	$1, %edx
.LEHB10:
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
	jmp	.L109
.L108:
	movq	8(%rsp), %rdi
	movl	$10, %esi
	call	_ZNSo3putEc@PLT
.L109:
	incq	%r13
	jmp	.L107
.L156:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv@PLT
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	leaq	fin(%rip), %rdi
	subq	%r12, %rax
	cvtsi2sdq	%rax, %xmm0
	divsd	.LC17(%rip), %xmm0
	movq	%xmm0, %r13
	call	time@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	leaq	.LC18(%rip), %r12
	leaq	_ZSt4cout(%rip), %rbx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	fin(%rip), %rdi
	movq	debut(%rip), %rsi
	movq	%rax, %rbp
	call	difftime@PLT
	movq	%rbp, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC19(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%r13, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC20(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC21(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	call	getchar@PLT
.LEHE10:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
.L75:
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	184(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	112(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	leaq	88(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	16(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1816(%rsp), %rax
	subq	%fs:40, %rax
	je	.L118
	jmp	.L142
.L127:
	endbr64
	movq	%rax, %rbp
.L111:
	movq	%rbx, %rdi
	movq	%rbp, %rbx
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L112
.L126:
	endbr64
	movq	%rax, %rbx
.L112:
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L113
.L129:
	endbr64
	movq	%rax, %rbx
.L114:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L115
.L128:
	endbr64
	movq	%rax, %rbx
.L115:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L113
.L125:
	endbr64
	movq	%rax, %rbx
.L113:
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	184(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	112(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	leaq	88(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	jmp	.L116
.L124:
	endbr64
	movq	%rax, %rbx
.L116:
	movq	16(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1816(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L142
	movq	%rbx, %rdi
.LEHB11:
	call	_Unwind_Resume@PLT
.LEHE11:
.L142:
	call	__stack_chk_fail@PLT
.L118:
	addq	$1832, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.LFE4539:
	.section	.gcc_except_table,"a",@progbits
.LLSDA4539:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4539-.LLSDACSB4539
.LLSDACSB4539:
	.uleb128 .LEHB2-.LFB4539
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB3-.LFB4539
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L124-.LFB4539
	.uleb128 0
	.uleb128 .LEHB4-.LFB4539
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L125-.LFB4539
	.uleb128 0
	.uleb128 .LEHB5-.LFB4539
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L126-.LFB4539
	.uleb128 0
	.uleb128 .LEHB6-.LFB4539
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L127-.LFB4539
	.uleb128 0
	.uleb128 .LEHB7-.LFB4539
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L125-.LFB4539
	.uleb128 0
	.uleb128 .LEHB8-.LFB4539
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L128-.LFB4539
	.uleb128 0
	.uleb128 .LEHB9-.LFB4539
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L129-.LFB4539
	.uleb128 0
	.uleb128 .LEHB10-.LFB4539
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L128-.LFB4539
	.uleb128 0
	.uleb128 .LEHB11-.LFB4539
	.uleb128 .LEHE11-.LEHB11
	.uleb128 0
	.uleb128 0
.LLSDACSE4539:
	.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
	.globl	fin
	.bss
	.align 8
	.type	fin, @object
	.size	fin, 8
fin:
	.zero	8
	.globl	debut
	.align 8
	.type	debut, @object
	.size	debut, 8
debut:
	.zero	8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC8:
	.long	0
	.long	1072693248
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC9:
	.long	1065353216
	.section	.rodata.cst8
	.align 8
.LC10:
	.long	858993460
	.long	1069757235
	.align 8
.LC11:
	.long	858993459
	.long	1072378675
	.align 8
.LC12:
	.long	-500134854
	.long	1044740494
	.align 8
.LC17:
	.long	0
	.long	1093567616
	.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 <fstream>
#include <chrono>
#include <sstream>
#include <string>
#include <ctime>
#include "hip/hip_runtime.h"

#include<algorithm>
#include <vector>
#define d 0.85
#define epsilon 0.00000001
#include <time.h>
using namespace std;
using namespace std::chrono;
time_t debut,fin;
__global__ void mul(float *matrice,float *state,int maxval)
{
    int idx=blockIdx.x * blockDim.x + threadIdx.x;
    int ty = threadIdx.x;
    int tx = blockIdx.x;
    float resultat;
    if (idx < maxval)
    {
        for (int i =0;i<maxval;i++)
        {
            resultat+=state[i]*matrice[maxval*i+ty];
        }
        state[idx]=resultat;
    }
}
int main(){
    const int n = 4;
    // On ouvre le fichier txt pour le parser
    ifstream graph;
    char chemin[500];
    int max_iter;
    cout << "Entrer le chemin entier avec des doubles backslashs"<< endl;
    cin >> chemin;
    cout << "\nCombien d iterations maximale ?";
    cin >> max_iter;
    high_resolution_clock::time_point t1 = high_resolution_clock::now();
    time(&debut);
    graph.open(chemin);
    vector<int> from;
    vector<int> to;
    string word,line;
    // On va parser en fonction du separateur nos from/To
    if (!graph.is_open())
    {
        cout<<"Ouverture impossible";
        return false;
    }
    while (getline(graph,line))
    {   

        string espace;
        std::istringstream text_stream(line);
        text_stream >> word;
        from.push_back(stoi(word));
        getline(text_stream,espace,' ');
        text_stream >> word;
        to.push_back(stoi(word));
    }
    graph.close();
    cout << "Ouverture du fichier texte reussi" << endl;
    // calcul du maximum pour construire la matrice carree
    double maxiFrom = *max_element(from.begin(), from.end());
    double maxiTo = *max_element(to.begin(), to.end());
    int maxval;
    if (maxiFrom < maxiTo){
        maxval = maxiTo+1;
    }
    else
    {
        maxval = maxiFrom+1;
    }
    float* matrice = new float[n*n];
    for (int i = 0;i<maxval*maxval;i++)
    {
        matrice[i]=0;
    }
    int idx_i,idx_j;
    for (int i =0;i<maxval*2 -1;i++)
    {
        idx_i  = from[i];
        idx_j  = to[i];
        matrice[(idx_j)*maxval+idx_i]=1;
    }
    float sum;
    // On normalise la matrice pour tenir compte du nb de pages linkantes
    for (int i = 0;i<maxval;i++)
    {
        sum = 0;
        for (int j =0;j<maxval;j++)
        {
            if (matrice[i*maxval+j]>0)
            {
                sum++;
            }
        }
        if (sum ==0)
        {
            sum = maxval;
            for(int j = 0;j<maxval;j++)
            {
                matrice[i*maxval+j]=1;
            }
        }
        for(int j = 0;j<maxval;j++)
        {
            matrice[i*maxval+j]/=sum;
        }
    }

    // Debut de l algorithme PageRank
    float maxval2 = maxval;
    float state[n];
    float old[n];
    float delta[n];
    //float temp[n];
    float alpha =((1-d)/maxval);
    float* d_matrix;
    float* d_state;

    for (int i = 0;i<maxval;i++)
    {
        state[i] = 1/maxval2;
    }
    for (int i =0;i<maxval*maxval;i++)
    {
        matrice[i]=matrice[i]*d+alpha;
    } 
    hipMalloc((void**)&d_matrix,n*n*sizeof(float));
    hipMalloc((void**)&d_state,n*sizeof(float));
    hipMemcpy(d_matrix,matrice,n*n*sizeof(float),hipMemcpyHostToDevice);
    hipMemcpy(d_state,state,n*sizeof(float),hipMemcpyHostToDevice);
    dim3 dimGrid(1,1);
    dim3 dimBlock(n,n);

    for (int i = 0;i<=max_iter;i++)
    {
        float check = 0;
        for (int j = 0;j<maxval;j++)
        {
            old[j] = state[j];
        }
        mul<<<4,4>>>(d_matrix,d_state,n);
        hipDeviceSynchronize();
        hipMemcpy(state,d_state,n*sizeof(float),hipMemcpyDeviceToHost);
        for (int h = 0;h<maxval;h++)
        {
            delta[h] = state[h] - old[h];
        }
        for (int h = 0;h<maxval;h++)
        {
            check+=delta[h]*delta[h];
        }
        if (check < epsilon)
        {
            cout << "On quitte la boucle apres "<< i<< " iterations.\n";
            break;
        }
    }
    // output
    ofstream out;
    out.open("C:\\Users\\Prugniaud\\projects\\output.txt");
    for(int i =0;i<maxval;i++)
    {
        out << to_string(state[i]); 
        out<< '\n';
    }
    out.close();
    high_resolution_clock::time_point t2 = high_resolution_clock::now();
    duration<double, std::milli> time_span = t2 - t1;
    time(&fin);
    hipFree(d_matrix);
    hipFree(d_state);
    cout << "Temps d execution : "<<difftime(fin,debut)<<" secondes"<<endl;
    cout << "Temps d execution : "<<time_span.count()<<" millisecondes"<<endl;
    cout << "Fin du programme, Appuyez sur Entrer pour quitter" << endl;
    getchar();
    return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_Z18__device_stub__mulPfS_i     # -- Begin function _Z18__device_stub__mulPfS_i
	.type	_Z18__device_stub__mulPfS_i,@function
_Z18__device_stub__mulPfS_i:            # @_Z18__device_stub__mulPfS_i
	.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), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z3mulPfS_i, %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	_Z18__device_stub__mulPfS_i, .Lfunc_end0-_Z18__device_stub__mulPfS_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI1_0:
	.quad	0x3ff0000000000000              # double 1
.LCPI1_2:
	.quad	0x3fc3333333333334              # double 0.15000000000000002
.LCPI1_3:
	.quad	0x3feb333333333333              # double 0.84999999999999998
.LCPI1_4:
	.quad	0x3e45798ee2308c3a              # double 1.0E-8
.LCPI1_5:
	.quad	0x412e848000000000              # double 1.0E+6
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI1_1:
	.long	0x3f800000                      # float 1
	.text
	.globl	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	$1816, %rsp                     # imm = 0x718
	.cfi_def_cfa_offset 1872
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	leaq	792(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev
.Ltmp0:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$51, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp1:
# %bb.1:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %rbx
.Ltmp2:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp3:
# %bb.2:                                # %.noexc246
.Ltmp4:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp5:
# %bb.3:                                # %.noexc247
.Ltmp6:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp7:
# %bb.4:                                # %_ZNSolsEPFRSoS_E.exit
	movq	_ZSt3cin(%rip), %rax
	movq	-24(%rax), %rax
	movq	_ZSt3cin+16(%rax), %rbx
.Ltmp8:
	leaq	1312(%rsp), %rsi
	movl	$_ZSt3cin, %edi
	movl	$500, %edx                      # imm = 0x1F4
	callq	_ZSt17__istream_extractRSiPcl
.Ltmp9:
# %bb.5:                                # %.noexc155
	movq	_ZSt3cin(%rip), %rax
	movq	-24(%rax), %rax
	cmpl	$0, _ZSt3cin+32(%rax)
	jne	.LBB1_8
# %bb.6:                                # %.noexc155
	addq	$-501, %rbx                     # imm = 0xFE0B
	cmpq	$-501, %rbx                     # imm = 0xFE0B
	ja	.LBB1_8
# %bb.7:
	movq	_ZSt3cin+232(%rax), %rdi
	movq	16(%rdi), %rax
	cmpq	24(%rdi), %rax
	jae	.LBB1_140
.LBB1_8:                                # %_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_.exit
.Ltmp14:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.1, %esi
	movl	$32, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp15:
# %bb.9:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit160
.Ltmp16:
	leaq	12(%rsp), %rsi
	movl	$_ZSt3cin, %edi
	callq	_ZNSirsERi
.Ltmp17:
# %bb.10:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %rbx
	movl	$debut, %edi
	callq	time
.Ltmp19:
	leaq	792(%rsp), %rbp
	leaq	1312(%rsp), %rsi
	movq	%rbp, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
.Ltmp20:
# %bb.11:
	xorpd	%xmm0, %xmm0
	movapd	%xmm0, 192(%rsp)
	xorl	%eax, %eax
	movq	%rax, 208(%rsp)
	movq	%rax, 176(%rsp)
	movapd	%xmm0, 160(%rsp)
	leaq	104(%rsp), %r15
	movq	%r15, -16(%r15)
	movq	%rax, -8(%r15)
	movb	%al, (%r15)
	leaq	144(%rsp), %r12
	movq	%r12, -16(%r12)
	movq	%rax, -8(%r12)
	movb	%al, (%r12)
	leaq	912(%rsp), %rdi
	callq	_ZNKSt12__basic_fileIcE7is_openEv
	testb	%al, %al
	je	.LBB1_38
# %bb.12:                               # %.preheader288
	movq	%rbx, 248(%rsp)                 # 8-byte Spill
	leaq	72(%rsp), %r14
	leaq	128(%rsp), %r13
	leaq	280(%rsp), %r12
.LBB1_13:                               # =>This Inner Loop Header: Depth=1
	movq	792(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%rbp, %rdi
.Ltmp24:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp25:
# %bb.14:                               # %.noexc163
                                        #   in Loop: Header=BB1_13 Depth=1
.Ltmp26:
	movsbl	%al, %edx
	movq	%rbp, %rdi
	movq	%r13, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp27:
# %bb.15:                               #   in Loop: Header=BB1_13 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB1_39
# %bb.16:                               #   in Loop: Header=BB1_13 Depth=1
	movq	%r14, 56(%rsp)
	movq	$0, 64(%rsp)
	movb	$0, 72(%rsp)
.Ltmp124:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp125:
# %bb.17:                               #   in Loop: Header=BB1_13 Depth=1
.Ltmp127:
	movq	%r12, %rdi
	movq	%rbp, %rbx
	leaq	88(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp128:
# %bb.18:                               #   in Loop: Header=BB1_13 Depth=1
	movq	88(%rsp), %r15
	callq	__errno_location
	movq	%rax, %r14
	movl	(%rax), %ebp
	movl	$0, (%rax)
	movq	%r15, %rdi
	leaq	32(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r15, 32(%rsp)
	je	.LBB1_147
# %bb.19:                               #   in Loop: Header=BB1_13 Depth=1
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB1_149
# %bb.20:                               #   in Loop: Header=BB1_13 Depth=1
	movl	(%r14), %ecx
	cmpl	$34, %ecx
	je	.LBB1_149
# %bb.21:                               #   in Loop: Header=BB1_13 Depth=1
	testl	%ecx, %ecx
	jne	.LBB1_23
# %bb.22:                               #   in Loop: Header=BB1_13 Depth=1
	movl	%ebp, (%r14)
.LBB1_23:                               #   in Loop: Header=BB1_13 Depth=1
	movl	%eax, 224(%rsp)
	movq	200(%rsp), %rsi
	cmpq	208(%rsp), %rsi
	je	.LBB1_25
# %bb.24:                               #   in Loop: Header=BB1_13 Depth=1
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 200(%rsp)
	jmp	.LBB1_26
.LBB1_25:                               #   in Loop: Header=BB1_13 Depth=1
.Ltmp129:
	leaq	192(%rsp), %rdi
	leaq	224(%rsp), %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp130:
.LBB1_26:                               # %_ZNSt6vectorIiSaIiEE9push_backEOi.exit
                                        #   in Loop: Header=BB1_13 Depth=1
.Ltmp132:
	movq	%r12, %rdi
	leaq	56(%rsp), %rsi
	movl	$32, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp133:
# %bb.27:                               #   in Loop: Header=BB1_13 Depth=1
.Ltmp134:
	movq	%r12, %rdi
	leaq	88(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp135:
# %bb.28:                               #   in Loop: Header=BB1_13 Depth=1
	movq	88(%rsp), %r15
	movl	(%r14), %ebp
	movl	$0, (%r14)
	movq	%r15, %rdi
	leaq	32(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r15, 32(%rsp)
	je	.LBB1_143
# %bb.29:                               #   in Loop: Header=BB1_13 Depth=1
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB1_145
# %bb.30:                               #   in Loop: Header=BB1_13 Depth=1
	movl	(%r14), %ecx
	cmpl	$34, %ecx
	je	.LBB1_145
# %bb.31:                               #   in Loop: Header=BB1_13 Depth=1
	testl	%ecx, %ecx
	jne	.LBB1_33
# %bb.32:                               #   in Loop: Header=BB1_13 Depth=1
	movl	%ebp, (%r14)
.LBB1_33:                               #   in Loop: Header=BB1_13 Depth=1
	movl	%eax, 224(%rsp)
	movq	168(%rsp), %rsi
	cmpq	176(%rsp), %rsi
	je	.LBB1_35
# %bb.34:                               #   in Loop: Header=BB1_13 Depth=1
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 168(%rsp)
	leaq	72(%rsp), %r14
	movq	%rbx, %rbp
	jmp	.LBB1_36
.LBB1_35:                               #   in Loop: Header=BB1_13 Depth=1
.Ltmp137:
	leaq	160(%rsp), %rdi
	leaq	224(%rsp), %rdx
	leaq	72(%rsp), %r14
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp138:
	movq	%rbx, %rbp
.LBB1_36:                               # %_ZNSt6vectorIiSaIiEE9push_backEOi.exit174
                                        #   in Loop: Header=BB1_13 Depth=1
	movl	$_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, %esi
	movq	%r12, %rdi
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	400(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	movq	56(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB1_13
# %bb.37:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB1_13 Depth=1
	callq	_ZdlPv
	jmp	.LBB1_13
.LBB1_38:
.Ltmp22:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$20, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp23:
	jmp	.LBB1_131
.LBB1_39:
.Ltmp29:
	leaq	792(%rsp), %rdi
	leaq	104(%rsp), %r15
	leaq	144(%rsp), %r12
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv
.Ltmp30:
# %bb.40:
.Ltmp31:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$33, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp32:
# %bb.41:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit179
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %rbx
.Ltmp33:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp34:
# %bb.42:                               # %.noexc249
.Ltmp35:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp36:
# %bb.43:                               # %.noexc250
.Ltmp37:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp38:
# %bb.44:                               # %_ZNSolsEPFRSoS_E.exit181
	movq	192(%rsp), %r12
	movq	200(%rsp), %rcx
	movq	%r12, %rax
	cmpq	%rcx, %r12
	je	.LBB1_48
# %bb.45:                               # %_ZNSolsEPFRSoS_E.exit181
	leaq	4(%r12), %rdx
	movq	%r12, %rax
	cmpq	%rcx, %rdx
	je	.LBB1_48
# %bb.46:                               # %.lr.ph.preheader.i.i
	movl	(%r12), %esi
	movq	%r12, %rax
.LBB1_47:                               # %.lr.ph.i.i
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rdx), %edi
	cmpl	%edi, %esi
	cmovlel	%edi, %esi
	cmovlq	%rdx, %rax
	addq	$4, %rdx
	cmpq	%rcx, %rdx
	jne	.LBB1_47
.LBB1_48:                               # %_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_.exit
	movq	160(%rsp), %r13
	movq	168(%rsp), %rcx
	movq	%r13, %rdx
	cmpq	%rcx, %r13
	je	.LBB1_52
# %bb.49:                               # %_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_.exit
	leaq	4(%r13), %rsi
	movq	%r13, %rdx
	cmpq	%rcx, %rsi
	je	.LBB1_52
# %bb.50:                               # %.lr.ph.preheader.i.i186
	movl	(%r13), %edi
	movq	%r13, %rdx
.LBB1_51:                               # %.lr.ph.i.i188
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rsi), %r8d
	cmpl	%r8d, %edi
	cmovlel	%r8d, %edi
	cmovlq	%rsi, %rdx
	addq	$4, %rsi
	cmpq	%rcx, %rsi
	jne	.LBB1_51
.LBB1_52:                               # %_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_.exit193
	cvtsi2sdl	(%rax), %xmm0
	movsd	%xmm0, 240(%rsp)                # 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%rdx), %xmm0
	movsd	%xmm0, 16(%rsp)                 # 8-byte Spill
.Ltmp40:
	movl	$64, %edi
	callq	_Znam
.Ltmp41:
# %bb.53:                               # %.preheader287
	movq	%rax, %r14
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	maxsd	240(%rsp), %xmm0                # 8-byte Folded Reload
	addsd	.LCPI1_0(%rip), %xmm0
	cvttsd2si	%xmm0, %ebp
	movl	%ebp, %ebx
	imull	%ebx, %ebx
	testl	%ebp, %ebp
	je	.LBB1_71
# %bb.54:                               # %.preheader286
	cmpl	$1, %ebx
	movl	%ebx, %edx
	adcl	$0, %edx
	shlq	$2, %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	testl	%ebp, %ebp
	setg	%r15b
	jle	.LBB1_71
# %bb.55:                               # %.lr.ph331.preheader
	leal	-1(,%rbp,2), %ecx
	cmpl	$2, %ecx
	movl	$1, %eax
	cmovgel	%ecx, %eax
	xorl	%ecx, %ecx
	movslq	%ebp, %rdx
.LBB1_56:                               # %.lr.ph331
                                        # =>This Inner Loop Header: Depth=1
	movslq	(%r12,%rcx,4), %rsi
	movslq	(%r13,%rcx,4), %rdi
	imulq	%rdx, %rdi
	addq	%rsi, %rdi
	movl	$1065353216, (%r14,%rdi,4)      # imm = 0x3F800000
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB1_56
# %bb.57:                               # %.preheader285
	testl	%ebp, %ebp
	jle	.LBB1_71
# %bb.58:                               # %.preheader284.lr.ph
	cvtsi2ss	%ebp, %xmm1
	movl	%ebp, %eax
	xorl	%ecx, %ecx
	movss	.LCPI1_1(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	xorps	%xmm2, %xmm2
	xorl	%edx, %edx
.LBB1_59:                               # %.lr.ph334
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_60 Depth 2
                                        #     Child Loop BB1_63 Depth 2
                                        #     Child Loop BB1_66 Depth 2
	movl	%ecx, %esi
	leaq	(%r14,%rsi,4), %rsi
	xorl	%edi, %edi
	xorps	%xmm3, %xmm3
.LBB1_60:                               #   Parent Loop BB1_59 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movaps	%xmm3, %xmm4
	addss	%xmm0, %xmm4
	xorps	%xmm5, %xmm5
	cmpltss	(%rsi,%rdi,4), %xmm5
	andps	%xmm5, %xmm4
	andnps	%xmm3, %xmm5
	orps	%xmm4, %xmm5
	movaps	%xmm5, %xmm3
	incq	%rdi
	cmpq	%rdi, %rax
	jne	.LBB1_60
# %bb.61:                               # %._crit_edge
                                        #   in Loop: Header=BB1_59 Depth=1
	ucomiss	%xmm2, %xmm3
	jne	.LBB1_65
	jp	.LBB1_65
# %bb.62:                               # %.lr.ph338
                                        #   in Loop: Header=BB1_59 Depth=1
	xorl	%edi, %edi
.LBB1_63:                               #   Parent Loop BB1_59 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$1065353216, (%rsi,%rdi,4)      # imm = 0x3F800000
	incq	%rdi
	cmpq	%rdi, %rax
	jne	.LBB1_63
# %bb.64:                               #   in Loop: Header=BB1_59 Depth=1
	movaps	%xmm1, %xmm3
.LBB1_65:                               # %.lr.ph341
                                        #   in Loop: Header=BB1_59 Depth=1
	xorl	%edi, %edi
.LBB1_66:                               #   Parent Loop BB1_59 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%rdi,4), %xmm4            # xmm4 = mem[0],zero,zero,zero
	divss	%xmm3, %xmm4
	movss	%xmm4, (%rsi,%rdi,4)
	incq	%rdi
	cmpq	%rdi, %rax
	jne	.LBB1_66
# %bb.67:                               # %._crit_edge342
                                        #   in Loop: Header=BB1_59 Depth=1
	incq	%rdx
	addl	%ebp, %ecx
	cmpq	%rax, %rdx
	jne	.LBB1_59
# %bb.68:                               # %._crit_edge345
	testl	%ebp, %ebp
	jle	.LBB1_71
# %bb.69:                               # %.lr.ph348
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ebp, %xmm1
	divss	%xmm1, %xmm0
	xorl	%ecx, %ecx
.LBB1_70:                               # =>This Inner Loop Header: Depth=1
	movss	%xmm0, 32(%rsp,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB1_70
	jmp	.LBB1_72
.LBB1_71:                               # %._crit_edge345.thread
	xorl	%r15d, %r15d
.LBB1_72:                               # %.preheader282
	testl	%ebp, %ebp
	je	.LBB1_75
# %bb.73:                               # %.lr.ph350
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ebp, %xmm0
	movsd	.LCPI1_2(%rip), %xmm1           # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	cmpl	$1, %ebx
	adcl	$0, %ebx
	xorl	%eax, %eax
	movsd	.LCPI1_3(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB1_74:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm2, %xmm2
	cvtss2sd	(%r14,%rax,4), %xmm2
	mulsd	%xmm1, %xmm2
	addsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	movss	%xmm2, (%r14,%rax,4)
	incq	%rax
	cmpq	%rax, %rbx
	jne	.LBB1_74
.LBB1_75:                               # %._crit_edge351
.Ltmp43:
	movq	%rbp, 16(%rsp)                  # 8-byte Spill
	leaq	120(%rsp), %rdi
	movl	$64, %esi
	callq	hipMalloc
.Ltmp44:
# %bb.76:
.Ltmp45:
	leaq	24(%rsp), %rdi
	movl	$16, %esi
	callq	hipMalloc
.Ltmp46:
# %bb.77:
	movq	120(%rsp), %rdi
.Ltmp47:
	movl	$64, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp48:
# %bb.78:
	movq	24(%rsp), %rdi
.Ltmp49:
	leaq	32(%rsp), %rsi
	movl	$16, %edx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp50:
# %bb.79:                               # %.preheader281
	cmpl	$0, 12(%rsp)
	js	.LBB1_99
# %bb.80:                               # %.preheader280.lr.ph
	movl	16(%rsp), %ebp                  # 4-byte Reload
	leaq	(,%rbp,4), %r14
	xorl	%ebx, %ebx
	leaq	32(%rsp), %r12
	movabsq	$4294967300, %r13               # imm = 0x100000004
.LBB1_81:                               # %.preheader280
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_90 Depth 2
                                        #     Child Loop BB1_93 Depth 2
	testb	%r15b, %r15b
	je	.LBB1_83
# %bb.82:                               # %.lr.ph353.preheader
                                        #   in Loop: Header=BB1_81 Depth=1
	leaq	224(%rsp), %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB1_83:                               # %._crit_edge354
                                        #   in Loop: Header=BB1_81 Depth=1
.Ltmp52:
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp53:
# %bb.84:                               #   in Loop: Header=BB1_81 Depth=1
	testl	%eax, %eax
	jne	.LBB1_86
# %bb.85:                               #   in Loop: Header=BB1_81 Depth=1
	movq	120(%rsp), %rdi
	movq	24(%rsp), %rsi
.Ltmp54:
	movl	$4, %edx
	callq	_Z18__device_stub__mulPfS_i
.Ltmp55:
.LBB1_86:                               #   in Loop: Header=BB1_81 Depth=1
.Ltmp56:
	callq	hipDeviceSynchronize
.Ltmp57:
# %bb.87:                               #   in Loop: Header=BB1_81 Depth=1
	movq	24(%rsp), %rsi
.Ltmp58:
	movl	$16, %edx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp59:
# %bb.88:                               # %.preheader279
                                        #   in Loop: Header=BB1_81 Depth=1
	xorpd	%xmm0, %xmm0
	testb	%r15b, %r15b
	je	.LBB1_94
# %bb.89:                               # %.lr.ph356.preheader
                                        #   in Loop: Header=BB1_81 Depth=1
	xorl	%eax, %eax
.LBB1_90:                               # %.lr.ph356
                                        #   Parent Loop BB1_81 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	32(%rsp,%rax,4), %xmm1          # xmm1 = mem[0],zero,zero,zero
	subss	224(%rsp,%rax,4), %xmm1
	movss	%xmm1, 256(%rsp,%rax,4)
	incq	%rax
	cmpq	%rax, %rbp
	jne	.LBB1_90
# %bb.91:                               # %.preheader278
                                        #   in Loop: Header=BB1_81 Depth=1
	testb	%r15b, %r15b
	je	.LBB1_94
# %bb.92:                               # %.lr.ph359.preheader
                                        #   in Loop: Header=BB1_81 Depth=1
	xorpd	%xmm0, %xmm0
	xorl	%eax, %eax
.LBB1_93:                               # %.lr.ph359
                                        #   Parent Loop BB1_81 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	256(%rsp,%rax,4), %xmm1         # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	incq	%rax
	cmpq	%rax, %rbp
	jne	.LBB1_93
.LBB1_94:                               # %._crit_edge360
                                        #   in Loop: Header=BB1_81 Depth=1
	cvtss2sd	%xmm0, %xmm0
	movsd	.LCPI1_4(%rip), %xmm1           # xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	ja	.LBB1_96
# %bb.95:                               # %.critedge
                                        #   in Loop: Header=BB1_81 Depth=1
	leal	1(%rbx), %eax
	cmpl	12(%rsp), %ebx
	movl	%eax, %ebx
	jl	.LBB1_81
	jmp	.LBB1_99
.LBB1_96:
.Ltmp61:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp62:
# %bb.97:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit195
.Ltmp63:
	movl	$_ZSt4cout, %edi
	movl	%ebx, %esi
	callq	_ZNSolsEi
.Ltmp64:
# %bb.98:
.Ltmp65:
	movl	$.L.str.5, %esi
	movl	$13, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp66:
.LBB1_99:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit197
.Ltmp68:
	leaq	280(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev
.Ltmp69:
# %bb.100:
.Ltmp71:
	leaq	280(%rsp), %rdi
	movl	$.L.str.6, %esi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
.Ltmp72:
	leaq	72(%rsp), %r13
	movq	16(%rsp), %rax                  # 8-byte Reload
# %bb.101:                              # %.preheader
	testb	%r15b, %r15b
	je	.LBB1_111
# %bb.102:                              # %.lr.ph365
	movl	%eax, %r15d
	xorl	%r12d, %r12d
	leaq	56(%rsp), %rbx
	leaq	280(%rsp), %r14
.LBB1_103:                              # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	32(%rsp,%r12,4), %xmm0
.Ltmp73:
	movl	$vsnprintf, %esi
	movl	$58, %edx
	movl	$.L.str.12, %ecx
	movq	%rbx, %rdi
	movb	$1, %al
	callq	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z
.Ltmp74:
# %bb.104:                              # %_ZNSt7__cxx119to_stringEf.exit
                                        #   in Loop: Header=BB1_103 Depth=1
	movq	56(%rsp), %rsi
	movq	64(%rsp), %rdx
.Ltmp76:
	movq	%r14, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp77:
# %bb.105:                              # %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
                                        #   in Loop: Header=BB1_103 Depth=1
	movq	56(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB1_107
# %bb.106:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i200
                                        #   in Loop: Header=BB1_103 Depth=1
	callq	_ZdlPv
.LBB1_107:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit202
                                        #   in Loop: Header=BB1_103 Depth=1
	movb	$10, 56(%rsp)
	movq	280(%rsp), %rax
	movq	-24(%rax), %rax
	cmpq	$0, 296(%rsp,%rax)
	je	.LBB1_109
# %bb.108:                              #   in Loop: Header=BB1_103 Depth=1
.Ltmp79:
	movl	$1, %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp80:
	jmp	.LBB1_110
.LBB1_109:                              #   in Loop: Header=BB1_103 Depth=1
.Ltmp81:
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.Ltmp82:
.LBB1_110:                              #   in Loop: Header=BB1_103 Depth=1
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB1_103
.LBB1_111:                              # %._crit_edge366
.Ltmp84:
	leaq	280(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv
.Ltmp85:
# %bb.112:
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %rbx
	movl	$fin, %edi
	callq	time
	movq	120(%rsp), %rdi
.Ltmp87:
	leaq	104(%rsp), %r15
	leaq	144(%rsp), %r12
	callq	hipFree
.Ltmp88:
# %bb.113:
	movq	24(%rsp), %rdi
.Ltmp89:
	callq	hipFree
.Ltmp90:
# %bb.114:
.Ltmp91:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.7, %esi
	movl	$20, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp92:
# %bb.115:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit210
	movq	fin(%rip), %rdi
	movq	debut(%rip), %rsi
	callq	difftime
.Ltmp93:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp94:
# %bb.116:                              # %_ZNSolsEd.exit
.Ltmp95:
	movq	%rax, %r14
	movl	$.L.str.8, %esi
	movl	$9, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp96:
# %bb.117:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit213
	movq	(%r14), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp97:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp98:
# %bb.118:                              # %.noexc253
.Ltmp99:
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp100:
# %bb.119:                              # %.noexc254
.Ltmp101:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp102:
# %bb.120:                              # %_ZNSolsEPFRSoS_E.exit215
.Ltmp103:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.7, %esi
	movl	$20, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp104:
# %bb.121:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit217
.Ltmp105:
	subq	248(%rsp), %rbx                 # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rbx, %xmm0
	divsd	.LCPI1_5(%rip), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp106:
# %bb.122:                              # %_ZNSolsEd.exit219
.Ltmp107:
	movq	%rax, %rbx
	movl	$.L.str.9, %esi
	movl	$14, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp108:
# %bb.123:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit221
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp109:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp110:
# %bb.124:                              # %.noexc257
.Ltmp111:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp112:
# %bb.125:                              # %.noexc258
.Ltmp113:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp114:
# %bb.126:                              # %_ZNSolsEPFRSoS_E.exit223
.Ltmp115:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp116:
# %bb.127:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit225
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %rbx
.Ltmp117:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp118:
# %bb.128:                              # %.noexc261
.Ltmp119:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp120:
# %bb.129:                              # %.noexc262
.Ltmp121:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp122:
# %bb.130:                              # %_ZNSolsEPFRSoS_E.exit227
	callq	getchar
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	288(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, 280(%rsp,%rax)
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	528(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB1_131:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit162
	movq	128(%rsp), %rdi
	cmpq	%r12, %rdi
	je	.LBB1_133
# %bb.132:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i228
	callq	_ZdlPv
.LBB1_133:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit230
	movq	88(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB1_135
# %bb.134:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i231
	callq	_ZdlPv
.LBB1_135:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit233
	movq	160(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_137
# %bb.136:
	callq	_ZdlPv
.LBB1_137:                              # %_ZNSt6vectorIiSaIiEED2Ev.exit
	movq	192(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_139
# %bb.138:
	callq	_ZdlPv
.LBB1_139:                              # %_ZNSt6vectorIiSaIiEED2Ev.exit235
	leaq	792(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	xorl	%eax, %eax
	addq	$1816, %rsp                     # imm = 0x718
	.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_140:                              # %_ZNSt15basic_streambufIcSt11char_traitsIcEE5sgetcEv.exit.i
	.cfi_def_cfa_offset 1872
	movq	(%rdi), %rax
.Ltmp10:
	callq	*72(%rax)
.Ltmp11:
# %bb.141:                              # %.noexc156
	cmpl	$-1, %eax
	jne	.LBB1_8
# %bb.142:
	movq	_ZSt3cin(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt3cin(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$2, %esi
.Ltmp12:
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.Ltmp13:
	jmp	.LBB1_8
.LBB1_143:
.Ltmp142:
	movl	$.L.str.11, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp143:
# %bb.144:
.LBB1_145:                              # %.critedge.i.i167
.Ltmp140:
	movl	$.L.str.11, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp141:
# %bb.146:
.LBB1_147:
.Ltmp147:
	movl	$.L.str.11, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp148:
# %bb.148:
.LBB1_149:                              # %.critedge.i.i
.Ltmp145:
	movl	$.L.str.11, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp146:
# %bb.150:
.LBB1_151:                              # %.loopexit.split-lp
.Ltmp67:
	jmp	.LBB1_176
.LBB1_152:
.Ltmp70:
	jmp	.LBB1_176
.LBB1_153:
.Ltmp42:
	jmp	.LBB1_176
.LBB1_154:
.Ltmp86:
	jmp	.LBB1_167
.LBB1_155:
.Ltmp21:
	jmp	.LBB1_161
.LBB1_156:
.Ltmp51:
	jmp	.LBB1_176
.LBB1_157:                              # %.loopexit.split-lp290
.Ltmp39:
	movq	%rax, %rbx
	jmp	.LBB1_183
.LBB1_158:
.Ltmp131:
	jmp	.LBB1_179
.LBB1_159:
.Ltmp139:
	jmp	.LBB1_179
.LBB1_160:
.Ltmp18:
.LBB1_161:
	movq	%rax, %rbx
	jmp	.LBB1_191
.LBB1_162:
.Ltmp75:
	jmp	.LBB1_167
.LBB1_163:
.Ltmp78:
	movq	%rax, %rbx
	movq	56(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB1_168
# %bb.164:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i206
	callq	_ZdlPv
	jmp	.LBB1_168
.LBB1_165:
.Ltmp83:
	jmp	.LBB1_167
.LBB1_166:
.Ltmp123:
.LBB1_167:
	movq	%rax, %rbx
.LBB1_168:
	leaq	280(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB1_177
.LBB1_169:
.Ltmp126:
	movq	%rax, %rbx
	jmp	.LBB1_181
.LBB1_170:                              # %.loopexit
.Ltmp60:
	jmp	.LBB1_176
.LBB1_171:
.Ltmp149:
	jmp	.LBB1_173
.LBB1_172:
.Ltmp144:
.LBB1_173:
	movq	%rax, %rbx
	cmpl	$0, (%r14)
	jne	.LBB1_180
# %bb.174:
	movl	%ebp, (%r14)
	jmp	.LBB1_180
.LBB1_175:                              # %.loopexit289
.Ltmp28:
.LBB1_176:
	movq	%rax, %rbx
.LBB1_177:
	leaq	104(%rsp), %r15
	leaq	144(%rsp), %r12
	jmp	.LBB1_183
.LBB1_178:
.Ltmp136:
.LBB1_179:
	movq	%rax, %rbx
.LBB1_180:
	leaq	280(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	400(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB1_181:
	leaq	72(%rsp), %r12
	movq	56(%rsp), %rdi
	cmpq	%r12, %rdi
	leaq	104(%rsp), %r15
	leaq	144(%rsp), %r12
	je	.LBB1_183
# %bb.182:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i175
	callq	_ZdlPv
.LBB1_183:
	movq	128(%rsp), %rdi
	cmpq	%r12, %rdi
	je	.LBB1_185
# %bb.184:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i236
	callq	_ZdlPv
.LBB1_185:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit238
	movq	88(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB1_187
# %bb.186:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i239
	callq	_ZdlPv
.LBB1_187:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit241
	movq	160(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_189
# %bb.188:
	callq	_ZdlPv
.LBB1_189:                              # %_ZNSt6vectorIiSaIiEED2Ev.exit243
	movq	192(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_191
# %bb.190:
	callq	_ZdlPv
.LBB1_191:
	leaq	792(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	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 .Ltmp17-.Ltmp0                 #   Call between .Ltmp0 and .Ltmp17
	.uleb128 .Ltmp18-.Lfunc_begin0          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp19-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp20-.Ltmp19                #   Call between .Ltmp19 and .Ltmp20
	.uleb128 .Ltmp21-.Lfunc_begin0          #     jumps to .Ltmp21
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp24-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp27-.Ltmp24                #   Call between .Ltmp24 and .Ltmp27
	.uleb128 .Ltmp28-.Lfunc_begin0          #     jumps to .Ltmp28
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp124-.Lfunc_begin0         # >> Call Site 5 <<
	.uleb128 .Ltmp125-.Ltmp124              #   Call between .Ltmp124 and .Ltmp125
	.uleb128 .Ltmp126-.Lfunc_begin0         #     jumps to .Ltmp126
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp127-.Lfunc_begin0         # >> Call Site 6 <<
	.uleb128 .Ltmp128-.Ltmp127              #   Call between .Ltmp127 and .Ltmp128
	.uleb128 .Ltmp136-.Lfunc_begin0         #     jumps to .Ltmp136
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp129-.Lfunc_begin0         # >> Call Site 7 <<
	.uleb128 .Ltmp130-.Ltmp129              #   Call between .Ltmp129 and .Ltmp130
	.uleb128 .Ltmp131-.Lfunc_begin0         #     jumps to .Ltmp131
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp132-.Lfunc_begin0         # >> Call Site 8 <<
	.uleb128 .Ltmp135-.Ltmp132              #   Call between .Ltmp132 and .Ltmp135
	.uleb128 .Ltmp136-.Lfunc_begin0         #     jumps to .Ltmp136
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp137-.Lfunc_begin0         # >> Call Site 9 <<
	.uleb128 .Ltmp138-.Ltmp137              #   Call between .Ltmp137 and .Ltmp138
	.uleb128 .Ltmp139-.Lfunc_begin0         #     jumps to .Ltmp139
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp38-.Ltmp22                #   Call between .Ltmp22 and .Ltmp38
	.uleb128 .Ltmp39-.Lfunc_begin0          #     jumps to .Ltmp39
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp40-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp41-.Ltmp40                #   Call between .Ltmp40 and .Ltmp41
	.uleb128 .Ltmp42-.Lfunc_begin0          #     jumps to .Ltmp42
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp41-.Lfunc_begin0          # >> Call Site 12 <<
	.uleb128 .Ltmp43-.Ltmp41                #   Call between .Ltmp41 and .Ltmp43
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp43-.Lfunc_begin0          # >> Call Site 13 <<
	.uleb128 .Ltmp50-.Ltmp43                #   Call between .Ltmp43 and .Ltmp50
	.uleb128 .Ltmp51-.Lfunc_begin0          #     jumps to .Ltmp51
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp50-.Lfunc_begin0          # >> Call Site 14 <<
	.uleb128 .Ltmp52-.Ltmp50                #   Call between .Ltmp50 and .Ltmp52
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp52-.Lfunc_begin0          # >> Call Site 15 <<
	.uleb128 .Ltmp59-.Ltmp52                #   Call between .Ltmp52 and .Ltmp59
	.uleb128 .Ltmp60-.Lfunc_begin0          #     jumps to .Ltmp60
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp61-.Lfunc_begin0          # >> Call Site 16 <<
	.uleb128 .Ltmp66-.Ltmp61                #   Call between .Ltmp61 and .Ltmp66
	.uleb128 .Ltmp67-.Lfunc_begin0          #     jumps to .Ltmp67
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp68-.Lfunc_begin0          # >> Call Site 17 <<
	.uleb128 .Ltmp69-.Ltmp68                #   Call between .Ltmp68 and .Ltmp69
	.uleb128 .Ltmp70-.Lfunc_begin0          #     jumps to .Ltmp70
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp71-.Lfunc_begin0          # >> Call Site 18 <<
	.uleb128 .Ltmp72-.Ltmp71                #   Call between .Ltmp71 and .Ltmp72
	.uleb128 .Ltmp86-.Lfunc_begin0          #     jumps to .Ltmp86
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp73-.Lfunc_begin0          # >> Call Site 19 <<
	.uleb128 .Ltmp74-.Ltmp73                #   Call between .Ltmp73 and .Ltmp74
	.uleb128 .Ltmp75-.Lfunc_begin0          #     jumps to .Ltmp75
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp76-.Lfunc_begin0          # >> Call Site 20 <<
	.uleb128 .Ltmp77-.Ltmp76                #   Call between .Ltmp76 and .Ltmp77
	.uleb128 .Ltmp78-.Lfunc_begin0          #     jumps to .Ltmp78
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp79-.Lfunc_begin0          # >> Call Site 21 <<
	.uleb128 .Ltmp82-.Ltmp79                #   Call between .Ltmp79 and .Ltmp82
	.uleb128 .Ltmp83-.Lfunc_begin0          #     jumps to .Ltmp83
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp84-.Lfunc_begin0          # >> Call Site 22 <<
	.uleb128 .Ltmp85-.Ltmp84                #   Call between .Ltmp84 and .Ltmp85
	.uleb128 .Ltmp86-.Lfunc_begin0          #     jumps to .Ltmp86
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp87-.Lfunc_begin0          # >> Call Site 23 <<
	.uleb128 .Ltmp122-.Ltmp87               #   Call between .Ltmp87 and .Ltmp122
	.uleb128 .Ltmp123-.Lfunc_begin0         #     jumps to .Ltmp123
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp10-.Lfunc_begin0          # >> Call Site 24 <<
	.uleb128 .Ltmp13-.Ltmp10                #   Call between .Ltmp10 and .Ltmp13
	.uleb128 .Ltmp18-.Lfunc_begin0          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp142-.Lfunc_begin0         # >> Call Site 25 <<
	.uleb128 .Ltmp141-.Ltmp142              #   Call between .Ltmp142 and .Ltmp141
	.uleb128 .Ltmp144-.Lfunc_begin0         #     jumps to .Ltmp144
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp147-.Lfunc_begin0         # >> Call Site 26 <<
	.uleb128 .Ltmp146-.Ltmp147              #   Call between .Ltmp147 and .Ltmp146
	.uleb128 .Ltmp149-.Lfunc_begin0         #     jumps to .Ltmp149
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp146-.Lfunc_begin0         # >> Call Site 27 <<
	.uleb128 .Lfunc_end1-.Ltmp146           #   Call between .Ltmp146 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z,"axG",@progbits,_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z,comdat
	.weak	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z # -- Begin function _ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z
	.type	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z,@function
_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z: # @_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z
	.cfi_startproc
# %bb.0:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPcvEET_S7_RKS3_.exit
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$208, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r10
	movq	%rdi, %rbx
	leaq	-224(%rbp), %rsi
	movq	%r8, 32(%rsi)
	movq	%r9, 40(%rsi)
	testb	%al, %al
	je	.LBB2_2
# %bb.1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPcvEET_S7_RKS3_.exit
	movaps	%xmm0, -176(%rbp)
	movaps	%xmm1, -160(%rbp)
	movaps	%xmm2, -144(%rbp)
	movaps	%xmm3, -128(%rbp)
	movaps	%xmm4, -112(%rbp)
	movaps	%xmm5, -96(%rbp)
	movaps	%xmm6, -80(%rbp)
	movaps	%xmm7, -64(%rbp)
.LBB2_2:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPcvEET_S7_RKS3_.exit
	movq	%rsp, %r14
	leaq	15(%rdx), %rax
	andq	$-16, %rax
	subq	%rax, %r14
	movq	%r14, %rsp
	leaq	-48(%rbp), %rax
	movq	%rsi, 16(%rax)
	leaq	16(%rbp), %rsi
	movq	%rsi, 8(%rax)
	movabsq	$206158430240, %rsi             # imm = 0x3000000020
	movq	%rsi, (%rax)
	movq	%r14, %rdi
	movq	%rdx, %rsi
	movq	%rcx, %rdx
	movq	%rax, %rcx
	callq	*%r10
	movslq	%eax, %rdx
	addq	%r14, %rdx
	leaq	16(%rbx), %rax
	movq	%rax, (%rbx)
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	movq	%rbx, %rax
	leaq	-16(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.Lfunc_end2:
	.size	_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z, .Lfunc_end2-_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_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_constructIPcEEvT_S7_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_constructIPcEEvT_S7_St20forward_iterator_tag, .Lfunc_end3-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ # -- Begin function _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,@function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_: # @_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.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	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.14, %edx
	callq	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$2, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB4_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB4_3
.LBB4_1:
	xorl	%ebp, %ebp
.LBB4_3:                                # %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, (%rbp,%r14,4)
	testq	%r12, %r12
	jle	.LBB4_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB4_5:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$4, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB4_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB4_7:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB4_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB4_9:                                # %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	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	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .Lfunc_end4-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$2305843009213693951, %rcx      # imm = 0x1FFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$2, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB5_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB5_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end5:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .Lfunc_end5-_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIiE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIiE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIiE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIiE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIiE8allocateEmPKv,@function
_ZNSt15__new_allocatorIiE8allocateEmPKv: # @_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$61, %rax
	jne	.LBB6_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB6_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB6_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB6_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end6:
	.size	_ZNSt15__new_allocatorIiE8allocateEmPKv, .Lfunc_end6-_ZNSt15__new_allocatorIiE8allocateEmPKv
	.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:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB7_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB7_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z3mulPfS_i, %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_end7:
	.size	__hip_module_ctor, .Lfunc_end7-__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	.LBB8_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
.LBB8_2:
	retq
.Lfunc_end8:
	.size	__hip_module_dtor, .Lfunc_end8-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	debut,@object                   # @debut
	.bss
	.globl	debut
	.p2align	3, 0x0
debut:
	.quad	0                               # 0x0
	.size	debut, 8

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

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

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Entrer le chemin entier avec des doubles backslashs"
	.size	.L.str, 52

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"\nCombien d iterations maximale ?"
	.size	.L.str.1, 33

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

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Ouverture du fichier texte reussi"
	.size	.L.str.3, 34

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"On quitte la boucle apres "
	.size	.L.str.4, 27

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	" iterations.\n"
	.size	.L.str.5, 14

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"C:\\Users\\Prugniaud\\projects\\output.txt"
	.size	.L.str.6, 39

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Temps d execution : "
	.size	.L.str.7, 21

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	" secondes"
	.size	.L.str.8, 10

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	" millisecondes"
	.size	.L.str.9, 15

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Fin du programme, Appuyez sur Entrer pour quitter"
	.size	.L.str.10, 50

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"stoi"
	.size	.L.str.11, 5

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"%f"
	.size	.L.str.12, 3

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"vector::_M_realloc_insert"
	.size	.L.str.14, 26

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z3mulPfS_i"
	.size	.L__unnamed_1, 12

	.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 _Z18__device_stub__mulPfS_i
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym vsnprintf
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym debut
	.addrsig_sym fin
	.addrsig_sym _Z3mulPfS_i
	.addrsig_sym _ZSt4cout
	.addrsig_sym _ZSt3cin
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z3mulPfS_i             ; -- Begin function _Z3mulPfS_i
	.globl	_Z3mulPfS_i
	.p2align	8
	.type	_Z3mulPfS_i,@function
_Z3mulPfS_i:                            ; @_Z3mulPfS_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b32 s6, s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[2:3], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s6, v2
	s_cbranch_execz .LBB0_6
; %bb.1:                                ; %.preheader
	s_load_b128 s[0:3], s[0:1], 0x0
	s_cmp_lt_i32 s6, 1
	s_cbranch_scc1 .LBB0_4
; %bb.2:                                ; %.lr.ph.preheader
	v_mov_b32_e32 v1, 0
	s_waitcnt lgkmcnt(0)
	s_mov_b32 s4, s2
	s_mov_b32 s5, s3
	s_mov_b32 s7, s6
                                        ; implicit-def: $vgpr4
.LBB0_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	v_lshlrev_b64 v[5:6], 2, v[0:1]
	s_load_b32 s8, s[4:5], 0x0
	s_add_i32 s7, s7, -1
	v_add_nc_u32_e32 v0, s6, v0
	s_add_u32 s4, s4, 4
	s_addc_u32 s5, s5, 0
	v_add_co_u32 v5, vcc_lo, s0, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s1, v6, vcc_lo
	s_cmp_eq_u32 s7, 0
	global_load_b32 v3, v[5:6], off
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_fmac_f32_e32 v4, s8, v3
	s_cbranch_scc0 .LBB0_3
	s_branch .LBB0_5
.LBB0_4:
                                        ; implicit-def: $vgpr4
.LBB0_5:                                ; %Flow31
	v_ashrrev_i32_e32 v3, 31, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[2:3]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v0, vcc_lo, s2, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_store_b32 v[0:1], v4, off
.LBB0_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z3mulPfS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.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 7
		.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	_Z3mulPfS_i, .Lfunc_end0-_Z3mulPfS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 224
; NumSgprs: 18
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 7
; 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
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z3mulPfS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z3mulPfS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
