#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_ADR_tau_1(int, int, int, double *,
                                                   double *, double *, double *,
                                                   double *, double *, double *,
                                                   double *, double *, double *,
                                                   double *);
int /*<<< orphan*/ calculateSubgridError_ADR_tau_2(int, int, int, double *,
                                                   double *, double *, double *,
                                                   double *, double *, double *,
                                                   double *, double *, double *,
                                                   double *);
int /*<<< orphan*/ calculateSubgridError_ADR_tau_p(int, int, int, double *,
                                                   double *, double *, double *,
                                                   double *, double *, double *,
                                                   double *, double *, double *,
                                                   double *);
void calculateSubgridError_ADR_tau(int nElements_global,
                                   int nQuadraturePoints_element, int nSpace,
                                   char stabilization, double *elementDiameter,
                                   double *dmt, double *df, double *a,
                                   double *da, double *grad_phi, double *dphi,
                                   double *dr, double *pe, double *cfl,
                                   double *tau) {
  if (stabilization == '2')
    calculateSubgridError_ADR_tau_2(nElements_global, nQuadraturePoints_element,
                                    nSpace, elementDiameter, dmt, df, a, da,
                                    grad_phi, dphi, dr, pe, cfl, tau);
  else if (stabilization == '1')
    calculateSubgridError_ADR_tau_1(nElements_global, nQuadraturePoints_element,
                                    nSpace, elementDiameter, dmt, df, a, da,
                                    grad_phi, dphi, dr, pe, cfl, tau);
  else if (stabilization == 'p')
    calculateSubgridError_ADR_tau_p(nElements_global, nQuadraturePoints_element,
                                    nSpace, elementDiameter, dmt, df, a, da,
                                    grad_phi, dphi, dr, pe, cfl, tau);
}


x86 assembly (clang, -O0):
<calculateSubgridError_ADR_tau>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %cl,%al
mov    0x50(%rbp),%rcx
mov    0x48(%rbp),%rcx
mov    0x40(%rbp),%rcx
mov    0x38(%rbp),%rcx
mov    0x30(%rbp),%rcx
mov    0x28(%rbp),%rcx
mov    0x20(%rbp),%rcx
mov    0x18(%rbp),%rcx
mov    0x10(%rbp),%rcx
mov    %edi,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %al,-0x35(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
movsbl -0x35(%rbp),%eax
cmp    $0x32,%eax
jne    11ee <calculateSubgridError_ADR_tau+0xbe>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r13
mov    0x20(%rbp),%r12
mov    0x28(%rbp),%r15
mov    0x30(%rbp),%r14
mov    0x38(%rbp),%rbx
mov    0x40(%rbp),%r11
mov    0x48(%rbp),%r10
mov    0x50(%rbp),%rax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1030 <calculateSubgridError_ADR_tau_2@plt>
jmp    12d9 <calculateSubgridError_ADR_tau+0x1a9>
movsbl -0x35(%rbp),%eax
cmp    $0x31,%eax
jne    1261 <calculateSubgridError_ADR_tau+0x131>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r13
mov    0x20(%rbp),%r12
mov    0x28(%rbp),%r15
mov    0x30(%rbp),%r14
mov    0x38(%rbp),%rbx
mov    0x40(%rbp),%r11
mov    0x48(%rbp),%r10
mov    0x50(%rbp),%rax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1050 <calculateSubgridError_ADR_tau_1@plt>
jmp    12d4 <calculateSubgridError_ADR_tau+0x1a4>
movsbl -0x35(%rbp),%eax
cmp    $0x70,%eax
jne    12cf <calculateSubgridError_ADR_tau+0x19f>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r13
mov    0x20(%rbp),%r12
mov    0x28(%rbp),%r15
mov    0x30(%rbp),%r14
mov    0x38(%rbp),%rbx
mov    0x40(%rbp),%r11
mov    0x48(%rbp),%r10
mov    0x50(%rbp),%rax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1040 <calculateSubgridError_ADR_tau_p@plt>
jmp    12d4 <calculateSubgridError_ADR_tau+0x1a4>
jmp    12d9 <calculateSubgridError_ADR_tau+0x1a9>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateSubgridError_ADR_tau>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x80(%rsp),%rbp
mov    0x78(%rsp),%rbx
mov    0x70(%rsp),%r13
mov    0x68(%rsp),%r12
mov    0x60(%rsp),%r15
mov    0x58(%rsp),%r14
mov    0x50(%rsp),%r11
mov    0x48(%rsp),%r10
mov    0x40(%rsp),%rax
cmp    $0x31,%cl
je     1198 <calculateSubgridError_ADR_tau+0x68>
cmp    $0x70,%cl
je     11b6 <calculateSubgridError_ADR_tau+0x86>
cmp    $0x32,%cl
jne    11d8 <calculateSubgridError_ADR_tau+0xa8>
mov    %r8,%rcx
mov    %r9,%r8
mov    %rax,%r9
push   %rbp
push   %rbx
push   %r13
push   %r12
push   %r15
push   %r14
push   %r11
push   %r10
call   1030 <calculateSubgridError_ADR_tau_2@plt>
jmp    11d2 <calculateSubgridError_ADR_tau+0xa2>
mov    %r8,%rcx
mov    %r9,%r8
mov    %rax,%r9
push   %rbp
push   %rbx
push   %r13
push   %r12
push   %r15
push   %r14
push   %r11
push   %r10
call   1050 <calculateSubgridError_ADR_tau_1@plt>
jmp    11d2 <calculateSubgridError_ADR_tau+0xa2>
mov    %r8,%rcx
mov    %r9,%r8
mov    %rax,%r9
push   %rbp
push   %rbx
push   %r13
push   %r12
push   %r15
push   %r14
push   %r11
push   %r10
call   1040 <calculateSubgridError_ADR_tau_p@plt>
add    $0x48,%rsp
jmp    11dc <calculateSubgridError_ADR_tau+0xac>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @calculateSubgridError_ADR_tau(i32 %0, i32 %1, i32 %2, i8 signext %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14) {
switch i8 %3, label %22 [
i8 50, label %16
i8 49, label %18
i8 112, label %20
]
16: ; preds = %15
%17 = tail call i32 @calculateSubgridError_ADR_tau_2(i32 %0, i32 %1, i32 %2, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14)
br label %22
18: ; preds = %15
%19 = tail call i32 @calculateSubgridError_ADR_tau_1(i32 %0, i32 %1, i32 %2, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14)
br label %22
20: ; preds = %15
%21 = tail call i32 @calculateSubgridError_ADR_tau_p(i32 %0, i32 %1, i32 %2, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14)
br label %22
22: ; preds = %15, %18, %20, %16
ret void
}