#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int arr[100];
  int num;
  int min;
  int i;
  int j;
  int order;
  printf("Enter the number of elements in the array: ");
  scanf("%d", &num);
  printf("Enter the array elements:\n");
  for (i = 0; i < num; i++) {
    scanf("%d", &arr[i]);
  }
  printf("Enter the order of sorting:\n");
  printf("1. Ascending order\n2. Descending order\n");
  scanf("%d", &order);
  if ((order == 1) || (order == 2)) {
    for (i = 0; i < (num - 1); i++) {
      min = i;
      for (j = (i + 1); j < (num); j++) {
        if ((order == 1) && (arr[min] > arr[j])) {
          min = j;
        }
        if ((order == 2) && (arr[min] < arr[j])) {
          min = j;
        }
      }
      if (arr[min] != arr[i]) {
        arr[i] = arr[i] + arr[min];
        arr[min] = arr[i] - arr[min];
        arr[i] = arr[i] - arr[min];
        ;
      }
    }
  } else {
    printf("Invalid input!\n");
    exit(1);
  }
  printf("Array after sorting:\n");
  for (i = 0; i < num; i++) {
    printf("%d\t", arr[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x1a4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    11c2 <main+0x92>
movslq -0x1ac(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe83(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    117b <main+0x4b>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe47(%rip),%rdi
lea    -0x1b4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x1b4(%rbp)
je     120b <main+0xdb>
cmpl   $0x2,-0x1b4(%rbp)
jne    13a6 <main+0x276>
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
mov    -0x1a4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13a1 <main+0x271>
mov    -0x1ac(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
mov    -0x1b0(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    12e8 <main+0x1b8>
cmpl   $0x1,-0x1b4(%rbp)
jne    1294 <main+0x164>
movslq -0x1a8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
movslq -0x1b0(%rbp),%rcx
cmp    -0x1a0(%rbp,%rcx,4),%eax
jle    1294 <main+0x164>
mov    -0x1b0(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
cmpl   $0x2,-0x1b4(%rbp)
jne    12cf <main+0x19f>
movslq -0x1a8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
movslq -0x1b0(%rbp),%rcx
cmp    -0x1a0(%rbp,%rcx,4),%eax
jge    12cf <main+0x19f>
mov    -0x1b0(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
jmp    12d4 <main+0x1a4>
mov    -0x1b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    1247 <main+0x117>
movslq -0x1a8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
movslq -0x1ac(%rbp),%rcx
cmp    -0x1a0(%rbp,%rcx,4),%eax
je     1388 <main+0x258>
movslq -0x1ac(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
movslq -0x1a8(%rbp),%rax
add    -0x1a0(%rbp,%rax,4),%ecx
movslq -0x1ac(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
movslq -0x1ac(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
movslq -0x1a8(%rbp),%rax
sub    -0x1a0(%rbp,%rax,4),%ecx
movslq -0x1a8(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
movslq -0x1ac(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
movslq -0x1a8(%rbp),%rax
sub    -0x1a0(%rbp,%rax,4),%ecx
movslq -0x1ac(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
jmp    138d <main+0x25d>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1215 <main+0xe5>
jmp    13be <main+0x28e>
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xcda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    1418 <main+0x2e8>
movslq -0x1ac(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xcb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    13d6 <main+0x2a6>
lea    0xc7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1a0,%rsp
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebb(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xeb1(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    11bd <main+0x6d>
lea    0x10(%rsp),%r15
xor    %ebx,%ebx
lea    0xe90(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
add    $0x4,%r15
cmp    %rax,%rbx
jl     11a0 <main+0x50>
lea    0xe89(%rip),%rdi
call   1040 <puts@plt>
lea    0xe99(%rip),%rdi
call   1040 <puts@plt>
lea    0xe50(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
cmp    $0x1,%ecx
ja     1325 <main+0x1d5>
mov    0x8(%rsp),%ecx
cmp    $0x2,%ecx
jl     12d0 <main+0x180>
lea    -0x1(%rcx),%r8d
mov    $0x1,%r10d
xor    %r11d,%r11d
jmp    1230 <main+0xe0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r10
mov    %r9,%r11
cmp    %r8,%r9
je     12d0 <main+0x180>
lea    0x1(%r11),%r9
cmp    %rcx,%r9
jae    12a0 <main+0x150>
mov    %r10,%rsi
mov    %r11d,%ebx
jmp    125d <main+0x10d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edx
mov    %edx,%ebx
add    $0x1,%rsi
cmp    %rsi,%rcx
je     12a3 <main+0x153>
cmp    $0x2,%eax
je     1280 <main+0x130>
cmp    $0x1,%eax
jne    1254 <main+0x104>
movslq %ebx,%rdx
mov    0x10(%rsp,%rdx,4),%edi
mov    %esi,%edx
cmp    0x10(%rsp,%rsi,4),%edi
jle    1250 <main+0x100>
jmp    1252 <main+0x102>
nopl   0x0(%rax,%rax,1)
movslq %ebx,%rdx
mov    0x10(%rsp,%rdx,4),%edi
mov    %esi,%edx
cmp    0x10(%rsp,%rsi,4),%edi
jge    1250 <main+0x100>
jmp    1252 <main+0x102>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r11d,%ebx
movslq %ebx,%rsi
mov    0x10(%rsp,%rsi,4),%edx
mov    0x10(%rsp,%r11,4),%ebx
cmp    %ebx,%edx
je     1220 <main+0xd0>
add    %edx,%ebx
mov    %ebx,0x10(%rsp,%r11,4)
sub    0x10(%rsp,%rsi,4),%ebx
mov    %ebx,0x10(%rsp,%rsi,4)
sub    %ebx,0x10(%rsp,%r11,4)
jmp    1220 <main+0xd0>
lea    0xdc8(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    130c <main+0x1bc>
lea    0xd45(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    0x10(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
cmp    %rax,%rbx
jl     12f0 <main+0x1a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xd64(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Enter the number of elements in the array: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Enter the array elements:\0A\00"
@.str.3 = [29 x i8] c"Enter the order of sorting:\0A\00"
@.str.4 = [40 x i8] c"1. Ascending order\0A2. Descending order\0A\00"
@.str.5 = [16 x i8] c"Invalid input!\0A\00"
@.str.6 = [22 x i8] c"Array after sorting:\0A\00"
@.str.7 = [4 x i8] c"%d\09\00"
@.str.8 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %11
11: ; preds = %20, %0
%12 = load i32, i32* %5
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %23
15: ; preds = %11
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %17
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %18)
br label %20
20: ; preds = %15
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %11
23: ; preds = %11
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%27 = load i32, i32* %7
%28 = icmp eq i32 %27, 1
br i1 %28, label %32, label %29
29: ; preds = %23
%30 = load i32, i32* %7
%31 = icmp eq i32 %30, 2
br i1 %31, label %32, label %132
32: ; preds = %29, %23
store i32 0, i32* %5
br label %33
33: ; preds = %128, %32
%34 = load i32, i32* %5
%35 = load i32, i32* %3
%36 = sub nsw i32 %35, 1
%37 = icmp slt i32 %34, %36
br i1 %37, label %38, label %131
38: ; preds = %33
%39 = load i32, i32* %5
store i32 %39, i32* %4
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 1
store i32 %41, i32* %6
br label %42
42: ; preds = %77, %38
%43 = load i32, i32* %6
%44 = load i32, i32* %3
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %80
46: ; preds = %42
%47 = load i32, i32* %7
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %61
49: ; preds = %46
%50 = load i32, i32* %4
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = icmp sgt i32 %53, %57
br i1 %58, label %59, label %61
59: ; preds = %49
%60 = load i32, i32* %6
store i32 %60, i32* %4
br label %61
61: ; preds = %59, %49, %46
%62 = load i32, i32* %7
%63 = icmp eq i32 %62, 2
br i1 %63, label %64, label %76
64: ; preds = %61
%65 = load i32, i32* %4
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %66
%68 = load i32, i32* %67
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %70
%72 = load i32, i32* %71
%73 = icmp slt i32 %68, %72
br i1 %73, label %74, label %76
74: ; preds = %64
%75 = load i32, i32* %6
store i32 %75, i32* %4
br label %76
76: ; preds = %74, %64, %61
br label %77
77: ; preds = %76
%78 = load i32, i32* %6
%79 = add nsw i32 %78, 1
store i32 %79, i32* %6
br label %42
80: ; preds = %42
%81 = load i32, i32* %4
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = load i32, i32* %5
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %86
%88 = load i32, i32* %87
%89 = icmp ne i32 %84, %88
br i1 %89, label %90, label %127
90: ; preds = %80
%91 = load i32, i32* %5
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %92
%94 = load i32, i32* %93
%95 = load i32, i32* %4
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %96
%98 = load i32, i32* %97
%99 = add nsw i32 %94, %98
%100 = load i32, i32* %5
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %101
store i32 %99, i32* %102
%103 = load i32, i32* %5
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %104
%106 = load i32, i32* %105
%107 = load i32, i32* %4
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %108
%110 = load i32, i32* %109
%111 = sub nsw i32 %106, %110
%112 = load i32, i32* %4
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %113
store i32 %111, i32* %114
%115 = load i32, i32* %5
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %116
%118 = load i32, i32* %117
%119 = load i32, i32* %4
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %120
%122 = load i32, i32* %121
%123 = sub nsw i32 %118, %122
%124 = load i32, i32* %5
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %125
store i32 %123, i32* %126
br label %127
127: ; preds = %90, %80
br label %128
128: ; preds = %127
%129 = load i32, i32* %5
%130 = add nsw i32 %129, 1
store i32 %130, i32* %5
br label %33
131: ; preds = %33
br label %135
132: ; preds = %29
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%134 = call i32 @exit(i32 1)
unreachable
135: ; preds = %131
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %5
br label %137
137: ; preds = %147, %135
%138 = load i32, i32* %5
%139 = load i32, i32* %3
%140 = icmp slt i32 %138, %139
br i1 %140, label %141, label %150
141: ; preds = %137
%142 = load i32, i32* %5
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %143
%145 = load i32, i32* %144
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %145)
br label %147
147: ; preds = %141
%148 = load i32, i32* %5
%149 = add nsw i32 %148, 1
store i32 %149, i32* %5
br label %137
150: ; preds = %137
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"Enter the number of elements in the array: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.7 = [4 x i8] c"%d\09\00"
@str = [26 x i8] c"Enter the array elements:\00"
@str.9 = [28 x i8] c"Enter the order of sorting:\00"
@str.10 = [39 x i8] c"1. Ascending order\0A2. Descending order\00"
@str.11 = [15 x i8] c"Invalid input!\00"
@str.12 = [21 x i8] c"Array after sorting:\00"
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [100 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %0, %12
%13 = phi i64 [ %16, %12 ], [ 0, %0 ]
%14 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %14)
%16 = add nuw nsw i64 %13, 1
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = icmp slt i64 %16, %18
br i1 %19, label %12, label %20
20: ; preds = %12, %0
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.9, i64 0, i64 0))
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.10, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%24 = load i32, i32* %3
%25 = add i32 %24, -1
%26 = icmp ult i32 %25, 2
br i1 %26, label %27, label %83
27: ; preds = %20
%28 = load i32, i32* %2
%29 = icmp sgt i32 %28, 1
br i1 %29, label %30, label %86
30: ; preds = %27
%31 = add nsw i32 %28, -1
%32 = zext i32 %28 to i64
%33 = zext i32 %31 to i64
%34 = zext i32 %28 to i64
br label %35
35: ; preds = %30, %80
%36 = phi i64 [ 0, %30 ], [ %38, %80 ]
%37 = phi i64 [ 1, %30 ], [ %81, %80 ]
%38 = add nuw nsw i64 %36, 1
%39 = icmp ult i64 %38, %32
%40 = trunc i64 %36 to i32
br i1 %39, label %41, label %66
41: ; preds = %35, %62
%42 = phi i64 [ %64, %62 ], [ %37, %35 ]
%43 = phi i32 [ %63, %62 ], [ %40, %35 ]
switch i32 %24, label %62 [
i32 1, label %44
i32 2, label %53
]
44: ; preds = %41
%45 = sext i32 %43 to i64
%46 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %42
%49 = load i32, i32* %48
%50 = icmp sgt i32 %47, %49
%51 = trunc i64 %42 to i32
%52 = select i1 %50, i32 %51, i32 %43
br label %62
53: ; preds = %41
%54 = sext i32 %43 to i64
%55 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %54
%56 = load i32, i32* %55
%57 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %42
%58 = load i32, i32* %57
%59 = icmp slt i32 %56, %58
%60 = trunc i64 %42 to i32
%61 = select i1 %59, i32 %60, i32 %43
br label %62
62: ; preds = %41, %44, %53
%63 = phi i32 [ %61, %53 ], [ %52, %44 ], [ %43, %41 ]
%64 = add nuw nsw i64 %42, 1
%65 = icmp eq i64 %64, %34
br i1 %65, label %66, label %41
66: ; preds = %62, %35
%67 = phi i32 [ %40, %35 ], [ %63, %62 ]
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %36
%72 = load i32, i32* %71
%73 = icmp eq i32 %70, %72
br i1 %73, label %80, label %74
74: ; preds = %66
%75 = add nsw i32 %72, %70
store i32 %75, i32* %71
%76 = load i32, i32* %69
%77 = sub nsw i32 %75, %76
store i32 %77, i32* %69
%78 = load i32, i32* %71
%79 = sub nsw i32 %78, %77
store i32 %79, i32* %71
br label %80
80: ; preds = %66, %74
%81 = add nuw nsw i64 %37, 1
%82 = icmp eq i64 %38, %33
br i1 %82, label %86, label %35
83: ; preds = %20
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.11, i64 0, i64 0))
%85 = call i32 @exit(i32 1)
unreachable
86: ; preds = %80, %27
%87 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.12, i64 0, i64 0))
%88 = load i32, i32* %2
%89 = icmp sgt i32 %88, 0
br i1 %89, label %90, label %99
90: ; preds = %86, %90
%91 = phi i64 [ %95, %90 ], [ 0, %86 ]
%92 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %91
%93 = load i32, i32* %92
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %93)
%95 = add nuw nsw i64 %91, 1
%96 = load i32, i32* %2
%97 = sext i32 %96 to i64
%98 = icmp slt i64 %95, %97
br i1 %98, label %90, label %99
99: ; preds = %90, %86
%100 = call i32 @putchar(i32 10)
ret i32 0
}