#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int e_n() {
  int edges = 0, nodes = 0, pNodes = 0, sum = 0;
  printf("Enter the number of edges and nodes: ");
  scanf("%d %d", &edges, &nodes);
  printf("Enter the number of predicate nodes: ");
  scanf("%d", &pNodes);
  return edges - nodes + (2 * pNodes);
}


x86 assembly (clang, -O0):
<e_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_n>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
sub    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
lea    (%rax,%rcx,2),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Enter the number of edges and nodes: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [38 x i8] c"Enter the number of predicate nodes: \00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @e_n() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %3
%13 = mul nsw i32 2, %12
%14 = add nsw i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
@.str = [38 x i8] c"Enter the number of edges and nodes: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [38 x i8] c"Enter the number of predicate nodes: \00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @e_n() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = sub i32 %11, %12
%14 = load i32, i32* %3
%15 = shl nsw i32 %14, 1
%16 = add nsw i32 %13, %15
ret i32 %16
}