
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>

double **malloc_matrix(int m, int n){
    int i;

    if (m <= 0 || n <= 0)
	return NULL;

    double **A = (double **)malloc(m * sizeof(double *));
    if (A == NULL)
	return NULL;

    A[0] = (double *)malloc(m*n*sizeof(double));
    if (A[0] == NULL) {
	free(A);
	return NULL;
    }
    for (i = 1; i < m; i++)
	A[i] = A[0] + i * n;

    return A;
}



void 
init_data (int m, int n, double **A) {

   int i, j;

   for( i = 0; i < m; i++)
       for( j = 0; j < n; j++) {
	    A[i][j] = 0.0;	    
       }

}

void init_f (int N, double *A){
    int 	i, j;
    double 	i_inf=0.5*(N+1), i_sup=2*(N+1)/3, j_inf=(N+1)/6, j_sup=(N+1)/3;
    double 	delta = 2.0/(N+1);
    double 	fdelta2 = 200*delta*delta;
    for(i = 1; i <= N; i++){
	for(j = 1; j <= N; j++){ 
	     if(i>=i_inf && i <= i_sup && j>=j_inf && j<=j_sup){
	    	A[i*(N+2)+j] = fdelta2;
		     }
		else{
		A[i*(N+2)+j] = 0.0;
		     }
	}
    }
}

void init_f_2d (int N, double **A){
    int 	i, j;
    double 	i_inf=0.5*(N+1), i_sup=2*(N+1)/3, j_inf=(N+1)/6, j_sup=(N+1)/3;
    double 	delta = 2.0/(N+1);
    double 	fdelta2 = 200*delta*delta;
    for(i = 1; i <= N; i++){
	for(j = 1; j <= N; j++){ 
	     if(i>=i_inf && i <= i_sup && j>=j_inf && j<=j_sup){
	    	A[i][j] = fdelta2;
		     }
		else{
		A[i][j] = 0.0;
		     }
	}
    }
}

	.file	"tmpxft_0035d7f2_00000000-6_Mallocation.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2033:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2033:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z13malloc_matrixii
	.type	_Z13malloc_matrixii, @function
_Z13malloc_matrixii:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	testl	%edi, %edi
	jle	.L5
	movslq	%esi, %rbx
	testl	%ebx, %ebx
	jle	.L5
	movl	%edi, %r12d
	movslq	%edi, %rdi
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %rbp
	testq	%rax, %rax
	je	.L5
	movl	%r12d, %edi
	imull	%ebx, %edi
	movslq	%edi, %rdi
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, 0(%rbp)
	testq	%rax, %rax
	je	.L7
	salq	$3, %rbx
	xorl	%eax, %eax
	movq	%rbx, %rdx
	jmp	.L8
.L7:
	movq	%rbp, %rdi
	call	free@PLT
.L5:
	xorl	%ebp, %ebp
	jmp	.L2
.L8:
	incq	%rax
	cmpl	%eax, %r12d
	jle	.L2
	movq	0(%rbp), %rcx
	addq	%rdx, %rcx
	addq	%rbx, %rdx
	movq	%rcx, 0(%rbp,%rax,8)
	jmp	.L8
.L2:
	movq	%rbp, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z13malloc_matrixii, .-_Z13malloc_matrixii
	.globl	_Z9init_dataiiPPd
	.type	_Z9init_dataiiPPd, @function
_Z9init_dataiiPPd:
.LFB2028:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L17:
	cmpl	%eax, %edi
	jle	.L21
	xorl	%ecx, %ecx
.L19:
	cmpl	%ecx, %esi
	jle	.L22
	movq	(%rdx,%rax,8), %r8
	movq	$0x000000000, (%r8,%rcx,8)
	incq	%rcx
	jmp	.L19
.L22:
	incq	%rax
	jmp	.L17
.L21:
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z9init_dataiiPPd, .-_Z9init_dataiiPPd
	.globl	_Z6init_fiPd
	.type	_Z6init_fiPd, @function
