#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, umfang;
  printf(
      "Welchen Radius hat der Körper, um den das Seil gelegit wird (in m)? : ");
  scanf("%lf", &radius);
  umfang = 2.0 * 3.14159265359 * radius;
  umfang = umfang + 1;
  radius = umfang / 2 / 3.14159265359 - radius;
  printf("\nNach einer Verlängerung um 1 Meter\n   steht es um %.2lf cm ab.",
         radius * 100);
  fflush(stdin);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
movsd  0xeab(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe91(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe72(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe5e(%rip),%xmm1
divsd  %xmm1,%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe40(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2e0e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
movsd  (%rsp),%xmm1
movsd  0xe95(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe91(%rip),%xmm0
mulsd  0xe91(%rip),%xmm0
divsd  0xe91(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
mulsd  0xe88(%rip),%xmm0
lea    0xed5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2e3b(%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 = [72 x i8] c"Welchen Radius hat der K\C3\B6rper, um den das Seil gelegit wird (in m)? : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [65 x i8] c"\0ANach einer Verl\C3\A4ngerung um 1 Meter\0A steht es um %.2lf cm ab.\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = fmul double 0x401921FB54442EEA, %6
store double %7, double* %3
%8 = load double, double* %3
%9 = fadd double %8, 1.000000e+00
store double %9, double* %3
%10 = load double, double* %3
%11 = fdiv double %10, 2.000000e+00
%12 = fdiv double %11, 0x400921FB54442EEA
%13 = load double, double* %2
%14 = fsub double %12, %13
store double %14, double* %2
%15 = load double, double* %2
%16 = fmul double %15, 1.000000e+02
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), double %16)
%18 = load i32, i32* @stdin
%19 = call i32 @fflush(i32 %18)
%20 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [72 x i8] c"Welchen Radius hat der K\C3\B6rper, um den das Seil gelegit wird (in m)? : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [65 x i8] c"\0ANach einer Verl\C3\A4ngerung um 1 Meter\0A steht es um %.2lf cm ab.\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 ([72 x i8], [72 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, 0x401921FB54442EEA
%7 = fadd double %6, 1.000000e+00
%8 = fmul double %7, 5.000000e-01
%9 = fdiv double %8, 0x400921FB54442EEA
%10 = fsub double %9, %5
store double %10, double* %1
%11 = fmul double %10, 1.000000e+02
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), double %11)
%13 = load i32, i32* @stdin
%14 = call i32 @fflush(i32 %13)
%15 = call i32 (...) @getchar()
ret i32 0
}