#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ Neumann_XY(double *, int, int, int, int, int, int, double);
int /*<<< orphan*/ Neumann_XZ(double *, int, int, int, int, int, int, double);
int /*<<< orphan*/ Neumann_YZ(double *, int, int, int, int, int, int, double);
void Phi_3D_BC_2(double *phi, int nX, int nY, int nZ, double delta_x) {
  Neumann_XZ(phi, nX, nY, nZ, 1, 1, 0., delta_x);
  Neumann_XZ(phi, nX, nY, nZ, (nY - 2), -1, 0., delta_x);
  Neumann_XY(phi, nX, nY, nZ, 1, 1, 0., delta_x);
  Neumann_XY(phi, nX, nY, nZ, (nZ - 2), -1, 0., delta_x);
  Neumann_YZ(phi, nX, nY, nZ, 1, 1, 0., delta_x);
  Neumann_YZ(phi, nX, nY, nZ, (nX - 2), -1, 0., delta_x);
  Neumann_XZ(phi, nX, nY, nZ, 0, 1, 0., delta_x);
  Neumann_XZ(phi, nX, nY, nZ, (nY - 1), -1, 0., delta_x);
  Neumann_XY(phi, nX, nY, nZ, 0, 1, 0., delta_x);
  Neumann_XY(phi, nX, nY, nZ, (nZ - 1), -1, 0., delta_x);
  Neumann_YZ(phi, nX, nY, nZ, 0, 1, 0., delta_x);
  Neumann_YZ(phi, nX, nY, nZ, (nX - 1), -1, 0., delta_x);
}


x86 assembly (clang, -O0):
<Phi_3D_BC_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%r9d
xor    %eax,%eax
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <Neumann_XZ@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
sub    $0x2,%r8d
movsd  -0x20(%rbp),%xmm0
mov    $0xffffffff,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <Neumann_XZ@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%r9d
xor    %eax,%eax
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1050 <Neumann_XY@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
sub    $0x2,%r8d
movsd  -0x20(%rbp),%xmm0
mov    $0xffffffff,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1050 <Neumann_XY@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%r9d
xor    %eax,%eax
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1040 <Neumann_YZ@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0xc(%rbp),%r8d
sub    $0x2,%r8d
movsd  -0x20(%rbp),%xmm0
mov    $0xffffffff,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1040 <Neumann_YZ@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
xor    %r8d,%r8d
mov    $0x1,%r9d
movl   $0x0,(%rsp)
call   1030 <Neumann_XZ@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
sub    $0x1,%r8d
movsd  -0x20(%rbp),%xmm0
mov    $0xffffffff,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <Neumann_XZ@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
xor    %r8d,%r8d
mov    $0x1,%r9d
movl   $0x0,(%rsp)
call   1050 <Neumann_XY@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
sub    $0x1,%r8d
movsd  -0x20(%rbp),%xmm0
mov    $0xffffffff,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1050 <Neumann_XY@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
xor    %r8d,%r8d
mov    $0x1,%r9d
movl   $0x0,(%rsp)
call   1040 <Neumann_YZ@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0xc(%rbp),%r8d
sub    $0x1,%r8d
movsd  -0x20(%rbp),%xmm0
mov    $0xffffffff,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1040 <Neumann_YZ@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Phi_3D_BC_2>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%r12
movl   $0x0,(%rsp)
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1030 <Neumann_XZ@plt>
lea    -0x2(%r15),%r8d
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xffffffff,%r9d
movsd  0x10(%rsp),%xmm0
call   1030 <Neumann_XZ@plt>
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
movsd  0x10(%rsp),%xmm0
call   1050 <Neumann_XY@plt>
lea    -0x2(%r14),%r8d
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xffffffff,%r9d
movsd  0x10(%rsp),%xmm0
call   1050 <Neumann_XY@plt>
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
movsd  0x10(%rsp),%xmm0
call   1040 <Neumann_YZ@plt>
lea    -0x2(%rbx),%r8d
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xffffffff,%r9d
movsd  0x10(%rsp),%xmm0
call   1040 <Neumann_YZ@plt>
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
movsd  0x10(%rsp),%xmm0
call   1030 <Neumann_XZ@plt>
lea    -0x1(%r15),%r8d
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xffffffff,%r9d
movsd  0x10(%rsp),%xmm0
call   1030 <Neumann_XZ@plt>
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
movsd  0x10(%rsp),%xmm0
call   1050 <Neumann_XY@plt>
lea    -0x1(%r14),%r8d
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xffffffff,%r9d
movsd  0x10(%rsp),%xmm0
call   1050 <Neumann_XY@plt>
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
movsd  0x10(%rsp),%xmm0
call   1040 <Neumann_YZ@plt>
lea    -0x1(%rbx),%r8d
movl   $0x0,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xffffffff,%r9d
movsd  0x10(%rsp),%xmm0
call   1040 <Neumann_YZ@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Phi_3D_BC_2(double* %0, i32 %1, i32 %2, i32 %3, double %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
store double* %0, double** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double %4, double* %10
%11 = load double*, double** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load double, double* %10
%16 = call i32 @Neumann_XZ(double* %11, i32 %12, i32 %13, i32 %14, i32 1, i32 1, i32 0, double %15)
%17 = load double*, double** %6
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = load i32, i32* %9
%21 = load i32, i32* %8
%22 = sub nsw i32 %21, 2
%23 = load double, double* %10
%24 = call i32 @Neumann_XZ(double* %17, i32 %18, i32 %19, i32 %20, i32 %22, i32 -1, i32 0, double %23)
%25 = load double*, double** %6
%26 = load i32, i32* %7
%27 = load i32, i32* %8
%28 = load i32, i32* %9
%29 = load double, double* %10
%30 = call i32 @Neumann_XY(double* %25, i32 %26, i32 %27, i32 %28, i32 1, i32 1, i32 0, double %29)
%31 = load double*, double** %6
%32 = load i32, i32* %7
%33 = load i32, i32* %8
%34 = load i32, i32* %9
%35 = load i32, i32* %9
%36 = sub nsw i32 %35, 2
%37 = load double, double* %10
%38 = call i32 @Neumann_XY(double* %31, i32 %32, i32 %33, i32 %34, i32 %36, i32 -1, i32 0, double %37)
%39 = load double*, double** %6
%40 = load i32, i32* %7
%41 = load i32, i32* %8
%42 = load i32, i32* %9
%43 = load double, double* %10
%44 = call i32 @Neumann_YZ(double* %39, i32 %40, i32 %41, i32 %42, i32 1, i32 1, i32 0, double %43)
%45 = load double*, double** %6
%46 = load i32, i32* %7
%47 = load i32, i32* %8
%48 = load i32, i32* %9
%49 = load i32, i32* %7
%50 = sub nsw i32 %49, 2
%51 = load double, double* %10
%52 = call i32 @Neumann_YZ(double* %45, i32 %46, i32 %47, i32 %48, i32 %50, i32 -1, i32 0, double %51)
%53 = load double*, double** %6
%54 = load i32, i32* %7
%55 = load i32, i32* %8
%56 = load i32, i32* %9
%57 = load double, double* %10
%58 = call i32 @Neumann_XZ(double* %53, i32 %54, i32 %55, i32 %56, i32 0, i32 1, i32 0, double %57)
%59 = load double*, double** %6
%60 = load i32, i32* %7
%61 = load i32, i32* %8
%62 = load i32, i32* %9
%63 = load i32, i32* %8
%64 = sub nsw i32 %63, 1
%65 = load double, double* %10
%66 = call i32 @Neumann_XZ(double* %59, i32 %60, i32 %61, i32 %62, i32 %64, i32 -1, i32 0, double %65)
%67 = load double*, double** %6
%68 = load i32, i32* %7
%69 = load i32, i32* %8
%70 = load i32, i32* %9
%71 = load double, double* %10
%72 = call i32 @Neumann_XY(double* %67, i32 %68, i32 %69, i32 %70, i32 0, i32 1, i32 0, double %71)
%73 = load double*, double** %6
%74 = load i32, i32* %7
%75 = load i32, i32* %8
%76 = load i32, i32* %9
%77 = load i32, i32* %9
%78 = sub nsw i32 %77, 1
%79 = load double, double* %10
%80 = call i32 @Neumann_XY(double* %73, i32 %74, i32 %75, i32 %76, i32 %78, i32 -1, i32 0, double %79)
%81 = load double*, double** %6
%82 = load i32, i32* %7
%83 = load i32, i32* %8
%84 = load i32, i32* %9
%85 = load double, double* %10
%86 = call i32 @Neumann_YZ(double* %81, i32 %82, i32 %83, i32 %84, i32 0, i32 1, i32 0, double %85)
%87 = load double*, double** %6
%88 = load i32, i32* %7
%89 = load i32, i32* %8
%90 = load i32, i32* %9
%91 = load i32, i32* %7
%92 = sub nsw i32 %91, 1
%93 = load double, double* %10
%94 = call i32 @Neumann_YZ(double* %87, i32 %88, i32 %89, i32 %90, i32 %92, i32 -1, i32 0, double %93)
ret void
}

