#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*/ display();
int /*<<< orphan*/ insert(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ selectionSort();
int main() {
  insert(4);
  insert(6);
  insert(19);
  insert(2);
  insert(10);
  insert(3);
  printf("Before sorting : ");
  display();
  selectionSort();
  printf("After Sorting : ");
  display();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1060 <insert@plt>
mov    $0x6,%edi
call   1060 <insert@plt>
mov    $0x13,%edi
call   1060 <insert@plt>
mov    $0x2,%edi
call   1060 <insert@plt>
mov    $0xa,%edi
call   1060 <insert@plt>
mov    $0x3,%edi
call   1060 <insert@plt>
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <display@plt>
mov    $0x0,%al
call   1050 <selectionSort@plt>
lea    0xe66(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <display@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1060 <insert@plt>
mov    $0x6,%edi
call   1060 <insert@plt>
mov    $0x13,%edi
call   1060 <insert@plt>
mov    $0x2,%edi
call   1060 <insert@plt>
mov    $0xa,%edi
call   1060 <insert@plt>
mov    $0x3,%edi
call   1060 <insert@plt>
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <display@plt>
xor    %eax,%eax
call   1050 <selectionSort@plt>
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <display@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Before sorting : \00"
@.str.1 = [17 x i8] c"After Sorting : \00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @insert(i32 4)
%3 = call i32 @insert(i32 6)
%4 = call i32 @insert(i32 19)
%5 = call i32 @insert(i32 2)
%6 = call i32 @insert(i32 10)
%7 = call i32 @insert(i32 3)
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @display()
%10 = call i32 (...) @selectionSort()
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @display()
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Before sorting : \00"
@.str.1 = [17 x i8] c"After Sorting : \00"
define i32 @main() {
%1 = tail call i32 @insert(i32 4)
%2 = tail call i32 @insert(i32 6)
%3 = tail call i32 @insert(i32 19)
%4 = tail call i32 @insert(i32 2)
%5 = tail call i32 @insert(i32 10)
%6 = tail call i32 @insert(i32 3)
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @display()
%9 = tail call i32 (...) @selectionSort()
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 (...) @display()
ret i32 0
}