#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 *, float);
int /*<<< orphan*/ scanf(char *, float *, char *);
int main() {
  float height;
  char sex;
  scanf("%f %c", &height, &sex);
  printf("%f", sex == 'M' ? 72.7f * height - 58 : 62.1f * height - 44.7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x9(%rbp),%rdx
call   1040 <scanf@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x4d,%eax
jne    117b <main+0x5b>
movss  -0x8(%rbp),%xmm0
movss  0xeaf(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xea7(%rip),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    119d <main+0x7d>
movss  0xe85(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe6c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0x4(%rsp),%rsi
lea    0x3(%rsp),%rdx
call   1040 <scanf@plt>
cmpb   $0x4d,0x3(%rsp)
movss  0x4(%rsp),%xmm0
jne    115a <main+0x3a>
mulss  0xeb8(%rip),%xmm0
addss  0xeb4(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
jmp    116e <main+0x4e>
mulss  0xe9e(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xea2(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f %c\00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %2, i8* %3)
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 77
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load float, float* %2
%10 = call float @llvm.fmuladd.f32(float 0x40522CCCC0000000, float %9, float -5.800000e+01)
%11 = fpext float %10 to double
br label %17
12: ; preds = %0
%13 = load float, float* %2
%14 = fmul float 0x404F0CCCC0000000, %13
%15 = fpext float %14 to double
%16 = fsub double %15, 4.470000e+01
br label %17
17: ; preds = %12, %8
%18 = phi double [ %11, %8 ], [ %16, %12 ]
%19 = fptrunc double %18 to float
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f %c\00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca i8
%3 = bitcast float* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i8* %2)
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 77
%7 = load float, float* %1
br i1 %6, label %8, label %11
8: ; preds = %0
%9 = call float @llvm.fmuladd.f32(float %7, float 0x40522CCCC0000000, float -5.800000e+01)
%10 = fpext float %9 to double
br label %15
11: ; preds = %0
%12 = fmul float %7, 0x404F0CCCC0000000
%13 = fpext float %12 to double
%14 = fadd double %13, -4.470000e+01
br label %15
15: ; preds = %11, %8
%16 = phi double [ %10, %8 ], [ %14, %11 ]
%17 = fptrunc double %16 to float
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float %17)
ret i32 0
}