#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 *, int *, int *);
int main() {
  int A, B, C, D;
  scanf("%i %i %i %i", &A, &B, &C, &D);
  if (B > C) {
    if (D > A) {
      if (C + D > A + B) {
        if (C > 0 && D > 0) {
          if (A % 2 == 0) {
            printf("Valores aceitos\n");
          }
        }
      }
    }
  } else {
    printf("Valores nao aceitos\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11bf <main+0x9f>
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11ba <main+0x9a>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jle    11b5 <main+0x95>
cmpl   $0x0,-0x10(%rbp)
jle    11b0 <main+0x90>
cmpl   $0x0,-0x14(%rbp)
jle    11b0 <main+0x90>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11ab <main+0x8b>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
jmp    11b0 <main+0x90>
jmp    11b5 <main+0x95>
jmp    11ba <main+0x9a>
jmp    11cb <main+0xab>
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%ecx
cmp    %ecx,%esi
jle    117b <main+0x5b>
mov    0x8(%rsp),%edx
mov    0x14(%rsp),%eax
cmp    %eax,%edx
jle    1187 <main+0x67>
lea    (%rdx,%rcx,1),%edi
add    %eax,%esi
cmp    %esi,%edi
jle    1187 <main+0x67>
test   %ecx,%ecx
jle    1187 <main+0x67>
test   %edx,%edx
jle    1187 <main+0x67>
and    $0x1,%eax
jne    1187 <main+0x67>
lea    0xea7(%rip),%rdi
jmp    1182 <main+0x62>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%i %i %i %i\00"
@.str.1 = [17 x i8] c"Valores aceitos\0A\00"
@.str.2 = [21 x i8] c"Valores nao aceitos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %38
10: ; preds = %0
%11 = load i32, i32* %5
%12 = load i32, i32* %2
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %37
14: ; preds = %10
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
%21 = icmp sgt i32 %17, %20
br i1 %21, label %22, label %36
22: ; preds = %14
%23 = load i32, i32* %4
%24 = icmp sgt i32 %23, 0
br i1 %24, label %25, label %35
25: ; preds = %22
%26 = load i32, i32* %5
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = load i32, i32* %2
%30 = srem i32 %29, 2
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %34
34: ; preds = %32, %28
br label %35
35: ; preds = %34, %25, %22
br label %36
36: ; preds = %35, %14
br label %37
37: ; preds = %36, %10
br label %40
38: ; preds = %0
%39 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38, %37
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%i %i %i %i\00"
@str = [20 x i8] c"Valores nao aceitos\00"
@str.3 = [16 x i8] c"Valores aceitos\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %28
13: ; preds = %0
%14 = load i32, i32* %4
%15 = load i32, i32* %1
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %31
17: ; preds = %13
%18 = add nsw i32 %14, %11
%19 = add nsw i32 %15, %10
%20 = icmp sgt i32 %18, %19
br i1 %20, label %21, label %31
21: ; preds = %17
%22 = icmp sgt i32 %11, 0
%23 = icmp sgt i32 %14, 0
%24 = select i1 %22, i1 %23, i1 false
%25 = and i32 %15, 1
%26 = icmp eq i32 %25, 0
%27 = select i1 %24, i1 %26, i1 false
br i1 %27, label %28, label %31
28: ; preds = %0, %21
%29 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0), %21 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), %0 ]
%30 = call i32 @puts(i8* dereferenceable(1) %29)
br label %31
31: ; preds = %28, %13, %21, %17
ret i32 0
}