#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 EXIT_SUCCESS;
int /*<<< orphan*/ circleCalculate(float);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int scanf(char *, float *);
int /*<<< orphan*/ stderr;
int main() {
  float radius;
  printf("Enter radius: ");
  if ((scanf("%f", &radius) == 1)) {
    circleCalculate(radius);
  } else {
    fprintf(stderr, "Wrong value!");
    exit(1);
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    1193 <main+0x43>
movss  -0x8(%rbp),%xmm0
call   1060 <circleCalculate@plt>
jmp    11b2 <main+0x62>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe6f(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    1189 <main+0x39>
movss  0x4(%rsp),%xmm0
call   1060 <circleCalculate@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
lea    0xe79(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Enter radius: \00"
@.str.1 = [3 x i8] c"%f\00"
@stderr = global i32 0
@.str.2 = [13 x i8] c"Wrong value!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load float, float* %2
%8 = call i32 @circleCalculate(float %7)
br label %13
9: ; preds = %0
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %6
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter radius: \00"
@.str.1 = [3 x i8] c"%f\00"
@stderr = global i32 0
@.str.2 = [13 x i8] c"Wrong value!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load float, float* %1
%8 = call i32 @circleCalculate(float %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
10: ; preds = %0
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
}