#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, int, int, int, int);
int repeticiones(int, int, int, int);
int main() {
  int a, b, c, d;
  a = 1;
  b = 2;
  c = 3;
  d = 4;
  printf("El numero de numeros iguales en(%d,%d,%d,%d)==%d\n", a, b, c, d,
         repeticiones(a, b, c, d));
  d = 1;
  printf("El numero de numeros iguales en(%d,%d,%d,%d)==%d\n", a, b, c, d,
         repeticiones(a, b, c, d));
  c = 2;
  printf("El numero de numeros iguales en(%d,%d,%d,%d)==%d\n", a, b, c, d,
         repeticiones(a, b, c, d));
  a = 3;
  b = 3;
  d = 3;
  c = 3;
  printf("El numero de numeros iguales en(%d,%d,%d,%d)==%d\n", a, b, c, d,
         repeticiones(a, b, c, d));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <repeticiones@plt>
mov    -0x54(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x4c(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    %eax,%r9d
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <repeticiones@plt>
mov    -0x44(%rbp),%esi
mov    -0x40(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    %eax,%r9d
lea    0xe29(%rip),%rdi
call   1040 <printf@plt>
movl   $0x2,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <repeticiones@plt>
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    %eax,%r9d
lea    0xddd(%rip),%rdi
call   1040 <printf@plt>
movl   $0x3,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <repeticiones@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    %eax,%r9d
lea    0xd7c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <repeticiones@plt>
lea    0xebf(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    %eax,%r9d
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1030 <repeticiones@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x1,%r8d
mov    %eax,%r9d
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <repeticiones@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
mov    %eax,%r9d
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
call   1030 <repeticiones@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
mov    $0x3,%r8d
mov    %eax,%r9d
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"El numero de numeros iguales en(%d,%d,%d,%d)==%d\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 1, i32* %2
store i32 2, i32* %3
store i32 3, i32* %4
store i32 4, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = call i32 @repeticiones(i32 %10, i32 %11, i32 %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7, i32 %8, i32 %9, i32 %14)
store i32 1, i32* %5
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = call i32 @repeticiones(i32 %20, i32 %21, i32 %22, i32 %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17, i32 %18, i32 %19, i32 %24)
store i32 2, i32* %4
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = load i32, i32* %5
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = load i32, i32* %4
%33 = load i32, i32* %5
%34 = call i32 @repeticiones(i32 %30, i32 %31, i32 %32, i32 %33)
%35 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %26, i32 %27, i32 %28, i32 %29, i32 %34)
store i32 3, i32* %2
store i32 3, i32* %3
store i32 3, i32* %5
store i32 3, i32* %4
%36 = load i32, i32* %2
%37 = load i32, i32* %3
%38 = load i32, i32* %4
%39 = load i32, i32* %5
%40 = load i32, i32* %2
%41 = load i32, i32* %3
%42 = load i32, i32* %4
%43 = load i32, i32* %5
%44 = call i32 @repeticiones(i32 %40, i32 %41, i32 %42, i32 %43)
%45 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %36, i32 %37, i32 %38, i32 %39, i32 %44)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"El numero de numeros iguales en(%d,%d,%d,%d)==%d\0A\00"
define i32 @main() {
%1 = tail call i32 @repeticiones(i32 1, i32 2, i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 %1)
%3 = tail call i32 @repeticiones(i32 1, i32 2, i32 3, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 1, i32 %3)
%5 = tail call i32 @repeticiones(i32 1, i32 2, i32 2, i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 2, i32 1, i32 %5)
%7 = tail call i32 @repeticiones(i32 3, i32 3, i32 3, i32 3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 3, i32 3, i32 3, i32 3, i32 %7)
ret i32 0
}