#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() {
  float euro;
  float comp;
  int h;
  int e;
  float sup;
  int dis;
  printf("\ninserisci 1 se la persona e' disabile senno 0:\n");
  scanf("%d", &dis);
  if (dis == 1) {
    euro = 0;
    comp = 25.50;
    printf("\nil prezzo del disabile e':%f", euro);
    printf("\nil prezzo dell eventuale accompagnatore e':%f", comp);
  } else {
    printf("Quanto e' alto?(cm)\n");
    scanf("%d", &h);
    if (h < 100) {
      euro = 0.00;
    } else {
      if ((h < 140) && (h > 100)) {
        euro = 28.00;
      } else {
        if (h > 140) {
          euro = 34.90;
        }
      }
    }
    printf("Quanti anni ha?\n");
    scanf("%d", &e);
    if (e > 60) {
      euro = 25.00;
    }
  }
  printf("\nIl prezzo totale e':%f\n", euro);
  printf(
      "\nInserisci 1 se la persona vuole il supplemento 0 se non lo vuole\n");
  scanf("%d", &sup);
  if (sup == 1) {
    if (euro == 34.90) {
      euro = euro + 9.50;
    } else {
      if (euro < 34.90) {
        euro = euro + 7.50;
      }
    }
  }
  printf("il prezzo totale e':%f", euro);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    11a1 <main+0x81>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xea3(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeed(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1261 <main+0x141>
lea    0xf09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x64,-0x10(%rbp)
jge    11d8 <main+0xb8>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1225 <main+0x105>
cmpl   $0x8c,-0x10(%rbp)
jge    1201 <main+0xe1>
cmpl   $0x64,-0x10(%rbp)
jle    1201 <main+0xe1>
movss  0xe0d(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1220 <main+0x100>
cmpl   $0x8c,-0x10(%rbp)
jle    121b <main+0xfb>
movss  0xdea(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1220 <main+0x100>
jmp    1225 <main+0x105>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe27(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x3c,-0x14(%rbp)
jle    125c <main+0x13c>
movss  0xdb1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1261 <main+0x141>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe66(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdd4(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xd6b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    133b <main+0x21b>
jp     133b <main+0x21b>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd53(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12f8 <main+0x1d8>
jp     12f8 <main+0x1d8>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd42(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1336 <main+0x216>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd0f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1331 <main+0x211>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcfc(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1336 <main+0x216>
jmp    133b <main+0x21b>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde8(%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    0xf70(%rip),%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x1,0x8(%rsp)
jne    118a <main+0x5a>
lea    0xecd(%rip),%rdi
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
movsd  0xe8d(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
jmp    121c <main+0xec>
lea    0xf4b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8f(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
xor    %ecx,%ecx
cmp    $0x64,%eax
setne  %dl
cmp    $0x8c,%eax
jb     11c9 <main+0x99>
movss  0xe51(%rip),%xmm0
jmp    11d7 <main+0xa7>
mov    %dl,%cl
lea    0xe2e(%rip),%rdx
movss  (%rdx,%rcx,4),%xmm0
xorpd  %xmm1,%xmm1
cmp    $0x64,%eax
jl     11e4 <main+0xb4>
movapd %xmm0,%xmm1
movss  %xmm1,0x4(%rsp)
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x3d,0x10(%rsp)
jge    1214 <main+0xe4>
movss  0x4(%rsp),%xmm0
jmp    121c <main+0xec>
movss  0xe00(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe4f(%rip),%rdi
movsd  %xmm0,0x18(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
lea    0xddf(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xdba(%rip),%xmm0
jne    128c <main+0x15c>
jp     128c <main+0x15c>
movsd  0x18(%rsp),%xmm1
ucomisd 0xd98(%rip),%xmm1
jne    1294 <main+0x164>
jp     1294 <main+0x164>
movss  0x4(%rsp),%xmm0
addss  0xd9e(%rip),%xmm0
jmp    12b0 <main+0x180>
movss  0x4(%rsp),%xmm0
jmp    12b0 <main+0x180>
movsd  0xd74(%rip),%xmm0
ucomisd %xmm1,%xmm0
movss  0x4(%rsp),%xmm0
jbe    12b0 <main+0x180>
addss  0xd74(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdda(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"\0Ainserisci 1 se la persona e' disabile senno 0:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"\0Ail prezzo del disabile e':%f\00"
@.str.3 = [47 x i8] c"\0Ail prezzo dell eventuale accompagnatore e':%f\00"
@.str.4 = [21 x i8] c"Quanto e' alto?(cm)\0A\00"
@.str.5 = [17 x i8] c"Quanti anni ha?\0A\00"
@.str.6 = [25 x i8] c"\0AIl prezzo totale e':%f\0A\00"
@.str.7 = [67 x i8] c"\0AInserisci 1 se la persona vuole il supplemento 0 se non lo vuole\0A\00"
@.str.8 = [23 x i8] c"il prezzo totale e':%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%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 ([49 x i8], [49 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), i32* %7)
%10 = load i32, i32* %7
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %19
12: ; preds = %0
store float 0.000000e+00, float* %2
store float 2.550000e+01, float* %3
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %14)
%16 = load float, float* %3
%17 = fpext float %16 to double
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), double %17)
br label %45
19: ; preds = %0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 100
br i1 %23, label %24, label %25
24: ; preds = %19
store float 0.000000e+00, float* %2
br label %38
25: ; preds = %19
%26 = load i32, i32* %4
%27 = icmp slt i32 %26, 140
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %4
%30 = icmp sgt i32 %29, 100
br i1 %30, label %31, label %32
31: ; preds = %28
store float 2.800000e+01, float* %2
br label %37
32: ; preds = %28, %25
%33 = load i32, i32* %4
%34 = icmp sgt i32 %33, 140
br i1 %34, label %35, label %36
35: ; preds = %32
store float 0x4041733340000000, float* %2
br label %36
36: ; preds = %35, %32
br label %37
37: ; preds = %36, %31
br label %38
38: ; preds = %37, %24
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%41 = load i32, i32* %5
%42 = icmp sgt i32 %41, 60
br i1 %42, label %43, label %44
43: ; preds = %38
store float 2.500000e+01, float* %2
br label %44
44: ; preds = %43, %38
br label %45
45: ; preds = %44, %12
%46 = load float, float* %2
%47 = fpext float %46 to double
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), double %47)
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.7, i64 0, i64 0))
%50 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%51 = load float, float* %6
%52 = fcmp oeq float %51, 1.000000e+00
br i1 %52, label %53, label %73
53: ; preds = %45
%54 = load float, float* %2
%55 = fpext float %54 to double
%56 = fcmp oeq double %55, 3.490000e+01
br i1 %56, label %57, label %62
57: ; preds = %53
%58 = load float, float* %2
%59 = fpext float %58 to double
%60 = fadd double %59, 9.500000e+00
%61 = fptrunc double %60 to float
store float %61, float* %2
br label %72
62: ; preds = %53
%63 = load float, float* %2
%64 = fpext float %63 to double
%65 = fcmp olt double %64, 3.490000e+01
br i1 %65, label %66, label %71
66: ; preds = %62
%67 = load float, float* %2
%68 = fpext float %67 to double
%69 = fadd double %68, 7.500000e+00
%70 = fptrunc double %69 to float
store float %70, float* %2
br label %71
71: ; preds = %66, %62
br label %72
72: ; preds = %71, %57
br label %73
73: ; preds = %72, %45
%74 = load float, float* %2
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), double %75)
%77 = load i32, i32* %1
ret i32 %77
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"\0Ail prezzo del disabile e':%f\00"
@.str.3 = [47 x i8] c"\0Ail prezzo dell eventuale accompagnatore e':%f\00"
@.str.6 = [25 x i8] c"\0AIl prezzo totale e':%f\0A\00"
@.str.8 = [23 x i8] c"il prezzo totale e':%f\00"
@str = [48 x i8] c"\0Ainserisci 1 se la persona e' disabile senno 0:\00"
@str.9 = [20 x i8] c"Quanto e' alto?(cm)\00"
@str.10 = [16 x i8] c"Quanti anni ha?\00"
@str.11 = [66 x i8] c"\0AInserisci 1 se la persona vuole il supplemento 0 se non lo vuole\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), double 2.550000e+01)
br label %31
16: ; preds = %0
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.9, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%19 = load i32, i32* %1
%20 = icmp slt i32 %19, 100
%21 = icmp ult i32 %19, 140
%22 = icmp ne i32 %19, 100
%23 = and i1 %21, %22
%24 = select i1 %23, float 2.800000e+01, float 0x4041733340000000
%25 = select i1 %20, float 0.000000e+00, float %24
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.10, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%28 = load i32, i32* %2
%29 = icmp sgt i32 %28, 60
%30 = select i1 %29, float 2.500000e+01, float %25
br label %31
31: ; preds = %16, %13
%32 = phi float [ 0.000000e+00, %13 ], [ %30, %16 ]
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), double %33)
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.11, i64 0, i64 0))
%36 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%37 = load float, float* %3
%38 = fcmp oeq float %37, 1.000000e+00
br i1 %38, label %39, label %47
39: ; preds = %31
%40 = fcmp oeq double %33, 3.490000e+01
br i1 %40, label %41, label %43
41: ; preds = %39
%42 = fadd float %32, 9.500000e+00
br label %47
43: ; preds = %39
%44 = fcmp olt double %33, 3.490000e+01
br i1 %44, label %45, label %47
45: ; preds = %43
%46 = fadd float %32, 7.500000e+00
br label %47
47: ; preds = %41, %45, %43, %31
%48 = phi float [ %42, %41 ], [ %46, %45 ], [ %32, %43 ], [ %32, %31 ]
%49 = fpext float %48 to double
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), double %49)
ret i32 0
}