#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_xor(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_xor>:
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
xor    0x10(%rax),%ecx
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
xor    0xc(%rax),%ecx
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
xor    0x8(%rax),%ecx
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
xor    0x4(%rax),%ecx
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32, i32, i32, i32, i32 }
define void @sha1_xor(%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
%10 = load i32, i32* %9
%11 = xor i32 %10, %7
store i32 %11, i32* %9
%12 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%13 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %12, i32 0, i32 3
%14 = load i32, i32* %13
%15 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%16 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %15, i32 0, i32 3
%17 = load i32, i32* %16
%18 = xor i32 %17, %14
store i32 %18, i32* %16
%19 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%20 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %19, i32 0, i32 2
%21 = load i32, i32* %20
%22 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%23 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %22, i32 0, i32 2
%24 = load i32, i32* %23
%25 = xor i32 %24, %21
store i32 %25, i32* %23
%26 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%27 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %26, i32 0, i32 1
%28 = load i32, i32* %27
%29 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%30 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %29, i32 0, i32 1
%31 = load i32, i32* %30
%32 = xor i32 %31, %28
store i32 %32, i32* %30
%33 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%34 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %33, i32 0, i32 0
%35 = load i32, i32* %34
%36 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%37 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %36, i32 0, i32 0
%38 = load i32, i32* %37
%39 = xor i32 %38, %35
store i32 %39, i32* %37
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32, i32, i32, i32, i32 }
define void @sha1_xor(%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 4
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 4
%6 = load i32, i32* %5
%7 = xor i32 %6, %4
store i32 %7, i32* %5
%8 = bitcast %struct.TYPE_4__* %1 to <4 x i32>*
%9 = load <4 x i32>, <4 x i32>* %8
%10 = bitcast %struct.TYPE_4__* %0 to <4 x i32>*
%11 = load <4 x i32>, <4 x i32>* %10
%12 = xor <4 x i32> %11, %9
%13 = bitcast %struct.TYPE_4__* %0 to <4 x i32>*
store <4 x i32> %12, <4 x i32>* %13
ret void
}