_Z6init_fiPd:
.LFB2029:
	.cfi_startproc
	endbr64
	leal	1(%rdi), %ecx
	movq	%rsi, %r8
	movl	$3, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	cvtsi2sdl	%ecx, %xmm1
	leal	(%rcx,%rcx), %eax
	movsd	.LC2(%rip), %xmm0
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	cltd
	movl	$6, %r10d
	movsd	.LC1(%rip), %xmm2
	leal	2(%rdi), %ebx
	idivl	%esi
	divsd	%xmm1, %xmm0
	movl	%ebx, %r11d
	mulsd	%xmm1, %xmm2
	movsd	.LC3(%rip), %xmm1
	movl	%eax, %r9d
	movl	%ecx, %eax
	cltd
	idivl	%r10d
	mulsd	%xmm0, %xmm1
	mulsd	%xmm0, %xmm1
	movl	%eax, %r10d
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	$1, %esi
.L24:
	cmpl	%edi, %esi
	jg	.L37
	cvtsi2sdl	%esi, %xmm0
	movl	$1, %edx
.L27:
	comisd	%xmm2, %xmm0
	setnb	%cl
	cmpl	%esi, %r9d
	setge	%bpl
	andl	%ebp, %ecx
	cmpl	%edx, %r10d
	setle	%bpl
	testb	%bpl, %cl
	leal	(%rdx,%r11), %ecx
	movslq	%ecx, %rcx
	je	.L25
	cmpl	%edx, %eax
	jl	.L25
	movsd	%xmm1, (%r8,%rcx,8)
	jmp	.L26
.L25:
	movq	$0x000000000, (%r8,%rcx,8)
.L26:
	incl	%edx
	cmpl	%edx, %edi
	jge	.L27
	incl	%esi
	addl	%ebx, %r11d
	jmp	.L24
.L37:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z6init_fiPd, .-_Z6init_fiPd
	.globl	_Z9init_f_2diPPd
	.type	_Z9init_f_2diPPd, @function
_Z9init_f_2diPPd:
.LFB2030:
	.cfi_startproc
	endbr64
	leal	1(%rdi), %ecx
	movq	%rsi, %r9
	movl	$3, %esi
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$6, %r10d
	cvtsi2sdl	%ecx, %xmm1
	leal	(%rcx,%rcx), %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	cltd
	movsd	.LC2(%rip), %xmm0
	movsd	.LC1(%rip), %xmm2
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	idivl	%esi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	divsd	%xmm1, %xmm0
	mulsd	%xmm1, %xmm2
	movsd	.LC3(%rip), %xmm1
	movl	%eax, %r8d
	movl	%ecx, %eax
	cltd
	idivl	%r10d
	mulsd	%xmm0, %xmm1
	mulsd	%xmm0, %xmm1
	movl	%eax, %r11d
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	$1, %edx
	movl	%eax, %ecx
.L39:
	movl	%edx, %ebx
	cmpl	%edx, %edi
	jl	.L51
	cvtsi2sdl	%ebx, %xmm3
	movq	(%r9,%rdx,8), %r12
	movl	$8, %eax
	movl	$1, %esi
.L42:
	comisd	%xmm2, %xmm3
	leaq	(%r12,%rax), %rbp
	setnb	%r10b
	cmpl	%ebx, %r8d
	setge	%r13b
	andl	%r13d, %r10d
	cmpl	%esi, %r11d
	setle	%r13b
	testb	%r13b, %r10b
	je	.L45
	movaps	%xmm1, %xmm0
	cmpl	%esi, %ecx
	jge	.L40
.L45:
	xorps	%xmm0, %xmm0
.L40:
	incl	%esi
	movsd	%xmm0, 0(%rbp)
	addq	$8, %rax
	cmpl	%esi, %edi
	jge	.L42
	incq	%rdx
	jmp	.L39
.L51:
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z9init_f_2diPPd, .-_Z9init_f_2diPPd
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2056:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2056:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.align 8
.LC3:
	.long	0
	.long	1080623104
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:



#include <hip/hip_runtime.h>
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>

