#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*/ shuffleSort(int *, int);
int main(int argc, const char *argv[]) {
  int table[52];
  for (int i = 0; i < 52; i++) {
    table[i] = i + 1;
  }
  shuffleSort(table, 52);
  for (int i = 0; i < 52; i++) {
    printf("%d ", table[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xe4(%rbp)
cmpl   $0x34,-0xe4(%rbp)
jge    117b <main+0x5b>
mov    -0xe4(%rbp),%ecx
add    $0x1,%ecx
movslq -0xe4(%rbp),%rax
mov    %ecx,-0xe0(%rbp,%rax,4)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    1143 <main+0x23>
lea    -0xe0(%rbp),%rdi
mov    $0x34,%esi
call   1030 <shuffleSort@plt>
movl   $0x0,-0xe8(%rbp)
cmpl   $0x34,-0xe8(%rbp)
jge    11d3 <main+0xb3>
movslq -0xe8(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    1196 <main+0x76>
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
movaps 0xebf(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xec4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
mov    %rsp,%rdi
mov    $0x34,%esi
call   1030 <shuffleSort@plt>
lea    0xed8(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    $0x34,%rbx
jne    1200 <main+0xd0>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [52 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %9
9: ; preds = %18, %2
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 52
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i32, i32* %7
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [52 x i32], [52 x i32]* %6, i64 0, i64 %16
store i32 %14, i32* %17
br label %18
18: ; preds = %12
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
br label %9
21: ; preds = %9
%22 = getelementptr inbounds [52 x i32], [52 x i32]* %6, i64 0, i64 0
%23 = call i32 @shuffleSort(i32* %22, i32 52)
store i32 0, i32* %8
br label %24
24: ; preds = %33, %21
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 52
br i1 %26, label %27, label %36
27: ; preds = %24
%28 = load i32, i32* %8
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [52 x i32], [52 x i32]* %6, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %27
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 1
store i32 %35, i32* %8
br label %24
36: ; preds = %24
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [52 x i32]
%4 = bitcast [52 x i32]* %3 to i8*
%5 = bitcast [52 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %5
%6 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 4
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %7
%8 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 8
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, <4 x i32>* %9
%10 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 12
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 13, i32 14, i32 15, i32 16>, <4 x i32>* %11
%12 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 16
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 17, i32 18, i32 19, i32 20>, <4 x i32>* %13
%14 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 20
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 21, i32 22, i32 23, i32 24>, <4 x i32>* %15
%16 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 24
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 25, i32 26, i32 27, i32 28>, <4 x i32>* %17
%18 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 28
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 29, i32 30, i32 31, i32 32>, <4 x i32>* %19
%20 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 32
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 33, i32 34, i32 35, i32 36>, <4 x i32>* %21
%22 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 36
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 37, i32 38, i32 39, i32 40>, <4 x i32>* %23
%24 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 40
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 41, i32 42, i32 43, i32 44>, <4 x i32>* %25
%26 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 44
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 45, i32 46, i32 47, i32 48>, <4 x i32>* %27
%28 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 48
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 49, i32 50, i32 51, i32 52>, <4 x i32>* %29
%30 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 0
%31 = call i32 @shuffleSort(i32* %30, i32 52)
br label %34
32: ; preds = %34
%33 = call i32 @putchar(i32 10)
ret i32 0
34: ; preds = %2, %34
%35 = phi i64 [ 0, %2 ], [ %39, %34 ]
%36 = getelementptr inbounds [52 x i32], [52 x i32]* %3, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %37)
%39 = add nuw nsw i64 %35, 1
%40 = icmp eq i64 %39, 52
br i1 %40, label %32, label %34
}