#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() {
  float yari_cap, cap, cevre, alan;
  float pi = 3.14159;
  printf("Programdan cikmak icin -1 giriniz.\n");
  printf("Cemberin yari capini giriniz:");
  scanf("%f", &yari_cap);
  while (yari_cap != -1) {
    cap = 2 * yari_cap;
    cevre = 2 * pi * yari_cap;
    alan = pi * yari_cap * yari_cap;
    printf("Cemberin capi=%.2f\tCevresi=%.2f\tAlan=%.2f\n", cap, cevre, alan);
    printf("Cemberin yari capini giriniz:");
    scanf("%f", &yari_cap);
  }
  printf("Programdan ciktiniz.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe8f(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1189 <main+0x69>
jp     1189 <main+0x69>
jmp    1212 <main+0xf2>
movss  0xe77(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe65(%rip),%xmm0
mulss  -0x18(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x18(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe69(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    1168 <main+0x48>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe90(%rip),%xmm0
jne    1178 <main+0x48>
jnp    1206 <main+0xd6>
lea    0xeae(%rip),%r14
lea    0xe86(%rip),%r15
lea    0xe9d(%rip),%r12
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movaps %xmm0,%xmm1
addss  %xmm0,%xmm1
movaps %xmm0,%xmm2
mulss  0xe52(%rip),%xmm2
movaps %xmm0,%xmm3
mulss  0xe4b(%rip),%xmm3
mulss  %xmm0,%xmm3
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm3,%xmm2
mov    %r14,%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xdfe(%rip),%xmm0
jne    11a0 <main+0x70>
jp     11a0 <main+0x70>
lea    0xe4b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Programdan cikmak icin -1 giriniz.\0A\00"
@.str.1 = [30 x i8] c"Cemberin yari capini giriniz:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [43 x i8] c"Cemberin capi=%.2f\09Cevresi=%.2f\09Alan=%.2f\0A\00"
@.str.4 = [21 x i8] c"Programdan ciktiniz.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
store float 0x400921FA00000000, float* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
br label %10
10: ; preds = %13, %0
%11 = load float, float* %2
%12 = fcmp une float %11, -1.000000e+00
br i1 %12, label %13, label %34
13: ; preds = %10
%14 = load float, float* %2
%15 = fmul float 2.000000e+00, %14
store float %15, float* %3
%16 = load float, float* %6
%17 = fmul float 2.000000e+00, %16
%18 = load float, float* %2
%19 = fmul float %17, %18
store float %19, float* %4
%20 = load float, float* %6
%21 = load float, float* %2
%22 = fmul float %20, %21
%23 = load float, float* %2
%24 = fmul float %22, %23
store float %24, float* %5
%25 = load float, float* %3
%26 = fpext float %25 to double
%27 = load float, float* %4
%28 = fpext float %27 to double
%29 = load float, float* %5
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %26, double %28, double %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
br label %10
34: ; preds = %10
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [30 x i8] c"Cemberin yari capini giriniz:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [43 x i8] c"Cemberin capi=%.2f\09Cevresi=%.2f\09Alan=%.2f\0A\00"
@.str.4 = [21 x i8] c"Programdan ciktiniz.\00"
@str = [35 x i8] c"Programdan cikmak icin -1 giriniz.\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%6 = load float, float* %1
%7 = fcmp une float %6, -1.000000e+00
br i1 %7, label %8, label %22
8: ; preds = %0, %8
%9 = phi float [ %20, %8 ], [ %6, %0 ]
%10 = fmul float %9, 2.000000e+00
%11 = fmul float %9, 0x401921FA00000000
%12 = fmul float %9, 0x400921FA00000000
%13 = fmul float %9, %12
%14 = fpext float %10 to double
%15 = fpext float %11 to double
%16 = fpext float %13 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %14, double %15, double %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%20 = load float, float* %1
%21 = fcmp une float %20, -1.000000e+00
br i1 %21, label %8, label %22
22: ; preds = %8, %0
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}