#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();
void set_randkey192(unsigned char p_data[4][6]) {
  unsigned int i, j;
  for (i = 0; i < 6; i++)
    for (j = 0; j < 4; j++)
      p_data[j][i] = rand() & 0xff;
}


x86 assembly (clang, -O0):
<set_randkey192>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jae    1181 <set_randkey192+0x71>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jae    116e <set_randkey192+0x5e>
mov    $0x0,%al
call   1030 <rand@plt>
and    $0xff,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   $0x6,%rcx,%rcx
add    %rcx,%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <set_randkey192+0x24>
jmp    1173 <set_randkey192+0x63>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <set_randkey192+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_randkey192>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x6(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xc(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x12(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x1(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x7(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xd(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x13(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x2(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x8(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xe(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x14(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x3(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x9(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xf(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x15(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x4(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xa(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x10(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x16(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x5(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xb(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x11(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x17(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set_randkey192([6 x i8]* nocapture writeonly %0) {
%2 = tail call i32 (...) @rand()
%3 = trunc i32 %2 to i8
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 0
store i8 %3, i8* %4
%5 = tail call i32 (...) @rand()
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 0
store i8 %6, i8* %7
%8 = tail call i32 (...) @rand()
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 0
store i8 %9, i8* %10
%11 = tail call i32 (...) @rand()
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 0
store i8 %12, i8* %13
%14 = tail call i32 (...) @rand()
%15 = trunc i32 %14 to i8
%16 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 1
store i8 %15, i8* %16
%17 = tail call i32 (...) @rand()
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 1
store i8 %18, i8* %19
%20 = tail call i32 (...) @rand()
%21 = trunc i32 %20 to i8
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 1
store i8 %21, i8* %22
%23 = tail call i32 (...) @rand()
%24 = trunc i32 %23 to i8
%25 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 1
store i8 %24, i8* %25
%26 = tail call i32 (...) @rand()
%27 = trunc i32 %26 to i8
%28 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 2
store i8 %27, i8* %28
%29 = tail call i32 (...) @rand()
%30 = trunc i32 %29 to i8
%31 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 2
store i8 %30, i8* %31
%32 = tail call i32 (...) @rand()
%33 = trunc i32 %32 to i8
%34 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 2
store i8 %33, i8* %34
%35 = tail call i32 (...) @rand()
%36 = trunc i32 %35 to i8
%37 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 2
store i8 %36, i8* %37
%38 = tail call i32 (...) @rand()
%39 = trunc i32 %38 to i8
%40 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 3
store i8 %39, i8* %40
%41 = tail call i32 (...) @rand()
%42 = trunc i32 %41 to i8
%43 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 3
store i8 %42, i8* %43
%44 = tail call i32 (...) @rand()
%45 = trunc i32 %44 to i8
%46 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 3
store i8 %45, i8* %46
%47 = tail call i32 (...) @rand()
%48 = trunc i32 %47 to i8
%49 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 3
store i8 %48, i8* %49
%50 = tail call i32 (...) @rand()
%51 = trunc i32 %50 to i8
%52 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 4
store i8 %51, i8* %52
%53 = tail call i32 (...) @rand()
%54 = trunc i32 %53 to i8
%55 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 4
store i8 %54, i8* %55
%56 = tail call i32 (...) @rand()
%57 = trunc i32 %56 to i8
%58 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 4
store i8 %57, i8* %58
%59 = tail call i32 (...) @rand()
%60 = trunc i32 %59 to i8
%61 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 4
store i8 %60, i8* %61
%62 = tail call i32 (...) @rand()
%63 = trunc i32 %62 to i8
%64 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 5
store i8 %63, i8* %64
%65 = tail call i32 (...) @rand()
%66 = trunc i32 %65 to i8
%67 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 5
store i8 %66, i8* %67
%68 = tail call i32 (...) @rand()
%69 = trunc i32 %68 to i8
%70 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 5
store i8 %69, i8* %70
%71 = tail call i32 (...) @rand()
%72 = trunc i32 %71 to i8
%73 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 5
store i8 %72, i8* %73
ret void
}