void
init_bounds(int size, double *u) {
	int i;
	for (i = 0; i < size; i++) {
		u[i * size + 0] = 0;
		u[0 * size + i] = 20;
		u[i * size + (size - 1)] = 20;
		u[(size - 1) * size + i] = 20;
	}
}

void init_interior(int size, double *u, double guess) {
	int i, j;
	for (i = 1; i < size - 1; i++) {
		for (j = 1; j < size - 1; j++) {
			u[i * size + j] = guess;
		}
	}
}

void
init_f(int N, double *f) {
	int i,j, i_min, i_max, j_min, j_max;
	i_min = (N + 1) / 2. * (0 + 1);
	i_max = (N + 1) / 2. * (1. / 3 + 1);
	j_max = (N + 1) / 2. * ( - 1. / 3 + 1);
	j_min = (N + 1) / 2. * (- 2. / 3 + 1);

	for (i = i_min; i <= i_max; i++) {
		for (j = j_min; j <= j_max; j++) {
			f[i * (N + 2) + j] = 200.;
		}
	}
}


void
init_u(int size, double *u, double guess) {
	init_bounds(size, u);
	init_interior(size, u, guess);
}

	.file	"tmpxft_00233596_00000000-6_init.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2014:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2014:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z11init_boundsiPd
	.type	_Z11init_boundsiPd, @function
_Z11init_boundsiPd:
.LFB2008:
	.cfi_startproc
	endbr64
	leal	-1(%rdi), %ecx
	movl	%edi, %eax
	movslq	%edi, %r8
	movsd	.LC1(%rip), %xmm0
	imull	%ecx, %eax
	salq	$3, %r8
	movq	%rsi, %rdx
	cltq
	leaq	(%rsi,%rax,8), %r9
	xorl	%eax, %eax
.L3:
	cmpl	%eax, %edi
	jle	.L6
	movq	$0x000000000, (%rdx)
	movsd	%xmm0, (%rsi,%rax,8)
	movsd	%xmm0, (%rdx,%rcx,8)
	addq	%r8, %rdx
	movsd	%xmm0, (%r9,%rax,8)
	incq	%rax
	jmp	.L3
.L6:
	ret
	.cfi_endproc
.LFE2008:
	.size	_Z11init_boundsiPd, .-_Z11init_boundsiPd
	.globl	_Z13init_interioriPdd
	.type	_Z13init_interioriPdd, @function
_Z13init_interioriPdd:
.LFB2009:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	movl	$1, %ecx
	decl	%edi
	salq	$3, %rax
	addq	%rax, %rsi
.L8:
	cmpl	%ecx, %edi
	jle	.L12
	movl	$1, %edx
.L9:
	movsd	%xmm0, (%rsi,%rdx,8)
	incq	%rdx
	cmpl	%edx, %edi
	jg	.L9
	incl	%ecx
	addq	%rax, %rsi
	jmp	.L8
.L12:
	ret
	.cfi_endproc
.LFE2009:
	.size	_Z13init_interioriPdd, .-_Z13init_interioriPdd
	.globl	_Z6init_fiPd
	.type	_Z6init_fiPd, @function
_Z6init_fiPd:
.LFB2010:
	.cfi_startproc
	endbr64
	leal	1(%rdi), %eax
	movsd	.LC3(%rip), %xmm1
	movq	%rsi, %rcx
	addl	$2, %edi
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	cvttsd2sil	%xmm0, %edx
	movl	%edx, %esi
	cvttsd2sil	%xmm1, %r10d
	movsd	.LC4(%rip), %xmm1
	imull	%edi, %esi
	mulsd	%xmm0, %xmm1
	mulsd	.LC5(%rip), %xmm0
	cvttsd2sil	%xmm1, %r11d
	cvttsd2sil	%xmm0, %r9d
	movsd	.LC6(%rip), %xmm0
.L14:
	cmpl	%r10d, %edx
	jg	.L13
	movslq	%esi, %r8
	movslq	%r9d, %rax
	leaq	(%rcx,%r8,8), %r8
.L17:
	cmpl	%eax, %r11d
	jl	.L18
	movsd	%xmm0, (%r8,%rax,8)
	incq	%rax
	jmp	.L17
.L18:
	incl	%edx
	addl	%edi, %esi
	jmp	.L14
.L13:
	ret
	.cfi_endproc
.LFE2010:
	.size	_Z6init_fiPd, .-_Z6init_fiPd
	.globl	_Z6init_uiPdd
	.type	_Z6init_uiPdd, @function
_Z6init_uiPdd:
.LFB2011:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	movsd	%xmm0, (%rsp)
	call	_Z11init_boundsiPd
	movsd	(%rsp), %xmm0
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	_Z13init_interioriPdd
	.cfi_endproc
