#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 */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ *h;
};
typedef TYPE_1__ SHA256_CTX;

/* Variables and functions */
void sha256_cpy(SHA256_CTX *restrict out, const SHA256_CTX *restrict in) {
  out->h[0] = in->h[0];
  out->h[1] = in->h[1];
  out->h[2] = in->h[2];
  out->h[3] = in->h[3];
  out->h[4] = in->h[4];
  out->h[5] = in->h[5];
  out->h[6] = in->h[6];
  out->h[7] = in->h[7];
}


x86 assembly (clang, -O0):
<sha256_cpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x14(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x14(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x18(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x18(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x1c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha256_cpy>:
mov    (%rsi),%rax
mov    (%rax),%ecx
mov    (%rdi),%rdx
mov    %ecx,(%rdx)
mov    0x4(%rax),%ecx
mov    %ecx,0x4(%rdx)
mov    0x8(%rax),%ecx
mov    %ecx,0x8(%rdx)
mov    0xc(%rax),%ecx
mov    %ecx,0xc(%rdx)
mov    0x10(%rax),%ecx
mov    %ecx,0x10(%rdx)
mov    0x14(%rax),%ecx
mov    %ecx,0x14(%rdx)
mov    0x18(%rax),%ecx
mov    %ecx,0x18(%rdx)
mov    0x1c(%rax),%eax
mov    %eax,0x1c(%rdx)
ret

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

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32* }
define void @sha256_cpy(%struct.TYPE_4__* noalias nocapture %0, %struct.TYPE_4__* noalias nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%7 = load i32*, i32** %6
store i32 %5, i32* %7
%8 = getelementptr inbounds i32, i32* %4, i64 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %9, i32* %10
%11 = getelementptr inbounds i32, i32* %4, i64 2
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %7, i64 2
store i32 %12, i32* %13
%14 = getelementptr inbounds i32, i32* %4, i64 3
%15 = load i32, i32* %14
%16 = getelementptr inbounds i32, i32* %7, i64 3
store i32 %15, i32* %16
%17 = getelementptr inbounds i32, i32* %4, i64 4
%18 = load i32, i32* %17
%19 = getelementptr inbounds i32, i32* %7, i64 4
store i32 %18, i32* %19
%20 = getelementptr inbounds i32, i32* %4, i64 5
%21 = load i32, i32* %20
%22 = getelementptr inbounds i32, i32* %7, i64 5
store i32 %21, i32* %22
%23 = getelementptr inbounds i32, i32* %4, i64 6
%24 = load i32, i32* %23
%25 = getelementptr inbounds i32, i32* %7, i64 6
store i32 %24, i32* %25
%26 = getelementptr inbounds i32, i32* %4, i64 7
%27 = load i32, i32* %26
%28 = getelementptr inbounds i32, i32* %7, i64 7
store i32 %27, i32* %28
ret void
}