#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 rand();
int /*<<< orphan*/ srand(int);
void InicializaFenotipo(int *fenotipo) {
  srand(99413);
  int init;
  for (init = 1; init < 30; init++)
    fenotipo[init] = rand();
}


x86 assembly (clang, -O0):
<InicializaFenotipo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x18455,%edi
call   1030 <srand@plt>
movl   $0x1,-0xc(%rbp)
cmpl   $0x1e,-0xc(%rbp)
jge    1169 <InicializaFenotipo+0x49>
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <InicializaFenotipo+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InicializaFenotipo>:
push   %rbx
mov    %rdi,%rbx
mov    $0x18455,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x4(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x8(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0xc(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x10(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x14(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x18(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x1c(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x20(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x24(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x28(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x2c(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x30(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x34(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x38(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x3c(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x40(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x44(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x48(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x4c(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x50(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x54(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x58(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x5c(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x60(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x64(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x68(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x6c(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x70(%rbx)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,0x74(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @InicializaFenotipo(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @srand(i32 99413)
store i32 1, i32* %3
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 30
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = call i32 (...) @rand()
%10 = load i32*, i32** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 %9, i32* %13
br label %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @InicializaFenotipo(i32* nocapture writeonly %0) {
%2 = tail call i32 @srand(i32 99413)
%3 = tail call i32 (...) @rand()
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
%5 = tail call i32 (...) @rand()
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %5, i32* %6
%7 = tail call i32 (...) @rand()
%8 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %7, i32* %8
%9 = tail call i32 (...) @rand()
%10 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %9, i32* %10
%11 = tail call i32 (...) @rand()
%12 = getelementptr inbounds i32, i32* %0, i64 5
store i32 %11, i32* %12
%13 = tail call i32 (...) @rand()
%14 = getelementptr inbounds i32, i32* %0, i64 6
store i32 %13, i32* %14
%15 = tail call i32 (...) @rand()
%16 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %15, i32* %16
%17 = tail call i32 (...) @rand()
%18 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %17, i32* %18
%19 = tail call i32 (...) @rand()
%20 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %19, i32* %20
%21 = tail call i32 (...) @rand()
%22 = getelementptr inbounds i32, i32* %0, i64 10
store i32 %21, i32* %22
%23 = tail call i32 (...) @rand()
%24 = getelementptr inbounds i32, i32* %0, i64 11
store i32 %23, i32* %24
%25 = tail call i32 (...) @rand()
%26 = getelementptr inbounds i32, i32* %0, i64 12
store i32 %25, i32* %26
%27 = tail call i32 (...) @rand()
%28 = getelementptr inbounds i32, i32* %0, i64 13
store i32 %27, i32* %28
%29 = tail call i32 (...) @rand()
%30 = getelementptr inbounds i32, i32* %0, i64 14
store i32 %29, i32* %30
%31 = tail call i32 (...) @rand()
%32 = getelementptr inbounds i32, i32* %0, i64 15
store i32 %31, i32* %32
%33 = tail call i32 (...) @rand()
%34 = getelementptr inbounds i32, i32* %0, i64 16
store i32 %33, i32* %34
%35 = tail call i32 (...) @rand()
%36 = getelementptr inbounds i32, i32* %0, i64 17
store i32 %35, i32* %36
%37 = tail call i32 (...) @rand()
%38 = getelementptr inbounds i32, i32* %0, i64 18
store i32 %37, i32* %38
%39 = tail call i32 (...) @rand()
%40 = getelementptr inbounds i32, i32* %0, i64 19
store i32 %39, i32* %40
%41 = tail call i32 (...) @rand()
%42 = getelementptr inbounds i32, i32* %0, i64 20
store i32 %41, i32* %42
%43 = tail call i32 (...) @rand()
%44 = getelementptr inbounds i32, i32* %0, i64 21
store i32 %43, i32* %44
%45 = tail call i32 (...) @rand()
%46 = getelementptr inbounds i32, i32* %0, i64 22
store i32 %45, i32* %46
%47 = tail call i32 (...) @rand()
%48 = getelementptr inbounds i32, i32* %0, i64 23
store i32 %47, i32* %48
%49 = tail call i32 (...) @rand()
%50 = getelementptr inbounds i32, i32* %0, i64 24
store i32 %49, i32* %50
%51 = tail call i32 (...) @rand()
%52 = getelementptr inbounds i32, i32* %0, i64 25
store i32 %51, i32* %52
%53 = tail call i32 (...) @rand()
%54 = getelementptr inbounds i32, i32* %0, i64 26
store i32 %53, i32* %54
%55 = tail call i32 (...) @rand()
%56 = getelementptr inbounds i32, i32* %0, i64 27
store i32 %55, i32* %56
%57 = tail call i32 (...) @rand()
%58 = getelementptr inbounds i32, i32* %0, i64 28
store i32 %57, i32* %58
%59 = tail call i32 (...) @rand()
%60 = getelementptr inbounds i32, i32* %0, i64 29
store i32 %59, i32* %60
ret void
}