#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*/ Ordenar(int *, int);
int /*<<< orphan*/ printf(char *, ...);
int rnd(long *);
int time(int /*<<< orphan*/ *);
main() {
  long random = time(NULL) % 65536;
  int limiteSup = 49, limiteInf = 1;
  int n[6], i, k;
  for (i = 0; i < 6; i++) {
    n[i] = (int)((limiteSup - limiteInf + 1) * rnd(&random) + limiteInf);
    for (k = 0; k < i; k++)
      if (n[k] == n[i]) {
        i--;
        break;
      }
  }
  Ordenar(n, 6);
  for (i = 0; i < 6; i++)
    printf("%d ", n[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    $0x10000,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    %rax,-0x10(%rbp)
movl   $0x31,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x6,-0x34(%rbp)
jge    1209 <main+0xc9>
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
lea    -0x10(%rbp),%rdi
call   1050 <rnd@plt>
mov    -0x3c(%rbp),%ecx
imul   %eax,%ecx
add    -0x18(%rbp),%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    11f6 <main+0xb6>
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
movslq -0x34(%rbp),%rcx
cmp    -0x30(%rbp,%rcx,4),%eax
jne    11e3 <main+0xa3>
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
jmp    11f6 <main+0xb6>
jmp    11e8 <main+0xa8>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11b3 <main+0x73>
jmp    11fb <main+0xbb>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    117c <main+0x3c>
lea    -0x30(%rbp),%rdi
mov    $0x6,%esi
call   1030 <Ordenar@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x6,-0x34(%rbp)
jge    124c <main+0x10c>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    121e <main+0xde>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
xor    %ebx,%ebx
xor    %edi,%edi
call   1070 <time@plt>
lea    0xffff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff0000,%ecx
sub    %ecx,%eax
cltq
mov    %rax,0x20(%rsp)
lea    0x20(%rsp),%r14
jmp    119d <main+0x4d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%ebx
lea    0x1(%rbx),%eax
cmp    $0x5,%ebx
mov    %eax,%ebx
jge    11d0 <main+0x80>
mov    %r14,%rdi
call   1060 <rnd@plt>
imul   $0x31,%eax,%eax
add    $0x1,%eax
movslq %ebx,%rcx
mov    %eax,(%rsp,%rcx,4)
test   %ecx,%ecx
jle    1193 <main+0x43>
mov    %ebx,%ecx
xor    %edx,%edx
nopl   0x0(%rax)
cmp    %eax,(%rsp,%rdx,4)
je     1190 <main+0x40>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    11c0 <main+0x70>
jmp    1193 <main+0x43>
mov    %rsp,%rdi
mov    $0x6,%esi
call   1040 <Ordenar@plt>
mov    (%rsp),%esi
lea    0xe19(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x28,%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() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca [6 x i32]
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @time(i32* null)
%9 = srem i32 %8, 65536
%10 = sext i32 %9 to i64
store i64 %10, i64* %2
store i32 49, i32* %3
store i32 1, i32* %4
store i32 0, i32* %6
br label %11
11: ; preds = %48, %0
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 6
br i1 %13, label %14, label %51
14: ; preds = %11
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = sub nsw i32 %15, %16
%18 = add nsw i32 %17, 1
%19 = call i32 @rnd(i64* %2)
%20 = mul nsw i32 %18, %19
%21 = load i32, i32* %4
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %24
store i32 %22, i32* %25
store i32 0, i32* %7
br label %26
26: ; preds = %44, %14
%27 = load i32, i32* %7
%28 = load i32, i32* %6
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %47
30: ; preds = %26
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = load i32, i32* %6
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = icmp eq i32 %34, %38
br i1 %39, label %40, label %43
40: ; preds = %30
%41 = load i32, i32* %6
%42 = add nsw i32 %41, -1
store i32 %42, i32* %6
br label %47
43: ; preds = %30
br label %44
44: ; preds = %43
%45 = load i32, i32* %7
%46 = add nsw i32 %45, 1
store i32 %46, i32* %7
br label %26
47: ; preds = %40, %26
br label %48
48: ; preds = %47
%49 = load i32, i32* %6
%50 = add nsw i32 %49, 1
store i32 %50, i32* %6
br label %11
51: ; preds = %11
%52 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 0
%53 = call i32 @Ordenar(i32* %52, i32 6)
store i32 0, i32* %6
br label %54
54: ; preds = %63, %51
%55 = load i32, i32* %6
%56 = icmp slt i32 %55, 6
br i1 %56, label %57, label %66
57: ; preds = %54
%58 = load i32, i32* %6
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %59
%61 = load i32, i32* %60
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %57
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
br label %54
66: ; preds = %54
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%68 = load i32, i32* %1
ret i32 %68
}

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