#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 *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int main() {
  float altura, peso;
  char sexo[10];
  printf("Digite sua altura\n");
  scanf("%f", &altura);
  printf("Digite seu peso\n");
  scanf("%f", &peso);
  printf("Digite seu sexo\n");
  scanf("%9s", sexo);
  if (!strcmp(sexo, "masculino"))
    printf("Peso Ideal:%f\n", (72.7 * altura) - 58);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x16(%rbp),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x16(%rbp),%rdi
lea    0xea2(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11e7 <main+0xb7>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe37(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe33(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xe76(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8e(%rip),%rdi
lea    0x12(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movabs $0x6e696c756373616d,%rax
6c 69 6e
xor    0x12(%rsp),%rax
movzwl 0x1a(%rsp),%ecx
xor    $0x6f,%rcx
or     %rax,%rcx
jne    11d6 <main+0xa6>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe40(%rip),%xmm0
addsd  0xe40(%rip),%xmm0
lea    0xe52(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Digite sua altura\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [17 x i8] c"Digite seu peso\0A\00"
@.str.3 = [17 x i8] c"Digite seu sexo\0A\00"
@.str.4 = [4 x i8] c"%9s\00"
@.str.5 = [10 x i8] c"masculino\00"
@.str.6 = [15 x i8] c"Peso Ideal:%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca [10 x i8]
store i32 0, i32* %1
%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), float* %2)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%13 = call i32 @strcmp(i8* %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
br i1 %14, label %20, label %15
15: ; preds = %0
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = call double @llvm.fmuladd.f64(double 7.270000e+01, double %17, double -5.800000e+01)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), double %18)
br label %20
20: ; preds = %15, %0
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.4 = [4 x i8] c"%9s\00"
@.str.5 = [10 x i8] c"masculino\00"
@.str.6 = [15 x i8] c"Peso Ideal:%f\0A\00"
@str = [18 x i8] c"Digite sua altura\00"
@str.7 = [16 x i8] c"Digite seu peso\00"
@str.8 = [16 x i8] c"Digite seu sexo\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca [10 x i8]
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.7, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.8, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %6)
%13 = call i32 @bcmp(i8* dereferenceable(10) %6, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i64 10)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %0
%16 = load float, float* %1
%17 = fpext float %16 to double
%18 = call double @llvm.fmuladd.f64(double %17, double 7.270000e+01, double -5.800000e+01)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), double %18)
br label %20
20: ; preds = %15, %0
ret i32 0
}