#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 main(int argc, char **argv) {
  int i = 0, num, resto;
  int max, min, cont;
  int vector[100];
  printf("Introduce un numero entero diferente que cero: ");
  scanf("%d", &num);
  if (num == 0) {
    printf("No se ha introducido ningun numero par o impar");
  } else {
    cont = 1;
    max = num;
    min = num;
    resto = num % 2;
    while (num != 0 && cont < 100) {
      if (resto == 0) {
        vector[i] = num;
        i++;
      }
      1;
      if (num > max)
        max = num;
      if (num < min)
        min = num;
      printf("Introduce un numero entero diferente que cero: ");
      scanf("%d", &num);
      cont++;
    }
    if (1 && i != 0) {
      printf("Los numeros pares introducidos son: %d ", i);
      i++;
      while (i >= 0) {
        printf("%d", vector[i]);
        i--;
      }
    } else
      printf("No se han introducido ningun numero par");
  }
  printf("\nEl numero más grande es %d y el menor %d.", max, min);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x18(%rbp)
jne    117b <main+0x5b>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ac <main+0x18c>
movl   $0x1,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x18(%rbp)
mov    %al,-0x1c1(%rbp)
je     11bb <main+0x9b>
cmpl   $0x64,-0x28(%rbp)
setl   %al
mov    %al,-0x1c1(%rbp)
mov    -0x1c1(%rbp),%al
test   $0x1,%al
jne    11ce <main+0xae>
jmp    123f <main+0x11f>
cmpl   $0x0,-0x1c(%rbp)
jne    11ef <main+0xcf>
mov    -0x18(%rbp),%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x1c0(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1201 <main+0xe1>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1213 <main+0xf3>
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe08(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    119c <main+0x7c>
cmpl   $0x0,-0x14(%rbp)
je     1299 <main+0x179>
mov    -0x14(%rbp),%esi
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1294 <main+0x174>
movslq -0x14(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%esi
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1263 <main+0x143>
jmp    12a7 <main+0x187>
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ac <main+0x18c>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%r15d
test   %r15d,%r15d
je     1264 <main+0x144>
mov    $0x1,%r12d
lea    0xc(%rsp),%r13
mov    %r15d,%eax
mov    %r15d,%ebx
mov    %r15d,%ebp
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nop
test   $0x1,%r15b
jne    1192 <main+0x72>
movslq %r14d,%r14
mov    %eax,0x10(%rsp,%r14,4)
add    $0x1,%r14d
cmp    %ebp,%eax
cmovg  %eax,%ebp
cmp    %ebx,%eax
cmovl  %eax,%ebx
lea    0xe5d(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
je     11cf <main+0xaf>
lea    0x1(%r12),%ecx
cmp    $0x63,%r12d
mov    %ecx,%r12d
jb     1180 <main+0x60>
test   %r14d,%r14d
je     122d <main+0x10d>
lea    0xe87(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0xffffffff,%r14d
jl     123b <main+0x11b>
lea    0x1(%r14),%eax
add    $0x2,%r14d
lea    (%rsp,%rax,4),%r12
add    $0x10,%r12
lea    0xe2e(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffff,%r14d
add    $0xfffffffffffffffc,%r12
test   %r14d,%r14d
jg     1210 <main+0xf0>
jmp    123b <main+0x11b>
lea    0xe56(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe70(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdc8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Introduce un numero entero diferente que cero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [47 x i8] c"No se ha introducido ningun numero par o impar\00"
@.str.3 = [40 x i8] c"Los numeros pares introducidos son: %d \00"
@.str.4 = [40 x i8] c"No se han introducido ningun numero par\00"
@.str.5 = [44 x i8] c"\0AEl numero m\C3\A1s grande es %d y el menor %d.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [100 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%15 = load i32, i32* %7
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
br label %82
19: ; preds = %2
store i32 1, i32* %11
%20 = load i32, i32* %7
store i32 %20, i32* %9
%21 = load i32, i32* %7
store i32 %21, i32* %10
%22 = load i32, i32* %7
%23 = srem i32 %22, 2
store i32 %23, i32* %8
br label %24
24: ; preds = %54, %19
%25 = load i32, i32* %7
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %11
%29 = icmp slt i32 %28, 100
br label %30
30: ; preds = %27, %24
%31 = phi i1 [ false, %24 ], [ %29, %27 ]
br i1 %31, label %32, label %59
32: ; preds = %30
%33 = load i32, i32* %8
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %42
35: ; preds = %32
%36 = load i32, i32* %7
%37 = load i32, i32* %6
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %12, i64 0, i64 %38
store i32 %36, i32* %39
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
store i32 %41, i32* %6
br label %42
42: ; preds = %35, %32
%43 = load i32, i32* %7
%44 = load i32, i32* %9
%45 = icmp sgt i32 %43, %44
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = load i32, i32* %7
store i32 %47, i32* %9
br label %48
48: ; preds = %46, %42
%49 = load i32, i32* %7
%50 = load i32, i32* %10
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = load i32, i32* %7
store i32 %53, i32* %10
br label %54
54: ; preds = %52, %48
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%56 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%57 = load i32, i32* %11
%58 = add nsw i32 %57, 1
store i32 %58, i32* %11
br label %24
59: ; preds = %30
%60 = load i32, i32* %6
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %79
62: ; preds = %59
%63 = load i32, i32* %6
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 %63)
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
store i32 %66, i32* %6
br label %67
67: ; preds = %70, %62
%68 = load i32, i32* %6
%69 = icmp sge i32 %68, 0
br i1 %69, label %70, label %78
70: ; preds = %67
%71 = load i32, i32* %6
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [100 x i32], [100 x i32]* %12, i64 0, i64 %72
%74 = load i32, i32* %73
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %74)
%76 = load i32, i32* %6
%77 = add nsw i32 %76, -1
store i32 %77, i32* %6
br label %67
78: ; preds = %67
br label %81
79: ; preds = %59
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %81
81: ; preds = %79, %78
br label %82
82: ; preds = %81, %17
%83 = load i32, i32* %9
%84 = load i32, i32* %10
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i32 %83, i32 %84)
ret i32 1
}

LLVM IR (-O2):
@.str = [48 x i8] c"Introduce un numero entero diferente que cero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [47 x i8] c"No se ha introducido ningun numero par o impar\00"
@.str.3 = [40 x i8] c"Los numeros pares introducidos son: %d \00"
@.str.4 = [40 x i8] c"No se han introducido ningun numero par\00"
@.str.5 = [44 x i8] c"\0AEl numero m\C3\A1s grande es %d y el menor %d.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [100 x i32]
%5 = bitcast i32* %3 to i8*
%6 = bitcast [100 x i32]* %4 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = and i32 %9, 1
%13 = icmp eq i32 %12, 0
br label %16
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
unreachable
16: ; preds = %11, %26
%17 = phi i32 [ %9, %11 ], [ %35, %26 ]
%18 = phi i32 [ 1, %11 ], [ %34, %26 ]
%19 = phi i32 [ %9, %11 ], [ %31, %26 ]
%20 = phi i32 [ %9, %11 ], [ %29, %26 ]
%21 = phi i32 [ 0, %11 ], [ %27, %26 ]
br i1 %13, label %22, label %26
22: ; preds = %16
%23 = sext i32 %21 to i64
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %23
store i32 %17, i32* %24
%25 = add nsw i32 %21, 1
br label %26
26: ; preds = %22, %16
%27 = phi i32 [ %25, %22 ], [ %21, %16 ]
%28 = icmp sgt i32 %17, %20
%29 = select i1 %28, i32 %17, i32 %20
%30 = icmp slt i32 %17, %19
%31 = select i1 %30, i32 %17, i32 %19
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%34 = add nuw nsw i32 %18, 1
%35 = load i32, i32* %3
%36 = icmp ne i32 %35, 0
%37 = icmp ult i32 %18, 99
%38 = select i1 %36, i1 %37, i1 false
br i1 %38, label %16, label %39
39: ; preds = %26
%40 = icmp eq i32 %27, 0
br i1 %40, label %55, label %41
41: ; preds = %39
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 %27)
%43 = icmp sgt i32 %27, -2
br i1 %43, label %44, label %57
44: ; preds = %41
%45 = add i32 %27, 1
%46 = zext i32 %45 to i64
br label %47
47: ; preds = %44, %47
%48 = phi i64 [ %46, %44 ], [ %52, %47 ]
%49 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %50)
%52 = add nsw i64 %48, -1
%53 = trunc i64 %48 to i32
%54 = icmp sgt i32 %53, 0
br i1 %54, label %47, label %57
55: ; preds = %39
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %57
57: ; preds = %47, %41, %55
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i32 %29, i32 %31)
ret i32 1
}