#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 *, int *);
int main(int argc, char **argv) {
  struct abc {
    int a[10];
    int i;
    int j, temp;
  } xyz;
  for ((xyz.i) = 0; (xyz.i) < 10; (xyz.i)++)
    scanf("%d", &xyz.a[xyz.i]);
  for ((xyz.i) = 0; (xyz.i) < 9; (xyz.i)++)
    for ((xyz.j) = xyz.i; (xyz.j) < 10; (xyz.j)++)
      if ((xyz.a[xyz.i]) > (xyz.a[xyz.j])) {
        xyz.temp = xyz.a[xyz.i];
        xyz.a[xyz.i] = xyz.a[xyz.j];
        xyz.a[xyz.j] = xyz.temp;
      }
  printf(" Numbers in accending order is \n");
  for ((xyz.i) = 0; (xyz.i) < 10; (xyz.i)++)
    printf("%d  ", xyz.a[xyz.i]);
  printf("\nSmallest Number is %d and  Biggest is  %d", xyz.a[0], xyz.a[9]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0xa,-0x20(%rbp)
jge    1170 <main+0x50>
lea    -0x48(%rbp),%rsi
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xef1(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    113d <main+0x1d>
movl   $0x0,-0x20(%rbp)
cmpl   $0x9,-0x20(%rbp)
jge    11f3 <main+0xd3>
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    11e0 <main+0xc0>
movslq -0x20(%rbp),%rax
mov    -0x48(%rbp,%rax,4),%eax
movslq -0x1c(%rbp),%rcx
cmp    -0x48(%rbp,%rcx,4),%eax
jle    11cd <main+0xad>
movslq -0x20(%rbp),%rax
mov    -0x48(%rbp,%rax,4),%eax
mov    %eax,-0x18(%rbp)
movslq -0x1c(%rbp),%rax
mov    -0x48(%rbp,%rax,4),%ecx
movslq -0x20(%rbp),%rax
mov    %ecx,-0x48(%rbp,%rax,4)
mov    -0x18(%rbp),%ecx
movslq -0x1c(%rbp),%rax
mov    %ecx,-0x48(%rbp,%rax,4)
jmp    11d2 <main+0xb2>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1187 <main+0x67>
jmp    11e5 <main+0xc5>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1177 <main+0x57>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0xa,-0x20(%rbp)
jge    1236 <main+0x116>
movslq -0x20(%rbp),%rax
mov    -0x48(%rbp,%rax,4),%esi
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1208 <main+0xe8>
mov    -0x48(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movl   $0x0,0x30(%rsp)
xor    %eax,%eax
lea    0xee7(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
cltq
lea    (%rsp,%rax,4),%rsi
add    $0x8,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x30(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x30(%rsp)
cmp    $0x9,%ecx
jl     1150 <main+0x20>
movl   $0x0,0x30(%rsp)
xor    %eax,%eax
jmp    118e <main+0x5e>
xchg   %ax,%ax
lea    0x1(%rax),%ecx
mov    %ecx,0x30(%rsp)
cmp    $0x8,%eax
mov    %ecx,%eax
jge    11e0 <main+0xb0>
mov    %eax,0x34(%rsp)
mov    %eax,%ecx
jmp    11b2 <main+0x82>
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rcx),%edx
mov    %edx,0x34(%rsp)
mov    0x30(%rsp),%eax
cmp    $0x9,%ecx
mov    %edx,%ecx
jge    1180 <main+0x50>
cltq
mov    0x8(%rsp,%rax,4),%edx
movslq %ecx,%rsi
cmp    0x8(%rsp,%rsi,4),%edx
jle    11a0 <main+0x70>
mov    %edx,0x38(%rsp)
mov    0x8(%rsp,%rsi,4),%ecx
mov    %ecx,0x8(%rsp,%rax,4)
mov    0x38(%rsp),%eax
movslq 0x34(%rsp),%rcx
mov    %eax,0x8(%rsp,%rcx,4)
mov    0x34(%rsp),%ecx
jmp    11a0 <main+0x70>
lea    0xe49(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0x30(%rsp)
lea    0xe05(%rip),%rbx
xor    %eax,%eax
nopl   (%rax)
cltq
mov    0x8(%rsp,%rax,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x30(%rsp)
cmp    $0x9,%ecx
jl     1200 <main+0xd0>
mov    0x8(%rsp),%esi
mov    0x2c(%rsp),%edx
lea    0xdd6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.abc = type { [10 x i32], i32, i32, i32 }
@.str = [3 x i8] c"%d\00"
@.str.1 = [33 x i8] c" Numbers in accending order is \0A\00"
@.str.2 = [5 x i8] c"%d \00"
@.str.3 = [43 x i8] c"\0ASmallest Number is %d and Biggest is %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.abc
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
store i32 0, i32* %7
br label %8
8: ; preds = %19, %2
%9 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%10 = load i32, i32* %9
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%14 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%15 = load i32, i32* %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %13, i64 0, i64 %16
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
br label %19
19: ; preds = %12
%20 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%21 = load i32, i32* %20
%22 = add nsw i32 %21, 1
store i32 %22, i32* %20
br label %8
23: ; preds = %8
%24 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
store i32 0, i32* %24
br label %25
25: ; preds = %83, %23
%26 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%27 = load i32, i32* %26
%28 = icmp slt i32 %27, 9
br i1 %28, label %29, label %87
29: ; preds = %25
%30 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%31 = load i32, i32* %30
%32 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 2
store i32 %31, i32* %32
br label %33
33: ; preds = %78, %29
%34 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 2
%35 = load i32, i32* %34
%36 = icmp slt i32 %35, 10
br i1 %36, label %37, label %82
37: ; preds = %33
%38 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%39 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%40 = load i32, i32* %39
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [10 x i32], [10 x i32]* %38, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%45 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 2
%46 = load i32, i32* %45
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %44, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = icmp sgt i32 %43, %49
br i1 %50, label %51, label %77
51: ; preds = %37
%52 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%53 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%54 = load i32, i32* %53
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [10 x i32], [10 x i32]* %52, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 3
store i32 %57, i32* %58
%59 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%60 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 2
%61 = load i32, i32* %60
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [10 x i32], [10 x i32]* %59, i64 0, i64 %62
%64 = load i32, i32* %63
%65 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%66 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%67 = load i32, i32* %66
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %65, i64 0, i64 %68
store i32 %64, i32* %69
%70 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 3
%71 = load i32, i32* %70
%72 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%73 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 2
%74 = load i32, i32* %73
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [10 x i32], [10 x i32]* %72, i64 0, i64 %75
store i32 %71, i32* %76
br label %77
77: ; preds = %51, %37
br label %78
78: ; preds = %77
%79 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 2
%80 = load i32, i32* %79
%81 = add nsw i32 %80, 1
store i32 %81, i32* %79
br label %33
82: ; preds = %33
br label %83
83: ; preds = %82
%84 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%85 = load i32, i32* %84
%86 = add nsw i32 %85, 1
store i32 %86, i32* %84
br label %25
87: ; preds = %25
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%89 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
store i32 0, i32* %89
br label %90
90: ; preds = %102, %87
%91 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%92 = load i32, i32* %91
%93 = icmp slt i32 %92, 10
br i1 %93, label %94, label %106
94: ; preds = %90
%95 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%96 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%97 = load i32, i32* %96
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [10 x i32], [10 x i32]* %95, i64 0, i64 %98
%100 = load i32, i32* %99
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %94
%103 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 1
%104 = load i32, i32* %103
%105 = add nsw i32 %104, 1
store i32 %105, i32* %103
br label %90
106: ; preds = %90
%107 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%108 = getelementptr inbounds [10 x i32], [10 x i32]* %107, i64 0, i64 0
%109 = load i32, i32* %108
%110 = getelementptr inbounds %struct.abc, %struct.abc* %6, i32 0, i32 0
%111 = getelementptr inbounds [10 x i32], [10 x i32]* %110, i64 0, i64 9
%112 = load i32, i32* %111
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 %109, i32 %112)
ret i32 0
}

LLVM IR (-O2):
%struct.abc = type { [10 x i32], i32, i32, i32 }
@.str = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%d \00"
@.str.3 = [43 x i8] c"\0ASmallest Number is %d and Biggest is %d\00"
@str = [32 x i8] c" Numbers in accending order is \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.abc
%4 = bitcast %struct.abc* %3 to i8*
%5 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 1
store i32 0, i32* %5
br label %9
6: ; preds = %9
%7 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 2
store i32 0, i32* %5
%8 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 3
br label %17
9: ; preds = %2, %9
%10 = phi i32 [ 0, %2 ], [ %15, %9 ]
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 0, i64 %11
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %12)
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
%16 = icmp slt i32 %14, 9
br i1 %16, label %9, label %6
17: ; preds = %41, %6
%18 = phi i32 [ 0, %6 ], [ %42, %41 ]
store i32 %18, i32* %7
br label %19
19: ; preds = %36, %17
%20 = phi i32 [ %18, %17 ], [ %40, %36 ]
%21 = phi i32 [ %18, %17 ], [ %38, %36 ]
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 0, i64 %22
%24 = load i32, i32* %23
%25 = sext i32 %21 to i64
%26 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 0, i64 %25
%27 = load i32, i32* %26
%28 = icmp sgt i32 %24, %27
br i1 %28, label %29, label %36
29: ; preds = %19
store i32 %24, i32* %8
%30 = load i32, i32* %26
store i32 %30, i32* %23
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 0, i64 %33
store i32 %31, i32* %34
%35 = load i32, i32* %7
br label %36
36: ; preds = %19, %29
%37 = phi i32 [ %21, %19 ], [ %35, %29 ]
%38 = add nsw i32 %37, 1
store i32 %38, i32* %7
%39 = icmp slt i32 %37, 9
%40 = load i32, i32* %5
br i1 %39, label %19, label %41
41: ; preds = %36
%42 = add nsw i32 %40, 1
store i32 %42, i32* %5
%43 = icmp slt i32 %40, 8
br i1 %43, label %17, label %44
44: ; preds = %41
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
store i32 0, i32* %5
br label %46
46: ; preds = %44, %46
%47 = phi i32 [ 0, %44 ], [ %53, %46 ]
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 0, i64 %48
%50 = load i32, i32* %49
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %5
%53 = add nsw i32 %52, 1
store i32 %53, i32* %5
%54 = icmp slt i32 %52, 9
br i1 %54, label %46, label %55
55: ; preds = %46
%56 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 0, i64 0
%57 = load i32, i32* %56
%58 = getelementptr inbounds %struct.abc, %struct.abc* %3, i64 0, i32 0, i64 9
%59 = load i32, i32* %58
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 %57, i32 %59)
ret i32 0
}