#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void e_parameters(double *e_left, double *e_right, double *e_bottom,
                  double *e_top, int i, int j, int nx, int ny) {
  if (i == 1) {
    *e_left = 0.0;
  } else if (i > 1) {
    *e_left = 1.0;
  } else {
    fprintf(stderr, "e_parameters: i value %d not understood\n", i);
    exit(1);
  }
  if (i < nx) {
    *e_right = 1.0;
  } else if (i == nx) {
    *e_right = 0.0;
  } else {
    fprintf(stderr, "e_parameters: i value %d not understood\n", i);
    exit(1);
  }
  if (j == 1) {
    *e_bottom = 0.0;
  } else if (j > 1) {
    *e_bottom = 1.0;
  } else {
    fprintf(stderr, "e_parameters: j value %d not understood\n", j);
    exit(1);
  }
  if (j < ny) {
    *e_top = 1.0;
  } else if (j == ny) {
    *e_top = 0.0;
  } else {
    fprintf(stderr, "e_parameters: j value %d not understood\n", j);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<e_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    1160 <e_parameters+0x40>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    11a6 <e_parameters+0x86>
cmpl   $0x1,-0x24(%rbp)
jle    117f <e_parameters+0x5f>
mov    -0x8(%rbp),%rax
movsd  0xe8a(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    11a1 <e_parameters+0x81>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xe76(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
jmp    11a6 <e_parameters+0x86>
mov    -0x24(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    11c7 <e_parameters+0xa7>
mov    -0x10(%rbp),%rax
movsd  0xe42(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    120a <e_parameters+0xea>
mov    -0x24(%rbp),%eax
cmp    0x10(%rbp),%eax
jne    11e3 <e_parameters+0xc3>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1205 <e_parameters+0xe5>
mov    0x2df6(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xe12(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
jmp    120a <e_parameters+0xea>
cmpl   $0x1,-0x28(%rbp)
jne    1224 <e_parameters+0x104>
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    126a <e_parameters+0x14a>
cmpl   $0x1,-0x28(%rbp)
jle    1243 <e_parameters+0x123>
mov    -0x18(%rbp),%rax
movsd  0xdc6(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1265 <e_parameters+0x145>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%edx
lea    0xddb(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
jmp    126a <e_parameters+0x14a>
mov    -0x28(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    128b <e_parameters+0x16b>
mov    -0x20(%rbp),%rax
movsd  0xd7e(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    12ce <e_parameters+0x1ae>
mov    -0x28(%rbp),%eax
cmp    0x18(%rbp),%eax
jne    12a7 <e_parameters+0x187>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    12c9 <e_parameters+0x1a9>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%edx
lea    0xd77(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
jmp    12ce <e_parameters+0x1ae>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_parameters>:
push   %rax
xorps  %xmm0,%xmm0
cmp    $0x1,%r8d
je     1134 <e_parameters+0x14>
jle    1189 <e_parameters+0x69>
movsd  0xecc(%rip),%xmm0
mov    0x10(%rsp),%eax
movsd  %xmm0,(%rdi)
cmp    %eax,%r8d
jge    114b <e_parameters+0x2b>
movsd  0xeb7(%rip),%xmm0
jmp    1150 <e_parameters+0x30>
xorps  %xmm0,%xmm0
jne    1189 <e_parameters+0x69>
movsd  %xmm0,(%rsi)
xorps  %xmm0,%xmm0
cmp    $0x1,%r9d
je     1167 <e_parameters+0x47>
jle    119e <e_parameters+0x7e>
movsd  0xe99(%rip),%xmm0
mov    0x18(%rsp),%eax
movsd  %xmm0,(%rdx)
cmp    %eax,%r9d
jge    117e <e_parameters+0x5e>
movsd  0xe84(%rip),%xmm0
jmp    1183 <e_parameters+0x63>
xorps  %xmm0,%xmm0
jne    119e <e_parameters+0x7e>
movsd  %xmm0,(%rcx)
pop    %rax
ret
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
lea    0xe6f(%rip),%rsi
mov    %r8d,%edx
jmp    11b1 <e_parameters+0x91>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
lea    0xe83(%rip),%rsi
mov    %r9d,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"e_parameters: i value %d not understood\0A\00"
@.str.1 = [41 x i8] c"e_parameters: j value %d not understood\0A\00"
define void @e_parameters(double* %0, double* %1, double* %2, double* %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %13
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %21
19: ; preds = %8
%20 = load double*, double** %9
store double 0.000000e+00, double* %20
br label %32
21: ; preds = %8
%22 = load i32, i32* %13
%23 = icmp sgt i32 %22, 1
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = load double*, double** %9
store double 1.000000e+00, double* %25
br label %31
26: ; preds = %21
%27 = load i32, i32* @stderr
%28 = load i32, i32* %13
%29 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = call i32 @exit(i32 1)
unreachable
31: ; preds = %24
br label %32
32: ; preds = %31, %19
%33 = load i32, i32* %13
%34 = load i32, i32* %15
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load double*, double** %10
store double 1.000000e+00, double* %37
br label %50
38: ; preds = %32
%39 = load i32, i32* %13
%40 = load i32, i32* %15
%41 = icmp eq i32 %39, %40
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = load double*, double** %10
store double 0.000000e+00, double* %43
br label %49
44: ; preds = %38
%45 = load i32, i32* @stderr
%46 = load i32, i32* %13
%47 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %46)
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %42
br label %50
50: ; preds = %49, %36
%51 = load i32, i32* %14
%52 = icmp eq i32 %51, 1
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = load double*, double** %11
store double 0.000000e+00, double* %54
br label %66
55: ; preds = %50
%56 = load i32, i32* %14
%57 = icmp sgt i32 %56, 1
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = load double*, double** %11
store double 1.000000e+00, double* %59
br label %65
60: ; preds = %55
%61 = load i32, i32* @stderr
%62 = load i32, i32* %14
%63 = call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %62)
%64 = call i32 @exit(i32 1)
unreachable
65: ; preds = %58
br label %66
66: ; preds = %65, %53
%67 = load i32, i32* %14
%68 = load i32, i32* %16
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %72
70: ; preds = %66
%71 = load double*, double** %12
store double 1.000000e+00, double* %71
br label %84
72: ; preds = %66
%73 = load i32, i32* %14
%74 = load i32, i32* %16
%75 = icmp eq i32 %73, %74
br i1 %75, label %76, label %78
76: ; preds = %72
%77 = load double*, double** %12
store double 0.000000e+00, double* %77
br label %83
78: ; preds = %72
%79 = load i32, i32* @stderr
%80 = load i32, i32* %14
%81 = call i32 @fprintf(i32 %79, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %80)
%82 = call i32 @exit(i32 1)
unreachable
83: ; preds = %76
br label %84
84: ; preds = %83, %70
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"e_parameters: i value %d not understood\0A\00"
@.str.1 = [41 x i8] c"e_parameters: j value %d not understood\0A\00"
define void @e_parameters(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = icmp eq i32 %4, 1
br i1 %9, label %16, label %10
10: ; preds = %8
%11 = icmp sgt i32 %4, 1
br i1 %11, label %16, label %12
12: ; preds = %10
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %4)
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %10, %8
%17 = phi double [ 0.000000e+00, %8 ], [ 1.000000e+00, %10 ]
store double %17, double* %0
%18 = icmp slt i32 %4, %6
br i1 %18, label %25, label %19
19: ; preds = %16
%20 = icmp eq i32 %4, %6
br i1 %20, label %25, label %21
21: ; preds = %19
%22 = load i32, i32* @stderr
%23 = tail call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %4)
%24 = tail call i32 @exit(i32 1)
unreachable
25: ; preds = %19, %16
%26 = phi double [ 1.000000e+00, %16 ], [ 0.000000e+00, %19 ]
store double %26, double* %1
%27 = icmp eq i32 %5, 1
br i1 %27, label %34, label %28
28: ; preds = %25
%29 = icmp sgt i32 %5, 1
br i1 %29, label %34, label %30
30: ; preds = %28
%31 = load i32, i32* @stderr
%32 = tail call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%33 = tail call i32 @exit(i32 1)
unreachable
34: ; preds = %28, %25
%35 = phi double [ 0.000000e+00, %25 ], [ 1.000000e+00, %28 ]
store double %35, double* %2
%36 = icmp slt i32 %5, %7
br i1 %36, label %43, label %37
37: ; preds = %34
%38 = icmp eq i32 %5, %7
br i1 %38, label %43, label %39
39: ; preds = %37
%40 = load i32, i32* @stderr
%41 = tail call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%42 = tail call i32 @exit(i32 1)
unreachable
43: ; preds = %37, %34
%44 = phi double [ 1.000000e+00, %34 ], [ 0.000000e+00, %37 ]
store double %44, double* %3
ret void
}