#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 *, float *, float *, float *, float *, float *,
                         float *);
float sqrtf(float);
int main() {
  float x1, y1, x2, y2, x3, y3;
  scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3);
  float distance_1 = sqrtf(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
  float distance_2 = sqrtf(((x2 - x3) * (x2 - x3)) + ((y2 - y3) * (y2 - y3)));
  float distance_3 = sqrtf(((x3 - x1) * (x3 - x1)) + ((y3 - y1) * (y3 - y1)));
  if (distance_1 + distance_2 == distance_3) {
    printf("All the points are on same line.");
  } else {
    printf("All the points are not on same line");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
lea    -0x18(%rbp),%r9
lea    -0x1c(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x10(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
subss  -0x14(%rbp),%xmm1
movss  -0xc(%rbp),%xmm3
subss  -0x14(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1040 <sqrtf@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
subss  -0x18(%rbp),%xmm2
movss  -0x14(%rbp),%xmm1
subss  -0x1c(%rbp),%xmm1
movss  -0x14(%rbp),%xmm3
subss  -0x1c(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1040 <sqrtf@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x18(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
subss  -0x8(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm3
subss  -0xc(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1040 <sqrtf@plt>
movss  %xmm0,-0x28(%rbp)
movss  -0x20(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
ucomiss -0x28(%rbp),%xmm0
jne    124c <main+0x11c>
jp     124c <main+0x11c>
lea    0xdd0(%rip),%rdi
call   1030 <printf@plt>
jmp    1258 <main+0x128>
lea    0xde0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xc(%rsp),%rax
mov    %rax,(%rsp)
lea    0xebc(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x14(%rsp),%r8
lea    0x10(%rsp),%r9
call   1050 <scanf@plt>
movss  0x20(%rsp),%xmm0
subss  0x18(%rsp),%xmm0
movss  0x1c(%rsp),%xmm1
subss  0x14(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jb     1194 <main+0x64>
sqrtss %xmm0,%xmm0
jmp    119c <main+0x6c>
call   1040 <sqrtf@plt>
xorps  %xmm2,%xmm2
movss  %xmm0,0x8(%rsp)
movss  0x18(%rsp),%xmm0
subss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
subss  0xc(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jb     11d4 <main+0xa4>
xorps  %xmm2,%xmm2
sqrtss %xmm0,%xmm2
jmp    11dc <main+0xac>
call   1040 <sqrtf@plt>
movaps %xmm0,%xmm2
movss  0x10(%rsp),%xmm0
subss  0x20(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
subss  0x1c(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     120e <main+0xde>
sqrtss %xmm0,%xmm0
jmp    121f <main+0xef>
movss  %xmm2,0x24(%rsp)
call   1040 <sqrtf@plt>
movss  0x24(%rsp),%xmm2
movss  0x8(%rsp),%xmm1
addss  %xmm2,%xmm1
ucomiss %xmm0,%xmm1
lea    0xe00(%rip),%rax
lea    0xdd8(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%f %f %f %f %f %f\00"
@.str.1 = [33 x i8] c"All the points are on same line.\00"
@.str.2 = [36 x i8] c"All the points are not on same line\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i32 0, i32* %1
%11 = call i32 @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float* %2, float* %3, float* %4, float* %5, float* %6, float* %7)
%12 = load float, float* %2
%13 = load float, float* %4
%14 = fsub float %12, %13
%15 = load float, float* %2
%16 = load float, float* %4
%17 = fsub float %15, %16
%18 = load float, float* %3
%19 = load float, float* %5
%20 = fsub float %18, %19
%21 = load float, float* %3
%22 = load float, float* %5
%23 = fsub float %21, %22
%24 = fmul float %20, %23
%25 = call float @llvm.fmuladd.f32(float %14, float %17, float %24)
%26 = call float @sqrtf(float %25)
store float %26, float* %8
%27 = load float, float* %4
%28 = load float, float* %6
%29 = fsub float %27, %28
%30 = load float, float* %4
%31 = load float, float* %6
%32 = fsub float %30, %31
%33 = load float, float* %5
%34 = load float, float* %7
%35 = fsub float %33, %34
%36 = load float, float* %5
%37 = load float, float* %7
%38 = fsub float %36, %37
%39 = fmul float %35, %38
%40 = call float @llvm.fmuladd.f32(float %29, float %32, float %39)
%41 = call float @sqrtf(float %40)
store float %41, float* %9
%42 = load float, float* %6
%43 = load float, float* %2
%44 = fsub float %42, %43
%45 = load float, float* %6
%46 = load float, float* %2
%47 = fsub float %45, %46
%48 = load float, float* %7
%49 = load float, float* %3
%50 = fsub float %48, %49
%51 = load float, float* %7
%52 = load float, float* %3
%53 = fsub float %51, %52
%54 = fmul float %50, %53
%55 = call float @llvm.fmuladd.f32(float %44, float %47, float %54)
%56 = call float @sqrtf(float %55)
store float %56, float* %10
%57 = load float, float* %8
%58 = load float, float* %9
%59 = fadd float %57, %58
%60 = load float, float* %10
%61 = fcmp oeq float %59, %60
br i1 %61, label %62, label %64
62: ; preds = %0
%63 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %66
64: ; preds = %0
%65 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %66
66: ; preds = %64, %62
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"%f %f %f %f %f %f\00"
@.str.1 = [33 x i8] c"All the points are on same line.\00"
@.str.2 = [36 x i8] c"All the points are not on same line\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = bitcast float* %1 to i8*
%8 = bitcast float* %2 to i8*
%9 = bitcast float* %3 to i8*
%10 = bitcast float* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = bitcast float* %6 to i8*
%13 = call i32 @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5, float* %6)
%14 = load float, float* %1
%15 = load float, float* %3
%16 = fsub float %14, %15
%17 = load float, float* %2
%18 = load float, float* %4
%19 = fsub float %17, %18
%20 = fmul float %19, %19
%21 = call float @llvm.fmuladd.f32(float %16, float %16, float %20)
%22 = call float @sqrtf(float %21)
%23 = load float, float* %3
%24 = load float, float* %5
%25 = fsub float %23, %24
%26 = load float, float* %4
%27 = load float, float* %6
%28 = fsub float %26, %27
%29 = fmul float %28, %28
%30 = call float @llvm.fmuladd.f32(float %25, float %25, float %29)
%31 = call float @sqrtf(float %30)
%32 = load float, float* %5
%33 = load float, float* %1
%34 = fsub float %32, %33
%35 = load float, float* %6
%36 = load float, float* %2
%37 = fsub float %35, %36
%38 = fmul float %37, %37
%39 = call float @llvm.fmuladd.f32(float %34, float %34, float %38)
%40 = call float @sqrtf(float %39)
%41 = fadd float %22, %31
%42 = fcmp oeq float %41, %40
%43 = select i1 %42, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0)
%44 = call i32 @printf(i8* dereferenceable(1) %43)
ret i32 0
}