#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 */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test_1();
int /*<<< orphan*/ test_10();
int /*<<< orphan*/ test_11();
int /*<<< orphan*/ test_12();
int /*<<< orphan*/ test_13();
int /*<<< orphan*/ test_14();
int /*<<< orphan*/ test_2();
int /*<<< orphan*/ test_3();
int /*<<< orphan*/ test_4();
int /*<<< orphan*/ test_5();
int /*<<< orphan*/ test_6();
int /*<<< orphan*/ test_7();
int /*<<< orphan*/ test_8();
int /*<<< orphan*/ test_9();
int32_t main(void) {
  setbuf(stdout, NULL);
  printf("Performing SHA256 tests (NIST tests vectors)...\n");
  test_1();
  test_2();
  test_3();
  test_4();
  test_5();
  test_6();
  test_7();
  test_8();
  test_9();
  test_10();
  test_11();
  test_12();
  test_13();
  test_14();
  printf("All SHA256 tests succeeded!\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <setbuf@plt>
lea    0xdd8(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1030 <test_1@plt>
mov    $0x0,%al
call   10b0 <test_2@plt>
mov    $0x0,%al
call   1120 <test_3@plt>
mov    $0x0,%al
call   10c0 <test_4@plt>
mov    $0x0,%al
call   1040 <test_5@plt>
mov    $0x0,%al
call   10d0 <test_6@plt>
mov    $0x0,%al
call   1050 <test_7@plt>
mov    $0x0,%al
call   10e0 <test_8@plt>
mov    $0x0,%al
call   1060 <test_9@plt>
mov    $0x0,%al
call   1110 <test_10@plt>
mov    $0x0,%al
call   10a0 <test_11@plt>
mov    $0x0,%al
call   1100 <test_12@plt>
mov    $0x0,%al
call   1090 <test_13@plt>
mov    $0x0,%al
call   10f0 <test_14@plt>
lea    0xd9b(%rip),%rdi
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2dd8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <setbuf@plt>
lea    0xde8(%rip),%rdi
call   1070 <puts@plt>
xor    %eax,%eax
call   1030 <test_1@plt>
xor    %eax,%eax
call   10b0 <test_2@plt>
xor    %eax,%eax
call   1120 <test_3@plt>
xor    %eax,%eax
call   10c0 <test_4@plt>
xor    %eax,%eax
call   1040 <test_5@plt>
xor    %eax,%eax
call   10d0 <test_6@plt>
xor    %eax,%eax
call   1050 <test_7@plt>
xor    %eax,%eax
call   10e0 <test_8@plt>
xor    %eax,%eax
call   1060 <test_9@plt>
xor    %eax,%eax
call   1110 <test_10@plt>
xor    %eax,%eax
call   10a0 <test_11@plt>
xor    %eax,%eax
call   1100 <test_12@plt>
xor    %eax,%eax
call   1090 <test_13@plt>
xor    %eax,%eax
call   10f0 <test_14@plt>
lea    0xdaa(%rip),%rdi
call   1070 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [49 x i8] c"Performing SHA256 tests (NIST tests vectors)...\0A\00"
@.str.1 = [30 x i8] c"All SHA256 tests succeeded!\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @setbuf(i32 %2, i32* null)
%4 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @test_1()
%6 = call i32 (...) @test_2()
%7 = call i32 (...) @test_3()
%8 = call i32 (...) @test_4()
%9 = call i32 (...) @test_5()
%10 = call i32 (...) @test_6()
%11 = call i32 (...) @test_7()
%12 = call i32 (...) @test_8()
%13 = call i32 (...) @test_9()
%14 = call i32 (...) @test_10()
%15 = call i32 (...) @test_11()
%16 = call i32 (...) @test_12()
%17 = call i32 (...) @test_13()
%18 = call i32 (...) @test_14()
%19 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [48 x i8] c"Performing SHA256 tests (NIST tests vectors)...\00"
@str.2 = [29 x i8] c"All SHA256 tests succeeded!\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32* null)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @test_1()
%5 = tail call i32 (...) @test_2()
%6 = tail call i32 (...) @test_3()
%7 = tail call i32 (...) @test_4()
%8 = tail call i32 (...) @test_5()
%9 = tail call i32 (...) @test_6()
%10 = tail call i32 (...) @test_7()
%11 = tail call i32 (...) @test_8()
%12 = tail call i32 (...) @test_9()
%13 = tail call i32 (...) @test_10()
%14 = tail call i32 (...) @test_11()
%15 = tail call i32 (...) @test_12()
%16 = tail call i32 (...) @test_13()
%17 = tail call i32 (...) @test_14()
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}