#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*/ Zero_XZ(double *, int, int, int, int);
int /*<<< orphan*/ Zero_YZ(double *, int, int, int, int);
void facevals_2D_BC_2(double *phi, double *phi_fv, int nX, int nY,
                      double delta_x) {
  Zero_XZ(phi_fv + nX * nY, nX, nY, 1, 1);
  Zero_XZ(phi_fv + nX * nY, nX, nY, 1, (nY - 3));
  Zero_YZ(phi_fv, nX, nY, 1, 1);
  Zero_YZ(phi_fv, nX, nY, 1, (nX - 3));
}


x86 assembly (clang, -O0):
<facevals_2D_BC_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1040 <Zero_XZ@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x18(%rbp),%r8d
sub    $0x3,%r8d
mov    $0x1,%ecx
call   1040 <Zero_XZ@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1030 <Zero_YZ@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%r8d
sub    $0x3,%r8d
mov    $0x1,%ecx
call   1030 <Zero_YZ@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<facevals_2D_BC_2>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %rsi,%r15
mov    %ecx,%eax
imul   %edx,%eax
cltq
lea    (%rsi,%rax,8),%r12
mov    %r12,%rdi
mov    %edx,%esi
mov    %ecx,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
call   1040 <Zero_XZ@plt>
lea    -0x3(%r14),%r8d
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    $0x1,%ecx
call   1040 <Zero_XZ@plt>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
call   1030 <Zero_YZ@plt>
lea    -0x3(%rbx),%r8d
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    $0x1,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <Zero_YZ@plt>

LLVM IR (-O0):
define void @facevals_2D_BC_2(double* %0, double* %1, i32 %2, i32 %3, double %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
store double* %0, double** %6
store double* %1, double** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double %4, double* %10
%11 = load double*, double** %7
%12 = load i32, i32* %8
%13 = load i32, i32* %9
%14 = mul nsw i32 %12, %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %11, i64 %15
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = call i32 @Zero_XZ(double* %16, i32 %17, i32 %18, i32 1, i32 1)
%20 = load double*, double** %7
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = mul nsw i32 %21, %22
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %20, i64 %24
%26 = load i32, i32* %8
%27 = load i32, i32* %9
%28 = load i32, i32* %9
%29 = sub nsw i32 %28, 3
%30 = call i32 @Zero_XZ(double* %25, i32 %26, i32 %27, i32 1, i32 %29)
%31 = load double*, double** %7
%32 = load i32, i32* %8
%33 = load i32, i32* %9
%34 = call i32 @Zero_YZ(double* %31, i32 %32, i32 %33, i32 1, i32 1)
%35 = load double*, double** %7
%36 = load i32, i32* %8
%37 = load i32, i32* %9
%38 = load i32, i32* %8
%39 = sub nsw i32 %38, 3
%40 = call i32 @Zero_YZ(double* %35, i32 %36, i32 %37, i32 1, i32 %39)
ret void
}

LLVM IR (-O2):
define void @facevals_2D_BC_2(double* nocapture readnone %0, double* %1, i32 %2, i32 %3, double %4) {
%6 = mul nsw i32 %3, %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds double, double* %1, i64 %7
%9 = tail call i32 @Zero_XZ(double* %8, i32 %2, i32 %3, i32 1, i32 1)
%10 = add nsw i32 %3, -3
%11 = tail call i32 @Zero_XZ(double* %8, i32 %2, i32 %3, i32 1, i32 %10)
%12 = tail call i32 @Zero_YZ(double* %1, i32 %2, i32 %3, i32 1, i32 1)
%13 = add nsw i32 %2, -3
%14 = tail call i32 @Zero_YZ(double* %1, i32 %2, i32 %3, i32 1, i32 %13)
ret void
}