#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_36() {
  unsigned char input[23] = {196, 101, 93,  29,  151, 114, 56,  63,
                             51,  187, 246, 131, 162, 41,  183, 134,
                             179, 156, 227, 40,  66,  180, 208};
  unsigned char result0[32] = {0x07, 0x1B, 0x93, 0xC4, 0x48, 0xAE, 0xB1, 0xED,
                               0x07, 0x5B, 0x5E, 0xBD, 0xB3, 0xA7, 0x41, 0x67,
                               0x9E, 0x56, 0x31, 0x93, 0xD7, 0xE7, 0x05, 0xF7,
                               0xBA, 0xAA, 0xF3, 0x46, 0x72, 0x90, 0x6B, 0x95};
  unsigned char result1[32];
  memset(result1, 0, 32);
  SHA256_VST(input, result1, 23);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_VST in "
             "SHA256_Xcompare_36\n");
  memset(result1, 0, 32);
  SHA256_NSS(input, result1, 23);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_NSS in "
             "SHA256_Xcompare_36\n");
  memset(result1, 0, 32);
  SHA256_sodium(input, result1, 23);
  check_test(result0, result1, 32,
             "Disagreement between given answer and SHA256_sodium in "
             "SHA256_Xcompare_36\n");
}


x86 assembly (clang, -O0):
<SHA256_Xcompare_36>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0xea1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9e(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe9c(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xe96(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xe8e(%rip),%al
mov    %al,-0xa(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe8b(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe85(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x17,%edx
call   1030 <SHA256_VST@plt>
lea    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x20,%edx
lea    0xe53(%rip),%rcx
call   1070 <check_test@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x17,%edx
call   1050 <SHA256_NSS@plt>
lea    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x20,%edx
lea    0xe60(%rip),%rcx
call   1070 <check_test@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x17,%edx
call   1060 <SHA256_sodium@plt>
lea    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x20,%edx
lea    0xe6d(%rip),%rcx
call   1070 <check_test@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA256_Xcompare_36>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
movaps 0xea0(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0xd0b44228e39cb386,%rax
42 b4 d0
mov    %rax,0xf(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe9a(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x40(%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    $0x17,%edx
call   1030 <SHA256_VST@plt>
lea    0xe87(%rip),%rcx
lea    0x20(%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    $0x17,%edx
call   1050 <SHA256_NSS@plt>
lea    0xe94(%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    $0x17,%edx
call   1060 <SHA256_sodium@plt>
lea    0xea6(%rip),%rcx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1070 <check_test@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.SHA256_Xcompare_36.input = [23 x i8] c"\C4e]\1D\97r8?3\BB\F6\83\A2)\B7\86\B3\9C\E3(B\B4\D0"
@__const.SHA256_Xcompare_36.result0 = [32 x i8] c"\07\1B\93\C4H\AE\B1\ED\07[^\BD\B3\A7Ag\9EV1\93\D7\E7\05\F7\BA\AA\F3Fr\90k\95"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_36\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_36\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_36\0A\00"
define void @SHA256_Xcompare_36() {
%1 = alloca [23 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = bitcast [23 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 [23 x i8], [23 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 23)
%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 [23 x i8], [23 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 23)
%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 [23 x i8], [23 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 23)
%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_36.input = [23 x i8] c"\C4e]\1D\97r8?3\BB\F6\83\A2)\B7\86\B3\9C\E3(B\B4\D0"
@__const.SHA256_Xcompare_36.result0 = [32 x i8] c"\07\1B\93\C4H\AE\B1\ED\07[^\BD\B3\A7Ag\9EV1\93\D7\E7\05\F7\BA\AA\F3Fr\90k\95"
@.str = [72 x i8] c"Disagreement between given answer and SHA256_VST in SHA256_Xcompare_36\0A\00"
@.str.1 = [72 x i8] c"Disagreement between given answer and SHA256_NSS in SHA256_Xcompare_36\0A\00"
@.str.2 = [75 x i8] c"Disagreement between given answer and SHA256_sodium in SHA256_Xcompare_36\0A\00"
define void @SHA256_Xcompare_36() {
%1 = alloca [23 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [23 x i8], [23 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 23)
%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 23)
%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 23)
%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
}