#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() {
  int Risposta;
  int E;
  int H;
  float P;
  printf("La persona e' disabile? (1=si,0=no): ");
  scanf("%d", &Risposta);
  if (Risposta == 1) {
    P = 0.00;
  } else {
    printf("E' un accompagnatore? (1=si,0=no): ");
    scanf("%d", &Risposta);
    if (Risposta == 1) {
      P = 25.50;
    } else {
      printf("Inserisca l'eta': ");
      scanf("%d", &E);
      if (E >= 60) {
        P = 25.00;
      } else {
        printf("Inserisca l'altezza: ");
        scanf("%d", &H);
        if (H <= 100) {
          P = 0.00;
        } else {
          if (H >= 100 && H <= 140) {
            P = 28.00;
          } else {
            P = 34.90;
          }
        }
      }
    }
  }
  printf("Vuole il supplemento mirabeach? (1=si,0=no): ");
  scanf("%d", &Risposta);
  if (Risposta == 1) {
    if (P == (float)34.90) {
      P += 9.50;
    } else if (P > 0.00) {
      P += 7.50;
    }
  }
  printf("Il prezzo del biglietto e': %.2f euro\n", P);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1164 <main+0x44>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1257 <main+0x137>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    119e <main+0x7e>
movss  0xe78(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1252 <main+0x132>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x3c,-0xc(%rbp)
jl     11d8 <main+0xb8>
movss  0xe3a(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    124d <main+0x12d>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe59(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0x10(%rbp)
jg     120d <main+0xed>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1248 <main+0x128>
cmpl   $0x64,-0x10(%rbp)
jl     1236 <main+0x116>
cmpl   $0x8c,-0x10(%rbp)
jg     1236 <main+0x116>
movss  0xdd8(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1243 <main+0x123>
movss  0xdc2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1248 <main+0x128>
jmp    124d <main+0x12d>
jmp    1252 <main+0x132>
jmp    1257 <main+0x137>
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    12fc <main+0x1dc>
movss  -0x14(%rbp),%xmm0
movss  0xd74(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    12be <main+0x19e>
jp     12be <main+0x19e>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd6c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    12f7 <main+0x1d7>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12f2 <main+0x1d2>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd2b(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    12f7 <main+0x1d7>
jmp    12fc <main+0x1dc>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdb8(%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    0xef1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
cmpl   $0x1,0xc(%rsp)
je     11fb <main+0xdb>
lea    0xee7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,0xc(%rsp)
jne    1187 <main+0x67>
movss  0xe7b(%rip),%xmm0
jmp    11f5 <main+0xd5>
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
lea    0x14(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x3b,0x14(%rsp)
jle    11b7 <main+0x97>
movss  0xe4f(%rip),%xmm0
jmp    11f5 <main+0xd5>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    $0x65,%eax
jl     11fb <main+0xdb>
xor    %ecx,%ecx
cmp    $0x8d,%eax
setb   %cl
lea    0xe24(%rip),%rax
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,0xc(%rsp)
jne    123c <main+0x11c>
movss  0x8(%rsp),%xmm1
ucomiss 0xdde(%rip),%xmm1
jne    125e <main+0x13e>
jp     125e <main+0x13e>
movss  0xdce(%rip),%xmm1
jmp    1242 <main+0x122>
movss  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe70(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    1242 <main+0x122>
addss  0xda2(%rip),%xmm1
jmp    1242 <main+0x122>

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

LLVM IR (-O2):
@.str = [38 x i8] c"La persona e' disabile? (1=si,0=no): \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [36 x i8] c"E' un accompagnatore? (1=si,0=no): \00"
@.str.3 = [19 x i8] c"Inserisca l'eta': \00"
@.str.4 = [22 x i8] c"Inserisca l'altezza: \00"
@.str.5 = [46 x i8] c"Vuole il supplemento mirabeach? (1=si,0=no): \00"
@.str.6 = [39 x i8] c"Il prezzo del biglietto e': %.2f euro\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 1
br i1 %10, label %29, label %11
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 1
br i1 %15, label %29, label %16
16: ; preds = %11
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%19 = load i32, i32* %2
%20 = icmp sgt i32 %19, 59
br i1 %20, label %29, label %21
21: ; preds = %16
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%24 = load i32, i32* %3
%25 = icmp slt i32 %24, 101
br i1 %25, label %29, label %26
26: ; preds = %21
%27 = icmp ult i32 %24, 141
%28 = select i1 %27, float 2.800000e+01, float 0x4041733340000000
br label %29
29: ; preds = %26, %21, %16, %11, %0
%30 = phi float [ 0.000000e+00, %0 ], [ 2.550000e+01, %11 ], [ 2.500000e+01, %16 ], [ 0.000000e+00, %21 ], [ %28, %26 ]
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0))
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%33 = load i32, i32* %1
%34 = icmp eq i32 %33, 1
br i1 %34, label %35, label %41
35: ; preds = %29
%36 = fcmp oeq float %30, 0x4041733340000000
br i1 %36, label %41, label %37
37: ; preds = %35
%38 = fcmp ogt float %30, 0.000000e+00
br i1 %38, label %39, label %41
39: ; preds = %37
%40 = fadd float %30, 7.500000e+00
br label %41
41: ; preds = %35, %39, %37, %29
%42 = phi float [ %40, %39 ], [ %30, %37 ], [ %30, %29 ], [ 0x4046333340000000, %35 ]
%43 = fpext float %42 to double
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), double %43)
ret i32 0
}