#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 */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ xs64(int /*<<< orphan*/ *);
void xs1024_init(uint64_t *x, uint64_t *s) {
  for (int i = 0; i < 16; i++)
    s[i] = xs64(x);
}


x86 assembly (clang, -O0):
<xs1024_init>:
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    1155 <xs1024_init+0x45>
mov    -0x8(%rbp),%rdi
call   1030 <xs64@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <xs1024_init+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xs1024_init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <xs64@plt>
mov    %eax,(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x4(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x8(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0xc(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x10(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x14(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x18(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x1c(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x20(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x24(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x28(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x2c(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x30(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x34(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x38(%r14)
mov    %rbx,%rdi
call   1030 <xs64@plt>
mov    %eax,0x3c(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @xs1024_init(i32* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @xs64(i32* %0)
store i32 %3, i32* %1
%4 = tail call i32 @xs64(i32* %0)
%5 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %4, i32* %5
%6 = tail call i32 @xs64(i32* %0)
%7 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %6, i32* %7
%8 = tail call i32 @xs64(i32* %0)
%9 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %8, i32* %9
%10 = tail call i32 @xs64(i32* %0)
%11 = getelementptr inbounds i32, i32* %1, i64 4
store i32 %10, i32* %11
%12 = tail call i32 @xs64(i32* %0)
%13 = getelementptr inbounds i32, i32* %1, i64 5
store i32 %12, i32* %13
%14 = tail call i32 @xs64(i32* %0)
%15 = getelementptr inbounds i32, i32* %1, i64 6
store i32 %14, i32* %15
%16 = tail call i32 @xs64(i32* %0)
%17 = getelementptr inbounds i32, i32* %1, i64 7
store i32 %16, i32* %17
%18 = tail call i32 @xs64(i32* %0)
%19 = getelementptr inbounds i32, i32* %1, i64 8
store i32 %18, i32* %19
%20 = tail call i32 @xs64(i32* %0)
%21 = getelementptr inbounds i32, i32* %1, i64 9
store i32 %20, i32* %21
%22 = tail call i32 @xs64(i32* %0)
%23 = getelementptr inbounds i32, i32* %1, i64 10
store i32 %22, i32* %23
%24 = tail call i32 @xs64(i32* %0)
%25 = getelementptr inbounds i32, i32* %1, i64 11
store i32 %24, i32* %25
%26 = tail call i32 @xs64(i32* %0)
%27 = getelementptr inbounds i32, i32* %1, i64 12
store i32 %26, i32* %27
%28 = tail call i32 @xs64(i32* %0)
%29 = getelementptr inbounds i32, i32* %1, i64 13
store i32 %28, i32* %29
%30 = tail call i32 @xs64(i32* %0)
%31 = getelementptr inbounds i32, i32* %1, i64 14
store i32 %30, i32* %31
%32 = tail call i32 @xs64(i32* %0)
%33 = getelementptr inbounds i32, i32* %1, i64 15
store i32 %32, i32* %33
ret void
}