#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*/ h4;
  int /*<<< orphan*/ h3;
  int /*<<< orphan*/ h2;
  int /*<<< orphan*/ h1;
  int /*<<< orphan*/ h0;
};
typedef TYPE_1__ SHA_CTX;

/* Variables and functions */
void sha1_cpy(SHA_CTX *restrict out, const SHA_CTX *restrict in) {
  out->h0 = in->h0;
  out->h1 = in->h1;
  out->h2 = in->h2;
  out->h3 = in->h3;
  out->h4 = in->h4;
}


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

x86 assembly (clang, -O2):
<sha1_cpy>:
mov    0x10(%rsi),%eax
mov    %eax,0x10(%rdi)
movups (%rsi),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32, i32, i32, i32, i32 }
define void @sha1_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 4
%7 = load i32, i32* %6
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 4
store i32 %7, i32* %9
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 3
%12 = load i32, i32* %11
%13 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%14 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %13, i32 0, i32 3
store i32 %12, i32* %14
%15 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%16 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %15, i32 0, i32 2
%17 = load i32, i32* %16
%18 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%19 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %18, i32 0, i32 2
store i32 %17, i32* %19
%20 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%21 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %20, i32 0, i32 1
%22 = load i32, i32* %21
%23 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%24 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %23, i32 0, i32 1
store i32 %22, i32* %24
%25 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%26 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %25, i32 0, i32 0
%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
store i32 %27, i32* %29
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32, i32, i32, i32, i32 }
define void @sha1_cpy(%struct.TYPE_4__* noalias nocapture writeonly %0, %struct.TYPE_4__* noalias nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 4
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 4
store i32 %4, i32* %5
%6 = bitcast %struct.TYPE_4__* %1 to <4 x i32>*
%7 = load <4 x i32>, <4 x i32>* %6
%8 = bitcast %struct.TYPE_4__* %0 to <4 x i32>*
store <4 x i32> %7, <4 x i32>* %8
ret void
}