#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, i;
  num_ing = sum_par = sum_imp = i = 0;
  for (i = 0; i < 100; i++) {
    printf("\nIngrese un número: ");
    scanf("%d", &num_ing);
    if (i % 2 == 0)
      sum_par = sum_par + num_ing;
    else
      sum_imp = sum_imp + num_ing;
  }
  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,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    11b8 <main+0x98>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    119c <main+0x7c>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    11a5 <main+0x85>
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    11aa <main+0x8a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1152 <main+0x32>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11da <main+0xba>
mov    -0xc(%rbp),%esi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    120f <main+0xef>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11f9 <main+0xd9>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    120a <main+0xea>
mov    -0x10(%rbp),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    120f <main+0xef>
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
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %4
store i32 0, i32* %3
store i32 0, i32* %2
store i32 0, i32* %5
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 100
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %5
%13 = srem i32 %12, 2
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %9
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = add nsw i32 %16, %17
store i32 %18, i32* %3
br label %23
19: ; preds = %9
%20 = load i32, i32* %4
%21 = load i32, i32* %2
%22 = add nsw i32 %20, %21
store i32 %22, i32* %4
br label %23
23: ; preds = %19, %15
br label %24
24: ; preds = %23
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %6
27: ; preds = %6
%28 = load i32, i32* %3
%29 = load i32, i32* %4
%30 = icmp sgt i32 %28, %29
br i1 %30, label %31, label %34
31: ; preds = %27
%32 = load i32, i32* %3
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i32 %32)
br label %44
34: ; preds = %27
%35 = load i32, i32* %3
%36 = load i32, i32* %4
%37 = icmp eq i32 %35, %36
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %43
40: ; preds = %34
%41 = load i32, i32* %4
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %40, %38
br label %44
44: ; preds = %43, %31
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
}