#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 sqrt(float);
int main() {
  int epilogi;
  float a, b, pi, r, perimetros;
  pi = 3.14;
  while (epilogi != 0) {
    printf("Epilejte perimetro sximatos:\n\n");
    printf(
        "1. Perimetros tetragwnou\n2. Perimetros parallilogrammou\n3. "
        "Perimetros kyklou\n4. Perimetros orthogwniou trigonou\n0. Exit\n\n");
    scanf(" %d", &epilogi);
    if (epilogi == 1) {
      printf("Perimetros tetragwnou:\n");
      printf("Dwse diastasi pleuras a:\n\n", a);
      scanf(" %f", &a);
      perimetros = 4 * a;
      printf("Perimetros = 4 * %.2f = %.2f\n\n\n", a, perimetros);
    } else if (epilogi == 2) {
      printf("Perimetros parallilogrammou:\n");
      printf("Dwse diastasi pleuras a:\n", a);
      scanf(" %f", &a);
      printf("Dwse diastasi pleuras b:\n", b);
      scanf(" %f", &b);
      perimetros = 2 * (a + b);
      printf("Perimetros = 2 * (%.2f + %.2f) = %.2f\n\n\n", a, b, perimetros);
    } else if (epilogi == 3) {
      printf("Perimetros kyklou:\n");
      printf("Dwse diastasi aktinas r:\n", r);
      scanf(" %f", &r);
      perimetros = 4 * pi * r;
      printf("Perimetros = 4 * %.2f * %.2f = %.2f\n\n\n", pi, r, perimetros);
    } else if (epilogi == 4) {
      printf("Perimetros orthogwniou trigonou:\n");
      printf("Dwse diastasi kathetis pleuras a:\n", a);
      scanf(" %f", &a);
      printf("Dwse diastasi kathetis pleuras b:\n", b);
      scanf(" %f", &b);
      perimetros = a + b + sqrt((a * a) + (b * b));
      printf("Perimetros = a + b + sqrt((a^2) + (b^2)) = %.2f\n\n\n",
             perimetros);
    } else if (epilogi == 0) {
      printf("Kleisimo programmatos\n");
    } else {
      printf("Lathos epilogi\n\n");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xeb9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1440 <main+0x310>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11fc <main+0xcc>
lea    0xf14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf15(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf22(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xe37(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xef0(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    143b <main+0x30b>
cmpl   $0x2,-0x8(%rbp)
jne    12af <main+0x17f>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xefa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeeb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
movss  0xd90(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xeaf(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1436 <main+0x306>
cmpl   $0x3,-0x8(%rbp)
jne    1335 <main+0x205>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdf7(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xd0c(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe80(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1431 <main+0x301>
cmpl   $0x4,-0x8(%rbp)
jne    13fc <main+0x2cc>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe95(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd71(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd48(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe48(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    142c <main+0x2fc>
cmpl   $0x0,-0x8(%rbp)
jne    1419 <main+0x2e9>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1427 <main+0x2f7>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    142c <main+0x2fc>
jmp    1431 <main+0x301>
jmp    1436 <main+0x306>
jmp    143b <main+0x30b>
jmp    114c <main+0x1c>
mov    -0x4(%rbp),%eax
add    $0x20,%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    0xf82(%rip),%r14
lea    0xf99(%rip),%r15
lea    0xec9(%rip),%r12
lea    0x8(%rsp),%rbx
lea    0xea9(%rip),%rbp
lea    0xeba(%rip),%r13
jmp    118f <main+0x4f>
lea    0xfef(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x8(%rsp)
je     138d <main+0x24d>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0x4,%rax
ja     1178 <main+0x38>
movslq 0x0(%rbp,%rax,4),%rax
add    %rbp,%rax
jmp    *%rax
lea    0xfb7(%rip),%rdi
jmp    117f <main+0x3f>
lea    0x10a4(%rip),%rdi
call   1030 <puts@plt>
lea    0x10af(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  (%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulss  0xe02(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe27(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    1184 <main+0x44>
lea    0x1005(%rip),%rdi
call   1030 <puts@plt>
lea    0x1016(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x1016(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  (%rsp),%xmm2
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
addss  %xmm1,%xmm2
addss  %xmm2,%xmm2
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
lea    0xdd2(%rip),%rdi
jmp    12d6 <main+0x196>
lea    0xf6e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf75(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
mulss  0xd40(%rip),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
lea    0xdaf(%rip),%rdi
movsd  0xd3a(%rip),%xmm0
mov    $0x3,%al
call   1040 <printf@plt>
jmp    1184 <main+0x44>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  (%rsp),%xmm2
movss  0x4(%rsp),%xmm3
movaps %xmm3,%xmm1
mulss  %xmm3,%xmm1
movaps %xmm2,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ucomiss 0xcc2(%rip),%xmm0
jb     134e <main+0x20e>
sqrtss %xmm0,%xmm0
jmp    136b <main+0x22b>
movss  %xmm2,0x10(%rsp)
movss  %xmm3,0xc(%rsp)
call   1060 <sqrt@plt>
movss  0xc(%rsp),%xmm3
movss  0x10(%rsp),%xmm2
addss  %xmm3,%xmm2
addss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
lea    0xd23(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1184 <main+0x44>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Epilejte perimetro sximatos:\0A\0A\00"
@.str.1 = [122 x i8] c"1. Perimetros tetragwnou\0A2. Perimetros parallilogrammou\0A3. Perimetros kyklou\0A4. Perimetros orthogwniou trigonou\0A0. Exit\0A\0A\00"
@.str.2 = [4 x i8] c" %d\00"
@.str.3 = [24 x i8] c"Perimetros tetragwnou:\0A\00"
@.str.4 = [27 x i8] c"Dwse diastasi pleuras a:\0A\0A\00"
@.str.5 = [4 x i8] c" %f\00"
@.str.6 = [32 x i8] c"Perimetros = 4 * %.2f = %.2f\0A\0A\0A\00"
@.str.7 = [30 x i8] c"Perimetros parallilogrammou:\0A\00"
@.str.8 = [26 x i8] c"Dwse diastasi pleuras a:\0A\00"
@.str.9 = [26 x i8] c"Dwse diastasi pleuras b:\0A\00"
@.str.10 = [41 x i8] c"Perimetros = 2 * (%.2f + %.2f) = %.2f\0A\0A\0A\00"
@.str.11 = [20 x i8] c"Perimetros kyklou:\0A\00"
@.str.12 = [26 x i8] c"Dwse diastasi aktinas r:\0A\00"
@.str.13 = [39 x i8] c"Perimetros = 4 * %.2f * %.2f = %.2f\0A\0A\0A\00"
@.str.14 = [34 x i8] c"Perimetros orthogwniou trigonou:\0A\00"
@.str.15 = [35 x i8] c"Dwse diastasi kathetis pleuras a:\0A\00"
@.str.16 = [35 x i8] c"Dwse diastasi kathetis pleuras b:\0A\00"
@.str.17 = [51 x i8] c"Perimetros = a + b + sqrt((a^2) + (b^2)) = %.2f\0A\0A\0A\00"
@.str.18 = [23 x i8] c"Kleisimo programmatos\0A\00"
@.str.19 = [17 x i8] c"Lathos epilogi\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
store float 0x40091EB860000000, float* %5
br label %8
8: ; preds = %112, %0
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %113
11: ; preds = %8
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %30
17: ; preds = %11
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%19 = load float, float* %3
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %20)
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %3)
%23 = load float, float* %3
%24 = fmul float 4.000000e+00, %23
store float %24, float* %7
%25 = load float, float* %3
%26 = fpext float %25 to double
%27 = load float, float* %7
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), double %26, double %28)
br label %112
30: ; preds = %11
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 2
br i1 %32, label %33, label %54
33: ; preds = %30
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%35 = load float, float* %3
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), double %36)
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %3)
%39 = load float, float* %4
%40 = fpext float %39 to double
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), double %40)
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %4)
%43 = load float, float* %3
%44 = load float, float* %4
%45 = fadd float %43, %44
%46 = fmul float 2.000000e+00, %45
store float %46, float* %7
%47 = load float, float* %3
%48 = fpext float %47 to double
%49 = load float, float* %4
%50 = fpext float %49 to double
%51 = load float, float* %7
%52 = fpext float %51 to double
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), double %48, double %50, double %52)
br label %111
54: ; preds = %30
%55 = load i32, i32* %2
%56 = icmp eq i32 %55, 3
br i1 %56, label %57, label %74
57: ; preds = %54
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%59 = load float, float* %6
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), double %60)
%62 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %6)
%63 = load float, float* %5
%64 = fmul float 4.000000e+00, %63
%65 = load float, float* %6
%66 = fmul float %64, %65
store float %66, float* %7
%67 = load float, float* %5
%68 = fpext float %67 to double
%69 = load float, float* %6
%70 = fpext float %69 to double
%71 = load float, float* %7
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0), double %68, double %70, double %72)
br label %110
74: ; preds = %54
%75 = load i32, i32* %2
%76 = icmp eq i32 %75, 4
br i1 %76, label %77, label %101
77: ; preds = %74
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%79 = load float, float* %3
%80 = fpext float %79 to double
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), double %80)
%82 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %3)
%83 = load float, float* %4
%84 = fpext float %83 to double
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.16, i64 0, i64 0), double %84)
%86 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %4)
%87 = load float, float* %3
%88 = load float, float* %4
%89 = fadd float %87, %88
%90 = load float, float* %3
%91 = load float, float* %3
%92 = load float, float* %4
%93 = load float, float* %4
%94 = fmul float %92, %93
%95 = call float @llvm.fmuladd.f32(float %90, float %91, float %94)
%96 = call float @sqrt(float %95)
%97 = fadd float %89, %96
store float %97, float* %7
%98 = load float, float* %7
%99 = fpext float %98 to double
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0), double %99)
br label %109
101: ; preds = %74
%102 = load i32, i32* %2
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %101
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0))
br label %108
106: ; preds = %101
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0))
br label %108
108: ; preds = %106, %104
br label %109
109: ; preds = %108, %77
br label %110
110: ; preds = %109, %57
br label %111
111: ; preds = %110, %33
br label %112
112: ; preds = %111, %17
br label %8
113: ; preds = %8
%114 = load i32, i32* %1
ret i32 %114
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c" %d\00"
@.str.5 = [4 x i8] c" %f\00"
@.str.6 = [32 x i8] c"Perimetros = 4 * %.2f = %.2f\0A\0A\0A\00"
@.str.10 = [41 x i8] c"Perimetros = 2 * (%.2f + %.2f) = %.2f\0A\0A\0A\00"
@.str.13 = [39 x i8] c"Perimetros = 4 * %.2f * %.2f = %.2f\0A\0A\0A\00"
@.str.17 = [51 x i8] c"Perimetros = a + b + sqrt((a^2) + (b^2)) = %.2f\0A\0A\0A\00"
@str = [30 x i8] c"Epilejte perimetro sximatos:\0A\00"
@str.20 = [121 x i8] c"1. Perimetros tetragwnou\0A2. Perimetros parallilogrammou\0A3. Perimetros kyklou\0A4. Perimetros orthogwniou trigonou\0A0. Exit\0A\00"
@str.21 = [16 x i8] c"Lathos epilogi\0A\00"
@str.22 = [22 x i8] c"Kleisimo programmatos\00"
@str.23 = [33 x i8] c"Perimetros orthogwniou trigonou:\00"
@str.24 = [34 x i8] c"Dwse diastasi kathetis pleuras a:\00"
@str.25 = [34 x i8] c"Dwse diastasi kathetis pleuras b:\00"
@str.26 = [19 x i8] c"Perimetros kyklou:\00"
@str.27 = [25 x i8] c"Dwse diastasi aktinas r:\00"
@str.28 = [29 x i8] c"Perimetros parallilogrammou:\00"
@str.29 = [25 x i8] c"Dwse diastasi pleuras a:\00"
@str.30 = [25 x i8] c"Dwse diastasi pleuras b:\00"
@str.31 = [23 x i8] c"Perimetros tetragwnou:\00"
@str.32 = [26 x i8] c"Dwse diastasi pleuras a:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast i32* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast float* %4 to i8*
br label %9
9: ; preds = %0, %65
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([121 x i8], [121 x i8]* @str.20, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%13 = load i32, i32* %1
switch i32 %13, label %63 [
i32 1, label %14
i32 2, label %23
i32 3, label %37
i32 4, label %46
i32 0, label %61
]
14: ; preds = %9
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.31, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.32, i64 0, i64 0))
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %2)
%18 = load float, float* %2
%19 = fmul float %18, 4.000000e+00
%20 = fpext float %18 to double
%21 = fpext float %19 to double
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), double %20, double %21)
br label %65
23: ; preds = %9
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.28, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.29, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %2)
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.30, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %3)
%29 = load float, float* %2
%30 = load float, float* %3
%31 = fadd float %29, %30
%32 = fmul float %31, 2.000000e+00
%33 = fpext float %29 to double
%34 = fpext float %30 to double
%35 = fpext float %32 to double
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), double %33, double %34, double %35)
br label %65
37: ; preds = %9
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.26, i64 0, i64 0))
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.27, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %4)
%41 = load float, float* %4
%42 = fmul float %41, 0x40291EB860000000
%43 = fpext float %41 to double
%44 = fpext float %42 to double
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0), double 0x40091EB860000000, double %43, double %44)
br label %65
46: ; preds = %9
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.23, i64 0, i64 0))
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.24, i64 0, i64 0))
%49 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %2)
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.25, i64 0, i64 0))
%51 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), float* %3)
%52 = load float, float* %2
%53 = load float, float* %3
%54 = fadd float %52, %53
%55 = fmul float %53, %53
%56 = call float @llvm.fmuladd.f32(float %52, float %52, float %55)
%57 = call float @sqrt(float %56)
%58 = fadd float %54, %57
%59 = fpext float %58 to double
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0), double %59)
br label %65
61: ; preds = %9
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0))
br label %65
63: ; preds = %9
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.21, i64 0, i64 0))
br label %65
65: ; preds = %23, %46, %63, %61, %37, %14
%66 = load i32, i32* %1
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %9
68: ; preds = %65
ret i32 0
}