#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 *, float *);
int main(int argc, char const *argv[]) {
  float area, circum, radius;
  printf("what is the radius of your pizza\n");
  scanf("%f", &radius);
  area = 3.14159 * radius * radius;
  circum = 2.0 * 3.14159 * radius;
  printf("Your basic pizza parameters are as follows:\n");
  printf("circumference = %1.2f. area = %1.2f\n", circum, area);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe70(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe9e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
lea    0x14(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9d(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x10(%rsp)
mulsd  0xe8b(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe65(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"what is the radius of your pizza\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [45 x i8] c"Your basic pizza parameters are as follows:\0A\00"
@.str.3 = [37 x i8] c"circumference = %1.2f. area = %1.2f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %8)
%11 = load float, float* %8
%12 = fpext float %11 to double
%13 = fmul double 3.141590e+00, %12
%14 = load float, float* %8
%15 = fpext float %14 to double
%16 = fmul double %13, %15
%17 = fptrunc double %16 to float
store float %17, float* %6
%18 = load float, float* %8
%19 = fpext float %18 to double
%20 = fmul double 6.283180e+00, %19
%21 = fptrunc double %20 to float
store float %21, float* %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = load float, float* %6
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), double %24, double %26)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [37 x i8] c"circumference = %1.2f. area = %1.2f\0A\00"
@str = [33 x i8] c"what is the radius of your pizza\00"
@str.4 = [44 x i8] c"Your basic pizza parameters are as follows:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fmul double %8, 3.141590e+00
%10 = fmul double %9, %8
%11 = fptrunc double %10 to float
%12 = fmul double %8, 6.283180e+00
%13 = fptrunc double %12 to float
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.4, i64 0, i64 0))
%15 = fpext float %13 to double
%16 = fpext float %11 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), double %15, double %16)
ret i32 0
}