#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 /*<<< orphan*/ scanf(char *, int *);
void main() {
  int F[20], G[20], produto = 0;
  for (int i = 0; i < 20; i++) {
    printf("Informe F[%d]: ", i + 1);
    scanf("%d", &F[i]);
    printf("Informe G[%d]: ", i + 1);
    scanf("%d", &G[i]);
  }
  for (int i = 0; i < 20; i++) {
    produto += (F[i] * G[i]);
    printf("%d * %d = %d\n", F[i], G[i], F[i] * G[i]);
    printf("Produto: %d\n\n", produto);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0xa4(%rbp)
movl   $0x0,-0xa8(%rbp)
cmpl   $0x14,-0xa8(%rbp)
jge    11cd <main+0xad>
mov    -0xa8(%rbp),%esi
add    $0x1,%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xa8(%rbp),%rax
lea    -0x50(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe94(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xa8(%rbp),%esi
add    $0x1,%esi
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xa8(%rbp),%rax
lea    -0xa0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe5c(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xa8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa8(%rbp)
jmp    113f <main+0x1f>
movl   $0x0,-0xac(%rbp)
cmpl   $0x14,-0xac(%rbp)
jge    1273 <main+0x153>
movslq -0xac(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
movslq -0xac(%rbp),%rcx
imul   -0xa0(%rbp,%rcx,4),%eax
ff
add    -0xa4(%rbp),%eax
mov    %eax,-0xa4(%rbp)
movslq -0xac(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
movslq -0xac(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%edx
movslq -0xac(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%ecx
movslq -0xac(%rbp),%rax
imul   -0xa0(%rbp,%rax,4),%ecx
ff
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xa4(%rbp),%esi
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    11d7 <main+0xb7>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rsp,%r14
lea    0x50(%rsp),%rbx
mov    $0xffffffffffffffec,%r15
lea    0xec9(%rip),%r12
lea    0xec5(%rip),%r13
xchg   %ax,%ax
lea    0x15(%r15),%ebp
lea    0xea5(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %r13,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
add    $0x4,%r14
add    $0x4,%rbx
inc    %r15
jne    1150 <main+0x30>
lea    0xe89(%rip),%r14
lea    0xe90(%rip),%r15
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x50(%rsp,%rbx,4),%esi
mov    (%rsp,%rbx,4),%edx
mov    %edx,%ecx
imul   %esi,%ecx
add    %ecx,%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x14,%rbx
jne    11b0 <main+0x90>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Informe F[%d]: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Informe G[%d]: \00"
@.str.3 = [14 x i8] c"%d * %d = %d\0A\00"
@.str.4 = [14 x i8] c"Produto: %d\0A\0A\00"
define void @main() {
%1 = alloca [20 x i32]
%2 = alloca [20 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 20
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %21
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %22)
br label %24
24: ; preds = %9
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %6
27: ; preds = %6
store i32 0, i32* %5
br label %28
28: ; preds = %63, %27
%29 = load i32, i32* %5
%30 = icmp slt i32 %29, 20
br i1 %30, label %31, label %66
31: ; preds = %28
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = load i32, i32* %5
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = mul nsw i32 %35, %39
%41 = load i32, i32* %3
%42 = add nsw i32 %41, %40
store i32 %42, i32* %3
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %44
%46 = load i32, i32* %45
%47 = load i32, i32* %5
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = load i32, i32* %5
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = load i32, i32* %5
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = mul nsw i32 %54, %58
%60 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %46, i32 %50, i32 %59)
%61 = load i32, i32* %3
%62 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %31
%64 = load i32, i32* %5
%65 = add nsw i32 %64, 1
store i32 %65, i32* %5
br label %28
66: ; preds = %28
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Informe F[%d]: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Informe G[%d]: \00"
@.str.3 = [14 x i8] c"%d * %d = %d\0A\00"
@.str.4 = [14 x i8] c"Produto: %d\0A\0A\00"
define void @main() {
%1 = alloca [20 x i32]
%2 = alloca [20 x i32]
%3 = bitcast [20 x i32]* %1 to i8*
%4 = bitcast [20 x i32]* %2 to i8*
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %7, %5 ]
%7 = add nuw nsw i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %6
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%13 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %6
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
%15 = icmp eq i64 %7, 20
br i1 %15, label %17, label %5
16: ; preds = %17
ret void
17: ; preds = %5, %17
%18 = phi i64 [ %28, %17 ], [ 0, %5 ]
%19 = phi i32 [ %25, %17 ], [ 0, %5 ]
%20 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %18
%21 = load i32, i32* %20
%22 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %18
%23 = load i32, i32* %22
%24 = mul nsw i32 %23, %21
%25 = add nsw i32 %24, %19
%26 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %21, i32 %23, i32 %24)
%27 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %25)
%28 = add nuw nsw i64 %18, 1
%29 = icmp eq i64 %28, 20
br i1 %29, label %16, label %17
}