#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 *, double, double, ...);
int main(int argc, char *argv[]) {
  double h = 5.77;
  double r = 6.1;
  double s, v;
  s = (r + h) * 2 * 3.1415926 * r;
  v = 3.1415926 * r * r * h;
  printf("The raduis is %.3f, the height of the cylinder is %.3f, the surface "
         "area of the cylinder is %.3f\n and the valume of the cylinder is "
         "%.3f\n\n ",
         r, h, s, v);
  if (r > h)
    printf("The raduis %.1f is larger than height %.1f\n", r, h);
  if (h > r)
    printf("The height %.1f is larger than raduis %.1f\n", h, r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xeb6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea2(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe8c(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
lea    0xe7d(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11d2 <main+0xc2>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xee1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11fa <main+0xea>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xee5(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf08(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
movsd  0xee0(%rip),%xmm2
movsd  0xee0(%rip),%xmm3
mov    $0x4,%al
call   1030 <printf@plt>
lea    0xf66(%rip),%rdi
movsd  0xeb2(%rip),%xmm0
movsd  0xeb2(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [140 x i8] c"The raduis is %.3f, the height of the cylinder is %.3f, the surface area of the cylinder is %.3f\0A and the valume of the cylinder is %.3f\0A\0A \00"
@.str.1 = [44 x i8] c"The raduis %.1f is larger than height %.1f\0A\00"
@.str.2 = [44 x i8] c"The height %.1f is larger than raduis %.1f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 5.770000e+00, double* %6
store double 6.100000e+00, double* %7
%10 = load double, double* %7
%11 = load double, double* %6
%12 = fadd double %10, %11
%13 = fmul double %12, 2.000000e+00
%14 = fmul double %13, 0x400921FB4D12D84A
%15 = load double, double* %7
%16 = fmul double %14, %15
store double %16, double* %8
%17 = load double, double* %7
%18 = fmul double 0x400921FB4D12D84A, %17
%19 = load double, double* %7
%20 = fmul double %18, %19
%21 = load double, double* %6
%22 = fmul double %20, %21
store double %22, double* %9
%23 = load double, double* %7
%24 = load double, double* %6
%25 = load double, double* %8
%26 = load double, double* %9
%27 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), double %23, double %24, double %25, double %26)
%28 = load double, double* %7
%29 = load double, double* %6
%30 = fcmp ogt double %28, %29
br i1 %30, label %31, label %35
31: ; preds = %2
%32 = load double, double* %7
%33 = load double, double* %6
%34 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double %32, double %33)
br label %35
35: ; preds = %31, %2
%36 = load double, double* %6
%37 = load double, double* %7
%38 = fcmp ogt double %36, %37
br i1 %38, label %39, label %43
39: ; preds = %35
%40 = load double, double* %6
%41 = load double, double* %7
%42 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), double %40, double %41)
br label %43
43: ; preds = %39, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [140 x i8] c"The raduis is %.3f, the height of the cylinder is %.3f, the surface area of the cylinder is %.3f\0A and the valume of the cylinder is %.3f\0A\0A \00"
@.str.1 = [44 x i8] c"The raduis %.1f is larger than height %.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), double 6.100000e+00, double 5.770000e+00, double 0x407C6F253C5EB554, double 0x4085140ACC021ED7)
%4 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double 6.100000e+00, double 5.770000e+00)
ret i32 0
}