#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 h;
  float eta;
  float pr;
  float dis;
  float ac;
  float mb;
  printf("La persona e' disabile?(si=0, no=1) \n");
  scanf("%f", &dis);
  printf("la persona vuole l'accesso a Mirabeach?(si=0, no=1) \n");
  scanf("%f", &mb);
  if (dis == 0) {
    if (mb == 0) {
      pr = 7.50;
      printf("il prezzo e' %f", pr);
      return (0);
    } else {
      pr = 0.00;
      printf("il prezzo e' %f", pr);
      return (0);
    }
  }
  printf("inserire l'eta' della persona \n");
  scanf("%f", &eta);
  printf("inserire l'altezza della persona \n");
  scanf("%f", &h);
  printf("la persona e' un accompagnatore di un disabile?(si=0, no=1) \n");
  scanf("%f", &ac);
  if (eta > 60) {
    pr = 25.00;
  } else {
    if (h <= 140) {
      if (h >= 100) {
        pr = 28.00;
      } else {
        pr = 0.00;
      }
    } else {
      if (ac == 0) {
        pr = 25.50;
      } else {
        pr = 34.90;
      }
    }
  }
  if (mb == 0) {
    if (pr == 34.90) {
      pr = pr + 9.50;
    } else {
      pr = pr + 7.50;
    }
  }
  printf("il prezzo del biglietto e':  %f", pr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xffe(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe0(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11f4 <main+0xd4>
jp     11f4 <main+0xd4>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11c9 <main+0xa9>
jp     11c9 <main+0xa9>
movss  0xe7b(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xede(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1392 <main+0x272>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1392 <main+0x272>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf39(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1b(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
movss  0xda5(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1276 <main+0x156>
movss  0xdac(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    12fd <main+0x1dd>
movss  0xd86(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     12bd <main+0x19d>
movss  -0x8(%rbp),%xmm0
movss  0xd7b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     12b0 <main+0x190>
movss  0xd6e(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    12b8 <main+0x198>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    12f8 <main+0x1d8>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    12e6 <main+0x1c6>
jp     12e6 <main+0x1c6>
movss  0xd30(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    12f3 <main+0x1d3>
movss  0xd1a(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    12f8 <main+0x1d8>
jmp    12fd <main+0x1dd>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    137b <main+0x25b>
jp     137b <main+0x25b>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcfb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1358 <main+0x238>
jp     1358 <main+0x238>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcea(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1376 <main+0x256>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcbf(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    137b <main+0x25b>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd9a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xf2c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1d(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jne    119f <main+0x6f>
jp     119f <main+0x6f>
movss  0xc(%rsp),%xmm1
lea    0xead(%rip),%rdi
ucomiss %xmm0,%xmm1
jne    120a <main+0xda>
jp     120a <main+0xda>
movsd  0xe96(%rip),%xmm0
jmp    129c <main+0x16c>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb3(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x18(%rsp),%xmm0
ucomiss 0xe06(%rip),%xmm0
jbe    1212 <main+0xe2>
movss  0xdf8(%rip),%xmm0
jmp    125c <main+0x12c>
xorps  %xmm0,%xmm0
jmp    129c <main+0x16c>
movss  0x1c(%rsp),%xmm1
movss  0xde8(%rip),%xmm0
ucomiss %xmm1,%xmm0
jae    1244 <main+0x114>
xorps  %xmm0,%xmm0
cmpeqss 0x10(%rsp),%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
lea    0xde3(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
jmp    125c <main+0x12c>
movss  0xdc0(%rip),%xmm0
cmpnless %xmm1,%xmm0
movss  0xdb7(%rip),%xmm1
andnps %xmm1,%xmm0
movss  0xc(%rsp),%xmm1
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm1
jne    1291 <main+0x161>
jp     1291 <main+0x161>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
ucomisd 0xdad(%rip),%xmm1
jne    1289 <main+0x159>
jp     1289 <main+0x159>
addss  0xd91(%rip),%xmm0
jmp    1291 <main+0x161>
addss  0xd83(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdac(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"La persona e' disabile?(si=0, no=1) \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [54 x i8] c"la persona vuole l'accesso a Mirabeach?(si=0, no=1) \0A\00"
@.str.3 = [16 x i8] c"il prezzo e' %f\00"
@.str.4 = [32 x i8] c"inserire l'eta' della persona \0A\00"
@.str.5 = [35 x i8] c"inserire l'altezza della persona \0A\00"
@.str.6 = [62 x i8] c"la persona e' un accompagnatore di un disabile?(si=0, no=1) \0A\00"
@.str.7 = [32 x i8] c"il prezzo del biglietto e': %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %7)
%12 = load float, float* %5
%13 = fcmp oeq float %12, 0.000000e+00
br i1 %13, label %14, label %25
14: ; preds = %0
%15 = load float, float* %7
%16 = fcmp oeq float %15, 0.000000e+00
br i1 %16, label %17, label %21
17: ; preds = %14
store float 7.500000e+00, float* %4
%18 = load float, float* %4
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double %19)
store i32 0, i32* %1
br label %73
21: ; preds = %14
store float 0.000000e+00, float* %4
%22 = load float, float* %4
%23 = fpext float %22 to double
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double %23)
store i32 0, i32* %1
br label %73
25: ; preds = %0
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.6, i64 0, i64 0))
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%32 = load float, float* %3
%33 = fcmp ogt float %32, 6.000000e+01
br i1 %33, label %34, label %35
34: ; preds = %25
store float 2.500000e+01, float* %4
br label %51
35: ; preds = %25
%36 = load float, float* %2
%37 = fcmp ole float %36, 1.400000e+02
br i1 %37, label %38, label %44
38: ; preds = %35
%39 = load float, float* %2
%40 = fcmp oge float %39, 1.000000e+02
br i1 %40, label %41, label %42
41: ; preds = %38
store float 2.800000e+01, float* %4
br label %43
42: ; preds = %38
store float 0.000000e+00, float* %4
br label %43
43: ; preds = %42, %41
br label %50
44: ; preds = %35
%45 = load float, float* %6
%46 = fcmp oeq float %45, 0.000000e+00
br i1 %46, label %47, label %48
47: ; preds = %44
store float 2.550000e+01, float* %4
br label %49
48: ; preds = %44
store float 0x4041733340000000, float* %4
br label %49
49: ; preds = %48, %47
br label %50
50: ; preds = %49, %43
br label %51
51: ; preds = %50, %34
%52 = load float, float* %7
%53 = fcmp oeq float %52, 0.000000e+00
br i1 %53, label %54, label %69
54: ; preds = %51
%55 = load float, float* %4
%56 = fpext float %55 to double
%57 = fcmp oeq double %56, 3.490000e+01
br i1 %57, label %58, label %63
58: ; preds = %54
%59 = load float, float* %4
%60 = fpext float %59 to double
%61 = fadd double %60, 9.500000e+00
%62 = fptrunc double %61 to float
store float %62, float* %4
br label %68
63: ; preds = %54
%64 = load float, float* %4
%65 = fpext float %64 to double
%66 = fadd double %65, 7.500000e+00
%67 = fptrunc double %66 to float
store float %67, float* %4
br label %68
68: ; preds = %63, %58
br label %69
69: ; preds = %68, %51
%70 = load float, float* %4
%71 = fpext float %70 to double
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), double %71)
br label %73
73: ; preds = %69, %21, %17
%74 = load i32, i32* %1
ret i32 %74
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [16 x i8] c"il prezzo e' %f\00"
@.str.7 = [32 x i8] c"il prezzo del biglietto e': %f\00"
@str = [37 x i8] c"La persona e' disabile?(si=0, no=1) \00"
@str.8 = [53 x i8] c"la persona vuole l'accesso a Mirabeach?(si=0, no=1) \00"
@str.9 = [31 x i8] c"inserire l'eta' della persona \00"
@str.10 = [34 x i8] c"inserire l'altezza della persona \00"
@str.11 = [61 x i8] c"la persona e' un accompagnatore di un disabile?(si=0, no=1) \00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = bitcast float* %1 to i8*
%7 = bitcast float* %2 to i8*
%8 = bitcast float* %3 to i8*
%9 = bitcast float* %4 to i8*
%10 = bitcast float* %5 to i8*
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.8, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%15 = load float, float* %3
%16 = fcmp oeq float %15, 0.000000e+00
br i1 %16, label %17, label %24
17: ; preds = %0
%18 = load float, float* %5
%19 = fcmp oeq float %18, 0.000000e+00
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double 7.500000e+00)
br label %58
22: ; preds = %17
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double 0.000000e+00)
br label %58
24: ; preds = %0
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.9, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.10, i64 0, i64 0))
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.11, i64 0, i64 0))
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%31 = load float, float* %2
%32 = fcmp ogt float %31, 6.000000e+01
br i1 %32, label %43, label %33
33: ; preds = %24
%34 = load float, float* %1
%35 = fcmp ugt float %34, 1.400000e+02
br i1 %35, label %39, label %36
36: ; preds = %33
%37 = fcmp ult float %34, 1.000000e+02
%38 = select i1 %37, float 0.000000e+00, float 2.800000e+01
br label %43
39: ; preds = %33
%40 = load float, float* %4
%41 = fcmp oeq float %40, 0.000000e+00
%42 = select i1 %41, float 2.550000e+01, float 0x4041733340000000
br label %43
43: ; preds = %39, %36, %24
%44 = phi float [ 2.500000e+01, %24 ], [ %38, %36 ], [ %42, %39 ]
%45 = load float, float* %5
%46 = fcmp oeq float %45, 0.000000e+00
br i1 %46, label %47, label %54
47: ; preds = %43
%48 = fpext float %44 to double
%49 = fcmp oeq double %48, 3.490000e+01
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = fadd float %44, 9.500000e+00
br label %54
52: ; preds = %47
%53 = fadd float %44, 7.500000e+00
br label %54
54: ; preds = %50, %52, %43
%55 = phi float [ %51, %50 ], [ %53, %52 ], [ %44, %43 ]
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), double %56)
br label %58
58: ; preds = %54, %22, %20
ret i32 0
}