#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_37() {
  unsigned char input[83] = {
      157, 178, 174, 22,  243, 238, 82,  159, 160, 142, 67,  241, 227, 141,
      194, 90,  183, 157, 225, 16,  136, 150, 156, 201, 163, 90,  245, 142,
      230, 101, 102, 253, 231, 81,  245, 110, 206, 41,  156, 185, 157, 114,
      50,  16,  248, 95,  79,  41,  181, 126, 125, 117, 118, 164, 59,  153,
      239, 160, 80,  1,   68,  44,  220, 64,  13,  140, 133, 141, 205, 124,
      224, 179, 6,   70,  236, 231, 142, 223, 114, 12,  84,  179, 160};
  unsigned char result0[32] = {0x34, 0x5E, 0x96, 0x40, 0xD6, 0x44, 0xAB, 0x66,
                               0x09, 0xE7, 0x92, 0x05, 0xDF, 0x25, 0x14, 0xA2,
                               0xD5, 0x13, 0xAE, 0xBA, 0xFC, 0x79, 0x6B, 0x1D,
                               0x7F, 0x66, 0x7C, 0x2C, 0xFD, 0xD1, 0x24, 0x7F};
  unsigned char result1[32];
  memset(result1, 0, 32);
  SHA256_VST(input, result1, 83);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_VST in "
             "SHA256_Xcompare_37\n");
  memset(result1, 0, 32);
  SHA256_NSS(input, result1, 83);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_NSS in "
             "SHA256_Xcompare_37\n");
  memset(result1, 0, 32);
  SHA256_sodium(input, result1, 83);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_sodium in "
             "SHA256_Xcompare_37\n");
}


x86 assembly (clang, -O0):
<SHA256_Xcompare_37>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
lea    -0x60(%rbp),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x53,%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    $0x53,%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    $0x53,%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    $0x53,%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_37>:
push   %r15
push   %r14
push   %rbx
sub    $0xa0,%rsp
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe89(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe6d(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0xa0b3540c,0x6f(%rsp)
a0
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xead(%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    $0x53,%edx
call   1030 <SHA256_VST@plt>
lea    0xe96(%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    $0x53,%edx
call   1050 <SHA256_NSS@plt>
lea    0xea5(%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    $0x53,%edx
call   1060 <SHA256_sodium@plt>
lea    0xeb7(%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_37.input = [83 x i8] c"\9D\B2\AE\16\F3\EER\9F\A0\8EC\F1\E3\8D\C2Z\B7\9D\E1\10\88\96\9C\C9\A3Z\F5\8E\E6ef\FD\E7Q\F5n\CE)\9C\B9\9Dr2\10\F8_O)\B5~}uv\A4;\99\EF\A0P\01D,\DC@\0D\8C\85\8D\CD|\E0\B3\06F\EC\E7\8E\DFr\0CT\B3\A0"
@__const.SHA256_Xcompare_37.result0 = [32 x i8] c"4^\96@\D6D\ABf\09\E7\92\05\DF%\14\A2\D5\13\AE\BA\FCyk\1D\7Ff|,\FD\D1$\7F"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_37\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_37\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_37\0A\00"
define void @SHA256_Xcompare_37() {
%1 = alloca [83 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = bitcast [83 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 [83 x i8], [83 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 83)
%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 [83 x i8], [83 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 83)
%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 [83 x i8], [83 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 83)
%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_37.input = [83 x i8] c"\9D\B2\AE\16\F3\EER\9F\A0\8EC\F1\E3\8D\C2Z\B7\9D\E1\10\88\96\9C\C9\A3Z\F5\8E\E6ef\FD\E7Q\F5n\CE)\9C\B9\9Dr2\10\F8_O)\B5~}uv\A4;\99\EF\A0P\01D,\DC@\0D\8C\85\8D\CD|\E0\B3\06F\EC\E7\8E\DFr\0CT\B3\A0"
@__const.SHA256_Xcompare_37.result0 = [32 x i8] c"4^\96@\D6D\ABf\09\E7\92\05\DF%\14\A2\D5\13\AE\BA\FCyk\1D\7Ff|,\FD\D1$\7F"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_37\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_37\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_37\0A\00"
define void @SHA256_Xcompare_37() {
%1 = alloca [83 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [83 x i8], [83 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 83)
%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 83)
%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 83)
%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
}