#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float euro[5], dollar[5];
  int i;
  printf("Please enter %d values for euro[]:\n", 5);
  for (i = 0; i < 5; i++) {
    scanf("%f", &euro[i]);
    getchar();
  }
  for (i = 0; i < 5; i++) {
    dollar[i] = euro[i];
  }
  for (i = 0; i < 5; i++) {
    dollar[i] = euro[i] * 1.3;
  }
  printf("\nEuro - Dollar\n----------------------------\n");
  for (i = 0; i < 5; i++) {
    printf("(%d) Euro: %.2f\t\t Dollar: %.2f\n", i + 1, euro[i], dollar[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x5,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x5,-0x44(%rbp)
jge    1193 <main+0x63>
movslq -0x44(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1159 <main+0x29>
movl   $0x0,-0x44(%rbp)
cmpl   $0x5,-0x44(%rbp)
jge    11c6 <main+0x96>
movslq -0x44(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
movslq -0x44(%rbp),%rax
movss  %xmm0,-0x40(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    119a <main+0x6a>
movl   $0x0,-0x44(%rbp)
cmpl   $0x5,-0x44(%rbp)
jge    120d <main+0xdd>
movslq -0x44(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe13(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0x44(%rbp),%rax
movss  %xmm0,-0x40(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11cd <main+0x9d>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x5,-0x44(%rbp)
jge    126a <main+0x13a>
mov    -0x44(%rbp),%esi
add    $0x1,%esi
movslq -0x44(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0x44(%rbp),%rax
movss  -0x40(%rbp,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe07(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1222 <main+0xf2>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xebc(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm0,%xmm0
movsd  0xe28(%rip),%xmm2
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x1c(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x20(%rsp)
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x24(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2c(%rsp)
lea    0xe05(%rip),%rdi
call   1030 <puts@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x1c(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdc6(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x24(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x28(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x2c(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Please enter %d values for euro[]:\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [45 x i8] c"\0AEuro - Dollar\0A----------------------------\0A\00"
@.str.3 = [32 x i8] c"(%d) Euro: %.2f\09\09 Dollar: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca [5 x float]
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 5)
store i32 0, i32* %4
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %11
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %12)
%14 = call i32 (...) @getchar()
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %6
18: ; preds = %6
store i32 0, i32* %4
br label %19
19: ; preds = %30, %18
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, 5
br i1 %21, label %22, label %33
22: ; preds = %19
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %24
%26 = load float, float* %25
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 %28
store float %26, float* %29
br label %30
30: ; preds = %22
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %19
33: ; preds = %19
store i32 0, i32* %4
br label %34
34: ; preds = %48, %33
%35 = load i32, i32* %4
%36 = icmp slt i32 %35, 5
br i1 %36, label %37, label %51
37: ; preds = %34
%38 = load i32, i32* %4
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %39
%41 = load float, float* %40
%42 = fpext float %41 to double
%43 = fmul double %42, 1.300000e+00
%44 = fptrunc double %43 to float
%45 = load i32, i32* %4
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 %46
store float %44, float* %47
br label %48
48: ; preds = %37
%49 = load i32, i32* %4
%50 = add nsw i32 %49, 1
store i32 %50, i32* %4
br label %34
51: ; preds = %34
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %4
br label %53
53: ; preds = %70, %51
%54 = load i32, i32* %4
%55 = icmp slt i32 %54, 5
br i1 %55, label %56, label %73
56: ; preds = %53
%57 = load i32, i32* %4
%58 = add nsw i32 %57, 1
%59 = load i32, i32* %4
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %60
%62 = load float, float* %61
%63 = fpext float %62 to double
%64 = load i32, i32* %4
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 %65
%67 = load float, float* %66
%68 = fpext float %67 to double
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %58, double %63, double %68)
br label %70
70: ; preds = %56
%71 = load i32, i32* %4
%72 = add nsw i32 %71, 1
store i32 %72, i32* %4
br label %53
73: ; preds = %53
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Please enter %d values for euro[]:\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [32 x i8] c"(%d) Euro: %.2f\09\09 Dollar: %.2f\0A\00"
@str = [44 x i8] c"\0AEuro - Dollar\0A----------------------------\00"
define i32 @main() {
%1 = alloca [5 x float]
%2 = bitcast [5 x float]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 5)
%4 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%6 = call i32 (...) @getchar()
%7 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %7)
%9 = call i32 (...) @getchar()
%10 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %10)
%12 = call i32 (...) @getchar()
%13 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 3
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %13)
%15 = call i32 (...) @getchar()
%16 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 4
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %16)
%18 = call i32 (...) @getchar()
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = fmul double %20, 1.300000e+00
%22 = fptrunc double %21 to float
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = fmul double %24, 1.300000e+00
%26 = fptrunc double %25 to float
%27 = load float, float* %10
%28 = fpext float %27 to double
%29 = fmul double %28, 1.300000e+00
%30 = fptrunc double %29 to float
%31 = load float, float* %13
%32 = fpext float %31 to double
%33 = fmul double %32, 1.300000e+00
%34 = fptrunc double %33 to float
%35 = load float, float* %16
%36 = fpext float %35 to double
%37 = fmul double %36, 1.300000e+00
%38 = fptrunc double %37 to float
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%40 = load float, float* %4
%41 = fpext float %40 to double
%42 = fpext float %22 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 1, double %41, double %42)
%44 = load float, float* %7
%45 = fpext float %44 to double
%46 = fpext float %26 to double
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 2, double %45, double %46)
%48 = load float, float* %10
%49 = fpext float %48 to double
%50 = fpext float %30 to double
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 3, double %49, double %50)
%52 = load float, float* %13
%53 = fpext float %52 to double
%54 = fpext float %34 to double
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 4, double %53, double %54)
%56 = load float, float* %16
%57 = fpext float %56 to double
%58 = fpext float %38 to double
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 5, double %57, double %58)
ret i32 0
}