#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 *, double *);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  double f1 = -1.0;
  double f2 = -1.0;
  double f3 = -1.0;
  double f4 = -1.0;
  double f5 = -1.0;
  system("clear");
  printf("I am going to ask you to enter 5 different positive floating point "
         "numbers.\n");
  printf("I will end the program as soon as you enter a negative value or a "
         "repeat number.\n");
  printf("I will congratulate you and print out the 5 numbers if you "
         "successfully complete the task.\n\n");
  printf("Please enter your first number. ");
  scanf("%lf", &f1);
  if (f1 < 0) {
    return (0);
  }
  printf("Please enter your second number. ");
  scanf("%lf", &f2);
  if ((f2 == f1) | (f2 < 0)) {
    return (0);
  }
  printf("Please enter your third number. ");
  scanf("%lf", &f3);
  if ((f3 == f2) | (f3 < 0)) {
    return (0);
  }
  printf("Please enter your fourth number. ");
  scanf("%lf", &f4);
  if ((f4 == f3) | (f4 < 0)) {
    return (0);
  }
  printf("Please enter your fifth number. ");
  scanf("%lf", &f5);
  if ((f5 == f4) | (f5 < 0)) {
    return (0);
  }
  printf("\nYour numbers were: %lf, %lf, %lf, %lf, %lf\n\n", f1, f2, f3, f4,
         f5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeb2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe7e(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    0xe7a(%rip),%rdi
call   1030 <system@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf59(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11f5 <main+0xc5>
movl   $0x0,-0x4(%rbp)
jmp    1390 <main+0x260>
lea    0xf33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf21(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     1252 <main+0x122>
movl   $0x0,-0x4(%rbp)
jmp    1390 <main+0x260>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     12af <main+0x17f>
movl   $0x0,-0x4(%rbp)
jmp    1390 <main+0x260>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe67(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x30(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     130c <main+0x1dc>
movl   $0x0,-0x4(%rbp)
jmp    1390 <main+0x260>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe0a(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x38(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     1369 <main+0x239>
movl   $0x0,-0x4(%rbp)
jmp    1390 <main+0x260>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
lea    0xe2c(%rip),%rdi
mov    $0x5,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0xbff0000000000000,%rax
mov    %rax,0x10(%rsp)
mov    %rax,0x8(%rsp)
mov    %rax,(%rsp)
mov    %rax,0x18(%rsp)
mov    %rax,0x20(%rsp)
lea    0xe9b(%rip),%rdi
call   1040 <system@plt>
lea    0xf6e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfae(%rip),%rdi
call   1030 <puts@plt>
lea    0xff3(%rip),%rdi
call   1030 <puts@plt>
lea    0xe71(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe84(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1060 <scanf@plt>
xorpd  %xmm0,%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     12d8 <main+0x198>
lea    0xe67(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe55(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
movsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     12d8 <main+0x198>
ucomisd 0x10(%rsp),%xmm0
jne    1206 <main+0xc6>
jnp    12d8 <main+0x198>
lea    0xe48(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe14(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     12d8 <main+0x198>
ucomisd 0x8(%rsp),%xmm0
jne    1244 <main+0x104>
jnp    12d8 <main+0x198>
lea    0xe2b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdd6(%rip),%rdi
lea    0x18(%rsp),%rsi
call   1060 <scanf@plt>
movsd  0x18(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     12d8 <main+0x198>
ucomisd (%rsp),%xmm0
jne    127c <main+0x13c>
jnp    12d8 <main+0x198>
lea    0xe15(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd9e(%rip),%rdi
lea    0x20(%rsp),%rsi
call   1060 <scanf@plt>
movsd  0x20(%rsp),%xmm4
xorpd  %xmm0,%xmm0
ucomisd %xmm4,%xmm0
ja     12d8 <main+0x198>
movsd  0x18(%rsp),%xmm3
ucomisd %xmm3,%xmm4
jne    12b9 <main+0x179>
jnp    12d8 <main+0x198>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  (%rsp),%xmm2
lea    0xde8(%rip),%rdi
mov    $0x5,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [77 x i8] c"I am going to ask you to enter 5 different positive floating point numbers.\0A\00"
@.str.2 = [82 x i8] c"I will end the program as soon as you enter a negative value or a repeat number.\0A\00"
@.str.3 = [93 x i8] c"I will congratulate you and print out the 5 numbers if you successfully complete the task.\0A\0A\00"
@.str.4 = [33 x i8] c"Please enter your first number. \00"
@.str.5 = [4 x i8] c"%lf\00"
@.str.6 = [34 x i8] c"Please enter your second number. \00"
@.str.7 = [33 x i8] c"Please enter your third number. \00"
@.str.8 = [34 x i8] c"Please enter your fourth number. \00"
@.str.9 = [33 x i8] c"Please enter your fifth number. \00"
@.str.10 = [46 x i8] c"\0AYour numbers were: %lf, %lf, %lf, %lf, %lf\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double -1.000000e+00, double* %6
store double -1.000000e+00, double* %7
store double -1.000000e+00, double* %8
store double -1.000000e+00, double* %9
store double -1.000000e+00, double* %10
%11 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %6)
%17 = load double, double* %6
%18 = fcmp olt double %17, 0.000000e+00
br i1 %18, label %19, label %20
19: ; preds = %2
store i32 0, i32* %3
br label %79
20: ; preds = %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %7)
%23 = load double, double* %7
%24 = load double, double* %6
%25 = fcmp oeq double %23, %24
%26 = zext i1 %25 to i32
%27 = load double, double* %7
%28 = fcmp olt double %27, 0.000000e+00
%29 = zext i1 %28 to i32
%30 = or i32 %26, %29
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %20
store i32 0, i32* %3
br label %79
33: ; preds = %20
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%35 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %8)
%36 = load double, double* %8
%37 = load double, double* %7
%38 = fcmp oeq double %36, %37
%39 = zext i1 %38 to i32
%40 = load double, double* %8
%41 = fcmp olt double %40, 0.000000e+00
%42 = zext i1 %41 to i32
%43 = or i32 %39, %42
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %33
store i32 0, i32* %3
br label %79
46: ; preds = %33
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%48 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %9)
%49 = load double, double* %9
%50 = load double, double* %8
%51 = fcmp oeq double %49, %50
%52 = zext i1 %51 to i32
%53 = load double, double* %9
%54 = fcmp olt double %53, 0.000000e+00
%55 = zext i1 %54 to i32
%56 = or i32 %52, %55
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %46
store i32 0, i32* %3
br label %79
59: ; preds = %46
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%61 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %10)
%62 = load double, double* %10
%63 = load double, double* %9
%64 = fcmp oeq double %62, %63
%65 = zext i1 %64 to i32
%66 = load double, double* %10
%67 = fcmp olt double %66, 0.000000e+00
%68 = zext i1 %67 to i32
%69 = or i32 %65, %68
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %72
71: ; preds = %59
store i32 0, i32* %3
br label %79
72: ; preds = %59
%73 = load double, double* %6
%74 = load double, double* %7
%75 = load double, double* %8
%76 = load double, double* %9
%77 = load double, double* %10
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0), double %73, double %74, double %75, double %76, double %77)
br label %79
79: ; preds = %72, %71, %58, %45, %32, %19
%80 = load i32, i32* %3
ret i32 %80
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.4 = [33 x i8] c"Please enter your first number. \00"
@.str.5 = [4 x i8] c"%lf\00"
@.str.6 = [34 x i8] c"Please enter your second number. \00"
@.str.7 = [33 x i8] c"Please enter your third number. \00"
@.str.8 = [34 x i8] c"Please enter your fourth number. \00"
@.str.9 = [33 x i8] c"Please enter your fifth number. \00"
@.str.10 = [46 x i8] c"\0AYour numbers were: %lf, %lf, %lf, %lf, %lf\0A\0A\00"
@str = [76 x i8] c"I am going to ask you to enter 5 different positive floating point numbers.\00"
@str.11 = [81 x i8] c"I will end the program as soon as you enter a negative value or a repeat number.\00"
@str.12 = [92 x i8] c"I will congratulate you and print out the 5 numbers if you successfully complete the task.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = bitcast double* %3 to i8*
store double -1.000000e+00, double* %3
%9 = bitcast double* %4 to i8*
store double -1.000000e+00, double* %4
%10 = bitcast double* %5 to i8*
store double -1.000000e+00, double* %5
%11 = bitcast double* %6 to i8*
store double -1.000000e+00, double* %6
%12 = bitcast double* %7 to i8*
store double -1.000000e+00, double* %7
%13 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.11, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([92 x i8], [92 x i8]* @str.12, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %3)
%19 = load double, double* %3
%20 = fcmp olt double %19, 0.000000e+00
br i1 %20, label %58, label %21
21: ; preds = %2
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %4)
%24 = load double, double* %4
%25 = load double, double* %3
%26 = fcmp oeq double %24, %25
%27 = fcmp olt double %24, 0.000000e+00
%28 = or i1 %27, %26
br i1 %28, label %58, label %29
29: ; preds = %21
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%31 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %5)
%32 = load double, double* %5
%33 = load double, double* %4
%34 = fcmp oeq double %32, %33
%35 = fcmp olt double %32, 0.000000e+00
%36 = or i1 %35, %34
br i1 %36, label %58, label %37
37: ; preds = %29
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%39 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %6)
%40 = load double, double* %6
%41 = load double, double* %5
%42 = fcmp oeq double %40, %41
%43 = fcmp olt double %40, 0.000000e+00
%44 = or i1 %43, %42
br i1 %44, label %58, label %45
45: ; preds = %37
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%47 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %7)
%48 = load double, double* %7
%49 = load double, double* %6
%50 = fcmp oeq double %48, %49
%51 = fcmp olt double %48, 0.000000e+00
%52 = or i1 %51, %50
br i1 %52, label %58, label %53
53: ; preds = %45
%54 = load double, double* %3
%55 = load double, double* %4
%56 = load double, double* %5
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0), double %54, double %55, double %56, double %49, double %48)
br label %58
58: ; preds = %45, %37, %29, %21, %2, %53
ret i32 0
}