#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 */
typedef int /*<<< orphan*/ input;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sscanf(char *, char *, double *, double *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  char input[255];
  double radius, width, earths, ring_surface;
  while (fgets(input, sizeof(input), stdin) != NULL) {
    sscanf(input, "%lf %lf", &radius, &width);
    ring_surface = (2 * 3.14159265 * radius * width);
    earths = ring_surface / (196.935 * 1000000);
    printf("%d EARTHS\n", (int)earths);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     11e3 <main+0xb3>
lea    -0x110(%rbp),%rdi
lea    0xe95(%rip),%rsi
lea    -0x118(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1050 <sscanf@plt>
movsd  0xe72(%rip),%xmm0
mulsd  -0x118(%rbp),%xmm0
ff
mulsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movsd  0xe42(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
cvttsd2si -0x128(%rbp),%esi
ff
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    0x2ea0(%rip),%rbp
mov    0x0(%rbp),%edx
lea    0x10(%rsp),%rdi
mov    $0xff,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     11cd <main+0x9d>
lea    0xeaa(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%r15
mov    %rsp,%r12
lea    0xe9e(%rip),%r13
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
call   1050 <sscanf@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xe61(%rip),%xmm0
mulsd  (%rsp),%xmm0
divsd  0xe5c(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %r13,%rdi
call   1030 <printf@plt>
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1040 <fgets@plt>
test   %rax,%rax
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [11 x i8] c"%d EARTHS\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [255 x i8]
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %11
11: ; preds = %16, %2
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%13 = load i32, i32* @stdin
%14 = call i32* @fgets(i8* %12, i32 255, i32 %13)
%15 = icmp ne i32* %14, null
br i1 %15, label %16, label %28
16: ; preds = %11
%17 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%18 = call i32 @sscanf(i8* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %7, double* %8)
%19 = load double, double* %7
%20 = fmul double 0x401921FB53C8D4F1, %19
%21 = load double, double* %8
%22 = fmul double %20, %21
store double %22, double* %10
%23 = load double, double* %10
%24 = fdiv double %23, 1.969350e+08
store double %24, double* %9
%25 = load double, double* %9
%26 = fptosi double %25 to i32
%27 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %26)
br label %11
28: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [11 x i8] c"%d EARTHS\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [255 x i8]
%4 = alloca double
%5 = alloca double
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%7 = bitcast double* %4 to i8*
%8 = bitcast double* %5 to i8*
%9 = load i32, i32* @stdin
%10 = call i32* @fgets(i8* %6, i32 255, i32 %9)
%11 = icmp eq i32* %10, null
br i1 %11, label %24, label %12
12: ; preds = %2, %12
%13 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %4, double* %5)
%14 = load double, double* %4
%15 = fmul double %14, 0x401921FB53C8D4F1
%16 = load double, double* %5
%17 = fmul double %15, %16
%18 = fdiv double %17, 1.969350e+08
%19 = fptosi double %18 to i32
%20 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @stdin
%22 = call i32* @fgets(i8* %6, i32 255, i32 %21)
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %12
24: ; preds = %12, %2
ret i32 0
}