#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *, int *);
scalar_t__ slope(int, int, int, int);
int main() {
  int x1, x2, x3, y1, y2, y3;
  puts("Enter three point as x and y one after the other");
  scanf("%d %d %d %d %d %d", &x1, &y1, &x2, &y2, &x3, &y3);
  if (slope(x1, y1, x2, y2) == slope(x1, y1, x3, y3))
    puts("The points lie on the same line.");
  else
    puts("The points dont lie on same line.");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x10(%rbp),%r9
lea    -0x1c(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1040 <slope@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1040 <slope@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jne    11ba <main+0x8a>
lea    0xe93(%rip),%rdi
call   1030 <puts@plt>
jmp    11c6 <main+0x96>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
lea    0xee0(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x14(%rsp),%r8
lea    0x18(%rsp),%r9
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x1c(%rsp),%edx
mov    0x14(%rsp),%ecx
call   1040 <slope@plt>
mov    %rax,%rbx
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x18(%rsp),%edx
mov    0x10(%rsp),%ecx
call   1040 <slope@plt>
cmp    %rax,%rbx
lea    0xe9d(%rip),%rax
lea    0xeb7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Enter three point as x and y one after the other\00"
@.str.1 = [18 x i8] c"%d %d %d %d %d %d\00"
@.str.2 = [33 x i8] c"The points lie on the same line.\00"
@.str.3 = [34 x i8] c"The points dont lie on same line.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %5, i32* %3, i32* %6, i32* %4, i32* %7)
%10 = load i32, i32* %2
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = load i32, i32* %6
%14 = call i64 @slope(i32 %10, i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %2
%16 = load i32, i32* %5
%17 = load i32, i32* %4
%18 = load i32, i32* %7
%19 = call i64 @slope(i32 %15, i32 %16, i32 %17, i32 %18)
%20 = icmp eq i64 %14, %19
br i1 %20, label %21, label %23
21: ; preds = %0
%22 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %25
23: ; preds = %0
%24 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [49 x i8] c"Enter three point as x and y one after the other\00"
@.str.1 = [18 x i8] c"%d %d %d %d %d %d\00"
@.str.2 = [33 x i8] c"The points lie on the same line.\00"
@.str.3 = [34 x i8] c"The points dont lie on same line.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %1 to i8*
%8 = bitcast i32* %2 to i8*
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast i32* %5 to i8*
%12 = bitcast i32* %6 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %4, i32* %2, i32* %5, i32* %3, i32* %6)
%15 = load i32, i32* %1
%16 = load i32, i32* %4
%17 = load i32, i32* %2
%18 = load i32, i32* %5
%19 = call i64 @slope(i32 %15, i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* %1
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = load i32, i32* %6
%24 = call i64 @slope(i32 %20, i32 %21, i32 %22, i32 %23)
%25 = icmp eq i64 %19, %24
%26 = select i1 %25, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0)
%27 = call i32 @puts(i8* dereferenceable(1) %26)
ret i32 0
}