#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 Risposta1;
  char S;
  char N;
  int Eta;
  int Altezza;
  float Prezzo;
  float supplemento_intero;
  float supplemento_ridotto;
  float Prezzo_tot;
  printf("Inserire \"La persona è disabile?\" ");
  scanf("%c", &Risposta);
  S = 1;
  N = 0;
  supplemento_intero = 9.50;
  supplemento_ridotto = 7.50;
  if (Risposta = S) {
    Prezzo = 0;
  } else
    printf("Inserire Età");
  scanf("%d", &Eta);
  if (Eta >= 60) {
    Prezzo = 25.00;
  } else
    printf("Inserire Altezza");
  scanf("%d", &Altezza);
  if (Altezza < 100) {
    Prezzo = 0;
  } else if (Altezza >= 100 && Altezza <= 140) {
    Prezzo = 28.00;
  } else
    Prezzo = 34.90;
  printf("Prezzo=", Prezzo);
  printf("Vuole il supplemento mirabeach?");
  scanf("%c", &Risposta1);
  if (Risposta1 = S) {
    if (Risposta = S) {
      Prezzo_tot = 0;
    } else if (Prezzo < 34.90) {
      Prezzo_tot = Prezzo + supplemento_ridotto;
    } else
      Prezzo_tot = Prezzo + supplemento_intero;
  }
  printf("Prezzo_tot=", Prezzo_tot);
}


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    0xf00(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movb   $0x1,-0x7(%rbp)
movb   $0x0,-0x8(%rbp)
movss  0xea5(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe94(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x5(%rbp)
cmp    $0x0,%al
je     118c <main+0x6c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    119a <main+0x7a>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x3c,-0xc(%rbp)
jl     11c8 <main+0xa8>
movss  0xe4a(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11d6 <main+0xb6>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x64,-0x10(%rbp)
jge    11ff <main+0xdf>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    123a <main+0x11a>
cmpl   $0x64,-0x10(%rbp)
jl     1228 <main+0x108>
cmpl   $0x8c,-0x10(%rbp)
jg     1228 <main+0x108>
movss  0xdf2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1235 <main+0x115>
movss  0xddc(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    123a <main+0x11a>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe1f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdde(%rip),%rdi
lea    -0x6(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
cmp    $0x0,%al
je     12e2 <main+0x1c2>
mov    -0x7(%rbp),%al
mov    %al,-0x5(%rbp)
cmp    $0x0,%al
je     129a <main+0x17a>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    12dd <main+0x1bd>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd6d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12c9 <main+0x1a9>
movss  -0x14(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    12d8 <main+0x1b8>
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    12dd <main+0x1bd>
jmp    12e2 <main+0x1c2>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd9f(%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    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movb   $0x1,0xe(%rsp)
lea    0xee6(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x3b,0x14(%rsp)
jg     1172 <main+0x52>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%edx
xor    %eax,%eax
cmp    $0x8d,%edx
setl   %cl
xorps  %xmm0,%xmm0
cmp    $0x64,%edx
jl     11aa <main+0x8a>
mov    %cl,%al
lea    0xe5b(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe67(%rip),%rdi
lea    0xf(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movb   $0x1,0xf(%rsp)
movb   $0x1,0xe(%rsp)
lea    0xe89(%rip),%rdi
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [36 x i8] c"Inserire \22La persona \C3\A8 disabile?\22 \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [17 x i8] c"Inserire Altezza\00"
@.str.5 = [8 x i8] c"Prezzo=\00"
@.str.6 = [32 x i8] c"Vuole il supplemento mirabeach?\00"
@.str.7 = [12 x i8] c"Prezzo_tot=\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
store i8 1, i8* %1
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 59
br i1 %11, label %14, label %12
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %14
14: ; preds = %0, %12
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 100
%18 = icmp slt i32 %16, 141
%19 = select i1 %18, double 2.800000e+01, double 0x4041733340000000
%20 = select i1 %17, double 0.000000e+00, double %19
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), double %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
store i8 1, i8* %2
store i8 1, i8* %1
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), double 0.000000e+00)
ret i32 0
}