#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 */
double kuklos(float);
double parallilogrammo(float, float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
double tetragwno(float);
double trigwno(float, float);
int main(void) {
  float num1, num2;
  char choice;
  do {
    printf("\n0. Ejodos\n1. Tetragwno\n2. Parallilogrammo\n");
    printf("3. Orthogonio Trigwno\n4. Kuklos\ndwse epilogi\n");
    scanf(" %c", &choice);
    printf("Ekanes tin epilogi: %c\n", choice);
    if (choice == '1') {
      printf("Dwse mikos pleuras\n");
      scanf("%f", &num1);
      printf("H PERIMETROS TOY TETRAGWNOU EINAI: %f\n", tetragwno(num1));
    } else if (choice == '2') {
      printf("Dwse platos\n");
      scanf("%f", &num1);
      printf("Dwse mikos\n");
      scanf("%f", &num2);
      printf("H PERIMETROS TOY PARALLHLOGRAMOU EINAI: %f\n",
             parallilogrammo(num1, num2));
    } else if (choice == '3') {
      printf("Dwse mikos kathetis pleuras\n");
      scanf("%f", &num1);
      printf("Dwse mikos orizontias pleuras\n");
      scanf("%f", &num2);
      printf("H PERIMETROS TOY ORTHOGONIOU TRIGONOU EINAI: %f\n",
             trigwno(num1, num2));
    } else if (choice == '4') {
      printf("Dwse mikos aktinas\n");
      scanf("%f", &num1);
      printf("H PERIMETROS TOY KYKLOU EINAI: %f\n", kuklos(num1));
    } else if (choice != '0')
      printf("Lathos epilogi!! Janadokimase\n");
  } while (choice != '0');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0xd(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
movsbl -0xd(%rbp),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movsbl -0xd(%rbp),%eax
cmp    $0x31,%eax
jne    11f9 <main+0x99>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
movss  -0x8(%rbp),%xmm0
call   1060 <tetragwno@plt>
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
jmp    1350 <main+0x1f0>
movsbl -0xd(%rbp),%eax
cmp    $0x32,%eax
jne    1268 <main+0x108>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe6f(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe4f(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <parallilogrammo@plt>
lea    0xe71(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
jmp    134b <main+0x1eb>
movsbl -0xd(%rbp),%eax
cmp    $0x33,%eax
jne    12d7 <main+0x177>
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe00(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xde0(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1040 <trigwno@plt>
lea    0xe6a(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
jmp    1346 <main+0x1e6>
movsbl -0xd(%rbp),%eax
cmp    $0x34,%eax
jne    1321 <main+0x1c1>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd91(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
movss  -0x8(%rbp),%xmm0
call   1050 <kuklos@plt>
lea    0xe65(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
jmp    1341 <main+0x1e1>
movsbl -0xd(%rbp),%eax
cmp    $0x30,%eax
je     133c <main+0x1dc>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1341 <main+0x1e1>
jmp    1346 <main+0x1e6>
jmp    134b <main+0x1eb>
jmp    1350 <main+0x1f0>
jmp    1355 <main+0x1f5>
movsbl -0xd(%rbp),%eax
cmp    $0x30,%eax
jne    116f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf80(%rip),%r15
lea    0xe88(%rip),%r12
lea    0xf(%rsp),%r13
lea    0xe80(%rip),%rbx
lea    0xe61(%rip),%r14
lea    0xe8a(%rip),%rbp
jmp    11ef <main+0x7f>
nopl   0x0(%rax,%rax,1)
lea    0xffd(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
movss  0x10(%rsp),%xmm0
call   1070 <tetragwno@plt>
lea    0xe56(%rip),%rdi
mov    $0x1,%al
call   1080 <printf@plt>
cmpb   $0x30,0xf(%rsp)
je     1342 <main+0x1d2>
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
movsbl 0xf(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
movzbl 0xf(%rsp),%eax
add    $0xd0,%al
cmp    $0x4,%al
ja     1290 <main+0x120>
movzbl %al,%eax
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
lea    0xf60(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
call   1040 <parallilogrammo@plt>
lea    0xdd6(%rip),%rdi
jmp    11dd <main+0x6d>
nopl   0x0(%rax)
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
cmpb   $0x30,0xf(%rsp)
jne    11ef <main+0x7f>
jmp    1342 <main+0x1d2>
nopl   0x0(%rax)
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
call   1050 <trigwno@plt>
lea    0xd88(%rip),%rdi
jmp    11dd <main+0x6d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xe39(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
movss  0x10(%rsp),%xmm0
call   1060 <kuklos@plt>
lea    0xd7a(%rip),%rdi
jmp    11dd <main+0x6d>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"\0A0. Ejodos\0A1. Tetragwno\0A2. Parallilogrammo\0A\00"
@.str.1 = [46 x i8] c"3. Orthogonio Trigwno\0A4. Kuklos\0Adwse epilogi\0A\00"
@.str.2 = [4 x i8] c" %c\00"
@.str.3 = [24 x i8] c"Ekanes tin epilogi: %c\0A\00"
@.str.4 = [20 x i8] c"Dwse mikos pleuras\0A\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [39 x i8] c"H PERIMETROS TOY TETRAGWNOU EINAI: %f\0A\00"
@.str.7 = [13 x i8] c"Dwse platos\0A\00"
@.str.8 = [12 x i8] c"Dwse mikos\0A\00"
@.str.9 = [44 x i8] c"H PERIMETROS TOY PARALLHLOGRAMOU EINAI: %f\0A\00"
@.str.10 = [29 x i8] c"Dwse mikos kathetis pleuras\0A\00"
@.str.11 = [31 x i8] c"Dwse mikos orizontias pleuras\0A\00"
@.str.12 = [49 x i8] c"H PERIMETROS TOY ORTHOGONIOU TRIGONOU EINAI: %f\0A\00"
@.str.13 = [20 x i8] c"Dwse mikos aktinas\0A\00"
@.str.14 = [35 x i8] c"H PERIMETROS TOY KYKLOU EINAI: %f\0A\00"
@.str.15 = [31 x i8] c"Lathos epilogi!! Janadokimase\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i8
store i32 0, i32* %1
br label %5
5: ; preds = %68, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 49
br i1 %14, label %15, label %21
15: ; preds = %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%18 = load float, float* %2
%19 = call double @tetragwno(float %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), double %19)
br label %67
21: ; preds = %5
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 50
br i1 %24, label %25, label %34
25: ; preds = %21
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %3)
%30 = load float, float* %2
%31 = load float, float* %3
%32 = call double @parallilogrammo(float %30, float %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), double %32)
br label %66
34: ; preds = %21
%35 = load i8, i8* %4
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 51
br i1 %37, label %38, label %47
38: ; preds = %34
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %3)
%43 = load float, float* %2
%44 = load float, float* %3
%45 = call double @trigwno(float %43, float %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0), double %45)
br label %65
47: ; preds = %34
%48 = load i8, i8* %4
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 52
br i1 %50, label %51, label %57
51: ; preds = %47
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%53 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%54 = load float, float* %2
%55 = call double @kuklos(float %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), double %55)
br label %64
57: ; preds = %47
%58 = load i8, i8* %4
%59 = sext i8 %58 to i32
%60 = icmp ne i32 %59, 48
br i1 %60, label %61, label %63
61: ; preds = %57
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
br label %63
63: ; preds = %61, %57
br label %64
64: ; preds = %63, %51
br label %65
65: ; preds = %64, %38
br label %66
66: ; preds = %65, %25
br label %67
67: ; preds = %66, %15
br label %68
68: ; preds = %67
%69 = load i8, i8* %4
%70 = sext i8 %69 to i32
%71 = icmp ne i32 %70, 48
br i1 %71, label %5, label %72
72: ; preds = %68
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c" %c\00"
@.str.3 = [24 x i8] c"Ekanes tin epilogi: %c\0A\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [39 x i8] c"H PERIMETROS TOY TETRAGWNOU EINAI: %f\0A\00"
@.str.9 = [44 x i8] c"H PERIMETROS TOY PARALLHLOGRAMOU EINAI: %f\0A\00"
@.str.12 = [49 x i8] c"H PERIMETROS TOY ORTHOGONIOU TRIGONOU EINAI: %f\0A\00"
@.str.14 = [35 x i8] c"H PERIMETROS TOY KYKLOU EINAI: %f\0A\00"
@str = [43 x i8] c"\0A0. Ejodos\0A1. Tetragwno\0A2. Parallilogrammo\00"
@str.16 = [45 x i8] c"3. Orthogonio Trigwno\0A4. Kuklos\0Adwse epilogi\00"
@str.17 = [30 x i8] c"Lathos epilogi!! Janadokimase\00"
@str.18 = [19 x i8] c"Dwse mikos aktinas\00"
@str.19 = [28 x i8] c"Dwse mikos kathetis pleuras\00"
@str.20 = [30 x i8] c"Dwse mikos orizontias pleuras\00"
@str.21 = [12 x i8] c"Dwse platos\00"
@str.22 = [11 x i8] c"Dwse mikos\00"
@str.23 = [19 x i8] c"Dwse mikos pleuras\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca i8
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
br label %6
6: ; preds = %46, %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.16, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %11)
%13 = load i8, i8* %3
switch i8 %13, label %44 [
i8 49, label %14
i8 50, label %20
i8 51, label %29
i8 52, label %38
i8 48, label %49
]
14: ; preds = %6
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.23, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %1)
%17 = load float, float* %1
%18 = call double @tetragwno(float %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), double %18)
br label %46
20: ; preds = %6
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.21, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %1)
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.22, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%25 = load float, float* %1
%26 = load float, float* %2
%27 = call double @parallilogrammo(float %25, float %26)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), double %27)
br label %46
29: ; preds = %6
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.19, i64 0, i64 0))
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %1)
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.20, i64 0, i64 0))
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%34 = load float, float* %1
%35 = load float, float* %2
%36 = call double @trigwno(float %34, float %35)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0), double %36)
br label %46
38: ; preds = %6
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.18, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %1)
%41 = load float, float* %1
%42 = call double @kuklos(float %41)
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), double %42)
br label %46
44: ; preds = %6
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.17, i64 0, i64 0))
br label %46
46: ; preds = %14, %29, %44, %38, %20
%47 = load i8, i8* %3
%48 = icmp eq i8 %47, 48
br i1 %48, label %49, label %6
49: ; preds = %6, %46
ret i32 0
}