#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*/ mostrarResultado(int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
void prodVetorial() {
  int i = 0, j, u[3];
  int v[3];
  int vetResult[3];
  int op = 1;
  system("clear");
  while (op) {
    if (i == 0) {
      printf("--vetor %d---\n", i + 1);
      for (j = 0; j < 3; j++) {
        printf("Informe o coeficiente de %c: ", letraCoeficiente(j));
        scanf("%d", &v[j]);
      }
    } else {
      printf("---vetor %d---\n", i + 1);
      for (j = 0; j < 3; j++) {
        printf("Informe o coeficiente de %c: ", letraCoeficiente(j));
        scanf("%d", &u[j]);
      }
      vetResult[0] = ((v[1] * u[2]) - (v[2] * u[1]));
      vetResult[1] = (((v[0] * u[2]) - (v[2] * u[0]))) * (-1);
      vetResult[2] = ((v[0] * u[1]) - (v[1] * u[0]));
    }
    i++;
    if (i > 1) {
      printf("Deseja informar outro vetor? (1 - Sim / 0 - Nao): ");
      scanf("%d", &op);
    }
    system("clear");
  }
  printf("---Produto Vetorial---\n");
  mostrarResultado(vetResult);
}


x86 assembly (clang, -O0):
<prodVetorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x30(%rbp)
lea    0xe93(%rip),%rdi
call   1030 <system@plt>
cmpl   $0x0,-0x30(%rbp)
je     12d5 <prodVetorial+0x185>
cmpl   $0x0,-0x4(%rbp)
jne    11f1 <prodVetorial+0xa1>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11ec <prodVetorial+0x9c>
mov    -0x8(%rbp),%edi
call   1050 <letraCoeficiente@plt>
mov    %eax,%esi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x8(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe4b(%rip),%rdi
call   1070 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a1 <prodVetorial+0x51>
jmp    1293 <prodVetorial+0x143>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1257 <prodVetorial+0x107>
mov    -0x8(%rbp),%edi
call   1050 <letraCoeficiente@plt>
mov    %eax,%esi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x8(%rbp),%rax
lea    -0x14(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xde0(%rip),%rdi
call   1070 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    120c <prodVetorial+0xbc>
mov    -0x1c(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x10(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
sub    %ecx,%eax
imul   $0xffffffff,%eax,%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    12c4 <prodVetorial+0x174>
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd69(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1070 <scanf@plt>
lea    0xd35(%rip),%rdi
call   1030 <system@plt>
jmp    1172 <prodVetorial+0x22>
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   1060 <mostrarResultado@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prodVetorial>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movl   $0x1,(%rsp)
lea    0xe84(%rip),%r12
mov    %r12,%rdi
call   1040 <system@plt>
lea    0xe7b(%rip),%r15
lea    0xe92(%rip),%r14
xor    %r13d,%r13d
jmp    1231 <prodVetorial+0xd1>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%r13d
lea    0xe7b(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <letraCoeficiente@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0x4(%rsp),%rsi
call   1080 <scanf@plt>
mov    $0x1,%edi
call   1060 <letraCoeficiente@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0x8(%rsp),%rsi
call   1080 <scanf@plt>
mov    $0x2,%edi
call   1060 <letraCoeficiente@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %r14,%rdi
call   1080 <scanf@plt>
mov    %r12,%rdi
call   1040 <system@plt>
cmpl   $0x0,(%rsp)
je     1309 <prodVetorial+0x1a9>
test   %r13d,%r13d
je     11a0 <prodVetorial+0x40>
add    $0x1,%r13d
lea    0xde2(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <letraCoeficiente@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0x10(%rsp),%rsi
call   1080 <scanf@plt>
mov    $0x1,%edi
call   1060 <letraCoeficiente@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0x14(%rsp),%rsi
call   1080 <scanf@plt>
mov    $0x2,%edi
call   1060 <letraCoeficiente@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0x18(%rsp),%rsi
call   1080 <scanf@plt>
mov    0x4(%rsp),%eax
mov    0x8(%rsp),%ecx
mov    0x18(%rsp),%edx
mov    %edx,%esi
imul   %ecx,%esi
mov    0xc(%rsp),%edi
mov    0x10(%rsp),%ebx
mov    0x14(%rsp),%ebp
imul   %eax,%edx
imul   %ebp,%eax
imul   %edi,%ebp
sub    %ebp,%esi
mov    %esi,0x1c(%rsp)
imul   %ebx,%edi
sub    %edx,%edi
mov    %edi,0x20(%rsp)
imul   %ecx,%ebx
sub    %ebx,%eax
mov    %eax,0x24(%rsp)
lea    0xd3d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rsp,%rsi
jmp    1217 <prodVetorial+0xb7>
lea    0xd5a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1c(%rsp),%rdi
call   1070 <mostrarResultado@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [15 x i8] c"--vetor %d---\0A\00"
@.str.2 = [30 x i8] c"Informe o coeficiente de %c: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [16 x i8] c"---vetor %d---\0A\00"
@.str.5 = [51 x i8] c"Deseja informar outro vetor? (1 - Sim / 0 - Nao): \00"
@.str.6 = [24 x i8] c"---Produto Vetorial---\0A\00"
define void @prodVetorial() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i32]
%4 = alloca [3 x i32]
%5 = alloca [3 x i32]
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %6
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %97, %0
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %99
11: ; preds = %8
%12 = load i32, i32* %1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %33
14: ; preds = %11
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %16)
store i32 0, i32* %2
br label %18
18: ; preds = %29, %14
%19 = load i32, i32* %2
%20 = icmp slt i32 %19, 3
br i1 %20, label %21, label %32
21: ; preds = %18
%22 = load i32, i32* %2
%23 = call i32 @letraCoeficiente(i32 %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 %26
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %27)
br label %29
29: ; preds = %21
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %18
32: ; preds = %18
br label %89
33: ; preds = %11
%34 = load i32, i32* %1
%35 = add nsw i32 %34, 1
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %35)
store i32 0, i32* %2
br label %37
37: ; preds = %48, %33
%38 = load i32, i32* %2
%39 = icmp slt i32 %38, 3
br i1 %39, label %40, label %51
40: ; preds = %37
%41 = load i32, i32* %2
%42 = call i32 @letraCoeficiente(i32 %41)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %2
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %45
%47 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %46)
br label %48
48: ; preds = %40
%49 = load i32, i32* %2
%50 = add nsw i32 %49, 1
store i32 %50, i32* %2
br label %37
51: ; preds = %37
%52 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
%53 = load i32, i32* %52
%54 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%55 = load i32, i32* %54
%56 = mul nsw i32 %53, %55
%57 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
%58 = load i32, i32* %57
%59 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%60 = load i32, i32* %59
%61 = mul nsw i32 %58, %60
%62 = sub nsw i32 %56, %61
%63 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %62, i32* %63
%64 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%65 = load i32, i32* %64
%66 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%67 = load i32, i32* %66
%68 = mul nsw i32 %65, %67
%69 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
%70 = load i32, i32* %69
%71 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%72 = load i32, i32* %71
%73 = mul nsw i32 %70, %72
%74 = sub nsw i32 %68, %73
%75 = mul nsw i32 %74, -1
%76 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %75, i32* %76
%77 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%78 = load i32, i32* %77
%79 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%80 = load i32, i32* %79
%81 = mul nsw i32 %78, %80
%82 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
%83 = load i32, i32* %82
%84 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%85 = load i32, i32* %84
%86 = mul nsw i32 %83, %85
%87 = sub nsw i32 %81, %86
%88 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %87, i32* %88
br label %89
89: ; preds = %51, %32
%90 = load i32, i32* %1
%91 = add nsw i32 %90, 1
store i32 %91, i32* %1
%92 = load i32, i32* %1
%93 = icmp sgt i32 %92, 1
br i1 %93, label %94, label %97
94: ; preds = %89
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0))
%96 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %6)
br label %97
97: ; preds = %94, %89
%98 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
99: ; preds = %8
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%101 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%102 = call i32 @mostrarResultado(i32* %101)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [15 x i8] c"--vetor %d---\0A\00"
@.str.2 = [30 x i8] c"Informe o coeficiente de %c: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [16 x i8] c"---vetor %d---\0A\00"
@.str.5 = [51 x i8] c"Deseja informar outro vetor? (1 - Sim / 0 - Nao): \00"
@str = [23 x i8] c"---Produto Vetorial---\00"
define void @prodVetorial() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = alloca [3 x i32]
%4 = alloca i32
%5 = bitcast [3 x i32]* %1 to i8*
%6 = bitcast [3 x i32]* %2 to i8*
%7 = bitcast [3 x i32]* %3 to i8*
%8 = bitcast i32* %4 to i8*
store i32 1, i32* %4
%9 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
br label %19
19: ; preds = %0, %60
%20 = phi i32 [ 0, %0 ], [ %62, %60 ]
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %32
22: ; preds = %19
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1)
%24 = call i32 @letraCoeficiente(i32 0)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %15)
%27 = call i32 @letraCoeficiente(i32 1)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %27)
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %10)
%30 = call i32 @letraCoeficiente(i32 2)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %30)
br label %60
32: ; preds = %19
%33 = add nuw nsw i32 %20, 1
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %33)
%35 = call i32 @letraCoeficiente(i32 0)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %16)
%38 = call i32 @letraCoeficiente(i32 1)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %38)
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %13)
%41 = call i32 @letraCoeficiente(i32 2)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %41)
%43 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %11)
%44 = load i32, i32* %10
%45 = load i32, i32* %11
%46 = mul nsw i32 %45, %44
%47 = load i32, i32* %12
%48 = load i32, i32* %13
%49 = mul nsw i32 %48, %47
%50 = sub nsw i32 %46, %49
store i32 %50, i32* %14
%51 = load i32, i32* %15
%52 = mul nsw i32 %51, %45
%53 = load i32, i32* %16
%54 = mul nsw i32 %53, %47
%55 = sub i32 %54, %52
store i32 %55, i32* %17
%56 = mul nsw i32 %51, %48
%57 = mul nsw i32 %53, %44
%58 = sub nsw i32 %56, %57
store i32 %58, i32* %18
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0))
br label %60
60: ; preds = %22, %32
%61 = phi i32* [ %12, %22 ], [ %4, %32 ]
%62 = phi i32 [ 1, %22 ], [ %33, %32 ]
%63 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %61)
%64 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%65 = load i32, i32* %4
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %19
67: ; preds = %60
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%69 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%70 = call i32 @mostrarResultado(i32* %69)
ret void
}