#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*/ Periodic_XZ_flux(double *, double *, int, int, int, int,
                                    int);
int /*<<< orphan*/ Periodic_YZ_flux(double *, double *, int, int, int, int,
                                    int);
void flux_2D_BC_1(double *phi_fv, double *u_buff, int nX, int nY,
                  double delta_x) {
  Periodic_XZ_flux(phi_fv, u_buff, nX, nY, 1, 1, (nY - 3));
  Periodic_XZ_flux(phi_fv, u_buff, nX, nY, 1, (nY - 3), 1);
  Periodic_YZ_flux(phi_fv, u_buff, nX, nY, 1, 1, (nX - 3));
  Periodic_YZ_flux(phi_fv, u_buff, nX, nY, 1, (nX - 3), 1);
}


x86 assembly (clang, -O0):
<flux_2D_BC_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x18(%rbp),%eax
sub    $0x3,%eax
mov    $0x1,%r9d
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1030 <Periodic_XZ_flux@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x18(%rbp),%r9d
sub    $0x3,%r9d
mov    $0x1,%r8d
movl   $0x1,(%rsp)
call   1030 <Periodic_XZ_flux@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
mov    $0x1,%r9d
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <Periodic_YZ_flux@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r9d
sub    $0x3,%r9d
mov    $0x1,%r8d
movl   $0x1,(%rsp)
call   1040 <Periodic_YZ_flux@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flux_2D_BC_1>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %rsi,%r15
mov    %rdi,%r12
lea    -0x3(%r14),%ebp
mov    %ebp,(%rsp)
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1030 <Periodic_XZ_flux@plt>
movl   $0x1,(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %r14d,%ecx
mov    $0x1,%r8d
mov    %ebp,%r9d
call   1030 <Periodic_XZ_flux@plt>
lea    -0x3(%rbx),%ebp
mov    %ebp,(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %r14d,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <Periodic_YZ_flux@plt>
movl   $0x1,(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %r14d,%ecx
mov    $0x1,%r8d
mov    %ebp,%r9d
call   1040 <Periodic_YZ_flux@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @flux_2D_BC_1(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** %6
%12 = load double*, double** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %9
%16 = sub nsw i32 %15, 3
%17 = call i32 @Periodic_XZ_flux(double* %11, double* %12, i32 %13, i32 %14, i32 1, i32 1, i32 %16)
%18 = load double*, double** %6
%19 = load double*, double** %7
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = load i32, i32* %9
%23 = sub nsw i32 %22, 3
%24 = call i32 @Periodic_XZ_flux(double* %18, double* %19, i32 %20, i32 %21, i32 1, i32 %23, i32 1)
%25 = load double*, double** %6
%26 = load double*, double** %7
%27 = load i32, i32* %8
%28 = load i32, i32* %9
%29 = load i32, i32* %8
%30 = sub nsw i32 %29, 3
%31 = call i32 @Periodic_YZ_flux(double* %25, double* %26, i32 %27, i32 %28, i32 1, i32 1, i32 %30)
%32 = load double*, double** %6
%33 = load double*, double** %7
%34 = load i32, i32* %8
%35 = load i32, i32* %9
%36 = load i32, i32* %8
%37 = sub nsw i32 %36, 3
%38 = call i32 @Periodic_YZ_flux(double* %32, double* %33, i32 %34, i32 %35, i32 1, i32 %37, i32 1)
ret void
}

LLVM IR (-O2):
define void @flux_2D_BC_1(double* %0, double* %1, i32 %2, i32 %3, double %4) {
%6 = add nsw i32 %3, -3
%7 = tail call i32 @Periodic_XZ_flux(double* %0, double* %1, i32 %2, i32 %3, i32 1, i32 1, i32 %6)
%8 = tail call i32 @Periodic_XZ_flux(double* %0, double* %1, i32 %2, i32 %3, i32 1, i32 %6, i32 1)
%9 = add nsw i32 %2, -3
%10 = tail call i32 @Periodic_YZ_flux(double* %0, double* %1, i32 %2, i32 %3, i32 1, i32 1, i32 %9)
%11 = tail call i32 @Periodic_YZ_flux(double* %0, double* %1, i32 %2, i32 %3, i32 1, i32 %9, i32 1)
ret void
}