#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_6() {
  unsigned char input[37] = {210, 105, 63,  51,  176, 234, 18,  162, 32,  70,
                             24,  39,  17,  13,  13,  77,  230, 35,  249, 191,
                             97,  229, 182, 151, 89,  250, 136, 197, 172, 42,
                             106, 245, 167, 61,  169, 81,  95};
  unsigned char result0[32] = {0x4A, 0xFB, 0xB8, 0x2D, 0x29, 0xDB, 0xD3, 0x27,
                               0xB2, 0x0C, 0xC4, 0x43, 0xBF, 0xFA, 0xC8, 0x15,
                               0x8A, 0xAA, 0xA7, 0x52, 0x76, 0x86, 0x35, 0x75,
                               0x93, 0x01, 0xA3, 0x55, 0x93, 0x26, 0x12, 0xF2};
  unsigned char result1[32];
  memset(result1, 0, 32);
  SHA256_VST(input, result1, 37);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_VST in "
             "SHA256_Xcompare_6\n");
  memset(result1, 0, 32);
  SHA256_NSS(input, result1, 37);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_NSS in "
             "SHA256_Xcompare_6\n");
  memset(result1, 0, 32);
  SHA256_sodium(input, result1, 37);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_sodium in "
             "SHA256_Xcompare_6\n");
}


x86 assembly (clang, -O0):
<SHA256_Xcompare_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x30(%rbp),%rdi
lea    0xe8d(%rip),%rsi
mov    $0x25,%edx
call   1060 <memcpy@plt>
mov    0xeac(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xea9(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xea3(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x25,%edx
call   1030 <SHA256_VST@plt>
lea    -0x50(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x20,%edx
lea    0xe71(%rip),%rcx
call   1080 <check_test@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x25,%edx
call   1050 <SHA256_NSS@plt>
lea    -0x50(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x20,%edx
lea    0xe7d(%rip),%rcx
call   1080 <check_test@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x25,%edx
call   1070 <SHA256_sodium@plt>
lea    -0x50(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x20,%edx
lea    0xe89(%rip),%rcx
call   1080 <check_test@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA256_Xcompare_6>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
movaps 0xeb0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe94(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x5f51a93da7f56a2a,%rax
a9 51 5f
mov    %rax,0x1d(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe9e(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x25,%edx
call   1030 <SHA256_VST@plt>
lea    0xe8b(%rip),%rcx
lea    0x30(%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    $0x25,%edx
call   1050 <SHA256_NSS@plt>
lea    0xe97(%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    $0x25,%edx
call   1060 <SHA256_sodium@plt>
lea    0xea8(%rip),%rcx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1070 <check_test@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.SHA256_Xcompare_6.input = [37 x i8] c"\D2i?3\B0\EA\12\A2 F\18'\11\0D\0DM\E6#\F9\BFa\E5\B6\97Y\FA\88\C5\AC*j\F5\A7=\A9Q_"
@__const.SHA256_Xcompare_6.result0 = [32 x i8] c"J\FB\B8-)\DB\D3'\B2\0C\C4C\BF\FA\C8\15\8A\AA\A7Rv\865u\93\01\A3U\93&\12\F2"
@.str = [71 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_6\0A\00"
@.str.1 = [71 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_6\0A\00"
@.str.2 = [74 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_6\0A\00"
define void @SHA256_Xcompare_6() {
%1 = alloca [37 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = bitcast [37 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 [37 x i8], [37 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 37)
%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 ([71 x i8], [71 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 [37 x i8], [37 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 37)
%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 ([71 x i8], [71 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 [37 x i8], [37 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 37)
%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 ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.SHA256_Xcompare_6.input = [37 x i8] c"\D2i?3\B0\EA\12\A2 F\18'\11\0D\0DM\E6#\F9\BFa\E5\B6\97Y\FA\88\C5\AC*j\F5\A7=\A9Q_"
@__const.SHA256_Xcompare_6.result0 = [32 x i8] c"J\FB\B8-)\DB\D3'\B2\0C\C4C\BF\FA\C8\15\8A\AA\A7Rv\865u\93\01\A3U\93&\12\F2"
@.str = [71 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_6\0A\00"
@.str.1 = [71 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_6\0A\00"
@.str.2 = [74 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_6\0A\00"
define void @SHA256_Xcompare_6() {
%1 = alloca [37 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [37 x i8], [37 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 37)
%9 = call i32 @check_test(i8* %5, i8* %6, i32 32, i8* getelementptr inbounds ([71 x i8], [71 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 37)
%12 = call i32 @check_test(i8* %5, i8* %6, i32 32, i8* getelementptr inbounds ([71 x i8], [71 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 37)
%15 = call i32 @check_test(i8* %5, i8* %6, i32 32, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
ret void
}