#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 randomize_args(unsigned char *pDst, unsigned char *pSrc) {
  int j;
  for (j = 0; j < 16; j++) {
    pDst[j] = rand() % 256;
    pSrc[j] = rand() % 256;
  }
}


x86 assembly (clang, -O0):
<randomize_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1173 <randomize_args+0x63>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <randomize_args+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomize_args>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x1(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x1(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x2(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x2(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x3(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x3(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x4(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x4(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x5(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x5(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x6(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x6(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x7(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x7(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x8(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x8(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x9(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0x9(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xa(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xa(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xb(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xb(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xc(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xc(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xd(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xd(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xe(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xe(%r14)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xf(%rbx)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,0xf(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @randomize_args(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
%3 = tail call i32 (...) @rand()
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = tail call i32 (...) @rand()
%6 = trunc i32 %5 to i8
store i8 %6, i8* %1
%7 = tail call i32 (...) @rand()
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %8, i8* %9
%10 = tail call i32 (...) @rand()
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %11, i8* %12
%13 = tail call i32 (...) @rand()
%14 = trunc i32 %13 to i8
%15 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %14, i8* %15
%16 = tail call i32 (...) @rand()
%17 = trunc i32 %16 to i8
%18 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %17, i8* %18
%19 = tail call i32 (...) @rand()
%20 = trunc i32 %19 to i8
%21 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %20, i8* %21
%22 = tail call i32 (...) @rand()
%23 = trunc i32 %22 to i8
%24 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %23, i8* %24
%25 = tail call i32 (...) @rand()
%26 = trunc i32 %25 to i8
%27 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %26, i8* %27
%28 = tail call i32 (...) @rand()
%29 = trunc i32 %28 to i8
%30 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %29, i8* %30
%31 = tail call i32 (...) @rand()
%32 = trunc i32 %31 to i8
%33 = getelementptr inbounds i8, i8* %0, i64 5
store i8 %32, i8* %33
%34 = tail call i32 (...) @rand()
%35 = trunc i32 %34 to i8
%36 = getelementptr inbounds i8, i8* %1, i64 5
store i8 %35, i8* %36
%37 = tail call i32 (...) @rand()
%38 = trunc i32 %37 to i8
%39 = getelementptr inbounds i8, i8* %0, i64 6
store i8 %38, i8* %39
%40 = tail call i32 (...) @rand()
%41 = trunc i32 %40 to i8
%42 = getelementptr inbounds i8, i8* %1, i64 6
store i8 %41, i8* %42
%43 = tail call i32 (...) @rand()
%44 = trunc i32 %43 to i8
%45 = getelementptr inbounds i8, i8* %0, i64 7
store i8 %44, i8* %45
%46 = tail call i32 (...) @rand()
%47 = trunc i32 %46 to i8
%48 = getelementptr inbounds i8, i8* %1, i64 7
store i8 %47, i8* %48
%49 = tail call i32 (...) @rand()
%50 = trunc i32 %49 to i8
%51 = getelementptr inbounds i8, i8* %0, i64 8
store i8 %50, i8* %51
%52 = tail call i32 (...) @rand()
%53 = trunc i32 %52 to i8
%54 = getelementptr inbounds i8, i8* %1, i64 8
store i8 %53, i8* %54
%55 = tail call i32 (...) @rand()
%56 = trunc i32 %55 to i8
%57 = getelementptr inbounds i8, i8* %0, i64 9
store i8 %56, i8* %57
%58 = tail call i32 (...) @rand()
%59 = trunc i32 %58 to i8
%60 = getelementptr inbounds i8, i8* %1, i64 9
store i8 %59, i8* %60
%61 = tail call i32 (...) @rand()
%62 = trunc i32 %61 to i8
%63 = getelementptr inbounds i8, i8* %0, i64 10
store i8 %62, i8* %63
%64 = tail call i32 (...) @rand()
%65 = trunc i32 %64 to i8
%66 = getelementptr inbounds i8, i8* %1, i64 10
store i8 %65, i8* %66
%67 = tail call i32 (...) @rand()
%68 = trunc i32 %67 to i8
%69 = getelementptr inbounds i8, i8* %0, i64 11
store i8 %68, i8* %69
%70 = tail call i32 (...) @rand()
%71 = trunc i32 %70 to i8
%72 = getelementptr inbounds i8, i8* %1, i64 11
store i8 %71, i8* %72
%73 = tail call i32 (...) @rand()
%74 = trunc i32 %73 to i8
%75 = getelementptr inbounds i8, i8* %0, i64 12
store i8 %74, i8* %75
%76 = tail call i32 (...) @rand()
%77 = trunc i32 %76 to i8
%78 = getelementptr inbounds i8, i8* %1, i64 12
store i8 %77, i8* %78
%79 = tail call i32 (...) @rand()
%80 = trunc i32 %79 to i8
%81 = getelementptr inbounds i8, i8* %0, i64 13
store i8 %80, i8* %81
%82 = tail call i32 (...) @rand()
%83 = trunc i32 %82 to i8
%84 = getelementptr inbounds i8, i8* %1, i64 13
store i8 %83, i8* %84
%85 = tail call i32 (...) @rand()
%86 = trunc i32 %85 to i8
%87 = getelementptr inbounds i8, i8* %0, i64 14
store i8 %86, i8* %87
%88 = tail call i32 (...) @rand()
%89 = trunc i32 %88 to i8
%90 = getelementptr inbounds i8, i8* %1, i64 14
store i8 %89, i8* %90
%91 = tail call i32 (...) @rand()
%92 = trunc i32 %91 to i8
%93 = getelementptr inbounds i8, i8* %0, i64 15
store i8 %92, i8* %93
%94 = tail call i32 (...) @rand()
%95 = trunc i32 %94 to i8
%96 = getelementptr inbounds i8, i8* %1, i64 15
store i8 %95, i8* %96
ret void
}