#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*/ LC_ALL;
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int main() {
  setlocale(LC_ALL, "");
  float premio = 780000.00;
  float primeiro = 0, segundo = 0, terceiro = 0;
  primeiro = premio * 0.46;
  segundo = premio * 0.32;
  terceiro = premio * 0.22;
  printf("O primeiro receberá: %.2f\n", primeiro);
  printf("O segundo receberá: %.2f\n", segundo);
  printf("O terceiro receberá: %.2f\n", terceiro);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xf13(%rip),%rsi
call   1040 <setlocale@plt>
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe96(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe70(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe4a(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xf11(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xecf(%rip),%rdi
movss  0xebb(%rip),%xmm0
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
movss  0xeab(%rip),%xmm0
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
movss  0xe9b(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"O primeiro receber\C3\A1: %.2f\0A\00"
@.str.2 = [27 x i8] c"O segundo receber\C3\A1: %.2f\0A\00"
@.str.3 = [28 x i8] c"O terceiro receber\C3\A1: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = load i32, i32* @LC_ALL
%7 = call i32 @setlocale(i32 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store float 7.800000e+05, float* %2
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fmul double %9, 4.600000e-01
%11 = fptrunc double %10 to float
store float %11, float* %3
%12 = load float, float* %2
%13 = fpext float %12 to double
%14 = fmul double %13, 3.200000e-01
%15 = fptrunc double %14 to float
store float %15, float* %4
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = fmul double %17, 2.200000e-01
%19 = fptrunc double %18 to float
store float %19, float* %5
%20 = load float, float* %3
%21 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), float %20)
%22 = load float, float* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), float %22)
%24 = load float, float* %5
%25 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), float %24)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"O primeiro receber\C3\A1: %.2f\0A\00"
@.str.2 = [27 x i8] c"O segundo receber\C3\A1: %.2f\0A\00"
@.str.3 = [28 x i8] c"O terceiro receber\C3\A1: %.2f\0A\00"
define i32 @main() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), float 3.588000e+05)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), float 2.496000e+05)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), float 1.716000e+05)
ret i32 0
}