#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 rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main() {
  int numbers[6], x;
  srand((unsigned int)time(NULL));
  for (x = 0; x < 6; x++) {
    numbers[x] = (rand() % 49) + 1;
    printf("%d ", numbers[x]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    11ae <main+0x6e>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x31,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
movslq -0x24(%rbp),%rax
mov    %edx,-0x20(%rbp,%rax,4)
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1166 <main+0x26>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x5397829d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x31,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xe72(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x5397829d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x31,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x5397829d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x31,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x5397829d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x31,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x5397829d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x31,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x5397829d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x31,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
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 [6 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @time(i32* null)
%5 = trunc i64 %4 to i32
%6 = call i32 @srand(i32 %5)
store i32 0, i32* %3
br label %7
7: ; preds = %22, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 6
br i1 %9, label %10, label %25
10: ; preds = %7
%11 = call i32 (...) @rand()
%12 = srem i32 %11, 49
%13 = add nsw i32 %12, 1
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %15
store i32 %13, i32* %16
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %10
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %7
25: ; preds = %7
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, 49
%6 = add nsw i32 %5, 1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 49
%10 = add nsw i32 %9, 1
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = tail call i32 (...) @rand()
%13 = srem i32 %12, 49
%14 = add nsw i32 %13, 1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = tail call i32 (...) @rand()
%17 = srem i32 %16, 49
%18 = add nsw i32 %17, 1
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = tail call i32 (...) @rand()
%21 = srem i32 %20, 49
%22 = add nsw i32 %21, 1
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = tail call i32 (...) @rand()
%25 = srem i32 %24, 49
%26 = add nsw i32 %25, 1
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = tail call i32 @putchar(i32 10)
ret i32 0
}