void u_init_jac(double ***u, int N, double start_T) {
    int i, j, k;

    #pragma omp parallel for default(none) \
            shared(u,N,start_T) \
            private(i,j,k) schedule(static)
    for (i = 0; i < N; ++i) {
        for (j = 0; j < N; ++j) {
            for (k = 0; k < N; ++k) {

                // i -> z, j -> y, k -> x
                if (j == 0)
                    u[i][j][k] = 0.0;

                else if (j == N - 1 || i == 0 || i == N - 1 || k == 0 || k == N - 1)
                    u[i][j][k] = 20.0;

                else
                    u[i][j][k] = start_T;
            }
        }
    }
}

void f_init_jac(double ***f, int N) {
    int i, j, k;
    #pragma omp parallel for default(none) \
            shared(f,N) \
            private(i,j,k) schedule(static)
    for (i = 1; i < N-1; ++i) {
        for (j = 1; j < N-1; ++j) {
            for (k = 1; k < N-1; ++k) {

                if (i >= (N-2) / 6.0 && i < 0.5 * (N - 2)    // -2/3 <= z <= 0
                    && j >= 0 && j <= 0.25 * (N - 2)         // -1 <= y <= -1/2
                    && k >= 0 && k <= 5.0 * (N - 2) / 16.0 )  // -1 <= x <= -3/8
                    f[i][j][k] = 200.0;
                else f[i][j][k] = 0.0;
            }
        }
    }
}

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

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2012:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2012:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z10u_init_jacPPPdid
	.type	_Z10u_init_jacPPPdid, @function
_Z10u_init_jacPPPdid:
.LFB2008:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %edx
	movsd	.LC1(%rip), %xmm1
	movq	%rdi, %r10
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	xorl	%esi, %esi
	leal	-1(%rdx), %r11d
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
.L3:
	movl	%esi, %ebx
	cmpl	%esi, %edx
	jle	.L2
	movq	(%r10,%rsi,8), %r9
	xorl	%eax, %eax
.L11:
	leaq	0(,%rax,8), %rbp
	xorl	%r8d, %r8d
	xorl	%edi, %edi
.L8:
	testq	%rax, %rax
	jne	.L4
	movq	(%r9), %rcx
	movq	$0x000000000, (%rcx,%r8)
	jmp	.L5
.L4:
	testl	%ebx, %ebx
	sete	%cl
	cmpl	%ebx, %r11d
	sete	%r12b
	orl	%r12d, %ecx
	cmpl	%eax, %r11d
	sete	%r12b
	orl	%r12d, %ecx
	testl	%edi, %edi
	sete	%r12b
	orb	%r12b, %cl
	movq	(%r9,%rbp), %rcx
	jne	.L12
	cmpl	%edi, %r11d
	jne	.L6
.L12:
	movsd	%xmm1, (%rcx,%r8)
	jmp	.L5
.L6:
	movsd	%xmm0, (%rcx,%r8)
.L5:
	incl	%edi
	addq	$8, %r8
	cmpl	%edi, %edx
	jne	.L8
	incq	%rax
	cmpl	%eax, %edx
	jg	.L11
	incq	%rsi
	jmp	.L3
.L2:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2008:
	.size	_Z10u_init_jacPPPdid, .-_Z10u_init_jacPPPdid
	.globl	_Z10f_init_jacPPPdi
	.type	_Z10f_init_jacPPPdi, @function
_Z10f_init_jacPPPdi:
.LFB2009:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movsd	.LC7(%rip), %xmm7
	movq	%rdi, %r8
	movl	%esi, %ecx
	movsd	.LC3(%rip), %xmm8
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	$1, %eax
	movsd	.LC4(%rip), %xmm9
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsd	.LC5(%rip), %xmm10
.L17:
	leal	-1(%rcx), %r9d
	movl	%eax, %ebx
	cmpl	%eax, %r9d
	jle	.L16
	leal	-2(%rcx), %edx
	movq	(%r8,%rax,8), %r11
	movl	$8, %edi
	movsd	.LC6(%rip), %xmm5
	cvtsi2sdl	%edx, %xmm2
	movl	$1, %edx
	movaps	%xmm2, %xmm6
	divsd	%xmm7, %xmm6
.L25:
	cvtsi2sdl	%ebx, %xmm4
	movq	(%r11,%rdi), %rbp
	movl	$8, %r10d
	movl	$1, %esi
.L22:
	comisd	%xmm6, %xmm4
	leaq	0(%rbp,%r10), %r12
	jb	.L36
	movaps	%xmm2, %xmm0
	mulsd	%xmm8, %xmm0
	comisd	%xmm4, %xmm0
	jbe	.L36
	movaps	%xmm2, %xmm1
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm9, %xmm1
	comisd	%xmm0, %xmm1
	jb	.L36
	movaps	%xmm2, %xmm3
	cvtsi2sdl	%esi, %xmm0
	movsd	.LC2(%rip), %xmm1
	mulsd	%xmm10, %xmm3
	mulsd	%xmm5, %xmm3
	cmplesd	%xmm3, %xmm0
	xorps	%xmm3, %xmm3
	andps	%xmm0, %xmm1
	andnps	%xmm3, %xmm0
	orps	%xmm0, %xmm1
	jmp	.L18
