#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*/ calculateSubgridError_A_tau_1(int, int, int, double *,
                                                 double *, double *, double *,
                                                 double *);
int /*<<< orphan*/ calculateSubgridError_A_tau_2(int, int, int, double *,
                                                 double *, double *, double *,
                                                 double *);
void calculateSubgridError_A_tau(int nElements_global,
                                 int nQuadraturePoints_element, int nSpace,
                                 char stabilization, double *elementDiameter,
                                 double *dmt, double *df, double *cfl,
                                 double *tau) {
  if (stabilization == '2')
    calculateSubgridError_A_tau_2(nElements_global, nQuadraturePoints_element,
                                  nSpace, elementDiameter, dmt, df, cfl, tau);
  else if (stabilization == '1')
    calculateSubgridError_A_tau_1(nElements_global, nQuadraturePoints_element,
                                  nSpace, elementDiameter, dmt, df, cfl, tau);
}


x86 assembly (clang, -O0):
<calculateSubgridError_A_tau>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %cl,%al
mov    0x20(%rbp),%rcx
mov    0x18(%rbp),%rcx
mov    0x10(%rbp),%rcx
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x32,%eax
jne    1187 <calculateSubgridError_A_tau+0x67>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <calculateSubgridError_A_tau_2@plt>
jmp    11c4 <calculateSubgridError_A_tau+0xa4>
movsbl -0xd(%rbp),%eax
cmp    $0x31,%eax
jne    11bf <calculateSubgridError_A_tau+0x9f>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <calculateSubgridError_A_tau_1@plt>
jmp    11c4 <calculateSubgridError_A_tau+0xa4>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateSubgridError_A_tau>:
push   %rax
mov    0x20(%rsp),%r11
mov    0x18(%rsp),%r10
mov    0x10(%rsp),%rax
cmp    $0x31,%cl
je     114e <calculateSubgridError_A_tau+0x2e>
cmp    $0x32,%cl
jne    1164 <calculateSubgridError_A_tau+0x44>
mov    %r8,%rcx
mov    %r9,%r8
mov    %rax,%r9
push   %r11
push   %r10
call   1040 <calculateSubgridError_A_tau_2@plt>
jmp    1160 <calculateSubgridError_A_tau+0x40>
mov    %r8,%rcx
mov    %r9,%r8
mov    %rax,%r9
push   %r11
push   %r10
call   1030 <calculateSubgridError_A_tau_1@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @calculateSubgridError_A_tau(i32 %0, i32 %1, i32 %2, i8 signext %3, double* %4, double* %5, double* %6, double* %7, double* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i8 %3, i8* %13
store double* %4, double** %14
store double* %5, double** %15
store double* %6, double** %16
store double* %7, double** %17
store double* %8, double** %18
%19 = load i8, i8* %13
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 50
br i1 %21, label %22, label %32
22: ; preds = %9
%23 = load i32, i32* %10
%24 = load i32, i32* %11
%25 = load i32, i32* %12
%26 = load double*, double** %14
%27 = load double*, double** %15
%28 = load double*, double** %16
%29 = load double*, double** %17
%30 = load double*, double** %18
%31 = call i32 @calculateSubgridError_A_tau_2(i32 %23, i32 %24, i32 %25, double* %26, double* %27, double* %28, double* %29, double* %30)
br label %47
32: ; preds = %9
%33 = load i8, i8* %13
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 49
br i1 %35, label %36, label %46
36: ; preds = %32
%37 = load i32, i32* %10
%38 = load i32, i32* %11
%39 = load i32, i32* %12
%40 = load double*, double** %14
%41 = load double*, double** %15
%42 = load double*, double** %16
%43 = load double*, double** %17
%44 = load double*, double** %18
%45 = call i32 @calculateSubgridError_A_tau_1(i32 %37, i32 %38, i32 %39, double* %40, double* %41, double* %42, double* %43, double* %44)
br label %46
46: ; preds = %36, %32
br label %47
47: ; preds = %46, %22
ret void
}

LLVM IR (-O2):
define void @calculateSubgridError_A_tau(i32 %0, i32 %1, i32 %2, i8 signext %3, double* %4, double* %5, double* %6, double* %7, double* %8) {
switch i8 %3, label %14 [
i8 50, label %10
i8 49, label %12
]
10: ; preds = %9
%11 = tail call i32 @calculateSubgridError_A_tau_2(i32 %0, i32 %1, i32 %2, double* %4, double* %5, double* %6, double* %7, double* %8)
br label %14
12: ; preds = %9
%13 = tail call i32 @calculateSubgridError_A_tau_1(i32 %0, i32 %1, i32 %2, double* %4, double* %5, double* %6, double* %7, double* %8)
br label %14
14: ; preds = %9, %12, %10
ret void
}