double **malloc_matrix(int m, int n){
    int i;

    if (m <= 0 || n <= 0)
	return NULL;

    double **A = (double **)malloc(m * sizeof(double *));
    if (A == NULL)
	return NULL;

    A[0] = (double *)malloc(m*n*sizeof(double));
    if (A[0] == NULL) {
	free(A);
	return NULL;
    }
    for (i = 1; i < m; i++)
	A[i] = A[0] + i * n;

    return A;
}



void 
init_data (int m, int n, double **A) {

   int i, j;

   for( i = 0; i < m; i++)
       for( j = 0; j < n; j++) {
	    A[i][j] = 0.0;	    
       }

}

void init_f (int N, double *A){
    int 	i, j;
    double 	i_inf=0.5*(N+1), i_sup=2*(N+1)/3, j_inf=(N+1)/6, j_sup=(N+1)/3;
    double 	delta = 2.0/(N+1);
    double 	fdelta2 = 200*delta*delta;
    for(i = 1; i <= N; i++){
	for(j = 1; j <= N; j++){ 
	     if(i>=i_inf && i <= i_sup && j>=j_inf && j<=j_sup){
	    	A[i*(N+2)+j] = fdelta2;
		     }
		else{
		A[i*(N+2)+j] = 0.0;
		     }
	}
    }
}

void init_f_2d (int N, double **A){
    int 	i, j;
    double 	i_inf=0.5*(N+1), i_sup=2*(N+1)/3, j_inf=(N+1)/6, j_sup=(N+1)/3;
    double 	delta = 2.0/(N+1);
    double 	fdelta2 = 200*delta*delta;
    for(i = 1; i <= N; i++){
	for(j = 1; j <= N; j++){ 
	     if(i>=i_inf && i <= i_sup && j>=j_inf && j<=j_sup){
	    	A[i][j] = fdelta2;
		     }
		else{
		A[i][j] = 0.0;
		     }
	}
    }
}

	.text
	.file	"Mallocation.hip"
	.globl	_Z13malloc_matrixii             # -- Begin function _Z13malloc_matrixii
	.type	_Z13malloc_matrixii,@function
_Z13malloc_matrixii:                    # @_Z13malloc_matrixii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	xorl	%ebx, %ebx
	testl	%edi, %edi
	jle	.LBB0_8
# %bb.1:
	movl	%esi, %ebp
	testl	%esi, %esi
	jle	.LBB0_8
# %bb.2:
	movl	%edi, %r14d
	movl	%edi, %r15d
	leaq	(,%r15,8), %rdi
	callq	malloc
	testq	%rax, %rax
	je	.LBB0_3
# %bb.4:
	movq	%rax, %rbx
	movl	%ebp, %eax
	imull	%r14d, %eax
	movslq	%eax, %rdi
	shlq	$3, %rdi
	callq	malloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	.LBB0_9
# %bb.5:                                # %.preheader
	cmpl	$2, %r14d
	jb	.LBB0_8
# %bb.6:                                # %.lr.ph.preheader
	movl	%ebp, %ecx
	leaq	(%rax,%rcx,8), %rax
	shlq	$3, %rcx
	movl	$1, %edx
.LBB0_7:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%rax, (%rbx,%rdx,8)
	incq	%rdx
	addq	%rcx, %rax
	cmpq	%rdx, %r15
	jne	.LBB0_7
	jmp	.LBB0_8
.LBB0_9:
	movq	%rbx, %rdi
	callq	free
.LBB0_3:
	xorl	%ebx, %ebx
.LBB0_8:                                # %.loopexit
	movq	%rbx, %rax
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z13malloc_matrixii, .Lfunc_end0-_Z13malloc_matrixii
	.cfi_endproc
                                        # -- End function
	.globl	_Z9init_dataiiPPd               # -- Begin function _Z9init_dataiiPPd
	.type	_Z9init_dataiiPPd,@function
_Z9init_dataiiPPd:                      # @_Z9init_dataiiPPd
	.cfi_startproc
# %bb.0:
	testl	%edi, %edi
	jle	.LBB1_6
