#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 *);
void main() {
  int x, y, intx, inty;
  intx = inty = 0;
  printf("Digite 2 valores inteiros x e y: ");
  scanf("%d %d", &x, &y);
  if ((x > -20 && x <= -10) || (x > 0 && x <= 10) || (x > 50))
    intx = 1;
  if ((y > -50 && y <= -20) || (y >= 0 && y <= 10) || (y > 20 && y <= 50))
    inty = 1;
  if ((intx == 0 && inty == 1) || (intx == 1 && inty == 0))
    printf("\nValores validos.\n");
  else
    printf("\nValores invalidos.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0xffffffec,-0x4(%rbp)
jle    116a <main+0x4a>
cmpl   $0xfffffff6,-0x4(%rbp)
jle    1188 <main+0x68>
cmpl   $0x0,-0x4(%rbp)
jle    117e <main+0x5e>
cmpl   $0xa,-0x4(%rbp)
jle    1188 <main+0x68>
cmpl   $0x32,-0x4(%rbp)
jle    118f <main+0x6f>
movl   $0x1,-0xc(%rbp)
cmpl   $0xffffffce,-0x8(%rbp)
jle    11a3 <main+0x83>
cmpl   $0xffffffec,-0x8(%rbp)
jle    11cb <main+0xab>
cmpl   $0x0,-0x8(%rbp)
jl     11b7 <main+0x97>
cmpl   $0xa,-0x8(%rbp)
jle    11cb <main+0xab>
cmpl   $0x14,-0x8(%rbp)
jle    11d2 <main+0xb2>
cmpl   $0x32,-0x8(%rbp)
jg     11d2 <main+0xb2>
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11e6 <main+0xc6>
cmpl   $0x1,-0x10(%rbp)
je     11fa <main+0xda>
cmpl   $0x1,-0xc(%rbp)
jne    120b <main+0xeb>
cmpl   $0x0,-0x10(%rbp)
jne    120b <main+0xeb>
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
jmp    1217 <main+0xf7>
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    0x13(%rax),%ecx
cmp    $0xa,%ecx
jb     1170 <main+0x40>
cmp    $0x32,%eax
jg     1170 <main+0x40>
add    $0xffffffff,%eax
cmp    $0x9,%eax
jbe    1170 <main+0x40>
xor    %eax,%eax
mov    $0x1,%cl
jmp    1174 <main+0x44>
mov    $0x1,%al
xor    %ecx,%ecx
mov    (%rsp),%edx
lea    0x31(%rdx),%esi
cmp    $0x1e,%esi
movzbl %cl,%ecx
movzbl %al,%eax
cmovb  %ecx,%eax
lea    -0x15(%rdx),%esi
cmp    $0xb,%edx
cmovb  %ecx,%eax
cmp    $0x1e,%esi
cmovb  %ecx,%eax
lea    0xea0(%rip),%rcx
lea    0xe85(%rip),%rdi
test   %al,%al
cmovne %rcx,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Digite 2 valores inteiros x e y: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [19 x i8] c"\0AValores validos.\0A\00"
@.str.3 = [21 x i8] c"\0AValores invalidos.\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %4
store i32 0, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, -20
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %1
%11 = icmp sle i32 %10, -10
br i1 %11, label %21, label %12
12: ; preds = %9, %0
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %1
%17 = icmp sle i32 %16, 10
br i1 %17, label %21, label %18
18: ; preds = %15, %12
%19 = load i32, i32* %1
%20 = icmp sgt i32 %19, 50
br i1 %20, label %21, label %22
21: ; preds = %18, %15, %9
store i32 1, i32* %3
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, -50
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = load i32, i32* %2
%27 = icmp sle i32 %26, -20
br i1 %27, label %40, label %28
28: ; preds = %25, %22
%29 = load i32, i32* %2
%30 = icmp sge i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load i32, i32* %2
%33 = icmp sle i32 %32, 10
br i1 %33, label %40, label %34
34: ; preds = %31, %28
%35 = load i32, i32* %2
%36 = icmp sgt i32 %35, 20
br i1 %36, label %37, label %41
37: ; preds = %34
%38 = load i32, i32* %2
%39 = icmp sle i32 %38, 50
br i1 %39, label %40, label %41
40: ; preds = %37, %31, %25
store i32 1, i32* %4
br label %41
41: ; preds = %40, %37, %34
%42 = load i32, i32* %3
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %41
%45 = load i32, i32* %4
%46 = icmp eq i32 %45, 1
br i1 %46, label %53, label %47
47: ; preds = %44, %41
%48 = load i32, i32* %3
%49 = icmp eq i32 %48, 1
br i1 %49, label %50, label %55
50: ; preds = %47
%51 = load i32, i32* %4
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %50, %44
%54 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %57
55: ; preds = %50, %47
%56 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %57
57: ; preds = %55, %53
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Digite 2 valores inteiros x e y: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@str = [20 x i8] c"\0AValores invalidos.\00"
@str.4 = [18 x i8] c"\0AValores validos.\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = add i32 %7, 19
%9 = icmp ult i32 %8, 10
br i1 %9, label %15, label %10
10: ; preds = %0
%11 = add i32 %7, -1
%12 = icmp ult i32 %11, 10
%13 = icmp sgt i32 %7, 50
%14 = or i1 %13, %12
br i1 %14, label %15, label %16
15: ; preds = %10, %0
br label %16
16: ; preds = %10, %15
%17 = phi i1 [ true, %10 ], [ false, %15 ]
%18 = phi i1 [ false, %10 ], [ true, %15 ]
%19 = load i32, i32* %2
%20 = add i32 %19, 49
%21 = icmp ult i32 %20, 30
%22 = icmp ult i32 %19, 11
%23 = or i1 %22, %21
%24 = add i32 %19, -21
%25 = icmp ult i32 %24, 30
%26 = or i1 %25, %23
%27 = select i1 %26, i1 %17, i1 %18
%28 = select i1 %27, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%29 = call i32 @puts(i8* dereferenceable(1) %28)
ret void
}