#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 letraCoeficiente(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ system(char *);
void mostrarResultado(int *vetResult) {
  int j;
  for (j = 0; j < 3; j++) {
    if (j != 2) {
      printf("(%d)%c + ", vetResult[j], letraCoeficiente(j));
    } else {
      printf("(%d)%c\n", vetResult[j], letraCoeficiente(j));
    }
  }
  system("pause");
}


x86 assembly (clang, -O0):
<mostrarResultado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    11bd <mostrarResultado+0x8d>
cmpl   $0x2,-0xc(%rbp)
je     1183 <mostrarResultado+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <letraCoeficiente@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
jmp    11aa <mostrarResultado+0x7a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <letraCoeficiente@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
jmp    11af <mostrarResultado+0x7f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <mostrarResultado+0x13>
lea    0xe4e(%rip),%rdi
call   1030 <system@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mostrarResultado>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%ebp
xor    %edi,%edi
call   1050 <letraCoeficiente@plt>
lea    0xeb9(%rip),%r14
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    0x4(%rbx),%ebp
mov    $0x1,%edi
call   1050 <letraCoeficiente@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    0x8(%rbx),%ebx
mov    $0x2,%edi
call   1050 <letraCoeficiente@plt>
lea    0xe8a(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
lea    0xe82(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"(%d)%c + \00"
@.str.1 = [8 x i8] c"(%d)%c\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define void @mostrarResultado(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %29, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %32
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i32*, i32** %2
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %3
%17 = call i32 @letraCoeficiente(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %17)
br label %28
19: ; preds = %7
%20 = load i32*, i32** %2
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %3
%26 = call i32 @letraCoeficiente(i32 %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %24, i32 %26)
br label %28
28: ; preds = %19, %10
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %4
32: ; preds = %4
%33 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"(%d)%c + \00"
@.str.1 = [8 x i8] c"(%d)%c\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define void @mostrarResultado(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %0
%4 = tail call i32 @letraCoeficiente(i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = tail call i32 @letraCoeficiente(i32 1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* %2
%11 = tail call i32 @letraCoeficiente(i32 2)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
%13 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}