#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 /*<<< orphan*/ scanf(char *, float *);
int main() {
  float moeda1real = 100;
  float moeda50cent = 50;
  float moeda25cent = 25;
  float moeda10cent = 10;
  float moeda5cent = 5;
  float soma;
  printf("\nDigite a quantidade de moedas de R$01,00:");
  scanf("%f", &moeda1real);
  printf("\nDigite a quantidade de moedas de R$00,50:");
  scanf("%f", &moeda50cent);
  printf("\nDigite a quantidade de moedas de R$00,25:");
  scanf("%f", &moeda25cent);
  printf("\nDigite a quantidade de moedas de R$00,10:");
  scanf("%f", &moeda10cent);
  printf("\nDigite a quantidade de moedas de R$00,05:");
  scanf("%f", &moeda5cent);
  soma = moeda1real + moeda50cent + moeda25cent + moeda10cent + moeda5cent;
  printf("\nA quantidade total de dinheiro é de: R$%f", soma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xec8(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeb7(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xea6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe95(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8f(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf53(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf35(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0x42c80000,0x1c(%rsp)
42
movl   $0x42480000,0x18(%rsp)
42
movl   $0x41c80000,0x14(%rsp)
41
movl   $0x41200000,0x10(%rsp)
41
movl   $0x40a00000,0xc(%rsp)
40
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf9e(%rip),%rbx
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
addss  0x18(%rsp),%xmm0
addss  0x14(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"\0ADigite a quantidade de moedas de R$01,00:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,50:\00"
@.str.3 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,25:\00"
@.str.4 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,10:\00"
@.str.5 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,05:\00"
@.str.6 = [44 x i8] c"\0AA quantidade total de dinheiro \C3\A9 de: R$%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
store float 1.000000e+02, float* %2
store float 5.000000e+01, float* %3
store float 2.500000e+01, float* %4
store float 1.000000e+01, float* %5
store float 5.000000e+00, float* %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%18 = load float, float* %2
%19 = load float, float* %3
%20 = fadd float %18, %19
%21 = load float, float* %4
%22 = fadd float %20, %21
%23 = load float, float* %5
%24 = fadd float %22, %23
%25 = load float, float* %6
%26 = fadd float %24, %25
store float %26, float* %7
%27 = load float, float* %7
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), double %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"\0ADigite a quantidade de moedas de R$01,00:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,50:\00"
@.str.3 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,25:\00"
@.str.4 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,10:\00"
@.str.5 = [43 x i8] c"\0ADigite a quantidade de moedas de R$00,05:\00"
@.str.6 = [44 x i8] c"\0AA quantidade total de dinheiro \C3\A9 de: R$%f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = bitcast float* %1 to i8*
store float 1.000000e+02, float* %1
%7 = bitcast float* %2 to i8*
store float 5.000000e+01, float* %2
%8 = bitcast float* %3 to i8*
store float 2.500000e+01, float* %3
%9 = bitcast float* %4 to i8*
store float 1.000000e+01, float* %4
%10 = bitcast float* %5 to i8*
store float 5.000000e+00, float* %5
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%21 = load float, float* %1
%22 = load float, float* %2
%23 = fadd float %21, %22
%24 = load float, float* %3
%25 = fadd float %23, %24
%26 = load float, float* %4
%27 = fadd float %25, %26
%28 = load float, float* %5
%29 = fadd float %27, %28
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), double %30)
ret i32 0
}