.L36:
	xorps	%xmm1, %xmm1
.L18:
	incl	%esi
	movsd	%xmm1, (%r12)
	addq	$8, %r10
	cmpl	%esi, %r9d
	jg	.L22
	incl	%edx
	addq	$8, %rdi
	cmpl	%edx, %r9d
	jg	.L25
	incq	%rax
	jmp	.L17
.L16:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2009:
	.size	_Z10f_init_jacPPPdi, .-_Z10f_init_jacPPPdi
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2035:
	.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
.LFE2035:
	.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	1080623104
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.align 8
.LC4:
	.long	0
	.long	1070596096
	.align 8
.LC5:
	.long	0
	.long	1075052544
	.align 8
.LC6:
	.long	0
	.long	1068498944
	.align 8
.LC7:
	.long	0
	.long	1075314688
	.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 u_init_jac(double ***u, int N, double start_T) {
    int i, j, k;

    #pragma omp parallel for default(none) \
            shared(u,N,start_T) \
            private(i,j,k) schedule(static)
    for (i = 0; i < N; ++i) {
        for (j = 0; j < N; ++j) {
            for (k = 0; k < N; ++k) {

                // i -> z, j -> y, k -> x
                if (j == 0)
                    u[i][j][k] = 0.0;

                else if (j == N - 1 || i == 0 || i == N - 1 || k == 0 || k == N - 1)
                    u[i][j][k] = 20.0;

                else
                    u[i][j][k] = start_T;
            }
        }
    }
}

void f_init_jac(double ***f, int N) {
    int i, j, k;
    #pragma omp parallel for default(none) \
            shared(f,N) \
            private(i,j,k) schedule(static)
    for (i = 1; i < N-1; ++i) {
        for (j = 1; j < N-1; ++j) {
            for (k = 1; k < N-1; ++k) {

                if (i >= (N-2) / 6.0 && i < 0.5 * (N - 2)    // -2/3 <= z <= 0
                    && j >= 0 && j <= 0.25 * (N - 2)         // -1 <= y <= -1/2
                    && k >= 0 && k <= 5.0 * (N - 2) / 16.0 )  // -1 <= x <= -3/8
                    f[i][j][k] = 200.0;
                else f[i][j][k] = 0.0;
            }
        }
    }
}

	.text
	.file	"init.hip"
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z10u_init_jacPPPdid
.LCPI0_0:
	.quad	0x4034000000000000              # double 20
	.text
	.globl	_Z10u_init_jacPPPdid
	.type	_Z10u_init_jacPPPdid,@function
_Z10u_init_jacPPPdid:                   # @_Z10u_init_jacPPPdid
	.cfi_startproc
# %bb.0:
                                        # kill: def $esi killed $esi def $rsi
	testl	%esi, %esi
	jle	.LBB0_16
