#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 */
scalar_t__ isregular(double *, int);
int /*<<< orphan*/ nonreg_ev(double *, double *, double *, double *, double *,
                             double *, double *, double *, int, int, int, int);
int /*<<< orphan*/ reg_ev(double *, double *, double *, double *, double *,
                          double *, double *, double *, int, int, int, int);
void ev(double val[], double x0[], double x1[], double x2[], double f[],
        double fx0[], double fx1[], double fx2[], int ix0, int ix1, int ix2,
        int ix) {
  if (isregular(fx0, ix0) && isregular(fx1, ix1) && isregular(fx2, ix2)) {
    reg_ev(val, x0, x1, x2, f, fx0, fx1, fx2, ix0, ix1, ix2, ix);
  } else {
    nonreg_ev(val, x0, x1, x2, f, fx0, fx1, fx2, ix0, ix1, ix2, ix);
  }
}


x86 assembly (clang, -O0):
<ev>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    0x20(%rbp),%esi
call   1030 <isregular@plt>
cmp    $0x0,%rax
je     11fe <ev+0xce>
mov    0x10(%rbp),%rdi
mov    0x28(%rbp),%esi
call   1030 <isregular@plt>
cmp    $0x0,%rax
je     11fe <ev+0xce>
mov    0x18(%rbp),%rdi
mov    0x30(%rbp),%esi
call   1030 <isregular@plt>
cmp    $0x0,%rax
je     11fe <ev+0xce>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%r15
mov    0x18(%rbp),%r14
mov    0x20(%rbp),%ebx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1040 <reg_ev@plt>
jmp    124c <ev+0x11c>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%r15
mov    0x18(%rbp),%r14
mov    0x20(%rbp),%ebx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1050 <nonreg_ev@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<ev>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%rbx
mov    %r8,0x20(%rsp)
mov    %rcx,0x18(%rsp)
mov    %rdx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdi,%r12
mov    0x98(%rsp),%eax
mov    %rax,0x30(%rsp)
mov    0x90(%rsp),%ebp
mov    0x88(%rsp),%r15d
mov    0x80(%rsp),%r13d
mov    0x78(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0x70(%rsp),%r14
mov    %r9,%rdi
mov    %r13d,%esi
call   1030 <isregular@plt>
test   %rax,%rax
je     11e8 <ev+0xb8>
mov    %r14,%rdi
mov    %r15d,%esi
call   1030 <isregular@plt>
test   %rax,%rax
je     11e8 <ev+0xb8>
mov    0x28(%rsp),%rdi
mov    %ebp,%esi
call   1030 <isregular@plt>
test   %rax,%rax
je     11e8 <ev+0xb8>
mov    %r12,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    0x20(%rsp),%r8
mov    %rbx,%r9
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <reg_ev@plt>
mov    %r12,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    0x20(%rsp),%r8
mov    %rbx,%r9
push   0x30(%rsp)
push   %rbp
push   %r15
push   %r13
push   0x48(%rsp)
push   %r14
call   1050 <nonreg_ev@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @ev(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store double* %0, double** %13
store double* %1, double** %14
store double* %2, double** %15
store double* %3, double** %16
store double* %4, double** %17
store double* %5, double** %18
store double* %6, double** %19
store double* %7, double** %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32 %10, i32* %23
store i32 %11, i32* %24
%25 = load double*, double** %18
%26 = load i32, i32* %21
%27 = call i64 @isregular(double* %25, i32 %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %53
29: ; preds = %12
%30 = load double*, double** %19
%31 = load i32, i32* %22
%32 = call i64 @isregular(double* %30, i32 %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %53
34: ; preds = %29
%35 = load double*, double** %20
%36 = load i32, i32* %23
%37 = call i64 @isregular(double* %35, i32 %36)
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %53
39: ; preds = %34
%40 = load double*, double** %13
%41 = load double*, double** %14
%42 = load double*, double** %15
%43 = load double*, double** %16
%44 = load double*, double** %17
%45 = load double*, double** %18
%46 = load double*, double** %19
%47 = load double*, double** %20
%48 = load i32, i32* %21
%49 = load i32, i32* %22
%50 = load i32, i32* %23
%51 = load i32, i32* %24
%52 = call i32 @reg_ev(double* %40, double* %41, double* %42, double* %43, double* %44, double* %45, double* %46, double* %47, i32 %48, i32 %49, i32 %50, i32 %51)
br label %67
53: ; preds = %34, %29, %12
%54 = load double*, double** %13
%55 = load double*, double** %14
%56 = load double*, double** %15
%57 = load double*, double** %16
%58 = load double*, double** %17
%59 = load double*, double** %18
%60 = load double*, double** %19
%61 = load double*, double** %20
%62 = load i32, i32* %21
%63 = load i32, i32* %22
%64 = load i32, i32* %23
%65 = load i32, i32* %24
%66 = call i32 @nonreg_ev(double* %54, double* %55, double* %56, double* %57, double* %58, double* %59, double* %60, double* %61, i32 %62, i32 %63, i32 %64, i32 %65)
br label %67
67: ; preds = %53, %39
ret void
}

LLVM IR (-O2):
define void @ev(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = tail call i64 @isregular(double* %5, i32 %8)
%14 = icmp eq i64 %13, 0
br i1 %14, label %23, label %15
15: ; preds = %12
%16 = tail call i64 @isregular(double* %6, i32 %9)
%17 = icmp eq i64 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %15
%19 = tail call i64 @isregular(double* %7, i32 %10)
%20 = icmp eq i64 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = tail call i32 @reg_ev(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, i32 %8, i32 %9, i32 %10, i32 %11)
br label %25
23: ; preds = %18, %15, %12
%24 = tail call i32 @nonreg_ev(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, i32 %8, i32 %9, i32 %10, i32 %11)
br label %25
25: ; preds = %23, %21
ret void
}