#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 *, ...);
void main() {
  int idade, *pint;
  float altura, *pfloat;
  printf("Digite sua idade: ");
  scanf("%d", &idade);
  printf("Digite sua altura em metros: ");
  scanf(" %f", &altura);
  pint = &idade;
  pfloat = &altura;
  printf("Voce tem %d anos e mede %.2fm.\n", *pint, *pfloat);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Digite sua idade: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"Digite sua altura em metros: \00"
@.str.3 = [4 x i8] c" %f\00"
@.str.4 = [32 x i8] c"Voce tem %d anos e mede %.2fm.\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca float
%4 = alloca float*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %3)
store i32* %1, i32** %2
store float* %3, float** %4
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = load float*, float** %4
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %10, double %13)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Digite sua idade: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"Digite sua altura em metros: \00"
@.str.3 = [4 x i8] c" %f\00"
@.str.4 = [32 x i8] c"Voce tem %d anos e mede %.2fm.\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %2)
%9 = load i32, i32* %1
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %9, double %11)
ret void
}