#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_47() {
  unsigned char input[96] = {
      176, 211, 99,  9,   35,  126, 49,  93,  15,  190, 29,  35,  40,  78,
      147, 34,  155, 145, 32,  84,  123, 91,  93,  210, 50,  92,  159, 85,
      237, 121, 105, 173, 66,  122, 238, 82,  186, 221, 83,  81,  0,   125,
      158, 85,  136, 1,   90,  188, 244, 1,   31,  85,  120, 222, 46,  210,
      109, 91,  240, 119, 215, 160, 130, 230, 211, 85,  242, 10,  46,  155,
      230, 191, 249, 75,  36,  179, 202, 194, 214, 252, 216, 172, 84,  89,
      233, 203, 102, 94,  88,  31,  212, 14,  53,  217, 40,  207};
  unsigned char result0[32] = {0x9E, 0x92, 0x93, 0x1D, 0x89, 0xA9, 0xBA, 0x85,
                               0x14, 0xBD, 0x27, 0xAD, 0x6E, 0xAC, 0xCE, 0xC2,
                               0x31, 0x10, 0x87, 0x24, 0x7F, 0x65, 0xC4, 0xAE,
                               0x8F, 0x52, 0xB5, 0x4C, 0xB1, 0xD6, 0xBB, 0x3C};
  unsigned char result1[32];
  memset(result1, 0, 32);
  SHA256_VST(input, result1, 96);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_VST in "
             "SHA256_Xcompare_47\n");
  memset(result1, 0, 32);
  SHA256_NSS(input, result1, 96);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_NSS in "
             "SHA256_Xcompare_47\n");
  memset(result1, 0, 32);
  SHA256_sodium(input, result1, 96);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_sodium in "
             "SHA256_Xcompare_47\n");
}


x86 assembly (clang, -O0):
<SHA256_Xcompare_47>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
lea    -0x60(%rbp),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x60,%edx
call   1060 <memcpy@plt>
mov    0xed9(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x60(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x60,%edx
call   1030 <SHA256_VST@plt>
lea    -0x80(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x20,%edx
lea    0xe95(%rip),%rcx
call   1080 <check_test@plt>
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x60(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x60,%edx
call   1050 <SHA256_NSS@plt>
lea    -0x80(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x20,%edx
lea    0xe99(%rip),%rcx
call   1080 <check_test@plt>
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x60(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x60,%edx
call   1070 <SHA256_sodium@plt>
lea    -0x80(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x20,%edx
lea    0xe9d(%rip),%rcx
call   1080 <check_test@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA256_Xcompare_47>:
push   %r15
push   %r14
push   %rbx
sub    $0xa0,%rsp
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe7d(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe61(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x80(%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    $0x60,%edx
call   1030 <SHA256_VST@plt>
lea    0xe92(%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    $0x60,%edx
call   1050 <SHA256_NSS@plt>
lea    0xea1(%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    $0x60,%edx
call   1060 <SHA256_sodium@plt>
lea    0xeb3(%rip),%rcx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1070 <check_test@plt>
add    $0xa0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.SHA256_Xcompare_47.input = [96 x i8] c"\B0\D3c\09#~1]\0F\BE\1D#(N\93\22\9B\91 T{[]\D22\\\9FU\EDyi\ADBz\EER\BA\DDSQ\00}\9EU\88\01Z\BC\F4\01\1FUx\DE.\D2m[\F0w\D7\A0\82\E6\D3U\F2\0A.\9B\E6\BF\F9K$\B3\CA\C2\D6\FC\D8\ACTY\E9\CBf^X\1F\D4\0E5\D9(\CF"
@__const.SHA256_Xcompare_47.result0 = [32 x i8] c"\9E\92\93\1D\89\A9\BA\85\14\BD'\ADn\AC\CE\C21\10\87$\7Fe\C4\AE\8FR\B5L\B1\D6\BB<"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_47\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_47\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_47\0A\00"
define void @SHA256_Xcompare_47() {
%1 = alloca [96 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = bitcast [96 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 [96 x i8], [96 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 96)
%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 [96 x i8], [96 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 96)
%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 [96 x i8], [96 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 96)
%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_47.input = [96 x i8] c"\B0\D3c\09#~1]\0F\BE\1D#(N\93\22\9B\91 T{[]\D22\\\9FU\EDyi\ADBz\EER\BA\DDSQ\00}\9EU\88\01Z\BC\F4\01\1FUx\DE.\D2m[\F0w\D7\A0\82\E6\D3U\F2\0A.\9B\E6\BF\F9K$\B3\CA\C2\D6\FC\D8\ACTY\E9\CBf^X\1F\D4\0E5\D9(\CF"
@__const.SHA256_Xcompare_47.result0 = [32 x i8] c"\9E\92\93\1D\89\A9\BA\85\14\BD'\ADn\AC\CE\C21\10\87$\7Fe\C4\AE\8FR\B5L\B1\D6\BB<"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_47\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_47\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_47\0A\00"
define void @SHA256_Xcompare_47() {
%1 = alloca [96 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [96 x i8], [96 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 96)
%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 96)
%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 96)
%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
}