#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 */
double compute_boundary_y(double, double);
scalar_t__ is_internal(int, int);
double lambda_E(int i, int j) {
  if (is_internal(i, j - 1))
    return 1.0;
  return ((-1.5) + j * ((3.0) / (256))) -
         compute_boundary_y((-1.5) + i * ((3.0) / (256)),
                            (-1.5) + j * ((3.0) / (256)));
}


x86 assembly (clang, -O0):
<lambda_E>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
sub    $0x1,%esi
call   1030 <is_internal@plt>
cmp    $0x0,%rax
je     1158 <lambda_E+0x38>
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11ca <lambda_E+0xaa>
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xe9b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe97(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe75(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xe5c(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe58(%rip),%xmm2
addsd  %xmm2,%xmm1
call   1040 <compute_boundary_y@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lambda_E>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    -0x1(%rbx),%esi
call   1030 <is_internal@plt>
test   %rax,%rax
je     113e <lambda_E+0x1e>
movsd  0xec4(%rip),%xmm0
jmp    117d <lambda_E+0x5d>
cvtsi2sd %ebx,%xmm1
movsd  0xebe(%rip),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xeba(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
cvtsi2sd %ebp,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
call   1040 <compute_boundary_y@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @lambda_E(i32 %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = sub nsw i32 %7, 1
%9 = call i64 @is_internal(i32 %6, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store double 1.000000e+00, double* %3
br label %24
12: ; preds = %2
%13 = load i32, i32* %5
%14 = sitofp i32 %13 to double
%15 = call double @llvm.fmuladd.f64(double %14, double 0x3F88000000000000, double -1.500000e+00)
%16 = load i32, i32* %4
%17 = sitofp i32 %16 to double
%18 = call double @llvm.fmuladd.f64(double %17, double 0x3F88000000000000, double -1.500000e+00)
%19 = load i32, i32* %5
%20 = sitofp i32 %19 to double
%21 = call double @llvm.fmuladd.f64(double %20, double 0x3F88000000000000, double -1.500000e+00)
%22 = call double @compute_boundary_y(double %18, double %21)
%23 = fsub double %15, %22
store double %23, double* %3
br label %24
24: ; preds = %12, %11
%25 = load double, double* %3
ret double %25
}

LLVM IR (-O2):
define double @lambda_E(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i64 @is_internal(i32 %0, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = sitofp i32 %1 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3F88000000000000, double -1.500000e+00)
%9 = sitofp i32 %0 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3F88000000000000, double -1.500000e+00)
%11 = tail call double @compute_boundary_y(double %10, double %8)
%12 = fsub double %8, %11
br label %13
13: ; preds = %2, %6
%14 = phi double [ %12, %6 ], [ 1.000000e+00, %2 ]
ret double %14
}