# %bb.1:                                # %.preheader.lr.ph
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, %rbx
	movl	%esi, %ebp
	movl	%esi, %r14d
	shlq	$3, %r14
	movl	%edi, %r15d
	xorl	%r12d, %r12d
.LBB1_2:                                # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	testl	%ebp, %ebp
	jle	.LBB1_4
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB1_2 Depth=1
	movq	(%rbx,%r12,8), %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
.LBB1_4:                                # %._crit_edge
                                        #   in Loop: Header=BB1_2 Depth=1
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB1_2
# %bb.5:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB1_6:                                # %._crit_edge11
	retq
.Lfunc_end1:
	.size	_Z9init_dataiiPPd, .Lfunc_end1-_Z9init_dataiiPPd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z6init_fiPd
.LCPI2_0:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI2_1:
	.quad	0x4000000000000000              # double 2
.LCPI2_2:
	.quad	0x4069000000000000              # double 200
	.text
	.globl	_Z6init_fiPd
	.type	_Z6init_fiPd,@function
_Z6init_fiPd:                           # @_Z6init_fiPd
	.cfi_startproc
# %bb.0:
                                        # kill: def $edi killed $edi def $rdi
	testl	%edi, %edi
	jle	.LBB2_10
# %bb.1:                                # %.preheader.lr.ph
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	leal	1(%rdi), %eax
	cvtsi2sd	%eax, %xmm2
	movsd	.LCPI2_0(%rip), %xmm0           # xmm0 = mem[0],zero
	mulsd	%xmm2, %xmm0
	leal	2(,%rdi,2), %ecx
	movslq	%ecx, %rcx
	imulq	$1431655766, %rcx, %rcx         # imm = 0x55555556
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	cvtsi2sd	%ecx, %xmm1
	movslq	%eax, %rdx
	imulq	$715827883, %rdx, %rax          # imm = 0x2AAAAAAB
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
	cltq
	imulq	$1431655766, %rdx, %rcx         # imm = 0x55555556
	movq	%rcx, %r8
	shrq	$63, %r8
	shrq	$32, %rcx
	addl	%r8d, %ecx
	movslq	%ecx, %rcx
	movsd	.LCPI2_1(%rip), %xmm3           # xmm3 = mem[0],zero
	divsd	%xmm2, %xmm3
	movsd	.LCPI2_2(%rip), %xmm2           # xmm2 = mem[0],zero
	mulsd	%xmm3, %xmm2
	mulsd	%xmm3, %xmm2
	addl	$2, %edi
	movl	%edx, %edx
	movl	$1, %r8d
	movl	%edi, %r9d
.LBB2_2:                                # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_3 Depth 2
	movl	%r9d, %r10d
	leaq	(%rsi,%r10,8), %r10
	xorps	%xmm3, %xmm3
	cvtsi2sd	%r8d, %xmm3
	movapd	%xmm0, %xmm4
	cmpnlepd	%xmm3, %xmm4
	cmpnlepd	%xmm1, %xmm3
	orpd	%xmm4, %xmm3
	movd	%xmm3, %r11d
	movl	$1, %ebx
.LBB2_3:                                #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	testb	$1, %r11b
	je	.LBB2_4
.LBB2_6:                                #   in Loop: Header=BB2_3 Depth=2
	xorpd	%xmm3, %xmm3
	jmp	.LBB2_7
.LBB2_4:                                #   in Loop: Header=BB2_3 Depth=2
	cmpq	%rax, %rbx
	jl	.LBB2_6
# %bb.5:                                #   in Loop: Header=BB2_3 Depth=2
	movapd	%xmm2, %xmm3
	cmpq	%rcx, %rbx
	jg	.LBB2_6
