#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*/ calc_habitante(float *, float *, float *, float *);
int /*<<< orphan*/ printf(char *, float);
void main() {
  float media_filho = 0, maior_salario = 0, media_salario = 0, perc_pessoas = 0;
  calc_habitante(&media_filho, &maior_salario, &media_salario, &perc_pessoas);
  printf("Media de filhos: %.2f\n", media_filho);
  printf("Maior salario: %.2f\n", maior_salario);
  printf("Media de salario: %.2f\n", media_salario);
  printf("Media de pessoas que ganham ate 350 R$: %.2f\n", perc_pessoas);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1030 <calc_habitante@plt>
movss  -0x4(%rbp),%xmm0
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
movss  -0x10(%rbp),%xmm0
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <calc_habitante@plt>
movss  0x14(%rsp),%xmm0
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Media de filhos: %.2f\0A\00"
@.str.1 = [21 x i8] c"Maior salario: %.2f\0A\00"
@.str.2 = [24 x i8] c"Media de salario: %.2f\0A\00"
@.str.3 = [46 x i8] c"Media de pessoas que ganham ate 350 R$: %.2f\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float 0.000000e+00, float* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
%5 = call i32 @calc_habitante(float* %1, float* %2, float* %3, float* %4)
%6 = load float, float* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), float %6)
%8 = load float, float* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), float %8)
%10 = load float, float* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), float %10)
%12 = load float, float* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), float %12)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Media de filhos: %.2f\0A\00"
@.str.1 = [21 x i8] c"Maior salario: %.2f\0A\00"
@.str.2 = [24 x i8] c"Media de salario: %.2f\0A\00"
@.str.3 = [46 x i8] c"Media de pessoas que ganham ate 350 R$: %.2f\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%6 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%7 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%8 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%9 = call i32 @calc_habitante(float* %1, float* %2, float* %3, float* %4)
%10 = load float, float* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), float %10)
%12 = load float, float* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), float %12)
%14 = load float, float* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), float %14)
%16 = load float, float* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), float %16)
ret void
}