#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, float);
scalar_t__ scanf(char *, float *);
int main(void) {
  float max, min, temp;
  scanf("%f", &max);
  min = max;
  while (scanf("%f", &temp) != EOF) {
    if (temp > max) {
      max = temp;
    } else if (temp < min) {
      min = temp;
    }
  }
  printf("%f", max - min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xeb0(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e88(%rip),%rcx
cmp    (%rcx),%rax
je     11ae <main+0x8e>
movss  -0x10(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1187 <main+0x67>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11a9 <main+0x89>
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11a4 <main+0x84>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    11a9 <main+0x89>
jmp    1149 <main+0x29>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x2e8b(%rip),%r15
cmp    (%r15),%rax
jne    1186 <main+0x66>
movss  0x4(%rsp),%xmm0
subss  0x8(%rsp),%xmm0
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xe73(%rip),%r14
lea    0xc(%rsp),%rbx
jmp    11b6 <main+0x96>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  %xmm0,0x4(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r15),%rax
je     1162 <main+0x42>
movss  0xc(%rsp),%xmm0
ucomiss 0x4(%rsp),%xmm0
ja     11a0 <main+0x80>
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    11a6 <main+0x86>
movss  %xmm0,0x8(%rsp)
jmp    11a6 <main+0x86>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%6 = load float, float* %2
store float %6, float* %3
br label %7
7: ; preds = %24, %0
%8 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%9 = load i64, i64* @EOF
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %25
11: ; preds = %7
%12 = load float, float* %4
%13 = load float, float* %2
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load float, float* %4
store float %16, float* %2
br label %24
17: ; preds = %11
%18 = load float, float* %4
%19 = load float, float* %3
%20 = fcmp olt float %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = load float, float* %4
store float %22, float* %3
br label %23
23: ; preds = %21, %17
br label %24
24: ; preds = %23, %15
br label %7
25: ; preds = %7
%26 = load float, float* %2
%27 = load float, float* %3
%28 = fsub float %26, %27
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%6 = load float, float* %1
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %24, label %10
10: ; preds = %0, %19
%11 = phi float [ %20, %19 ], [ %6, %0 ]
%12 = load float, float* %2
%13 = load float, float* %1
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %16
15: ; preds = %10
store float %12, float* %1
br label %19
16: ; preds = %10
%17 = fcmp olt float %12, %11
br i1 %17, label %18, label %19
18: ; preds = %16
br label %19
19: ; preds = %16, %18, %15
%20 = phi float [ %11, %15 ], [ %12, %18 ], [ %11, %16 ]
%21 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%22 = load i64, i64* @EOF
%23 = icmp eq i64 %21, %22
br i1 %23, label %24, label %10
24: ; preds = %19, %0
%25 = phi float [ %6, %0 ], [ %20, %19 ]
%26 = load float, float* %1
%27 = fsub float %26, %25
%28 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %27)
ret i32 0
}