#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 num_ing, sum_par, sum_imp, vuelta, orden_num;
  num_ing = sum_par = sum_imp = vuelta = orden_num = 0;
  while (vuelta < 100) {
    printf("\nIngrese un número: ");
    scanf("%d", &num_ing);
    if (orden_num % 2 == 0) {
      sum_par = sum_par + num_ing;
      vuelta++;
      orden_num++;
    } else {
      sum_imp = sum_imp + num_ing;
      vuelta++;
      orden_num++;
    }
  }
  if (sum_par > sum_imp)
    printf(
        "\nLos números de orden par proporcionan la mayor suma\tTOTAL: %d\n\n",
        sum_par);
  else if (sum_par == sum_imp)
    printf("\nNingun grupo es mayor que el otro\n\n");
  else
    printf("\nLos números de orden impar proporcionan la mayor suma:\tTOTAL: "
           "%d\n\n",
           sum_imp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    11ce <main+0xae>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11ae <main+0x8e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11c9 <main+0xa9>
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1152 <main+0x32>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11f0 <main+0xd0>
mov    -0xc(%rbp),%esi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1225 <main+0x105>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    120f <main+0xef>
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1220 <main+0x100>
mov    -0x10(%rbp),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1225 <main+0x105>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xeb6(%rip),%r14
lea    0xec5(%rip),%r15
lea    0x4(%rsp),%r12
xor    %ebx,%ebx
xor    %r13d,%r13d
xor    %ebp,%ebp
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
mov    %ebx,%eax
and    $0x1,%eax
neg    %eax
mov    0x4(%rsp),%ecx
mov    $0x0,%edx
cmovae %ecx,%edx
add    %edx,%ebp
and    %ecx,%eax
add    %eax,%r13d
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1160 <main+0x30>
cmp    %r13d,%ebp
jle    11a7 <main+0x77>
lea    0xe76(%rip),%rdi
mov    %ebp,%esi
jmp    11c1 <main+0x91>
jne    11b7 <main+0x87>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
jmp    11c8 <main+0x98>
lea    0xe9d(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0AIngrese un n\C3\BAmero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [66 x i8] c"\0ALos n\C3\BAmeros de orden par proporcionan la mayor suma\09TOTAL: %d\0A\0A\00"
@.str.3 = [37 x i8] c"\0ANingun grupo es mayor que el otro\0A\0A\00"
@.str.4 = [69 x i8] c"\0ALos n\C3\BAmeros de orden impar proporcionan la mayor suma:\09TOTAL: %d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
store i32 0, i32* %5
store i32 0, i32* %4
store i32 0, i32* %3
store i32 0, i32* %2
br label %7
7: ; preds = %32, %0
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 100
br i1 %9, label %10, label %33
10: ; preds = %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%13 = load i32, i32* %6
%14 = srem i32 %13, 2
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %24
16: ; preds = %10
%17 = load i32, i32* %3
%18 = load i32, i32* %2
%19 = add nsw i32 %17, %18
store i32 %19, i32* %3
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %32
24: ; preds = %10
%25 = load i32, i32* %4
%26 = load i32, i32* %2
%27 = add nsw i32 %25, %26
store i32 %27, i32* %4
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %32
32: ; preds = %24, %16
br label %7
33: ; preds = %7
%34 = load i32, i32* %3
%35 = load i32, i32* %4
%36 = icmp sgt i32 %34, %35
br i1 %36, label %37, label %40
37: ; preds = %33
%38 = load i32, i32* %3
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i32 %38)
br label %50
40: ; preds = %33
%41 = load i32, i32* %3
%42 = load i32, i32* %4
%43 = icmp eq i32 %41, %42
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %49
46: ; preds = %40
%47 = load i32, i32* %4
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0), i32 %47)
br label %49
49: ; preds = %46, %44
br label %50
50: ; preds = %49, %37
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0AIngrese un n\C3\BAmero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [66 x i8] c"\0ALos n\C3\BAmeros de orden par proporcionan la mayor suma\09TOTAL: %d\0A\0A\00"
@.str.4 = [69 x i8] c"\0ALos n\C3\BAmeros de orden impar proporcionan la mayor suma:\09TOTAL: %d\0A\0A\00"
@str = [36 x i8] c"\0ANingun grupo es mayor que el otro\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %16, %3 ]
%5 = phi i32 [ 0, %0 ], [ %15, %3 ]
%6 = phi i32 [ 0, %0 ], [ %13, %3 ]
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 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* %1)
%9 = and i32 %4, 1
%10 = icmp eq i32 %9, 0
%11 = load i32, i32* %1
%12 = select i1 %10, i32 %11, i32 0
%13 = add nsw i32 %12, %6
%14 = select i1 %10, i32 0, i32 %11
%15 = add nsw i32 %14, %5
%16 = add nuw nsw i32 %4, 1
%17 = icmp eq i32 %16, 100
br i1 %17, label %18, label %3
18: ; preds = %3
%19 = icmp sgt i32 %13, %15
br i1 %19, label %20, label %22
20: ; preds = %18
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %28
22: ; preds = %18
%23 = icmp eq i32 %13, %15
br i1 %23, label %24, label %26
24: ; preds = %22
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
br label %28
26: ; preds = %22
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0), i32 %15)
br label %28
28: ; preds = %24, %26, %20
ret i32 0
}