.LBB2_7:                                #   in Loop: Header=BB2_3 Depth=2
	movsd	%xmm3, (%r10,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %rdx
	jne	.LBB2_3
# %bb.8:                                # %._crit_edge
                                        #   in Loop: Header=BB2_2 Depth=1
	incq	%r8
	addl	%edi, %r9d
	cmpq	%rdx, %r8
	jne	.LBB2_2
# %bb.9:
	popq	%rbx
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
.LBB2_10:                               # %._crit_edge40
	retq
.Lfunc_end2:
	.size	_Z6init_fiPd, .Lfunc_end2-_Z6init_fiPd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z9init_f_2diPPd
.LCPI3_0:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI3_1:
	.quad	0x4000000000000000              # double 2
.LCPI3_2:
	.quad	0x4069000000000000              # double 200
	.text
	.globl	_Z9init_f_2diPPd
	.type	_Z9init_f_2diPPd,@function
_Z9init_f_2diPPd:                       # @_Z9init_f_2diPPd
	.cfi_startproc
# %bb.0:
                                        # kill: def $edi killed $edi def $rdi
	testl	%edi, %edi
	jle	.LBB3_11
# %bb.1:                                # %.preheader.lr.ph
	leal	1(%rdi), %eax
	cvtsi2sd	%eax, %xmm2
	movsd	.LCPI3_0(%rip), %xmm0           # xmm0 = mem[0],zero
	mulsd	%xmm2, %xmm0
	leal	2(,%rdi,2), %ecx
	movslq	%ecx, %rcx
	imulq	$1431655766, %rcx, %rcx         # imm = 0x55555556
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	cvtsi2sd	%ecx, %xmm1
	movslq	%eax, %rdx
	imulq	$715827883, %rdx, %rax          # imm = 0x2AAAAAAB
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
	cltq
	imulq	$1431655766, %rdx, %rcx         # imm = 0x55555556
	movq	%rcx, %rdi
	shrq	$63, %rdi
	shrq	$32, %rcx
	addl	%edi, %ecx
	movslq	%ecx, %rcx
	movsd	.LCPI3_1(%rip), %xmm3           # xmm3 = mem[0],zero
	divsd	%xmm2, %xmm3
	movsd	.LCPI3_2(%rip), %xmm2           # xmm2 = mem[0],zero
	mulsd	%xmm3, %xmm2
	mulsd	%xmm3, %xmm2
	movl	%edx, %edx
	movl	$1, %edi
.LBB3_2:                                # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_3 Depth 2
	xorps	%xmm3, %xmm3
	cvtsi2sd	%edi, %xmm3
	movapd	%xmm0, %xmm4
	cmpnlepd	%xmm3, %xmm4
	cmpnlepd	%xmm1, %xmm3
	orpd	%xmm4, %xmm3
	movd	%xmm3, %r8d
	movl	$1, %r9d
.LBB3_3:                                #   Parent Loop BB3_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	testb	$1, %r8b
	je	.LBB3_6
# %bb.4:                                # %._crit_edge44
                                        #   in Loop: Header=BB3_3 Depth=2
	movq	(%rsi,%rdi,8), %r10
.LBB3_5:                                #   in Loop: Header=BB3_3 Depth=2
	xorpd	%xmm3, %xmm3
	jmp	.LBB3_9
.LBB3_6:                                #   in Loop: Header=BB3_3 Depth=2
	movq	(%rsi,%rdi,8), %r10
	cmpq	%rax, %r9
	jl	.LBB3_5
# %bb.7:                                #   in Loop: Header=BB3_3 Depth=2
	cmpq	%rcx, %r9
	jg	.LBB3_5
# %bb.8:                                #   in Loop: Header=BB3_3 Depth=2
	movapd	%xmm2, %xmm3
.LBB3_9:                                #   in Loop: Header=BB3_3 Depth=2
	movsd	%xmm3, (%r10,%r9,8)
	incq	%r9
	cmpq	%r9, %rdx
	jne	.LBB3_3
# %bb.10:                               # %._crit_edge
                                        #   in Loop: Header=BB3_2 Depth=1
	incq	%rdi
	cmpq	%rdx, %rdi
	jne	.LBB3_2
.LBB3_11:                               # %._crit_edge37
	retq
.Lfunc_end3:
	.size	_Z9init_f_2diPPd, .Lfunc_end3-_Z9init_f_2diPPd
	.cfi_endproc
                                        # -- End function
	.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 __hip_cuid_

	.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_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
