#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 */

/* Variables and functions */
int /*<<< orphan*/ SHA256_NSS(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ SHA256_VST(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ SHA256_sodium(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ check_test(unsigned char *, unsigned char *, int, char *);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
void SHA256_Xcompare_21() {
  unsigned char input[61] = {
      75,  241, 93,  112, 165, 173, 112, 220, 142, 226, 153, 21,  163,
      182, 174, 11,  154, 234, 43,  48,  207, 137, 115, 210, 95,  24,
      200, 44,  246, 98,  190, 116, 114, 144, 122, 70,  205, 206, 107,
      131, 131, 90,  208, 137, 31,  250, 248, 151, 61,  47,  166, 106,
      103, 29,  211, 143, 224, 180, 241, 200, 126};
  unsigned char result0[32] = {0x9C, 0xDB, 0x11, 0xC7, 0xC8, 0xC4, 0xB9, 0xC2,
                               0xFC, 0x5C, 0xD3, 0x8A, 0xB1, 0x60, 0x58, 0x27,
                               0xFD, 0x61, 0x22, 0xA2, 0x2E, 0x32, 0x5E, 0x5B,
                               0x52, 0x41, 0xC9, 0xBF, 0xAB, 0x25, 0xF9, 0x8C};
  unsigned char result1[32];
  memset(result1, 0, 32);
  SHA256_VST(input, result1, 61);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_VST in "
             "SHA256_Xcompare_21\n");
  memset(result1, 0, 32);
  SHA256_NSS(input, result1, 61);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_NSS in "
             "SHA256_Xcompare_21\n");
  memset(result1, 0, 32);
  SHA256_sodium(input, result1, 61);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_sodium in "
             "SHA256_Xcompare_21\n");
}


x86 assembly (clang, -O0):
<SHA256_Xcompare_21>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x40(%rbp),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x3d,%edx
call   1060 <memcpy@plt>
mov    0xeb9(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xeb6(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x3d,%edx
call   1030 <SHA256_VST@plt>
lea    -0x60(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x20,%edx
lea    0xe7e(%rip),%rcx
call   1080 <check_test@plt>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x3d,%edx
call   1050 <SHA256_NSS@plt>
lea    -0x60(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x20,%edx
lea    0xe8b(%rip),%rcx
call   1080 <check_test@plt>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x3d,%edx
call   1070 <SHA256_sodium@plt>
lea    -0x60(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x20,%edx
lea    0xe98(%rip),%rcx
call   1080 <check_test@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA256_Xcompare_21>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
movups 0xeca(%rip),%xmm0
movups %xmm0,0x4d(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe95(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe79(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x60(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x3d,%edx
call   1030 <SHA256_VST@plt>
lea    0xe8d(%rip),%rcx
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1070 <check_test@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x3d,%edx
call   1050 <SHA256_NSS@plt>
lea    0xe9c(%rip),%rcx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1070 <check_test@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x3d,%edx
call   1060 <SHA256_sodium@plt>
lea    0xeae(%rip),%rcx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1070 <check_test@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.SHA256_Xcompare_21.input = [61 x i8] c"K\F1]p\A5\ADp\DC\8E\E2\99\15\A3\B6\AE\0B\9A\EA+0\CF\89s\D2_\18\C8,\F6b\BEtr\90zF\CD\CEk\83\83Z\D0\89\1F\FA\F8\97=/\A6jg\1D\D3\8F\E0\B4\F1\C8~"
@__const.SHA256_Xcompare_21.result0 = [32 x i8] c"\9C\DB\11\C7\C8\C4\B9\C2\FC\\\D3\8A\B1`X'\FDa\22\A2.2^[RA\C9\BF\AB%\F9\8C"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_21\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_21\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_21\0A\00"
define void @SHA256_Xcompare_21() {
%1 = alloca [61 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = bitcast [61 x i8]* %1 to i8*
%5 = bitcast [32 x i8]* %2 to i8*
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i32 0, i32 32)
%8 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%10 = call i32 @SHA256_VST(i8* %8, i8* %9, i32 61)
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%13 = call i32 @check_test(i8* %11, i8* %12, i32 32, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%15 = call i32 @memset(i8* %14, i32 0, i32 32)
%16 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 0
%17 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%18 = call i32 @SHA256_NSS(i8* %16, i8* %17, i32 61)
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%21 = call i32 @check_test(i8* %19, i8* %20, i32 32, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%22 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%23 = call i32 @memset(i8* %22, i32 0, i32 32)
%24 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 0
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%26 = call i32 @SHA256_sodium(i8* %24, i8* %25, i32 61)
%27 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%29 = call i32 @check_test(i8* %27, i8* %28, i32 32, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.SHA256_Xcompare_21.input = [61 x i8] c"K\F1]p\A5\ADp\DC\8E\E2\99\15\A3\B6\AE\0B\9A\EA+0\CF\89s\D2_\18\C8,\F6b\BEtr\90zF\CD\CEk\83\83Z\D0\89\1F\FA\F8\97=/\A6jg\1D\D3\8F\E0\B4\F1\C8~"
@__const.SHA256_Xcompare_21.result0 = [32 x i8] c"\9C\DB\11\C7\C8\C4\B9\C2\FC\\\D3\8A\B1`X'\FDa\22\A2.2^[RA\C9\BF\AB%\F9\8C"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_21\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_21\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_21\0A\00"
define void @SHA256_Xcompare_21() {
%1 = alloca [61 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i32 0, i32 32)
%8 = call i32 @SHA256_VST(i8* %4, i8* %6, i32 61)
%9 = call i32 @check_test(i8* %5, i8* %6, i32 32, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @memset(i8* %6, i32 0, i32 32)
%11 = call i32 @SHA256_NSS(i8* %4, i8* %6, i32 61)
%12 = call i32 @check_test(i8* %5, i8* %6, i32 32, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @memset(i8* %6, i32 0, i32 32)
%14 = call i32 @SHA256_sodium(i8* %4, i8* %6, i32 61)
%15 = call i32 @check_test(i8* %5, i8* %6, i32 32, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
ret void
}