#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 *, ...);
main() {
  char Risposta;
  char risposta;
  int E;
  int H;
  char Supplemento;
  float P;
  printf(" \" La persona e disabile? \" (1=si,0=no): \n   ");
  scanf("%d", &Risposta);
  if (Risposta == 1) {
    P = 0.00;
  } else {
    printf(" \" E un accompagnatore? \" (1=si,0=no): \n   ");
    scanf("%d", &risposta);
    if (risposta == 1) {
      P = 25.50;
    } else {
      printf(" \"Inserisca l'Eta\":\n   ");
      scanf("%d", &E);
      if (E >= 60) {
        P = 25.00;
      } else {
        printf(" \"Inserisca l'Altezza \":\n   ");
        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): \n   ");
  scanf("%d", &Supplemento);
  if (Supplemento == 1) {
    if (P == 0.00) {
      P = 0.00;
    } else {
      if (P == 34.90) {
        P = P + 9.50;
      } else {
        P = P + 7.50;
      }
    }
    printf(" \"Il prezzo del biglietto e \": \n   %f", P);
  } else {
    printf(" \"Il prezzo del biglietto e \": \n   %f", P);
  }
}


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    0xf12(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x1,%eax
jne    1169 <main+0x49>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1265 <main+0x145>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x6(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x6(%rbp),%eax
cmp    $0x1,%eax
jne    11a8 <main+0x88>
movss  0xe6e(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1260 <main+0x140>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x3c,-0xc(%rbp)
jl     11e4 <main+0xc4>
movss  0xe2e(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    125b <main+0x13b>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5d(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x64,-0x10(%rbp)
jg     121b <main+0xfb>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1256 <main+0x136>
cmpl   $0x64,-0x10(%rbp)
jl     1244 <main+0x124>
cmpl   $0x8c,-0x10(%rbp)
jg     1244 <main+0x124>
movss  0xdca(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1251 <main+0x131>
movss  0xdb4(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1256 <main+0x136>
jmp    125b <main+0x13b>
jmp    1260 <main+0x140>
jmp    1265 <main+0x145>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xddc(%rip),%rdi
lea    -0x11(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x1,%eax
jne    133e <main+0x21e>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12bb <main+0x19b>
jp     12bb <main+0x19b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1322 <main+0x202>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd44(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12ff <main+0x1df>
jp     12ff <main+0x1df>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd33(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    131d <main+0x1fd>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd08(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1322 <main+0x202>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdbf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1355 <main+0x235>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xda3(%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    0xefd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
cmpb   $0x1,0x7(%rsp)
je     1203 <main+0xe3>
lea    0xef9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    0x6(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpb   $0x1,0x6(%rsp)
jne    118b <main+0x6b>
movsd  0xe77(%rip),%xmm0
jmp    11fd <main+0xdd>
lea    0xef3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x3b,0x14(%rsp)
jle    11bd <main+0x9d>
movsd  0xe4d(%rip),%xmm0
jmp    11fd <main+0xdd>
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    $0x65,%eax
jl     1203 <main+0xe3>
xor    %ecx,%ecx
cmp    $0x8d,%eax
setb   %cl
lea    0xe20(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
lea    0x5(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpb   $0x1,0x5(%rsp)
jne    1258 <main+0x138>
movsd  0xddd(%rip),%xmm0
movsd  0x8(%rsp),%xmm2
addsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
xorpd  %xmm1,%xmm1
cmpeqsd %xmm2,%xmm1
andnpd %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    125e <main+0x13e>
movsd  0x8(%rsp),%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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