#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 */
struct measure {
  float centimeters;
  int inch;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
float fabs(float);
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int strlen(char *);
int main() {
  union measure {
    float centimeters;
    int inch;
  } you, paul;
  paul.inch = 70;
  float diff;
  char title[] = "How do you stand when compare with Paul";
  int title_len;
  int x = 0;
  printf("\t%s\n\t", title);
  title_len = strlen(title);
  for (x = 0; x < title_len; x++)
    printf("*");
  puts("\n");
  printf("Paul is %d inches tall.\n", paul.inch);
  printf("How tall are you in inches? %c ", 16);
  scanf("%d", &you.inch);
  you.centimeters = 2.54 * (float)you.inch;
  paul.centimeters = 2.54 * (float)paul.inch;
  diff = paul.centimeters - you.centimeters;
  diff = fabs(diff);
  printf("\n\nSo...\n\tYou are %.1f centimeters tall", you.centimeters);
  printf("\n\tAnd Paul, being %.1f centimeters tall,\n\t\tis",
         paul.centimeters);
  if (paul.centimeters > you.centimeters)
    printf(" %.2f centimeters taller than you! %c", diff, 2);
  else if (paul.centimeters < you.centimeters)
    printf(" %.2f centimeters shorter than you! %c", diff, 1);
  else
    printf(" the same height as you!!!\n\t\tW O W !!!");
  puts("\n\n");
  while (getchar() != '~')
    continue;
  getchar();
  exit(762323145);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x46,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe6f(%rip),%rsi
mov    $0x28,%edx
call   1080 <memcpy@plt>
movl   $0x0,-0x48(%rbp)
lea    -0x40(%rbp),%rsi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    11ff <main+0x7f>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11d7 <main+0x57>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%esi
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe36(%rip),%rdi
mov    $0x10,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x8(%rbp),%rsi
lea    0xe3f(%rip),%rdi
call   1090 <scanf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdb0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd92(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1060 <fabs@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd3(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde3(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  -0x10(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    12f7 <main+0x177>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdeb(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    133e <main+0x1be>
movss  -0x10(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    132b <main+0x1ab>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xddd(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    1339 <main+0x1b9>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    133e <main+0x1be>
lea    0xe00(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
movsbl %al,%eax
cmp    $0x7e,%eax
je     1362 <main+0x1e2>
jmp    134a <main+0x1ca>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    $0x2d7020c9,%edi
call   10a0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movabs $0x6c756150206874,%rax
mov    %rax,0x40(%rsp)
lea    0xeb5(%rip),%rdi
lea    0x20(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    11cf <main+0x5f>
mov    %eax,%ebx
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11c0 <main+0x50>
lea    0xf8e(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7c(%rip),%rdi
mov    $0x46,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe8f(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1080 <scanf@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xdd9(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
movss  0xdd7(%rip),%xmm1
subss  %xmm0,%xmm1
andps  0xddc(%rip),%xmm1
movaps %xmm1,0x10(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe46(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xe5f(%rip),%rdi
movsd  0xd9e(%rip),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x8(%rsp),%xmm0
movss  0xd91(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    129b <main+0x12b>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5b(%rip),%rdi
mov    $0x2,%esi
jmp    12bc <main+0x14c>
movaps 0x10(%rsp),%xmm1
ucomiss 0xd69(%rip),%xmm0
jbe    12c5 <main+0x155>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe5e(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    12d3 <main+0x163>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe89(%rip),%rdi
call   1040 <puts@plt>
nop
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0x7e,%al
jne    12e0 <main+0x170>
xor    %eax,%eax
call   1070 <getchar@plt>
mov    $0x2d7020c9,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%union.measure = type { float }
@__const.main.title = [40 x i8] c"How do you stand when compare with Paul\00"
@.str = [6 x i8] c"\09%s\0A\09\00"
@.str.1 = [2 x i8] c"*\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [25 x i8] c"Paul is %d inches tall.\0A\00"
@.str.4 = [32 x i8] c"How tall are you in inches? %c \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [39 x i8] c"\0A\0ASo...\0A\09You are %.1f centimeters tall\00"
@.str.7 = [46 x i8] c"\0A\09And Paul, being %.1f centimeters tall,\0A\09\09is\00"
@.str.8 = [38 x i8] c" %.2f centimeters taller than you! %c\00"
@.str.9 = [39 x i8] c" %.2f centimeters shorter than you! %c\00"
@.str.10 = [39 x i8] c" the same height as you!!!\0A\09\09W O W !!!\00"
@.str.11 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.measure
%3 = alloca %union.measure
%4 = alloca float
%5 = alloca [40 x i8]
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast %union.measure* %3 to i32*
store i32 70, i32* %8
%9 = bitcast [40 x i8]* %5 to i8*
store i32 0, i32* %7
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
store i32 %13, i32* %6
store i32 0, i32* %7
br label %14
14: ; preds = %20, %0
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %18
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
br label %14
23: ; preds = %14
%24 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = bitcast %union.measure* %3 to i32*
%26 = load i32, i32* %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 16)
%29 = bitcast %union.measure* %2 to i32*
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %29)
%31 = bitcast %union.measure* %2 to i32*
%32 = load i32, i32* %31
%33 = sitofp i32 %32 to float
%34 = fpext float %33 to double
%35 = fmul double 2.540000e+00, %34
%36 = fptrunc double %35 to float
%37 = bitcast %union.measure* %2 to float*
store float %36, float* %37
%38 = bitcast %union.measure* %3 to i32*
%39 = load i32, i32* %38
%40 = sitofp i32 %39 to float
%41 = fpext float %40 to double
%42 = fmul double 2.540000e+00, %41
%43 = fptrunc double %42 to float
%44 = bitcast %union.measure* %3 to float*
store float %43, float* %44
%45 = bitcast %union.measure* %3 to float*
%46 = load float, float* %45
%47 = bitcast %union.measure* %2 to float*
%48 = load float, float* %47
%49 = fsub float %46, %48
store float %49, float* %4
%50 = load float, float* %4
%51 = call float @fabs(float %50)
store float %51, float* %4
%52 = bitcast %union.measure* %2 to float*
%53 = load float, float* %52
%54 = fpext float %53 to double
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), double %54)
%56 = bitcast %union.measure* %3 to float*
%57 = load float, float* %56
%58 = fpext float %57 to double
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0), double %58)
%60 = bitcast %union.measure* %3 to float*
%61 = load float, float* %60
%62 = bitcast %union.measure* %2 to float*
%63 = load float, float* %62
%64 = fcmp ogt float %61, %63
br i1 %64, label %65, label %69
65: ; preds = %23
%66 = load float, float* %4
%67 = fpext float %66 to double
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), double %67, i32 2)
br label %82
69: ; preds = %23
%70 = bitcast %union.measure* %3 to float*
%71 = load float, float* %70
%72 = bitcast %union.measure* %2 to float*
%73 = load float, float* %72
%74 = fcmp olt float %71, %73
br i1 %74, label %75, label %79
75: ; preds = %69
%76 = load float, float* %4
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), double %77, i32 1)
br label %81
79: ; preds = %69
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
br label %81
81: ; preds = %79, %75
br label %82
82: ; preds = %81, %65
%83 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %84
84: ; preds = %88, %82
%85 = call signext i8 (...) @getchar()
%86 = sext i8 %85 to i32
%87 = icmp ne i32 %86, 126
br i1 %87, label %88, label %89
88: ; preds = %84
br label %84
89: ; preds = %84
%90 = call signext i8 (...) @getchar()
%91 = call i32 @exit(i32 762323145)
unreachable
}

LLVM IR (-O2):
%union.measure = type { float }
@__const.main.title = [40 x i8] c"How do you stand when compare with Paul\00"
@.str = [6 x i8] c"\09%s\0A\09\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [25 x i8] c"Paul is %d inches tall.\0A\00"
@.str.4 = [32 x i8] c"How tall are you in inches? %c \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [39 x i8] c"\0A\0ASo...\0A\09You are %.1f centimeters tall\00"
@.str.7 = [46 x i8] c"\0A\09And Paul, being %.1f centimeters tall,\0A\09\09is\00"
@.str.8 = [38 x i8] c" %.2f centimeters taller than you! %c\00"
@.str.9 = [39 x i8] c" %.2f centimeters shorter than you! %c\00"
@.str.10 = [39 x i8] c" the same height as you!!!\0A\09\09W O W !!!\00"
@.str.11 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca %union.measure
%2 = alloca [40 x i8]
%3 = bitcast %union.measure* %1 to i8*
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @strlen(i8* %4)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %0, %8
%9 = phi i32 [ %11, %8 ], [ 0, %0 ]
%10 = call i32 @putchar(i32 42)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, %6
br i1 %12, label %13, label %8
13: ; preds = %8, %0
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 70)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 16)
%17 = bitcast %union.measure* %1 to i32*
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %17)
%19 = load i32, i32* %17
%20 = sitofp i32 %19 to float
%21 = fpext float %20 to double
%22 = fmul double %21, 2.540000e+00
%23 = fptrunc double %22 to float
%24 = getelementptr inbounds %union.measure, %union.measure* %1, i64 0, i32 0
store float %23, float* %24
%25 = fsub float 0x40663999A0000000, %23
%26 = call float @llvm.fabs.f32(float %25)
%27 = fpext float %23 to double
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), double %27)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0), double 0x40663999A0000000)
%30 = load float, float* %24
%31 = fcmp olt float %30, 0x40663999A0000000
br i1 %31, label %32, label %35
32: ; preds = %13
%33 = fpext float %26 to double
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), double %33, i32 2)
br label %42
35: ; preds = %13
%36 = fcmp ogt float %30, 0x40663999A0000000
br i1 %36, label %37, label %40
37: ; preds = %35
%38 = fpext float %26 to double
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), double %38, i32 1)
br label %42
40: ; preds = %35
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
br label %42
42: ; preds = %37, %40, %32
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %44
44: ; preds = %44, %42
%45 = call signext i8 (...) @getchar()
%46 = icmp eq i8 %45, 126
br i1 %46, label %47, label %44
47: ; preds = %44
%48 = call signext i8 (...) @getchar()
%49 = call i32 @exit(i32 762323145)
unreachable
}