#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 *);
int main() {
  const double pi = 3.14;
  int r, X;
  float A;
  printf("Yaricap deger giriniz      : ");
  scanf("%d", &r);
  printf("Merkez aci degerini giriniz: ");
  scanf("%d", &X);
  A = pi * r * r * (X / 360.0);
  printf("\n==================================");
  printf("\nAcinin taradigi alan %.3f cm-dir.", A);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe8a(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xe68(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeac(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
cvtsi2sdl 0xc(%rsp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvtsi2sdl 0x8(%rsp),%xmm2
divsd  0xe86(%rip),%xmm2
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,0x4(%rsp)
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Yaricap deger giriniz : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"Merkez aci degerini giriniz: \00"
@.str.3 = [36 x i8] c"\0A==================================\00"
@.str.4 = [35 x i8] c"\0AAcinin taradigi alan %.3f cm-dir.\00"
define i32 @main() {
%1 = alloca double
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store double 3.140000e+00, double* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 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), i32* %2)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to double
%11 = fmul double 3.140000e+00, %10
%12 = load i32, i32* %2
%13 = sitofp i32 %12 to double
%14 = fmul double %11, %13
%15 = load i32, i32* %3
%16 = sitofp i32 %15 to double
%17 = fdiv double %16, 3.600000e+02
%18 = fmul double %14, %17
%19 = fptrunc double %18 to float
store float %19, float* %4
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%21 = load float, float* %4
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), double %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Yaricap deger giriniz : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"Merkez aci degerini giriniz: \00"
@.str.3 = [36 x i8] c"\0A==================================\00"
@.str.4 = [35 x i8] c"\0AAcinin taradigi alan %.3f cm-dir.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 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), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 3.140000e+00
%12 = fmul double %11, %10
%13 = load i32, i32* %2
%14 = sitofp i32 %13 to double
%15 = fdiv double %14, 3.600000e+02
%16 = fmul double %12, %15
%17 = fptrunc double %16 to float
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%19 = fpext float %17 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), double %19)
ret i32 0
}