#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 *);
main() {
  int Dis;
  int Acc;
  int Eta;
  int Alt;
  float Prezzo;
  int Supplemento;
  printf("La persona è disabile?(0.SI,1.NO)");
  scanf("%f", &Dis);
  if (Dis == 0) {
    Prezzo = 0;
  } else {
    printf("La persona è un accompagnatore?(0.SI,1.No)");
    scanf("%d", &Acc);
    if (Acc == 0) {
      Prezzo = 25.50;
    } else {
      printf("Qual'é l'età della persona?");
      scanf("%d", &Eta);
      if (Eta > 60) {
        Prezzo = 25.00;
      } else {
        printf("Quale'è l'altezza della persona?");
        scanf("%d", &Alt);
        if (Alt < 100) {
          Prezzo = 0;
        } else {
          if (Alt >= 100 && Alt <= 140) {
            Prezzo = 28.00;
          } else {
            if (Alt > 140) {
              Prezzo = 34.90;
            }
          }
        }
      }
    }
    printf("Vuole anche il supplemento per Mirabeach?(0.SI,1.No)");
    scanf("%d", &Supplemento);
    if (Supplemento == 0) {
      if (Prezzo == 34.90) {
        Prezzo = Prezzo + 9.50;
      } else {
        Prezzo = Prezzo + 7.50;
      }
    }
  }
  printf("Il biglietto ha il prezzo di: %.2f", Prezzo);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1164 <main+0x44>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    12f8 <main+0x1d8>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    119e <main+0x7e>
movss  0xe78(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1264 <main+0x144>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x3c,-0x10(%rbp)
jle    11d8 <main+0xb8>
movss  0xe3a(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    125f <main+0x13f>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0x14(%rbp)
jge    120d <main+0xed>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    125a <main+0x13a>
cmpl   $0x64,-0x14(%rbp)
jl     1236 <main+0x116>
cmpl   $0x8c,-0x14(%rbp)
jg     1236 <main+0x116>
movss  0xdd8(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1255 <main+0x135>
cmpl   $0x8c,-0x14(%rbp)
jle    1250 <main+0x130>
movss  0xdb5(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1255 <main+0x135>
jmp    125a <main+0x13a>
jmp    125f <main+0x13f>
jmp    1264 <main+0x144>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe01(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    12f3 <main+0x1d3>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd73(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12d0 <main+0x1b0>
jp     12d0 <main+0x1b0>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd62(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    12ee <main+0x1ce>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd37(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    12f3 <main+0x1d3>
jmp    12f8 <main+0x1d8>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdea(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xef5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
lea    0x14(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x14(%rsp)
je     11a0 <main+0x80>
lea    0xef5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x10(%rsp)
je     11a8 <main+0x88>
lea    0xefe(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x3c,0xc(%rsp)
jle    11b2 <main+0x92>
movss  0xe66(%rip),%xmm0
jmp    11f3 <main+0xd3>
xorps  %xmm1,%xmm1
jmp    124f <main+0x12f>
movss  0xe50(%rip),%xmm0
jmp    11f3 <main+0xd3>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
xorps  %xmm0,%xmm0
cmp    $0x64,%eax
jl     11f3 <main+0xd3>
xor    %ecx,%ecx
cmp    $0x8d,%eax
setb   %cl
lea    0xe22(%rip),%rax
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rsp)
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe65(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
je     1225 <main+0x105>
movss  (%rsp),%xmm1
jmp    124f <main+0x12f>
movss  (%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
ucomisd 0xddf(%rip),%xmm0
jne    1247 <main+0x127>
jp     1247 <main+0x127>
addss  0xdc7(%rip),%xmm1
jmp    124f <main+0x12f>
addss  0xdb9(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe8d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"La persona \C3\A8 disabile?(0.SI,1.NO)\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [44 x i8] c"La persona \C3\A8 un accompagnatore?(0.SI,1.No)\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [30 x i8] c"Qual'\C3\A9 l'et\C3\A0 della persona?\00"
@.str.5 = [34 x i8] c"Quale'\C3\A8 l'altezza della persona?\00"
@.str.6 = [53 x i8] c"Vuole anche il supplemento per Mirabeach?(0.SI,1.No)\00"
@.str.7 = [35 x i8] c"Il biglietto ha il prezzo di: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 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), i32* %2)
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %0
store float 0.000000e+00, float* %6
br label %67
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %13
store float 2.550000e+01, float* %6
br label %46
19: ; preds = %13
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 60
br i1 %23, label %24, label %25
24: ; preds = %19
store float 2.500000e+01, float* %6
br label %45
25: ; preds = %19
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%28 = load i32, i32* %5
%29 = icmp slt i32 %28, 100
br i1 %29, label %30, label %31
30: ; preds = %25
store float 0.000000e+00, float* %6
br label %44
31: ; preds = %25
%32 = load i32, i32* %5
%33 = icmp sge i32 %32, 100
br i1 %33, label %34, label %38
34: ; preds = %31
%35 = load i32, i32* %5
%36 = icmp sle i32 %35, 140
br i1 %36, label %37, label %38
37: ; preds = %34
store float 2.800000e+01, float* %6
br label %43
38: ; preds = %34, %31
%39 = load i32, i32* %5
%40 = icmp sgt i32 %39, 140
br i1 %40, label %41, label %42
41: ; preds = %38
store float 0x4041733340000000, float* %6
br label %42
42: ; preds = %41, %38
br label %43
43: ; preds = %42, %37
br label %44
44: ; preds = %43, %30
br label %45
45: ; preds = %44, %24
br label %46
46: ; preds = %45, %18
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
%49 = load i32, i32* %7
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %66
51: ; preds = %46
%52 = load float, float* %6
%53 = fpext float %52 to double
%54 = fcmp oeq double %53, 3.490000e+01
br i1 %54, label %55, label %60
55: ; preds = %51
%56 = load float, float* %6
%57 = fpext float %56 to double
%58 = fadd double %57, 9.500000e+00
%59 = fptrunc double %58 to float
store float %59, float* %6
br label %65
60: ; preds = %51
%61 = load float, float* %6
%62 = fpext float %61 to double
%63 = fadd double %62, 7.500000e+00
%64 = fptrunc double %63 to float
store float %64, float* %6
br label %65
65: ; preds = %60, %55
br label %66
66: ; preds = %65, %46
br label %67
67: ; preds = %66, %12
%68 = load float, float* %6
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %69)
%71 = load i32, i32* %1
ret i32 %71
}

LLVM IR (-O2):
@.str = [35 x i8] c"La persona \C3\A8 disabile?(0.SI,1.NO)\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [44 x i8] c"La persona \C3\A8 un accompagnatore?(0.SI,1.No)\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [30 x i8] c"Qual'\C3\A9 l'et\C3\A0 della persona?\00"
@.str.5 = [34 x i8] c"Quale'\C3\A8 l'altezza della persona?\00"
@.str.6 = [53 x i8] c"Vuole anche il supplemento per Mirabeach?(0.SI,1.No)\00"
@.str.7 = [35 x i8] c"Il biglietto ha il prezzo di: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 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), i32* %1)
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, 0
br i1 %14, label %46, label %15
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 0
br i1 %19, label %33, label %20
20: ; preds = %15
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%23 = load i32, i32* %3
%24 = icmp sgt i32 %23, 60
br i1 %24, label %33, label %25
25: ; preds = %20
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%28 = load i32, i32* %4
%29 = icmp slt i32 %28, 100
br i1 %29, label %33, label %30
30: ; preds = %25
%31 = icmp ult i32 %28, 141
%32 = select i1 %31, float 2.800000e+01, float 0x4041733340000000
br label %33
33: ; preds = %30, %25, %20, %15
%34 = phi float [ 2.550000e+01, %15 ], [ 2.500000e+01, %20 ], [ 0.000000e+00, %25 ], [ %32, %30 ]
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%37 = load i32, i32* %5
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %46
39: ; preds = %33
%40 = fpext float %34 to double
%41 = fcmp oeq double %40, 3.490000e+01
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = fadd float %34, 9.500000e+00
br label %46
44: ; preds = %39
%45 = fadd float %34, 7.500000e+00
br label %46
46: ; preds = %0, %33, %44, %42
%47 = phi float [ %43, %42 ], [ %45, %44 ], [ %34, %33 ], [ 0.000000e+00, %0 ]
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %48)
ret i32 0
}