#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 */
typedef int /*<<< orphan*/ m;

/* Variables and functions */
int /*<<< orphan*/ check(unsigned int *, unsigned int *, int);
int /*<<< orphan*/ init(unsigned int *, int);
int /*<<< orphan*/ memcpy(unsigned int *, unsigned int *, int);
int /*<<< orphan*/ print(unsigned int *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ setSort(unsigned int *, int);
int main(void) {
  unsigned m[100], saveM[100];
  unsigned loopInd;
  for (loopInd = 1; loopInd <= 100; loopInd++) {
    printf("\n<<<<< Тест %u >>>>>\n", loopInd);
    init(m, 100);
    memcpy(saveM, m, sizeof(m));
    printf("Масивът преди сортирането:\n");
    print(m, 100);
    setSort(m, 100);
    printf("Масивът след сортирането:\n");
    print(m, 100);
    check(m, saveM, 100);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x334(%rbp)
cmpl   $0x64,-0x334(%rbp)
ja     1241 <main+0xe1>
mov    -0x334(%rbp),%esi
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0x64,%esi
call   1060 <init@plt>
lea    -0x330(%rbp),%rdi
lea    -0x1a0(%rbp),%rsi
mov    $0x190,%edx
call   1050 <memcpy@plt>
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0x64,%esi
call   1040 <print@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0x64,%esi
call   1080 <setSort@plt>
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0x64,%esi
call   1040 <print@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x330(%rbp),%rsi
mov    $0x64,%edx
call   1070 <check@plt>
mov    -0x334(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x334(%rbp)
jmp    117c <main+0x1c>
xor    %eax,%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x328,%rsp
mov    $0x1,%ebx
lea    0xe73(%rip),%r14
lea    0x190(%rsp),%r15
mov    %rsp,%r12
lea    0xe7b(%rip),%r13
lea    0xea6(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x64,%esi
call   1070 <init@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    $0x190,%edx
call   1060 <memcpy@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    $0x64,%esi
call   1050 <print@plt>
mov    %r15,%rdi
mov    $0x64,%esi
call   1090 <setSort@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    $0x64,%esi
call   1050 <print@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x64,%edx
call   1080 <check@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    11b0 <main+0x40>
xor    %eax,%eax
add    $0x328,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\0A<<<<< \D0\A2\D0\B5\D1\81\D1\82 %u >>>>>\0A\00"
@.str.1 = [51 x i8] c"\D0\9C\D0\B0\D1\81\D0\B8\D0\B2\D1\8A\D1\82 \D0\BF\D1\80\D0\B5\D0\B4\D0\B8 \D1\81\D0\BE\D1\80\D1\82\D0\B8\D1\80\D0\B0\D0\BD\D0\B5\D1\82\D0\BE:\0A\00"
@.str.2 = [49 x i8] c"\D0\9C\D0\B0\D1\81\D0\B8\D0\B2\D1\8A\D1\82 \D1\81\D0\BB\D0\B5\D0\B4 \D1\81\D0\BE\D1\80\D1\82\D0\B8\D1\80\D0\B0\D0\BD\D0\B5\D1\82\D0\BE:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = alloca [100 x i32]
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
br label %5
5: ; preds = %27, %0
%6 = load i32, i32* %4
%7 = icmp ule i32 %6, 100
br i1 %7, label %8, label %30
8: ; preds = %5
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%12 = call i32 @init(i32* %11, i32 100)
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%14 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%15 = call i32 @memcpy(i32* %13, i32* %14, i32 400)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%18 = call i32 @print(i32* %17, i32 100)
%19 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%20 = call i32 @setSort(i32* %19, i32 100)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%22 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%23 = call i32 @print(i32* %22, i32 100)
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%25 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%26 = call i32 @check(i32* %24, i32* %25, i32 100)
br label %27
27: ; preds = %8
%28 = load i32, i32* %4
%29 = add i32 %28, 1
store i32 %29, i32* %4
br label %5
30: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0A<<<<< \D0\A2\D0\B5\D1\81\D1\82 %u >>>>>\0A\00"
@str = [50 x i8] c"\D0\9C\D0\B0\D1\81\D0\B8\D0\B2\D1\8A\D1\82 \D0\BF\D1\80\D0\B5\D0\B4\D0\B8 \D1\81\D0\BE\D1\80\D1\82\D0\B8\D1\80\D0\B0\D0\BD\D0\B5\D1\82\D0\BE:\00"
@str.3 = [48 x i8] c"\D0\9C\D0\B0\D1\81\D0\B8\D0\B2\D1\8A\D1\82 \D1\81\D0\BB\D0\B5\D0\B4 \D1\81\D0\BE\D1\80\D1\82\D0\B8\D1\80\D0\B0\D0\BD\D0\B5\D1\82\D0\BE:\00"
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca [100 x i32]
%3 = bitcast [100 x i32]* %1 to i8*
%4 = bitcast [100 x i32]* %2 to i8*
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
br label %7
7: ; preds = %0, %7
%8 = phi i32 [ 1, %0 ], [ %18, %7 ]
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @init(i32* %5, i32 100)
%11 = call i32 @memcpy(i32* %6, i32* %5, i32 400)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%13 = call i32 @print(i32* %5, i32 100)
%14 = call i32 @setSort(i32* %5, i32 100)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.3, i64 0, i64 0))
%16 = call i32 @print(i32* %5, i32 100)
%17 = call i32 @check(i32* %5, i32* %6, i32 100)
%18 = add nuw nsw i32 %8, 1
%19 = icmp eq i32 %18, 101
br i1 %19, label %20, label %7
20: ; preds = %7
ret i32 0
}