#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*/ clrscr();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int /*<<< orphan*/ small(int, int, int, int);
int smaller(int, int, int);
int main() {
  int a, b, c, _shorter;
  clrscr();
  printf("Enter 3 positive number : ");
  scanf("%d %d %d", &a, &b, &c);
  if ((a + b > c) && (a + c > b) && (b + c > a)) {
    _shorter = smaller(a, b, c);
    small(a, b, c, _shorter);
  } else
    printf("\nGiven numbers don't form sides of triangle.");
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <clrscr@plt>
lea    0xe83(%rip),%rdi
call   1050 <printf@plt>
lea    0xe92(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1070 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11ee <main+0x8e>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11ee <main+0x8e>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11ee <main+0x8e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <smaller@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1060 <small@plt>
jmp    11fa <main+0x9a>
lea    0xe2f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <getch@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1040 <clrscr@plt>
lea    0xe8e(%rip),%rdi
call   1050 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1070 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
lea    (%rsi,%rdi,1),%eax
mov    0xc(%rsp),%edx
cmp    %edx,%eax
jle    11cd <main+0x6d>
lea    (%rdx,%rdi,1),%eax
cmp    %esi,%eax
jle    11cd <main+0x6d>
lea    (%rdx,%rsi,1),%eax
cmp    %edi,%eax
jle    11cd <main+0x6d>
call   1030 <smaller@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %eax,%ecx
call   1060 <small@plt>
jmp    11d9 <main+0x79>
lea    0xe50(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1080 <getch@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Enter 3 positive number : \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [45 x i8] c"\0AGiven numbers don't form sides of triangle.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @clrscr()
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %4
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %36
14: ; preds = %0
%15 = load i32, i32* %2
%16 = load i32, i32* %4
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %3
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %36
20: ; preds = %14
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %2
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %36
26: ; preds = %20
%27 = load i32, i32* %2
%28 = load i32, i32* %3
%29 = load i32, i32* %4
%30 = call i32 @smaller(i32 %27, i32 %28, i32 %29)
store i32 %30, i32* %5
%31 = load i32, i32* %2
%32 = load i32, i32* %3
%33 = load i32, i32* %4
%34 = load i32, i32* %5
%35 = call i32 @small(i32 %31, i32 %32, i32 %33, i32 %34)
br label %38
36: ; preds = %20, %14, %0
%37 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
br label %38
38: ; preds = %36, %26
%39 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter 3 positive number : \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [45 x i8] c"\0AGiven numbers don't form sides of triangle.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (...) @clrscr()
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
%13 = load i32, i32* %3
%14 = icmp sgt i32 %12, %13
%15 = add nsw i32 %13, %10
%16 = icmp sgt i32 %15, %11
%17 = select i1 %14, i1 %16, i1 false
%18 = add nsw i32 %13, %11
%19 = icmp sgt i32 %18, %10
%20 = select i1 %17, i1 %19, i1 false
br i1 %20, label %21, label %27
21: ; preds = %0
%22 = call i32 @smaller(i32 %10, i32 %11, i32 %13)
%23 = load i32, i32* %1
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = call i32 @small(i32 %23, i32 %24, i32 %25, i32 %22)
br label %29
27: ; preds = %0
%28 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %21
%30 = call i32 (...) @getch()
ret i32 0
}