.LFE2011:
	.size	_Z6init_uiPdd, .-_Z6init_uiPdd
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2037:
	.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
.LFE2037:
	.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	1077149696
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.align 8
.LC3:
	.long	1431655765
	.long	1073042773
	.align 8
.LC4:
	.long	1431655766
	.long	1071994197
	.align 8
.LC5:
	.long	1431655766
	.long	1070945621
	.align 8
.LC6:
	.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>
void
init_bounds(int size, double *u) {
	int i;
	for (i = 0; i < size; i++) {
		u[i * size + 0] = 0;
		u[0 * size + i] = 20;
		u[i * size + (size - 1)] = 20;
		u[(size - 1) * size + i] = 20;
	}
}

void init_interior(int size, double *u, double guess) {
	int i, j;
	for (i = 1; i < size - 1; i++) {
		for (j = 1; j < size - 1; j++) {
			u[i * size + j] = guess;
		}
	}
}

void
init_f(int N, double *f) {
	int i,j, i_min, i_max, j_min, j_max;
	i_min = (N + 1) / 2. * (0 + 1);
	i_max = (N + 1) / 2. * (1. / 3 + 1);
	j_max = (N + 1) / 2. * ( - 1. / 3 + 1);
	j_min = (N + 1) / 2. * (- 2. / 3 + 1);

	for (i = i_min; i <= i_max; i++) {
		for (j = j_min; j <= j_max; j++) {
			f[i * (N + 2) + j] = 200.;
		}
	}
}


void
init_u(int size, double *u, double guess) {
	init_bounds(size, u);
	init_interior(size, u, guess);
}

	.text
	.file	"init.hip"
	.globl	_Z11init_boundsiPd              # -- Begin function _Z11init_boundsiPd
	.type	_Z11init_boundsiPd,@function
_Z11init_boundsiPd:                     # @_Z11init_boundsiPd
	.cfi_startproc
# %bb.0:
                                        # kill: def $edi killed $edi def $rdi
	testl	%edi, %edi
	jle	.LBB0_3
# %bb.1:                                # %.lr.ph
	leal	-1(%rdi), %eax
	movl	%eax, %ecx
	imull	%edi, %ecx
	movslq	%ecx, %rdx
	movl	%edi, %ecx
	leaq	(%rsi,%rdx,8), %rdx
	leaq	(,%rcx,8), %rdi
	xorl	%r8d, %r8d
	movabsq	$4626322717216342016, %r9       # imm = 0x4034000000000000
	movq	%rsi, %r10
.LBB0_2:                                # =>This Inner Loop Header: Depth=1
	movq	$0, (%r10)
	movq	%r9, (%rsi,%r8,8)
	movq	%r9, (%r10,%rax,8)
	movq	%r9, (%rdx,%r8,8)
	incq	%r8
	addq	%rdi, %r10
	cmpq	%r8, %rcx
	jne	.LBB0_2
.LBB0_3:                                # %._crit_edge
	retq
.Lfunc_end0:
	.size	_Z11init_boundsiPd, .Lfunc_end0-_Z11init_boundsiPd
	.cfi_endproc
                                        # -- End function
	.globl	_Z13init_interioriPdd           # -- Begin function _Z13init_interioriPdd
	.type	_Z13init_interioriPdd,@function
_Z13init_interioriPdd:                  # @_Z13init_interioriPdd
	.cfi_startproc
# %bb.0:
                                        # kill: def $edi killed $edi def $rdi
	cmpl	$3, %edi
	jl	.LBB1_5
# %bb.1:                                # %.preheader.lr.ph
	leal	-1(%rdi), %eax
	movl	$1, %ecx
	movl	%edi, %edx
.LBB1_2:                                # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_3 Depth 2
	movl	%edx, %r8d
	leaq	(%rsi,%r8,8), %r8
	movl	$1, %r9d
.LBB1_3:                                #   Parent Loop BB1_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	%xmm0, (%r8,%r9,8)
	incq	%r9
	cmpq	%r9, %rax
	jne	.LBB1_3
# %bb.4:                                # %._crit_edge
                                        #   in Loop: Header=BB1_2 Depth=1
	incq	%rcx
	addl	%edi, %edx
	cmpq	%rax, %rcx
	jne	.LBB1_2
.LBB1_5:                                # %._crit_edge14
	retq
.Lfunc_end1:
	.size	_Z13init_interioriPdd, .Lfunc_end1-_Z13init_interioriPdd
	.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	0x3ff5555555555555              # double 1.3333333333333333
