#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 /*<<< orphan*/ system(char *);
main() {
  system("cls");
  system("title 20b_Cascallar_Autrán_Manuel");
  system("color 88");
  printf("NUMEROS PARES ENTRE 2 E UN NUMERO ESCRITO CO TECLADO\n");
  printf("====================================================\n");
  int a, b, x;
  printf("Introduce o n\243mero donde ten que empezar o bucle: (ten que ser 2, "
         "senon non funciona)\n");
  scanf("%d", &x);
  printf("Introduce o n\243mero donde ten que parar o bucle:\n");
  scanf("%d", &b);
  printf("\n");
  if (x % 2 == 0) {
    if (b >= 2) {
      for (a = x; a <= b; a = a + 2) {
        printf("%d", a);
        printf("\n");
      }
    } else
      printf("Os n\243meros escritos non son validos");
  } else
    printf("Os n\243meros escritos non son validos");
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
lea    0xeb2(%rip),%rdi
call   1030 <system@plt>
lea    0xec9(%rip),%rdi
call   1030 <system@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf5f(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf41(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf2f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    123e <main+0x10e>
cmpl   $0x2,-0xc(%rbp)
jl     122b <main+0xfb>
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1226 <main+0xf6>
mov    -0x8(%rbp),%esi
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    11ed <main+0xbd>
jmp    1239 <main+0x109>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    124c <main+0x11c>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xea5(%rip),%rdi
call   1050 <system@plt>
lea    0xe9d(%rip),%rdi
call   1050 <system@plt>
lea    0xeb4(%rip),%rdi
call   1050 <system@plt>
lea    0xede(%rip),%rdi
call   1040 <puts@plt>
lea    0xf07(%rip),%rdi
call   1040 <puts@plt>
lea    0xf30(%rip),%rdi
call   1040 <puts@plt>
lea    0xe8d(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
lea    0xf66(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%ebx
test   $0x1,%bl
jne    1210 <main+0xc0>
mov    (%rsp),%eax
cmp    $0x2,%eax
jl     1210 <main+0xc0>
cmp    %eax,%ebx
jg     121e <main+0xce>
lea    0xe43(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x2,%ebx
cmp    (%rsp),%ebx
jle    11f0 <main+0xa0>
jmp    121e <main+0xce>
lea    0xe1c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe32(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [35 x i8] c"title 20b_Cascallar_Autr\C3\A1n_Manuel\00"
@.str.2 = [9 x i8] c"color 88\00"
@.str.3 = [54 x i8] c"NUMEROS PARES ENTRE 2 E UN NUMERO ESCRITO CO TECLADO\0A\00"
@.str.4 = [54 x i8] c"====================================================\0A\00"
@.str.5 = [87 x i8] c"Introduce o n\A3mero donde ten que empezar o bucle: (ten que ser 2, senon non funciona)\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [49 x i8] c"Introduce o n\A3mero donde ten que parar o bucle:\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [36 x i8] c"Os n\A3meros escritos non son validos\00"
@.str.10 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %4)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %3)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%15 = load i32, i32* %4
%16 = srem i32 %15, 2
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %38
18: ; preds = %0
%19 = load i32, i32* %3
%20 = icmp sge i32 %19, 2
br i1 %20, label %21, label %35
21: ; preds = %18
%22 = load i32, i32* %4
store i32 %22, i32* %2
br label %23
23: ; preds = %31, %21
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %34
27: ; preds = %23
%28 = load i32, i32* %2
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %31
31: ; preds = %27
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 2
store i32 %33, i32* %2
br label %23
34: ; preds = %23
br label %37
35: ; preds = %18
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
br label %37
37: ; preds = %35, %34
br label %40
38: ; preds = %0
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
br label %40
40: ; preds = %38, %37
%41 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%42 = load i32, i32* %1
ret i32 %42
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@.str.1 = [35 x i8] c"title 20b_Cascallar_Autr\C3\A1n_Manuel\00"
@.str.2 = [9 x i8] c"color 88\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.9 = [36 x i8] c"Os n\A3meros escritos non son validos\00"
@.str.10 = [6 x i8] c"pause\00"
@str = [53 x i8] c"NUMEROS PARES ENTRE 2 E UN NUMERO ESCRITO CO TECLADO\00"
@str.11 = [53 x i8] c"====================================================\00"
@str.12 = [86 x i8] c"Introduce o n\A3mero donde ten que empezar o bucle: (ten que ser 2, senon non funciona)\00"
@str.13 = [48 x i8] c"Introduce o n\A3mero donde ten que parar o bucle:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.11, i64 0, i64 0))
%8 = bitcast i32* %1 to i8*
%9 = bitcast i32* %2 to i8*
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.12, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %2)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.13, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %1)
%14 = call i32 @putchar(i32 10)
%15 = load i32, i32* %2
%16 = and i32 %15, 1
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %30
18: ; preds = %0
%19 = load i32, i32* %1
%20 = icmp sgt i32 %19, 1
br i1 %20, label %21, label %30
21: ; preds = %18
%22 = icmp sgt i32 %15, %19
br i1 %22, label %32, label %23
23: ; preds = %21, %23
%24 = phi i32 [ %27, %23 ], [ %15, %21 ]
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = call i32 @putchar(i32 10)
%27 = add nsw i32 %24, 2
%28 = load i32, i32* %1
%29 = icmp sgt i32 %27, %28
br i1 %29, label %32, label %23
30: ; preds = %0, %18
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
br label %32
32: ; preds = %23, %30, %21
%33 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}