# %bb.1:                                # %.preheader38.lr.ph
	leal	-1(%rsi), %eax
	movl	%esi, %ecx
	xorl	%edx, %edx
	movsd	.LCPI0_0(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB0_2:                                # %.preheader.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_3 Depth 2
                                        #       Child Loop BB0_4 Depth 3
	xorl	%esi, %esi
.LBB0_3:                                # %.preheader
                                        #   Parent Loop BB0_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_4 Depth 3
	testq	%rdx, %rdx
	sete	%r9b
	cmpq	%rax, %rsi
	sete	%r8b
	orb	%r9b, %r8b
	xorl	%r9d, %r9d
.LBB0_4:                                #   Parent Loop BB0_2 Depth=1
                                        #     Parent Loop BB0_3 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	testq	%rsi, %rsi
	je	.LBB0_5
# %bb.6:                                #   in Loop: Header=BB0_4 Depth=3
	testb	%r8b, %r8b
	je	.LBB0_8
# %bb.7:                                # %._crit_edge55
                                        #   in Loop: Header=BB0_4 Depth=3
	movq	(%rdi,%rdx,8), %r10
.LBB0_11:                               #   in Loop: Header=BB0_4 Depth=3
	leaq	(%r10,%rsi,8), %r10
	movaps	%xmm1, %xmm2
	jmp	.LBB0_13
.LBB0_5:                                #   in Loop: Header=BB0_4 Depth=3
	movq	(%rdi,%rdx,8), %r10
	xorps	%xmm2, %xmm2
	jmp	.LBB0_13
.LBB0_8:                                #   in Loop: Header=BB0_4 Depth=3
	movq	(%rdi,%rdx,8), %r10
	cmpq	%r9, %rax
	je	.LBB0_11
# %bb.9:                                #   in Loop: Header=BB0_4 Depth=3
	cmpq	%rax, %rdx
	je	.LBB0_11
# %bb.10:                               #   in Loop: Header=BB0_4 Depth=3
	testq	%r9, %r9
	je	.LBB0_11
# %bb.12:                               #   in Loop: Header=BB0_4 Depth=3
	leaq	(%r10,%rsi,8), %r10
	movaps	%xmm0, %xmm2
.LBB0_13:                               #   in Loop: Header=BB0_4 Depth=3
	movq	(%r10), %r10
	movsd	%xmm2, (%r10,%r9,8)
	incq	%r9
	cmpq	%r9, %rcx
	jne	.LBB0_4
# %bb.14:                               # %._crit_edge
                                        #   in Loop: Header=BB0_3 Depth=2
	incq	%rsi
	cmpq	%rcx, %rsi
	jne	.LBB0_3
# %bb.15:                               # %._crit_edge41
                                        #   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	cmpq	%rcx, %rdx
	jne	.LBB0_2
.LBB0_16:                               # %._crit_edge43
	retq
.Lfunc_end0:
	.size	_Z10u_init_jacPPPdid, .Lfunc_end0-_Z10u_init_jacPPPdid
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z10f_init_jacPPPdi
.LCPI1_0:
	.quad	0x4018000000000000              # double 6
.LCPI1_1:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI1_2:
	.quad	0x3fd0000000000000              # double 0.25
.LCPI1_3:
	.quad	0x4014000000000000              # double 5
.LCPI1_4:
	.quad	0x3fb0000000000000              # double 0.0625
.LCPI1_5:
	.quad	0x4069000000000000              # double 200
	.text
	.globl	_Z10f_init_jacPPPdi
	.type	_Z10f_init_jacPPPdi,@function
_Z10f_init_jacPPPdi:                    # @_Z10f_init_jacPPPdi
	.cfi_startproc
# %bb.0:
                                        # kill: def $esi killed $esi def $rsi
	cmpl	$3, %esi
	jl	.LBB1_9
# %bb.1:                                # %.preheader34.lr.ph
	leal	-1(%rsi), %eax
	addl	$-2, %esi
	cvtsi2sd	%esi, %xmm0
	movapd	%xmm0, %xmm1
	divsd	.LCPI1_0(%rip), %xmm1
	movsd	.LCPI1_1(%rip), %xmm2           # xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	movsd	.LCPI1_2(%rip), %xmm3           # xmm3 = mem[0],zero
	mulsd	%xmm0, %xmm3
	mulsd	.LCPI1_3(%rip), %xmm0
	mulsd	.LCPI1_4(%rip), %xmm0
	movl	$1, %ecx
	movsd	.LCPI1_5(%rip), %xmm4           # xmm4 = mem[0],zero
.LBB1_2:                                # %.preheader.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_3 Depth 2
                                        #       Child Loop BB1_4 Depth 3
	xorps	%xmm5, %xmm5
	cvtsi2sd	%ecx, %xmm5
	movapd	%xmm1, %xmm6
	cmpnlepd	%xmm5, %xmm6
	cmpnltpd	%xmm2, %xmm5
	orpd	%xmm6, %xmm5
	movd	%xmm5, %edx
	movq	(%rdi,%rcx,8), %rsi
	movl	$1, %r8d
.LBB1_3:                                # %.preheader
                                        #   Parent Loop BB1_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB1_4 Depth 3
	xorps	%xmm5, %xmm5
	cvtsi2sd	%r8d, %xmm5
	ucomisd	%xmm5, %xmm3
	setb	%r9b
	orb	%dl, %r9b
	movq	(%rsi,%r8,8), %r10
	movl	$1, %r11d
.LBB1_4:                                #   Parent Loop BB1_2 Depth=1
                                        #     Parent Loop BB1_3 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	xorpd	%xmm5, %xmm5
	testb	$1, %r9b
	jne	.LBB1_6
# %bb.5:                                #   in Loop: Header=BB1_4 Depth=3
	xorps	%xmm5, %xmm5
	cvtsi2sd	%r11d, %xmm5
	cmpnlesd	%xmm0, %xmm5
	andnpd	%xmm4, %xmm5
.LBB1_6:                                #   in Loop: Header=BB1_4 Depth=3
	movsd	%xmm5, (%r10,%r11,8)
	incq	%r11
	cmpq	%r11, %rax
	jne	.LBB1_4
# %bb.7:                                # %._crit_edge
                                        #   in Loop: Header=BB1_3 Depth=2
	incq	%r8
	cmpq	%rax, %r8
	jne	.LBB1_3
# %bb.8:                                # %._crit_edge37
                                        #   in Loop: Header=BB1_2 Depth=1
	incq	%rcx
	cmpq	%rax, %rcx
	jne	.LBB1_2
.LBB1_9:                                # %._crit_edge39
	retq
.Lfunc_end1:
	.size	_Z10f_init_jacPPPdi, .Lfunc_end1-_Z10f_init_jacPPPdi
	.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