.LCPI2_2:
	.quad	0x3fd5555555555556              # double 0.33333333333333337
.LCPI2_3:
	.quad	0x3fe5555555555556              # double 0.66666666666666674
	.text
	.globl	_Z6init_fiPd
	.type	_Z6init_fiPd,@function
_Z6init_fiPd:                           # @_Z6init_fiPd
	.cfi_startproc
# %bb.0:
                                        # kill: def $edi killed $edi def $rdi
	leal	1(%rdi), %eax
	cvtsi2sd	%eax, %xmm0
	mulsd	.LCPI2_0(%rip), %xmm0
	cvttsd2si	%xmm0, %r8d
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %eax
	cmpl	%eax, %r8d
	jg	.LBB2_6
# %bb.1:                                # %.preheader.lr.ph
	movsd	.LCPI2_2(%rip), %xmm1           # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %ecx
	mulsd	.LCPI2_3(%rip), %xmm0
	cvttsd2si	%xmm0, %edx
	addl	$2, %edi
	movslq	%ecx, %r10
	movslq	%r8d, %r8
	movslq	%edi, %rdi
	incl	%eax
	movq	%r8, %r9
	imulq	%rdi, %r9
	leaq	(,%r10,8), %r11
	leaq	(%r11,%r9,8), %r9
	addq	%r9, %rsi
	shlq	$3, %rdi
	movl	%edx, %r9d
	subl	%r10d, %r9d
	incl	%r9d
	movabsq	$4641240890982006784, %r10      # imm = 0x4069000000000000
.LBB2_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_4 Depth 2
	cmpl	%edx, %ecx
	jg	.LBB2_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB2_2 Depth=1
	xorl	%r11d, %r11d
.LBB2_4:                                #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%r10, (%rsi,%r11,8)
	incq	%r11
	cmpl	%r11d, %r9d
	jne	.LBB2_4
.LBB2_5:                                # %._crit_edge
                                        #   in Loop: Header=BB2_2 Depth=1
	incq	%r8
	addq	%rdi, %rsi
	cmpl	%r8d, %eax
	jne	.LBB2_2
.LBB2_6:                                # %._crit_edge21
	retq
.Lfunc_end2:
	.size	_Z6init_fiPd, .Lfunc_end2-_Z6init_fiPd
	.cfi_endproc
                                        # -- End function
	.globl	_Z6init_uiPdd                   # -- Begin function _Z6init_uiPdd
	.type	_Z6init_uiPdd,@function
_Z6init_uiPdd:                          # @_Z6init_uiPdd
	.cfi_startproc
# %bb.0:
                                        # kill: def $edi killed $edi def $rdi
	testl	%edi, %edi
	jle	.LBB3_8
# %bb.1:                                # %.lr.ph.i
	leal	-1(%rdi), %eax
	movl	%eax, %edx
	imull	%edi, %edx
	movl	%edi, %ecx
	movslq	%edx, %rdx
	leaq	(%rsi,%rdx,8), %rdx
	leaq	(%rsi,%rax,8), %r8
	xorl	%r9d, %r9d
	movabsq	$4626322717216342016, %r10      # imm = 0x4034000000000000
	xorl	%r11d, %r11d
.LBB3_2:                                # =>This Inner Loop Header: Depth=1
	movq	$0, (%rsi,%r9,8)
	movq	%r10, (%rsi,%r11,8)
	movq	%r10, (%r8,%r9,8)
	movq	%r10, (%rdx,%r11,8)
	incq	%r11
	addq	%rcx, %r9
	cmpq	%r11, %rcx
	jne	.LBB3_2
# %bb.3:                                # %_Z11init_boundsiPd.exit
	cmpl	$3, %edi
	jl	.LBB3_8
# %bb.4:                                # %.lr.ph.i4.preheader
	movl	$1, %ecx
	movl	%edi, %edx
.LBB3_5:                                # %.lr.ph.i4
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_6 Depth 2
	movl	%edx, %r8d
	leaq	(%rsi,%r8,8), %r8
	movl	$1, %r9d
.LBB3_6:                                #   Parent Loop BB3_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	%xmm0, (%r8,%r9,8)
	incq	%r9
	cmpq	%r9, %rax
	jne	.LBB3_6
# %bb.7:                                # %._crit_edge.i
                                        #   in Loop: Header=BB3_5 Depth=1
	incq	%rcx
	addl	%edi, %edx
	cmpq	%rax, %rcx
	jne	.LBB3_5
.LBB3_8:                                # %_Z13init_interioriPdd.exit
	retq
.Lfunc_end3:
	.size	_Z6init_uiPdd, .Lfunc_end3-_Z6init_uiPdd
	.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
