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

/* Variables and functions */
void unpackforblock0_64(const uint64_t base, const uint8_t **pw,
                        uint64_t **pout) {
  (void)pw;
  for (int k = 0; k < 32; k += 1) {
    (*pout)[k] = base;
  }
  *pout += 32;
}


x86 assembly (clang, -O0):
<unpackforblock0_64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x20,-0x1c(%rbp)
jge    113f <unpackforblock0_64+0x3f>
mov    -0x4(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1116 <unpackforblock0_64+0x16>
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x80,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpackforblock0_64>:
mov    (%rdx),%rax
movd   %edi,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqu %xmm0,(%rax)
movdqu %xmm0,0x10(%rax)
movdqu %xmm0,0x20(%rax)
movdqu %xmm0,0x30(%rax)
movdqu %xmm0,0x40(%rax)
movdqu %xmm0,0x50(%rax)
movdqu %xmm0,0x60(%rax)
movdqu %xmm0,0x70(%rax)
sub    $0xffffffffffffff80,%rax
mov    %rax,(%rdx)
ret

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

LLVM IR (-O2):
define void @unpackforblock0_64(i32 %0, i32** nocapture readnone %1, i32** nocapture %2) {
%4 = load i32*, i32** %2
%5 = insertelement <4 x i32> poison, i32 %0, i64 0
%6 = shufflevector <4 x i32> %5, <4 x i32> poison, <4 x i32> zeroinitializer
%7 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %7
%8 = getelementptr inbounds i32, i32* %4, i64 4
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %9
%10 = getelementptr inbounds i32, i32* %4, i64 8
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %11
%12 = getelementptr inbounds i32, i32* %4, i64 12
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %13
%14 = getelementptr inbounds i32, i32* %4, i64 16
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %15
%16 = getelementptr inbounds i32, i32* %4, i64 20
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %17
%18 = getelementptr inbounds i32, i32* %4, i64 24
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %19
%20 = getelementptr inbounds i32, i32* %4, i64 28
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %21
%22 = getelementptr inbounds i32, i32* %4, i64 32
store i32* %22, i32** %2
ret void
}