#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 */
double atan(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *, double *);
double sqrt(int);
int main() {
  const double pi = 4.0 * atan(1.0);
  double r, h, s1, s2, s;
  scanf("%lf%lf", &r, &h);
  s1 = pi * r * r;
  s2 = 2 * pi * r * h;
  s = s1 * 2.0 + s2;
  printf("%.3lf\n", s);
  double a = sqrt(-10);
  printf("%d\n", 1.0 / 0.0);
  printf("%d\n\n%d\n", 1 + 2, 3 + 4);
  printf("%s\n", "%d");
  printf("%s\n", "\\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
call   1040 <atan@plt>
movaps %xmm0,%xmm1
movsd  0xea9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xea9(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe68(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
lea    0xe50(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0xfffffff6,%edi
call   1060 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
lea    0xe3e(%rip),%rdi
movsd  0xe04(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe24(%rip),%rdi
mov    $0x3,%esi
mov    $0x7,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe14(%rip),%rdi
lea    0xe11(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdff(%rip),%rdi
lea    0xdff(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movsd  0xea4(%rip),%xmm0
call   1050 <atan@plt>
lea    0xeb8(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1060 <scanf@plt>
movsd  0x10(%rsp),%xmm1
movsd  0xe83(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xe7b(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0xe7d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xfffffff6,%edi
call   1070 <sqrt@plt>
lea    0xe70(%rip),%rdi
movsd  0xe4e(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe56(%rip),%rdi
mov    $0x3,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe46(%rip),%rdi
call   1030 <puts@plt>
lea    0xe3d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [8 x i8] c"%d\0A\0A%d\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [3 x i8] c"\\n\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %1
%9 = call double @atan(double 1.000000e+00)
%10 = fmul double 4.000000e+00, %9
store double %10, double* %2
%11 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %3, double* %4)
%12 = load double, double* %2
%13 = load double, double* %3
%14 = fmul double %12, %13
%15 = load double, double* %3
%16 = fmul double %14, %15
store double %16, double* %5
%17 = load double, double* %2
%18 = fmul double 2.000000e+00, %17
%19 = load double, double* %3
%20 = fmul double %18, %19
%21 = load double, double* %4
%22 = fmul double %20, %21
store double %22, double* %6
%23 = load double, double* %5
%24 = load double, double* %6
%25 = call double @llvm.fmuladd.f64(double %23, double 2.000000e+00, double %24)
store double %25, double* %7
%26 = load double, double* %7
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %26)
%28 = call double @sqrt(i32 -10)
store double %28, double* %8
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double 0x7FF0000000000000)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 3, i32 7)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [8 x i8] c"%d\0A\0A%d\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [3 x i8] c"\\n\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = tail call double @atan(double 1.000000e+00)
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%7 = load double, double* %1
%8 = fmul double %7, 0x400921FB54442D18
%9 = fmul double %7, %8
%10 = fmul double %7, 0x401921FB54442D18
%11 = load double, double* %2
%12 = fmul double %10, %11
%13 = call double @llvm.fmuladd.f64(double %9, double 2.000000e+00, double %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %13)
%15 = call double @sqrt(i32 -10)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double 0x7FF0000000000000)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 3, i32 7)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}