LLVM IR (-O2):
define void @Phi_3D_BC_2(double* %0, i32 %1, i32 %2, i32 %3, double %4) {
%6 = tail call i32 @Neumann_XZ(double* %0, i32 %1, i32 %2, i32 %3, i32 1, i32 1, i32 0, double %4)
%7 = add nsw i32 %2, -2
%8 = tail call i32 @Neumann_XZ(double* %0, i32 %1, i32 %2, i32 %3, i32 %7, i32 -1, i32 0, double %4)
%9 = tail call i32 @Neumann_XY(double* %0, i32 %1, i32 %2, i32 %3, i32 1, i32 1, i32 0, double %4)
%10 = add nsw i32 %3, -2
%11 = tail call i32 @Neumann_XY(double* %0, i32 %1, i32 %2, i32 %3, i32 %10, i32 -1, i32 0, double %4)
%12 = tail call i32 @Neumann_YZ(double* %0, i32 %1, i32 %2, i32 %3, i32 1, i32 1, i32 0, double %4)
%13 = add nsw i32 %1, -2
%14 = tail call i32 @Neumann_YZ(double* %0, i32 %1, i32 %2, i32 %3, i32 %13, i32 -1, i32 0, double %4)
%15 = tail call i32 @Neumann_XZ(double* %0, i32 %1, i32 %2, i32 %3, i32 0, i32 1, i32 0, double %4)
%16 = add nsw i32 %2, -1
%17 = tail call i32 @Neumann_XZ(double* %0, i32 %1, i32 %2, i32 %3, i32 %16, i32 -1, i32 0, double %4)
%18 = tail call i32 @Neumann_XY(double* %0, i32 %1, i32 %2, i32 %3, i32 0, i32 1, i32 0, double %4)
%19 = add nsw i32 %3, -1
%20 = tail call i32 @Neumann_XY(double* %0, i32 %1, i32 %2, i32 %3, i32 %19, i32 -1, i32 0, double %4)
%21 = tail call i32 @Neumann_YZ(double* %0, i32 %1, i32 %2, i32 %3, i32 0, i32 1, i32 0, double %4)
%22 = add nsw i32 %1, -1
%23 = tail call i32 @Neumann_YZ(double* %0, i32 %1, i32 %2, i32 %3, i32 %22, i32 -1, i32 0, double %4)
ret void
}