#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 *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int x;
  int y;
  float radius;
  float circumference;
  printf("Enter your x coordinate:\n");
  scanf(" %d", &x);
  printf("Enter radius of circle:\n");
  scanf(" %f", &radius);
  y = (2 * x) + 4;
  radius *= 3.14159 * radius;
  circumference *= 2 * 3.14159;
  printf("The y coordinate is: %d\n", y);
  printf("The area is: %.2f\n", radius);
  printf("The circumference is: %.2f\n", circumference);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe7c(%rip),%xmm1
mulsd  %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe49(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf22(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb1(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    (%rax,%rax,1),%esi
add    $0x4,%esi
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe78(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rsp)
lea    0xe75(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe77(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe7c(%rip),%rdi
movsd  0xe38(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter your x coordinate:\0A\00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [25 x i8] c"Enter radius of circle:\0A\00"
@.str.3 = [4 x i8] c" %f\00"
@.str.4 = [25 x i8] c"The y coordinate is: %d\0A\00"
@.str.5 = [19 x i8] c"The area is: %.2f\0A\00"
@.str.6 = [28 x i8] c"The circumference is: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %4)
%10 = load i32, i32* %2
%11 = mul nsw i32 2, %10
%12 = add nsw i32 %11, 4
store i32 %12, i32* %3
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = fmul double 3.141590e+00, %14
%16 = load float, float* %4
%17 = fpext float %16 to double
%18 = fmul double %17, %15
%19 = fptrunc double %18 to float
store float %19, float* %4
%20 = load float, float* %5
%21 = fpext float %20 to double
%22 = fmul double %21, 6.283180e+00
%23 = fptrunc double %22 to float
store float %23, float* %5
%24 = load i32, i32* %3
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %24)
%26 = load float, float* %4
%27 = fpext float %26 to double
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), double %27)
%29 = load float, float* %5
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %30)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c" %d\00"
@.str.3 = [4 x i8] c" %f\00"
@.str.4 = [25 x i8] c"The y coordinate is: %d\0A\00"
@.str.5 = [19 x i8] c"The area is: %.2f\0A\00"
@.str.6 = [28 x i8] c"The circumference is: %.2f\0A\00"
@str = [25 x i8] c"Enter your x coordinate:\00"
@str.7 = [24 x i8] c"Enter radius of circle:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %2)
%9 = load i32, i32* %1
%10 = shl nsw i32 %9, 1
%11 = add nsw i32 %10, 4
%12 = load float, float* %2
%13 = fpext float %12 to double
%14 = fmul double %13, 3.141590e+00
%15 = fmul double %14, %13
%16 = fptrunc double %15 to float
store float %16, float* %2
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%18 = load float, float* %2
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), double %19)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double 0x7FF8000000000000)
ret i32 0
}