#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 */
scalar_t__ rand();
get_individual_colors(unsigned long extclr[1][4]) {
  int i, j;
  for (i = 0; i < 1; ++i)
    for (j = 0; j < 4; ++j)
      extclr[i][j] = (unsigned long)rand();
}


x86 assembly (clang, -O0):
<get_individual_colors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jge    1180 <get_individual_colors+0x70>
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    116d <get_individual_colors+0x5d>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1134 <get_individual_colors+0x24>
jmp    1172 <get_individual_colors+0x62>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <get_individual_colors+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_individual_colors>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,0x8(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,0x10(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,0x18(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_individual_colors([4 x i64]* %0) {
%2 = alloca i32
%3 = alloca [4 x i64]*
%4 = alloca i32
%5 = alloca i32
store [4 x i64]* %0, [4 x i64]** %3
store i32 0, i32* %4
br label %6
6: ; preds = %26, %1
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 1
br i1 %8, label %9, label %29
9: ; preds = %6
store i32 0, i32* %5
br label %10
10: ; preds = %22, %9
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 4
br i1 %12, label %13, label %25
13: ; preds = %10
%14 = call i64 (...) @rand()
%15 = load [4 x i64]*, [4 x i64]** %3
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [4 x i64], [4 x i64]* %15, i64 %17
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [4 x i64], [4 x i64]* %18, i64 0, i64 %20
store i64 %14, i64* %21
br label %22
22: ; preds = %13
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %10
25: ; preds = %10
br label %26
26: ; preds = %25
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %6
29: ; preds = %6
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @get_individual_colors([4 x i64]* nocapture writeonly %0) {
%2 = tail call i64 (...) @rand()
%3 = getelementptr inbounds [4 x i64], [4 x i64]* %0, i64 0, i64 0
store i64 %2, i64* %3
%4 = tail call i64 (...) @rand()
%5 = getelementptr inbounds [4 x i64], [4 x i64]* %0, i64 0, i64 1
store i64 %4, i64* %5
%6 = tail call i64 (...) @rand()
%7 = getelementptr inbounds [4 x i64], [4 x i64]* %0, i64 0, i64 2
store i64 %6, i64* %7
%8 = tail call i64 (...) @rand()
%9 = getelementptr inbounds [4 x i64], [4 x i64]* %0, i64 0, i64 3
store i64 %8, i64* %9
ret i32 undef
}