#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 randNormalize();
void makeArray(unsigned char *puntArreglo) {
  int i;
  randNormalize();
  for (i = 0; i < 6; i++) {
    puntArreglo[i] = (char)(randNormalize() * (0xFF));
  }
}


x86 assembly (clang, -O0):
<makeArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <randNormalize@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    115c <makeArray+0x4c>
mov    $0x0,%al
call   1030 <randNormalize@plt>
imul   $0xff,%eax,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <makeArray+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeArray>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <randNormalize@plt>
xor    %eax,%eax
call   1030 <randNormalize@plt>
neg    %al
mov    %al,(%rbx)
xor    %eax,%eax
call   1030 <randNormalize@plt>
neg    %al
mov    %al,0x1(%rbx)
xor    %eax,%eax
call   1030 <randNormalize@plt>
neg    %al
mov    %al,0x2(%rbx)
xor    %eax,%eax
call   1030 <randNormalize@plt>
neg    %al
mov    %al,0x3(%rbx)
xor    %eax,%eax
call   1030 <randNormalize@plt>
neg    %al
mov    %al,0x4(%rbx)
xor    %eax,%eax
call   1030 <randNormalize@plt>
neg    %al
mov    %al,0x5(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @makeArray(i8* nocapture writeonly %0) {
%2 = tail call i32 (...) @randNormalize()
%3 = tail call i32 (...) @randNormalize()
%4 = trunc i32 %3 to i8
%5 = sub i8 0, %4
store i8 %5, i8* %0
%6 = tail call i32 (...) @randNormalize()
%7 = trunc i32 %6 to i8
%8 = sub i8 0, %7
%9 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %8, i8* %9
%10 = tail call i32 (...) @randNormalize()
%11 = trunc i32 %10 to i8
%12 = sub i8 0, %11
%13 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %12, i8* %13
%14 = tail call i32 (...) @randNormalize()
%15 = trunc i32 %14 to i8
%16 = sub i8 0, %15
%17 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %16, i8* %17
%18 = tail call i32 (...) @randNormalize()
%19 = trunc i32 %18 to i8
%20 = sub i8 0, %19
%21 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %20, i8* %21
%22 = tail call i32 (...) @randNormalize()
%23 = trunc i32 %22 to i8
%24 = sub i8 0, %23
%25 = getelementptr inbounds i8, i8* %0, i64 5
store i8 %24, i8* %25
ret void
}