#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int /*<<< orphan*/ stdin;
int main(void) {
  double radius;
  printf("Radius der Kugel : ");
  scanf("%lf", &radius);
  double umfang = 2.0 * radius * 3.14159265359;
  printf("Umfang=%lf\n", umfang);
  double volumen = 4 * 3.14159265359 * radius * radius * radius / 3.0;
  printf("Volumen=%lf\n", volumen);
  double oberflaeche = 4 * 3.14159265359 * radius * radius;
  printf("Oberflaeche=%lf\n", oberflaeche);
  fflush(stdin);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
movsd  0xea3(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xea1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe5a(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe4b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe72(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe1f(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe55(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
movsd  (%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0xe91(%rip),%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  (%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  0xe7a(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
divsd  0xe72(%rip),%xmm0
lea    0xe97(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
movsd  0xe4f(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
lea    0xe7d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2e0e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Radius der Kugel : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [12 x i8] c"Umfang=%lf\0A\00"
@.str.3 = [13 x i8] c"Volumen=%lf\0A\00"
@.str.4 = [17 x i8] c"Oberflaeche=%lf\0A\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%8 = load double, double* %2
%9 = fmul double 2.000000e+00, %8
%10 = fmul double %9, 0x400921FB54442EEA
store double %10, double* %3
%11 = load double, double* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %11)
%13 = load double, double* %2
%14 = fmul double 0x402921FB54442EEA, %13
%15 = load double, double* %2
%16 = fmul double %14, %15
%17 = load double, double* %2
%18 = fmul double %16, %17
%19 = fdiv double %18, 3.000000e+00
store double %19, double* %4
%20 = load double, double* %4
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %20)
%22 = load double, double* %2
%23 = fmul double 0x402921FB54442EEA, %22
%24 = load double, double* %2
%25 = fmul double %23, %24
store double %25, double* %5
%26 = load double, double* %5
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %26)
%28 = load i32, i32* @stdin
%29 = call i32 @fflush(i32 %28)
%30 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Radius der Kugel : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [12 x i8] c"Umfang=%lf\0A\00"
@.str.3 = [13 x i8] c"Volumen=%lf\0A\00"
@.str.4 = [17 x i8] c"Oberflaeche=%lf\0A\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fmul double %5, 2.000000e+00
%7 = fmul double %6, 0x400921FB54442EEA
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %7)
%9 = load double, double* %1
%10 = fmul double %9, 0x402921FB54442EEA
%11 = fmul double %9, %10
%12 = fmul double %9, %11
%13 = fdiv double %12, 3.000000e+00
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %13)
%15 = load double, double* %1
%16 = fmul double %15, 0x402921FB54442EEA
%17 = fmul double %15, %16
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %17)
%19 = load i32, i32* @stdin
%20 = call i32 @fflush(i32 %19)
%21 = call i32 (...) @getchar()
ret i32 0
}